Claude Code
328e9ba613
Task #138: Wiki.js subscriber tier sync via GraphQL (REQ-2026-04-15-subscriber-wiki-auth)
- src/services/wikijsSync.js: GraphQL client for Wiki.js at subscribers.firefrostgaming.com
- syncWikiUser(discordId, username, tierLevel): creates user if not exists, updates group if exists
- demoteToAwakened(discordId): downgrades group on cancellation/chargeback/refund
- Email convention: {discordId}@firefrost.local (unique internal addresses)
- Tier → group mapping: 1=Awakened, 2=Elemental, 3=Knight, 4=Master, 5=Legend, 6=Sovereign
- Silent-fail: never breaks the Stripe webhook
- src/routes/stripe.js: hooked into 4 lifecycle paths:
- checkout.session.completed → syncWikiUser (non-blocking)
- customer.subscription.deleted → demoteToAwakened
- charge.dispute.created (chargeback) → demoteToAwakened
- charge.refunded (refund ban) → demoteToAwakened
- .env.example: added WIKIJS_URL, WIKIJS_API_KEY, DISCORD_ISSUE_WEBHOOK_URL
PRE-REQ: Michael must create 6 groups in Wiki.js admin + generate API key before deploy.
2026-04-16 00:15:55 -05:00
..
2026-04-12 22:35:24 -05:00
2026-04-12 23:04:04 -05:00
2026-04-12 22:57:23 -05:00
2026-04-12 22:39:50 -05:00
2026-04-12 23:50:00 -05:00
2026-04-12 22:27:36 -05:00
2026-04-12 23:38:41 -05:00
2026-04-12 23:09:23 -05:00
2026-04-12 22:48:37 -05:00
2026-04-12 22:52:22 -05:00
2026-04-12 22:41:19 -05:00
2026-04-12 20:40:16 -05:00
2026-04-12 22:14:30 -05:00
2026-04-12 22:06:43 -05:00
2026-04-12 22:02:02 -05:00
2026-04-12 20:48:05 -05:00
2026-04-12 21:18:47 -05:00
2026-04-12 21:44:34 -05:00
2026-04-12 21:25:35 -05:00
2026-04-12 21:38:33 -05:00
2026-04-12 21:48:47 -05:00
2026-04-12 21:11:52 -05:00
2026-04-12 21:37:41 -05:00
2026-04-12 20:54:15 -05:00
2026-04-12 21:47:11 -05:00
2026-04-12 20:52:19 -05:00
2026-04-12 21:33:06 -05:00
2026-04-13 01:31:44 -05:00
2026-04-13 00:17:30 -05:00
2026-04-13 00:17:30 -05:00
2026-04-13 01:31:44 -05:00
2026-04-13 00:17:30 -05:00
2026-04-12 23:42:34 -05:00
2026-04-12 23:44:21 -05:00
2026-04-13 06:33:57 -05:00
2026-04-13 06:09:05 -05:00
2026-04-12 23:38:41 -05:00
2026-04-13 01:09:57 -05:00
2026-04-15 17:19:02 +00:00
2026-04-15 17:19:02 +00:00
2026-04-15 17:19:02 +00:00
2026-04-15 17:19:02 +00:00
2026-04-15 17:19:02 +00:00
2026-04-15 17:19:02 +00:00
2026-04-15 17:19:02 +00:00
2026-04-15 17:19:02 +00:00
2026-04-15 17:19:02 +00:00
2026-04-15 17:19:02 +00:00
2026-04-15 17:19:02 +00:00
2026-04-15 17:19:02 +00:00
2026-04-15 17:19:02 +00:00
2026-04-15 17:19:02 +00:00
2026-04-15 17:19:02 +00:00
2026-04-15 01:33:01 -05:00
2026-04-15 01:53:18 -05:00
2026-04-15 17:19:02 +00:00
2026-04-15 17:19:02 +00:00
2026-04-15 01:33:01 -05:00
2026-04-15 01:46:11 -05:00
2026-04-15 17:19:02 +00:00
2026-04-15 17:19:02 +00:00
2026-04-15 12:47:08 -05:00
2026-04-16 00:07:08 -05:00
2026-04-15 17:19:02 +00:00
2026-04-16 00:15:55 -05:00
2026-04-16 00:15:55 -05:00
2026-04-12 14:12:40 -05:00
2026-04-12 20:16:16 -05:00
2026-04-12 20:30:13 -05:00
2026-04-12 20:36:55 -05:00
2026-04-12 21:51:21 -05:00
2026-04-12 21:56:43 -05:00
2026-04-12 20:57:40 -05:00
2026-04-12 21:16:03 -05:00
2026-04-15 01:33:01 -05:00
2026-04-15 01:33:01 -05:00
2026-04-16 00:07:08 -05:00
2026-04-16 00:15:55 -05:00