feat: add stickers collection

This commit is contained in:
gosangam
2026-08-30 02:19:16 +05:30
parent c9ac2bd3b4
commit e0294d80e3
3 changed files with 133 additions and 0 deletions
+23
View File
@@ -436,3 +436,26 @@ export const broadcasts = {
{ method: "POST", body: JSON.stringify({ content_type: contentType }) },
).then((r) => r.data),
};
// ─── Reward gifts ───────────────────────────────────────────────────────────
/** A sticker from the sādhana catalog, sendable as an occasional gift. */
export type GiftableReward = {
id: string;
key: string;
name: string;
meaning: string;
image_url: string;
};
export const rewardGifts = {
catalog: () => call<GiftableReward[]>("/admin/reward-gifts/catalog").then((r) => r.data),
/** Hand a reward to every account, unopened. Idempotent — a repeat only
* reaches people who don't already have it. */
send: (rewardKey: string) =>
call<{ granted: number }>("/admin/reward-gifts", {
method: "POST",
body: JSON.stringify({ reward_key: rewardKey }),
}).then((r) => r.data),
};