feat: chat stickers
This commit is contained in:
+11
-1
@@ -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" }),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user