feat(ads): VK post-move interstitial + retire deprecated hint_balance/paid_account
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 10s
CI / integration (pull_request) Successful in 23s
CI / ui (pull_request) Successful in 1m12s
CI / conformance (pull_request) Successful in 9s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m53s
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 10s
CI / integration (pull_request) Successful in 23s
CI / ui (pull_request) Successful in 1m12s
CI / conformance (pull_request) Successful in 9s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m53s
Interstitial video after a confirmed play or a hint, VK-only, offline banner-only. The gate is client-mirrored: the backend puts the config cooldowns (global 5m / vs_ai 30m / hint 1m) and a suppressed flag (the no-ads / no_banner gate, same as the banner) on Profile.ads via adsFor; the client self-gates on a per-kind last-shown time in localStorage, with the VITE_ADS_STUB contour "ad fired" toast. Never fires after a pass, exchange or resign. maybeShowInterstitial + vkShowInterstitial; the codec and gateway transcode carry the ads block. Also retires the deprecated accounts.hint_balance / paid_account domain usage (expand-contract, code only — the columns stay for a later DROP so image rollback stays DB-safe): drop the Account fields and their scan, the dead account.SpendHint, account.GrantHints and the admin grant-hints action; the in-game hint display now comes wholly from the payments hint benefit. Banner eligibility and account merge no longer read the legacy flags. Tests: ads.test.ts (the client-mirrored gate), the codec ads round-trip, the gateway ads transcode test, and a profile ads-config integration test (cooldowns + suppressed under no-ads / no_banner). Docs: PAYMENTS §10 (+ru) interstitial, the decision amends, backend README, the plan.
This commit is contained in:
@@ -175,12 +175,24 @@ web+PWA / native Android+iOS через Capacitor). Владелец (самоз
|
||||
(соосно кулдауну подсказок). Применение **подсказки** триггерит ролик после хода
|
||||
**независимо** от основного кулдауна, со своим кулдауном **1 мин**. Оффлайн — только
|
||||
баннер. Уважать собственные лимиты частоты VK.
|
||||
**АМЕНД (E6, по факту реализации):** гейт **зеркальный** — сервер отдаёт кулдауны и `suppressed`
|
||||
в профиле (`adsFor`), клиент сам гейтит по времени последнего показа на каждый вид в `localStorage`
|
||||
(без раунд-трипа на ход). Ролик показывается **только после подтверждённого хода или подсказки** —
|
||||
**не** после пропуска, обмена или сдачи (за не-очковое действие рекламой не «награждаем»).
|
||||
Interstitial — **только VK** (как и rewarded).
|
||||
- **D31. `paid_account` тоже deprecated** → удаление из схемы (как `hint_balance`), в
|
||||
пользу per-origin бенефитов «без рекламы». Существующий `ads.Eligible`
|
||||
(`backend/internal/ads/ads.go:107`) расширяется: баннер гасится по origin-бенефиту,
|
||||
**применимому в текущем контексте**, а не по одному глобальному флагу. Legacy
|
||||
`paid_account`/`hint_balance` в проде никем не выставлены (потока покупки не было) →
|
||||
обнуляем/игнорируем, после релиза платежей дропаем.
|
||||
**АМЕНД (E6, по факту реализации — expand-contract, шаг 1 «contract-код»):** доменное
|
||||
использование обеих колонок **убрано** — поля `Account.HintBalance` / `Account.PaidAccount`,
|
||||
их скан, мёртвый `account.SpendHint`, `account.GrantHints` и админ-действие
|
||||
«grant-hints» (роут `/_gm/users/:id/grant-hints`, форма, `UserDetailView.HintBalance`/
|
||||
`PaidAccount`); отображение подсказок в игре теперь всегда из payments (`HintsAvailable`),
|
||||
профильный баланс — из payments-бенефита. **Колонки БД пока оставлены** (без миграции —
|
||||
откат образа DB-safe); их `DROP` — отдельным contract-PR, когда E6 стабилен на проде.
|
||||
- **D32. Каталог — конфигурируемый (БД + админка).** Базовые ценности (атомы
|
||||
начисления): Фишки, подсказки, дни-без-рекламы, участие-в-турнире. **Продукт = набор
|
||||
атомов + цена** (по одной ценности или комбо). «Пакет Фишек» — цена **per-метод**
|
||||
|
||||
Reference in New Issue
Block a user