Add PlatformAdmin controller + service for comp plan grants

FeatureBillingService
Shipped
20 Aprili 2026, 19:43 UTC
Author
Kamo
Commit
620164f

- PlatformAdminController at /api/billing/platform (class-level @PlatformAdminOnly) - GET /orgs, GET /orgs/{orgId} - POST /orgs/{orgId}/grants, PATCH|DELETE /orgs/{orgId}/grants/{subId} - GET /plans (includes isPublic=false) - GET /events - PlatformAdminService: grant creates COMP SubscriptionRecord, cancels prior active sub, emits SubscriptionEvent **************** 5s idempotency - @PlatformAdminOnly + HandlerInterceptor: allow god-mode-active OR (TeamMember.isOrganizationOwner AND Organization.isTopLevel, re-read from DB) - SubscriptionRenewalScheduler: COMP branch cancels on expiry (COMP_EXPIRED) and never calls Stripe - BillingAdminService: MRR/ARR aggregation excludes paymentMethod=COMP - Long ids exposed as String (CockroachDB unique_rowid precision)

All changes

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei