@happyvertical/smrt-affiliates
v0.51.10
Published
DEPRECATED compatibility shim over @happyvertical/smrt-sales — re-exports the legacy Partner/Commission/Payout names. See MIGRATION.md.
Maintainers
Readme
@happyvertical/smrt-affiliates
DEPRECATED — this package is a compatibility shim over
@happyvertical/smrt-salesand will be removed in a future major release.
The affiliate models that used to live here (Partner, Commission,
Payout) were generalized into the neutral commissions core of
@happyvertical/smrt-sales. This package now declares no models and owns no
persistence — it only re-exports the new classes under the legacy names so
existing imports keep compiling while you migrate:
| Legacy import (this package) | Actual class (@happyvertical/smrt-sales) |
|---|---|
| Partner / PartnerCollection | Earner / EarnerCollection |
| Commission / CommissionCollection | Commission / CommissionCollection (new shape) |
| Payout / PayoutCollection | CommissionPayout / CommissionPayoutCollection |
| PartnerStatus, PartnerType, CommissionType, CommissionStatus, PayoutStatus, PayoutMethod | frozen legacy-shaped const objects (see notes in AGENTS.md) |
Migrating
- New code: import from
@happyvertical/smrt-salesdirectly —Earner,CommissionPlan,EarningEvent,Commission,CommissionAdjustment,CommissionPayout, the collections, services, and money helpers. - Partner roles: publisher/salesperson/referrer role flags are replaced by
first-class role models —
Referrer(@happyvertical/smrt-sales/referrals) andSalesRepresentative(@happyvertical/smrt-sales/crm) — each holding anearnerIdthat points at the shared financial account. - Data: the full table/column/status mapping, behavioral changes (tenancy,
lifecycle, rate representation), and SQL migration sketches live in
MIGRATION.md.
Installation (legacy consumers)
pnpm add @happyvertical/smrt-affiliates// Still compiles — these are the smrt-sales classes under their old names.
import { Partner, PartnerCollection, Payout } from '@happyvertical/smrt-affiliates';License
MIT
