{
  "openapi": "3.1.0",
  "info": {
    "title": "OSiR - API klienta Free i integracji Premium",
    "version": "1.3.0",
    "description": "Kwoty w groszach PLN, daty odpowiedzi w UTC. Parametry wyszukiwania dat/godzin: Europe/Warsaw. Standardowy panel pracowników jest odrębny. Historyczny adres api/index.php?route=/v1/... nadal działa. Specyfikacja opisuje API klienta oraz konfigurację integracji; istniejące operacje grafików opisuje docs/API.md."
  },
  "servers": [
    {
      "url": "/osir/api/v1",
      "description": "Lokalny XAMPP; na innym wdrożeniu zmień prefiks /osir"
    }
  ],
  "paths": {
    "/client/auth/register": {
      "post": {
        "summary": "Utwórz wyzwanie rejestracji klienta",
        "description": "Produkcja: Cloudflare Turnstile, action zgodny z końcówką ścieżki. Local loopback używa skrzynki testowej. Reset nie ujawnia, czy e-mail istnieje.",
        "operationId": "post__client_auth_register",
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Challenge"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "password": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "Hasło klienta"
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "turnstile_token": {
                    "type": "string"
                  }
                },
                "required": [
                  "email",
                  "password",
                  "name"
                ]
              }
            }
          }
        }
      }
    },
    "/client/auth/register/verify": {
      "post": {
        "summary": "Potwierdź OTP: register",
        "description": "Kod ważny 10 minut, maksimum 5 błędnych prób, jednorazowy. Token ważny 30 dni. Reset unieważnia wszystkie tokeny klienta.",
        "operationId": "post__client_auth_register_verify",
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Token"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "challenge_id": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "code": {
                    "type": "string",
                    "pattern": "^[0-9]{6}$"
                  }
                },
                "required": [
                  "challenge_id",
                  "code"
                ]
              }
            }
          }
        }
      }
    },
    "/client/auth/login": {
      "post": {
        "summary": "Sprawdź hasło klienta i wyślij OTP",
        "description": "Produkcja: Cloudflare Turnstile, action zgodny z końcówką ścieżki. Local loopback używa skrzynki testowej. Reset nie ujawnia, czy e-mail istnieje.",
        "operationId": "post__client_auth_login",
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Challenge"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "password": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "Hasło klienta"
                  },
                  "turnstile_token": {
                    "type": "string"
                  }
                },
                "required": [
                  "email",
                  "password"
                ]
              }
            }
          }
        }
      }
    },
    "/client/auth/login/verify": {
      "post": {
        "summary": "Potwierdź OTP: login",
        "description": "Kod ważny 10 minut, maksimum 5 błędnych prób, jednorazowy. Token ważny 30 dni. Reset unieważnia wszystkie tokeny klienta.",
        "operationId": "post__client_auth_login_verify",
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Token"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "challenge_id": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "code": {
                    "type": "string",
                    "pattern": "^[0-9]{6}$"
                  }
                },
                "required": [
                  "challenge_id",
                  "code"
                ]
              }
            }
          }
        }
      }
    },
    "/client/auth/reset": {
      "post": {
        "summary": "Wyślij OTP resetu hasła klienta",
        "description": "Produkcja: Cloudflare Turnstile, action zgodny z końcówką ścieżki. Local loopback używa skrzynki testowej. Reset nie ujawnia, czy e-mail istnieje.",
        "operationId": "post__client_auth_reset",
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Challenge"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "password": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "Nowe hasło, minimum 12 znaków"
                  },
                  "turnstile_token": {
                    "type": "string"
                  }
                },
                "required": [
                  "email",
                  "password"
                ]
              }
            }
          }
        }
      }
    },
    "/client/auth/reset/verify": {
      "post": {
        "summary": "Potwierdź OTP: reset",
        "description": "Kod ważny 10 minut, maksimum 5 błędnych prób, jednorazowy. Token ważny 30 dni. Reset unieważnia wszystkie tokeny klienta.",
        "operationId": "post__client_auth_reset_verify",
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "const": true
                        }
                      },
                      "required": []
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "challenge_id": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "code": {
                    "type": "string",
                    "pattern": "^[0-9]{6}$"
                  }
                },
                "required": [
                  "challenge_id",
                  "code"
                ]
              }
            }
          }
        }
      }
    },
    "/client/me": {
      "get": {
        "summary": "Własne konto klienta",
        "description": "",
        "operationId": "get__client_me",
        "security": [
          {
            "clientBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "name": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        }
                      },
                      "required": []
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/client/logout": {
      "post": {
        "summary": "Unieważnij bieżący token klienta",
        "description": "",
        "operationId": "post__client_logout",
        "security": [
          {
            "clientBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "const": true
                        }
                      },
                      "required": []
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/client/bookings": {
      "get": {
        "summary": "Lista własnych rezerwacji",
        "description": "Po 50 rezerwacji, od najnowszego ID. Nie udostępnia zapisów innych klientów ani zapisów historycznych powiązanych tylko e-mailem.",
        "operationId": "get__client_bookings",
        "security": [
          {
            "clientBearer": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Booking"
                          }
                        }
                      },
                      "required": []
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Zarezerwuj opublikowany termin - Free",
        "description": "Klient potwierdził e-mail podczas logowania/rejestracji. Serwer sprawdza cenę, publikację online, miejsca i blokady. Ponowienie identycznego request_key jest idempotentne. Kwota = cena terminu × liczba miejsc; wynajem stanowiska zawsze seats=1.",
        "operationId": "post__client_bookings",
        "security": [
          {
            "clientBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Booking"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "schedule_uuid": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "request_key": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "event_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "participant": {
                    "type": "string",
                    "maxLength": 160
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "seats": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "quoted_total_grosz": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  }
                },
                "required": [
                  "schedule_uuid",
                  "request_key",
                  "event_id",
                  "participant",
                  "seats",
                  "quoted_total_grosz"
                ]
              }
            }
          }
        }
      }
    },
    "/client/bookings/claim": {
      "post": {
        "summary": "Przypisz zapis z linku potwierdzenia",
        "description": "Wymaga zalogowania hasłem i OTP oraz zgodnego zweryfikowanego e-maila. Sam link nie loguje. Wygasły lub obcy link: 404. Ponowienie dla tego samego właściciela jest bezpieczne.",
        "operationId": "post__client_bookings_claim",
        "security": [
          {
            "clientBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "claimed": {
                          "const": true
                        }
                      },
                      "required": [
                        "claimed"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "claim_token": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                },
                "required": [
                  "claim_token"
                ]
              }
            }
          }
        }
      }
    },
    "/client/bookings/{id}": {
      "get": {
        "summary": "Szczegóły własnego zapisu",
        "description": "",
        "operationId": "get__client_bookings__id_",
        "security": [
          {
            "clientBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Booking"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Edytuj lub przenieś własny zapis - Free",
        "description": "Tylko aktywna rezerwacja, zgodnie z polityką OSiR. Zmiana event_id wyłącznie w tym samym OSiR; atomowa, z ponowną wyceną. Ten sam termin zachowuje cenę jednostkową rezerwacji. Rozliczone zapisy: zmiana terminu/liczby miejsc wymaga obsługi. Nie można zmieniać e-maila, autora, blokady ani notatki.",
        "operationId": "patch__client_bookings__id_",
        "security": [
          {
            "clientBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Booking"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "event_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "participant": {
                    "type": "string",
                    "maxLength": 160
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "seats": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "quoted_total_grosz": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  }
                },
                "required": [
                  "version",
                  "quoted_total_grosz"
                ]
              }
            }
          }
        }
      }
    },
    "/client/bookings/{id}/cancel": {
      "post": {
        "summary": "Anuluj własny zapis - Free",
        "description": "Respektuje zasady, czas i blokady OSiR. Nie wykonuje zwrotu płatności. Ponowienie dla już anulowanego zapisu zwraca aktualny stan.",
        "operationId": "post__client_bookings__id__cancel",
        "security": [
          {
            "clientBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Booking"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "version"
                ]
              }
            }
          }
        }
      }
    },
    "/public/schedules/{uuid}/availability": {
      "get": {
        "summary": "Wyszukaj wolne terminy",
        "description": "Zakres dat włącznie, maks. 93 dni; domyślnie dzisiaj-30 dni naprzód. Godziny obejmują cały termin w danym dniu. Najbliższy = pierwszy wynik chronologicznie, bez offsetu. Szukamy istniejących opublikowanych terminów; nie generujemy okien w pustym grafiku. Cena za miejsce/termin, nie łączna cena kilku zasobów. Resource_count wyszukuje różne zasoby z identycznym początkiem i końcem; nie oznacza sąsiedztwa ani jednoczesnej rezerwacji wszystkich. Limit skanowania 10000 terminów: zawęź zakres przy 422.",
        "operationId": "get__public_schedules__uuid__availability",
        "security": [],
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Free"
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Free"
          },
          {
            "name": "time_from",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "00:00"
            },
            "description": "Free"
          },
          {
            "name": "time_to",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "24:00"
            },
            "description": "Free"
          },
          {
            "name": "nearest",
            "in": "query",
            "schema": {
              "type": "integer",
              "enum": [
                0,
                1
              ],
              "default": 0
            },
            "description": "Free"
          },
          {
            "name": "resource_id",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Free"
          },
          {
            "name": "group_id",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Free"
          },
          {
            "name": "discipline",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Free"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Free"
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "Free"
          },
          {
            "name": "min_price_grosz",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100000000
            },
            "description": "Wymaga Premium OSiR"
          },
          {
            "name": "max_price_grosz",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100000000
            },
            "description": "Wymaga Premium OSiR"
          },
          {
            "name": "duration_minutes",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Wymaga Premium OSiR"
          },
          {
            "name": "seats",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Wymaga Premium OSiR"
          },
          {
            "name": "resource_count",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "description": "Wymaga Premium OSiR"
          }
        ],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/AvailableEvent"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "starts_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "ends_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "resources": {
                                    "type": "array",
                                    "items": {
                                      "$ref": "#/components/schemas/AvailableEvent"
                                    }
                                  }
                                },
                                "required": []
                              }
                            ]
                          }
                        },
                        "total": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        },
                        "timezone": {
                          "const": "Europe/Warsaw"
                        },
                        "booking_mode": {
                          "enum": [
                            "online",
                            "phone"
                          ]
                        },
                        "policy": {
                          "$ref": "#/components/schemas/Policy"
                        }
                      },
                      "required": []
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accounts/{account}/client-policy": {
      "get": {
        "summary": "Zasady klientowskiej samoobsługi - panel Free",
        "description": "",
        "operationId": "get__accounts__account__client_policy",
        "security": [
          {
            "staffSession": []
          }
        ],
        "parameters": [
          {
            "name": "account",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Policy"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Zasady klientowskiej samoobsługi - panel Free",
        "description": "",
        "operationId": "patch__accounts__account__client_policy",
        "security": [
          {
            "staffSession": []
          }
        ],
        "parameters": [
          {
            "name": "account",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Policy"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Policy"
              }
            }
          }
        }
      }
    },
    "/accounts/{account}/changes": {
      "get": {
        "summary": "Pobierz zmiany OSiR - Premium",
        "description": "Najwyżej 100 wpisów audytu na stronę; odpowiedź może nie zawierać zmian operacyjnych, ale przesuwać next_cursor. Zapisz kursor również dla pustej items. Brak danych uczestników. Duplikaty deduplikuj po ID zmiany.",
        "operationId": "get__accounts__account__changes",
        "security": [
          {
            "integrationBearer": []
          },
          {
            "staffSession": []
          }
        ],
        "parameters": [
          {
            "name": "account",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Change"
                          }
                        },
                        "next_cursor": {
                          "type": "integer"
                        }
                      },
                      "required": []
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accounts/{account}/api-management": {
      "get": {
        "summary": "Lista kluczy i ustawień - panel administratora",
        "description": "",
        "operationId": "get__accounts__account__api_management",
        "security": [
          {
            "staffSession": []
          }
        ],
        "parameters": [
          {
            "name": "account",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {},
                      "required": []
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Utwórz klucz integracji - Premium",
        "description": "",
        "operationId": "post__accounts__account__api_management",
        "security": [
          {
            "staffSession": []
          }
        ],
        "parameters": [
          {
            "name": "account",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "token": {
                          "type": "string"
                        },
                        "expires_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": []
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "permission": {
                    "enum": [
                      "read",
                      "bookings",
                      "write"
                    ],
                    "default": "read"
                  },
                  "days": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 365,
                    "default": 30
                  },
                  "requests_per_minute": {
                    "type": "integer",
                    "minimum": 10,
                    "maximum": 3000,
                    "default": 300
                  },
                  "allowed_ips": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Włącz lub wyłącz klucze",
        "description": "",
        "operationId": "patch__accounts__account__api_management",
        "security": [
          {
            "staffSession": []
          }
        ],
        "parameters": [
          {
            "name": "account",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {},
                      "required": []
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "enabled": {
                    "enum": [
                      0,
                      1
                    ]
                  }
                },
                "required": [
                  "version",
                  "enabled"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Unieważnij klucz",
        "description": "",
        "operationId": "delete__accounts__account__api_management",
        "security": [
          {
            "staffSession": []
          }
        ],
        "parameters": [
          {
            "name": "account",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {},
                      "required": []
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "id"
                ]
              }
            }
          }
        }
      }
    },
    "/accounts/{account}/webhooks": {
      "get": {
        "summary": "Lista odbiorców zmian",
        "description": "",
        "operationId": "get__accounts__account__webhooks",
        "security": [
          {
            "staffSession": []
          }
        ],
        "parameters": [
          {
            "name": "account",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "url": {
                            "type": "string"
                          },
                          "active": {
                            "enum": [
                              0,
                              1
                            ]
                          },
                          "attempts": {
                            "type": "integer"
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          }
                        },
                        "required": []
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Dodaj webhook - Premium",
        "description": "Publiczny host HTTPS na porcie 443. Sekret pokazany raz. Nowy webhook zaczyna od nowych zmian. Wymaga cyklicznego wykonania bin/deliver-webhooks.php.",
        "operationId": "post__accounts__account__webhooks",
        "security": [
          {
            "staffSession": []
          }
        ],
        "parameters": [
          {
            "name": "account",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "secret": {
                          "type": "string"
                        }
                      },
                      "required": []
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 1000
                  }
                },
                "required": [
                  "url"
                ]
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Wstrzymaj lub wznów webhook - Premium",
        "description": "",
        "operationId": "patch__accounts__account__webhooks",
        "security": [
          {
            "staffSession": []
          }
        ],
        "parameters": [
          {
            "name": "account",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {},
                      "required": []
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "version": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "active": {
                    "enum": [
                      0,
                      1
                    ]
                  }
                },
                "required": [
                  "id",
                  "version",
                  "active"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Usuń webhook",
        "description": "",
        "operationId": "delete__accounts__account__webhooks",
        "security": [
          {
            "staffSession": []
          }
        ],
        "parameters": [
          {
            "name": "account",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {},
                      "required": []
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "id"
                ]
              }
            }
          }
        }
      }
    },
    "/accounts/{account}/outages": {
      "get": {
        "summary": "Lista awarii",
        "description": "Panel: redaktor lub administrator. Integracja: Premium. Do 500 wpisów, aktywne najpierw.",
        "operationId": "get__accounts__account__outages",
        "security": [
          {
            "staffSession": []
          },
          {
            "integrationBearer": []
          }
        ],
        "parameters": [
          {
            "name": "account",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "title": {
                            "type": "string"
                          },
                          "starts_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "ends_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "scope": {
                            "enum": [
                              "all",
                              "kinds",
                              "resources"
                            ]
                          },
                          "targets": {
                            "type": "array",
                            "items": {
                              "type": [
                                "string",
                                "integer"
                              ]
                            }
                          },
                          "active": {
                            "enum": [
                              0,
                              1
                            ]
                          },
                          "version": {
                            "type": "integer",
                            "minimum": 1
                          }
                        },
                        "required": []
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Zgłoś czasową awarię",
        "description": "Panel: administrator OSiR bez dodatku Premium. Integracja: Premium i write. Jeden ciągły okres do 366 dni. all: cały OSiR; kinds: nazwy typów; resources: ID zasobów. Sloty i zapisy pozostają bez zmian; każda część wspólna blokuje nową rezerwację z HTTP 423.",
        "operationId": "post__accounts__account__outages",
        "security": [
          {
            "staffSession": []
          },
          {
            "integrationBearer": []
          }
        ],
        "parameters": [
          {
            "name": "account",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": []
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 160
                  },
                  "starts_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "ends_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "scope": {
                    "enum": [
                      "all",
                      "kinds",
                      "resources"
                    ]
                  },
                  "targets": {
                    "type": "array",
                    "maxItems": 500,
                    "items": {
                      "type": [
                        "string",
                        "integer"
                      ]
                    }
                  }
                },
                "required": [
                  "title",
                  "starts_at",
                  "ends_at",
                  "scope"
                ]
              }
            }
          }
        }
      }
    },
    "/accounts/{account}/outages/{id}": {
      "get": {
        "summary": "Terminy i liczba zapisów objętych awarią",
        "description": "Panel: redaktor lub administrator; integracja Premium. Bez danych uczestników. Limit 5000 terminów w okresie; po przekroczeniu 422. Wyłączona awaria zwraca pustą listę.",
        "operationId": "get__accounts__account__outages__id_",
        "security": [
          {
            "staffSession": []
          },
          {
            "integrationBearer": []
          }
        ],
        "parameters": [
          {
            "name": "account",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "events": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "minimum": 1
                              },
                              "resource_id": {
                                "type": "integer",
                                "minimum": 1
                              },
                              "title": {
                                "type": "string"
                              },
                              "resource_name": {
                                "type": "string"
                              },
                              "starts_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "ends_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "bookings_count": {
                                "type": "integer"
                              }
                            },
                            "required": []
                          }
                        },
                        "bookings_count": {
                          "type": "integer"
                        }
                      },
                      "required": []
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Wyłącz awarię przed końcem okresu",
        "description": "Administrator OSiR; integracja Premium i write. Zachowuje historię. Nie wyłącza innych nakładających się awarii.",
        "operationId": "patch__accounts__account__outages__id_",
        "security": [
          {
            "staffSession": []
          },
          {
            "integrationBearer": []
          }
        ],
        "parameters": [
          {
            "name": "account",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "active": {
                          "const": 0
                        }
                      },
                      "required": []
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "active": {
                    "const": 0
                  }
                },
                "required": [
                  "version",
                  "active"
                ]
              }
            }
          }
        }
      }
    },
    "/client/waitlist-context": {
      "get": {
        "summary": "Szczegóły terminu dla listy",
        "description": "",
        "operationId": "get__client_waitlist_context",
        "security": [
          {
            "clientBearer": []
          }
        ],
        "parameters": [
          {
            "name": "schedule_uuid",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "event_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {},
                      "required": []
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/client/waitlist": {
      "get": {
        "summary": "Własne 100 ostatnich wpisów",
        "description": "",
        "operationId": "get__client_waitlist",
        "security": [
          {
            "clientBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "minimum": 1
                              },
                              "account_id": {
                                "type": "integer",
                                "minimum": 1
                              },
                              "event_id": {
                                "type": "integer",
                                "minimum": 1
                              },
                              "status": {
                                "enum": [
                                  "waiting",
                                  "offered",
                                  "accepted",
                                  "cancelled",
                                  "expired"
                                ]
                              },
                              "version": {
                                "type": "integer",
                                "minimum": 1
                              },
                              "seats": {
                                "type": "integer",
                                "minimum": 1
                              },
                              "offered_until": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "YYYY-MM-DD HH:MM:SS UTC"
                              },
                              "quoted_total_grosz": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 100000000
                              },
                              "booking_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "title": {
                                "type": "string"
                              },
                              "starts_at": {
                                "type": "string"
                              }
                            },
                            "required": []
                          }
                        }
                      },
                      "required": []
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Dołącz do kolejki pełnego terminu",
        "description": "",
        "operationId": "post__client_waitlist",
        "security": [
          {
            "clientBearer": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "account_id": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "event_id": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "status": {
                          "enum": [
                            "waiting",
                            "offered",
                            "accepted",
                            "cancelled",
                            "expired"
                          ]
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "seats": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "offered_until": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "YYYY-MM-DD HH:MM:SS UTC"
                        },
                        "quoted_total_grosz": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "booking_id": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "title": {
                          "type": "string"
                        },
                        "starts_at": {
                          "type": "string"
                        }
                      },
                      "required": []
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "schedule_uuid": {
                    "type": "string"
                  },
                  "event_id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "participant": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "seats": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "request_key": {
                    "type": "string"
                  }
                },
                "required": [
                  "schedule_uuid",
                  "event_id",
                  "participant",
                  "seats",
                  "request_key"
                ]
              }
            }
          }
        }
      }
    },
    "/client/waitlist/{id}/accept": {
      "post": {
        "summary": "Przyjmij ofertę z jawną ceną",
        "description": "",
        "operationId": "post__client_waitlist__id__accept",
        "security": [
          {
            "clientBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "account_id": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "event_id": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "status": {
                          "enum": [
                            "waiting",
                            "offered",
                            "accepted",
                            "cancelled",
                            "expired"
                          ]
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "seats": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "offered_until": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "YYYY-MM-DD HH:MM:SS UTC"
                        },
                        "quoted_total_grosz": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "booking_id": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "title": {
                          "type": "string"
                        },
                        "starts_at": {
                          "type": "string"
                        }
                      },
                      "required": []
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "quoted_total_grosz": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  }
                },
                "required": [
                  "version",
                  "quoted_total_grosz"
                ]
              }
            }
          }
        }
      }
    },
    "/client/waitlist/{id}/cancel": {
      "post": {
        "summary": "Zrezygnuj z listy",
        "description": "",
        "operationId": "post__client_waitlist__id__cancel",
        "security": [
          {
            "clientBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "account_id": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "event_id": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "status": {
                          "enum": [
                            "waiting",
                            "offered",
                            "accepted",
                            "cancelled",
                            "expired"
                          ]
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "seats": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "offered_until": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "YYYY-MM-DD HH:MM:SS UTC"
                        },
                        "quoted_total_grosz": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "booking_id": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "title": {
                          "type": "string"
                        },
                        "starts_at": {
                          "type": "string"
                        }
                      },
                      "required": []
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "version"
                ]
              }
            }
          }
        }
      }
    },
    "/client/notifications": {
      "get": {
        "summary": "Strumień powiadomień z kursorem",
        "description": "Własna skrzynka Free; strumień OSiR Premium dla backendu aplikacji push. Deduplikacja po id. Aktualny stan trzeba pobrać przed przyjęciem oferty.",
        "operationId": "get__client_notifications",
        "security": [
          {
            "clientBearer": []
          }
        ],
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "minimum": 1
                              },
                              "account_id": {
                                "type": "integer",
                                "minimum": 1
                              },
                              "client_id": {
                                "type": "integer",
                                "minimum": 1
                              },
                              "type": {
                                "type": "string"
                              },
                              "payload": {
                                "type": "object",
                                "properties": {
                                  "message": {
                                    "type": "string"
                                  },
                                  "waitlist_id": {
                                    "type": "integer",
                                    "minimum": 1
                                  },
                                  "booking_id": {
                                    "type": "integer",
                                    "minimum": 1
                                  },
                                  "version": {
                                    "type": "integer",
                                    "minimum": 1
                                  }
                                },
                                "required": []
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "read_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": []
                          }
                        },
                        "next_cursor": {
                          "type": "integer"
                        },
                        "has_more": {
                          "type": "boolean"
                        }
                      },
                      "required": []
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/accounts/{account}/client-notifications": {
      "get": {
        "summary": "Strumień powiadomień z kursorem",
        "description": "Własna skrzynka Free; strumień OSiR Premium dla backendu aplikacji push. Deduplikacja po id. Aktualny stan trzeba pobrać przed przyjęciem oferty.",
        "operationId": "get__accounts__account__client_notifications",
        "security": [
          {
            "integrationBearer": []
          },
          {
            "staffSession": []
          }
        ],
        "parameters": [
          {
            "name": "account",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "minimum": 1
                              },
                              "account_id": {
                                "type": "integer",
                                "minimum": 1
                              },
                              "client_id": {
                                "type": "integer",
                                "minimum": 1
                              },
                              "type": {
                                "type": "string"
                              },
                              "payload": {
                                "type": "object",
                                "properties": {
                                  "message": {
                                    "type": "string"
                                  },
                                  "waitlist_id": {
                                    "type": "integer",
                                    "minimum": 1
                                  },
                                  "booking_id": {
                                    "type": "integer",
                                    "minimum": 1
                                  },
                                  "version": {
                                    "type": "integer",
                                    "minimum": 1
                                  }
                                },
                                "required": []
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "read_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": []
                          }
                        },
                        "next_cursor": {
                          "type": "integer"
                        },
                        "has_more": {
                          "type": "boolean"
                        }
                      },
                      "required": []
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/client/notifications/{id}/read": {
      "post": {
        "summary": "Oznacz własną wiadomość jako przeczytaną",
        "description": "",
        "operationId": "post__client_notifications__id__read",
        "security": [
          {
            "clientBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sukces",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "const": true
                        }
                      },
                      "required": []
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Nieprawidłowy JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Brak lub nieważne uwierzytelnienie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Brak Premium, uprawnień lub zgody na samoobsługę",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Brak własnego/publicznego obiektu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Niedozwolona metoda",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Konflikt, cena, limit miejsc, wersja albo termin zmian",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Walidacja",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "Blokada wpisu lub terminu",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limit żądań",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Konfiguracja lub wysyłka OTP niedostępna",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "clientBearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Token wyłącznie klienta z client/auth/.../verify"
      },
      "integrationBearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Klucz własnego OSiR wymagający Premium"
      },
      "staffSession": {
        "type": "apiKey",
        "in": "cookie",
        "name": "OSIR_SESSION",
        "description": "Sesja administratora po haśle i OTP; mutacje wymagają X-CSRF-Token"
      }
    },
    "schemas": {
      "Policy": {
        "type": "object",
        "properties": {
          "edit_enabled": {
            "enum": [
              0,
              1
            ]
          },
          "cancel_enabled": {
            "enum": [
              0,
              1
            ]
          },
          "change_minutes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 525600
          },
          "version": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "edit_enabled",
          "cancel_enabled",
          "change_minutes",
          "version"
        ]
      },
      "Booking": {
        "type": "object",
        "properties": {
          "reference": {
            "type": "string"
          },
          "account_name": {
            "type": "string"
          },
          "account_phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "resource_name": {
            "type": "string"
          },
          "schedule_uuid": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "billing_mode": {
            "enum": [
              "unit",
              "person",
              "fixed"
            ]
          },
          "locked": {
            "type": "boolean"
          },
          "has_payments": {
            "type": "boolean"
          },
          "outage_blocked": {
            "type": "boolean"
          },
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "account_id": {
            "type": "integer",
            "minimum": 1
          },
          "event_id": {
            "type": "integer",
            "minimum": 1
          },
          "resource_id": {
            "type": "integer",
            "minimum": 1
          },
          "participant": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "seats": {
            "type": "integer",
            "minimum": 1
          },
          "status": {
            "enum": [
              "confirmed",
              "cancelled"
            ]
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "total_grosz": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100000000
          },
          "title": {
            "type": "string"
          },
          "starts_at": {
            "type": "string",
            "format": "date-time"
          },
          "ends_at": {
            "type": "string",
            "format": "date-time"
          },
          "event_status": {
            "enum": [
              "open",
              "closed",
              "cancelled"
            ]
          },
          "policy": {
            "$ref": "#/components/schemas/Policy"
          }
        },
        "required": [
          "id",
          "account_id",
          "event_id",
          "status",
          "version",
          "total_grosz"
        ]
      },
      "AvailableEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "resource_id": {
            "type": "integer",
            "minimum": 1
          },
          "title": {
            "type": "string"
          },
          "starts_at": {
            "type": "string",
            "format": "date-time"
          },
          "ends_at": {
            "type": "string",
            "format": "date-time"
          },
          "price_grosz": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100000000
          },
          "billing_mode": {
            "enum": [
              "unit",
              "person",
              "fixed"
            ]
          },
          "resource_name": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "group_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "group_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "free": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "id",
          "resource_id",
          "starts_at",
          "ends_at",
          "price_grosz",
          "free"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "status": {
                "type": "integer"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "status",
              "message"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "Challenge": {
        "type": "object",
        "properties": {
          "challenge_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "requires_otp": {
            "const": true
          },
          "expires_in": {
            "const": 600
          }
        },
        "required": []
      },
      "Token": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "type": {
            "const": "Bearer"
          },
          "scope": {
            "const": "client"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": []
      },
      "Change": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "entity_type": {
            "type": "string"
          },
          "entity_id": {
            "type": "integer",
            "minimum": 1
          },
          "action": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": []
      }
    }
  }
}
