feat: chat stickers

This commit is contained in:
gosangam
2026-08-30 02:19:31 +05:30
parent 8c7afe596d
commit 2597c6f2ec
9 changed files with 332 additions and 18 deletions
+11 -1
View File
@@ -111,9 +111,13 @@ export type SadhnaReward = {
/** A reward earned at a streak milestone (a multiple of 7 days). */
export type SadhnaRewardGrant = {
milestone: number;
/** The streak day this was earned on. Null for an occasional gift. */
milestone: number | null;
granted_at: string;
reward: SadhnaReward;
source: "streak" | "gift";
/** False while a gift is still wrapped — the gallery blurs those. */
opened: boolean;
};
// ─── API ───────────────────────────────────────────────────────────────
@@ -140,6 +144,12 @@ export const sadhna = {
rewards: () =>
call<{ collected: SadhnaRewardGrant[]; total: number }>("/sadhna/rewards"),
/** Open one gift, after its celebration is dismissed. Idempotent. */
openGift: (rewardKey: string) =>
call<void>(`/sadhna/rewards/gifts/${encodeURIComponent(rewardKey)}/open`, {
method: "POST",
}),
/** Acknowledge pending celebrations after showing the confetti. */
ackRewards: () => call<void>("/sadhna/rewards/ack", { method: "POST" }),