Skip to content

fix: Add publisher to member offerings and extract profile routes (#796)#803

Merged
bokelley merged 1 commit into
mainfrom
bokelley/fix-publisher-offering
Jan 18, 2026
Merged

fix: Add publisher to member offerings and extract profile routes (#796)#803
bokelley merged 1 commit into
mainfrom
bokelley/fix-publisher-offering

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Summary

Changes

  • server/src/types.ts: Add VALID_MEMBER_OFFERINGS, VALID_ORGANIZATION_ROLES, VALID_ASSIGNABLE_ROLES, VALID_LEGAL_DOCUMENT_TYPES constants with isValidMemberOffering() type guard
  • server/src/db/organization-db.ts: Add VALID_REVENUE_TIERS constant, add 'trialing' to SubscriptionInfo.status
  • server/src/billing/stripe-client.ts: Add 'trialing' to subscription status return type
  • server/src/routes/member-profiles.ts: New file with extracted member profile routes
  • server/src/http.ts: Mount new routers, remove old routes (~530 lines)
  • server/src/routes/organizations.ts, billing-public.ts, admin/prospects.ts: Use centralized constants

Test plan

  • All 241 tests pass
  • TypeScript builds successfully
  • Code review completed and suggestions addressed

🤖 Generated with Claude Code

- Add 'publisher' to VALID_MEMBER_OFFERINGS to match MemberOffering type
- Create centralized VALID_* constants for runtime validation to prevent type drift:
  - VALID_MEMBER_OFFERINGS, VALID_ORGANIZATION_ROLES, VALID_ASSIGNABLE_ROLES
  - VALID_LEGAL_DOCUMENT_TYPES, VALID_REVENUE_TIERS
- Extract member profile routes from http.ts to routes/member-profiles.ts (~530 lines)
- Add 'trialing' to subscription status types for trial user support
- Fix slug validation to properly check reserved keywords

Closes #796

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bokelley bokelley merged commit 1da11c3 into main Jan 18, 2026
6 checks passed
bokelley added a commit that referenced this pull request Jan 20, 2026
…) (#803)

- Add 'publisher' to VALID_MEMBER_OFFERINGS to match MemberOffering type
- Create centralized VALID_* constants for runtime validation to prevent type drift:
  - VALID_MEMBER_OFFERINGS, VALID_ORGANIZATION_ROLES, VALID_ASSIGNABLE_ROLES
  - VALID_LEGAL_DOCUMENT_TYPES, VALID_REVENUE_TIERS
- Extract member profile routes from http.ts to routes/member-profiles.ts (~530 lines)
- Add 'trialing' to subscription status types for trial user support
- Fix slug validation to properly check reserved keywords

Closes #796

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Member profile "Publisher" offering option causes validation error (agenticadvertising platform)

1 participant