Backend (Convex)
API — mobileLoyalty
Generated catalog of Convex functions in convex/mobileLoyalty/. Regenerated by `bun run docs:api`.
Auto-generated from source. Do not edit by hand — run
bun run docs:api.
query (5)
| Function | Description | Args |
|---|---|---|
dashboardLoyaltyCarouselGetAll | Get all loyalty carousels (dashboard). Reads from unified carouselItems table with placement="loyalty". | { includeInactive: v.optional(v.boolean()), } |
dashboardLoyaltyCarouselGetById | Get carousel by ID (dashboard). Reads from unified carouselItems table. | { id: v.id("carouselItems"), } |
getMobileDashboard | Get combined loyalty dashboard for mobile app Returns active campaigns and available vouchers in one query. Points and tiers were removed on 2026-10-16; shipped app builds read only campaigns, so the points and tier keys went with them. | {} |
getMobileVouchers | Get vouchers with mobile formatting | { status: v.optional( v.union( v.literal("active"), v.literal("used"), v.literal("expired"), v.literal("all") ) ), limit: v.optional(v.number()), } |
mobileLoyaltyCarouselGetActive | Get active loyalty carousels for mobile. Reads from unified carouselItems table with placement="loyalty". | { limit: v.optional(v.number()), // Tiers were removed. Accepted from older app builds and ignored. userTierSlug: v.optional(v.string()), } |
mutation (5)
| Function | Description | Args |
|---|---|---|
dashboardLoyaltyCarouselCreate | Create loyalty carousel (dashboard). Inserts into unified carouselItems table with placement="loyalty". | { title: v.optional(v.string()), subtitle: v.optional(v.string()), imageUrl: v.string(), actionUrl: v.optional(v.string()), actionType: v.optional( v.union(v… |
dashboardLoyaltyCarouselDelete | Delete loyalty carousel (dashboard). Deletes from unified carouselItems table. | { id: v.id("carouselItems"), } |
dashboardLoyaltyCarouselReorder | Reorder loyalty carousels (dashboard). Reorders in unified carouselItems table, mapping sortOrder → displayOrder. | { items: v.array( v.object({ id: v.id("carouselItems"), sortOrder: v.number(), }) ), } |
dashboardLoyaltyCarouselUpdate | Update loyalty carousel (dashboard). Updates in unified carouselItems table. | { id: v.id("carouselItems"), title: v.optional(v.string()), subtitle: v.optional(v.string()), imageUrl: v.optional(v.string()), actionUrl: v.optional(v.strin… |
mobileRedeemReward | Redeem a reward from a campaign (mobile) Converts completed stamp cycles to rewards | { campaignId: v.id("stampCampaigns"), } |