feat: add stickers collection
This commit is contained in:
+23
@@ -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),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user