PlayFit · Backend reference
Техническая документация
Архитектура сервисов, параметры окружения, модель данных, HTTP-контракты, авторизация, бизнес-процессы, интеграции и процедуры эксплуатации. Описание соответствует исходникам этой версии backend.
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-redisign | HTTP API, авторизация, доменные правила, Prisma, диагностика |
| playfit-web-redesign | Основной пользовательский интерфейс, /web-api proxy, защищённый media proxy |
| playfit-web-app | Отдельный пользовательский веб-клиент и его API adapters |
| playfit-admin-portal | Управление пользователями, контентом, спортом, CRM и магазином |
| playfit-deployment-infrastructure | Caddy, Compose, изоляция окружений, резервные копии и release workflows |
| src/server/domain → application → presentation | Вычисления без HTTP → сценарии и транзакции → клиентские DTO |
| src/server/contracts; docs/*.contracts.json | Runtime 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 |
| PostgreSQL | DATABASE_URL; DATABASE_POOL_MAX/MIN; DATABASE_POOL_*_TIMEOUT_MS; DATABASE_POOL_MAX_USES | Подключение и ограничения пула; значения зависят от нагрузки окружения |
| Сессия | JWT_SECRET; SESSION_COOKIE_NAME; SESSION_COOKIE_PATH | Ключ подписи и границы cookie; имя и путь валидируются сервером |
| Origin / URL | APP_ORIGIN; ADMIN_ORIGIN; API_PUBLIC_URL; PROXY_ORIGIN; APP_PUBLIC_URL; APP_BASE_PATH | CORS/CSRF allowlist и абсолютные ссылки. Для клиента на корне APP_BASE_PATH пустой |
| Файлы | STORAGE_ROOT | Корневой каталог runtime storage; в контейнере /app/storage |
| CRM | FITBASE_API_TOKEN; CRM_SYNC_INTERVAL_MS; CRM_SYNC_MIN_INTERVAL_MS | Серверная авторизация и интервалы sync; настройки филиалов хранятся отдельно по залам |
| EMAIL_PROVIDER; SMTP_*; EMAIL_FROM; EMAIL_REPLY_TO; EMAIL_UNSUBSCRIBE_SECRET; EMAIL_WORKER_POLL_MS | SMTP transport, шаблоны ссылок, отписка и опрос outbox | |
| Push / Telegram | WEB_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 email | PASSWORD_RESET_TTL_MS; EMAIL_MAX_RETRIES; EMAIL_OPERATIONAL_RECIPIENTS | Срок восстановления пароля, повторы и операционные адресаты |
| Политика | PRIVACY_POLICY_VERSION | Текущая версия обязательной политики |
| Stage QA | STAGE_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 | Отдельные временные базы и сети тестовых запусков |
| staging | stage-postgres / playfit_stage | Собственные БД, env и playfit-stage-storage |
| production | prod-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-клиента не отменяет уже завершённую транзакцию. Повтор мутации использует тот же поддерживаемый ключ операции; новый ключ может обозначать новое списание или действие.
| Статус | Семантика |
|---|---|
| 200 / 201 / 204 | Успех согласно контракту операции; пустой data/list не является транспортной ошибкой |
| 400 | Некорректный ввод или недопустимое сочетание параметров |
| 401 | Отсутствующая/недействительная сессия либо credential соответствующего протокола |
| 403 | Onboarding, роль, 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 выведен из эксплуатации для прежних запросов одобрения.
- Валидация регистрационных полей, версии политики, зала и уникальности идентификаторов.
- Транзакция аккаунта и outbox → cookie → подтверждение email по выданному security token.
- Login → проверка JWT/sessionVersion → разрешённые onboarding endpoints или завершённый onboarding.
- Доменная операция → повторная проверка роли, 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 после подтверждённого ответа.
- Проверка сессии, onboarding, зала, уровня и CRM-допуска.
- Создание/проверка Attempt; проверка режима, времени и допустимого результата.
- Транзакция записи результата и связанных изменений прогресса.
- Возврат 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 не журналируются.
| Элемент | Поведение |
|---|---|
| GET без Range | 200 с содержимым при наличии действующего права |
| GET с допустимым Range | 206; Content-Range соответствует диапазону; body содержит ровно запрошенные байты |
| Неподходящий Range | 416; приватность ответа сохраняется |
| HEAD | Статус/метаданные без тела; Content-Length может отсутствовать, при наличии соответствует GET |
| Private response | Cache-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. Внешний платёжный провайдер считается подключённым только при наличии соответствующей реализации и конфигурации.
- Чтение опубликованного каталога и актуального offer.
- Проверка покупки: пользователь, цена, баланс, срок и остаток.
- Транзакция заказа / ledger / inventory / выдачи доступа.
- Отдельные операции исполнения, отмены или возврата с 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.
| Состояние | Результат |
|---|---|
| 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 запускаются отдельно.
| Метод / путь | Доступ | Контракт |
|---|---|---|
| GET /api/heal/status | Public | 200/503 с data; отказ readiness сохраняет диагностический envelope |
| GET /api/heal/report | OWNER session | Core, конфигурация и per-gym история sync |
| POST /api/heal/crm | OWNER session + Origin | Строгий body { gymId }; /club-items, /client, /client/visits |
| GET /api/health | Public | Совместимый машинный health |
| GET /api/reference/{name} | Public | account / learning / inputs / health, сгенерированные JSON-каталоги |
| Проверка | Ограничение |
|---|---|
| PostgreSQL | SELECT 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 маршрутизации к зависимостям и затем к состоянию конкретной операции.
- Определить окружение и точную версию API/клиента.
- Проверить маршрут gateway и machine readiness.
- Сопоставить requestId со структурированным серверным журналом.
- Проверить onboarding/role/scope и данные доменной операции.
- Проверить живой провайдер и историю worker отдельно; зафиксировать результат без секретов.
| Код / признак | Проверка |
|---|---|
| AUTH_REQUIRED / INVALID_SESSION | Cookie name/path/Secure, подпись, срок JWT, актуальный sessionVersion |
| ACCOUNT_DISABLED | Историческая блокировка аккаунта; публичная регистрация её не отменяет |
| EMAIL_VERIFICATION_REQUIRED / PASSWORD_CHANGE_REQUIRED | Подтверждение email / завершение замены временного пароля |
| PHONE_REQUIRED / PHONE_LINK_REQUIRED | Номер, выбранный зал, однозначная связь CRM clientId |
| FEATURE_LOCKED / ROUTE_LOCKED | LevelDefinition, lifetime-прогресс и доступ к конкретному ресурсу |
| GYM_SCOPE_VIOLATION / NETWORK_SCOPE_VIOLATION | Назначенная область сотрудника и принадлежность целевого ресурса |
| INVALID_MEDIA_ACCESS / 416 | Срок и path binding билета / размер файла и Range |
| 503 + requestId | Core health, состояние PostgreSQL/storage, конфигурация и provider timeout |
| 404 на /api или /Api/heal при живом /api/health | Gateway 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
email | string может отсутствовать | minLength: 1; maxLength: 254 |
identifier | string может отсутствовать | minLength: 1; maxLength: 254 |
username | string может отсутствовать | minLength: 1; maxLength: 254 |
password | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
data | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
username | string может отсутствовать | minLength: 3; maxLength: 40 |
email | string обязательно | maxLength: 254 |
password | string обязательно | minLength: 8; maxLength: 128 |
displayName | string обязательно | minLength: 1; maxLength: 11; pattern: "^[^\\s#\\p{Cc}\\p{Cf}]+$" |
privacyConsentAccepted | true обязательно | — |
privacyPolicyVersion | string может отсутствовать | minLength: 1; maxLength: 100 |
analyticsConsent | boolean может отсутствовать | default: false |
locationConsent | boolean может отсутствовать | default: false |
marketingConsent | boolean может отсутствовать | default: false |
gymId | string / null может отсутствовать | — |
phone | string может отсутствовать | minLength: 10; maxLength: 40 |
referralCode | string может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
data | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
initData | string обязательно | minLength: 1; maxLength: 16000 |
referralCode | string может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
data | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
username | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
data | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
data | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
code | string обязательно | pattern: "^[A-Za-z0-9_-]{1,80}$" |
visitorId | 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)$" |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
data | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
email | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
data | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
email | string обязательно | minLength: 1; maxLength: 254 |
code | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
data | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
resetToken | string обязательно | minLength: 47; maxLength: 100 |
password | string обязательно | minLength: 8; maxLength: 128 |
passwordConfirmation | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
data | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
data | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
username | string обязательно | minLength: 3; maxLength: 40 |
currentPassword | string может отсутствовать | maxLength: 128 |
newPassword | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
data | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
nickname | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
data | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
data | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
phone | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
data | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
data | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
transactional | boolean может отсутствовать | — |
product | boolean может отсутствовать | — |
activity | boolean может отсутствовать | — |
marketing | boolean может отсутствовать | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
data | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
email | string может отсутствовать | maxLength: 254 |
Полная JSON-схема
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"email": {
"type": "string",
"maxLength": 254
}
}
}Ответ с data envelope
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
data | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
email | string может отсутствовать | maxLength: 254 |
Полная JSON-схема
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"email": {
"type": "string",
"maxLength": 254
}
}
}Ответ с data envelope
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
data | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
token | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
data | object обязательно | — |
Полная 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.
GET /api/email/unsubscribe
Состояние ссылки отписки
Доступ: без сессии. Успех: HTTP 200.
Query
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
token | string обязательно | — |
Полная JSON-схема
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"token": {
"type": "string"
}
},
"required": [
"token"
]
}Ответ с data envelope
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
data | object обязательно | — |
Полная 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.
POST /api/email/unsubscribe
Отписка
Доступ: без сессии. Успех: HTTP 200.
Query token takes precedence; the JSON body is read only when no query token is supplied.
Query
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
token | string может отсутствовать | — |
Полная JSON-схема
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"token": {
"type": "string"
}
}
}Тело запроса · application/json
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
token | string обязательно | — |
Полная JSON-схема
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"token": {
"type": "string"
}
},
"required": [
"token"
]
}Ответ с data envelope
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
data | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
data | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
policyVersion | string обязательно | minLength: 1; maxLength: 40 |
analyticsConsent | boolean может отсутствовать | — |
locationConsent | boolean может отсутствовать | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
data | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
url | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
progressSeconds | integer может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
progressSeconds | integer может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
progressSeconds | integer может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
progressSeconds | integer может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
progressSeconds | integer может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
progressSeconds | integer может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
slug | string обязательно | minLength: 2; maxLength: 120; pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$" |
title | string обязательно | minLength: 2; maxLength: 180 |
shortDescription | string обязательно | minLength: 2; maxLength: 500 |
body | string / null может отсутствовать | — |
coverUrl | string / null может отсутствовать | — |
contentType | одно из: ["VIDEO","TEXT","MIXED"] обязательно | — |
videoUrl | string / null может отсутствовать | — |
attachments | массив (object) может отсутствовать | default: []; maxItems: 30 |
author | string обязательно | minLength: 2; maxLength: 180 |
expert | string / null может отсутствовать | — |
goal | string / null может отсутствовать | — |
drills | массив (string) может отсутствовать | default: []; maxItems: 100 |
cues | массив (string) может отсутствовать | default: []; maxItems: 100 |
durationSeconds | integer обязательно | minimum: 0; maximum: 86400 |
difficulty | string обязательно | minLength: 1; maxLength: 80 |
tags | массив (string) может отсутствовать | default: []; maxItems: 100 |
equipment | массив (string) может отсутствовать | default: []; maxItems: 100 |
preview | boolean может отсутствовать | default: false |
status | одно из: ["DRAFT","SCHEDULED","PUBLISHED","ARCHIVED"] может отсутствовать | default: "DRAFT" |
scheduledAt | string / number / null может отсутствовать | — |
completionRules | object может отсутствовать | default: {"minimumPercent":90,"requireManualCompletion":false} |
offer | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
slug | string может отсутствовать | minLength: 2; maxLength: 120; pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$" |
title | string может отсутствовать | minLength: 2; maxLength: 180 |
shortDescription | string может отсутствовать | minLength: 2; maxLength: 500 |
body | string / null может отсутствовать | — |
coverUrl | string / null может отсутствовать | — |
contentType | одно из: ["VIDEO","TEXT","MIXED"] может отсутствовать | — |
videoUrl | string / null может отсутствовать | — |
attachments | массив (object) может отсутствовать | maxItems: 30 |
author | string может отсутствовать | minLength: 2; maxLength: 180 |
expert | string / null может отсутствовать | — |
goal | string / null может отсутствовать | — |
drills | массив (string) может отсутствовать | maxItems: 100 |
cues | массив (string) может отсутствовать | maxItems: 100 |
durationSeconds | integer может отсутствовать | minimum: 0; maximum: 86400 |
difficulty | string может отсутствовать | minLength: 1; maxLength: 80 |
tags | массив (string) может отсутствовать | maxItems: 100 |
equipment | массив (string) может отсутствовать | maxItems: 100 |
preview | boolean может отсутствовать | — |
status | одно из: ["DRAFT","SCHEDULED","PUBLISHED","ARCHIVED"] может отсутствовать | — |
scheduledAt | string / number / null может отсутствовать | — |
completionRules | object может отсутствовать | — |
offer | object может отсутствовать | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
slug | string обязательно | minLength: 2; maxLength: 120; pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$" |
title | string обязательно | minLength: 2; maxLength: 180 |
author | string обязательно | minLength: 2; maxLength: 180 |
expert | string / null может отсутствовать | — |
description | string обязательно | minLength: 2; maxLength: 30000 |
coverUrl | string / null может отсутствовать | — |
trailerUrl | string / null может отсутствовать | — |
audience | массив (string) может отсутствовать | default: []; maxItems: 100 |
outcomes | массив (string) может отсутствовать | default: []; maxItems: 100 |
equipment | массив (string) может отсутствовать | default: []; maxItems: 100 |
difficulty | string обязательно | minLength: 1; maxLength: 80 |
durationMinutes | integer обязательно | minimum: 0; maximum: 100000 |
status | одно из: ["DRAFT","SCHEDULED","PUBLISHED","ARCHIVED"] может отсутствовать | default: "DRAFT" |
scheduledAt | string / number / null может отсутствовать | — |
offer | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
slug | string может отсутствовать | minLength: 2; maxLength: 120; pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$" |
title | string может отсутствовать | minLength: 2; maxLength: 180 |
author | string может отсутствовать | minLength: 2; maxLength: 180 |
expert | string / null может отсутствовать | — |
description | string может отсутствовать | minLength: 2; maxLength: 30000 |
coverUrl | string / null может отсутствовать | — |
trailerUrl | string / null может отсутствовать | — |
audience | массив (string) может отсутствовать | maxItems: 100 |
outcomes | массив (string) может отсутствовать | maxItems: 100 |
equipment | массив (string) может отсутствовать | maxItems: 100 |
difficulty | string может отсутствовать | minLength: 1; maxLength: 80 |
durationMinutes | integer может отсутствовать | minimum: 0; maximum: 100000 |
status | одно из: ["DRAFT","SCHEDULED","PUBLISHED","ARCHIVED"] может отсутствовать | — |
scheduledAt | string / number / null может отсутствовать | — |
offer | object может отсутствовать | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
acknowledgePublishedChange | boolean может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
data | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
data | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
data | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
data | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
gymId | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
data | object обязательно | — |
Полная 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.
Все входные схемы · JSONaccount.emailChangeSchema
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
email | string может отсутствовать | maxLength: 254 |
Полная JSON-схема
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"email": {
"type": "string",
"maxLength": 254
}
}
}account.emailPreferencesSchema
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
transactional | boolean может отсутствовать | — |
product | boolean может отсутствовать | — |
activity | boolean может отсутствовать | — |
marketing | boolean может отсутствовать | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
recipient | string обязательно | maxLength: 254 |
variant | одно из: ["security","shop","activity","marketing","operational"] может отсутствовать | default: "marketing" |
templateId | 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)$" |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
token | string обязательно | — |
Полная JSON-схема
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"token": {
"type": "string"
}
},
"required": [
"token"
]
}account.emailVerificationSchema
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
token | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
nickname | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
phone | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
policyVersion | string обязательно | minLength: 1; maxLength: 40 |
analyticsConsent | boolean может отсутствовать | — |
locationConsent | boolean может отсутствовать | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
slug | string обязательно | minLength: 1; maxLength: 100; pattern: "^[\\p{L}\\p{N}-]+$" |
title | string обязательно | minLength: 1; maxLength: 120 |
description | string обязательно | minLength: 1; maxLength: 1000 |
icon | string обязательно | minLength: 1; maxLength: 100 |
iconColor | string может отсутствовать | default: "#c60814"; pattern: "^#[0-9a-fA-F]{6}$" |
visual | object может отсутствовать | — |
pointsReward | integer может отсутствовать | default: 0; minimum: 0; maximum: 1000000 |
criteria | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
title | string может отсутствовать | minLength: 1; maxLength: 120 |
description | string может отсутствовать | minLength: 1; maxLength: 1000 |
icon | string может отсутствовать | minLength: 1; maxLength: 100 |
iconColor | string может отсутствовать | pattern: "^#[0-9a-fA-F]{6}$" |
visual | object может отсутствовать | — |
pointsReward | integer может отсутствовать | minimum: 0; maximum: 1000000 |
criteria | object может отсутствовать | — |
expectedRuleRevision | integer может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
userId | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
id | 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 | 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 | одно из: ["SCREEN_VIEW","CLICK","ERROR"] обязательно | — |
screen | string обязательно | maxLength: 200; pattern: "^\\/[a-zA-Z0-9_/:.-]*$" |
target | string может отсутствовать | pattern: "^[a-z0-9._:/-]{1,160}$" |
errorCode | string может отсутствовать | pattern: "^[A-Z0-9_:-]{1,80}$" |
device | одно из: ["MOBILE","DESKTOP","TABLET","UNKNOWN"] может отсутствовать | — |
environment | одно из: ["production","stage","development","unknown"] может отсутствовать | — |
appVersion | string может отсутствовать | pattern: "^[a-zA-Z0-9._:-]{1,80}$" |
occurredAt | 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)))$" |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
title | string обязательно | minLength: 2; maxLength: 160 |
subtitle | string / null может отсутствовать | — |
imageUrl | string / null может отсутствовать | — |
ctaLabel | string / null может отсутствовать | — |
ctaUrl | string / null может отсутствовать | — |
placement | string обязательно | minLength: 2; maxLength: 80 |
targetSegment | object / null может отсутствовать | — |
sortOrder | integer может отсутствовать | default: 0; minimum: -9007199254740991; maximum: 9007199254740991 |
startsAt | string / number / null может отсутствовать | — |
endsAt | string / number / null может отсутствовать | — |
active | boolean может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
title | string обязательно | minLength: 2; maxLength: 160 |
subtitle | string / null может отсутствовать | — |
imageUrl | string / null может отсутствовать | — |
ctaLabel | string / null может отсутствовать | — |
ctaUrl | string / null может отсутствовать | — |
placement | string обязательно | minLength: 2; maxLength: 80 |
targetSegment | object / null может отсутствовать | — |
sortOrder | integer может отсутствовать | default: 0; minimum: -9007199254740991; maximum: 9007199254740991 |
startsAt | string / number / null может отсутствовать | — |
endsAt | string / number / null может отсутствовать | — |
active | boolean может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
title | string может отсутствовать | minLength: 2; maxLength: 160 |
subtitle | string / null может отсутствовать | — |
imageUrl | string / null может отсутствовать | — |
ctaLabel | string / null может отсутствовать | — |
ctaUrl | string / null может отсутствовать | — |
placement | string может отсутствовать | minLength: 2; maxLength: 80 |
targetSegment | object / null может отсутствовать | — |
sortOrder | integer может отсутствовать | minimum: -9007199254740991; maximum: 9007199254740991 |
startsAt | string / number / null может отсутствовать | — |
endsAt | string / number / null может отсутствовать | — |
active | boolean может отсутствовать | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
slug | string обязательно | pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$" |
name | string обязательно | minLength: 2; maxLength: 160 |
description | string обязательно | minLength: 2; maxLength: 20000 |
imageUrl | string / null может отсутствовать | — |
price | integer обязательно | minimum: 0; maximum: 9007199254740991 |
availableFrom | string / number может отсутствовать | description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds." |
availableUntil | string / number может отсутствовать | description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds." |
openingLimitPerUser | integer может отсутствовать | maximum: 9007199254740991 |
cooldownSeconds | integer может отсутствовать | minimum: 0; maximum: 9007199254740991 |
pityThreshold | integer может отсутствовать | maximum: 9007199254740991 |
status | одно из: ["DRAFT","SCHEDULED","ACTIVE","SOLD_OUT","EXPIRED","ARCHIVED"] может отсутствовать | default: "DRAFT" |
placement | одно из: ["PROMO","WEEKLY"] / null может отсутствовать | — |
placementTitle | string может отсутствовать | maxLength: 160 |
placementText | string может отсутствовать | maxLength: 300 |
rewardsPerOpening | 1 / 2 может отсутствовать | — |
secretChallengeWeight | integer может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
name | string обязательно | minLength: 2; maxLength: 120 |
slug | string обязательно | pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$" |
parentId | string / null может отсутствовать | — |
description | string может отсутствовать | — |
imageUrl | string / null может отсутствовать | — |
icon | string может отсутствовать | — |
sortOrder | integer может отсутствовать | default: 0; minimum: -9007199254740991; maximum: 9007199254740991 |
visible | boolean может отсутствовать | default: true |
status | одно из: ["DRAFT","PUBLISHED","ARCHIVED","PENDING_DELETE"] может отсутствовать | default: "DRAFT" |
metadata | object может отсутствовать | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
name | string может отсутствовать | minLength: 2; maxLength: 120 |
slug | string может отсутствовать | pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$" |
parentId | string / null может отсутствовать | — |
description | string может отсутствовать | — |
imageUrl | string / null может отсутствовать | — |
icon | string может отсутствовать | — |
sortOrder | integer может отсутствовать | minimum: -9007199254740991; maximum: 9007199254740991 |
visible | boolean может отсутствовать | — |
status | одно из: ["DRAFT","PUBLISHED","ARCHIVED","PENDING_DELETE"] может отсутствовать | — |
metadata | object может отсутствовать | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
slug | string обязательно | pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$" |
name | string обязательно | minLength: 2; maxLength: 160 |
description | string / null может отсутствовать | — |
imageUrl | string / null может отсутствовать | — |
mode | одно из: ["MANUAL","RULE_BASED"] может отсутствовать | default: "MANUAL" |
rules | object / null может отсутствовать | — |
visible | boolean может отсутствовать | default: true |
sortOrder | integer может отсутствовать | default: 0; minimum: -9007199254740991; maximum: 9007199254740991 |
startsAt | string / number / null может отсутствовать | — |
endsAt | string / 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
slug | string обязательно | pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$" |
name | string обязательно | minLength: 2; maxLength: 160 |
description | string / null может отсутствовать | — |
imageUrl | string / null может отсутствовать | — |
mode | одно из: ["MANUAL","RULE_BASED"] может отсутствовать | default: "MANUAL" |
rules | object / null может отсутствовать | — |
visible | boolean может отсутствовать | default: true |
sortOrder | integer может отсутствовать | default: 0; minimum: -9007199254740991; maximum: 9007199254740991 |
startsAt | string / number / null может отсутствовать | — |
endsAt | string / 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
slug | string может отсутствовать | pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$" |
name | string может отсутствовать | minLength: 2; maxLength: 160 |
description | string / null может отсутствовать | — |
imageUrl | string / null может отсутствовать | — |
mode | одно из: ["MANUAL","RULE_BASED"] может отсутствовать | — |
rules | object / null может отсутствовать | — |
visible | boolean может отсутствовать | — |
sortOrder | integer может отсутствовать | minimum: -9007199254740991; maximum: 9007199254740991 |
startsAt | string / number / null может отсутствовать | — |
endsAt | string / 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
quantity | integer обязательно | minimum: -9007199254740991; maximum: 9007199254740991 |
reason | string обязательно | 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 обязательно | — |
placementTitle | string может отсутствовать | maxLength: 160 |
placementText | string может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
reason | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
reason | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
amount | integer может отсутствовать | maximum: 9007199254740991 |
reason | string обязательно | minLength: 3; maxLength: 500 |
internalComment | string может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
productId | string обязательно | minLength: 1 |
weight | integer может отсутствовать | default: 1; minimum: 1; maximum: 10000 |
rarity | string может отсутствовать | default: "COMMON"; minLength: 2; maxLength: 40 |
stock | integer может отсутствовать | maximum: 9007199254740991 |
globalLimit | integer может отсутствовать | maximum: 9007199254740991 |
userLimit | integer может отсутствовать | maximum: 9007199254740991 |
guaranteed | boolean может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
categoryId | string обязательно | minLength: 1 |
slug | string обязательно | pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$" |
name | string обязательно | minLength: 2; maxLength: 160 |
shortDescription | string обязательно | minLength: 2; maxLength: 300 |
description | string обязательно | 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) может отсутствовать | — |
price | integer обязательно | minimum: 0; maximum: 9007199254740991 |
currency | string может отсутствовать | default: "TENGUS" |
oldPrice | integer может отсутствовать | minimum: 0; maximum: 9007199254740991 |
discountPercent | integer может отсутствовать | minimum: 0; maximum: 100 |
globalLimit | integer может отсутствовать | maximum: 9007199254740991 |
stockTracked | boolean может отсутствовать | default: false |
availableFrom | string / number может отсутствовать | description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds." |
availableUntil | string / number может отсутствовать | description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds." |
minLevel | integer может отсутствовать | maximum: 9007199254740991 |
requiredLeagueId | string может отсутствовать | — |
requiredAchievements | массив (string) может отсутствовать | — |
purchaseLimitPerUser | integer может отсутствовать | maximum: 9007199254740991 |
fulfillmentType | одно из: ["AUTO","PICKUP","RECEPTION","QR_RECEPTION","VOUCHER","MANUAL"] обязательно | — |
status | одно из: ["DRAFT","SCHEDULED","ACTIVE","SOLD_OUT","EXPIRED","ARCHIVED"] может отсутствовать | default: "DRAFT" |
cta | string может отсутствовать | maxLength: 80 |
sortOrder | integer может отсутствовать | default: 0; minimum: -9007199254740991; maximum: 9007199254740991 |
metadata | object может отсутствовать | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
categoryId | string обязательно | minLength: 1 |
slug | string обязательно | pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$" |
name | string обязательно | minLength: 2; maxLength: 160 |
shortDescription | string обязательно | minLength: 2; maxLength: 300 |
description | string обязательно | 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) может отсутствовать | — |
price | integer обязательно | minimum: 0; maximum: 9007199254740991 |
currency | string может отсутствовать | default: "TENGUS" |
oldPrice | integer может отсутствовать | minimum: 0; maximum: 9007199254740991 |
discountPercent | integer может отсутствовать | minimum: 0; maximum: 100 |
globalLimit | integer может отсутствовать | maximum: 9007199254740991 |
stockTracked | boolean может отсутствовать | default: false |
availableFrom | string / number может отсутствовать | description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds." |
availableUntil | string / number может отсутствовать | description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds." |
minLevel | integer может отсутствовать | maximum: 9007199254740991 |
requiredLeagueId | string может отсутствовать | — |
requiredAchievements | массив (string) может отсутствовать | — |
purchaseLimitPerUser | integer может отсутствовать | maximum: 9007199254740991 |
fulfillmentType | одно из: ["AUTO","PICKUP","RECEPTION","QR_RECEPTION","VOUCHER","MANUAL"] обязательно | — |
status | одно из: ["DRAFT","SCHEDULED","ACTIVE","SOLD_OUT","EXPIRED","ARCHIVED"] может отсутствовать | default: "DRAFT" |
cta | string может отсутствовать | maxLength: 80 |
sortOrder | integer может отсутствовать | default: 0; minimum: -9007199254740991; maximum: 9007199254740991 |
metadata | object может отсутствовать | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
categoryId | string может отсутствовать | minLength: 1 |
slug | string может отсутствовать | pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$" |
name | string может отсутствовать | minLength: 2; maxLength: 160 |
shortDescription | string может отсутствовать | minLength: 2; maxLength: 300 |
description | string может отсутствовать | 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) может отсутствовать | — |
price | integer может отсутствовать | minimum: 0; maximum: 9007199254740991 |
currency | string может отсутствовать | — |
oldPrice | integer может отсутствовать | minimum: 0; maximum: 9007199254740991 |
discountPercent | integer может отсутствовать | minimum: 0; maximum: 100 |
globalLimit | integer может отсутствовать | maximum: 9007199254740991 |
stockTracked | boolean может отсутствовать | — |
availableFrom | string / number может отсутствовать | description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds." |
availableUntil | string / number может отсутствовать | description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds." |
minLevel | integer может отсутствовать | maximum: 9007199254740991 |
requiredLeagueId | string может отсутствовать | — |
requiredAchievements | массив (string) может отсутствовать | — |
purchaseLimitPerUser | integer может отсутствовать | maximum: 9007199254740991 |
fulfillmentType | одно из: ["AUTO","PICKUP","RECEPTION","QR_RECEPTION","VOUCHER","MANUAL"] может отсутствовать | — |
status | одно из: ["DRAFT","SCHEDULED","ACTIVE","SOLD_OUT","EXPIRED","ARCHIVED"] может отсутствовать | — |
cta | string может отсутствовать | maxLength: 80 |
sortOrder | integer может отсутствовать | minimum: -9007199254740991; maximum: 9007199254740991 |
metadata | object может отсутствовать | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
code | string обязательно | minLength: 3; maxLength: 40 |
type | одно из: ["PERCENT","FIXED"] обязательно | — |
value | integer обязательно | maximum: 9007199254740991 |
validFrom | string / number обязательно | description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds." |
validUntil | string / number обязательно | description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds." |
maxUses | integer / null может отсутствовать | — |
maxUsesPerUser | integer может отсутствовать | default: 1; maximum: 9007199254740991 |
applicableProducts | массив (string) может отсутствовать | default: [] |
applicableCategories | массив (string) может отсутствовать | default: [] |
userSegments | массив (string) может отсутствовать | default: [] |
active | boolean может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
code | string обязательно | minLength: 3; maxLength: 40 |
type | одно из: ["PERCENT","FIXED"] обязательно | — |
value | integer обязательно | maximum: 9007199254740991 |
validFrom | string / number обязательно | description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds." |
validUntil | string / number обязательно | description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds." |
maxUses | integer / null может отсутствовать | — |
maxUsesPerUser | integer может отсутствовать | default: 1; maximum: 9007199254740991 |
applicableProducts | массив (string) может отсутствовать | default: [] |
applicableCategories | массив (string) может отсутствовать | default: [] |
userSegments | массив (string) может отсутствовать | default: [] |
active | boolean может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
code | string может отсутствовать | minLength: 3; maxLength: 40 |
type | одно из: ["PERCENT","FIXED"] может отсутствовать | — |
value | integer может отсутствовать | maximum: 9007199254740991 |
validFrom | string / number может отсутствовать | description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds." |
validUntil | string / number может отсутствовать | description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds." |
maxUses | integer / null может отсутствовать | — |
maxUsesPerUser | integer может отсутствовать | maximum: 9007199254740991 |
applicableProducts | массив (string) может отсутствовать | — |
applicableCategories | массив (string) может отсутствовать | — |
userSegments | массив (string) может отсутствовать | — |
active | boolean может отсутствовать | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
name | string обязательно | minLength: 2; maxLength: 160 |
type | одно из: ["PERCENT","FIXED"] обязательно | — |
value | integer обязательно | maximum: 9007199254740991 |
conditions | object / null может отсутствовать | — |
validFrom | string / number обязательно | description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds." |
validUntil | string / number обязательно | description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds." |
usageLimit | integer / null может отсутствовать | — |
active | boolean может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
name | string обязательно | minLength: 2; maxLength: 160 |
type | одно из: ["PERCENT","FIXED"] обязательно | — |
value | integer обязательно | maximum: 9007199254740991 |
conditions | object / null может отсутствовать | — |
validFrom | string / number обязательно | description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds." |
validUntil | string / number обязательно | description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds." |
usageLimit | integer / null может отсутствовать | — |
active | boolean может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
name | string может отсутствовать | minLength: 2; maxLength: 160 |
type | одно из: ["PERCENT","FIXED"] может отсутствовать | — |
value | integer может отсутствовать | maximum: 9007199254740991 |
conditions | object / null может отсутствовать | — |
validFrom | string / number может отсутствовать | description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds." |
validUntil | string / number может отсутствовать | description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds." |
usageLimit | integer / null может отсутствовать | — |
active | boolean может отсутствовать | — |
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"] обязательно | — |
entityId | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
amount | integer обязательно | minimum: -9007199254740991; maximum: 9007199254740991 |
reason | string обязательно | minLength: 3; maxLength: 500 |
internalComment | string может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
pointsMultipliers | object может отсутствовать | — |
powerWeights | object может отсутствовать | — |
recencyDays | integer может отсутствовать | minimum: 1; maximum: 365 |
recommendationWeights | object может отсутствовать | — |
popularityWeights | object может отсутствовать | — |
minimumAttemptDurationMs | integer может отсутствовать | minimum: 0; maximum: 600000 |
seasonDurationDays | integer может отсутствовать | minimum: 1; maximum: 90 |
streakSettings | object может отсутствовать | — |
followerRankSettings | object может отсутствовать | — |
Полная 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"] обязательно | — |
definition | object обязательно | — |
values | object обязательно | — |
periodStartsAt | 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 | 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 | string может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
name | string обязательно | minLength: 1; maxLength: 120 |
description | string обязательно | maxLength: 1000 |
subjectType | одно из: ["CHALLENGE","ACHIEVEMENT"] / null может отсутствовать | — |
networkId | string / null может отсутствовать | — |
gymId | string / null может отсутствовать | — |
definition | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
name | string может отсутствовать | minLength: 1; maxLength: 120 |
description | string может отсутствовать | maxLength: 1000 |
definition | object может отсутствовать | — |
expectedRevision | integer обязательно | 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"] обязательно | — |
definition | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
days | integer может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
userId | string обязательно | minLength: 1 |
from | 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 | 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 | integer обязательно | minimum: 4; maximum: 10000 |
status | одно из: ["PENDING","CONFIRMED","DISMISSED"] обязательно | — |
comment | string может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
submissionId | 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 | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
routeId | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
username | string обязательно | minLength: 3; maxLength: 40 |
currentPassword | string может отсутствовать | maxLength: 128 |
newPassword | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
username | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
email | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
email | string может отсутствовать | minLength: 1; maxLength: 254 |
identifier | string может отсутствовать | minLength: 1; maxLength: 254 |
username | string может отсутствовать | minLength: 1; maxLength: 254 |
password | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
code | string обязательно | pattern: "^[A-Za-z0-9_-]{1,80}$" |
visitorId | 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)$" |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
username | string может отсутствовать | minLength: 3; maxLength: 40 |
email | string обязательно | maxLength: 254 |
password | string обязательно | minLength: 8; maxLength: 128 |
displayName | string обязательно | minLength: 1; maxLength: 11; pattern: "^[^\\s#\\p{Cc}\\p{Cf}]+$" |
privacyConsentAccepted | true обязательно | — |
privacyPolicyVersion | string может отсутствовать | minLength: 1; maxLength: 100 |
analyticsConsent | boolean может отсутствовать | default: false |
locationConsent | boolean может отсутствовать | default: false |
marketingConsent | boolean может отсутствовать | default: false |
gymId | string / null может отсутствовать | — |
phone | string может отсутствовать | minLength: 10; maxLength: 40 |
referralCode | string может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
resetToken | string обязательно | minLength: 47; maxLength: 100 |
password | string обязательно | minLength: 8; maxLength: 128 |
passwordConfirmation | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
initData | string обязательно | minLength: 1; maxLength: 16000 |
referralCode | string может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
email | string обязательно | minLength: 1; maxLength: 254 |
code | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
networkId | string / null может отсутствовать | — |
gymId | string / null может отсутствовать | — |
title | string обязательно | minLength: 1; maxLength: 180 |
description | string обязательно | maxLength: 5000 |
startsAt | string / number обязательно | description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds." |
endsAt | string / number обязательно | description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds." |
trophyId | string / null может отсутствовать | — |
pointsReward | integer может отсутствовать | default: 0; minimum: 0; maximum: 9007199254740991 |
minLevel | integer может отсутствовать | default: 1; minimum: 1; maximum: 99 |
minPower | number / null может отсутствовать | — |
maxPower | number / null может отсутствовать | — |
rewardIcon | string может отсутствовать | default: "trophy"; minLength: 1; maxLength: 100 |
rewardColor | string может отсутствовать | default: "#c60814"; pattern: "^#[0-9a-fA-F]{6}$" |
scope | одно из: ["NETWORK","GYM"] обязательно | — |
rules | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
networkId | string / null может отсутствовать | — |
gymId | string / null может отсутствовать | — |
title | string может отсутствовать | minLength: 1; maxLength: 180 |
description | string может отсутствовать | maxLength: 5000 |
startsAt | string / number может отсутствовать | description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds." |
endsAt | string / number может отсутствовать | description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds." |
trophyId | string / null может отсутствовать | — |
pointsReward | integer может отсутствовать | minimum: 0; maximum: 9007199254740991 |
minLevel | integer может отсутствовать | minimum: 1; maximum: 99 |
minPower | number / null может отсутствовать | — |
maxPower | number / null может отсутствовать | — |
rewardIcon | string может отсутствовать | minLength: 1; maxLength: 100 |
rewardColor | string может отсутствовать | pattern: "^#[0-9a-fA-F]{6}$" |
scope | одно из: ["NETWORK","GYM"] может отсутствовать | — |
status | одно из: ["DRAFT","SCHEDULED","ACTIVE","FINISHED","CANCELLED"] может отсутствовать | — |
rules | object может отсутствовать | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
routeId | string обязательно | minLength: 1 |
value | 1 / 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
from | 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 | 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)))$" |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
version | 1 обязательно | — |
viewer | string обязательно | minLength: 1; maxLength: 100 |
kind | одно из: ["followers","following"] обязательно | — |
at | 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 | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
width | number обязательно | — |
height | number обязательно | — |
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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
advice | string / null может отсутствовать | — |
hint | string / 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
progressSeconds | integer может отсутствовать | minimum: 0; maximum: 9007199254740991 |
completed | boolean может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
day | string обязательно | pattern: "^\\d{4}-\\d{2}-\\d{2}$" |
after | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
clubId | integer обязательно | maximum: 9007199254740991 |
domain | string может отсутствовать | pattern: "^[a-z0-9][a-z0-9-]{0,62}$" |
enabled | boolean обязательно | — |
windowHours | integer может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
gymId | string обязательно | minLength: 1 |
clientId | integer обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
gymId | string обязательно | minLength: 1 |
q | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
gymId | string обязательно | minLength: 1 |
clubId | integer обязательно | maximum: 9007199254740991 |
domain | string может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
gymId | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
limit | integer может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
name | string обязательно | minLength: 1; maxLength: 100 |
rank | integer обязательно | 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"] обязательно | — |
meetingId | string может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
name | string может отсутствовать | minLength: 1; maxLength: 100 |
rank | integer может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
leagueId | string обязательно | minLength: 1 |
seasonId | string обязательно | minLength: 1 |
networkId | string / null может отсутствовать | — |
title | string обязательно | minLength: 1; maxLength: 160 |
startsAt | 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 | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
leagueId | string может отсутствовать | minLength: 1 |
seasonId | string может отсутствовать | minLength: 1 |
networkId | string / null может отсутствовать | — |
title | string может отсутствовать | minLength: 1; maxLength: 160 |
startsAt | 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 | string может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
slug | string обязательно | minLength: 2; maxLength: 120; pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$" |
title | string обязательно | minLength: 2; maxLength: 180 |
author | string обязательно | minLength: 2; maxLength: 180 |
expert | string / null может отсутствовать | — |
description | string обязательно | minLength: 2; maxLength: 30000 |
coverUrl | string / null может отсутствовать | — |
trailerUrl | string / null может отсутствовать | — |
audience | массив (string) может отсутствовать | default: []; maxItems: 100 |
outcomes | массив (string) может отсутствовать | default: []; maxItems: 100 |
equipment | массив (string) может отсутствовать | default: []; maxItems: 100 |
difficulty | string обязательно | minLength: 1; maxLength: 80 |
durationMinutes | integer обязательно | minimum: 0; maximum: 100000 |
status | одно из: ["DRAFT","SCHEDULED","PUBLISHED","ARCHIVED"] может отсутствовать | default: "DRAFT" |
scheduledAt | string / number / null может отсутствовать | — |
offer | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
slug | string обязательно | minLength: 2; maxLength: 120; pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$" |
title | string обязательно | minLength: 2; maxLength: 180 |
author | string обязательно | minLength: 2; maxLength: 180 |
expert | string / null может отсутствовать | — |
description | string обязательно | minLength: 2; maxLength: 30000 |
coverUrl | string / null может отсутствовать | — |
trailerUrl | string / null может отсутствовать | — |
audience | массив (string) может отсутствовать | default: []; maxItems: 100 |
outcomes | массив (string) может отсутствовать | default: []; maxItems: 100 |
equipment | массив (string) может отсутствовать | default: []; maxItems: 100 |
difficulty | string обязательно | minLength: 1; maxLength: 80 |
durationMinutes | integer обязательно | minimum: 0; maximum: 100000 |
status | одно из: ["DRAFT","SCHEDULED","PUBLISHED","ARCHIVED"] может отсутствовать | default: "DRAFT" |
scheduledAt | string / number / null может отсутствовать | — |
offer | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
slug | string может отсутствовать | minLength: 2; maxLength: 120; pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$" |
title | string может отсутствовать | minLength: 2; maxLength: 180 |
author | string может отсутствовать | minLength: 2; maxLength: 180 |
expert | string / null может отсутствовать | — |
description | string может отсутствовать | minLength: 2; maxLength: 30000 |
coverUrl | string / null может отсутствовать | — |
trailerUrl | string / null может отсутствовать | — |
audience | массив (string) может отсутствовать | maxItems: 100 |
outcomes | массив (string) может отсутствовать | maxItems: 100 |
equipment | массив (string) может отсутствовать | maxItems: 100 |
difficulty | string может отсутствовать | minLength: 1; maxLength: 80 |
durationMinutes | integer может отсутствовать | minimum: 0; maximum: 100000 |
status | одно из: ["DRAFT","SCHEDULED","PUBLISHED","ARCHIVED"] может отсутствовать | — |
scheduledAt | string / number / null может отсутствовать | — |
offer | object может отсутствовать | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
progressSeconds | integer может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
slug | string обязательно | minLength: 2; maxLength: 120; pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$" |
title | string обязательно | minLength: 2; maxLength: 180 |
shortDescription | string обязательно | minLength: 2; maxLength: 500 |
body | string / null может отсутствовать | — |
coverUrl | string / null может отсутствовать | — |
contentType | одно из: ["VIDEO","TEXT","MIXED"] обязательно | — |
videoUrl | string / null может отсутствовать | — |
attachments | массив (object) может отсутствовать | default: []; maxItems: 30 |
author | string обязательно | minLength: 2; maxLength: 180 |
expert | string / null может отсутствовать | — |
goal | string / null может отсутствовать | — |
drills | массив (string) может отсутствовать | default: []; maxItems: 100 |
cues | массив (string) может отсутствовать | default: []; maxItems: 100 |
durationSeconds | integer обязательно | minimum: 0; maximum: 86400 |
difficulty | string обязательно | minLength: 1; maxLength: 80 |
tags | массив (string) может отсутствовать | default: []; maxItems: 100 |
equipment | массив (string) может отсутствовать | default: []; maxItems: 100 |
preview | boolean может отсутствовать | default: false |
status | одно из: ["DRAFT","SCHEDULED","PUBLISHED","ARCHIVED"] может отсутствовать | default: "DRAFT" |
scheduledAt | string / number / null может отсутствовать | — |
completionRules | object может отсутствовать | default: {"minimumPercent":90,"requireManualCompletion":false} |
offer | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
slug | string обязательно | minLength: 2; maxLength: 120; pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$" |
title | string обязательно | minLength: 2; maxLength: 180 |
shortDescription | string обязательно | minLength: 2; maxLength: 500 |
body | string / null может отсутствовать | — |
coverUrl | string / null может отсутствовать | — |
contentType | одно из: ["VIDEO","TEXT","MIXED"] обязательно | — |
videoUrl | string / null может отсутствовать | — |
attachments | массив (object) может отсутствовать | default: []; maxItems: 30 |
author | string обязательно | minLength: 2; maxLength: 180 |
expert | string / null может отсутствовать | — |
goal | string / null может отсутствовать | — |
drills | массив (string) может отсутствовать | default: []; maxItems: 100 |
cues | массив (string) может отсутствовать | default: []; maxItems: 100 |
durationSeconds | integer обязательно | minimum: 0; maximum: 86400 |
difficulty | string обязательно | minLength: 1; maxLength: 80 |
tags | массив (string) может отсутствовать | default: []; maxItems: 100 |
equipment | массив (string) может отсутствовать | default: []; maxItems: 100 |
preview | boolean может отсутствовать | default: false |
status | одно из: ["DRAFT","SCHEDULED","PUBLISHED","ARCHIVED"] может отсутствовать | default: "DRAFT" |
scheduledAt | string / number / null может отсутствовать | — |
completionRules | object может отсутствовать | default: {"minimumPercent":90,"requireManualCompletion":false} |
offer | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
slug | string может отсутствовать | minLength: 2; maxLength: 120; pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$" |
title | string может отсутствовать | minLength: 2; maxLength: 180 |
shortDescription | string может отсутствовать | minLength: 2; maxLength: 500 |
body | string / null может отсутствовать | — |
coverUrl | string / null может отсутствовать | — |
contentType | одно из: ["VIDEO","TEXT","MIXED"] может отсутствовать | — |
videoUrl | string / null может отсутствовать | — |
attachments | массив (object) может отсутствовать | maxItems: 30 |
author | string может отсутствовать | minLength: 2; maxLength: 180 |
expert | string / null может отсутствовать | — |
goal | string / null может отсутствовать | — |
drills | массив (string) может отсутствовать | maxItems: 100 |
cues | массив (string) может отсутствовать | maxItems: 100 |
durationSeconds | integer может отсутствовать | minimum: 0; maximum: 86400 |
difficulty | string может отсутствовать | minLength: 1; maxLength: 80 |
tags | массив (string) может отсутствовать | maxItems: 100 |
equipment | массив (string) может отсутствовать | maxItems: 100 |
preview | boolean может отсутствовать | — |
status | одно из: ["DRAFT","SCHEDULED","PUBLISHED","ARCHIVED"] может отсутствовать | — |
scheduledAt | string / number / null может отсутствовать | — |
completionRules | object может отсутствовать | — |
offer | object может отсутствовать | — |
Полная 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"] обязательно | — |
price | integer может отсутствовать | default: 0; minimum: 0; maximum: 9007199254740991 |
oldPrice | integer / null может отсутствовать | — |
availableFrom | string / number / null может отсутствовать | — |
availableUntil | string / number / null может отсутствовать | — |
purchaseLimitPerUser | integer / 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
acknowledgePublishedChange | boolean может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
region | string / null может отсутствовать | — |
region_with_type | string / null может отсутствовать | — |
region_type_full | string / null может отсутствовать | — |
city | string / null может отсутствовать | — |
city_with_type | string / null может отсутствовать | — |
city_fias_id | string / null может отсутствовать | — |
settlement | string / null может отсутствовать | — |
settlement_with_type | string / null может отсутствовать | — |
settlement_fias_id | string / null может отсутствовать | — |
street_with_type | string / null может отсутствовать | — |
house_type | string / null может отсутствовать | — |
house | string / null может отсутствовать | — |
block_type | string / null может отсутствовать | — |
block | string / null может отсутствовать | — |
fias_id | string / null может отсутствовать | — |
geo_lat | string / null может отсутствовать | — |
geo_lon | string / 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
sessionId | 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 | number обязательно | minimum: -90; maximum: 90 |
longitude | number обязательно | minimum: -180; maximum: 180 |
accuracyMeters | number обязательно | maximum: 100000 |
permissionState | одно из: ["granted"] обязательно | — |
occurredAt | 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)))$" |
Полная 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"] обязательно | — |
incompleteOnly | boolean обязательно | — |
mapId | string / 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
networkId | string / null может отсутствовать | — |
name | string обязательно | minLength: 1; maxLength: 180 |
description | string может отсутствовать | default: ""; maxLength: 4000 |
timezone | string может отсутствовать | default: "Europe/Moscow"; minLength: 1; maxLength: 80 |
status | string может отсутствовать | default: "ACTIVE"; maxLength: 40 |
locality | string обязательно | minLength: 1; maxLength: 180 |
region | string может отсутствовать | default: ""; maxLength: 180 |
localityFiasId | string / null может отсутствовать | — |
address | string обязательно | minLength: 1; maxLength: 500 |
addressFiasId | string / null может отсутствовать | — |
latitude | number / null может отсутствовать | — |
longitude | number / 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
locality | string обязательно | minLength: 1; maxLength: 180 |
region | string может отсутствовать | default: ""; maxLength: 180 |
localityFiasId | string / null может отсутствовать | — |
address | string обязательно | minLength: 1; maxLength: 500 |
addressFiasId | string / null может отсутствовать | — |
latitude | number / null может отсутствовать | — |
longitude | number / 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
name | string может отсутствовать | minLength: 1; maxLength: 180 |
description | string может отсутствовать | maxLength: 4000 |
timezone | string может отсутствовать | minLength: 1; maxLength: 80 |
status | string может отсутствовать | maxLength: 40 |
locality | string может отсутствовать | minLength: 1; maxLength: 180 |
region | string может отсутствовать | maxLength: 180 |
localityFiasId | string / null может отсутствовать | — |
address | string может отсутствовать | minLength: 1; maxLength: 500 |
addressFiasId | string / null может отсутствовать | — |
latitude | number / null может отсутствовать | — |
longitude | number / 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
gymId | string обязательно | minLength: 1 |
Полная JSON-схема
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"gymId": {
"type": "string",
"minLength": 1
}
},
"required": [
"gymId"
]
}maps.hallPatchSchema
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
name | string может отсутствовать | minLength: 1; maxLength: 180 |
description | string может отсутствовать | maxLength: 4000 |
sortOrder | integer может отсутствовать | 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"] обязательно | — |
query | string обязательно | minLength: 2; maxLength: 200 |
localityFiasId | string может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
label | string обязательно | minLength: 1; maxLength: 80 |
number | integer обязательно | minimum: 1; maximum: 999 |
color | string обязательно | pattern: "^#[0-9a-fA-F]{6}$" |
xNormalized | number обязательно | minimum: 0; maximum: 1 |
yNormalized | number обязательно | minimum: 0; maximum: 1 |
widthNormalized | number обязательно | maximum: 1 |
heightNormalized | number обязательно | maximum: 1 |
polygon | массив (object) / null может отсутствовать | — |
routeLimit | integer обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
label | string может отсутствовать | minLength: 1; maxLength: 80 |
number | integer может отсутствовать | minimum: 1; maximum: 999 |
color | string может отсутствовать | pattern: "^#[0-9a-fA-F]{6}$" |
xNormalized | number может отсутствовать | minimum: 0; maximum: 1 |
yNormalized | number может отсутствовать | minimum: 0; maximum: 1 |
widthNormalized | number может отсутствовать | maximum: 1 |
heightNormalized | number может отсутствовать | maximum: 1 |
polygon | массив (object) / null может отсутствовать | — |
routeLimit | integer может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
label | string обязательно | minLength: 1; maxLength: 80 |
number | integer может отсутствовать | minimum: 1; maximum: 999 |
color | string может отсутствовать | default: "#c60814"; pattern: "^#[0-9a-fA-F]{6}$" |
xNormalized | number обязательно | minimum: 0; maximum: 1 |
yNormalized | number обязательно | minimum: 0; maximum: 1 |
widthNormalized | number может отсутствовать | default: 0.25; maximum: 1 |
heightNormalized | number может отсутствовать | default: 0.25; maximum: 1 |
polygon | массив (object) / null может отсутствовать | — |
routeLimit | integer может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
url | string обязательно | maxLength: 2000 |
Полная JSON-схема
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"url": {
"type": "string",
"maxLength": 2000
}
},
"required": [
"url"
]
}media.mediaAccessResponseSchema
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
url | string обязательно | — |
expiresAt | 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))$" |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
version | 1 обязательно | — |
userId | string обязательно | minLength: 1; maxLength: 128 |
sessionVersion | integer обязательно | minimum: 0; maximum: 9007199254740991 |
path | string обязательно | minLength: 1; maxLength: 2000 |
expiresAt | integer обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
expectedPrice | integer может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
id | string обязательно | — |
error | string может отсутствовать | 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"] может отсутствовать | — |
userId | string / null может отсутствовать | — |
gymId | string / null может отсутствовать | — |
networkId | string / null может отсутствовать | — |
type | string обязательно | minLength: 1; maxLength: 80 |
title | string обязательно | minLength: 1; maxLength: 180 |
subject | string может отсутствовать | minLength: 1; maxLength: 180 |
templateKey | одно из: ["broadcast.news","broadcast.challenge","broadcast.event","broadcast.service"] может отсутствовать | default: "broadcast.news" |
emailDesignId | 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 | string может отсутствовать | maxLength: 80 |
ctaPath | string может отсутствовать | maxLength: 500 |
preheader | string может отсутствовать | maxLength: 180 |
body | string обязательно | minLength: 1; maxLength: 4000 |
channels | массив (одно из: ["TELEGRAM","WEB_PUSH","EMAIL"]) может отсутствовать | default: ["TELEGRAM"]; minItems: 1; maxItems: 3 |
scheduledAt | string / number может отсутствовать | description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds." |
payload | object может отсутствовать | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
limit | integer может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
limit | integer может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
endpoint | string обязательно | maxLength: 2048 |
keys | object обязательно | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
endpoint | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
endpoint | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
pointsReward | integer обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
pair | integer обязательно | 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"] обязательно | — |
id | string обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
gymId | string обязательно | minLength: 1 |
zoneId | string обязательно | minLength: 1 |
gradeId | string обязательно | minLength: 1 |
color | string обязательно | minLength: 1; maxLength: 40 |
installedAt | string / number может отсутствовать | description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds." |
removalDate | string / number / null может отсутствовать | — |
photoPath | string / null может отсутствовать | — |
minAge | integer / null может отсутствовать | — |
recommendedMinHeight | integer / null может отсутствовать | — |
recommendedMaxHeight | integer / null может отсутствовать | — |
referenceTimeMs | integer / null может отсутствовать | — |
xNormalized | number обязательно | minimum: 0; maximum: 1 |
yNormalized | number обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
gymId | string может отсутствовать | minLength: 1 |
zoneId | string может отсутствовать | minLength: 1 |
gradeId | string может отсутствовать | minLength: 1 |
color | string может отсутствовать | minLength: 1; maxLength: 40 |
installedAt | string / number может отсутствовать | description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds." |
removalDate | string / number / null может отсутствовать | — |
photoPath | string / null может отсутствовать | — |
minAge | integer / null может отсутствовать | — |
recommendedMinHeight | integer / null может отсутствовать | — |
recommendedMaxHeight | integer / null может отсутствовать | — |
referenceTimeMs | integer / null может отсутствовать | — |
xNormalized | number может отсутствовать | minimum: 0; maximum: 1 |
yNormalized | number может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
value | integer обязательно | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
gymId | string обязательно | minLength: 1 |
zoneId | string обязательно | minLength: 1 |
gradeId | string может отсутствовать | minLength: 1 |
color | string обязательно | minLength: 1; maxLength: 40 |
installedAt | string / number может отсутствовать | description: "A valid date string (ISO 8601 recommended) or Unix time in milliseconds." |
removalDate | string / number / null может отсутствовать | — |
photoPath | string / null может отсутствовать | — |
minAge | integer / null может отсутствовать | — |
recommendedMinHeight | integer / null может отсутствовать | — |
recommendedMaxHeight | integer / null может отсутствовать | — |
referenceTimeMs | integer / null может отсутствовать | — |
xNormalized | number обязательно | minimum: 0; maximum: 1 |
yNormalized | number обязательно | minimum: 0; maximum: 1 |
quick | boolean может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
definition | object обязательно | — |
expectedRevision | integer может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
expectedRevision | integer может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
limit | integer может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
title | string обязательно | minLength: 2; maxLength: 160 |
description | string обязательно | minLength: 2; maxLength: 4000 |
startsAt | string / number / null может отсутствовать | — |
endsAt | string / number / null может отсутствовать | — |
pointsReward | integer может отсутствовать | default: 0; minimum: 0; maximum: 1000000 |
minPower | number / null может отсутствовать | — |
maxPower | number / null может отсутствовать | — |
rewardIcon | string может отсутствовать | default: "trophy"; minLength: 1; maxLength: 80 |
rewardColor | string может отсутствовать | default: "#c60814"; pattern: "^#[0-9a-f]{6}$" |
triggerRules | object обязательно | — |
completionRules | object обязательно | — |
status | одно из: ["DRAFT","SCHEDULED","ACTIVE","ARCHIVED"] может отсутствовать | default: "DRAFT" |
scope | одно из: ["NETWORK","GYM"] обязательно | — |
networkId | string / null может отсутствовать | — |
gymId | string / 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
productId | string обязательно | minLength: 1 |
variantId | string может отсутствовать | — |
quantity | integer может отсутствовать | default: 1; minimum: 1; maximum: 20 |
promoCode | string может отсутствовать | 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
name | string обязательно | minLength: 1; maxLength: 180 |
description | string / 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
name | string может отсутствовать | minLength: 1; maxLength: 180 |
description | string / 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
displayName | string может отсутствовать | minLength: 1; maxLength: 11; pattern: "^[^\\s#\\p{Cc}\\p{Cf}]+$" |
age | integer / null может отсутствовать | — |
heightCm | integer / null может отсутствовать | — |
weightKg | number / null может отсутствовать | — |
gymId | string / null может отсутствовать | — |
bio | string может отсутствовать | maxLength: 500 |
telegramUsername | string может отсутствовать | maxLength: 80 |
profileAppearance | object может отсутствовать | — |
Полная 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"] обязательно | — |
networkId | string / null может отсутствовать | — |
gymId | string / null может отсутствовать | — |
canPublishRoutes | boolean может отсутствовать | — |
excludeFromAnalytics | boolean может отсутствовать | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
notificationsEnabled | boolean может отсутствовать | — |
routeUpdates | boolean может отсутствовать | — |
challengeReminders | boolean может отсутствовать | — |
followerAlerts | boolean может отсутствовать | — |
progressionUpdates | boolean может отсутствовать | — |
leagueUpdates | boolean может отсутствовать | — |
streakReminders | boolean может отсутствовать | — |
reducedMotion | boolean может отсутствовать | — |
analyticsConsent | boolean может отсутствовать | — |
locationConsent | boolean может отсутствовать | — |
mapTutorialCompleted | boolean может отсутствовать | — |
pushPromptDismissed | boolean может отсутствовать | — |
Полная 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
| Поле | Тип / обязательность | Ограничения |
|---|---|---|
notificationsEnabled | boolean может отсутствовать | — |
routeUpdates | boolean может отсутствовать | — |
challengeReminders | boolean может отсутствовать | — |
followerAlerts | boolean может отсутствовать | — |
progressionUpdates | boolean может отсутствовать | — |
leagueUpdates | boolean может отсутствовать | — |
streakReminders | boolean может отсутствовать | — |
reducedMotion | boolean может отсутствовать | — |
analyticsConsent | boolean может отсутствовать | — |
locationConsent | boolean может отсутствовать | — |
mapTutorialCompleted | boolean может отсутствовать | — |
pushPromptDismissed | boolean может отсутствовать | — |
privacyPolicyVersion | string может отсутствовать | 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.