Grid layout control for daily rewards
What's new
Daily reward programs accept two optional settings that control how the reward grid is laid out on the hub. grid_mode is auto (default, the existing behavior) or manual, and grid_config describes the layout per breakpoint: sm, md, and lg each take a list of 1–31 positive integers, where every entry is the number of columns in that row.
Impact
A program whose grid was previously derived from the number of rewards can now be laid out explicitly — for example a 7-day program shown as [4, 3] on small screens and [7] on large ones. Programs that omit both fields keep the automatic layout.
Changes
| Resource | Change |
|---|---|
| create_daily_reward, update_daily_reward | Added optional grid_mode and grid_config to rewards in the request body |
| get_daily_rewards, get_daily_reward, create_daily_reward, update_daily_reward, copy_daily_reward | Added grid_mode and grid_config to rewards in daily reward responses |
| Components | Added the DailyRewardGridMode and GridConfig schemas |
Upgrade
- No action required. Omit both fields to keep the automatic grid.
- When setting
grid_modetomanual, sendgrid_configwith all three breakpoints —sm,md, andlgare required.
需要技术支持?
联系我们的集成技术团队: integration@aghanim.com