ghostguild-org/server/api/helcim
Jennie Robinson Faber 55029e7eb7 feat(activation): wire autoFlagPreExistingSlackAccess into self-serve paths
Replaces the per-file inviteToSlack helpers with a single auto-flag
call. Self-serve activation paths now check for pre-existing workspace
membership (silent on miss) instead of attempting an admin-only invite.

- helcim/subscription.post.js: removed local inviteToSlack; both
  free- and paid-tier activation branches now call the helper, then
  notifyNewMember with the canonical 'manual_invitation_required' arg.
- members/create.post.js: same shape — helper + canonical notify arg.
- invite/accept.post.js (free-tier branch): added the helper call after
  member creation. Free-tier had no prior Slack call (audit confirmed);
  paid-tier remains untouched and activates via the Helcim webhook.

Admin-created and CSV-imported members intentionally do NOT call the
helper — admins flip the flag manually after sending the invite.

Test stub for autoFlagPreExistingSlackAccess added to server setup.
2026-04-29 12:21:12 +01:00
..
create-plan.post.js refactor(helcim): use helper in unused admin endpoints 2026-04-08 22:11:25 +01:00
customer-code.get.js refactor(helcim): use centralized helper in 5 simple endpoints 2026-04-08 21:44:18 +01:00
customer.post.js feat(payments): persist helcimCustomerCode + skip getOrCreateCustomer on card-on-file 2026-04-27 19:16:32 +01:00
existing-card.get.js refactor(helcim): normalize listHelcimCustomerCards return shape 2026-04-27 19:16:32 +01:00
get-or-create-customer.post.js feat(payments): persist helcimCustomerCode + skip getOrCreateCustomer on card-on-file 2026-04-27 19:16:32 +01:00
initialize-payment.post.js refactor(series): extract loadPublicSeries helper 2026-04-27 19:16:32 +01:00
payment-history.get.js feat(billing): add payment history API route 2026-04-19 16:26:19 +01:00
plans.get.js refactor(helcim): use helper in unused admin endpoints 2026-04-08 22:11:25 +01:00
subscription.get.js fix(account): show payment history + next-charge for paid-then-$0 members 2026-04-20 12:36:18 +01:00
subscription.post.js feat(activation): wire autoFlagPreExistingSlackAccess into self-serve paths 2026-04-29 12:21:12 +01:00
subscriptions.get.js refactor(helcim): use helper in unused admin endpoints 2026-04-08 22:11:25 +01:00
update-billing.post.js refactor(helcim): use helper in unused admin endpoints 2026-04-08 22:11:25 +01:00
update-card.post.js refactor(helcim): normalize listHelcimCustomerCards return shape 2026-04-27 19:16:32 +01:00
verify-payment.post.js refactor(helcim): normalize listHelcimCustomerCards return shape 2026-04-27 19:16:32 +01:00