PLAYFIT / API

PlayFit · Backend reference

Техническая документация

Архитектура сервисов, параметры окружения, модель данных, HTTP-контракты, авторизация, бизнес-процессы, интеграции и процедуры эксплуатации. Описание соответствует исходникам этой версии backend.

Health Check · состояние окружения →

Health Check показывает реальные проверки API и ответы FitBase отдельно от конфигурации и истории. Подробности CRM доступны владельцу.

1. Архитектура и границы системы

PlayFit состоит из независимых репозиториев API, двух веб-клиентов, административного портала и инфраструктуры. Backend playfit-back-redisign обслуживает общие бизнес-правила и данные. На Stage основной клиент playfit-web-redesign работает на корне домена; playfit-web-app сохраняется как отдельный клиент. Клиенты обращаются к API по HTTP и не подключаются к PostgreSQL.

HTTP entry point src/app/api/[...path]/route.ts передаёт запрос в api-router. Public handlers обрабатывают открытые и внутренние операции; остальные запросы проходят authenticate, rate limit, onboarding и доменную диспетчеризацию. Результат сериализуется в DTO. Транзакции и взаимодействие с провайдерами выполняются в application-слое.

PostgreSQL хранит пользователей, спортивные события, ledger, доступы и очереди. Storage хранит файлы. FitBase предоставляет сведения о клиентах и посещениях. Email и push доставляются отдельными workers; доступность HTTP API не подтверждает доставку сообщений.

Компоненты
Репозиторий / каталогОтветственность
playfit-back-redisignHTTP API, авторизация, доменные правила, Prisma, диагностика
playfit-web-redesignОсновной пользовательский интерфейс, /web-api proxy, защищённый media proxy
playfit-web-appОтдельный пользовательский веб-клиент и его API adapters
playfit-admin-portalУправление пользователями, контентом, спортом, CRM и магазином
playfit-deployment-infrastructureCaddy, Compose, изоляция окружений, резервные копии и release workflows
src/server/domain → application → presentationВычисления без HTTP → сценарии и транзакции → клиентские DTO
src/server/contracts; docs/*.contracts.jsonRuntime Zod validation и сгенерированные request/response каталоги

Исходники: src/server/api-router.ts, src/server/application/api/authenticated-router.ts, src/server/shared/transport.ts

2. Зависимости и конфигурация

Версии инструментов определены package.json и pnpm-lock.yaml: Node.js 24+, pnpm 11.29.0, Next.js 16.4.6, React 19.2.4, Prisma 7.10.1, Zod 4.6.7. Установка выполняется с frozen lockfile. Runtime-секреты передаются через окружение и не включаются в исходники, Docker build arguments или публичную документацию.

APP_ENV задаёт прикладную среду независимо от NODE_ENV. Production-сборка может работать с APP_ENV=staging. AUTH_DEV_MODE и SEED_DEMO_DATA в рабочих окружениях должны быть false. Образ сам по себе не задаёт адрес БД, внешние Origin или параметры интеграций.

Параметры окружения
ГруппаПараметрыНазначение
СредаAPP_ENV; NODE_ENV; PORTПрикладные guards, режим Next.js и HTTP listener; API использует порт 3001
PostgreSQLDATABASE_URL; DATABASE_POOL_MAX/MIN; DATABASE_POOL_*_TIMEOUT_MS; DATABASE_POOL_MAX_USESПодключение и ограничения пула; значения зависят от нагрузки окружения
СессияJWT_SECRET; SESSION_COOKIE_NAME; SESSION_COOKIE_PATHКлюч подписи и границы cookie; имя и путь валидируются сервером
Origin / URLAPP_ORIGIN; ADMIN_ORIGIN; API_PUBLIC_URL; PROXY_ORIGIN; APP_PUBLIC_URL; APP_BASE_PATHCORS/CSRF allowlist и абсолютные ссылки. Для клиента на корне APP_BASE_PATH пустой
ФайлыSTORAGE_ROOTКорневой каталог runtime storage; в контейнере /app/storage
CRMFITBASE_API_TOKEN; CRM_SYNC_INTERVAL_MS; CRM_SYNC_MIN_INTERVAL_MSСерверная авторизация и интервалы sync; настройки филиалов хранятся отдельно по залам
EmailEMAIL_PROVIDER; SMTP_*; EMAIL_FROM; EMAIL_REPLY_TO; EMAIL_UNSUBSCRIBE_SECRET; EMAIL_WORKER_POLL_MSSMTP transport, шаблоны ссылок, отписка и опрос outbox
Push / TelegramWEB_PUSH_VAPID_*; TELEGRAM_BOT_TOKEN; TELEGRAM_INIT_DATA_MAX_AGE_SECONDSПодпись Web Push и проверка Telegram initData
Внутренние задачиBOT_INTERNAL_TOKENОтдельный service credential; не заменяет пользовательскую OWNER-сессию
ГеоданныеGEOIP_CITY_DB_PATH; GEOIP_ASN_DB_PATH; GEOIP_ANONYMOUS_DB_PATHЛокальные базы MaxMind, без отправки IP внешнему GeoIP API
ЛимитыRATE_LIMIT_MAX; RATE_LIMIT_WINDOW_MSБазовый rate limit; отдельные операции используют дополнительные ограничения
Поиск адресовDADATA_API_TOKENСерверный доступ к подсказкам местоположения
Security emailPASSWORD_RESET_TTL_MS; EMAIL_MAX_RETRIES; EMAIL_OPERATIONAL_RECIPIENTSСрок восстановления пароля, повторы и операционные адресаты
ПолитикаPRIVACY_POLICY_VERSIONТекущая версия обязательной политики
Stage QASTAGE_PHONE_LINK_EXEMPT_USER_IDSЯвный список ID тестовых пользователей; учитывается только при APP_ENV=staging
pnpm install --frozen-lockfile
pnpm prisma:generate
# DATABASE_URL: отдельная локальная база *_dev
pnpm db:sync
# Только первичное создание владельца с BOOTSTRAP_OWNER_*
pnpm db:bootstrap
pnpm dev

Исходники: package.json, .env.example, src/server/db.ts, src/server/auth-service.ts

3. Каноническая схема и хранение данных

Схема моделей хранится в prisma/schema.prisma. prisma/baseline.sql создаёт пустую базу с опорными данными, без рабочих аккаунтов. prisma/invariants.sql содержит ограничения, индексы и триггеры, которые должны сохраняться дополнительно к модели Prisma. Цепочка файлов миграций для этого API не используется.

pnpm db:sync проверяет среду и адрес БД, получает advisory lock, создаёт baseline только в пустой базе, выполняет Prisma db push без разрешения потери данных и восстанавливает SQL invariants. Завершает переход исторических PENDING-регистраций через прикладной сервис с аудитом и реферальными правилами. Повторное выполнение не должно повторно начислять награды.

Режим --check строит read-only schema diff. DROP TABLE/COLUMN/CONSTRAINT/INDEX/TYPE, TRUNCATE, DELETE FROM и ALTER TYPE блокируют штатный выпуск. Схема и storage изменяются независимо; наличие файла не является разрешением доступа к контенту.

Разделение окружений
APP_ENVДопустимая цель db:syncИзоляция
developmentЛокальный PostgreSQL, имя *_devРабочие Stage/Production URL запрещены guard
testЛокальный / postgres PostgreSQL, имя *_testОтдельные временные базы и сети тестовых запусков
stagingstage-postgres / playfit_stageСобственные БД, env и playfit-stage-storage
productionprod-postgres / playfitСобственные БД, env и playfit-prod-storage
pnpm exec tsx prisma/sync.ts --check
pnpm db:sync

Исходники: prisma/sync.ts, prisma/sync-policy.ts, prisma/schema.prisma, prisma/invariants.sql

4. HTTP-протокол и обработка ошибок

Базовый префикс прикладного API — /api. GET /api возвращает HTML-документацию, а конкретные ресурсы — JSON. JSON body передаётся с Content-Type: application/json. Файлы загружаются multipart/form-data; boundary формирует HTTP-клиент.

Успешный JSON имеет envelope { data: ... }. Ошибка нормализуется в { error: { code, message, details?, requestId } }. X-Request-Id связывает ответ с журналом. Даты сериализуются в ISO 8601. При PATCH отсутствие поля означает отсутствие изменения; null допустим только для полей, допускающих явное очищение.

Origin проверяется до диспетчеризации; CORS allowlist строится из конфигурации среды. Credentials не разрешают произвольный Origin. Rate limit применяется к соответствующему публичному ресурсу либо к ресурсу и userId. Диагностическая public readiness имеет отдельный ограниченный кеш и не зависит от DB rate-limit bucket.

Пагинация и идемпотентность относятся к конкретной операции. Таймаут HTTP-клиента не отменяет уже завершённую транзакцию. Повтор мутации использует тот же поддерживаемый ключ операции; новый ключ может обозначать новое списание или действие.

Классы HTTP-ответов
СтатусСемантика
200 / 201 / 204Успех согласно контракту операции; пустой data/list не является транспортной ошибкой
400Некорректный ввод или недопустимое сочетание параметров
401Отсутствующая/недействительная сессия либо credential соответствующего протокола
403Onboarding, роль, scope, уровень или доменное ограничение
404 / 405 / 410Ресурс не найден / метод запрещён / endpoint выведен из эксплуатации
409 / 429Конфликт состояния / превышение лимита запросов
503Временная недоступность зависимости; нормализованная ошибка содержит Retry-After: 2
206 / 416Частичное содержимое файла / неудовлетворимый byte range

Исходники: src/server/api-router.ts, src/server/http.ts, src/server/api-errors.ts, src/server/shared/transport.ts

5. Регистрация, аутентификация и onboarding

/api/auth/* · /api/email/* · /api/privacy/current · /api/privacy/consent

Регистрация email создаёт USER с registrationStatus=APPROVED. Аккаунт, обязательное privacy consent и security-email outbox создаются транзакционно. Подтверждение email остаётся обязательным. Telegram-вход проверяет подпись и срок initData; development login не является способом входа рабочего окружения.

Сессия подписывается HS256 JWT и обычно передаётся в HttpOnly cookie с SameSite=Lax и сроком 30 дней. Сервер сверяет sessionVersion с актуальной записью пользователя. Изменение credentials и административное восстановление могут отзывать старые сессии. Cookie применяется к сконфигурированным имени/пути; production transport использует Secure.

Проверки доступа выполняются на сервере: отключённый аккаунт, email, временный пароль и привязка телефона/CRM. Разрешённые onboarding-маршруты позволяют завершить соответствующий шаг. Исторический PENDING не блокирует доступ, REJECTED сохраняет ACCOUNT_DISABLED. /users/{id}/registration-status выведен из эксплуатации для прежних запросов одобрения.

  1. Валидация регистрационных полей, версии политики, зала и уникальности идентификаторов.
  2. Транзакция аккаунта и outbox → cookie → подтверждение email по выданному security token.
  3. Login → проверка JWT/sessionVersion → разрешённые onboarding endpoints или завершённый onboarding.
  4. Доменная операция → повторная проверка роли, scope и актуального состояния ресурса.

Исходники: src/server/auth-service.ts, src/server/application/auth/registration-service.ts, src/server/application/auth/onboarding-service.ts, src/server/application/auth/public-launch-service.ts

6. RBAC и область данных

Роль проверяется совместно с сетью, залом, принадлежностью ресурса и дополнительными capability. Сервер не использует доступность кнопки или переданный клиентом userId как доказательство права. Self DTO, публичный профиль и административная проекция различаются.

Обычный пользователь может выбрать активный домашний зал, сеть выводится из выбранного зала. Сотрудник не может этим self-service путём перенести свою административную область. Назначение ролей, защищённый super owner, сброс прогресса и удаление пользователя имеют самостоятельные проверки и audit.

Модель ролей
РольБазовая область
OWNERОбщие административные операции; отдельные опасные действия всё равно имеют guards
NETWORK_ADMINНазначенная сеть и входящие в неё залы/ресурсы
GYM_ADMINНазначенный зал и его ресурсы
ROUTE_SETTERРазрешённые операции с трассами в своём зале; публикация учитывает capability
USERСобственные данные и доступная публичная проекция; действия ограничены уровнем, залом и доступами

Исходники: src/server/application/access/access-policy.ts, src/server/domain/rbac.ts, src/server/application/users/user-handler.ts

7. Залы, карты, зоны и трассы

/api/networks · /api/gyms · /api/location-suggestions · /api/maps · /api/map-zones · /api/routes · /api/grades

Network группирует Gym. Hall хранит версии изображения карты и исходные размеры. MapZone задаёт область и привязку к карте. Route связан с залом, зоной, grade, цветом, автором, координатами и статусом публикации. Категория, цвет, расчётный индекс сложности и порядок отображения не являются взаимозаменяемыми полями.

Загрузка карты формирует original/optimized/preview файлы. Изменение структуры зон проверяет привязанные трассы и ограничения. Видимость трассы, право редактирования и разрешение фиксировать пролаз проверяются отдельно; архивирование каталога не должно подменять исторический результат пользователя.

Исходники: src/server/application/maps/map-handler.ts, src/server/application/routes/route-handler.ts, src/server/storage.ts

8. Попытки и транзакция результата

/api/attempts · /api/attempts/{id}/complete · /api/attempts/{id}/cancel · /api/climbing/* · /api/climbs

Attempt хранит начало, режим и итог спортивной попытки. Клиентская команда завершения не изменяет баланс самостоятельно: backend проверяет допустимость перехода, принадлежность попытки, доступность трассы и требования посещения. Пользовательский интерфейс FLASH/TOP использует согласованные start/complete операции.

Успешное завершение связывает спортивный журнал, начисление, power, прогресс правил и доступные награды. Повтор завершения контролируется состоянием и Idempotency-Key. Клиент должен сохранять ключ при неопределённом результате и обновлять связанные home/profile/wallet queries после подтверждённого ответа.

  1. Проверка сессии, onboarding, зала, уровня и CRM-допуска.
  2. Создание/проверка Attempt; проверка режима, времени и допустимого результата.
  3. Транзакция записи результата и связанных изменений прогресса.
  4. Возврат DTO points/power/challengeProgress/pendingRewards; отдельный rating/claim при необходимости.

Исходники: src/server/application/attempts/complete-attempt.ts, src/server/application/attempts/attempt-handler.ts, src/server/application/climbing/climbing-handler.ts

9. Кошелёк, уровень, power и рекомендации

/api/home · /api/points · /api/power · /api/progress/* · /api/recommendations · /api/popular-routes · /api/ratings

Расходуемый баланс, накопленный lifetime-прогресс, power и позиция рейтинга имеют разные источники вычисления. Расход кошелька не отменяет исторический прогресс уровня. Порог уровня и unlocks задаются LevelDefinition. Power рассчитывается спортивным алгоритмом и настройками, а не копируется из points.

Home и progress panels агрегируют несколько доменов. Персональные рекомендации используют зал, историю, доступность трасс и режим. Популярность является агрегированной активностью; она не заменяет персональный подбор. Округление power в интерфейсе не определяет точность значения API.

Исходники: src/server/application/progression/progression-service.ts, src/server/application/profile/power-overview.ts, src/server/application/home/home-handler.ts

10. Правила, задания, достижения и награды

/api/challenges · /api/secret-challenges · /api/redesign/tasks/* · /api/achievements/* · /api/rewards/* · /api/trophies

RuleDefinition хранит опубликованную версию условий. Участие фиксирует применимый snapshot правил. Движок оценивает спортивные события с учётом периода, типа условия, уровня, зала и ограничений повторения. DAILY-представление выбирает актуальное задание и не является выгрузкой всего каталога.

Состояния выполнения условия, завершения участия, доступности награды и её зачисления различаются. Claim выполняется отдельной операцией там, где это предусмотрено. Повтор claim не должен повторно увеличивать баланс. Симуляция правил не сохраняет реальный спортивный результат.

Исходники: src/server/application/rules/rule-handler.ts, src/server/application/rewards/reward-claim-handler.ts, src/server/application/challenges/challenge-handler.ts

11. Лиги, дивизионы и серии активности

/api/leagues · /api/divisions · /api/streaks · /api/season/internal/*

Пользователи и сотрудники всех административных ролей участвуют в лигах по общим порогам уровня, правилам очков, мест, повышения и наград. Встречи доступны по действующему участию, а не по роли. Рейтинг и карточка спортсмена не содержат административной метки; служебные аккаунты исключены.

League и Division описывают соревнование в пределах периода. Lifecycle закрывает завершённые периоды, фиксирует финальные результаты и формирует следующие назначения. Текущее место, итог закрытого периода и резерв являются разными состояниями.

Streak учитывает даты и правила активности. Внутренние lifecycle/decay операции требуют service credential и самостоятельного расписания запуска. HTTP readiness не подтверждает, что соответствующее расписание отработало вовремя.

Исходники: src/server/application/leagues/league-handler.ts, src/server/application/divisions/enrollment-service.ts, src/server/application/api/internal-jobs-handler.ts

12. Профили, история и социальные связи

/api/profile/* · /api/activity · /api/users/{id}/follow · /api/user-follows · /api/users

Публичный профиль содержит разрешённую проекцию пользователя. Контакты, passwordHash, sessionVersion и служебные поля не должны попадать в публичную DTO по умолчанию. Просмотр профилей и истории проверяет собственность, публичный идентификатор и применимую область видимости.

Подписки, реферальная атрибуция, ранги сообщества и оформление профиля обрабатываются отдельными сценариями. Выбор платной рамки проверяет владение. Реферальное подтверждение учитывает проверку личности и не создаётся искусственным подтверждением email при открытии регистрации.

Исходники: src/server/application/profile/profile-handler.ts, src/server/application/profile/community-rank-service.ts, src/server/presentation/user-presenter.ts

13. Обучение и права на контент

/api/learning · /api/learning/lessons/{id} · /api/learning/courses/{id} · /api/admin/learning/* · /api/courses · /api/lessons/{id}/complete

Lesson является единицей контента, Course связывает уроки в программу. Draft, published и archived определяют доступность каталога. Preview допускает только предусмотренную опубликованную часть и не открывает черновик.

Право чтения определяется действующим entitlement, сроками, состоянием связанной покупки и поддерживаемым совместимым enrollment. Enrollment не должен обходить отозванный связанный grant. Progress, complete и reopen — самостоятельные операции.

В редакторе и БД сохраняется canonical URL. Краткоживущий playback URL выдаётся отдельно и не сохраняется как постоянный адрес видео. PATCH не применяет create-default значения к отсутствующим полям.

Исходники: src/server/learning.ts, src/server/contracts/responses/learning.ts, docs/learning-api.contracts.json

14. Storage, media-access и HTTP Range

POST /api/learning/media-access · GET|HEAD /media/{path} · GET|HEAD /api/storage/{path} · POST /api/admin/learning/media

POST /api/learning/media-access получает canonical URL и возвращает временный URL с access-билетом и expiresAt. Срок билета — 15 минут. Подпись связана с пользователем, sessionVersion и нормализованным путём. При чтении повторно проверяются актуальное состояние аккаунта и доступ к контенту.

GET/HEAD обслуживают защищённый learning namespace и файлы, используемые как видео уроков. Прокси передаёт cookie, access и Range к фиксированному API upstream, сохраняет статус, приватность и диапазон. Traversal, backslash и неоднозначные файловые aliases отклоняются. Билет и cookie не журналируются.

Wire-контракт файлов
ЭлементПоведение
GET без Range200 с содержимым при наличии действующего права
GET с допустимым Range206; Content-Range соответствует диапазону; body содержит ровно запрошенные байты
Неподходящий Range416; приватность ответа сохраняется
HEADСтатус/метаданные без тела; Content-Length может отсутствовать, при наличии соответствует GET
Private responseCache-Control: private, no-store; Referrer-Policy: no-referrer; Vary учитывает credential
401 / 403Недействительный credential или недостаточное право; подпись URL не обходит отзыв доступа

Исходники: src/server/application/api/storage-handler.ts, src/server/shared/byte-range.ts, docs/learning-api.contracts.json

15. Каталог, заказы, ledger и inventory

/api/shop/* · /api/me/* · /api/admin/shop/* · /api/admin/products/* · /api/admin/orders/* · /api/admin/inventory/* · /api/admin/promotions/* · /api/admin/promo-codes/* · /api/admin/categories/* · /api/admin/collections/* · /api/admin/banners/* · /api/admin/storefront-placements/* · /api/admin/audit-log/*

Product, offer, inventory, cart, Order, WalletTransaction и entitlement имеют отдельные жизненные циклы. Сервер пересчитывает цену, срок предложения, скидки и наличие при оформлении. Отправленная браузером цена не является источником истины.

Списание согласуется с заказом и выдачей ресурса в транзакции. Акция, промокод, коллекция и placement изменяют разные части каталога. Возврат/отмена учитывает тип заказа и может отзывать зависимый entitlement. Внешний платёжный провайдер считается подключённым только при наличии соответствующей реализации и конфигурации.

  1. Чтение опубликованного каталога и актуального offer.
  2. Проверка покупки: пользователь, цена, баланс, срок и остаток.
  3. Транзакция заказа / ledger / inventory / выдачи доступа.
  4. Отдельные операции исполнения, отмены или возврата с audit.

Исходники: src/server/commerce.ts, src/server/application/commerce/commerce-context.ts, src/server/application/commerce/admin-commerce-handler.ts

16. Mystery boxes и призовые фонды

/api/mystery-boxes/* · /api/admin/mystery-boxes/* · /api/admin/prize-pools/*

Открытие коробки проверяет доступ, стоимость и состояние призового фонда. Результат согласуется со списанием и выдачей inventory. Конкурентные открытия контролируют остатки в транзакции. Повтор отображения результата не создаёт новое случайное открытие.

При потерянном HTTP-ответе клиент восстанавливает существующую операцию по её идентификатору. Новая команда открытия с новым ключом является отдельным действием. Управление фондом и содержимым выполняется административными endpoints с audit.

Исходники: src/server/application/commerce/mystery-box-handler.ts

17. Интеграция FitBase

GET /api/fitbase/access · POST /api/fitbase/verify · POST /api/fitbase/search · /api/fitbase/gyms/{gymId} · /api/fitbase/links/{userId} · POST /api/fitbase/internal/sync · /api/fitbase-export

Для OWNER, NETWORK_ADMIN, GYM_ADMIN и ROUTE_SETTER подтверждение посещения не требуется: сервер использует роль аутентифицированного аккаунта, возвращает required=false / active=true и не обращается к CRM. Для USER сохраняются проверка привязки и окно визита.

FitbaseGymIntegration задаёт настройки конкретного зала: domain, clubId, enabled и окно визита. FITBASE_API_TOKEN остаётся на сервере. Заголовок domain, идентификатор club и ID клиента имеют разную семантику. Запросы направляются фиксированному API провайдера; произвольный upstream URL от клиента не принимается.

Привязка телефона требует однозначного совпадения клиента и ограничений уникальности. Общий probe не подтверждает посещение человека. Допуск к отметке использует связь userId/clientId, зал и актуальный визит; при включённой интеграции ошибка провайдера не выдаёт разрешение по умолчанию.

Три независимых факта диагностики: валидность текущего ответа провайдера, история sync конкретного зала и допуск конкретного пользователя. Их статусы не взаимозаменяемы. Выключенная интеграция не опрашивается live probe.

Интерпретация ответа CRM
СостояниеРезультат
HTTP 200 + ожидаемые JSON/schema/clubУспех конкретного запроса в пределах probe
HTTP 200 + повреждённый JSON / неверная схема или филиалОшибка интеграции, не успешное подключение
401 / 403Ошибка авторизации или прав провайдера
429Лимит провайдера; слепой повтор синхронизации не является исправлением
5xx / timeout / redirectНедоступность или недопустимый ответ upstream
Sync старше 60 минутПредупреждение истории sync; не результат live probe
Нет client link / подходящего визитаОтказ допуска независимо от общего статуса подключения

Исходники: src/server/application/fitbase/fitbase-client.ts, src/server/application/fitbase/phone-link-service.ts, src/server/application/fitbase/visit-access.ts

18. Уведомления и доставка

/api/notifications/* · /api/notification-rules · /api/notifications/internal/claim · /api/notifications/internal/ack · /api/notifications/internal/nack · /api/notifications/internal/push · /api/email/internal/*

Notification хранит сообщение приложения. Email outbox, Web Push delivery и Telegram transport имеют собственные состояния. Создание Notification не подтверждает доставку по внешнему каналу. Настройки пользователя, suppression и правила кампании применяются отдельно.

Внутренняя очередь Notification использует PENDING → SENDING и терминальные подтверждения SENT/FAILED. Claim использует блокировки строк/SKIP LOCKED; повтор одинакового terminal ack сохраняет результат, противоположный terminal переход конфликтует. Автоматическое восстановление SENDING этого id-only протокола требует отдельного fencing и не предполагается по умолчанию.

Email использует security tokens, suppression, retry и provider delivery events. Push проверяет subscription и VAPID; подтверждение push endpoint не доказывает показ уведомления ОС. Внешний вызов не откатывается транзакцией PostgreSQL.

Исходники: scripts/email-worker.ts, scripts/push-worker.mjs, docs/notification-worker-contract.md

19. Аналитика, privacy и аудит

/api/activity-events · /api/location-signals · /api/activity-export · /api/fitbase-export · /api/audit · /api/admin/audit-log/*

Согласия сохраняются вместе с версией политики и применимыми признаками analytics/location/marketing. Изменение необязательного согласия не подменяет обязательное принятие политики. Activity events и location signals имеют самостоятельные ограничения, серверные схемы и доступы.

Экспорт, административный audit и пользовательская история решают разные задачи. Audit значимых операций фиксирует actor, entity, изменение и причину, если она требуется. Пароли, cookie, media tickets, секреты интеграций и сырые ответы CRM не включаются в публичную диагностику и штатные структурированные ошибки.

Исходники: src/server/application/analytics/activity-handler.ts, src/server/application/analytics/location-handler.ts, src/server/application/audit/audit-service.ts

20. Workers и внутренние протоколы

Фоновые процессы запускаются отдельно от Next.js. Email worker опрашивает outbox. Push worker обращается к внутренним API выдачи и подтверждения доставки. Sync CRM, lifecycle сезона и decay требуют своего вызова/расписания. BOT_INTERNAL_TOKEN применяется только к предусмотренным внутренним маршрутам.

Повтор задачи оценивается по её протоколу идемпотентности. При неизвестном исходе внешнего вызова следует сверять существующую операцию, а не создавать новое списание или сообщение. Состояние container running не подтверждает свежесть обработки очереди.

Операционные команды
КомандаНазначение
pnpm email:workerОтдельный email process
node scripts/push-worker.mjsОтдельный push process; URL задаётся PUSH_WORKER_API_URL
pnpm db:bootstrapПервичное создание/проверка владельца при явно заданных BOOTSTRAP_OWNER_*
pnpm db:seedДемонстрационные данные; не является шагом штатного Stage/Production deploy

Исходники: scripts/email-worker.ts, scripts/push-worker.mjs, src/server/application/api/internal-jobs-handler.ts

21. Health Check и наблюдаемость

История мониторинга хранится 90 календарных дней UTC в отдельном HEALTH_HISTORY_ROOT вне публичного STORAGE_ROOT. Независимый health worker записывает API/PostgreSQL/storage раз в 60 секунд, конфигурацию и read-only CRM probes — раз в 300 секунд. GET /api/heal/history возвращает публичную историю; GET /api/heal/history-owner требует OWNER до доступа к кешу. Пропуски и устаревшие наблюдения имеют unknown, не считаются успешной работой. Доступность рассчитывается по наблюдениям вместе с отдельным процентом покрытия; инциденты строятся по fail/warn и подтверждённому восстановлению. История начинается с запуска монитора, не восстанавливается задним числом и сохраняется при перезапуске API.

HTML-интерфейс диагностики доступен по /Api/heal и /api/heal. /api/health сохраняет машинный health-контракт. Public readiness проверяет core dependencies; OWNER report дополняет конфигурацию и историю sync. Live CRM probe не запускает синхронизацию и не изменяет данные провайдера.

Состояние unhealthy формируется при fail database/storage/auth; остальные fail/warn дают degraded, неизвестная проверка — unknown. Наличие SMTP/Telegram/VAPID конфигурации не трактуется как успешная доставка. Тела CRM-ответов, клиенты и телефоны не возвращаются.

Public/OWNER reports кешируются отдельно на 10 секунд с single-flight; CRM probe — на 30 секунд с ограниченным per-gym/configuration key. OWNER авторизуется до shared cache. В видимой вкладке public status обновляется раз в 30 секунд; private report и CRM запускаются отдельно.

Диагностические endpoints
Метод / путьДоступКонтракт
GET /api/heal/statusPublic200/503 с data; отказ readiness сохраняет диагностический envelope
GET /api/heal/reportOWNER sessionCore, конфигурация и per-gym история sync
POST /api/heal/crmOWNER session + OriginСтрогий body { gymId }; /club-items, /client, /client/visits
GET /api/healthPublicСовместимый машинный health
GET /api/reference/{name}Publicaccount / learning / inputs / health, сгенерированные JSON-каталоги
Границы probes
ПроверкаОграничение
PostgreSQLSELECT 1; statement timeout 2 с, transaction 3,5 с, maxWait 1 с; не проверяет все бизнес-инварианты
StorageСоздание уникального wx probe-файла и удаление только его
CRMТри read-only GET, минимальная страница, timeout 2,5 с на запрос, без retry и redirect
Sync historyПоследняя попытка/успех, счётчики; warn после 60 минут
Логиmethod, path, status, code, requestId; без cause SQL/credentials/provider body

Исходники: src/server/application/diagnostics/health-service.ts, src/server/application/diagnostics/health-probes.ts, src/server/application/diagnostics/health-handler.ts

22. Сборка, выпуск и резервное восстановление

Приложения собираются и проверяются на QA-хосте или изолированных CI runners из чистого source без runtime .env. Штатные проверки: lint, typecheck, architecture/contracts checks, Vitest, критическое покрытие и full-source ratchet. Build и native HTTP smoke проверяют конечный runtime; браузерные сценарии являются отдельным уровнем. scripts/verify-isolated.sh подготавливает одноразовые source snapshot и PostgreSQL *_test. smoke:server требует эту изоляцию и bootstrap-аккаунт; его нельзя запускать с рабочей Stage/Production БД.

Release bundle должен связывать точные source SHA, immutable image IDs и evidence. Развёртывание использует собственные env/БД/storage выбранного окружения. PostgreSQL/storage Stage не копируются в Production. Изменение frontend требует совместимого API; отдельное обновление клиента не создаёт отсутствующий backend endpoint.

До db:sync сохраняются отдельные database dump и storage archive. Перед переключением выполняется schema preflight; затем запускаются сервисы и health/internal/public smoke. Неуспешный rollout восстанавливает образы и маршрутизацию; схема/данные не откатываются автоматически. Восстановление данных требует проверенной резервной копии и отдельной процедуры.

Инфраструктурный Sync to Prod допускает подтверждённый bundle от Release Stage с неповреждёнными отчётами и соответствующими работающими образами. Ручной Stage rollout сам по себе не создаёт такой verified pointer. Наличие workflow в рабочей ветке не подтверждает его публикацию на default branch или возможность запуска runner.

pnpm ci:static
pnpm ci:test
pnpm ci:audit
pnpm build
# Полный набор, включая HTTP smoke, в одноразовой среде:
bash scripts/verify-isolated.sh
# Infrastructure, отдельный repository:
bash deploy/scripts/healthcheck.sh staging
bash deploy/scripts/smoke-test.sh staging

Исходники: ci/profile.json, ci/run.mjs, Dockerfile, prisma/sync.ts, playfit-deployment-infrastructure/deploy/release/

23. Коды отказов и порядок диагностики

Диагностический материал для инцидента: окружение, время UTC, метод, путь без access/token, HTTP status, error.code и X-Request-Id. Credentials и клиентские данные исключаются. Проверка выполняется от HTTP маршрутизации к зависимостям и затем к состоянию конкретной операции.

  1. Определить окружение и точную версию API/клиента.
  2. Проверить маршрут gateway и machine readiness.
  3. Сопоставить requestId со структурированным серверным журналом.
  4. Проверить onboarding/role/scope и данные доменной операции.
  5. Проверить живой провайдер и историю worker отдельно; зафиксировать результат без секретов.
Действия по коду
Код / признакПроверка
AUTH_REQUIRED / INVALID_SESSIONCookie name/path/Secure, подпись, срок JWT, актуальный sessionVersion
ACCOUNT_DISABLEDИсторическая блокировка аккаунта; публичная регистрация её не отменяет
EMAIL_VERIFICATION_REQUIRED / PASSWORD_CHANGE_REQUIREDПодтверждение email / завершение замены временного пароля
PHONE_REQUIRED / PHONE_LINK_REQUIREDНомер, выбранный зал, однозначная связь CRM clientId
FEATURE_LOCKED / ROUTE_LOCKEDLevelDefinition, lifetime-прогресс и доступ к конкретному ресурсу
GYM_SCOPE_VIOLATION / NETWORK_SCOPE_VIOLATIONНазначенная область сотрудника и принадлежность целевого ресурса
INVALID_MEDIA_ACCESS / 416Срок и path binding билета / размер файла и Range
503 + requestIdCore health, состояние PostgreSQL/storage, конфигурация и provider timeout
404 на /api или /Api/heal при живом /api/healthGateway matcher должен включать /api, /api/* и /Api/heal
Неизвестный исход покупки / claim / открытияСуществующая операция, ключ идемпотентности, ledger и выданный ресурс до повторной команды

Исходники: src/server/api-errors.ts, src/server/http.ts, src/server/application/access/access-policy.ts

24. Контракты операций

56 формализованных операций: auth/account, learning и диагностика. Путь с {id} требует реального идентификатора. Session не заменяет onboarding, scope и указанное дополнительное permission. Каталог request/response охватывает перечисленные операции. Остальные доменные маршруты описаны в технических разделах; полный каталог их входных схем приведён ниже.

POST /api/auth/login
Вход по паролю

Доступ: без сессии. Успех: HTTP 200.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
emailstring
может отсутствовать
minLength: 1; maxLength: 254
identifierstring
может отсутствовать
minLength: 1; maxLength: 254
usernamestring
может отсутствовать
minLength: 1; maxLength: 254
passwordstring
обязательно
minLength: 1; maxLength: 128
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "minLength": 1,
      "maxLength": 254
    },
    "identifier": {
      "type": "string",
      "minLength": 1,
      "maxLength": 254
    },
    "username": {
      "type": "string",
      "minLength": 1,
      "maxLength": 254
    },
    "password": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    }
  },
  "required": [
    "password"
  ]
}

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "user": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "username": {
              "type": [
                "string",
                "null"
              ]
            },
            "email": {
              "type": [
                "string",
                "null"
              ]
            },
            "pendingEmail": {
              "type": [
                "string",
                "null"
              ]
            },
            "emailVerifiedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "registrationStatus": {
              "type": "string",
              "enum": [
                "PENDING",
                "APPROVED",
                "REJECTED"
              ]
            },
            "registrationReviewedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "emailSuppressedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "emailSuppressionReason": {
              "type": [
                "string",
                "null"
              ]
            },
            "mustChangePassword": {
              "type": "boolean"
            },
            "displayName": {
              "type": "string"
            },
            "phone": {
              "type": [
                "string",
                "null"
              ]
            },
            "publicId": {
              "type": "string"
            },
            "referredById": {
              "type": [
                "string",
                "null"
              ]
            },
            "role": {
              "type": "string",
              "enum": [
                "OWNER",
                "NETWORK_ADMIN",
                "GYM_ADMIN",
                "ROUTE_SETTER",
                "USER"
              ]
            },
            "canPublishRoutes": {
              "type": "boolean"
            },
            "networkId": {
              "type": [
                "string",
                "null"
              ]
            },
            "gymId": {
              "type": [
                "string",
                "null"
              ]
            },
            "age": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "heightCm": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "weightKg": {
              "type": [
                "number",
                "null"
              ]
            },
            "points": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "lifetimePoints": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "commerceResetAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "routeLevel": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "power": {
              "type": "number"
            },
            "powerDelta": {
              "type": "number"
            },
            "powerDecayDay": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "powerResetAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "onboardingRequired": {
              "type": "boolean"
            },
            "isServiceAccount": {
              "type": "boolean"
            },
            "excludeFromAnalytics": {
              "type": "boolean"
            },
            "isSuperOwner": {
              "type": "boolean"
            },
            "preferences": {
              "$ref": "#/$defs/__schema0"
            },
            "privacyConsentVersion": {
              "type": [
                "string",
                "null"
              ]
            },
            "privacyConsentAcceptedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "updatedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "needsNickname": {
              "type": "boolean"
            },
            "streak": {
              "type": "number"
            },
            "avatarUrl": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "id",
            "username",
            "email",
            "pendingEmail",
            "emailVerifiedAt",
            "registrationStatus",
            "registrationReviewedAt",
            "emailSuppressedAt",
            "emailSuppressionReason",
            "mustChangePassword",
            "displayName",
            "phone",
            "publicId",
            "referredById",
            "role",
            "canPublishRoutes",
            "networkId",
            "gymId",
            "age",
            "heightCm",
            "weightKg",
            "points",
            "lifetimePoints",
            "commerceResetAt",
            "routeLevel",
            "power",
            "powerDelta",
            "powerDecayDay",
            "powerResetAt",
            "onboardingRequired",
            "isServiceAccount",
            "excludeFromAnalytics",
            "isSuperOwner",
            "preferences",
            "privacyConsentVersion",
            "privacyConsentAcceptedAt",
            "createdAt",
            "updatedAt",
            "needsNickname",
            "streak",
            "avatarUrl"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "user"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema0"
          }
        }
      ]
    }
  }
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/auth/register
Регистрация

Доступ: без сессии. Успех: HTTP 201.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
usernamestring
может отсутствовать
minLength: 3; maxLength: 40
emailstring
обязательно
maxLength: 254
passwordstring
обязательно
minLength: 8; maxLength: 128
displayNamestring
обязательно
minLength: 1; maxLength: 11; pattern: "^[^\\s#\\p{Cc}\\p{Cf}]+$"
privacyConsentAcceptedtrue
обязательно
—
privacyPolicyVersionstring
может отсутствовать
minLength: 1; maxLength: 100
analyticsConsentboolean
может отсутствовать
default: false
locationConsentboolean
может отсутствовать
default: false
marketingConsentboolean
может отсутствовать
default: false
gymIdstring / null
может отсутствовать
—
phonestring
может отсутствовать
minLength: 10; maxLength: 40
referralCodestring
может отсутствовать
pattern: "^[A-Za-z0-9_-]{1,80}$"
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "username": {
      "type": "string",
      "minLength": 3,
      "maxLength": 40
    },
    "email": {
      "type": "string",
      "maxLength": 254
    },
    "password": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128
    },
    "displayName": {
      "type": "string",
      "minLength": 1,
      "maxLength": 11,
      "pattern": "^[^\\s#\\p{Cc}\\p{Cf}]+$"
    },
    "privacyConsentAccepted": {
      "type": "boolean",
      "const": true
    },
    "privacyPolicyVersion": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "analyticsConsent": {
      "default": false,
      "type": "boolean"
    },
    "locationConsent": {
      "default": false,
      "type": "boolean"
    },
    "marketingConsent": {
      "default": false,
      "type": "boolean"
    },
    "gymId": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "null"
        }
      ]
    },
    "phone": {
      "type": "string",
      "minLength": 10,
      "maxLength": 40
    },
    "referralCode": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{1,80}$"
    }
  },
  "required": [
    "email",
    "password",
    "displayName",
    "privacyConsentAccepted"
  ]
}

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "user": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "username": {
              "type": [
                "string",
                "null"
              ]
            },
            "email": {
              "type": [
                "string",
                "null"
              ]
            },
            "pendingEmail": {
              "type": [
                "string",
                "null"
              ]
            },
            "emailVerifiedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "registrationStatus": {
              "type": "string",
              "enum": [
                "PENDING",
                "APPROVED",
                "REJECTED"
              ]
            },
            "registrationReviewedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "emailSuppressedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "emailSuppressionReason": {
              "type": [
                "string",
                "null"
              ]
            },
            "mustChangePassword": {
              "type": "boolean"
            },
            "displayName": {
              "type": "string"
            },
            "phone": {
              "type": [
                "string",
                "null"
              ]
            },
            "publicId": {
              "type": "string"
            },
            "referredById": {
              "type": [
                "string",
                "null"
              ]
            },
            "role": {
              "type": "string",
              "enum": [
                "OWNER",
                "NETWORK_ADMIN",
                "GYM_ADMIN",
                "ROUTE_SETTER",
                "USER"
              ]
            },
            "canPublishRoutes": {
              "type": "boolean"
            },
            "networkId": {
              "type": [
                "string",
                "null"
              ]
            },
            "gymId": {
              "type": [
                "string",
                "null"
              ]
            },
            "age": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "heightCm": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "weightKg": {
              "type": [
                "number",
                "null"
              ]
            },
            "points": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "lifetimePoints": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "commerceResetAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "routeLevel": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "power": {
              "type": "number"
            },
            "powerDelta": {
              "type": "number"
            },
            "powerDecayDay": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "powerResetAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "onboardingRequired": {
              "type": "boolean"
            },
            "isServiceAccount": {
              "type": "boolean"
            },
            "excludeFromAnalytics": {
              "type": "boolean"
            },
            "isSuperOwner": {
              "type": "boolean"
            },
            "preferences": {
              "$ref": "#/$defs/__schema0"
            },
            "privacyConsentVersion": {
              "type": [
                "string",
                "null"
              ]
            },
            "privacyConsentAcceptedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "updatedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "needsNickname": {
              "type": "boolean"
            },
            "streak": {
              "type": "number"
            },
            "avatarUrl": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "id",
            "username",
            "email",
            "pendingEmail",
            "emailVerifiedAt",
            "registrationStatus",
            "registrationReviewedAt",
            "emailSuppressedAt",
            "emailSuppressionReason",
            "mustChangePassword",
            "displayName",
            "phone",
            "publicId",
            "referredById",
            "role",
            "canPublishRoutes",
            "networkId",
            "gymId",
            "age",
            "heightCm",
            "weightKg",
            "points",
            "lifetimePoints",
            "commerceResetAt",
            "routeLevel",
            "power",
            "powerDelta",
            "powerDecayDay",
            "powerResetAt",
            "onboardingRequired",
            "isServiceAccount",
            "excludeFromAnalytics",
            "isSuperOwner",
            "preferences",
            "privacyConsentVersion",
            "privacyConsentAcceptedAt",
            "createdAt",
            "updatedAt",
            "needsNickname",
            "streak",
            "avatarUrl"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "user"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema0"
          }
        }
      ]
    }
  }
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/auth/telegram
Вход через Telegram

Доступ: без сессии. Успех: HTTP 200.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
initDatastring
обязательно
minLength: 1; maxLength: 16000
referralCodestring
может отсутствовать
pattern: "^[A-Za-z0-9_-]{1,80}$"
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "initData": {
      "type": "string",
      "minLength": 1,
      "maxLength": 16000
    },
    "referralCode": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{1,80}$"
    }
  },
  "required": [
    "initData"
  ]
}

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "user": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "username": {
              "type": [
                "string",
                "null"
              ]
            },
            "email": {
              "type": [
                "string",
                "null"
              ]
            },
            "pendingEmail": {
              "type": [
                "string",
                "null"
              ]
            },
            "emailVerifiedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "registrationStatus": {
              "type": "string",
              "enum": [
                "PENDING",
                "APPROVED",
                "REJECTED"
              ]
            },
            "registrationReviewedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "emailSuppressedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "emailSuppressionReason": {
              "type": [
                "string",
                "null"
              ]
            },
            "mustChangePassword": {
              "type": "boolean"
            },
            "displayName": {
              "type": "string"
            },
            "phone": {
              "type": [
                "string",
                "null"
              ]
            },
            "publicId": {
              "type": "string"
            },
            "referredById": {
              "type": [
                "string",
                "null"
              ]
            },
            "role": {
              "type": "string",
              "enum": [
                "OWNER",
                "NETWORK_ADMIN",
                "GYM_ADMIN",
                "ROUTE_SETTER",
                "USER"
              ]
            },
            "canPublishRoutes": {
              "type": "boolean"
            },
            "networkId": {
              "type": [
                "string",
                "null"
              ]
            },
            "gymId": {
              "type": [
                "string",
                "null"
              ]
            },
            "age": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "heightCm": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "weightKg": {
              "type": [
                "number",
                "null"
              ]
            },
            "points": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "lifetimePoints": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "commerceResetAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "routeLevel": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "power": {
              "type": "number"
            },
            "powerDelta": {
              "type": "number"
            },
            "powerDecayDay": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "powerResetAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "onboardingRequired": {
              "type": "boolean"
            },
            "isServiceAccount": {
              "type": "boolean"
            },
            "excludeFromAnalytics": {
              "type": "boolean"
            },
            "isSuperOwner": {
              "type": "boolean"
            },
            "preferences": {
              "$ref": "#/$defs/__schema0"
            },
            "privacyConsentVersion": {
              "type": [
                "string",
                "null"
              ]
            },
            "privacyConsentAcceptedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "updatedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "needsNickname": {
              "type": "boolean"
            },
            "streak": {
              "type": "number"
            },
            "avatarUrl": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "id",
            "username",
            "email",
            "pendingEmail",
            "emailVerifiedAt",
            "registrationStatus",
            "registrationReviewedAt",
            "emailSuppressedAt",
            "emailSuppressionReason",
            "mustChangePassword",
            "displayName",
            "phone",
            "publicId",
            "referredById",
            "role",
            "canPublishRoutes",
            "networkId",
            "gymId",
            "age",
            "heightCm",
            "weightKg",
            "points",
            "lifetimePoints",
            "commerceResetAt",
            "routeLevel",
            "power",
            "powerDelta",
            "powerDecayDay",
            "powerResetAt",
            "onboardingRequired",
            "isServiceAccount",
            "excludeFromAnalytics",
            "isSuperOwner",
            "preferences",
            "privacyConsentVersion",
            "privacyConsentAcceptedAt",
            "createdAt",
            "updatedAt",
            "needsNickname",
            "streak",
            "avatarUrl"
          ],
          "additionalProperties": false
        },
        "token": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "user",
        "token"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema0"
          }
        }
      ]
    }
  }
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/auth/dev
Development-вход

Доступ: без сессии. Успех: HTTP 200.

Development authentication is disabled when NODE_ENV=production unless APP_ENV=local.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
usernamestring
обязательно
minLength: 1; maxLength: 80
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "username": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    }
  },
  "required": [
    "username"
  ]
}

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "user": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "username": {
              "type": [
                "string",
                "null"
              ]
            },
            "email": {
              "type": [
                "string",
                "null"
              ]
            },
            "pendingEmail": {
              "type": [
                "string",
                "null"
              ]
            },
            "emailVerifiedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "registrationStatus": {
              "type": "string",
              "enum": [
                "PENDING",
                "APPROVED",
                "REJECTED"
              ]
            },
            "registrationReviewedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "emailSuppressedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "emailSuppressionReason": {
              "type": [
                "string",
                "null"
              ]
            },
            "mustChangePassword": {
              "type": "boolean"
            },
            "displayName": {
              "type": "string"
            },
            "phone": {
              "type": [
                "string",
                "null"
              ]
            },
            "publicId": {
              "type": "string"
            },
            "referredById": {
              "type": [
                "string",
                "null"
              ]
            },
            "role": {
              "type": "string",
              "enum": [
                "OWNER",
                "NETWORK_ADMIN",
                "GYM_ADMIN",
                "ROUTE_SETTER",
                "USER"
              ]
            },
            "canPublishRoutes": {
              "type": "boolean"
            },
            "networkId": {
              "type": [
                "string",
                "null"
              ]
            },
            "gymId": {
              "type": [
                "string",
                "null"
              ]
            },
            "age": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "heightCm": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "weightKg": {
              "type": [
                "number",
                "null"
              ]
            },
            "points": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "lifetimePoints": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "commerceResetAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "routeLevel": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "power": {
              "type": "number"
            },
            "powerDelta": {
              "type": "number"
            },
            "powerDecayDay": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "powerResetAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "onboardingRequired": {
              "type": "boolean"
            },
            "isServiceAccount": {
              "type": "boolean"
            },
            "excludeFromAnalytics": {
              "type": "boolean"
            },
            "isSuperOwner": {
              "type": "boolean"
            },
            "preferences": {
              "$ref": "#/$defs/__schema0"
            },
            "privacyConsentVersion": {
              "type": [
                "string",
                "null"
              ]
            },
            "privacyConsentAcceptedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "updatedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "needsNickname": {
              "type": "boolean"
            },
            "streak": {
              "type": "number"
            },
            "avatarUrl": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "id",
            "username",
            "email",
            "pendingEmail",
            "emailVerifiedAt",
            "registrationStatus",
            "registrationReviewedAt",
            "emailSuppressedAt",
            "emailSuppressionReason",
            "mustChangePassword",
            "displayName",
            "phone",
            "publicId",
            "referredById",
            "role",
            "canPublishRoutes",
            "networkId",
            "gymId",
            "age",
            "heightCm",
            "weightKg",
            "points",
            "lifetimePoints",
            "commerceResetAt",
            "routeLevel",
            "power",
            "powerDelta",
            "powerDecayDay",
            "powerResetAt",
            "onboardingRequired",
            "isServiceAccount",
            "excludeFromAnalytics",
            "isSuperOwner",
            "preferences",
            "privacyConsentVersion",
            "privacyConsentAcceptedAt",
            "createdAt",
            "updatedAt",
            "needsNickname",
            "streak",
            "avatarUrl"
          ],
          "additionalProperties": false
        },
        "token": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "user",
        "token"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema0"
          }
        }
      ]
    }
  }
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

GET /api/auth/dev-users
Development-аккаунты

Доступ: без сессии. Успех: HTTP 200.

Uses the same development-only gate as authDevelopmentLogin.

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataмассив (object)
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": [
              "OWNER",
              "NETWORK_ADMIN",
              "GYM_ADMIN",
              "ROUTE_SETTER",
              "USER"
            ]
          }
        },
        "required": [
          "username",
          "displayName",
          "firstName",
          "role"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/auth/logout
Выход

Доступ: без сессии. Успех: HTTP 200.

Clears the requesting browser cookie; does not revoke already issued bearer tokens.

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "loggedOut": {
          "type": "boolean",
          "const": true
        }
      },
      "required": [
        "loggedOut"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/auth/referral-visit
Referral-переход

Доступ: без сессии. Успех: HTTP 200.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
codestring
обязательно
pattern: "^[A-Za-z0-9_-]{1,80}$"
visitorIdstring
обязательно
format: "uuid"; pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{1,80}$"
    },
    "visitorId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "code",
    "visitorId"
  ],
  "additionalProperties": false
}

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "recorded": {
          "type": "boolean",
          "const": true
        }
      },
      "required": [
        "recorded"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

GET /api/auth/registration-gyms
Залы для регистрации

Доступ: без сессии. Успех: HTTP 200.

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataмассив (object)
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "locality": {
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "address": {
            "type": "string"
          },
          "latitude": {
            "type": [
              "number",
              "null"
            ]
          },
          "longitude": {
            "type": [
              "number",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "const": "ACTIVE"
          }
        },
        "required": [
          "id",
          "name",
          "locality",
          "region",
          "address",
          "latitude",
          "longitude",
          "status"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/auth/forgot-password
Запрос восстановления пароля

Доступ: без сессии. Успех: HTTP 200.

Returns accepted independently of whether the account exists.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
emailstring
обязательно
minLength: 1; maxLength: 254
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "minLength": 1,
      "maxLength": 254
    }
  },
  "required": [
    "email"
  ]
}

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "accepted": {
          "type": "boolean",
          "const": true
        }
      },
      "required": [
        "accepted"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/auth/reset-password-verify
Проверка reset-токена

Доступ: без сессии. Успех: HTTP 200.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
emailstring
обязательно
minLength: 1; maxLength: 254
codestring
обязательно
minLength: 1; maxLength: 32
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "minLength": 1,
      "maxLength": 254
    },
    "code": {
      "type": "string",
      "minLength": 1,
      "maxLength": 32
    }
  },
  "required": [
    "email",
    "code"
  ]
}

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "verified": {
          "type": "boolean",
          "const": true
        },
        "resetToken": {
          "type": "string"
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      },
      "required": [
        "verified",
        "resetToken",
        "expiresAt"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/auth/reset-password
Сохранение нового пароля

Доступ: без сессии. Успех: HTTP 200.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
resetTokenstring
обязательно
minLength: 47; maxLength: 100
passwordstring
обязательно
minLength: 8; maxLength: 128
passwordConfirmationstring
обязательно
minLength: 8; maxLength: 128
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "resetToken": {
      "type": "string",
      "minLength": 47,
      "maxLength": 100
    },
    "password": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128
    },
    "passwordConfirmation": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128
    }
  },
  "required": [
    "resetToken",
    "password",
    "passwordConfirmation"
  ]
}

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "reset": {
          "type": "boolean",
          "const": true
        }
      },
      "required": [
        "reset"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

GET /api/auth/me
Текущая сессия

Доступ: действующая сессия. Успех: HTTP 200.

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "user": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "username": {
              "type": [
                "string",
                "null"
              ]
            },
            "email": {
              "type": [
                "string",
                "null"
              ]
            },
            "pendingEmail": {
              "type": [
                "string",
                "null"
              ]
            },
            "emailVerifiedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "registrationStatus": {
              "type": "string",
              "enum": [
                "PENDING",
                "APPROVED",
                "REJECTED"
              ]
            },
            "registrationReviewedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "emailSuppressedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "emailSuppressionReason": {
              "type": [
                "string",
                "null"
              ]
            },
            "mustChangePassword": {
              "type": "boolean"
            },
            "displayName": {
              "type": "string"
            },
            "phone": {
              "type": [
                "string",
                "null"
              ]
            },
            "publicId": {
              "type": "string"
            },
            "referredById": {
              "type": [
                "string",
                "null"
              ]
            },
            "role": {
              "type": "string",
              "enum": [
                "OWNER",
                "NETWORK_ADMIN",
                "GYM_ADMIN",
                "ROUTE_SETTER",
                "USER"
              ]
            },
            "canPublishRoutes": {
              "type": "boolean"
            },
            "networkId": {
              "type": [
                "string",
                "null"
              ]
            },
            "gymId": {
              "type": [
                "string",
                "null"
              ]
            },
            "age": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "heightCm": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "weightKg": {
              "type": [
                "number",
                "null"
              ]
            },
            "points": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "lifetimePoints": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "commerceResetAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "routeLevel": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "power": {
              "type": "number"
            },
            "powerDelta": {
              "type": "number"
            },
            "powerDecayDay": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "powerResetAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "onboardingRequired": {
              "type": "boolean"
            },
            "isServiceAccount": {
              "type": "boolean"
            },
            "excludeFromAnalytics": {
              "type": "boolean"
            },
            "isSuperOwner": {
              "type": "boolean"
            },
            "preferences": {
              "$ref": "#/$defs/__schema0"
            },
            "privacyConsentVersion": {
              "type": [
                "string",
                "null"
              ]
            },
            "privacyConsentAcceptedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "updatedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "needsNickname": {
              "type": "boolean"
            },
            "streak": {
              "type": "number"
            },
            "avatarUrl": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "id",
            "username",
            "email",
            "pendingEmail",
            "emailVerifiedAt",
            "registrationStatus",
            "registrationReviewedAt",
            "emailSuppressedAt",
            "emailSuppressionReason",
            "mustChangePassword",
            "displayName",
            "phone",
            "publicId",
            "referredById",
            "role",
            "canPublishRoutes",
            "networkId",
            "gymId",
            "age",
            "heightCm",
            "weightKg",
            "points",
            "lifetimePoints",
            "commerceResetAt",
            "routeLevel",
            "power",
            "powerDelta",
            "powerDecayDay",
            "powerResetAt",
            "onboardingRequired",
            "isServiceAccount",
            "excludeFromAnalytics",
            "isSuperOwner",
            "preferences",
            "privacyConsentVersion",
            "privacyConsentAcceptedAt",
            "createdAt",
            "updatedAt",
            "needsNickname",
            "streak",
            "avatarUrl"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "user"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema0"
          }
        }
      ]
    }
  }
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/auth/credentials
Изменение credentials

Доступ: действующая сессия. Успех: HTTP 200.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
usernamestring
обязательно
minLength: 3; maxLength: 40
currentPasswordstring
может отсутствовать
maxLength: 128
newPasswordstring
обязательно
minLength: 8; maxLength: 128
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "username": {
      "type": "string",
      "minLength": 3,
      "maxLength": 40
    },
    "currentPassword": {
      "type": "string",
      "maxLength": 128
    },
    "newPassword": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128
    }
  },
  "required": [
    "username",
    "newPassword"
  ]
}

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "user": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "username": {
              "type": [
                "string",
                "null"
              ]
            },
            "email": {
              "type": [
                "string",
                "null"
              ]
            },
            "pendingEmail": {
              "type": [
                "string",
                "null"
              ]
            },
            "emailVerifiedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "registrationStatus": {
              "type": "string",
              "enum": [
                "PENDING",
                "APPROVED",
                "REJECTED"
              ]
            },
            "registrationReviewedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "emailSuppressedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "emailSuppressionReason": {
              "type": [
                "string",
                "null"
              ]
            },
            "mustChangePassword": {
              "type": "boolean"
            },
            "displayName": {
              "type": "string"
            },
            "phone": {
              "type": [
                "string",
                "null"
              ]
            },
            "publicId": {
              "type": "string"
            },
            "referredById": {
              "type": [
                "string",
                "null"
              ]
            },
            "role": {
              "type": "string",
              "enum": [
                "OWNER",
                "NETWORK_ADMIN",
                "GYM_ADMIN",
                "ROUTE_SETTER",
                "USER"
              ]
            },
            "canPublishRoutes": {
              "type": "boolean"
            },
            "networkId": {
              "type": [
                "string",
                "null"
              ]
            },
            "gymId": {
              "type": [
                "string",
                "null"
              ]
            },
            "age": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "heightCm": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "weightKg": {
              "type": [
                "number",
                "null"
              ]
            },
            "points": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "lifetimePoints": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "commerceResetAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "routeLevel": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "power": {
              "type": "number"
            },
            "powerDelta": {
              "type": "number"
            },
            "powerDecayDay": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "powerResetAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "onboardingRequired": {
              "type": "boolean"
            },
            "isServiceAccount": {
              "type": "boolean"
            },
            "excludeFromAnalytics": {
              "type": "boolean"
            },
            "isSuperOwner": {
              "type": "boolean"
            },
            "preferences": {
              "$ref": "#/$defs/__schema0"
            },
            "privacyConsentVersion": {
              "type": [
                "string",
                "null"
              ]
            },
            "privacyConsentAcceptedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "updatedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "needsNickname": {
              "type": "boolean"
            },
            "streak": {
              "type": "number"
            },
            "avatarUrl": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "id",
            "username",
            "email",
            "pendingEmail",
            "emailVerifiedAt",
            "registrationStatus",
            "registrationReviewedAt",
            "emailSuppressedAt",
            "emailSuppressionReason",
            "mustChangePassword",
            "displayName",
            "phone",
            "publicId",
            "referredById",
            "role",
            "canPublishRoutes",
            "networkId",
            "gymId",
            "age",
            "heightCm",
            "weightKg",
            "points",
            "lifetimePoints",
            "commerceResetAt",
            "routeLevel",
            "power",
            "powerDelta",
            "powerDecayDay",
            "powerResetAt",
            "onboardingRequired",
            "isServiceAccount",
            "excludeFromAnalytics",
            "isSuperOwner",
            "preferences",
            "privacyConsentVersion",
            "privacyConsentAcceptedAt",
            "createdAt",
            "updatedAt",
            "needsNickname",
            "streak",
            "avatarUrl"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "user"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema0"
          }
        }
      ]
    }
  }
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/auth/nickname
Имя аккаунта

Доступ: действующая сессия. Успех: HTTP 200.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
nicknamestring
обязательно
minLength: 1; maxLength: 11; pattern: "^[^\\s#\\p{Cc}\\p{Cf}]+$"
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "nickname": {
      "type": "string",
      "minLength": 1,
      "maxLength": 11,
      "pattern": "^[^\\s#\\p{Cc}\\p{Cf}]+$"
    }
  },
  "required": [
    "nickname"
  ]
}

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "user": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "username": {
              "type": [
                "string",
                "null"
              ]
            },
            "email": {
              "type": [
                "string",
                "null"
              ]
            },
            "pendingEmail": {
              "type": [
                "string",
                "null"
              ]
            },
            "emailVerifiedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "registrationStatus": {
              "type": "string",
              "enum": [
                "PENDING",
                "APPROVED",
                "REJECTED"
              ]
            },
            "registrationReviewedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "emailSuppressedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "emailSuppressionReason": {
              "type": [
                "string",
                "null"
              ]
            },
            "mustChangePassword": {
              "type": "boolean"
            },
            "displayName": {
              "type": "string"
            },
            "phone": {
              "type": [
                "string",
                "null"
              ]
            },
            "publicId": {
              "type": "string"
            },
            "referredById": {
              "type": [
                "string",
                "null"
              ]
            },
            "role": {
              "type": "string",
              "enum": [
                "OWNER",
                "NETWORK_ADMIN",
                "GYM_ADMIN",
                "ROUTE_SETTER",
                "USER"
              ]
            },
            "canPublishRoutes": {
              "type": "boolean"
            },
            "networkId": {
              "type": [
                "string",
                "null"
              ]
            },
            "gymId": {
              "type": [
                "string",
                "null"
              ]
            },
            "age": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "heightCm": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "weightKg": {
              "type": [
                "number",
                "null"
              ]
            },
            "points": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "lifetimePoints": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "commerceResetAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "routeLevel": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "power": {
              "type": "number"
            },
            "powerDelta": {
              "type": "number"
            },
            "powerDecayDay": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "powerResetAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "onboardingRequired": {
              "type": "boolean"
            },
            "isServiceAccount": {
              "type": "boolean"
            },
            "excludeFromAnalytics": {
              "type": "boolean"
            },
            "isSuperOwner": {
              "type": "boolean"
            },
            "preferences": {
              "$ref": "#/$defs/__schema0"
            },
            "privacyConsentVersion": {
              "type": [
                "string",
                "null"
              ]
            },
            "privacyConsentAcceptedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "updatedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "needsNickname": {
              "type": "boolean"
            },
            "streak": {
              "type": "number"
            },
            "avatarUrl": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "id",
            "username",
            "email",
            "pendingEmail",
            "emailVerifiedAt",
            "registrationStatus",
            "registrationReviewedAt",
            "emailSuppressedAt",
            "emailSuppressionReason",
            "mustChangePassword",
            "displayName",
            "phone",
            "publicId",
            "referredById",
            "role",
            "canPublishRoutes",
            "networkId",
            "gymId",
            "age",
            "heightCm",
            "weightKg",
            "points",
            "lifetimePoints",
            "commerceResetAt",
            "routeLevel",
            "power",
            "powerDelta",
            "powerDecayDay",
            "powerResetAt",
            "onboardingRequired",
            "isServiceAccount",
            "excludeFromAnalytics",
            "isSuperOwner",
            "preferences",
            "privacyConsentVersion",
            "privacyConsentAcceptedAt",
            "createdAt",
            "updatedAt",
            "needsNickname",
            "streak",
            "avatarUrl"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "user"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema0"
          }
        }
      ]
    }
  }
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

GET /api/auth/phone
Состояние телефона / CRM

Доступ: действующая сессия. Успех: HTTP 200.

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "phone": {
          "type": [
            "string",
            "null"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "MISSING",
            "LINKED",
            "NEEDS_REVIEW",
            "UNCONFIGURED",
            "EXEMPT"
          ]
        }
      },
      "required": [
        "phone",
        "status"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

PUT /api/auth/phone
Сохранение телефона

Доступ: действующая сессия. Успех: HTTP 200.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
phonestring
обязательно
minLength: 10; maxLength: 40
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "phone": {
      "type": "string",
      "minLength": 10,
      "maxLength": 40
    }
  },
  "required": [
    "phone"
  ]
}

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "phone": {
          "type": [
            "string",
            "null"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "MISSING",
            "LINKED",
            "NEEDS_REVIEW",
            "UNCONFIGURED",
            "EXEMPT"
          ]
        }
      },
      "required": [
        "phone",
        "status"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

GET /api/email
Состояние email

Доступ: действующая сессия. Успех: HTTP 200.

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "email": {
          "type": [
            "string",
            "null"
          ]
        },
        "pendingEmail": {
          "type": [
            "string",
            "null"
          ]
        },
        "emailVerifiedAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ]
        },
        "emailSuppressedAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ]
        },
        "emailSuppressionReason": {
          "type": [
            "string",
            "null"
          ]
        },
        "preferences": {
          "type": "object",
          "properties": {
            "security": {
              "type": "boolean",
              "const": true
            },
            "transactional": {
              "type": "boolean"
            },
            "product": {
              "type": "boolean"
            },
            "activity": {
              "type": "boolean"
            },
            "marketing": {
              "type": "boolean"
            }
          },
          "required": [
            "security",
            "transactional",
            "product",
            "activity",
            "marketing"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "email",
        "pendingEmail",
        "emailVerifiedAt",
        "emailSuppressedAt",
        "emailSuppressionReason",
        "preferences"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

PATCH /api/email/preferences
Настройки писем

Доступ: действующая сессия. Успех: HTTP 200.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
transactionalboolean
может отсутствовать
—
productboolean
может отсутствовать
—
activityboolean
может отсутствовать
—
marketingboolean
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "transactional": {
      "type": "boolean"
    },
    "product": {
      "type": "boolean"
    },
    "activity": {
      "type": "boolean"
    },
    "marketing": {
      "type": "boolean"
    }
  }
}

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "preferences": {
          "type": "object",
          "properties": {
            "security": {
              "type": "boolean",
              "const": true
            },
            "transactional": {
              "type": "boolean"
            },
            "product": {
              "type": "boolean"
            },
            "activity": {
              "type": "boolean"
            },
            "marketing": {
              "type": "boolean"
            }
          },
          "required": [
            "security",
            "transactional",
            "product",
            "activity",
            "marketing"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "preferences"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/email/change
Изменение email

Доступ: действующая сессия. Успех: HTTP 200.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
emailstring
может отсутствовать
maxLength: 254
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "maxLength": 254
    }
  }
}

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "accepted": {
          "type": "boolean",
          "const": true
        },
        "pendingEmail": {
          "type": "string"
        }
      },
      "required": [
        "accepted",
        "pendingEmail"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/email/request-verification
Запрос подтверждения email

Доступ: действующая сессия. Успех: HTTP 200.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
emailstring
может отсутствовать
maxLength: 254
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "maxLength": 254
    }
  }
}

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "accepted": {
          "type": "boolean",
          "const": true
        },
        "pendingEmail": {
          "type": "string"
        }
      },
      "required": [
        "accepted",
        "pendingEmail"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/email/verify
Подтверждение email

Доступ: без сессии. Успех: HTTP 200.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
tokenstring
обязательно
minLength: 20; maxLength: 200
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "minLength": 20,
      "maxLength": 200
    }
  },
  "required": [
    "token"
  ]
}

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "user": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "username": {
              "type": [
                "string",
                "null"
              ]
            },
            "email": {
              "type": [
                "string",
                "null"
              ]
            },
            "pendingEmail": {
              "type": [
                "string",
                "null"
              ]
            },
            "emailVerifiedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "registrationStatus": {
              "type": "string",
              "enum": [
                "PENDING",
                "APPROVED",
                "REJECTED"
              ]
            },
            "registrationReviewedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "emailSuppressedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "emailSuppressionReason": {
              "type": [
                "string",
                "null"
              ]
            },
            "mustChangePassword": {
              "type": "boolean"
            },
            "displayName": {
              "type": "string"
            },
            "phone": {
              "type": [
                "string",
                "null"
              ]
            },
            "publicId": {
              "type": "string"
            },
            "referredById": {
              "type": [
                "string",
                "null"
              ]
            },
            "role": {
              "type": "string",
              "enum": [
                "OWNER",
                "NETWORK_ADMIN",
                "GYM_ADMIN",
                "ROUTE_SETTER",
                "USER"
              ]
            },
            "canPublishRoutes": {
              "type": "boolean"
            },
            "networkId": {
              "type": [
                "string",
                "null"
              ]
            },
            "gymId": {
              "type": [
                "string",
                "null"
              ]
            },
            "age": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "heightCm": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "weightKg": {
              "type": [
                "number",
                "null"
              ]
            },
            "points": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "lifetimePoints": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "commerceResetAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "routeLevel": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "power": {
              "type": "number"
            },
            "powerDelta": {
              "type": "number"
            },
            "powerDecayDay": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "powerResetAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "onboardingRequired": {
              "type": "boolean"
            },
            "isServiceAccount": {
              "type": "boolean"
            },
            "excludeFromAnalytics": {
              "type": "boolean"
            },
            "isSuperOwner": {
              "type": "boolean"
            },
            "preferences": {
              "$ref": "#/$defs/__schema0"
            },
            "privacyConsentVersion": {
              "type": [
                "string",
                "null"
              ]
            },
            "privacyConsentAcceptedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "updatedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "needsNickname": {
              "type": "boolean"
            },
            "streak": {
              "type": "number"
            },
            "avatarUrl": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "id",
            "username",
            "email",
            "pendingEmail",
            "emailVerifiedAt",
            "registrationStatus",
            "registrationReviewedAt",
            "emailSuppressedAt",
            "emailSuppressionReason",
            "mustChangePassword",
            "displayName",
            "phone",
            "publicId",
            "referredById",
            "role",
            "canPublishRoutes",
            "networkId",
            "gymId",
            "age",
            "heightCm",
            "weightKg",
            "points",
            "lifetimePoints",
            "commerceResetAt",
            "routeLevel",
            "power",
            "powerDelta",
            "powerDecayDay",
            "powerResetAt",
            "onboardingRequired",
            "isServiceAccount",
            "excludeFromAnalytics",
            "isSuperOwner",
            "preferences",
            "privacyConsentVersion",
            "privacyConsentAcceptedAt",
            "createdAt",
            "updatedAt",
            "needsNickname",
            "streak",
            "avatarUrl"
          ],
          "additionalProperties": false
        },
        "email": {
          "type": "string"
        },
        "emailVerifiedAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      },
      "required": [
        "user",
        "email",
        "emailVerifiedAt"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema0"
          }
        }
      ]
    }
  }
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/email/unsubscribe
Отписка

Доступ: без сессии. Успех: HTTP 200.

Query token takes precedence; the JSON body is read only when no query token is supplied.

Query

ПолеТип / обязательностьОграничения
tokenstring
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "token": {
      "type": "string"
    }
  }
}

Тело запроса · application/json

ПолеТип / обязательностьОграничения
tokenstring
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "token": {
      "type": "string"
    }
  },
  "required": [
    "token"
  ]
}

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "unsubscribed": {
          "type": "boolean",
          "const": true
        }
      },
      "required": [
        "unsubscribed"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

GET /api/privacy/current
Действующая политика

Доступ: без сессии. Успех: HTTP 200.

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "version": {
          "type": "string"
        },
        "effectiveAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "content": {
          "type": "string"
        },
        "consents": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "required": {
                "type": "boolean"
              },
              "defaultChecked": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "label",
              "required",
              "defaultChecked"
            ],
            "additionalProperties": false
          }
        },
        "settingsConsents": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "description": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "description"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "version",
        "effectiveAt",
        "content",
        "consents",
        "settingsConsents"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/privacy/consent
Сохранение согласия

Доступ: действующая сессия. Успех: HTTP 200.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
policyVersionstring
обязательно
minLength: 1; maxLength: 40
analyticsConsentboolean
может отсутствовать
—
locationConsentboolean
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "policyVersion": {
      "type": "string",
      "minLength": 1,
      "maxLength": 40
    },
    "analyticsConsent": {
      "type": "boolean"
    },
    "locationConsent": {
      "type": "boolean"
    }
  },
  "required": [
    "policyVersion"
  ]
}

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "privacyAccepted": {
          "type": "boolean",
          "const": true
        },
        "analytics": {
          "type": "boolean"
        },
        "location": {
          "type": "boolean"
        },
        "version": {
          "type": "string"
        },
        "acceptedAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      },
      "required": [
        "privacyAccepted",
        "analytics",
        "location",
        "version",
        "acceptedAt"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/learning/media-access
Временная ссылка на файл

Доступ: действующая сессия. Успех: HTTP 200.

Issues a path-bound 15-minute playback credential. GET/HEAD recheck account, sessionVersion and current entitlement; canonical URLs stored in the database do not include credentials.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
urlstring
обязательно
maxLength: 2000
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "maxLength": 2000
    }
  },
  "required": [
    "url"
  ]
}

Ответ с data envelope

Тип: #/$defs/learningMediaAccess. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$ref": "#/$defs/learningMediaAccess"
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

GET /api/learning
Каталог обучения

Доступ: действующая сессия. Успех: HTTP 200.

Query

ПолеТип / обязательностьОграничения
filterодно из: ["all","lessons","courses","owned","in-progress","completed"]
обязательно
default: "all"
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "filter": {
      "default": "all",
      "type": "string",
      "enum": [
        "all",
        "lessons",
        "courses",
        "owned",
        "in-progress",
        "completed"
      ]
    }
  },
  "required": [
    "filter"
  ]
}

Ответ с data envelope

Тип: #/$defs/learningCatalog. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$ref": "#/$defs/learningCatalog"
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

GET /api/learning/lessons/{id}
Карточка урока

Доступ: действующая сессия. Успех: HTTP 200.

Accepts an ID or slug; locked published content returns content=null; inaccessible unpublished content returns 404.

Ответ с data envelope

Тип: #/$defs/learningLessonDetail. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$ref": "#/$defs/learningLessonDetail"
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

GET /api/learning/courses/{id}
Карточка курса

Доступ: действующая сессия. Успех: HTTP 200.

Ответ с data envelope

Тип: #/$defs/learningCourseDetail. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$ref": "#/$defs/learningCourseDetail"
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/learning/lessons/{id}/free-access
Бесплатный доступ к уроку

Доступ: действующая сессия. Успех: HTTP 201 / 200.

201 for a new active grant, 200 for replay. Requires a published entity with an active zero-price offer.

Ответ с data envelope

Тип: #/$defs/learningLessonFreeAccess. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$ref": "#/$defs/learningLessonFreeAccess"
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/learning/courses/{id}/free-access
Бесплатный доступ к курсу

Доступ: действующая сессия. Успех: HTTP 201 / 200.

201 for a new active grant, 200 for replay. Requires a published entity with an active zero-price offer.

Ответ с data envelope

Тип: #/$defs/learningCourseFreeAccess. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$ref": "#/$defs/learningCourseFreeAccess"
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/learning/lessons/{id}/progress
Прогресс урока

Доступ: действующая сессия. Успех: HTTP 200.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
progressSecondsinteger
может отсутствовать
minimum: 0; maximum: 9007199254740991
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "progressSeconds": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  }
}

Ответ с data envelope

Тип: #/$defs/learningLessonProgressPOST. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$ref": "#/$defs/learningLessonProgressPOST"
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

PATCH /api/learning/lessons/{id}/progress
Прогресс урока

Доступ: действующая сессия. Успех: HTTP 200.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
progressSecondsinteger
может отсутствовать
minimum: 0; maximum: 9007199254740991
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "progressSeconds": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  }
}

Ответ с data envelope

Тип: #/$defs/learningLessonProgressPATCH. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$ref": "#/$defs/learningLessonProgressPATCH"
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/learning/lessons/{id}/complete
Завершение урока

Доступ: действующая сессия. Успех: HTTP 200.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
progressSecondsinteger
может отсутствовать
minimum: 0; maximum: 9007199254740991
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "progressSeconds": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  }
}

Ответ с data envelope

Тип: #/$defs/learningLessonCompletePOST. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$ref": "#/$defs/learningLessonCompletePOST"
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

PATCH /api/learning/lessons/{id}/complete
Завершение урока

Доступ: действующая сессия. Успех: HTTP 200.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
progressSecondsinteger
может отсутствовать
minimum: 0; maximum: 9007199254740991
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "progressSeconds": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  }
}

Ответ с data envelope

Тип: #/$defs/learningLessonCompletePATCH. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$ref": "#/$defs/learningLessonCompletePATCH"
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/learning/lessons/{id}/reopen
Повторное открытие урока

Доступ: действующая сессия. Успех: HTTP 200.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
progressSecondsinteger
может отсутствовать
minimum: 0; maximum: 9007199254740991
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "progressSeconds": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  }
}

Ответ с data envelope

Тип: #/$defs/learningLessonReopenPOST. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$ref": "#/$defs/learningLessonReopenPOST"
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

PATCH /api/learning/lessons/{id}/reopen
Повторное открытие урока

Доступ: действующая сессия. Успех: HTTP 200.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
progressSecondsinteger
может отсутствовать
minimum: 0; maximum: 9007199254740991
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "progressSeconds": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  }
}

Ответ с data envelope

Тип: #/$defs/learningLessonReopenPATCH. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$ref": "#/$defs/learningLessonReopenPATCH"
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

GET /api/admin/learning/lessons
Список уроков в редакторе

Доступ: действующая сессия · OWNER, NETWORK_ADMIN, GYM_ADMIN or assigned COURSE_MANAGER. Успех: HTTP 200.

Ответ с data envelope

Тип: #/$defs/adminLearningLessons. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$ref": "#/$defs/adminLearningLessons"
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

GET /api/admin/learning/lessons/{id}
Урок в редакторе

Доступ: действующая сессия · OWNER, NETWORK_ADMIN, GYM_ADMIN or assigned COURSE_MANAGER. Успех: HTTP 200.

A missing ID returns data=null for compatibility.

Ответ с data envelope

Тип: #/$defs/adminLearningLesson. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$ref": "#/$defs/adminLearningLesson"
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/admin/learning/lessons
Создание урока

Доступ: действующая сессия · OWNER, NETWORK_ADMIN, GYM_ADMIN or assigned COURSE_MANAGER. Успех: HTTP 201.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
slugstring
обязательно
minLength: 2; maxLength: 120; pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$"
titlestring
обязательно
minLength: 2; maxLength: 180
shortDescriptionstring
обязательно
minLength: 2; maxLength: 500
bodystring / null
может отсутствовать
—
coverUrlstring / null
может отсутствовать
—
contentTypeодно из: ["VIDEO","TEXT","MIXED"]
обязательно
—
videoUrlstring / null
может отсутствовать
—
attachmentsмассив (object)
может отсутствовать
default: []; maxItems: 30
authorstring
обязательно
minLength: 2; maxLength: 180
expertstring / null
может отсутствовать
—
goalstring / null
может отсутствовать
—
drillsмассив (string)
может отсутствовать
default: []; maxItems: 100
cuesмассив (string)
может отсутствовать
default: []; maxItems: 100
durationSecondsinteger
обязательно
minimum: 0; maximum: 86400
difficultystring
обязательно
minLength: 1; maxLength: 80
tagsмассив (string)
может отсутствовать
default: []; maxItems: 100
equipmentмассив (string)
может отсутствовать
default: []; maxItems: 100
previewboolean
может отсутствовать
default: false
statusодно из: ["DRAFT","SCHEDULED","PUBLISHED","ARCHIVED"]
может отсутствовать
default: "DRAFT"
scheduledAtstring / number / null
может отсутствовать
—
completionRulesobject
может отсутствовать
default: {"minimumPercent":90,"requireManualCompletion":false}
offerobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "title": {
      "type": "string",
      "minLength": 2,
      "maxLength": 180
    },
    "shortDescription": {
      "type": "string",
      "minLength": 2,
      "maxLength": 500
    },
    "body": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100000
        },
        {
          "type": "null"
        }
      ]
    },
    "coverUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "contentType": {
      "type": "string",
      "enum": [
        "VIDEO",
        "TEXT",
        "MIXED"
      ]
    },
    "videoUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "attachments": {
      "default": [],
      "maxItems": 30,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 180
          },
          "url": {
            "type": "string",
            "maxLength": 2000
          },
          "size": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "name",
          "url"
        ]
      }
    },
    "author": {
      "type": "string",
      "minLength": 2,
      "maxLength": 180
    },
    "expert": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 300
        },
        {
          "type": "null"
        }
      ]
    },
    "goal": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "drills": {
      "default": [],
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "cues": {
      "default": [],
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "durationSeconds": {
      "type": "integer",
      "minimum": 0,
      "maximum": 86400
    },
    "difficulty": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "tags": {
      "default": [],
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "equipment": {
      "default": [],
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "preview": {
      "default": false,
      "type": "boolean"
    },
    "status": {
      "default": "DRAFT",
      "type": "string",
      "enum": [
        "DRAFT",
        "SCHEDULED",
        "PUBLISHED",
        "ARCHIVED"
      ]
    },
    "scheduledAt": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "completionRules": {
      "default": {
        "minimumPercent": 90,
        "requireManualCompletion": false
      },
      "type": "object",
      "properties": {
        "minimumPercent": {
          "default": 90,
          "type": "integer",
          "minimum": 0,
          "maximum": 100
        },
        "requireManualCompletion": {
          "default": false,
          "type": "boolean"
        }
      }
    },
    "offer": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "FREE",
            "PAID",
            "NONE"
          ]
        },
        "price": {
          "default": 0,
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "oldPrice": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "availableFrom": {
          "anyOf": [
            {
              "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "number"
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "availableUntil": {
          "anyOf": [
            {
              "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "number"
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "purchaseLimitPerUser": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "mode"
      ]
    }
  },
  "required": [
    "slug",
    "title",
    "shortDescription",
    "contentType",
    "author",
    "durationSeconds",
    "difficulty",
    "offer"
  ]
}

Ответ с data envelope

Тип: #/$defs/adminLearningLessonCreate. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$ref": "#/$defs/adminLearningLessonCreate"
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

PATCH /api/admin/learning/lessons/{id}
Изменение урока

Доступ: действующая сессия · OWNER, NETWORK_ADMIN, GYM_ADMIN or assigned COURSE_MANAGER. Успех: HTTP 200.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
slugstring
может отсутствовать
minLength: 2; maxLength: 120; pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$"
titlestring
может отсутствовать
minLength: 2; maxLength: 180
shortDescriptionstring
может отсутствовать
minLength: 2; maxLength: 500
bodystring / null
может отсутствовать
—
coverUrlstring / null
может отсутствовать
—
contentTypeодно из: ["VIDEO","TEXT","MIXED"]
может отсутствовать
—
videoUrlstring / null
может отсутствовать
—
attachmentsмассив (object)
может отсутствовать
maxItems: 30
authorstring
может отсутствовать
minLength: 2; maxLength: 180
expertstring / null
может отсутствовать
—
goalstring / null
может отсутствовать
—
drillsмассив (string)
может отсутствовать
maxItems: 100
cuesмассив (string)
может отсутствовать
maxItems: 100
durationSecondsinteger
может отсутствовать
minimum: 0; maximum: 86400
difficultystring
может отсутствовать
minLength: 1; maxLength: 80
tagsмассив (string)
может отсутствовать
maxItems: 100
equipmentмассив (string)
может отсутствовать
maxItems: 100
previewboolean
может отсутствовать
—
statusодно из: ["DRAFT","SCHEDULED","PUBLISHED","ARCHIVED"]
может отсутствовать
—
scheduledAtstring / number / null
может отсутствовать
—
completionRulesobject
может отсутствовать
—
offerobject
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "title": {
      "type": "string",
      "minLength": 2,
      "maxLength": 180
    },
    "shortDescription": {
      "type": "string",
      "minLength": 2,
      "maxLength": 500
    },
    "body": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100000
        },
        {
          "type": "null"
        }
      ]
    },
    "coverUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "contentType": {
      "type": "string",
      "enum": [
        "VIDEO",
        "TEXT",
        "MIXED"
      ]
    },
    "videoUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "attachments": {
      "maxItems": 30,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 180
          },
          "url": {
            "type": "string",
            "maxLength": 2000
          },
          "size": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "name",
          "url"
        ]
      }
    },
    "author": {
      "type": "string",
      "minLength": 2,
      "maxLength": 180
    },
    "expert": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 300
        },
        {
          "type": "null"
        }
      ]
    },
    "goal": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "drills": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "cues": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "durationSeconds": {
      "type": "integer",
      "minimum": 0,
      "maximum": 86400
    },
    "difficulty": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "tags": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "equipment": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "preview": {
      "type": "boolean"
    },
    "status": {
      "type": "string",
      "enum": [
        "DRAFT",
        "SCHEDULED",
        "PUBLISHED",
        "ARCHIVED"
      ]
    },
    "scheduledAt": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "completionRules": {
      "type": "object",
      "properties": {
        "minimumPercent": {
          "default": 90,
          "type": "integer",
          "minimum": 0,
          "maximum": 100
        },
        "requireManualCompletion": {
          "default": false,
          "type": "boolean"
        }
      }
    },
    "offer": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "FREE",
            "PAID",
            "NONE"
          ]
        },
        "price": {
          "default": 0,
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "oldPrice": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "availableFrom": {
          "anyOf": [
            {
              "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "number"
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "availableUntil": {
          "anyOf": [
            {
              "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "number"
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "purchaseLimitPerUser": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "mode"
      ]
    }
  }
}

Ответ с data envelope

Тип: #/$defs/adminLearningLessonPatch. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$ref": "#/$defs/adminLearningLessonPatch"
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/admin/learning/lessons/{id}/duplicate
Копирование урока

Доступ: действующая сессия · OWNER, NETWORK_ADMIN, GYM_ADMIN or assigned COURSE_MANAGER. Успех: HTTP 201.

Ответ с data envelope

Тип: #/$defs/adminLearningLessonDuplicate. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$ref": "#/$defs/adminLearningLessonDuplicate"
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/admin/learning/lessons/{id}/archive
Архивация урока

Доступ: действующая сессия · OWNER, NETWORK_ADMIN, GYM_ADMIN or assigned COURSE_MANAGER. Успех: HTTP 200.

Ответ с data envelope

Тип: #/$defs/adminLearningLessonArchive. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$ref": "#/$defs/adminLearningLessonArchive"
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

GET /api/admin/learning/courses
Список курсов в редакторе

Доступ: действующая сессия · OWNER, NETWORK_ADMIN, GYM_ADMIN or assigned COURSE_MANAGER. Успех: HTTP 200.

Ответ с data envelope

Тип: #/$defs/adminLearningCourses. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$ref": "#/$defs/adminLearningCourses"
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

GET /api/admin/learning/courses/{id}
Курс в редакторе

Доступ: действующая сессия · OWNER, NETWORK_ADMIN, GYM_ADMIN or assigned COURSE_MANAGER. Успех: HTTP 200.

A missing ID returns data=null for compatibility.

Ответ с data envelope

Тип: #/$defs/adminLearningCourse. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$ref": "#/$defs/adminLearningCourse"
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/admin/learning/courses
Создание курса

Доступ: действующая сессия · OWNER, NETWORK_ADMIN, GYM_ADMIN or assigned COURSE_MANAGER. Успех: HTTP 201.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
slugstring
обязательно
minLength: 2; maxLength: 120; pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$"
titlestring
обязательно
minLength: 2; maxLength: 180
authorstring
обязательно
minLength: 2; maxLength: 180
expertstring / null
может отсутствовать
—
descriptionstring
обязательно
minLength: 2; maxLength: 30000
coverUrlstring / null
может отсутствовать
—
trailerUrlstring / null
может отсутствовать
—
audienceмассив (string)
может отсутствовать
default: []; maxItems: 100
outcomesмассив (string)
может отсутствовать
default: []; maxItems: 100
equipmentмассив (string)
может отсутствовать
default: []; maxItems: 100
difficultystring
обязательно
minLength: 1; maxLength: 80
durationMinutesinteger
обязательно
minimum: 0; maximum: 100000
statusодно из: ["DRAFT","SCHEDULED","PUBLISHED","ARCHIVED"]
может отсутствовать
default: "DRAFT"
scheduledAtstring / number / null
может отсутствовать
—
offerobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "title": {
      "type": "string",
      "minLength": 2,
      "maxLength": 180
    },
    "author": {
      "type": "string",
      "minLength": 2,
      "maxLength": 180
    },
    "expert": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 300
        },
        {
          "type": "null"
        }
      ]
    },
    "description": {
      "type": "string",
      "minLength": 2,
      "maxLength": 30000
    },
    "coverUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "trailerUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "audience": {
      "default": [],
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "outcomes": {
      "default": [],
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "equipment": {
      "default": [],
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "difficulty": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "durationMinutes": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100000
    },
    "status": {
      "default": "DRAFT",
      "type": "string",
      "enum": [
        "DRAFT",
        "SCHEDULED",
        "PUBLISHED",
        "ARCHIVED"
      ]
    },
    "scheduledAt": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "offer": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "FREE",
            "PAID",
            "NONE"
          ]
        },
        "price": {
          "default": 0,
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "oldPrice": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "availableFrom": {
          "anyOf": [
            {
              "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "number"
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "availableUntil": {
          "anyOf": [
            {
              "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "number"
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "purchaseLimitPerUser": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "mode"
      ]
    }
  },
  "required": [
    "slug",
    "title",
    "author",
    "description",
    "difficulty",
    "durationMinutes",
    "offer"
  ]
}

Ответ с data envelope

Тип: #/$defs/adminLearningCourseCreate. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$ref": "#/$defs/adminLearningCourseCreate"
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

PATCH /api/admin/learning/courses/{id}
Изменение курса

Доступ: действующая сессия · OWNER, NETWORK_ADMIN, GYM_ADMIN or assigned COURSE_MANAGER. Успех: HTTP 200.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
slugstring
может отсутствовать
minLength: 2; maxLength: 120; pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$"
titlestring
может отсутствовать
minLength: 2; maxLength: 180
authorstring
может отсутствовать
minLength: 2; maxLength: 180
expertstring / null
может отсутствовать
—
descriptionstring
может отсутствовать
minLength: 2; maxLength: 30000
coverUrlstring / null
может отсутствовать
—
trailerUrlstring / null
может отсутствовать
—
audienceмассив (string)
может отсутствовать
maxItems: 100
outcomesмассив (string)
может отсутствовать
maxItems: 100
equipmentмассив (string)
может отсутствовать
maxItems: 100
difficultystring
может отсутствовать
minLength: 1; maxLength: 80
durationMinutesinteger
может отсутствовать
minimum: 0; maximum: 100000
statusодно из: ["DRAFT","SCHEDULED","PUBLISHED","ARCHIVED"]
может отсутствовать
—
scheduledAtstring / number / null
может отсутствовать
—
offerobject
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "title": {
      "type": "string",
      "minLength": 2,
      "maxLength": 180
    },
    "author": {
      "type": "string",
      "minLength": 2,
      "maxLength": 180
    },
    "expert": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 300
        },
        {
          "type": "null"
        }
      ]
    },
    "description": {
      "type": "string",
      "minLength": 2,
      "maxLength": 30000
    },
    "coverUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "trailerUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "audience": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "outcomes": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "equipment": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "difficulty": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "durationMinutes": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100000
    },
    "status": {
      "type": "string",
      "enum": [
        "DRAFT",
        "SCHEDULED",
        "PUBLISHED",
        "ARCHIVED"
      ]
    },
    "scheduledAt": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "offer": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "FREE",
            "PAID",
            "NONE"
          ]
        },
        "price": {
          "default": 0,
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "oldPrice": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "availableFrom": {
          "anyOf": [
            {
              "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "number"
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "availableUntil": {
          "anyOf": [
            {
              "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "number"
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "purchaseLimitPerUser": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "mode"
      ]
    }
  }
}

Ответ с data envelope

Тип: #/$defs/adminLearningCoursePatch. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$ref": "#/$defs/adminLearningCoursePatch"
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

PUT /api/admin/learning/courses/{id}/program
Программа курса

Доступ: действующая сессия · OWNER, NETWORK_ADMIN, GYM_ADMIN or assigned COURSE_MANAGER. Успех: HTTP 200.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
acknowledgePublishedChangeboolean
может отсутствовать
default: false
modulesмассив (object)
обязательно
minItems: 1
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "acknowledgePublishedChange": {
      "default": false,
      "type": "boolean"
    },
    "modules": {
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 180
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ]
          },
          "lessons": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "lessonId": {
                  "type": "string",
                  "minLength": 1
                },
                "required": {
                  "default": true,
                  "type": "boolean"
                },
                "settings": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string",
                      "maxLength": 180
                    }
                  }
                }
              },
              "required": [
                "lessonId"
              ]
            }
          }
        },
        "required": [
          "title",
          "lessons"
        ]
      }
    }
  },
  "required": [
    "modules"
  ]
}

Ответ с data envelope

Тип: #/$defs/adminLearningCourseProgram. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$ref": "#/$defs/adminLearningCourseProgram"
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/admin/learning/courses/{id}/publish
Публикация курса

Доступ: действующая сессия · OWNER, NETWORK_ADMIN, GYM_ADMIN or assigned COURSE_MANAGER. Успех: HTTP 200.

Ответ с data envelope

Тип: #/$defs/adminLearningCoursePublish. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$ref": "#/$defs/adminLearningCoursePublish"
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/admin/learning/courses/{id}/archive
Архивация курса

Доступ: действующая сессия · OWNER, NETWORK_ADMIN, GYM_ADMIN or assigned COURSE_MANAGER. Успех: HTTP 200.

Ответ с data envelope

Тип: #/$defs/adminLearningCourseArchive. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$ref": "#/$defs/adminLearningCourseArchive"
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/admin/learning/media
Загрузка файла обучения

Доступ: действующая сессия · OWNER, NETWORK_ADMIN, GYM_ADMIN or assigned COURSE_MANAGER. Успех: HTTP 201.

Multipart file is required; optional purpose is learning-cover, learning-video or learning-trailer. No purpose uses the legacy video uploader.

Ответ с data envelope

Тип: #/$defs/adminLearningMedia. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$ref": "#/$defs/adminLearningMedia"
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

GET /api/heal/history
healthHistory

Доступ: без сессии. Успех: HTTP 200.

Persisted 90-day observations. Gaps are unknown; availability is over observed samples, with coverage reported separately.

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "environment": {
          "type": "string"
        },
        "generatedAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "retentionDays": {
          "type": "number",
          "const": 90
        },
        "startedAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ]
        },
        "lastObservedAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ]
        },
        "invalidRecords": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "components": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "state": {
                "type": "string",
                "enum": [
                  "pass",
                  "warn",
                  "fail",
                  "unknown",
                  "disabled"
                ]
              },
              "lastObservedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "intervalSeconds": {
                "type": "number"
              },
              "availabilityPercent": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "coveragePercent": {
                "type": "number"
              },
              "latencyMs": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "days": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "pass",
                        "warn",
                        "fail",
                        "unknown",
                        "disabled"
                      ]
                    },
                    "samples": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "availabilityPercent": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "coveragePercent": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "date",
                    "state",
                    "samples",
                    "availabilityPercent",
                    "coveragePercent"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "id",
              "label",
              "state",
              "lastObservedAt",
              "intervalSeconds",
              "availabilityPercent",
              "coveragePercent",
              "latencyMs",
              "days"
            ],
            "additionalProperties": false
          }
        },
        "incidents": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "componentId": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "warn",
                  "fail"
                ]
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "lastObservedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "resolvedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "ongoing",
                  "resolved",
                  "interrupted"
                ]
              }
            },
            "required": [
              "id",
              "componentId",
              "label",
              "severity",
              "startedAt",
              "lastObservedAt",
              "resolvedAt",
              "status"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "environment",
        "generatedAt",
        "retentionDays",
        "startedAt",
        "lastObservedAt",
        "invalidRecords",
        "components",
        "incidents"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

GET /api/heal/history-owner
healthOwnerHistory

Доступ: действующая сессия · OWNER. Успех: HTTP 200.

Authentication before cache; includes private integration and CRM observations.

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "environment": {
          "type": "string"
        },
        "generatedAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "retentionDays": {
          "type": "number",
          "const": 90
        },
        "startedAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ]
        },
        "lastObservedAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ]
        },
        "invalidRecords": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "components": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "state": {
                "type": "string",
                "enum": [
                  "pass",
                  "warn",
                  "fail",
                  "unknown",
                  "disabled"
                ]
              },
              "lastObservedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "intervalSeconds": {
                "type": "number"
              },
              "availabilityPercent": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "coveragePercent": {
                "type": "number"
              },
              "latencyMs": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "days": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "pass",
                        "warn",
                        "fail",
                        "unknown",
                        "disabled"
                      ]
                    },
                    "samples": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "availabilityPercent": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "coveragePercent": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "date",
                    "state",
                    "samples",
                    "availabilityPercent",
                    "coveragePercent"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "id",
              "label",
              "state",
              "lastObservedAt",
              "intervalSeconds",
              "availabilityPercent",
              "coveragePercent",
              "latencyMs",
              "days"
            ],
            "additionalProperties": false
          }
        },
        "incidents": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "componentId": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "severity": {
                "type": "string",
                "enum": [
                  "warn",
                  "fail"
                ]
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "lastObservedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "resolvedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "ongoing",
                  "resolved",
                  "interrupted"
                ]
              }
            },
            "required": [
              "id",
              "componentId",
              "label",
              "severity",
              "startedAt",
              "lastObservedAt",
              "resolvedAt",
              "status"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "environment",
        "generatedAt",
        "retentionDays",
        "startedAt",
        "lastObservedAt",
        "invalidRecords",
        "components",
        "incidents"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

GET /api/heal/status
Публичная готовность

Доступ: без сессии. Успех: HTTP 200 / 503.

503 retains the data envelope when a critical readiness check fails. Cached up to 10 seconds.

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "audience": {
          "type": "string",
          "enum": [
            "public",
            "owner"
          ]
        },
        "state": {
          "type": "string",
          "enum": [
            "healthy",
            "degraded",
            "unhealthy",
            "unknown"
          ]
        },
        "checkedAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "cachedUntil": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "checks": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "state": {
                "type": "string",
                "enum": [
                  "pass",
                  "warn",
                  "fail",
                  "unknown",
                  "disabled"
                ]
              },
              "evidence": {
                "type": "string",
                "enum": [
                  "live",
                  "configuration",
                  "history"
                ]
              },
              "checkedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "latencyMs": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "httpStatus": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 100,
                    "maximum": 599
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cause": {
                "type": "string"
              },
              "impact": {
                "type": "string"
              },
              "nextStep": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "label",
              "state",
              "evidence",
              "checkedAt",
              "latencyMs",
              "httpStatus",
              "cause",
              "impact",
              "nextStep"
            ],
            "additionalProperties": false
          }
        },
        "crm": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "gymId": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "enabled": {
                "type": "boolean"
              },
              "lastAttemptAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "lastSuccessAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "syncedClients": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "syncedVisits": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "sync": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "pass",
                      "warn",
                      "fail",
                      "unknown",
                      "disabled"
                    ]
                  },
                  "evidence": {
                    "type": "string",
                    "enum": [
                      "live",
                      "configuration",
                      "history"
                    ]
                  },
                  "checkedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  "latencyMs": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "httpStatus": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 100,
                        "maximum": 599
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "cause": {
                    "type": "string"
                  },
                  "impact": {
                    "type": "string"
                  },
                  "nextStep": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "label",
                  "state",
                  "evidence",
                  "checkedAt",
                  "latencyMs",
                  "httpStatus",
                  "cause",
                  "impact",
                  "nextStep"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "gymId",
              "name",
              "enabled",
              "lastAttemptAt",
              "lastSuccessAt",
              "syncedClients",
              "syncedVisits",
              "sync"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "audience",
        "state",
        "checkedAt",
        "cachedUntil",
        "checks",
        "crm"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

GET /api/heal/report
Подробный отчёт владельца

Доступ: действующая сессия · OWNER. Успех: HTTP 200.

Session/role checked before cache; diagnostic access does not require completed onboarding.

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "audience": {
          "type": "string",
          "enum": [
            "public",
            "owner"
          ]
        },
        "state": {
          "type": "string",
          "enum": [
            "healthy",
            "degraded",
            "unhealthy",
            "unknown"
          ]
        },
        "checkedAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "cachedUntil": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "checks": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "state": {
                "type": "string",
                "enum": [
                  "pass",
                  "warn",
                  "fail",
                  "unknown",
                  "disabled"
                ]
              },
              "evidence": {
                "type": "string",
                "enum": [
                  "live",
                  "configuration",
                  "history"
                ]
              },
              "checkedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "latencyMs": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "httpStatus": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 100,
                    "maximum": 599
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cause": {
                "type": "string"
              },
              "impact": {
                "type": "string"
              },
              "nextStep": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "label",
              "state",
              "evidence",
              "checkedAt",
              "latencyMs",
              "httpStatus",
              "cause",
              "impact",
              "nextStep"
            ],
            "additionalProperties": false
          }
        },
        "crm": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "gymId": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "enabled": {
                "type": "boolean"
              },
              "lastAttemptAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "lastSuccessAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "syncedClients": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "syncedVisits": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "sync": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "pass",
                      "warn",
                      "fail",
                      "unknown",
                      "disabled"
                    ]
                  },
                  "evidence": {
                    "type": "string",
                    "enum": [
                      "live",
                      "configuration",
                      "history"
                    ]
                  },
                  "checkedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  "latencyMs": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "httpStatus": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 100,
                        "maximum": 599
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "cause": {
                    "type": "string"
                  },
                  "impact": {
                    "type": "string"
                  },
                  "nextStep": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "label",
                  "state",
                  "evidence",
                  "checkedAt",
                  "latencyMs",
                  "httpStatus",
                  "cause",
                  "impact",
                  "nextStep"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "gymId",
              "name",
              "enabled",
              "lastAttemptAt",
              "lastSuccessAt",
              "syncedClients",
              "syncedVisits",
              "sync"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "audience",
        "state",
        "checkedAt",
        "cachedUntil",
        "checks",
        "crm"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

POST /api/heal/crm
Живые ответы CRM

Доступ: действующая сессия · OWNER. Успех: HTTP 200.

Read-only fixed FitBase upstream, three GET requests, 2.5s timeout per request, 30s cache; disabled gym performs no upstream calls.

Тело запроса · application/json

ПолеТип / обязательностьОграничения
gymIdstring
обязательно
minLength: 1; maxLength: 128
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "gymId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    }
  },
  "required": [
    "gymId"
  ],
  "additionalProperties": false
}

Ответ с data envelope

ПолеТип / обязательностьОграничения
dataobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "gymId": {
          "type": "string"
        },
        "checkedAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "cachedUntil": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "checks": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "state": {
                "type": "string",
                "enum": [
                  "pass",
                  "warn",
                  "fail",
                  "unknown",
                  "disabled"
                ]
              },
              "evidence": {
                "type": "string",
                "enum": [
                  "live",
                  "configuration",
                  "history"
                ]
              },
              "checkedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "latencyMs": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "httpStatus": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 100,
                    "maximum": 599
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cause": {
                "type": "string"
              },
              "impact": {
                "type": "string"
              },
              "nextStep": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "label",
              "state",
              "evidence",
              "checkedAt",
              "latencyMs",
              "httpStatus",
              "cause",
              "impact",
              "nextStep"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "gymId",
        "checkedAt",
        "cachedUntil",
        "checks"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

$ref разрешается по $defs соответствующего JSON-каталога выше. Сложные cross-field и бизнес-проверки выполняются сервером дополнительно к JSON Schema.

25. Каталог входных схем

168 схем генерируются из runtime Zod contracts. Название связывает модуль и schema; само наличие схемы не выдаёт право вызова и не назначает её произвольному маршруту. Полные поля, required, defaults и ограничения доступны ниже и в JSON.

Все входные схемы · JSON
account.emailChangeSchema
ПолеТип / обязательностьОграничения
emailstring
может отсутствовать
maxLength: 254
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "maxLength": 254
    }
  }
}
account.emailPreferencesSchema
ПолеТип / обязательностьОграничения
transactionalboolean
может отсутствовать
—
productboolean
может отсутствовать
—
activityboolean
может отсутствовать
—
marketingboolean
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "transactional": {
      "type": "boolean"
    },
    "product": {
      "type": "boolean"
    },
    "activity": {
      "type": "boolean"
    },
    "marketing": {
      "type": "boolean"
    }
  }
}
account.emailTemplatesSchema
ПолеТип / обязательностьОграничения
templatesмассив (object)
обязательно
maxItems: 50
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "templates": {
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "variant": {
            "type": "string",
            "enum": [
              "security",
              "shop",
              "activity",
              "marketing",
              "operational"
            ]
          },
          "subject": {
            "type": "string",
            "minLength": 1,
            "maxLength": 180
          },
          "preheader": {
            "type": "string",
            "maxLength": 180
          },
          "body": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          },
          "ctaLabel": {
            "type": "string",
            "maxLength": 80
          },
          "ctaPath": {
            "type": "string",
            "maxLength": 500
          },
          "blocks": {
            "maxItems": 12,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "HEADING",
                    "PARAGRAPH",
                    "HIGHLIGHT",
                    "DIVIDER"
                  ]
                },
                "text": {
                  "type": "string",
                  "maxLength": 2000
                }
              },
              "required": [
                "id",
                "type",
                "text"
              ]
            }
          }
        },
        "required": [
          "id",
          "name",
          "variant",
          "subject",
          "preheader",
          "body",
          "ctaLabel",
          "ctaPath",
          "blocks"
        ]
      }
    }
  },
  "required": [
    "templates"
  ]
}
account.emailTestSchema
ПолеТип / обязательностьОграничения
recipientstring
обязательно
maxLength: 254
variantодно из: ["security","shop","activity","marketing","operational"]
может отсутствовать
default: "marketing"
templateIdstring
может отсутствовать
format: "uuid"; pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "recipient": {
      "type": "string",
      "maxLength": 254
    },
    "variant": {
      "default": "marketing",
      "type": "string",
      "enum": [
        "security",
        "shop",
        "activity",
        "marketing",
        "operational"
      ]
    },
    "templateId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "recipient"
  ]
}
account.emailUnsubscribeSchema
ПолеТип / обязательностьОграничения
tokenstring
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "token": {
      "type": "string"
    }
  },
  "required": [
    "token"
  ]
}
account.emailVerificationSchema
ПолеТип / обязательностьОграничения
tokenstring
обязательно
minLength: 20; maxLength: 200
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "minLength": 20,
      "maxLength": 200
    }
  },
  "required": [
    "token"
  ]
}
account.nicknameChangeSchema
ПолеТип / обязательностьОграничения
nicknamestring
обязательно
minLength: 1; maxLength: 11; pattern: "^[^\\s#\\p{Cc}\\p{Cf}]+$"
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "nickname": {
      "type": "string",
      "minLength": 1,
      "maxLength": 11,
      "pattern": "^[^\\s#\\p{Cc}\\p{Cf}]+$"
    }
  },
  "required": [
    "nickname"
  ]
}
account.phoneLinkSchema
ПолеТип / обязательностьОграничения
phonestring
обязательно
minLength: 10; maxLength: 40
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "phone": {
      "type": "string",
      "minLength": 10,
      "maxLength": 40
    }
  },
  "required": [
    "phone"
  ]
}
account.privacyConsentSchema
ПолеТип / обязательностьОграничения
policyVersionstring
обязательно
minLength: 1; maxLength: 40
analyticsConsentboolean
может отсутствовать
—
locationConsentboolean
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "policyVersion": {
      "type": "string",
      "minLength": 1,
      "maxLength": 40
    },
    "analyticsConsent": {
      "type": "boolean"
    },
    "locationConsent": {
      "type": "boolean"
    }
  },
  "required": [
    "policyVersion"
  ]
}
achievements.achievementCreateSchema
ПолеТип / обязательностьОграничения
slugstring
обязательно
minLength: 1; maxLength: 100; pattern: "^[\\p{L}\\p{N}-]+$"
titlestring
обязательно
minLength: 1; maxLength: 120
descriptionstring
обязательно
minLength: 1; maxLength: 1000
iconstring
обязательно
minLength: 1; maxLength: 100
iconColorstring
может отсутствовать
default: "#c60814"; pattern: "^#[0-9a-fA-F]{6}$"
visualobject
может отсутствовать
—
pointsRewardinteger
может отсутствовать
default: 0; minimum: 0; maximum: 1000000
criteriaobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[\\p{L}\\p{N}-]+$"
    },
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "description": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1000
    },
    "icon": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "iconColor": {
      "default": "#c60814",
      "type": "string",
      "pattern": "^#[0-9a-fA-F]{6}$"
    },
    "visual": {
      "type": "object",
      "properties": {
        "cardStyle": {
          "type": "string",
          "enum": [
            "standard",
            "soft",
            "outline",
            "dark"
          ]
        },
        "iconShape": {
          "type": "string",
          "enum": [
            "octagon",
            "circle",
            "rounded",
            "hexagon"
          ]
        },
        "accentColor": {
          "type": "string",
          "pattern": "^#[0-9a-fA-F]{6}$"
        }
      },
      "required": [
        "cardStyle",
        "iconShape"
      ]
    },
    "pointsReward": {
      "default": 0,
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    },
    "criteria": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    }
  },
  "required": [
    "slug",
    "title",
    "description",
    "icon",
    "criteria"
  ]
}
achievements.achievementPatchSchema
ПолеТип / обязательностьОграничения
titlestring
может отсутствовать
minLength: 1; maxLength: 120
descriptionstring
может отсутствовать
minLength: 1; maxLength: 1000
iconstring
может отсутствовать
minLength: 1; maxLength: 100
iconColorstring
может отсутствовать
pattern: "^#[0-9a-fA-F]{6}$"
visualobject
может отсутствовать
—
pointsRewardinteger
может отсутствовать
minimum: 0; maximum: 1000000
criteriaobject
может отсутствовать
—
expectedRuleRevisioninteger
может отсутствовать
maximum: 9007199254740991
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "description": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1000
    },
    "icon": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "iconColor": {
      "type": "string",
      "pattern": "^#[0-9a-fA-F]{6}$"
    },
    "visual": {
      "type": "object",
      "properties": {
        "cardStyle": {
          "type": "string",
          "enum": [
            "standard",
            "soft",
            "outline",
            "dark"
          ]
        },
        "iconShape": {
          "type": "string",
          "enum": [
            "octagon",
            "circle",
            "rounded",
            "hexagon"
          ]
        },
        "accentColor": {
          "type": "string",
          "pattern": "^#[0-9a-fA-F]{6}$"
        }
      },
      "required": [
        "cardStyle",
        "iconShape"
      ]
    },
    "pointsReward": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    },
    "criteria": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "expectedRuleRevision": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    }
  }
}
activity.activityBatchSchema
ПолеТип / обязательностьОграничения
userIdstring
обязательно
minLength: 1
eventsмассив (object)
обязательно
minItems: 1; maxItems: 20
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "userId": {
      "type": "string",
      "minLength": 1
    },
    "events": {
      "minItems": 1,
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "sessionId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "kind": {
            "type": "string",
            "enum": [
              "SCREEN_VIEW",
              "CLICK",
              "ERROR"
            ]
          },
          "screen": {
            "type": "string",
            "maxLength": 200,
            "pattern": "^\\/[a-zA-Z0-9_/:.-]*$"
          },
          "target": {
            "type": "string",
            "pattern": "^[a-z0-9._:/-]{1,160}$"
          },
          "errorCode": {
            "type": "string",
            "pattern": "^[A-Z0-9_:-]{1,80}$"
          },
          "device": {
            "type": "string",
            "enum": [
              "MOBILE",
              "DESKTOP",
              "TABLET",
              "UNKNOWN"
            ]
          },
          "environment": {
            "type": "string",
            "enum": [
              "production",
              "stage",
              "development",
              "unknown"
            ]
          },
          "appVersion": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9._:-]{1,80}$"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "id",
          "sessionId",
          "kind",
          "screen",
          "occurredAt"
        ]
      }
    }
  },
  "required": [
    "userId",
    "events"
  ]
}
activity.activityEventSchema
ПолеТип / обязательностьОграничения
idstring
обязательно
format: "uuid"; pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
sessionIdstring
обязательно
format: "uuid"; pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
kindодно из: ["SCREEN_VIEW","CLICK","ERROR"]
обязательно
—
screenstring
обязательно
maxLength: 200; pattern: "^\\/[a-zA-Z0-9_/:.-]*$"
targetstring
может отсутствовать
pattern: "^[a-z0-9._:/-]{1,160}$"
errorCodestring
может отсутствовать
pattern: "^[A-Z0-9_:-]{1,80}$"
deviceодно из: ["MOBILE","DESKTOP","TABLET","UNKNOWN"]
может отсутствовать
—
environmentодно из: ["production","stage","development","unknown"]
может отсутствовать
—
appVersionstring
может отсутствовать
pattern: "^[a-zA-Z0-9._:-]{1,80}$"
occurredAtstring
обязательно
format: "date-time"; pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "sessionId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "kind": {
      "type": "string",
      "enum": [
        "SCREEN_VIEW",
        "CLICK",
        "ERROR"
      ]
    },
    "screen": {
      "type": "string",
      "maxLength": 200,
      "pattern": "^\\/[a-zA-Z0-9_/:.-]*$"
    },
    "target": {
      "type": "string",
      "pattern": "^[a-z0-9._:/-]{1,160}$"
    },
    "errorCode": {
      "type": "string",
      "pattern": "^[A-Z0-9_:-]{1,80}$"
    },
    "device": {
      "type": "string",
      "enum": [
        "MOBILE",
        "DESKTOP",
        "TABLET",
        "UNKNOWN"
      ]
    },
    "environment": {
      "type": "string",
      "enum": [
        "production",
        "stage",
        "development",
        "unknown"
      ]
    },
    "appVersion": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9._:-]{1,80}$"
    },
    "occurredAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    }
  },
  "required": [
    "id",
    "sessionId",
    "kind",
    "screen",
    "occurredAt"
  ]
}
admin-commerce.bannerInput
ПолеТип / обязательностьОграничения
titlestring
обязательно
minLength: 2; maxLength: 160
subtitlestring / null
может отсутствовать
—
imageUrlstring / null
может отсутствовать
—
ctaLabelstring / null
может отсутствовать
—
ctaUrlstring / null
может отсутствовать
—
placementstring
обязательно
minLength: 2; maxLength: 80
targetSegmentobject / null
может отсутствовать
—
sortOrderinteger
может отсутствовать
default: 0; minimum: -9007199254740991; maximum: 9007199254740991
startsAtstring / number / null
может отсутствовать
—
endsAtstring / number / null
может отсутствовать
—
activeboolean
может отсутствовать
default: true
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "minLength": 2,
      "maxLength": 160
    },
    "subtitle": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 300
        },
        {
          "type": "null"
        }
      ]
    },
    "imageUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "ctaLabel": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 80
        },
        {
          "type": "null"
        }
      ]
    },
    "ctaUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "placement": {
      "type": "string",
      "minLength": 2,
      "maxLength": 80
    },
    "targetSegment": {
      "anyOf": [
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        {
          "type": "null"
        }
      ]
    },
    "sortOrder": {
      "default": 0,
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "startsAt": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "endsAt": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "active": {
      "default": true,
      "type": "boolean"
    }
  },
  "required": [
    "title",
    "placement"
  ]
}
admin-commerce.bannerInputShape
ПолеТип / обязательностьОграничения
titlestring
обязательно
minLength: 2; maxLength: 160
subtitlestring / null
может отсутствовать
—
imageUrlstring / null
может отсутствовать
—
ctaLabelstring / null
может отсутствовать
—
ctaUrlstring / null
может отсутствовать
—
placementstring
обязательно
minLength: 2; maxLength: 80
targetSegmentobject / null
может отсутствовать
—
sortOrderinteger
может отсутствовать
default: 0; minimum: -9007199254740991; maximum: 9007199254740991
startsAtstring / number / null
может отсутствовать
—
endsAtstring / number / null
может отсутствовать
—
activeboolean
может отсутствовать
default: true
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "minLength": 2,
      "maxLength": 160
    },
    "subtitle": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 300
        },
        {
          "type": "null"
        }
      ]
    },
    "imageUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "ctaLabel": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 80
        },
        {
          "type": "null"
        }
      ]
    },
    "ctaUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "placement": {
      "type": "string",
      "minLength": 2,
      "maxLength": 80
    },
    "targetSegment": {
      "anyOf": [
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        {
          "type": "null"
        }
      ]
    },
    "sortOrder": {
      "default": 0,
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "startsAt": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "endsAt": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "active": {
      "default": true,
      "type": "boolean"
    }
  },
  "required": [
    "title",
    "placement"
  ]
}
admin-commerce.bannerPatchInput
ПолеТип / обязательностьОграничения
titlestring
может отсутствовать
minLength: 2; maxLength: 160
subtitlestring / null
может отсутствовать
—
imageUrlstring / null
может отсутствовать
—
ctaLabelstring / null
может отсутствовать
—
ctaUrlstring / null
может отсутствовать
—
placementstring
может отсутствовать
minLength: 2; maxLength: 80
targetSegmentobject / null
может отсутствовать
—
sortOrderinteger
может отсутствовать
minimum: -9007199254740991; maximum: 9007199254740991
startsAtstring / number / null
может отсутствовать
—
endsAtstring / number / null
может отсутствовать
—
activeboolean
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "minLength": 2,
      "maxLength": 160
    },
    "subtitle": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 300
        },
        {
          "type": "null"
        }
      ]
    },
    "imageUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "ctaLabel": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 80
        },
        {
          "type": "null"
        }
      ]
    },
    "ctaUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "placement": {
      "type": "string",
      "minLength": 2,
      "maxLength": 80
    },
    "targetSegment": {
      "anyOf": [
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        {
          "type": "null"
        }
      ]
    },
    "sortOrder": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "startsAt": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "endsAt": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "active": {
      "type": "boolean"
    }
  }
}
admin-commerce.boxInput
ПолеТип / обязательностьОграничения
slugstring
обязательно
pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$"
namestring
обязательно
minLength: 2; maxLength: 160
descriptionstring
обязательно
minLength: 2; maxLength: 20000
imageUrlstring / null
может отсутствовать
—
priceinteger
обязательно
minimum: 0; maximum: 9007199254740991
availableFromstring / number
может отсутствовать
description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds."
availableUntilstring / number
может отсутствовать
description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds."
openingLimitPerUserinteger
может отсутствовать
maximum: 9007199254740991
cooldownSecondsinteger
может отсутствовать
minimum: 0; maximum: 9007199254740991
pityThresholdinteger
может отсутствовать
maximum: 9007199254740991
statusодно из: ["DRAFT","SCHEDULED","ACTIVE","SOLD_OUT","EXPIRED","ARCHIVED"]
может отсутствовать
default: "DRAFT"
placementодно из: ["PROMO","WEEKLY"] / null
может отсутствовать
—
placementTitlestring
может отсутствовать
maxLength: 160
placementTextstring
может отсутствовать
maxLength: 300
rewardsPerOpening1 / 2
может отсутствовать
—
secretChallengeWeightinteger
может отсутствовать
default: 1; minimum: 1; maximum: 10000
prizesмассив (object)
обязательно
minItems: 1
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string",
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "name": {
      "type": "string",
      "minLength": 2,
      "maxLength": 160
    },
    "description": {
      "type": "string",
      "minLength": 2,
      "maxLength": 20000
    },
    "imageUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "price": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "availableFrom": {
      "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "number"
        }
      ]
    },
    "availableUntil": {
      "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "number"
        }
      ]
    },
    "openingLimitPerUser": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "cooldownSeconds": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "pityThreshold": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "status": {
      "default": "DRAFT",
      "type": "string",
      "enum": [
        "DRAFT",
        "SCHEDULED",
        "ACTIVE",
        "SOLD_OUT",
        "EXPIRED",
        "ARCHIVED"
      ]
    },
    "placement": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "PROMO",
            "WEEKLY"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "placementTitle": {
      "type": "string",
      "maxLength": 160
    },
    "placementText": {
      "type": "string",
      "maxLength": 300
    },
    "rewardsPerOpening": {
      "anyOf": [
        {
          "type": "number",
          "const": 1
        },
        {
          "type": "number",
          "const": 2
        }
      ]
    },
    "secretChallengeWeight": {
      "default": 1,
      "type": "integer",
      "minimum": 1,
      "maximum": 10000
    },
    "prizes": {
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "productId": {
            "type": "string",
            "minLength": 1
          },
          "weight": {
            "default": 1,
            "type": "integer",
            "minimum": 1,
            "maximum": 10000
          },
          "rarity": {
            "default": "COMMON",
            "type": "string",
            "minLength": 2,
            "maxLength": 40
          },
          "stock": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "globalLimit": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "userLimit": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "guaranteed": {
            "default": false,
            "type": "boolean"
          }
        },
        "required": [
          "productId"
        ]
      }
    }
  },
  "required": [
    "slug",
    "name",
    "description",
    "price",
    "prizes"
  ]
}
admin-commerce.categoryInputShape
ПолеТип / обязательностьОграничения
namestring
обязательно
minLength: 2; maxLength: 120
slugstring
обязательно
pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$"
parentIdstring / null
может отсутствовать
—
descriptionstring
может отсутствовать
—
imageUrlstring / null
может отсутствовать
—
iconstring
может отсутствовать
—
sortOrderinteger
может отсутствовать
default: 0; minimum: -9007199254740991; maximum: 9007199254740991
visibleboolean
может отсутствовать
default: true
statusодно из: ["DRAFT","PUBLISHED","ARCHIVED","PENDING_DELETE"]
может отсутствовать
default: "DRAFT"
metadataobject
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120
    },
    "slug": {
      "type": "string",
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "parentId": {
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "type": "string"
    },
    "imageUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "icon": {
      "type": "string"
    },
    "sortOrder": {
      "default": 0,
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "visible": {
      "default": true,
      "type": "boolean"
    },
    "status": {
      "default": "DRAFT",
      "type": "string",
      "enum": [
        "DRAFT",
        "PUBLISHED",
        "ARCHIVED",
        "PENDING_DELETE"
      ]
    },
    "metadata": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    }
  },
  "required": [
    "name",
    "slug"
  ]
}
admin-commerce.categoryPatchInput
ПолеТип / обязательностьОграничения
namestring
может отсутствовать
minLength: 2; maxLength: 120
slugstring
может отсутствовать
pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$"
parentIdstring / null
может отсутствовать
—
descriptionstring
может отсутствовать
—
imageUrlstring / null
может отсутствовать
—
iconstring
может отсутствовать
—
sortOrderinteger
может отсутствовать
minimum: -9007199254740991; maximum: 9007199254740991
visibleboolean
может отсутствовать
—
statusодно из: ["DRAFT","PUBLISHED","ARCHIVED","PENDING_DELETE"]
может отсутствовать
—
metadataobject
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120
    },
    "slug": {
      "type": "string",
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "parentId": {
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "type": "string"
    },
    "imageUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "icon": {
      "type": "string"
    },
    "sortOrder": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "visible": {
      "type": "boolean"
    },
    "status": {
      "type": "string",
      "enum": [
        "DRAFT",
        "PUBLISHED",
        "ARCHIVED",
        "PENDING_DELETE"
      ]
    },
    "metadata": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    }
  }
}
admin-commerce.collectionInput
ПолеТип / обязательностьОграничения
slugstring
обязательно
pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$"
namestring
обязательно
minLength: 2; maxLength: 160
descriptionstring / null
может отсутствовать
—
imageUrlstring / null
может отсутствовать
—
modeодно из: ["MANUAL","RULE_BASED"]
может отсутствовать
default: "MANUAL"
rulesobject / null
может отсутствовать
—
visibleboolean
может отсутствовать
default: true
sortOrderinteger
может отсутствовать
default: 0; minimum: -9007199254740991; maximum: 9007199254740991
startsAtstring / number / null
может отсутствовать
—
endsAtstring / number / null
может отсутствовать
—
productIdsмассив (string)
может отсутствовать
default: []; maxItems: 100
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string",
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "name": {
      "type": "string",
      "minLength": 2,
      "maxLength": 160
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "imageUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "mode": {
      "default": "MANUAL",
      "type": "string",
      "enum": [
        "MANUAL",
        "RULE_BASED"
      ]
    },
    "rules": {
      "anyOf": [
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        {
          "type": "null"
        }
      ]
    },
    "visible": {
      "default": true,
      "type": "boolean"
    },
    "sortOrder": {
      "default": 0,
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "startsAt": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "endsAt": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "productIds": {
      "default": [],
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    }
  },
  "required": [
    "slug",
    "name"
  ]
}
admin-commerce.collectionInputShape
ПолеТип / обязательностьОграничения
slugstring
обязательно
pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$"
namestring
обязательно
minLength: 2; maxLength: 160
descriptionstring / null
может отсутствовать
—
imageUrlstring / null
может отсутствовать
—
modeодно из: ["MANUAL","RULE_BASED"]
может отсутствовать
default: "MANUAL"
rulesobject / null
может отсутствовать
—
visibleboolean
может отсутствовать
default: true
sortOrderinteger
может отсутствовать
default: 0; minimum: -9007199254740991; maximum: 9007199254740991
startsAtstring / number / null
может отсутствовать
—
endsAtstring / number / null
может отсутствовать
—
productIdsмассив (string)
может отсутствовать
default: []; maxItems: 100
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string",
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "name": {
      "type": "string",
      "minLength": 2,
      "maxLength": 160
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "imageUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "mode": {
      "default": "MANUAL",
      "type": "string",
      "enum": [
        "MANUAL",
        "RULE_BASED"
      ]
    },
    "rules": {
      "anyOf": [
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        {
          "type": "null"
        }
      ]
    },
    "visible": {
      "default": true,
      "type": "boolean"
    },
    "sortOrder": {
      "default": 0,
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "startsAt": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "endsAt": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "productIds": {
      "default": [],
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    }
  },
  "required": [
    "slug",
    "name"
  ]
}
admin-commerce.collectionPatchInput
ПолеТип / обязательностьОграничения
slugstring
может отсутствовать
pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$"
namestring
может отсутствовать
minLength: 2; maxLength: 160
descriptionstring / null
может отсутствовать
—
imageUrlstring / null
может отсутствовать
—
modeодно из: ["MANUAL","RULE_BASED"]
может отсутствовать
—
rulesobject / null
может отсутствовать
—
visibleboolean
может отсутствовать
—
sortOrderinteger
может отсутствовать
minimum: -9007199254740991; maximum: 9007199254740991
startsAtstring / number / null
может отсутствовать
—
endsAtstring / number / null
может отсутствовать
—
productIdsмассив (string)
может отсутствовать
maxItems: 100
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string",
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "name": {
      "type": "string",
      "minLength": 2,
      "maxLength": 160
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "imageUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "mode": {
      "type": "string",
      "enum": [
        "MANUAL",
        "RULE_BASED"
      ]
    },
    "rules": {
      "anyOf": [
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        {
          "type": "null"
        }
      ]
    },
    "visible": {
      "type": "boolean"
    },
    "sortOrder": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "startsAt": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "endsAt": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "productIds": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    }
  }
}
admin-commerce.commerceMediaPurposeSchema

Тип: одно из: ["shop-product","profile-frame","shop-collection","shop-banner","shop-category","mystery-box"]. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "string",
  "enum": [
    "shop-product",
    "profile-frame",
    "shop-collection",
    "shop-banner",
    "shop-category",
    "mystery-box"
  ]
}
admin-commerce.entitlementStatusSchema

Тип: одно из: ["PENDING","ACTIVE","USED","EXPIRED","REVOKED","REFUNDED"]. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "string",
  "enum": [
    "PENDING",
    "ACTIVE",
    "USED",
    "EXPIRED",
    "REVOKED",
    "REFUNDED"
  ]
}
admin-commerce.inventoryAdjustmentSchema
ПолеТип / обязательностьОграничения
quantityinteger
обязательно
minimum: -9007199254740991; maximum: 9007199254740991
reasonstring
обязательно
minLength: 3; maxLength: 500
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "quantity": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "reason": {
      "type": "string",
      "minLength": 3,
      "maxLength": 500
    }
  },
  "required": [
    "quantity",
    "reason"
  ]
}
admin-commerce.mysteryBoxPlacementSchema
ПолеТип / обязательностьОграничения
placementодно из: ["PROMO","WEEKLY"] / null
обязательно
—
placementTitlestring
может отсутствовать
maxLength: 160
placementTextstring
может отсутствовать
maxLength: 300
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "placement": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "PROMO",
            "WEEKLY"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "placementTitle": {
      "type": "string",
      "maxLength": 160
    },
    "placementText": {
      "type": "string",
      "maxLength": 300
    }
  },
  "required": [
    "placement"
  ]
}
admin-commerce.orderFulfillmentSchema
ПолеТип / обязательностьОграничения
reasonstring
обязательно
minLength: 3; maxLength: 500
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "reason": {
      "type": "string",
      "minLength": 3,
      "maxLength": 500
    }
  },
  "required": [
    "reason"
  ]
}
admin-commerce.orderReadySchema
ПолеТип / обязательностьОграничения
reasonstring
обязательно
minLength: 3; maxLength: 500
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "reason": {
      "type": "string",
      "minLength": 3,
      "maxLength": 500
    }
  },
  "required": [
    "reason"
  ]
}
admin-commerce.orderRefundSchema
ПолеТип / обязательностьОграничения
amountinteger
может отсутствовать
maximum: 9007199254740991
reasonstring
обязательно
minLength: 3; maxLength: 500
internalCommentstring
может отсутствовать
maxLength: 1000
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "amount": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "reason": {
      "type": "string",
      "minLength": 3,
      "maxLength": 500
    },
    "internalComment": {
      "type": "string",
      "maxLength": 1000
    }
  },
  "required": [
    "reason"
  ]
}
admin-commerce.orderStatusSchema

Тип: одно из: ["PENDING","PAID","PROCESSING","READY_FOR_PICKUP","FULFILLED","CANCELLED","REFUNDED","PARTIALLY_REFUNDED","FAILED"]. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "string",
  "enum": [
    "PENDING",
    "PAID",
    "PROCESSING",
    "READY_FOR_PICKUP",
    "FULFILLED",
    "CANCELLED",
    "REFUNDED",
    "PARTIALLY_REFUNDED",
    "FAILED"
  ]
}
admin-commerce.prizeInput
ПолеТип / обязательностьОграничения
productIdstring
обязательно
minLength: 1
weightinteger
может отсутствовать
default: 1; minimum: 1; maximum: 10000
raritystring
может отсутствовать
default: "COMMON"; minLength: 2; maxLength: 40
stockinteger
может отсутствовать
maximum: 9007199254740991
globalLimitinteger
может отсутствовать
maximum: 9007199254740991
userLimitinteger
может отсутствовать
maximum: 9007199254740991
guaranteedboolean
может отсутствовать
default: false
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "productId": {
      "type": "string",
      "minLength": 1
    },
    "weight": {
      "default": 1,
      "type": "integer",
      "minimum": 1,
      "maximum": 10000
    },
    "rarity": {
      "default": "COMMON",
      "type": "string",
      "minLength": 2,
      "maxLength": 40
    },
    "stock": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "globalLimit": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "userLimit": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "guaranteed": {
      "default": false,
      "type": "boolean"
    }
  },
  "required": [
    "productId"
  ]
}
admin-commerce.productInput
ПолеТип / обязательностьОграничения
categoryIdstring
обязательно
minLength: 1
slugstring
обязательно
pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$"
namestring
обязательно
minLength: 2; maxLength: 160
shortDescriptionstring
обязательно
minLength: 2; maxLength: 300
descriptionstring
обязательно
minLength: 2; maxLength: 20000
imagesмассив (string)
может отсутствовать
default: []; maxItems: 12
galleryмассив (string)
может отсутствовать
—
typeодно из: ["DIGITAL_ITEM","PHYSICAL_PRODUCT","MERCH","PASS","SERVICE","RENTAL","GUEST_VISIT","LESSON","COURSE","ROUTE","SECRET_ROUTE","EVENT","TRIP","MYSTERY_BOX","SPECIAL_REWARD"]
обязательно
—
tagsмассив (string)
может отсутствовать
—
priceinteger
обязательно
minimum: 0; maximum: 9007199254740991
currencystring
может отсутствовать
default: "TENGUS"
oldPriceinteger
может отсутствовать
minimum: 0; maximum: 9007199254740991
discountPercentinteger
может отсутствовать
minimum: 0; maximum: 100
globalLimitinteger
может отсутствовать
maximum: 9007199254740991
stockTrackedboolean
может отсутствовать
default: false
availableFromstring / number
может отсутствовать
description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds."
availableUntilstring / number
может отсутствовать
description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds."
minLevelinteger
может отсутствовать
maximum: 9007199254740991
requiredLeagueIdstring
может отсутствовать
—
requiredAchievementsмассив (string)
может отсутствовать
—
purchaseLimitPerUserinteger
может отсутствовать
maximum: 9007199254740991
fulfillmentTypeодно из: ["AUTO","PICKUP","RECEPTION","QR_RECEPTION","VOUCHER","MANUAL"]
обязательно
—
statusодно из: ["DRAFT","SCHEDULED","ACTIVE","SOLD_OUT","EXPIRED","ARCHIVED"]
может отсутствовать
default: "DRAFT"
ctastring
может отсутствовать
maxLength: 80
sortOrderinteger
может отсутствовать
default: 0; minimum: -9007199254740991; maximum: 9007199254740991
metadataobject
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "categoryId": {
      "type": "string",
      "minLength": 1
    },
    "slug": {
      "type": "string",
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "name": {
      "type": "string",
      "minLength": 2,
      "maxLength": 160
    },
    "shortDescription": {
      "type": "string",
      "minLength": 2,
      "maxLength": 300
    },
    "description": {
      "type": "string",
      "minLength": 2,
      "maxLength": 20000
    },
    "images": {
      "default": [],
      "maxItems": 12,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 2000
      }
    },
    "gallery": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 2000
      }
    },
    "type": {
      "type": "string",
      "enum": [
        "DIGITAL_ITEM",
        "PHYSICAL_PRODUCT",
        "MERCH",
        "PASS",
        "SERVICE",
        "RENTAL",
        "GUEST_VISIT",
        "LESSON",
        "COURSE",
        "ROUTE",
        "SECRET_ROUTE",
        "EVENT",
        "TRIP",
        "MYSTERY_BOX",
        "SPECIAL_REWARD"
      ]
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "price": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "currency": {
      "default": "TENGUS",
      "type": "string"
    },
    "oldPrice": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "discountPercent": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100
    },
    "globalLimit": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "stockTracked": {
      "default": false,
      "type": "boolean"
    },
    "availableFrom": {
      "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "number"
        }
      ]
    },
    "availableUntil": {
      "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "number"
        }
      ]
    },
    "minLevel": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "requiredLeagueId": {
      "type": "string"
    },
    "requiredAchievements": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "purchaseLimitPerUser": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "fulfillmentType": {
      "type": "string",
      "enum": [
        "AUTO",
        "PICKUP",
        "RECEPTION",
        "QR_RECEPTION",
        "VOUCHER",
        "MANUAL"
      ]
    },
    "status": {
      "default": "DRAFT",
      "type": "string",
      "enum": [
        "DRAFT",
        "SCHEDULED",
        "ACTIVE",
        "SOLD_OUT",
        "EXPIRED",
        "ARCHIVED"
      ]
    },
    "cta": {
      "type": "string",
      "maxLength": 80
    },
    "sortOrder": {
      "default": 0,
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "metadata": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    }
  },
  "required": [
    "categoryId",
    "slug",
    "name",
    "shortDescription",
    "description",
    "type",
    "price",
    "fulfillmentType"
  ]
}
admin-commerce.productInputShape
ПолеТип / обязательностьОграничения
categoryIdstring
обязательно
minLength: 1
slugstring
обязательно
pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$"
namestring
обязательно
minLength: 2; maxLength: 160
shortDescriptionstring
обязательно
minLength: 2; maxLength: 300
descriptionstring
обязательно
minLength: 2; maxLength: 20000
imagesмассив (string)
может отсутствовать
default: []; maxItems: 12
galleryмассив (string)
может отсутствовать
—
typeодно из: ["DIGITAL_ITEM","PHYSICAL_PRODUCT","MERCH","PASS","SERVICE","RENTAL","GUEST_VISIT","LESSON","COURSE","ROUTE","SECRET_ROUTE","EVENT","TRIP","MYSTERY_BOX","SPECIAL_REWARD"]
обязательно
—
tagsмассив (string)
может отсутствовать
—
priceinteger
обязательно
minimum: 0; maximum: 9007199254740991
currencystring
может отсутствовать
default: "TENGUS"
oldPriceinteger
может отсутствовать
minimum: 0; maximum: 9007199254740991
discountPercentinteger
может отсутствовать
minimum: 0; maximum: 100
globalLimitinteger
может отсутствовать
maximum: 9007199254740991
stockTrackedboolean
может отсутствовать
default: false
availableFromstring / number
может отсутствовать
description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds."
availableUntilstring / number
может отсутствовать
description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds."
minLevelinteger
может отсутствовать
maximum: 9007199254740991
requiredLeagueIdstring
может отсутствовать
—
requiredAchievementsмассив (string)
может отсутствовать
—
purchaseLimitPerUserinteger
может отсутствовать
maximum: 9007199254740991
fulfillmentTypeодно из: ["AUTO","PICKUP","RECEPTION","QR_RECEPTION","VOUCHER","MANUAL"]
обязательно
—
statusодно из: ["DRAFT","SCHEDULED","ACTIVE","SOLD_OUT","EXPIRED","ARCHIVED"]
может отсутствовать
default: "DRAFT"
ctastring
может отсутствовать
maxLength: 80
sortOrderinteger
может отсутствовать
default: 0; minimum: -9007199254740991; maximum: 9007199254740991
metadataobject
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "categoryId": {
      "type": "string",
      "minLength": 1
    },
    "slug": {
      "type": "string",
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "name": {
      "type": "string",
      "minLength": 2,
      "maxLength": 160
    },
    "shortDescription": {
      "type": "string",
      "minLength": 2,
      "maxLength": 300
    },
    "description": {
      "type": "string",
      "minLength": 2,
      "maxLength": 20000
    },
    "images": {
      "default": [],
      "maxItems": 12,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 2000
      }
    },
    "gallery": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 2000
      }
    },
    "type": {
      "type": "string",
      "enum": [
        "DIGITAL_ITEM",
        "PHYSICAL_PRODUCT",
        "MERCH",
        "PASS",
        "SERVICE",
        "RENTAL",
        "GUEST_VISIT",
        "LESSON",
        "COURSE",
        "ROUTE",
        "SECRET_ROUTE",
        "EVENT",
        "TRIP",
        "MYSTERY_BOX",
        "SPECIAL_REWARD"
      ]
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "price": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "currency": {
      "default": "TENGUS",
      "type": "string"
    },
    "oldPrice": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "discountPercent": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100
    },
    "globalLimit": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "stockTracked": {
      "default": false,
      "type": "boolean"
    },
    "availableFrom": {
      "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "number"
        }
      ]
    },
    "availableUntil": {
      "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "number"
        }
      ]
    },
    "minLevel": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "requiredLeagueId": {
      "type": "string"
    },
    "requiredAchievements": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "purchaseLimitPerUser": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "fulfillmentType": {
      "type": "string",
      "enum": [
        "AUTO",
        "PICKUP",
        "RECEPTION",
        "QR_RECEPTION",
        "VOUCHER",
        "MANUAL"
      ]
    },
    "status": {
      "default": "DRAFT",
      "type": "string",
      "enum": [
        "DRAFT",
        "SCHEDULED",
        "ACTIVE",
        "SOLD_OUT",
        "EXPIRED",
        "ARCHIVED"
      ]
    },
    "cta": {
      "type": "string",
      "maxLength": 80
    },
    "sortOrder": {
      "default": 0,
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "metadata": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    }
  },
  "required": [
    "categoryId",
    "slug",
    "name",
    "shortDescription",
    "description",
    "type",
    "price",
    "fulfillmentType"
  ]
}
admin-commerce.productPatchInput
ПолеТип / обязательностьОграничения
categoryIdstring
может отсутствовать
minLength: 1
slugstring
может отсутствовать
pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$"
namestring
может отсутствовать
minLength: 2; maxLength: 160
shortDescriptionstring
может отсутствовать
minLength: 2; maxLength: 300
descriptionstring
может отсутствовать
minLength: 2; maxLength: 20000
imagesмассив (string)
может отсутствовать
maxItems: 12
galleryмассив (string)
может отсутствовать
—
typeодно из: ["DIGITAL_ITEM","PHYSICAL_PRODUCT","MERCH","PASS","SERVICE","RENTAL","GUEST_VISIT","LESSON","COURSE","ROUTE","SECRET_ROUTE","EVENT","TRIP","MYSTERY_BOX","SPECIAL_REWARD"]
может отсутствовать
—
tagsмассив (string)
может отсутствовать
—
priceinteger
может отсутствовать
minimum: 0; maximum: 9007199254740991
currencystring
может отсутствовать
—
oldPriceinteger
может отсутствовать
minimum: 0; maximum: 9007199254740991
discountPercentinteger
может отсутствовать
minimum: 0; maximum: 100
globalLimitinteger
может отсутствовать
maximum: 9007199254740991
stockTrackedboolean
может отсутствовать
—
availableFromstring / number
может отсутствовать
description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds."
availableUntilstring / number
может отсутствовать
description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds."
minLevelinteger
может отсутствовать
maximum: 9007199254740991
requiredLeagueIdstring
может отсутствовать
—
requiredAchievementsмассив (string)
может отсутствовать
—
purchaseLimitPerUserinteger
может отсутствовать
maximum: 9007199254740991
fulfillmentTypeодно из: ["AUTO","PICKUP","RECEPTION","QR_RECEPTION","VOUCHER","MANUAL"]
может отсутствовать
—
statusодно из: ["DRAFT","SCHEDULED","ACTIVE","SOLD_OUT","EXPIRED","ARCHIVED"]
может отсутствовать
—
ctastring
может отсутствовать
maxLength: 80
sortOrderinteger
может отсутствовать
minimum: -9007199254740991; maximum: 9007199254740991
metadataobject
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "categoryId": {
      "type": "string",
      "minLength": 1
    },
    "slug": {
      "type": "string",
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "name": {
      "type": "string",
      "minLength": 2,
      "maxLength": 160
    },
    "shortDescription": {
      "type": "string",
      "minLength": 2,
      "maxLength": 300
    },
    "description": {
      "type": "string",
      "minLength": 2,
      "maxLength": 20000
    },
    "images": {
      "maxItems": 12,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 2000
      }
    },
    "gallery": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 2000
      }
    },
    "type": {
      "type": "string",
      "enum": [
        "DIGITAL_ITEM",
        "PHYSICAL_PRODUCT",
        "MERCH",
        "PASS",
        "SERVICE",
        "RENTAL",
        "GUEST_VISIT",
        "LESSON",
        "COURSE",
        "ROUTE",
        "SECRET_ROUTE",
        "EVENT",
        "TRIP",
        "MYSTERY_BOX",
        "SPECIAL_REWARD"
      ]
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "price": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "currency": {
      "type": "string"
    },
    "oldPrice": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "discountPercent": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100
    },
    "globalLimit": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "stockTracked": {
      "type": "boolean"
    },
    "availableFrom": {
      "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "number"
        }
      ]
    },
    "availableUntil": {
      "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "number"
        }
      ]
    },
    "minLevel": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "requiredLeagueId": {
      "type": "string"
    },
    "requiredAchievements": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "purchaseLimitPerUser": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "fulfillmentType": {
      "type": "string",
      "enum": [
        "AUTO",
        "PICKUP",
        "RECEPTION",
        "QR_RECEPTION",
        "VOUCHER",
        "MANUAL"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "DRAFT",
        "SCHEDULED",
        "ACTIVE",
        "SOLD_OUT",
        "EXPIRED",
        "ARCHIVED"
      ]
    },
    "cta": {
      "type": "string",
      "maxLength": 80
    },
    "sortOrder": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "metadata": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    }
  }
}
admin-commerce.promoCodeInput
ПолеТип / обязательностьОграничения
codestring
обязательно
minLength: 3; maxLength: 40
typeодно из: ["PERCENT","FIXED"]
обязательно
—
valueinteger
обязательно
maximum: 9007199254740991
validFromstring / number
обязательно
description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds."
validUntilstring / number
обязательно
description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds."
maxUsesinteger / null
может отсутствовать
—
maxUsesPerUserinteger
может отсутствовать
default: 1; maximum: 9007199254740991
applicableProductsмассив (string)
может отсутствовать
default: []
applicableCategoriesмассив (string)
может отсутствовать
default: []
userSegmentsмассив (string)
может отсутствовать
default: []
activeboolean
может отсутствовать
default: true
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "minLength": 3,
      "maxLength": 40
    },
    "type": {
      "type": "string",
      "enum": [
        "PERCENT",
        "FIXED"
      ]
    },
    "value": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "validFrom": {
      "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "number"
        }
      ]
    },
    "validUntil": {
      "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "number"
        }
      ]
    },
    "maxUses": {
      "anyOf": [
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "maxUsesPerUser": {
      "default": 1,
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "applicableProducts": {
      "default": [],
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "applicableCategories": {
      "default": [],
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "userSegments": {
      "default": [],
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "active": {
      "default": true,
      "type": "boolean"
    }
  },
  "required": [
    "code",
    "type",
    "value",
    "validFrom",
    "validUntil"
  ]
}
admin-commerce.promoCodeInputShape
ПолеТип / обязательностьОграничения
codestring
обязательно
minLength: 3; maxLength: 40
typeодно из: ["PERCENT","FIXED"]
обязательно
—
valueinteger
обязательно
maximum: 9007199254740991
validFromstring / number
обязательно
description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds."
validUntilstring / number
обязательно
description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds."
maxUsesinteger / null
может отсутствовать
—
maxUsesPerUserinteger
может отсутствовать
default: 1; maximum: 9007199254740991
applicableProductsмассив (string)
может отсутствовать
default: []
applicableCategoriesмассив (string)
может отсутствовать
default: []
userSegmentsмассив (string)
может отсутствовать
default: []
activeboolean
может отсутствовать
default: true
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "minLength": 3,
      "maxLength": 40
    },
    "type": {
      "type": "string",
      "enum": [
        "PERCENT",
        "FIXED"
      ]
    },
    "value": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "validFrom": {
      "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "number"
        }
      ]
    },
    "validUntil": {
      "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "number"
        }
      ]
    },
    "maxUses": {
      "anyOf": [
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "maxUsesPerUser": {
      "default": 1,
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "applicableProducts": {
      "default": [],
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "applicableCategories": {
      "default": [],
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "userSegments": {
      "default": [],
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "active": {
      "default": true,
      "type": "boolean"
    }
  },
  "required": [
    "code",
    "type",
    "value",
    "validFrom",
    "validUntil"
  ]
}
admin-commerce.promoCodePatchInput
ПолеТип / обязательностьОграничения
codestring
может отсутствовать
minLength: 3; maxLength: 40
typeодно из: ["PERCENT","FIXED"]
может отсутствовать
—
valueinteger
может отсутствовать
maximum: 9007199254740991
validFromstring / number
может отсутствовать
description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds."
validUntilstring / number
может отсутствовать
description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds."
maxUsesinteger / null
может отсутствовать
—
maxUsesPerUserinteger
может отсутствовать
maximum: 9007199254740991
applicableProductsмассив (string)
может отсутствовать
—
applicableCategoriesмассив (string)
может отсутствовать
—
userSegmentsмассив (string)
может отсутствовать
—
activeboolean
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "minLength": 3,
      "maxLength": 40
    },
    "type": {
      "type": "string",
      "enum": [
        "PERCENT",
        "FIXED"
      ]
    },
    "value": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "validFrom": {
      "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "number"
        }
      ]
    },
    "validUntil": {
      "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "number"
        }
      ]
    },
    "maxUses": {
      "anyOf": [
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "maxUsesPerUser": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "applicableProducts": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "applicableCategories": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "userSegments": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "active": {
      "type": "boolean"
    }
  }
}
admin-commerce.promotionInput
ПолеТип / обязательностьОграничения
namestring
обязательно
minLength: 2; maxLength: 160
typeодно из: ["PERCENT","FIXED"]
обязательно
—
valueinteger
обязательно
maximum: 9007199254740991
conditionsobject / null
может отсутствовать
—
validFromstring / number
обязательно
description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds."
validUntilstring / number
обязательно
description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds."
usageLimitinteger / null
может отсутствовать
—
activeboolean
может отсутствовать
default: true
productIdsмассив (string)
может отсутствовать
default: []; maxItems: 100
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 2,
      "maxLength": 160
    },
    "type": {
      "type": "string",
      "enum": [
        "PERCENT",
        "FIXED"
      ]
    },
    "value": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "conditions": {
      "anyOf": [
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        {
          "type": "null"
        }
      ]
    },
    "validFrom": {
      "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "number"
        }
      ]
    },
    "validUntil": {
      "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "number"
        }
      ]
    },
    "usageLimit": {
      "anyOf": [
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "active": {
      "default": true,
      "type": "boolean"
    },
    "productIds": {
      "default": [],
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    }
  },
  "required": [
    "name",
    "type",
    "value",
    "validFrom",
    "validUntil"
  ]
}
admin-commerce.promotionInputShape
ПолеТип / обязательностьОграничения
namestring
обязательно
minLength: 2; maxLength: 160
typeодно из: ["PERCENT","FIXED"]
обязательно
—
valueinteger
обязательно
maximum: 9007199254740991
conditionsobject / null
может отсутствовать
—
validFromstring / number
обязательно
description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds."
validUntilstring / number
обязательно
description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds."
usageLimitinteger / null
может отсутствовать
—
activeboolean
может отсутствовать
default: true
productIdsмассив (string)
может отсутствовать
default: []; maxItems: 100
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 2,
      "maxLength": 160
    },
    "type": {
      "type": "string",
      "enum": [
        "PERCENT",
        "FIXED"
      ]
    },
    "value": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "conditions": {
      "anyOf": [
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        {
          "type": "null"
        }
      ]
    },
    "validFrom": {
      "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "number"
        }
      ]
    },
    "validUntil": {
      "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "number"
        }
      ]
    },
    "usageLimit": {
      "anyOf": [
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "active": {
      "default": true,
      "type": "boolean"
    },
    "productIds": {
      "default": [],
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    }
  },
  "required": [
    "name",
    "type",
    "value",
    "validFrom",
    "validUntil"
  ]
}
admin-commerce.promotionPatchInput
ПолеТип / обязательностьОграничения
namestring
может отсутствовать
minLength: 2; maxLength: 160
typeодно из: ["PERCENT","FIXED"]
может отсутствовать
—
valueinteger
может отсутствовать
maximum: 9007199254740991
conditionsobject / null
может отсутствовать
—
validFromstring / number
может отсутствовать
description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds."
validUntilstring / number
может отсутствовать
description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds."
usageLimitinteger / null
может отсутствовать
—
activeboolean
может отсутствовать
—
productIdsмассив (string)
может отсутствовать
maxItems: 100
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 2,
      "maxLength": 160
    },
    "type": {
      "type": "string",
      "enum": [
        "PERCENT",
        "FIXED"
      ]
    },
    "value": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "conditions": {
      "anyOf": [
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        {
          "type": "null"
        }
      ]
    },
    "validFrom": {
      "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "number"
        }
      ]
    },
    "validUntil": {
      "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "number"
        }
      ]
    },
    "usageLimit": {
      "anyOf": [
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "active": {
      "type": "boolean"
    },
    "productIds": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    }
  }
}
admin-commerce.storefrontPlacementKindSchema

Тип: одно из: ["PROMO","WEEKLY"]. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "string",
  "enum": [
    "PROMO",
    "WEEKLY"
  ]
}
admin-commerce.storefrontPlacementSchema
ПолеТип / обязательностьОграничения
entityTypeодно из: ["PRODUCT","MYSTERY_BOX"]
обязательно
—
entityIdstring
обязательно
minLength: 1
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "entityType": {
      "type": "string",
      "enum": [
        "PRODUCT",
        "MYSTERY_BOX"
      ]
    },
    "entityId": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "entityType",
    "entityId"
  ]
}
admin-commerce.walletAdjustmentSchema
ПолеТип / обязательностьОграничения
amountinteger
обязательно
minimum: -9007199254740991; maximum: 9007199254740991
reasonstring
обязательно
minLength: 3; maxLength: 500
internalCommentstring
может отсутствовать
maxLength: 1000
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "amount": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "reason": {
      "type": "string",
      "minLength": 3,
      "maxLength": 500
    },
    "internalComment": {
      "type": "string",
      "maxLength": 1000
    }
  },
  "required": [
    "amount",
    "reason"
  ]
}
admin-commerce.walletTransactionTypeSchema

Тип: одно из: ["EARN","PURCHASE","REFUND","REWARD","ADMIN_ADJUSTMENT","ACHIEVEMENT_REWARD","MISSION_REWARD","PROMO","COMPENSATION","REVERSAL","EXPIRATION"]. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "string",
  "enum": [
    "EARN",
    "PURCHASE",
    "REFUND",
    "REWARD",
    "ADMIN_ADJUSTMENT",
    "ACHIEVEMENT_REWARD",
    "MISSION_REWARD",
    "PROMO",
    "COMPENSATION",
    "REVERSAL",
    "EXPIRATION"
  ]
}
admin.algorithmSettingsPatchSchema
ПолеТип / обязательностьОграничения
pointsMultipliersobject
может отсутствовать
—
powerWeightsobject
может отсутствовать
—
recencyDaysinteger
может отсутствовать
minimum: 1; maximum: 365
recommendationWeightsobject
может отсутствовать
—
popularityWeightsobject
может отсутствовать
—
minimumAttemptDurationMsinteger
может отсутствовать
minimum: 0; maximum: 600000
seasonDurationDaysinteger
может отсутствовать
minimum: 1; maximum: 90
streakSettingsobject
может отсутствовать
—
followerRankSettingsobject
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "pointsMultipliers": {
      "type": "object",
      "properties": {
        "attempts": {
          "type": "array",
          "items": {
            "type": "number"
          }
        },
        "speedMin": {
          "type": "number"
        },
        "speedMax": {
          "type": "number"
        },
        "routeColorPoints": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100000
          }
        }
      },
      "additionalProperties": {}
    },
    "powerWeights": {
      "type": "object",
      "properties": {
        "model": {
          "type": "string",
          "const": "COLOR_ZONE_V2"
        },
        "floors": {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "enum": [
              "orange",
              "white",
              "yellow",
              "green",
              "blue",
              "red",
              "black"
            ]
          },
          "additionalProperties": {
            "type": "number",
            "minimum": 1,
            "maximum": 9,
            "multipleOf": 0.01
          },
          "required": [
            "orange",
            "white",
            "yellow",
            "green",
            "blue",
            "red",
            "black"
          ]
        },
        "width": {
          "type": "number",
          "minimum": 0.1,
          "maximum": 2,
          "multipleOf": 0.01
        },
        "climbFactor": {
          "type": "number",
          "minimum": 0.01,
          "maximum": 1,
          "multipleOf": 0.01
        },
        "easierFactor": {
          "type": "number",
          "minimum": 0.01,
          "maximum": 1,
          "multipleOf": 0.01
        },
        "jumpFraction": {
          "type": "number",
          "minimum": 0.01,
          "maximum": 0.99,
          "multipleOf": 0.01
        },
        "decayRate": {
          "type": "number",
          "minimum": 0,
          "maximum": 1,
          "multipleOf": 0.01
        },
        "decayHour": {
          "type": "integer",
          "minimum": 0,
          "maximum": 23
        },
        "decayTimezone": {
          "type": "string",
          "enum": [
            "Europe/Moscow",
            "Asia/Yekaterinburg",
            "Asia/Novosibirsk",
            "Asia/Krasnoyarsk",
            "Asia/Irkutsk",
            "Asia/Vladivostok"
          ]
        }
      },
      "required": [
        "model",
        "floors",
        "width",
        "climbFactor",
        "easierFactor",
        "jumpFraction",
        "decayRate",
        "decayHour",
        "decayTimezone"
      ],
      "additionalProperties": false
    },
    "recencyDays": {
      "type": "integer",
      "minimum": 1,
      "maximum": 365
    },
    "recommendationWeights": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "number"
      }
    },
    "popularityWeights": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "number"
      }
    },
    "minimumAttemptDurationMs": {
      "type": "integer",
      "minimum": 0,
      "maximum": 600000
    },
    "seasonDurationDays": {
      "type": "integer",
      "minimum": 1,
      "maximum": 90
    },
    "streakSettings": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "followerRankSettings": {
      "type": "object",
      "properties": {
        "followersPerLevel": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1000
        },
        "baseRewardPoints": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100000
        },
        "rewardStepPoints": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100000
        },
        "maxLevel": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        }
      },
      "required": [
        "followersPerLevel",
        "baseRewardPoints",
        "rewardStepPoints",
        "maxLevel"
      ]
    }
  }
}
admin.ruleSimulationSchema
ПолеТип / обязательностьОграничения
subjectTypeодно из: ["CHALLENGE","ACHIEVEMENT"]
обязательно
—
definitionobject
обязательно
—
valuesobject
обязательно
—
periodStartsAtstring
может отсутствовать
format: "date-time"; pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
periodEndsAtstring
может отсутствовать
format: "date-time"; pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
timezonestring
может отсутствовать
default: "Europe/Moscow"; minLength: 1; maxLength: 100
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "subjectType": {
      "type": "string",
      "enum": [
        "CHALLENGE",
        "ACHIEVEMENT"
      ]
    },
    "definition": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "values": {
      "type": "object",
      "properties": {
        "routesCompleted": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10000
        },
        "uniqueRoutes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10000
        },
        "failedAttempts": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10000
        },
        "points": {
          "type": "integer",
          "minimum": -1000000,
          "maximum": 1000000
        },
        "activeDays": {
          "type": "integer",
          "minimum": 0,
          "maximum": 3650
        },
        "completedChallenges": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10000
        },
        "earnedAchievements": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10000
        },
        "streakWeeks": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10000
        },
        "userLevel": {
          "type": "integer",
          "minimum": 1,
          "maximum": 10000
        },
        "userPower": {
          "type": "number",
          "minimum": 0,
          "maximum": 100
        },
        "followingCount": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000
        },
        "followerCount": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000
        },
        "leagueRank": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100000
        },
        "firstAscents": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10000
        },
        "availableRoutes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10000
        },
        "routeColor": {
          "type": "string",
          "enum": [
            "#ff8a00",
            "#f4f4f2",
            "#ffca28",
            "#39d353",
            "#3aa7e8",
            "#ef4444",
            "#111111"
          ]
        },
        "gymId": {
          "type": "string",
          "maxLength": 200
        },
        "gymName": {
          "type": "string",
          "maxLength": 200
        },
        "zoneId": {
          "type": "string",
          "maxLength": 200
        },
        "eventDate": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      }
    },
    "periodStartsAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "periodEndsAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "timezone": {
      "default": "Europe/Moscow",
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    }
  },
  "required": [
    "subjectType",
    "definition",
    "values"
  ]
}
admin.ruleTemplateCreateSchema
ПолеТип / обязательностьОграничения
namestring
обязательно
minLength: 1; maxLength: 120
descriptionstring
обязательно
maxLength: 1000
subjectTypeодно из: ["CHALLENGE","ACHIEVEMENT"] / null
может отсутствовать
—
networkIdstring / null
может отсутствовать
—
gymIdstring / null
может отсутствовать
—
definitionobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "description": {
      "type": "string",
      "maxLength": 1000
    },
    "subjectType": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "CHALLENGE",
            "ACHIEVEMENT"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "networkId": {
      "type": [
        "string",
        "null"
      ]
    },
    "gymId": {
      "type": [
        "string",
        "null"
      ]
    },
    "definition": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    }
  },
  "required": [
    "name",
    "description",
    "definition"
  ]
}
admin.ruleTemplatePatchSchema
ПолеТип / обязательностьОграничения
namestring
может отсутствовать
minLength: 1; maxLength: 120
descriptionstring
может отсутствовать
maxLength: 1000
definitionobject
может отсутствовать
—
expectedRevisioninteger
обязательно
maximum: 9007199254740991
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "description": {
      "type": "string",
      "maxLength": 1000
    },
    "definition": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "expectedRevision": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "expectedRevision"
  ]
}
admin.ruleValidationSchema
ПолеТип / обязательностьОграничения
subjectTypeодно из: ["CHALLENGE","ACHIEVEMENT"]
обязательно
—
definitionobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "subjectType": {
      "type": "string",
      "enum": [
        "CHALLENGE",
        "ACHIEVEMENT"
      ]
    },
    "definition": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    }
  },
  "required": [
    "subjectType",
    "definition"
  ]
}
analytics-dashboard.analyticsFiltersSchema
ПолеТип / обязательностьОграничения
daysinteger
может отсутствовать
default: 7; minimum: -9007199254740991; maximum: 9007199254740991
deviceодно из: ["ALL","MOBILE","DESKTOP","TABLET","UNKNOWN"]
может отсутствовать
default: "ALL"
segmentодно из: ["ALL","NEW","CRM_LINKED"]
может отсутствовать
default: "ALL"
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "days": {
      "default": 7,
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "device": {
      "default": "ALL",
      "type": "string",
      "enum": [
        "ALL",
        "MOBILE",
        "DESKTOP",
        "TABLET",
        "UNKNOWN"
      ]
    },
    "segment": {
      "default": "ALL",
      "type": "string",
      "enum": [
        "ALL",
        "NEW",
        "CRM_LINKED"
      ]
    }
  }
}
analytics-dashboard.analyticsReviewSchema
ПолеТип / обязательностьОграничения
userIdstring
обязательно
minLength: 1
fromstring
обязательно
format: "date-time"; pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
tostring
обязательно
format: "date-time"; pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
countinteger
обязательно
minimum: 4; maximum: 10000
statusодно из: ["PENDING","CONFIRMED","DISMISSED"]
обязательно
—
commentstring
может отсутствовать
default: ""; maxLength: 1000
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "userId": {
      "type": "string",
      "minLength": 1
    },
    "from": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    },
    "to": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    },
    "count": {
      "type": "integer",
      "minimum": 4,
      "maximum": 10000
    },
    "status": {
      "type": "string",
      "enum": [
        "PENDING",
        "CONFIRMED",
        "DISMISSED"
      ]
    },
    "comment": {
      "default": "",
      "type": "string",
      "maxLength": 1000
    }
  },
  "required": [
    "userId",
    "from",
    "to",
    "count",
    "status"
  ]
}
ascents.AscentBatchSchema
ПолеТип / обязательностьОграничения
submissionIdstring
обязательно
format: "uuid"; pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
zoneIdstring
обязательно
minLength: 1
selectionsмассив (object)
обязательно
minItems: 1; maxItems: 20
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "submissionId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "zoneId": {
      "type": "string",
      "minLength": 1
    },
    "selections": {
      "minItems": 1,
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "routeId": {
            "type": "string",
            "minLength": 1
          },
          "result": {
            "type": "string",
            "enum": [
              "FLASH",
              "TOP"
            ]
          }
        },
        "required": [
          "routeId",
          "result"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "submissionId",
    "zoneId",
    "selections"
  ],
  "additionalProperties": false
}
attempts.attemptCompletionSchema
ПолеТип / обязательностьОграничения
resultодно из: ["SUCCESS","FAILED"]
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "result": {
      "type": "string",
      "enum": [
        "SUCCESS",
        "FAILED"
      ]
    }
  },
  "required": [
    "result"
  ]
}
attempts.attemptStartSchema
ПолеТип / обязательностьОграничения
routeIdstring
обязательно
minLength: 1
manualResultодно из: ["FLASH","TOP"]
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "routeId": {
      "type": "string",
      "minLength": 1
    },
    "manualResult": {
      "type": "string",
      "enum": [
        "FLASH",
        "TOP"
      ]
    }
  },
  "required": [
    "routeId"
  ]
}
attempts.attemptStatusSchema

Тип: одно из: ["CREATED","RUNNING","SUCCESS","FAILED","CANCELLED","SUSPICIOUS"]. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "string",
  "enum": [
    "CREATED",
    "RUNNING",
    "SUCCESS",
    "FAILED",
    "CANCELLED",
    "SUSPICIOUS"
  ]
}
auth.credentialsSchema
ПолеТип / обязательностьОграничения
usernamestring
обязательно
minLength: 3; maxLength: 40
currentPasswordstring
может отсутствовать
maxLength: 128
newPasswordstring
обязательно
minLength: 8; maxLength: 128
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "username": {
      "type": "string",
      "minLength": 3,
      "maxLength": 40
    },
    "currentPassword": {
      "type": "string",
      "maxLength": 128
    },
    "newPassword": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128
    }
  },
  "required": [
    "username",
    "newPassword"
  ]
}
auth.developmentLoginSchema
ПолеТип / обязательностьОграничения
usernamestring
обязательно
minLength: 1; maxLength: 80
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "username": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    }
  },
  "required": [
    "username"
  ]
}
auth.forgotPasswordSchema
ПолеТип / обязательностьОграничения
emailstring
обязательно
minLength: 1; maxLength: 254
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "minLength": 1,
      "maxLength": 254
    }
  },
  "required": [
    "email"
  ]
}
auth.loginSchema
ПолеТип / обязательностьОграничения
emailstring
может отсутствовать
minLength: 1; maxLength: 254
identifierstring
может отсутствовать
minLength: 1; maxLength: 254
usernamestring
может отсутствовать
minLength: 1; maxLength: 254
passwordstring
обязательно
minLength: 1; maxLength: 128
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "minLength": 1,
      "maxLength": 254
    },
    "identifier": {
      "type": "string",
      "minLength": 1,
      "maxLength": 254
    },
    "username": {
      "type": "string",
      "minLength": 1,
      "maxLength": 254
    },
    "password": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    }
  },
  "required": [
    "password"
  ]
}
auth.referralVisitSchema
ПолеТип / обязательностьОграничения
codestring
обязательно
pattern: "^[A-Za-z0-9_-]{1,80}$"
visitorIdstring
обязательно
format: "uuid"; pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{1,80}$"
    },
    "visitorId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "code",
    "visitorId"
  ],
  "additionalProperties": false
}
auth.registrationSchema
ПолеТип / обязательностьОграничения
usernamestring
может отсутствовать
minLength: 3; maxLength: 40
emailstring
обязательно
maxLength: 254
passwordstring
обязательно
minLength: 8; maxLength: 128
displayNamestring
обязательно
minLength: 1; maxLength: 11; pattern: "^[^\\s#\\p{Cc}\\p{Cf}]+$"
privacyConsentAcceptedtrue
обязательно
—
privacyPolicyVersionstring
может отсутствовать
minLength: 1; maxLength: 100
analyticsConsentboolean
может отсутствовать
default: false
locationConsentboolean
может отсутствовать
default: false
marketingConsentboolean
может отсутствовать
default: false
gymIdstring / null
может отсутствовать
—
phonestring
может отсутствовать
minLength: 10; maxLength: 40
referralCodestring
может отсутствовать
pattern: "^[A-Za-z0-9_-]{1,80}$"
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "username": {
      "type": "string",
      "minLength": 3,
      "maxLength": 40
    },
    "email": {
      "type": "string",
      "maxLength": 254
    },
    "password": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128
    },
    "displayName": {
      "type": "string",
      "minLength": 1,
      "maxLength": 11,
      "pattern": "^[^\\s#\\p{Cc}\\p{Cf}]+$"
    },
    "privacyConsentAccepted": {
      "type": "boolean",
      "const": true
    },
    "privacyPolicyVersion": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "analyticsConsent": {
      "default": false,
      "type": "boolean"
    },
    "locationConsent": {
      "default": false,
      "type": "boolean"
    },
    "marketingConsent": {
      "default": false,
      "type": "boolean"
    },
    "gymId": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "null"
        }
      ]
    },
    "phone": {
      "type": "string",
      "minLength": 10,
      "maxLength": 40
    },
    "referralCode": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{1,80}$"
    }
  },
  "required": [
    "email",
    "password",
    "displayName",
    "privacyConsentAccepted"
  ]
}
auth.resetPasswordSchema
ПолеТип / обязательностьОграничения
resetTokenstring
обязательно
minLength: 47; maxLength: 100
passwordstring
обязательно
minLength: 8; maxLength: 128
passwordConfirmationstring
обязательно
minLength: 8; maxLength: 128
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "resetToken": {
      "type": "string",
      "minLength": 47,
      "maxLength": 100
    },
    "password": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128
    },
    "passwordConfirmation": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128
    }
  },
  "required": [
    "resetToken",
    "password",
    "passwordConfirmation"
  ]
}
auth.telegramLoginSchema
ПолеТип / обязательностьОграничения
initDatastring
обязательно
minLength: 1; maxLength: 16000
referralCodestring
может отсутствовать
pattern: "^[A-Za-z0-9_-]{1,80}$"
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "initData": {
      "type": "string",
      "minLength": 1,
      "maxLength": 16000
    },
    "referralCode": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{1,80}$"
    }
  },
  "required": [
    "initData"
  ]
}
auth.verifyPasswordResetSchema
ПолеТип / обязательностьОграничения
emailstring
обязательно
minLength: 1; maxLength: 254
codestring
обязательно
minLength: 1; maxLength: 32
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "minLength": 1,
      "maxLength": 254
    },
    "code": {
      "type": "string",
      "minLength": 1,
      "maxLength": 32
    }
  },
  "required": [
    "email",
    "code"
  ]
}
challenges.challengeCreateSchema
ПолеТип / обязательностьОграничения
networkIdstring / null
может отсутствовать
—
gymIdstring / null
может отсутствовать
—
titlestring
обязательно
minLength: 1; maxLength: 180
descriptionstring
обязательно
maxLength: 5000
startsAtstring / number
обязательно
description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds."
endsAtstring / number
обязательно
description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds."
trophyIdstring / null
может отсутствовать
—
pointsRewardinteger
может отсутствовать
default: 0; minimum: 0; maximum: 9007199254740991
minLevelinteger
может отсутствовать
default: 1; minimum: 1; maximum: 99
minPowernumber / null
может отсутствовать
—
maxPowernumber / null
может отсутствовать
—
rewardIconstring
может отсутствовать
default: "trophy"; minLength: 1; maxLength: 100
rewardColorstring
может отсутствовать
default: "#c60814"; pattern: "^#[0-9a-fA-F]{6}$"
scopeодно из: ["NETWORK","GYM"]
обязательно
—
rulesobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "networkId": {
      "type": [
        "string",
        "null"
      ]
    },
    "gymId": {
      "type": [
        "string",
        "null"
      ]
    },
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 180
    },
    "description": {
      "type": "string",
      "maxLength": 5000
    },
    "startsAt": {
      "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "number"
        }
      ]
    },
    "endsAt": {
      "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "number"
        }
      ]
    },
    "trophyId": {
      "type": [
        "string",
        "null"
      ]
    },
    "pointsReward": {
      "default": 0,
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "minLevel": {
      "default": 1,
      "type": "integer",
      "minimum": 1,
      "maximum": 99
    },
    "minPower": {
      "anyOf": [
        {
          "type": "number",
          "minimum": 0,
          "maximum": 1000
        },
        {
          "type": "null"
        }
      ]
    },
    "maxPower": {
      "anyOf": [
        {
          "type": "number",
          "minimum": 0,
          "maximum": 1000
        },
        {
          "type": "null"
        }
      ]
    },
    "rewardIcon": {
      "default": "trophy",
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "rewardColor": {
      "default": "#c60814",
      "type": "string",
      "pattern": "^#[0-9a-fA-F]{6}$"
    },
    "scope": {
      "type": "string",
      "enum": [
        "NETWORK",
        "GYM"
      ]
    },
    "rules": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    }
  },
  "required": [
    "title",
    "description",
    "startsAt",
    "endsAt",
    "scope",
    "rules"
  ]
}
challenges.challengeScope

Тип: одно из: ["NETWORK","GYM"]. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "string",
  "enum": [
    "NETWORK",
    "GYM"
  ]
}
challenges.challengeUpdateSchema
ПолеТип / обязательностьОграничения
networkIdstring / null
может отсутствовать
—
gymIdstring / null
может отсутствовать
—
titlestring
может отсутствовать
minLength: 1; maxLength: 180
descriptionstring
может отсутствовать
maxLength: 5000
startsAtstring / number
может отсутствовать
description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds."
endsAtstring / number
может отсутствовать
description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds."
trophyIdstring / null
может отсутствовать
—
pointsRewardinteger
может отсутствовать
minimum: 0; maximum: 9007199254740991
minLevelinteger
может отсутствовать
minimum: 1; maximum: 99
minPowernumber / null
может отсутствовать
—
maxPowernumber / null
может отсутствовать
—
rewardIconstring
может отсутствовать
minLength: 1; maxLength: 100
rewardColorstring
может отсутствовать
pattern: "^#[0-9a-fA-F]{6}$"
scopeодно из: ["NETWORK","GYM"]
может отсутствовать
—
statusодно из: ["DRAFT","SCHEDULED","ACTIVE","FINISHED","CANCELLED"]
может отсутствовать
—
rulesobject
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "networkId": {
      "type": [
        "string",
        "null"
      ]
    },
    "gymId": {
      "type": [
        "string",
        "null"
      ]
    },
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 180
    },
    "description": {
      "type": "string",
      "maxLength": 5000
    },
    "startsAt": {
      "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "number"
        }
      ]
    },
    "endsAt": {
      "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "number"
        }
      ]
    },
    "trophyId": {
      "type": [
        "string",
        "null"
      ]
    },
    "pointsReward": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "minLevel": {
      "type": "integer",
      "minimum": 1,
      "maximum": 99
    },
    "minPower": {
      "anyOf": [
        {
          "type": "number",
          "minimum": 0,
          "maximum": 1000
        },
        {
          "type": "null"
        }
      ]
    },
    "maxPower": {
      "anyOf": [
        {
          "type": "number",
          "minimum": 0,
          "maximum": 1000
        },
        {
          "type": "null"
        }
      ]
    },
    "rewardIcon": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "rewardColor": {
      "type": "string",
      "pattern": "^#[0-9a-fA-F]{6}$"
    },
    "scope": {
      "type": "string",
      "enum": [
        "NETWORK",
        "GYM"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "DRAFT",
        "SCHEDULED",
        "ACTIVE",
        "FINISHED",
        "CANCELLED"
      ]
    },
    "rules": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    }
  }
}
challenges.powerBoundary

Тип: number / null. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "type": "number",
      "minimum": 0,
      "maximum": 1000
    },
    {
      "type": "null"
    }
  ]
}
challenges.rewardColor

Тип: string. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "string",
  "pattern": "^#[0-9a-fA-F]{6}$"
}
challenges.rules

Тип: object. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "propertyNames": {
    "type": "string"
  },
  "additionalProperties": {}
}
climbing.climbingRatingSchema
ПолеТип / обязательностьОграничения
routeIdstring
обязательно
minLength: 1
value1 / 3 / 5
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "routeId": {
      "type": "string",
      "minLength": 1
    },
    "value": {
      "anyOf": [
        {
          "type": "number",
          "const": 1
        },
        {
          "type": "number",
          "const": 3
        },
        {
          "type": "number",
          "const": 5
        }
      ]
    }
  },
  "required": [
    "routeId",
    "value"
  ],
  "additionalProperties": false
}
commerce-dashboard.commerceCustomPeriodSchema
ПолеТип / обязательностьОграничения
fromstring
обязательно
format: "date-time"; pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
tostring
обязательно
format: "date-time"; pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    },
    "to": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    }
  },
  "required": [
    "from",
    "to"
  ]
}
commerce-dashboard.commerceInstantSchema

Тип: string. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "string",
  "format": "date-time",
  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
commerce-dashboard.commercePeriodPresetSchema

Тип: одно из: ["7d","30d","90d","custom"]. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "string",
  "enum": [
    "7d",
    "30d",
    "90d",
    "custom"
  ]
}
connections.connectionCursorSchema
ПолеТип / обязательностьОграничения
version1
обязательно
—
viewerstring
обязательно
minLength: 1; maxLength: 100
kindодно из: ["followers","following"]
обязательно
—
atstring
обязательно
format: "date-time"; pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
idstring
обязательно
minLength: 1; maxLength: 100
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "version": {
      "type": "number",
      "const": 1
    },
    "viewer": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "kind": {
      "type": "string",
      "enum": [
        "followers",
        "following"
      ]
    },
    "at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    }
  },
  "required": [
    "version",
    "viewer",
    "kind",
    "at",
    "id"
  ],
  "additionalProperties": false
}
content.MapPresentationSchema
ПолеТип / обязательностьОграничения
widthnumber
обязательно
—
heightnumber
обязательно
—
vectorsмассив (object)
обязательно
maxItems: 100
blocksмассив (object)
обязательно
maxItems: 100
labelsмассив (object)
обязательно
maxItems: 100
pinsмассив (object)
обязательно
maxItems: 100
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "width": {
      "type": "number",
      "exclusiveMinimum": 0
    },
    "height": {
      "type": "number",
      "exclusiveMinimum": 0
    },
    "vectors": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "asset": {
            "type": "string",
            "pattern": "^\\/redesign\\/figma\\/[a-zA-Z0-9_/-]+\\.svg$"
          },
          "x": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "y": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "width": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "height": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "flipY": {
            "type": "boolean"
          }
        },
        "required": [
          "asset",
          "x",
          "y",
          "width",
          "height"
        ]
      }
    },
    "blocks": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "x": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "y": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "width": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "height": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "color": {
            "type": "string",
            "pattern": "^#[a-fA-F0-9]{6}$"
          },
          "radius": {
            "type": "number",
            "minimum": 0
          }
        },
        "required": [
          "x",
          "y",
          "width",
          "height",
          "color",
          "radius"
        ]
      }
    },
    "labels": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "maxLength": 100
          },
          "x": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "y": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "width": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          }
        },
        "required": [
          "text",
          "x",
          "y"
        ]
      }
    },
    "pins": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "zoneId": {
            "type": "string"
          },
          "x": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "y": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          }
        },
        "required": [
          "zoneId",
          "x",
          "y"
        ]
      }
    }
  },
  "required": [
    "width",
    "height",
    "vectors",
    "blocks",
    "labels",
    "pins"
  ]
}
content.TaskCopySchema
ПолеТип / обязательностьОграничения
advicestring / null
может отсутствовать
—
hintstring / null
может отсутствовать
—
kindодно из: ["DAILY","TRIAL"]
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "advice": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 4000
        },
        {
          "type": "null"
        }
      ]
    },
    "hint": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 1000
        },
        {
          "type": "null"
        }
      ]
    },
    "kind": {
      "type": "string",
      "enum": [
        "DAILY",
        "TRIAL"
      ]
    }
  }
}
content.asset

Тип: string. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "string",
  "pattern": "^\\/redesign\\/figma\\/[a-zA-Z0-9_/-]+\\.svg$"
}
content.normalized

Тип: number. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "number",
  "minimum": 0,
  "maximum": 1
}
customer-commerce.customerOrderStatusSchema

Тип: одно из: ["PENDING","PAID","PROCESSING","READY_FOR_PICKUP","FULFILLED","CANCELLED","REFUNDED","PARTIALLY_REFUNDED","FAILED"]. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "string",
  "enum": [
    "PENDING",
    "PAID",
    "PROCESSING",
    "READY_FOR_PICKUP",
    "FULFILLED",
    "CANCELLED",
    "REFUNDED",
    "PARTIALLY_REFUNDED",
    "FAILED"
  ]
}
customer-commerce.lessonProgressSchema
ПолеТип / обязательностьОграничения
progressSecondsinteger
может отсутствовать
minimum: 0; maximum: 9007199254740991
completedboolean
может отсутствовать
default: true
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "progressSeconds": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "completed": {
      "default": true,
      "type": "boolean"
    }
  }
}
date.jsonDateSchema

Тип: string / number. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
  "anyOf": [
    {
      "type": "string",
      "minLength": 1
    },
    {
      "type": "number"
    }
  ]
}
discovery.discoveryCursorSchema
ПолеТип / обязательностьОграничения
daystring
обязательно
pattern: "^\\d{4}-\\d{2}-\\d{2}$"
afterstring
обязательно
minLength: 1; maxLength: 125
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "day": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "after": {
      "type": "string",
      "minLength": 1,
      "maxLength": 125
    }
  },
  "required": [
    "day",
    "after"
  ]
}
fitbase.fitbaseIntegrationSchema
ПолеТип / обязательностьОграничения
clubIdinteger
обязательно
maximum: 9007199254740991
domainstring
может отсутствовать
pattern: "^[a-z0-9][a-z0-9-]{0,62}$"
enabledboolean
обязательно
—
windowHoursinteger
может отсутствовать
default: 4; minimum: 1; maximum: 24
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "clubId": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "domain": {
      "type": "string",
      "pattern": "^[a-z0-9][a-z0-9-]{0,62}$"
    },
    "enabled": {
      "type": "boolean"
    },
    "windowHours": {
      "default": 4,
      "type": "integer",
      "minimum": 1,
      "maximum": 24
    }
  },
  "required": [
    "clubId",
    "enabled"
  ]
}
fitbase.fitbaseLinkSchema
ПолеТип / обязательностьОграничения
gymIdstring
обязательно
minLength: 1
clientIdinteger
обязательно
maximum: 9007199254740991
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "gymId": {
      "type": "string",
      "minLength": 1
    },
    "clientId": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "gymId",
    "clientId"
  ]
}
fitbase.fitbaseSearchSchema
ПолеТип / обязательностьОграничения
gymIdstring
обязательно
minLength: 1
qstring
обязательно
minLength: 3; maxLength: 100
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "gymId": {
      "type": "string",
      "minLength": 1
    },
    "q": {
      "type": "string",
      "minLength": 3,
      "maxLength": 100
    }
  },
  "required": [
    "gymId",
    "q"
  ]
}
fitbase.fitbaseVerificationSchema
ПолеТип / обязательностьОграничения
gymIdstring
обязательно
minLength: 1
clubIdinteger
обязательно
maximum: 9007199254740991
domainstring
может отсутствовать
pattern: "^[a-z0-9][a-z0-9-]{0,62}$"
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "gymId": {
      "type": "string",
      "minLength": 1
    },
    "clubId": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "domain": {
      "type": "string",
      "pattern": "^[a-z0-9][a-z0-9-]{0,62}$"
    }
  },
  "required": [
    "gymId",
    "clubId"
  ]
}
health.crmHealthRequestSchema
ПолеТип / обязательностьОграничения
gymIdstring
обязательно
minLength: 1; maxLength: 128
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "gymId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    }
  },
  "required": [
    "gymId"
  ],
  "additionalProperties": false
}
internal.emailDeliveryEventsSchema
ПолеТип / обязательностьОграничения
eventsмассив (object)
обязательно
minItems: 1; maxItems: 100
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "events": {
      "minItems": 1,
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "queueId": {
            "type": "string",
            "minLength": 6,
            "maxLength": 100
          },
          "status": {
            "type": "string",
            "enum": [
              "DELIVERED",
              "DEFERRED",
              "BOUNCED",
              "REJECTED"
            ]
          },
          "error": {
            "type": "string",
            "maxLength": 2000
          }
        },
        "required": [
          "queueId",
          "status"
        ]
      }
    }
  },
  "required": [
    "events"
  ]
}
internal.emailQueueSchema
ПолеТип / обязательностьОграничения
limitinteger
может отсутствовать
default: 10; minimum: 1; maximum: 50
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "limit": {
      "default": 10,
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    }
  }
}
leagues.leagueCreateSchema
ПолеТип / обязательностьОграничения
namestring
обязательно
minLength: 1; maxLength: 100
rankinteger
обязательно
maximum: 9007199254740991
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "rank": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "name",
    "rank"
  ]
}
leagues.leagueMeetingResponseSchema
ПолеТип / обязательностьОграничения
choiceодно из: ["GOING","NOT_GOING"]
обязательно
—
meetingIdstring
может отсутствовать
minLength: 1
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "choice": {
      "type": "string",
      "enum": [
        "GOING",
        "NOT_GOING"
      ]
    },
    "meetingId": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "choice"
  ]
}
leagues.leagueMemberPeriodSchema

Тип: одно из: ["7","30","90","all"]. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "string",
  "enum": [
    "7",
    "30",
    "90",
    "all"
  ]
}
leagues.leaguePatchSchema
ПолеТип / обязательностьОграничения
namestring
может отсутствовать
minLength: 1; maxLength: 100
rankinteger
может отсутствовать
maximum: 9007199254740991
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "rank": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    }
  }
}
leagues.leagueReorderSchema
ПолеТип / обязательностьОграничения
idsмассив (string)
обязательно
minItems: 1; maxItems: 100
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ids": {
      "minItems": 1,
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    }
  },
  "required": [
    "ids"
  ]
}
leagues.meetingInput
ПолеТип / обязательностьОграничения
leagueIdstring
обязательно
minLength: 1
seasonIdstring
обязательно
minLength: 1
networkIdstring / null
может отсутствовать
—
titlestring
обязательно
minLength: 1; maxLength: 160
startsAtstring
обязательно
format: "date-time"; pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
locationstring
обязательно
minLength: 1; maxLength: 240
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "leagueId": {
      "type": "string",
      "minLength": 1
    },
    "seasonId": {
      "type": "string",
      "minLength": 1
    },
    "networkId": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "null"
        }
      ]
    },
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "startsAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    },
    "location": {
      "type": "string",
      "minLength": 1,
      "maxLength": 240
    }
  },
  "required": [
    "leagueId",
    "seasonId",
    "title",
    "startsAt",
    "location"
  ]
}
leagues.meetingPatch
ПолеТип / обязательностьОграничения
leagueIdstring
может отсутствовать
minLength: 1
seasonIdstring
может отсутствовать
minLength: 1
networkIdstring / null
может отсутствовать
—
titlestring
может отсутствовать
minLength: 1; maxLength: 160
startsAtstring
может отсутствовать
format: "date-time"; pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
locationstring
может отсутствовать
minLength: 1; maxLength: 240
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "leagueId": {
      "type": "string",
      "minLength": 1
    },
    "seasonId": {
      "type": "string",
      "minLength": 1
    },
    "networkId": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "null"
        }
      ]
    },
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "startsAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    },
    "location": {
      "type": "string",
      "minLength": 1,
      "maxLength": 240
    }
  }
}
learning.courseInput
ПолеТип / обязательностьОграничения
slugstring
обязательно
minLength: 2; maxLength: 120; pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$"
titlestring
обязательно
minLength: 2; maxLength: 180
authorstring
обязательно
minLength: 2; maxLength: 180
expertstring / null
может отсутствовать
—
descriptionstring
обязательно
minLength: 2; maxLength: 30000
coverUrlstring / null
может отсутствовать
—
trailerUrlstring / null
может отсутствовать
—
audienceмассив (string)
может отсутствовать
default: []; maxItems: 100
outcomesмассив (string)
может отсутствовать
default: []; maxItems: 100
equipmentмассив (string)
может отсутствовать
default: []; maxItems: 100
difficultystring
обязательно
minLength: 1; maxLength: 80
durationMinutesinteger
обязательно
minimum: 0; maximum: 100000
statusодно из: ["DRAFT","SCHEDULED","PUBLISHED","ARCHIVED"]
может отсутствовать
default: "DRAFT"
scheduledAtstring / number / null
может отсутствовать
—
offerobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "title": {
      "type": "string",
      "minLength": 2,
      "maxLength": 180
    },
    "author": {
      "type": "string",
      "minLength": 2,
      "maxLength": 180
    },
    "expert": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 300
        },
        {
          "type": "null"
        }
      ]
    },
    "description": {
      "type": "string",
      "minLength": 2,
      "maxLength": 30000
    },
    "coverUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "trailerUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "audience": {
      "default": [],
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "outcomes": {
      "default": [],
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "equipment": {
      "default": [],
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "difficulty": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "durationMinutes": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100000
    },
    "status": {
      "default": "DRAFT",
      "type": "string",
      "enum": [
        "DRAFT",
        "SCHEDULED",
        "PUBLISHED",
        "ARCHIVED"
      ]
    },
    "scheduledAt": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "offer": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "FREE",
            "PAID",
            "NONE"
          ]
        },
        "price": {
          "default": 0,
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "oldPrice": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "availableFrom": {
          "anyOf": [
            {
              "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "number"
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "availableUntil": {
          "anyOf": [
            {
              "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "number"
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "purchaseLimitPerUser": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "mode"
      ]
    }
  },
  "required": [
    "slug",
    "title",
    "author",
    "description",
    "difficulty",
    "durationMinutes",
    "offer"
  ]
}
learning.courseInputShape
ПолеТип / обязательностьОграничения
slugstring
обязательно
minLength: 2; maxLength: 120; pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$"
titlestring
обязательно
minLength: 2; maxLength: 180
authorstring
обязательно
minLength: 2; maxLength: 180
expertstring / null
может отсутствовать
—
descriptionstring
обязательно
minLength: 2; maxLength: 30000
coverUrlstring / null
может отсутствовать
—
trailerUrlstring / null
может отсутствовать
—
audienceмассив (string)
может отсутствовать
default: []; maxItems: 100
outcomesмассив (string)
может отсутствовать
default: []; maxItems: 100
equipmentмассив (string)
может отсутствовать
default: []; maxItems: 100
difficultystring
обязательно
minLength: 1; maxLength: 80
durationMinutesinteger
обязательно
minimum: 0; maximum: 100000
statusодно из: ["DRAFT","SCHEDULED","PUBLISHED","ARCHIVED"]
может отсутствовать
default: "DRAFT"
scheduledAtstring / number / null
может отсутствовать
—
offerobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "title": {
      "type": "string",
      "minLength": 2,
      "maxLength": 180
    },
    "author": {
      "type": "string",
      "minLength": 2,
      "maxLength": 180
    },
    "expert": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 300
        },
        {
          "type": "null"
        }
      ]
    },
    "description": {
      "type": "string",
      "minLength": 2,
      "maxLength": 30000
    },
    "coverUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "trailerUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "audience": {
      "default": [],
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "outcomes": {
      "default": [],
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "equipment": {
      "default": [],
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "difficulty": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "durationMinutes": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100000
    },
    "status": {
      "default": "DRAFT",
      "type": "string",
      "enum": [
        "DRAFT",
        "SCHEDULED",
        "PUBLISHED",
        "ARCHIVED"
      ]
    },
    "scheduledAt": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "offer": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "FREE",
            "PAID",
            "NONE"
          ]
        },
        "price": {
          "default": 0,
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "oldPrice": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "availableFrom": {
          "anyOf": [
            {
              "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "number"
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "availableUntil": {
          "anyOf": [
            {
              "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "number"
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "purchaseLimitPerUser": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "mode"
      ]
    }
  },
  "required": [
    "slug",
    "title",
    "author",
    "description",
    "difficulty",
    "durationMinutes",
    "offer"
  ]
}
learning.coursePatchInput
ПолеТип / обязательностьОграничения
slugstring
может отсутствовать
minLength: 2; maxLength: 120; pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$"
titlestring
может отсутствовать
minLength: 2; maxLength: 180
authorstring
может отсутствовать
minLength: 2; maxLength: 180
expertstring / null
может отсутствовать
—
descriptionstring
может отсутствовать
minLength: 2; maxLength: 30000
coverUrlstring / null
может отсутствовать
—
trailerUrlstring / null
может отсутствовать
—
audienceмассив (string)
может отсутствовать
maxItems: 100
outcomesмассив (string)
может отсутствовать
maxItems: 100
equipmentмассив (string)
может отсутствовать
maxItems: 100
difficultystring
может отсутствовать
minLength: 1; maxLength: 80
durationMinutesinteger
может отсутствовать
minimum: 0; maximum: 100000
statusодно из: ["DRAFT","SCHEDULED","PUBLISHED","ARCHIVED"]
может отсутствовать
—
scheduledAtstring / number / null
может отсутствовать
—
offerobject
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "title": {
      "type": "string",
      "minLength": 2,
      "maxLength": 180
    },
    "author": {
      "type": "string",
      "minLength": 2,
      "maxLength": 180
    },
    "expert": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 300
        },
        {
          "type": "null"
        }
      ]
    },
    "description": {
      "type": "string",
      "minLength": 2,
      "maxLength": 30000
    },
    "coverUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "trailerUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "audience": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "outcomes": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "equipment": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "difficulty": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "durationMinutes": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100000
    },
    "status": {
      "type": "string",
      "enum": [
        "DRAFT",
        "SCHEDULED",
        "PUBLISHED",
        "ARCHIVED"
      ]
    },
    "scheduledAt": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "offer": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "FREE",
            "PAID",
            "NONE"
          ]
        },
        "price": {
          "default": 0,
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "oldPrice": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "availableFrom": {
          "anyOf": [
            {
              "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "number"
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "availableUntil": {
          "anyOf": [
            {
              "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "number"
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "purchaseLimitPerUser": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "mode"
      ]
    }
  }
}
learning.learningFilterSchema

Тип: одно из: ["all","lessons","courses","owned","in-progress","completed"]. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "default": "all",
  "type": "string",
  "enum": [
    "all",
    "lessons",
    "courses",
    "owned",
    "in-progress",
    "completed"
  ]
}
learning.learningMediaPurposeSchema

Тип: одно из: ["learning-cover","learning-video","learning-trailer"]. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "string",
  "enum": [
    "learning-cover",
    "learning-video",
    "learning-trailer"
  ]
}
learning.learningProgressSchema
ПолеТип / обязательностьОграничения
progressSecondsinteger
может отсутствовать
minimum: 0; maximum: 9007199254740991
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "progressSeconds": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  }
}
learning.lessonInput
ПолеТип / обязательностьОграничения
slugstring
обязательно
minLength: 2; maxLength: 120; pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$"
titlestring
обязательно
minLength: 2; maxLength: 180
shortDescriptionstring
обязательно
minLength: 2; maxLength: 500
bodystring / null
может отсутствовать
—
coverUrlstring / null
может отсутствовать
—
contentTypeодно из: ["VIDEO","TEXT","MIXED"]
обязательно
—
videoUrlstring / null
может отсутствовать
—
attachmentsмассив (object)
может отсутствовать
default: []; maxItems: 30
authorstring
обязательно
minLength: 2; maxLength: 180
expertstring / null
может отсутствовать
—
goalstring / null
может отсутствовать
—
drillsмассив (string)
может отсутствовать
default: []; maxItems: 100
cuesмассив (string)
может отсутствовать
default: []; maxItems: 100
durationSecondsinteger
обязательно
minimum: 0; maximum: 86400
difficultystring
обязательно
minLength: 1; maxLength: 80
tagsмассив (string)
может отсутствовать
default: []; maxItems: 100
equipmentмассив (string)
может отсутствовать
default: []; maxItems: 100
previewboolean
может отсутствовать
default: false
statusодно из: ["DRAFT","SCHEDULED","PUBLISHED","ARCHIVED"]
может отсутствовать
default: "DRAFT"
scheduledAtstring / number / null
может отсутствовать
—
completionRulesobject
может отсутствовать
default: {"minimumPercent":90,"requireManualCompletion":false}
offerobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "title": {
      "type": "string",
      "minLength": 2,
      "maxLength": 180
    },
    "shortDescription": {
      "type": "string",
      "minLength": 2,
      "maxLength": 500
    },
    "body": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100000
        },
        {
          "type": "null"
        }
      ]
    },
    "coverUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "contentType": {
      "type": "string",
      "enum": [
        "VIDEO",
        "TEXT",
        "MIXED"
      ]
    },
    "videoUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "attachments": {
      "default": [],
      "maxItems": 30,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 180
          },
          "url": {
            "type": "string",
            "maxLength": 2000
          },
          "size": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "name",
          "url"
        ]
      }
    },
    "author": {
      "type": "string",
      "minLength": 2,
      "maxLength": 180
    },
    "expert": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 300
        },
        {
          "type": "null"
        }
      ]
    },
    "goal": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "drills": {
      "default": [],
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "cues": {
      "default": [],
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "durationSeconds": {
      "type": "integer",
      "minimum": 0,
      "maximum": 86400
    },
    "difficulty": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "tags": {
      "default": [],
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "equipment": {
      "default": [],
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "preview": {
      "default": false,
      "type": "boolean"
    },
    "status": {
      "default": "DRAFT",
      "type": "string",
      "enum": [
        "DRAFT",
        "SCHEDULED",
        "PUBLISHED",
        "ARCHIVED"
      ]
    },
    "scheduledAt": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "completionRules": {
      "default": {
        "minimumPercent": 90,
        "requireManualCompletion": false
      },
      "type": "object",
      "properties": {
        "minimumPercent": {
          "default": 90,
          "type": "integer",
          "minimum": 0,
          "maximum": 100
        },
        "requireManualCompletion": {
          "default": false,
          "type": "boolean"
        }
      }
    },
    "offer": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "FREE",
            "PAID",
            "NONE"
          ]
        },
        "price": {
          "default": 0,
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "oldPrice": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "availableFrom": {
          "anyOf": [
            {
              "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "number"
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "availableUntil": {
          "anyOf": [
            {
              "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "number"
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "purchaseLimitPerUser": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "mode"
      ]
    }
  },
  "required": [
    "slug",
    "title",
    "shortDescription",
    "contentType",
    "author",
    "durationSeconds",
    "difficulty",
    "offer"
  ]
}
learning.lessonInputShape
ПолеТип / обязательностьОграничения
slugstring
обязательно
minLength: 2; maxLength: 120; pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$"
titlestring
обязательно
minLength: 2; maxLength: 180
shortDescriptionstring
обязательно
minLength: 2; maxLength: 500
bodystring / null
может отсутствовать
—
coverUrlstring / null
может отсутствовать
—
contentTypeодно из: ["VIDEO","TEXT","MIXED"]
обязательно
—
videoUrlstring / null
может отсутствовать
—
attachmentsмассив (object)
может отсутствовать
default: []; maxItems: 30
authorstring
обязательно
minLength: 2; maxLength: 180
expertstring / null
может отсутствовать
—
goalstring / null
может отсутствовать
—
drillsмассив (string)
может отсутствовать
default: []; maxItems: 100
cuesмассив (string)
может отсутствовать
default: []; maxItems: 100
durationSecondsinteger
обязательно
minimum: 0; maximum: 86400
difficultystring
обязательно
minLength: 1; maxLength: 80
tagsмассив (string)
может отсутствовать
default: []; maxItems: 100
equipmentмассив (string)
может отсутствовать
default: []; maxItems: 100
previewboolean
может отсутствовать
default: false
statusодно из: ["DRAFT","SCHEDULED","PUBLISHED","ARCHIVED"]
может отсутствовать
default: "DRAFT"
scheduledAtstring / number / null
может отсутствовать
—
completionRulesobject
может отсутствовать
default: {"minimumPercent":90,"requireManualCompletion":false}
offerobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "title": {
      "type": "string",
      "minLength": 2,
      "maxLength": 180
    },
    "shortDescription": {
      "type": "string",
      "minLength": 2,
      "maxLength": 500
    },
    "body": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100000
        },
        {
          "type": "null"
        }
      ]
    },
    "coverUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "contentType": {
      "type": "string",
      "enum": [
        "VIDEO",
        "TEXT",
        "MIXED"
      ]
    },
    "videoUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "attachments": {
      "default": [],
      "maxItems": 30,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 180
          },
          "url": {
            "type": "string",
            "maxLength": 2000
          },
          "size": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "name",
          "url"
        ]
      }
    },
    "author": {
      "type": "string",
      "minLength": 2,
      "maxLength": 180
    },
    "expert": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 300
        },
        {
          "type": "null"
        }
      ]
    },
    "goal": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "drills": {
      "default": [],
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "cues": {
      "default": [],
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "durationSeconds": {
      "type": "integer",
      "minimum": 0,
      "maximum": 86400
    },
    "difficulty": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "tags": {
      "default": [],
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "equipment": {
      "default": [],
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "preview": {
      "default": false,
      "type": "boolean"
    },
    "status": {
      "default": "DRAFT",
      "type": "string",
      "enum": [
        "DRAFT",
        "SCHEDULED",
        "PUBLISHED",
        "ARCHIVED"
      ]
    },
    "scheduledAt": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "completionRules": {
      "default": {
        "minimumPercent": 90,
        "requireManualCompletion": false
      },
      "type": "object",
      "properties": {
        "minimumPercent": {
          "default": 90,
          "type": "integer",
          "minimum": 0,
          "maximum": 100
        },
        "requireManualCompletion": {
          "default": false,
          "type": "boolean"
        }
      }
    },
    "offer": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "FREE",
            "PAID",
            "NONE"
          ]
        },
        "price": {
          "default": 0,
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "oldPrice": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "availableFrom": {
          "anyOf": [
            {
              "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "number"
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "availableUntil": {
          "anyOf": [
            {
              "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "number"
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "purchaseLimitPerUser": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "mode"
      ]
    }
  },
  "required": [
    "slug",
    "title",
    "shortDescription",
    "contentType",
    "author",
    "durationSeconds",
    "difficulty",
    "offer"
  ]
}
learning.lessonPatchInput
ПолеТип / обязательностьОграничения
slugstring
может отсутствовать
minLength: 2; maxLength: 120; pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$"
titlestring
может отсутствовать
minLength: 2; maxLength: 180
shortDescriptionstring
может отсутствовать
minLength: 2; maxLength: 500
bodystring / null
может отсутствовать
—
coverUrlstring / null
может отсутствовать
—
contentTypeодно из: ["VIDEO","TEXT","MIXED"]
может отсутствовать
—
videoUrlstring / null
может отсутствовать
—
attachmentsмассив (object)
может отсутствовать
maxItems: 30
authorstring
может отсутствовать
minLength: 2; maxLength: 180
expertstring / null
может отсутствовать
—
goalstring / null
может отсутствовать
—
drillsмассив (string)
может отсутствовать
maxItems: 100
cuesмассив (string)
может отсутствовать
maxItems: 100
durationSecondsinteger
может отсутствовать
minimum: 0; maximum: 86400
difficultystring
может отсутствовать
minLength: 1; maxLength: 80
tagsмассив (string)
может отсутствовать
maxItems: 100
equipmentмассив (string)
может отсутствовать
maxItems: 100
previewboolean
может отсутствовать
—
statusодно из: ["DRAFT","SCHEDULED","PUBLISHED","ARCHIVED"]
может отсутствовать
—
scheduledAtstring / number / null
может отсутствовать
—
completionRulesobject
может отсутствовать
—
offerobject
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string",
      "minLength": 2,
      "maxLength": 120,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "title": {
      "type": "string",
      "minLength": 2,
      "maxLength": 180
    },
    "shortDescription": {
      "type": "string",
      "minLength": 2,
      "maxLength": 500
    },
    "body": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100000
        },
        {
          "type": "null"
        }
      ]
    },
    "coverUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "contentType": {
      "type": "string",
      "enum": [
        "VIDEO",
        "TEXT",
        "MIXED"
      ]
    },
    "videoUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "attachments": {
      "maxItems": 30,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 180
          },
          "url": {
            "type": "string",
            "maxLength": 2000
          },
          "size": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "name",
          "url"
        ]
      }
    },
    "author": {
      "type": "string",
      "minLength": 2,
      "maxLength": 180
    },
    "expert": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 300
        },
        {
          "type": "null"
        }
      ]
    },
    "goal": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ]
    },
    "drills": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "cues": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "durationSeconds": {
      "type": "integer",
      "minimum": 0,
      "maximum": 86400
    },
    "difficulty": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "tags": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "equipment": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      }
    },
    "preview": {
      "type": "boolean"
    },
    "status": {
      "type": "string",
      "enum": [
        "DRAFT",
        "SCHEDULED",
        "PUBLISHED",
        "ARCHIVED"
      ]
    },
    "scheduledAt": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "completionRules": {
      "type": "object",
      "properties": {
        "minimumPercent": {
          "default": 90,
          "type": "integer",
          "minimum": 0,
          "maximum": 100
        },
        "requireManualCompletion": {
          "default": false,
          "type": "boolean"
        }
      }
    },
    "offer": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "FREE",
            "PAID",
            "NONE"
          ]
        },
        "price": {
          "default": 0,
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "oldPrice": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "availableFrom": {
          "anyOf": [
            {
              "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "number"
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "availableUntil": {
          "anyOf": [
            {
              "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "number"
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "purchaseLimitPerUser": {
          "anyOf": [
            {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "mode"
      ]
    }
  }
}
learning.offerInput
ПолеТип / обязательностьОграничения
modeодно из: ["FREE","PAID","NONE"]
обязательно
—
priceinteger
может отсутствовать
default: 0; minimum: 0; maximum: 9007199254740991
oldPriceinteger / null
может отсутствовать
—
availableFromstring / number / null
может отсутствовать
—
availableUntilstring / number / null
может отсутствовать
—
purchaseLimitPerUserinteger / null
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "mode": {
      "type": "string",
      "enum": [
        "FREE",
        "PAID",
        "NONE"
      ]
    },
    "price": {
      "default": 0,
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "oldPrice": {
      "anyOf": [
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "availableFrom": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "availableUntil": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "purchaseLimitPerUser": {
      "anyOf": [
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "mode"
  ]
}
learning.programInput
ПолеТип / обязательностьОграничения
acknowledgePublishedChangeboolean
может отсутствовать
default: false
modulesмассив (object)
обязательно
minItems: 1
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "acknowledgePublishedChange": {
      "default": false,
      "type": "boolean"
    },
    "modules": {
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 180
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ]
          },
          "lessons": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "lessonId": {
                  "type": "string",
                  "minLength": 1
                },
                "required": {
                  "default": true,
                  "type": "boolean"
                },
                "settings": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string",
                      "maxLength": 180
                    }
                  }
                }
              },
              "required": [
                "lessonId"
              ]
            }
          }
        },
        "required": [
          "title",
          "lessons"
        ]
      }
    }
  },
  "required": [
    "modules"
  ]
}
learning.publicationStatus

Тип: одно из: ["DRAFT","SCHEDULED","PUBLISHED","ARCHIVED"]. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "string",
  "enum": [
    "DRAFT",
    "SCHEDULED",
    "PUBLISHED",
    "ARCHIVED"
  ]
}
learning.safeUrl

Тип: string. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "string",
  "maxLength": 2000
}
learning.slug

Тип: string. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "string",
  "minLength": 2,
  "maxLength": 120,
  "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
}
learning.stringList

Тип: массив (string). Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "default": [],
  "maxItems": 100,
  "type": "array",
  "items": {
    "type": "string",
    "minLength": 1,
    "maxLength": 300
  }
}
location-provider.locationProviderResponseSchema
ПолеТип / обязательностьОграничения
suggestionsмассив (object)
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "suggestions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string"
          },
          "unrestricted_value": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "region": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "region_with_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "region_type_full": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city_with_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city_fias_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "settlement": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "settlement_with_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "settlement_fias_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "street_with_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "house_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "house": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "block_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "block": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "fias_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "geo_lat": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "geo_lon": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "value",
          "data"
        ]
      }
    }
  },
  "required": [
    "suggestions"
  ]
}
location-provider.suggestionDataSchema
ПолеТип / обязательностьОграничения
regionstring / null
может отсутствовать
—
region_with_typestring / null
может отсутствовать
—
region_type_fullstring / null
может отсутствовать
—
citystring / null
может отсутствовать
—
city_with_typestring / null
может отсутствовать
—
city_fias_idstring / null
может отсутствовать
—
settlementstring / null
может отсутствовать
—
settlement_with_typestring / null
может отсутствовать
—
settlement_fias_idstring / null
может отсутствовать
—
street_with_typestring / null
может отсутствовать
—
house_typestring / null
может отсутствовать
—
housestring / null
может отсутствовать
—
block_typestring / null
может отсутствовать
—
blockstring / null
может отсутствовать
—
fias_idstring / null
может отсутствовать
—
geo_latstring / null
может отсутствовать
—
geo_lonstring / null
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "region": {
      "type": [
        "string",
        "null"
      ]
    },
    "region_with_type": {
      "type": [
        "string",
        "null"
      ]
    },
    "region_type_full": {
      "type": [
        "string",
        "null"
      ]
    },
    "city": {
      "type": [
        "string",
        "null"
      ]
    },
    "city_with_type": {
      "type": [
        "string",
        "null"
      ]
    },
    "city_fias_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "settlement": {
      "type": [
        "string",
        "null"
      ]
    },
    "settlement_with_type": {
      "type": [
        "string",
        "null"
      ]
    },
    "settlement_fias_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "street_with_type": {
      "type": [
        "string",
        "null"
      ]
    },
    "house_type": {
      "type": [
        "string",
        "null"
      ]
    },
    "house": {
      "type": [
        "string",
        "null"
      ]
    },
    "block_type": {
      "type": [
        "string",
        "null"
      ]
    },
    "block": {
      "type": [
        "string",
        "null"
      ]
    },
    "fias_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "geo_lat": {
      "type": [
        "string",
        "null"
      ]
    },
    "geo_lon": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "additionalProperties": {}
}
location-signals.locationSignalSchema
ПолеТип / обязательностьОграничения
sessionIdstring
обязательно
format: "uuid"; pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
latitudenumber
обязательно
minimum: -90; maximum: 90
longitudenumber
обязательно
minimum: -180; maximum: 180
accuracyMetersnumber
обязательно
maximum: 100000
permissionStateодно из: ["granted"]
обязательно
—
occurredAtstring
обязательно
format: "date-time"; pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "sessionId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "latitude": {
      "type": "number",
      "minimum": -90,
      "maximum": 90
    },
    "longitude": {
      "type": "number",
      "minimum": -180,
      "maximum": 180
    },
    "accuracyMeters": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "permissionState": {
      "type": "string",
      "enum": [
        "granted"
      ]
    },
    "occurredAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    }
  },
  "required": [
    "sessionId",
    "latitude",
    "longitude",
    "accuracyMeters",
    "permissionState",
    "occurredAt"
  ]
}
map-settings.MapSettingsSchema
ПолеТип / обязательностьОграничения
recommendationModeодно из: ["CALM","MODERATE","AGGRESSIVE"]
обязательно
—
incompleteOnlyboolean
обязательно
—
mapIdstring / null
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "recommendationMode": {
      "type": "string",
      "enum": [
        "CALM",
        "MODERATE",
        "AGGRESSIVE"
      ]
    },
    "incompleteOnly": {
      "type": "boolean"
    },
    "mapId": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "recommendationMode",
    "incompleteOnly",
    "mapId"
  ],
  "additionalProperties": false
}
maps.coordinateSchema

Тип: number. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "number"
}
maps.gymCreateSchema
ПолеТип / обязательностьОграничения
networkIdstring / null
может отсутствовать
—
namestring
обязательно
minLength: 1; maxLength: 180
descriptionstring
может отсутствовать
default: ""; maxLength: 4000
timezonestring
может отсутствовать
default: "Europe/Moscow"; minLength: 1; maxLength: 80
statusstring
может отсутствовать
default: "ACTIVE"; maxLength: 40
localitystring
обязательно
minLength: 1; maxLength: 180
regionstring
может отсутствовать
default: ""; maxLength: 180
localityFiasIdstring / null
может отсутствовать
—
addressstring
обязательно
minLength: 1; maxLength: 500
addressFiasIdstring / null
может отсутствовать
—
latitudenumber / null
может отсутствовать
—
longitudenumber / null
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "networkId": {
      "type": [
        "string",
        "null"
      ]
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 180
    },
    "description": {
      "default": "",
      "type": "string",
      "maxLength": 4000
    },
    "timezone": {
      "default": "Europe/Moscow",
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "status": {
      "default": "ACTIVE",
      "type": "string",
      "maxLength": 40
    },
    "locality": {
      "type": "string",
      "minLength": 1,
      "maxLength": 180
    },
    "region": {
      "default": "",
      "type": "string",
      "maxLength": 180
    },
    "localityFiasId": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64
        },
        {
          "type": "null"
        }
      ]
    },
    "address": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "addressFiasId": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64
        },
        {
          "type": "null"
        }
      ]
    },
    "latitude": {
      "anyOf": [
        {
          "type": "number",
          "minimum": -90,
          "maximum": 90
        },
        {
          "type": "null"
        }
      ]
    },
    "longitude": {
      "anyOf": [
        {
          "type": "number",
          "minimum": -180,
          "maximum": 180
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "name",
    "locality",
    "address"
  ]
}
maps.gymLocationSchema
ПолеТип / обязательностьОграничения
localitystring
обязательно
minLength: 1; maxLength: 180
regionstring
может отсутствовать
default: ""; maxLength: 180
localityFiasIdstring / null
может отсутствовать
—
addressstring
обязательно
minLength: 1; maxLength: 500
addressFiasIdstring / null
может отсутствовать
—
latitudenumber / null
может отсутствовать
—
longitudenumber / null
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "locality": {
      "type": "string",
      "minLength": 1,
      "maxLength": 180
    },
    "region": {
      "default": "",
      "type": "string",
      "maxLength": 180
    },
    "localityFiasId": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64
        },
        {
          "type": "null"
        }
      ]
    },
    "address": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "addressFiasId": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64
        },
        {
          "type": "null"
        }
      ]
    },
    "latitude": {
      "anyOf": [
        {
          "type": "number",
          "minimum": -90,
          "maximum": 90
        },
        {
          "type": "null"
        }
      ]
    },
    "longitude": {
      "anyOf": [
        {
          "type": "number",
          "minimum": -180,
          "maximum": 180
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "locality",
    "address"
  ]
}
maps.gymPatchSchema
ПолеТип / обязательностьОграничения
namestring
может отсутствовать
minLength: 1; maxLength: 180
descriptionstring
может отсутствовать
maxLength: 4000
timezonestring
может отсутствовать
minLength: 1; maxLength: 80
statusstring
может отсутствовать
maxLength: 40
localitystring
может отсутствовать
minLength: 1; maxLength: 180
regionstring
может отсутствовать
maxLength: 180
localityFiasIdstring / null
может отсутствовать
—
addressstring
может отсутствовать
minLength: 1; maxLength: 500
addressFiasIdstring / null
может отсутствовать
—
latitudenumber / null
может отсутствовать
—
longitudenumber / null
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 180
    },
    "description": {
      "type": "string",
      "maxLength": 4000
    },
    "timezone": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "status": {
      "type": "string",
      "maxLength": 40
    },
    "locality": {
      "type": "string",
      "minLength": 1,
      "maxLength": 180
    },
    "region": {
      "type": "string",
      "maxLength": 180
    },
    "localityFiasId": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64
        },
        {
          "type": "null"
        }
      ]
    },
    "address": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "addressFiasId": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64
        },
        {
          "type": "null"
        }
      ]
    },
    "latitude": {
      "anyOf": [
        {
          "type": "number",
          "minimum": -90,
          "maximum": 90
        },
        {
          "type": "null"
        }
      ]
    },
    "longitude": {
      "anyOf": [
        {
          "type": "number",
          "minimum": -180,
          "maximum": 180
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
maps.hallCreateSchema
ПолеТип / обязательностьОграничения
gymIdstring
обязательно
minLength: 1
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "gymId": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "gymId"
  ]
}
maps.hallPatchSchema
ПолеТип / обязательностьОграничения
namestring
может отсутствовать
minLength: 1; maxLength: 180
descriptionstring
может отсутствовать
maxLength: 4000
sortOrderinteger
может отсутствовать
minimum: -9007199254740991; maximum: 9007199254740991
statusодно из: ["ACTIVE","ARCHIVED"]
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 180
    },
    "description": {
      "type": "string",
      "maxLength": 4000
    },
    "sortOrder": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "status": {
      "type": "string",
      "enum": [
        "ACTIVE",
        "ARCHIVED"
      ]
    }
  }
}
maps.locationSuggestionQuerySchema
ПолеТип / обязательностьОграничения
typeодно из: ["locality","address"]
обязательно
—
querystring
обязательно
minLength: 2; maxLength: 200
localityFiasIdstring
может отсутствовать
maxLength: 64
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "locality",
        "address"
      ]
    },
    "query": {
      "type": "string",
      "minLength": 2,
      "maxLength": 200
    },
    "localityFiasId": {
      "type": "string",
      "maxLength": 64
    }
  },
  "required": [
    "type",
    "query"
  ]
}
maps.mapZoneFieldsSchema
ПолеТип / обязательностьОграничения
labelstring
обязательно
minLength: 1; maxLength: 80
numberinteger
обязательно
minimum: 1; maximum: 999
colorstring
обязательно
pattern: "^#[0-9a-fA-F]{6}$"
xNormalizednumber
обязательно
minimum: 0; maximum: 1
yNormalizednumber
обязательно
minimum: 0; maximum: 1
widthNormalizednumber
обязательно
maximum: 1
heightNormalizednumber
обязательно
maximum: 1
polygonмассив (object) / null
может отсутствовать
—
routeLimitinteger
обязательно
minimum: 1; maximum: 15
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "label": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "number": {
      "type": "integer",
      "minimum": 1,
      "maximum": 999
    },
    "color": {
      "type": "string",
      "pattern": "^#[0-9a-fA-F]{6}$"
    },
    "xNormalized": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "yNormalized": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "widthNormalized": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1
    },
    "heightNormalized": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1
    },
    "polygon": {
      "anyOf": [
        {
          "minItems": 3,
          "maxItems": 256,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "x": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "y": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "required": [
              "x",
              "y"
            ]
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "routeLimit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 15
    }
  },
  "required": [
    "label",
    "number",
    "color",
    "xNormalized",
    "yNormalized",
    "widthNormalized",
    "heightNormalized",
    "routeLimit"
  ]
}
maps.mapZonePatchSchema
ПолеТип / обязательностьОграничения
labelstring
может отсутствовать
minLength: 1; maxLength: 80
numberinteger
может отсутствовать
minimum: 1; maximum: 999
colorstring
может отсутствовать
pattern: "^#[0-9a-fA-F]{6}$"
xNormalizednumber
может отсутствовать
minimum: 0; maximum: 1
yNormalizednumber
может отсутствовать
minimum: 0; maximum: 1
widthNormalizednumber
может отсутствовать
maximum: 1
heightNormalizednumber
может отсутствовать
maximum: 1
polygonмассив (object) / null
может отсутствовать
—
routeLimitinteger
может отсутствовать
minimum: 1; maximum: 15
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "label": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "number": {
      "type": "integer",
      "minimum": 1,
      "maximum": 999
    },
    "color": {
      "type": "string",
      "pattern": "^#[0-9a-fA-F]{6}$"
    },
    "xNormalized": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "yNormalized": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "widthNormalized": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1
    },
    "heightNormalized": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1
    },
    "polygon": {
      "anyOf": [
        {
          "minItems": 3,
          "maxItems": 256,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "x": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "y": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "required": [
              "x",
              "y"
            ]
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "routeLimit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 15
    }
  }
}
maps.mapZoneWriteSchema
ПолеТип / обязательностьОграничения
labelstring
обязательно
minLength: 1; maxLength: 80
numberinteger
может отсутствовать
minimum: 1; maximum: 999
colorstring
может отсутствовать
default: "#c60814"; pattern: "^#[0-9a-fA-F]{6}$"
xNormalizednumber
обязательно
minimum: 0; maximum: 1
yNormalizednumber
обязательно
minimum: 0; maximum: 1
widthNormalizednumber
может отсутствовать
default: 0.25; maximum: 1
heightNormalizednumber
может отсутствовать
default: 0.25; maximum: 1
polygonмассив (object) / null
может отсутствовать
—
routeLimitinteger
может отсутствовать
default: 15; minimum: 1; maximum: 15
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "label": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "number": {
      "type": "integer",
      "minimum": 1,
      "maximum": 999
    },
    "color": {
      "default": "#c60814",
      "type": "string",
      "pattern": "^#[0-9a-fA-F]{6}$"
    },
    "xNormalized": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "yNormalized": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "widthNormalized": {
      "default": 0.25,
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1
    },
    "heightNormalized": {
      "default": 0.25,
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1
    },
    "polygon": {
      "anyOf": [
        {
          "minItems": 3,
          "maxItems": 256,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "x": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "y": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "required": [
              "x",
              "y"
            ]
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "routeLimit": {
      "default": 15,
      "type": "integer",
      "minimum": 1,
      "maximum": 15
    }
  },
  "required": [
    "label",
    "xNormalized",
    "yNormalized"
  ]
}
media.mediaAccessInputSchema
ПолеТип / обязательностьОграничения
urlstring
обязательно
maxLength: 2000
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "maxLength": 2000
    }
  },
  "required": [
    "url"
  ]
}
media.mediaAccessResponseSchema
ПолеТип / обязательностьОграничения
urlstring
обязательно
—
expiresAtstring
обязательно
format: "date-time"; pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "url": {
      "type": "string"
    },
    "expiresAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  },
  "required": [
    "url",
    "expiresAt"
  ],
  "additionalProperties": false
}
media.mediaTicketSchema
ПолеТип / обязательностьОграничения
version1
обязательно
—
userIdstring
обязательно
minLength: 1; maxLength: 128
sessionVersioninteger
обязательно
minimum: 0; maximum: 9007199254740991
pathstring
обязательно
minLength: 1; maxLength: 2000
expiresAtinteger
обязательно
maximum: 9007199254740991
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "version": {
      "type": "number",
      "const": 1
    },
    "userId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "sessionVersion": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "path": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2000
    },
    "expiresAt": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "version",
    "userId",
    "sessionVersion",
    "path",
    "expiresAt"
  ],
  "additionalProperties": false
}
mystery-boxes.mysteryBoxOpenSchema
ПолеТип / обязательностьОграничения
expectedPriceinteger
может отсутствовать
minimum: 0; maximum: 9007199254740991
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "expectedPrice": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  }
}
notifications.notificationAcknowledgementSchema
ПолеТип / обязательностьОграничения
idstring
обязательно
—
errorstring
может отсутствовать
maxLength: 2000
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "error": {
      "type": "string",
      "maxLength": 2000
    }
  },
  "required": [
    "id"
  ]
}
notifications.notificationAudienceSchema

Тип: одно из: ["ALL","GYM","NETWORK","USER"]. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "string",
  "enum": [
    "ALL",
    "GYM",
    "NETWORK",
    "USER"
  ]
}
notifications.notificationBroadcastSchema
ПолеТип / обязательностьОграничения
audienceодно из: ["ALL","GYM","NETWORK","USER"]
может отсутствовать
—
userIdstring / null
может отсутствовать
—
gymIdstring / null
может отсутствовать
—
networkIdstring / null
может отсутствовать
—
typestring
обязательно
minLength: 1; maxLength: 80
titlestring
обязательно
minLength: 1; maxLength: 180
subjectstring
может отсутствовать
minLength: 1; maxLength: 180
templateKeyодно из: ["broadcast.news","broadcast.challenge","broadcast.event","broadcast.service"]
может отсутствовать
default: "broadcast.news"
emailDesignIdstring
может отсутствовать
format: "uuid"; pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
ctaLabelstring
может отсутствовать
maxLength: 80
ctaPathstring
может отсутствовать
maxLength: 500
preheaderstring
может отсутствовать
maxLength: 180
bodystring
обязательно
minLength: 1; maxLength: 4000
channelsмассив (одно из: ["TELEGRAM","WEB_PUSH","EMAIL"])
может отсутствовать
default: ["TELEGRAM"]; minItems: 1; maxItems: 3
scheduledAtstring / number
может отсутствовать
description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds."
payloadobject
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "audience": {
      "type": "string",
      "enum": [
        "ALL",
        "GYM",
        "NETWORK",
        "USER"
      ]
    },
    "userId": {
      "type": [
        "string",
        "null"
      ]
    },
    "gymId": {
      "type": [
        "string",
        "null"
      ]
    },
    "networkId": {
      "type": [
        "string",
        "null"
      ]
    },
    "type": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 180
    },
    "subject": {
      "type": "string",
      "minLength": 1,
      "maxLength": 180
    },
    "templateKey": {
      "default": "broadcast.news",
      "type": "string",
      "enum": [
        "broadcast.news",
        "broadcast.challenge",
        "broadcast.event",
        "broadcast.service"
      ]
    },
    "emailDesignId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "ctaLabel": {
      "type": "string",
      "maxLength": 80
    },
    "ctaPath": {
      "type": "string",
      "maxLength": 500
    },
    "preheader": {
      "type": "string",
      "maxLength": 180
    },
    "body": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4000
    },
    "channels": {
      "default": [
        "TELEGRAM"
      ],
      "minItems": 1,
      "maxItems": 3,
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "TELEGRAM",
          "WEB_PUSH",
          "EMAIL"
        ]
      }
    },
    "scheduledAt": {
      "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "number"
        }
      ]
    },
    "payload": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    }
  },
  "required": [
    "type",
    "title",
    "body"
  ]
}
notifications.notificationClaimSchema
ПолеТип / обязательностьОграничения
limitinteger
может отсутствовать
default: 10; minimum: 1; maximum: 50
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "limit": {
      "default": 10,
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    }
  }
}
notifications.notificationRulesSchema
ПолеТип / обязательностьОграничения
rulesмассив (object)
обязательно
maxItems: 100
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "rules": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "type": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "enabled": {
            "type": "boolean"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 180
          },
          "body": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          },
          "buttonText": {
            "type": "string",
            "maxLength": 80
          },
          "buttonUrl": {
            "type": "string",
            "maxLength": 500
          },
          "conditionMode": {
            "type": "string",
            "enum": [
              "ALL",
              "ANY"
            ]
          },
          "conditions": {
            "maxItems": 10,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string",
                  "enum": [
                    "routeColor",
                    "attemptNumber",
                    "pointsAwarded",
                    "completedRoutes",
                    "durationSeconds",
                    "routeId",
                    "gymId",
                    "challengeId",
                    "challengeTitle",
                    "followerName",
                    "level",
                    "levelTitle",
                    "streakWeeks",
                    "divisionName"
                  ]
                },
                "operator": {
                  "type": "string",
                  "enum": [
                    "EQ",
                    "NEQ",
                    "GT",
                    "GTE",
                    "LT",
                    "LTE",
                    "CONTAINS"
                  ]
                },
                "value": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                }
              },
              "required": [
                "field",
                "operator",
                "value"
              ]
            }
          },
          "channels": {
            "minItems": 1,
            "maxItems": 2,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "IN_APP",
                "EMAIL"
              ]
            }
          }
        },
        "required": [
          "id",
          "type",
          "label",
          "enabled",
          "title",
          "body",
          "buttonText",
          "buttonUrl",
          "conditionMode",
          "conditions",
          "channels"
        ]
      }
    }
  },
  "required": [
    "rules"
  ]
}
notifications.notificationTypeFilterSchema

Тип: string / null. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    {
      "type": "null"
    }
  ]
}
notifications.pushQueueSchema
ПолеТип / обязательностьОграничения
limitinteger
может отсутствовать
default: 25; minimum: 1; maximum: 50
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "limit": {
      "default": 25,
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    }
  }
}
notifications.pushSubscriptionSchema
ПолеТип / обязательностьОграничения
endpointstring
обязательно
maxLength: 2048
keysobject
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "endpoint": {
      "type": "string",
      "maxLength": 2048
    },
    "keys": {
      "type": "object",
      "properties": {
        "p256dh": {
          "type": "string",
          "minLength": 80,
          "maxLength": 100,
          "pattern": "^[A-Za-z0-9_-]+={0,2}$"
        },
        "auth": {
          "type": "string",
          "minLength": 20,
          "maxLength": 30,
          "pattern": "^[A-Za-z0-9_-]+={0,2}$"
        }
      },
      "required": [
        "p256dh",
        "auth"
      ]
    }
  },
  "required": [
    "endpoint",
    "keys"
  ]
}
notifications.pushSubscriptionStatusSchema
ПолеТип / обязательностьОграничения
endpointstring
обязательно
minLength: 1; maxLength: 2048
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "endpoint": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2048
    }
  },
  "required": [
    "endpoint"
  ]
}
notifications.pushUnsubscribeSchema
ПолеТип / обязательностьОграничения
endpointstring
обязательно
maxLength: 2048
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "endpoint": {
      "type": "string",
      "maxLength": 2048
    }
  },
  "required": [
    "endpoint"
  ]
}
personal-quests.PersonalQuestSettingsSchema
ПолеТип / обязательностьОграничения
pointsRewardinteger
обязательно
minimum: 0; maximum: 100000
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "pointsReward": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100000
    }
  },
  "required": [
    "pointsReward"
  ],
  "additionalProperties": false
}
profile.profileActivityPeriodSchema

Тип: integer. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "default": 5,
  "type": "integer",
  "minimum": 1,
  "maximum": 60
}
profile.profileActivitySourceSchema

Тип: одно из: ["all","following","league"]. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "default": "all",
  "type": "string",
  "enum": [
    "all",
    "following",
    "league"
  ]
}
profile.profileActivityTypeSchema

Тип: одно из: ["all","climb","achievement","follow"]. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "default": "all",
  "type": "string",
  "enum": [
    "all",
    "climb",
    "achievement",
    "follow"
  ]
}
profile.profileAppearanceIdsSchema

Тип: массив (string). Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "minItems": 1,
  "maxItems": 50,
  "type": "array",
  "items": {
    "type": "string",
    "pattern": "^[a-zA-Z0-9_-]{1,100}$"
  }
}
profile.profileEventTypeSchema

Тип: одно из: ["all","POWER","ACHIEVEMENT","SECRET","FOLLOW","RANK"]. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "default": "all",
  "type": "string",
  "enum": [
    "all",
    "POWER",
    "ACHIEVEMENT",
    "SECRET",
    "FOLLOW",
    "RANK"
  ]
}
profile.profileStatisticsPeriodSchema

Тип: integer. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "integer",
  "minimum": 7,
  "maximum": 365
}
profile.referralClaimSchema
ПолеТип / обязательностьОграничения
pairinteger
обязательно
maximum: 1000000
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "pair": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 1000000
    }
  },
  "required": [
    "pair"
  ],
  "additionalProperties": false
}
rewards.rewardClaimSchema
ПолеТип / обязательностьОграничения
typeодно из: ["CHALLENGE","SECRET_CHALLENGE","ACHIEVEMENT","PERSONAL_QUEST"]
обязательно
—
idstring
обязательно
minLength: 1; maxLength: 191
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "CHALLENGE",
        "SECRET_CHALLENGE",
        "ACHIEVEMENT",
        "PERSONAL_QUEST"
      ]
    },
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 191
    }
  },
  "required": [
    "type",
    "id"
  ]
}
rewards.rewardType

Тип: одно из: ["CHALLENGE","SECRET_CHALLENGE","ACHIEVEMENT","PERSONAL_QUEST"]. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "string",
  "enum": [
    "CHALLENGE",
    "SECRET_CHALLENGE",
    "ACHIEVEMENT",
    "PERSONAL_QUEST"
  ]
}
routes.routeBulkSchema
ПолеТип / обязательностьОграничения
idsмассив (string)
обязательно
minItems: 1; maxItems: 200
actionодно из: ["PUBLISHED","ARCHIVED"]
обязательно
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ids": {
      "minItems": 1,
      "maxItems": 200,
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "action": {
      "type": "string",
      "enum": [
        "PUBLISHED",
        "ARCHIVED"
      ]
    }
  },
  "required": [
    "ids",
    "action"
  ]
}
routes.routeFieldsSchema
ПолеТип / обязательностьОграничения
gymIdstring
обязательно
minLength: 1
zoneIdstring
обязательно
minLength: 1
gradeIdstring
обязательно
minLength: 1
colorstring
обязательно
minLength: 1; maxLength: 40
installedAtstring / number
может отсутствовать
description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds."
removalDatestring / number / null
может отсутствовать
—
photoPathstring / null
может отсутствовать
—
minAgeinteger / null
может отсутствовать
—
recommendedMinHeightinteger / null
может отсутствовать
—
recommendedMaxHeightinteger / null
может отсутствовать
—
referenceTimeMsinteger / null
может отсутствовать
—
xNormalizednumber
обязательно
minimum: 0; maximum: 1
yNormalizednumber
обязательно
minimum: 0; maximum: 1
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "gymId": {
      "type": "string",
      "minLength": 1
    },
    "zoneId": {
      "type": "string",
      "minLength": 1
    },
    "gradeId": {
      "type": "string",
      "minLength": 1
    },
    "color": {
      "type": "string",
      "minLength": 1,
      "maxLength": 40
    },
    "installedAt": {
      "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "number"
        }
      ]
    },
    "removalDate": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "photoPath": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 500
        },
        {
          "type": "null"
        }
      ]
    },
    "minAge": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 5,
          "maximum": 110
        },
        {
          "type": "null"
        }
      ]
    },
    "recommendedMinHeight": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 80,
          "maximum": 250
        },
        {
          "type": "null"
        }
      ]
    },
    "recommendedMaxHeight": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 80,
          "maximum": 250
        },
        {
          "type": "null"
        }
      ]
    },
    "referenceTimeMs": {
      "anyOf": [
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "xNormalized": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "yNormalized": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    }
  },
  "required": [
    "gymId",
    "zoneId",
    "gradeId",
    "color",
    "xNormalized",
    "yNormalized"
  ]
}
routes.routePatchSchema
ПолеТип / обязательностьОграничения
gymIdstring
может отсутствовать
minLength: 1
zoneIdstring
может отсутствовать
minLength: 1
gradeIdstring
может отсутствовать
minLength: 1
colorstring
может отсутствовать
minLength: 1; maxLength: 40
installedAtstring / number
может отсутствовать
description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds."
removalDatestring / number / null
может отсутствовать
—
photoPathstring / null
может отсутствовать
—
minAgeinteger / null
может отсутствовать
—
recommendedMinHeightinteger / null
может отсутствовать
—
recommendedMaxHeightinteger / null
может отсутствовать
—
referenceTimeMsinteger / null
может отсутствовать
—
xNormalizednumber
может отсутствовать
minimum: 0; maximum: 1
yNormalizednumber
может отсутствовать
minimum: 0; maximum: 1
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "gymId": {
      "type": "string",
      "minLength": 1
    },
    "zoneId": {
      "type": "string",
      "minLength": 1
    },
    "gradeId": {
      "type": "string",
      "minLength": 1
    },
    "color": {
      "type": "string",
      "minLength": 1,
      "maxLength": 40
    },
    "installedAt": {
      "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "number"
        }
      ]
    },
    "removalDate": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "photoPath": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 500
        },
        {
          "type": "null"
        }
      ]
    },
    "minAge": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 5,
          "maximum": 110
        },
        {
          "type": "null"
        }
      ]
    },
    "recommendedMinHeight": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 80,
          "maximum": 250
        },
        {
          "type": "null"
        }
      ]
    },
    "recommendedMaxHeight": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 80,
          "maximum": 250
        },
        {
          "type": "null"
        }
      ]
    },
    "referenceTimeMs": {
      "anyOf": [
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "xNormalized": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "yNormalized": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    }
  }
}
routes.routeRatingSchema
ПолеТип / обязательностьОграничения
valueinteger
обязательно
minimum: 1; maximum: 5
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "value": {
      "type": "integer",
      "minimum": 1,
      "maximum": 5
    }
  },
  "required": [
    "value"
  ]
}
routes.routeStatusSchema

Тип: одно из: ["DRAFT","PUBLISHED","ARCHIVED","PENDING_DELETE"]. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "string",
  "enum": [
    "DRAFT",
    "PUBLISHED",
    "ARCHIVED",
    "PENDING_DELETE"
  ]
}
routes.routeWriteSchema
ПолеТип / обязательностьОграничения
gymIdstring
обязательно
minLength: 1
zoneIdstring
обязательно
minLength: 1
gradeIdstring
может отсутствовать
minLength: 1
colorstring
обязательно
minLength: 1; maxLength: 40
installedAtstring / number
может отсутствовать
description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds."
removalDatestring / number / null
может отсутствовать
—
photoPathstring / null
может отсутствовать
—
minAgeinteger / null
может отсутствовать
—
recommendedMinHeightinteger / null
может отсутствовать
—
recommendedMaxHeightinteger / null
может отсутствовать
—
referenceTimeMsinteger / null
может отсутствовать
—
xNormalizednumber
обязательно
minimum: 0; maximum: 1
yNormalizednumber
обязательно
minimum: 0; maximum: 1
quickboolean
может отсутствовать
default: false
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "gymId": {
      "type": "string",
      "minLength": 1
    },
    "zoneId": {
      "type": "string",
      "minLength": 1
    },
    "gradeId": {
      "type": "string",
      "minLength": 1
    },
    "color": {
      "type": "string",
      "minLength": 1,
      "maxLength": 40
    },
    "installedAt": {
      "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "number"
        }
      ]
    },
    "removalDate": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "photoPath": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 500
        },
        {
          "type": "null"
        }
      ]
    },
    "minAge": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 5,
          "maximum": 110
        },
        {
          "type": "null"
        }
      ]
    },
    "recommendedMinHeight": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 80,
          "maximum": 250
        },
        {
          "type": "null"
        }
      ]
    },
    "recommendedMaxHeight": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 80,
          "maximum": 250
        },
        {
          "type": "null"
        }
      ]
    },
    "referenceTimeMs": {
      "anyOf": [
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "xNormalized": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "yNormalized": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "quick": {
      "default": false,
      "type": "boolean"
    }
  },
  "required": [
    "gymId",
    "zoneId",
    "color",
    "xNormalized",
    "yNormalized"
  ]
}
rules.ruleDraftSchema
ПолеТип / обязательностьОграничения
definitionobject
обязательно
—
expectedRevisioninteger
может отсутствовать
minimum: 0; maximum: 9007199254740991
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "definition": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "expectedRevision": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "definition"
  ]
}
rules.rulePublishSchema
ПолеТип / обязательностьОграничения
expectedRevisioninteger
может отсутствовать
minimum: 0; maximum: 9007199254740991
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "expectedRevision": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  }
}
rules.ruleQueueSchema
ПолеТип / обязательностьОграничения
limitinteger
может отсутствовать
default: 100; minimum: 1; maximum: 500
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "limit": {
      "default": 100,
      "type": "integer",
      "minimum": 1,
      "maximum": 500
    }
  }
}
secret-challenges.rule

Тип: object. Вложенные определения и ссылки приведены в полной JSON-схеме.

Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "propertyNames": {
    "type": "string"
  },
  "additionalProperties": {}
}
secret-challenges.secretChallengeInput
ПолеТип / обязательностьОграничения
titlestring
обязательно
minLength: 2; maxLength: 160
descriptionstring
обязательно
minLength: 2; maxLength: 4000
startsAtstring / number / null
может отсутствовать
—
endsAtstring / number / null
может отсутствовать
—
pointsRewardinteger
может отсутствовать
default: 0; minimum: 0; maximum: 1000000
minPowernumber / null
может отсутствовать
—
maxPowernumber / null
может отсутствовать
—
rewardIconstring
может отсутствовать
default: "trophy"; minLength: 1; maxLength: 80
rewardColorstring
может отсутствовать
default: "#c60814"; pattern: "^#[0-9a-f]{6}$"
triggerRulesobject
обязательно
—
completionRulesobject
обязательно
—
statusодно из: ["DRAFT","SCHEDULED","ACTIVE","ARCHIVED"]
может отсутствовать
default: "DRAFT"
scopeодно из: ["NETWORK","GYM"]
обязательно
—
networkIdstring / null
может отсутствовать
—
gymIdstring / null
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "minLength": 2,
      "maxLength": 160
    },
    "description": {
      "type": "string",
      "minLength": 2,
      "maxLength": 4000
    },
    "startsAt": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "endsAt": {
      "anyOf": [
        {
          "description": "A valid date string (ISO 8601 recommended) or Unix time in milliseconds.",
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "number"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "pointsReward": {
      "default": 0,
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    },
    "minPower": {
      "anyOf": [
        {
          "type": "number",
          "minimum": 0,
          "maximum": 1000
        },
        {
          "type": "null"
        }
      ]
    },
    "maxPower": {
      "anyOf": [
        {
          "type": "number",
          "minimum": 0,
          "maximum": 1000
        },
        {
          "type": "null"
        }
      ]
    },
    "rewardIcon": {
      "default": "trophy",
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "rewardColor": {
      "default": "#c60814",
      "type": "string",
      "pattern": "^#[0-9a-f]{6}$"
    },
    "triggerRules": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "completionRules": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "status": {
      "default": "DRAFT",
      "type": "string",
      "enum": [
        "DRAFT",
        "SCHEDULED",
        "ACTIVE",
        "ARCHIVED"
      ]
    },
    "scope": {
      "type": "string",
      "enum": [
        "NETWORK",
        "GYM"
      ]
    },
    "networkId": {
      "type": [
        "string",
        "null"
      ]
    },
    "gymId": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "title",
    "description",
    "triggerRules",
    "completionRules",
    "scope"
  ]
}
shop.purchaseIntentSchema
ПолеТип / обязательностьОграничения
productIdstring
обязательно
minLength: 1
variantIdstring
может отсутствовать
—
quantityinteger
может отсутствовать
default: 1; minimum: 1; maximum: 20
promoCodestring
может отсутствовать
minLength: 3; maxLength: 40
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "productId": {
      "type": "string",
      "minLength": 1
    },
    "variantId": {
      "type": "string"
    },
    "quantity": {
      "default": 1,
      "type": "integer",
      "minimum": 1,
      "maximum": 20
    },
    "promoCode": {
      "type": "string",
      "minLength": 3,
      "maxLength": 40
    }
  },
  "required": [
    "productId"
  ]
}
users.networkCreateSchema
ПолеТип / обязательностьОграничения
namestring
обязательно
minLength: 1; maxLength: 180
descriptionstring / null
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 180
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 4000
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "name"
  ]
}
users.networkPatchSchema
ПолеТип / обязательностьОграничения
namestring
может отсутствовать
minLength: 1; maxLength: 180
descriptionstring / null
может отсутствовать
—
gymIdsмассив (string)
может отсутствовать
maxItems: 500
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 180
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 4000
        },
        {
          "type": "null"
        }
      ]
    },
    "gymIds": {
      "maxItems": 500,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    }
  }
}
users.selfProfilePatchSchema
ПолеТип / обязательностьОграничения
displayNamestring
может отсутствовать
minLength: 1; maxLength: 11; pattern: "^[^\\s#\\p{Cc}\\p{Cf}]+$"
ageinteger / null
может отсутствовать
—
heightCminteger / null
может отсутствовать
—
weightKgnumber / null
может отсутствовать
—
gymIdstring / null
может отсутствовать
—
biostring
может отсутствовать
maxLength: 500
telegramUsernamestring
может отсутствовать
maxLength: 80
profileAppearanceobject
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "displayName": {
      "type": "string",
      "minLength": 1,
      "maxLength": 11,
      "pattern": "^[^\\s#\\p{Cc}\\p{Cf}]+$"
    },
    "age": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 5,
          "maximum": 110
        },
        {
          "type": "null"
        }
      ]
    },
    "heightCm": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 80,
          "maximum": 250
        },
        {
          "type": "null"
        }
      ]
    },
    "weightKg": {
      "anyOf": [
        {
          "type": "number",
          "minimum": 20,
          "maximum": 300
        },
        {
          "type": "null"
        }
      ]
    },
    "gymId": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "null"
        }
      ]
    },
    "bio": {
      "type": "string",
      "maxLength": 500
    },
    "telegramUsername": {
      "type": "string",
      "maxLength": 80
    },
    "profileAppearance": {
      "type": "object",
      "properties": {
        "avatarColor": {
          "type": "string",
          "pattern": "^#[0-9a-fA-F]{6}$"
        },
        "avatarFrame": {
          "type": "string",
          "pattern": "^[a-z0-9-]{1,40}$"
        }
      }
    }
  }
}
users.userRolePatchSchema
ПолеТип / обязательностьОграничения
roleодно из: ["OWNER","NETWORK_ADMIN","GYM_ADMIN","ROUTE_SETTER","USER"]
обязательно
—
networkIdstring / null
может отсутствовать
—
gymIdstring / null
может отсутствовать
—
canPublishRoutesboolean
может отсутствовать
—
excludeFromAnalyticsboolean
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "role": {
      "type": "string",
      "enum": [
        "OWNER",
        "NETWORK_ADMIN",
        "GYM_ADMIN",
        "ROUTE_SETTER",
        "USER"
      ]
    },
    "networkId": {
      "type": [
        "string",
        "null"
      ]
    },
    "gymId": {
      "type": [
        "string",
        "null"
      ]
    },
    "canPublishRoutes": {
      "type": "boolean"
    },
    "excludeFromAnalytics": {
      "type": "boolean"
    }
  },
  "required": [
    "role"
  ]
}
users.userSettingsPatchInput
ПолеТип / обязательностьОграничения
notificationsEnabledboolean
может отсутствовать
—
routeUpdatesboolean
может отсутствовать
—
challengeRemindersboolean
может отсутствовать
—
followerAlertsboolean
может отсутствовать
—
progressionUpdatesboolean
может отсутствовать
—
leagueUpdatesboolean
может отсутствовать
—
streakRemindersboolean
может отсутствовать
—
reducedMotionboolean
может отсутствовать
—
analyticsConsentboolean
может отсутствовать
—
locationConsentboolean
может отсутствовать
—
mapTutorialCompletedboolean
может отсутствовать
—
pushPromptDismissedboolean
может отсутствовать
—
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "notificationsEnabled": {
      "type": "boolean"
    },
    "routeUpdates": {
      "type": "boolean"
    },
    "challengeReminders": {
      "type": "boolean"
    },
    "followerAlerts": {
      "type": "boolean"
    },
    "progressionUpdates": {
      "type": "boolean"
    },
    "leagueUpdates": {
      "type": "boolean"
    },
    "streakReminders": {
      "type": "boolean"
    },
    "reducedMotion": {
      "type": "boolean"
    },
    "analyticsConsent": {
      "type": "boolean"
    },
    "locationConsent": {
      "type": "boolean"
    },
    "mapTutorialCompleted": {
      "type": "boolean"
    },
    "pushPromptDismissed": {
      "type": "boolean"
    }
  }
}
users.userSettingsUpdateSchema
ПолеТип / обязательностьОграничения
notificationsEnabledboolean
может отсутствовать
—
routeUpdatesboolean
может отсутствовать
—
challengeRemindersboolean
может отсутствовать
—
followerAlertsboolean
может отсутствовать
—
progressionUpdatesboolean
может отсутствовать
—
leagueUpdatesboolean
может отсутствовать
—
streakRemindersboolean
может отсутствовать
—
reducedMotionboolean
может отсутствовать
—
analyticsConsentboolean
может отсутствовать
—
locationConsentboolean
может отсутствовать
—
mapTutorialCompletedboolean
может отсутствовать
—
pushPromptDismissedboolean
может отсутствовать
—
privacyPolicyVersionstring
может отсутствовать
minLength: 1; maxLength: 40
Полная JSON-схема
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "notificationsEnabled": {
      "type": "boolean"
    },
    "routeUpdates": {
      "type": "boolean"
    },
    "challengeReminders": {
      "type": "boolean"
    },
    "followerAlerts": {
      "type": "boolean"
    },
    "progressionUpdates": {
      "type": "boolean"
    },
    "leagueUpdates": {
      "type": "boolean"
    },
    "streakReminders": {
      "type": "boolean"
    },
    "reducedMotion": {
      "type": "boolean"
    },
    "analyticsConsent": {
      "type": "boolean"
    },
    "locationConsent": {
      "type": "boolean"
    },
    "mapTutorialCompleted": {
      "type": "boolean"
    },
    "pushPromptDismissed": {
      "type": "boolean"
    },
    "privacyPolicyVersion": {
      "type": "string",
      "minLength": 1,
      "maxLength": 40
    }
  }
}

26. Примеры HTTP-запросов

Публичная диагностика. HTTP 503 содержит диагностические данные при отказе readiness:

curl --include --fail-with-body \
  "$PLAYFIT_ORIGIN/api/heal/status" \
  --header "Accept: application/json"

Живая проверка CRM из браузера после входа OWNER. gymId — ID настроенного зала; Origin и session cookie передаются браузером:

const response = await fetch("/api/heal/crm", {
  method: "POST",
  credentials: "same-origin",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ gymId }),
});
const result = await response.json();
if (!response.ok) {
  throw new Error(`${result.error.code}: ${result.error.requestId}`);
}
// Результаты отдельных probes находятся в result.data.

Единая ошибка (код и сообщение зависят от операции):

{ "error": { "code": "AUTH_REQUIRED",
  "message": "<описание ошибки>", "requestId": "<request id>" } }

PLAYFIT_ORIGIN задаётся адресом нужного окружения. Пример ошибки показывает envelope; фактический код определяется операцией. Структура data опубликована в JSON-каталоге health.