@happyvertical/smrt-affiliates 0.39.13 → 0.39.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +4 -3
- package/dist/index.d.ts +4 -2
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +2 -2
- package/dist/smrt-knowledge.json +6 -6
- package/package.json +3 -3
package/AGENTS.md
CHANGED
|
@@ -27,9 +27,10 @@ imports `@happyvertical/smrt-sales` directly.
|
|
|
27
27
|
## Name/value mapping notes
|
|
28
28
|
|
|
29
29
|
- `PartnerStatus` values align exactly with the `EarnerStatus` union.
|
|
30
|
-
- `PayoutStatus` values
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
- `PayoutStatus` values are a subset of the `CommissionPayoutStatus` union
|
|
31
|
+
(which adds `'rejected'`; legacy affiliates had no reject) — the shared
|
|
32
|
+
string values align exactly. `PayoutMethod` values align with the new
|
|
33
|
+
`PayoutMethod` union (which adds `'other'`).
|
|
33
34
|
- `CommissionStatus.INCLUDED` (`'included'`) has **no direct equivalent**;
|
|
34
35
|
the nearest new state is `'payable'` with `payoutId` set. `PENDING`/`PAID`
|
|
35
36
|
align.
|
package/dist/index.d.ts
CHANGED
|
@@ -131,8 +131,10 @@ export declare type PayoutOptions = CommissionPayoutOptions;
|
|
|
131
131
|
* Legacy payout status values.
|
|
132
132
|
*
|
|
133
133
|
* @deprecated Use the `CommissionPayoutStatus` union
|
|
134
|
-
* (`'pending' | 'approved' | 'processing' | 'completed' | 'failed'
|
|
135
|
-
* `@happyvertical/smrt-sales` — the
|
|
134
|
+
* (`'pending' | 'approved' | 'processing' | 'completed' | 'failed' |
|
|
135
|
+
* 'rejected'`) from `@happyvertical/smrt-sales` — the legacy value set is a
|
|
136
|
+
* subset (legacy affiliates had no reject) and the shared string values
|
|
137
|
+
* align exactly.
|
|
136
138
|
*/
|
|
137
139
|
export declare const PayoutStatus: Readonly<{
|
|
138
140
|
readonly PENDING: "pending";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * @happyvertical/smrt-affiliates — DEPRECATED compatibility shim.\n *\n * This package no longer declares any models and owns no persistence. Every\n * export below is a thin alias over the neutral commissions core in\n * `@happyvertical/smrt-sales` (`Earner`, `Commission`, `CommissionPayout`,\n * their collections, and the status vocabularies), kept only so existing\n * imports keep compiling while consumers migrate.\n *\n * Migrate at your own pace:\n *\n * - New code should import from `@happyvertical/smrt-sales` directly\n * (`Earner`, `EarnerCollection`, `Commission`, `CommissionCollection`,\n * `CommissionPayout`, `CommissionPayoutCollection`, plans, earning events,\n * adjustments, services, and money helpers).\n * - The legacy partner ROLES (publisher/salesperson/referrer) are now\n * first-class models: `Referrer` in `@happyvertical/smrt-sales/referrals`\n * and `SalesRepresentative` in `@happyvertical/smrt-sales/crm`, each\n * holding an `earnerId` pointing at the shared financial account.\n * - The data/API migration path (table and column mappings, status mappings,\n * SQL sketches) is documented in this package's `MIGRATION.md`.\n *\n * This shim will be removed in a future major release.\n *\n * @deprecated Use `@happyvertical/smrt-sales` instead. See `MIGRATION.md` in\n * this package for the full data/API migration path.\n * @packageDocumentation\n */\n\nimport type {\n CommissionOptions as SalesCommissionOptions,\n CommissionPayoutOptions as SalesCommissionPayoutOptions,\n EarnerOptions as SalesEarnerOptions,\n} from '@happyvertical/smrt-sales';\n\n// ---------------------------------------------------------------------------\n// Class / collection aliases\n//\n// These are the SAME runtime classes as the `@happyvertical/smrt-sales`\n// exports — `Partner === Earner`, `Payout === CommissionPayout` — re-exported\n// under the legacy names. Data lives in the sales tables (`earners`,\n// `commissions`, `commission_payouts`); the legacy `partners`/`payouts`\n// tables are not read or written by this package. See MIGRATION.md.\n// ---------------------------------------------------------------------------\n\n/**\n * @deprecated Import `Earner` / `EarnerCollection`, `Commission` /\n * `CommissionCollection`, and `CommissionPayout` /\n * `CommissionPayoutCollection` from `@happyvertical/smrt-sales` instead.\n */\nexport {\n Commission,\n CommissionCollection,\n CommissionPayout as Payout,\n CommissionPayoutCollection as PayoutCollection,\n Earner as Partner,\n EarnerCollection as PartnerCollection,\n} from '@happyvertical/smrt-sales';\n\n// ---------------------------------------------------------------------------\n// Option-type aliases\n// ---------------------------------------------------------------------------\n\n/** @deprecated Use `EarnerOptions` from `@happyvertical/smrt-sales`. */\nexport type PartnerOptions = SalesEarnerOptions;\n\n/** @deprecated Use `CommissionOptions` from `@happyvertical/smrt-sales`. */\nexport type CommissionOptions = SalesCommissionOptions;\n\n/** @deprecated Use `CommissionPayoutOptions` from `@happyvertical/smrt-sales`. */\nexport type PayoutOptions = SalesCommissionPayoutOptions;\n\n// ---------------------------------------------------------------------------\n// Legacy enum-compatible const objects\n//\n// The old package exported TS enums; these frozen `as const` objects preserve\n// the exact legacy member names and string values so both value positions\n// (`PartnerStatus.ACTIVE`) and type positions (`status: PartnerStatus`) keep\n// compiling. Where a new equivalent exists, the values align with the\n// `@happyvertical/smrt-sales` string-literal unions.\n// ---------------------------------------------------------------------------\n\n/**\n * Legacy partner status values.\n *\n * @deprecated Use the `EarnerStatus` union\n * (`'pending' | 'active' | 'suspended'`) from `@happyvertical/smrt-sales` —\n * the string values align exactly.\n */\nexport const PartnerStatus = Object.freeze({\n PENDING: 'pending',\n ACTIVE: 'active',\n SUSPENDED: 'suspended',\n} as const);\n/** @deprecated Use `EarnerStatus` from `@happyvertical/smrt-sales`. */\nexport type PartnerStatus = (typeof PartnerStatus)[keyof typeof PartnerStatus];\n\n/**\n * Legacy partner role values.\n *\n * @deprecated Partner roles have NO direct equivalent in\n * `@happyvertical/smrt-sales` — roles are now first-class models instead of a\n * JSON array on the financial account: use `Referrer` from\n * `@happyvertical/smrt-sales/referrals` and `SalesRepresentative` from\n * `@happyvertical/smrt-sales/crm` (each holds an `earnerId`); model\n * publisher-style roles in your application domain. See MIGRATION.md.\n */\nexport const PartnerType = Object.freeze({\n PUBLISHER: 'publisher',\n SALESPERSON: 'salesperson',\n REFERRER: 'referrer',\n} as const);\n/**\n * @deprecated Roles are first-class models in `@happyvertical/smrt-sales`\n * (`Referrer`, `SalesRepresentative`); see MIGRATION.md.\n */\nexport type PartnerType = (typeof PartnerType)[keyof typeof PartnerType];\n\n/**\n * Legacy commission type values.\n *\n * @deprecated Superseded by `CommissionPlan` component keys in\n * `@happyvertical/smrt-sales`: a versioned plan's `components` array replaces\n * the fixed display/referral/sales/parent/overhead taxonomy — each component\n * has its own `key`, `trigger`, `basis`, and `rate`, and every `Commission`\n * records the `componentKey` that produced it. See MIGRATION.md for a worked\n * plan reproducing the legacy waterfall.\n */\nexport const CommissionType = Object.freeze({\n DISPLAY: 'display',\n REFERRAL: 'referral',\n SALES: 'sales',\n PARENT: 'parent',\n OVERHEAD: 'overhead',\n} as const);\n/**\n * @deprecated Superseded by `CommissionPlan` component keys in\n * `@happyvertical/smrt-sales`; see MIGRATION.md.\n */\nexport type CommissionType =\n (typeof CommissionType)[keyof typeof CommissionType];\n\n/**\n * Legacy commission status values.\n *\n * @deprecated Use the `CommissionStatus` union\n * (`'pending' | 'earned' | 'approved' | 'payable' | 'paid'`) from\n * `@happyvertical/smrt-sales`. `PENDING` and `PAID` align; `INCLUDED` has no\n * direct equivalent — the nearest new state is `'payable'` with `payoutId`\n * set (a commission gathered into a payout batch). See MIGRATION.md.\n */\nexport const CommissionStatus = Object.freeze({\n PENDING: 'pending',\n INCLUDED: 'included',\n PAID: 'paid',\n} as const);\n/** @deprecated Use `CommissionStatus` from `@happyvertical/smrt-sales`. */\nexport type CommissionStatus =\n (typeof CommissionStatus)[keyof typeof CommissionStatus];\n\n/**\n * Legacy payout status values.\n *\n * @deprecated Use the `CommissionPayoutStatus` union\n * (`'pending' | 'approved' | 'processing' | 'completed' | 'failed'`) from
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * @happyvertical/smrt-affiliates — DEPRECATED compatibility shim.\n *\n * This package no longer declares any models and owns no persistence. Every\n * export below is a thin alias over the neutral commissions core in\n * `@happyvertical/smrt-sales` (`Earner`, `Commission`, `CommissionPayout`,\n * their collections, and the status vocabularies), kept only so existing\n * imports keep compiling while consumers migrate.\n *\n * Migrate at your own pace:\n *\n * - New code should import from `@happyvertical/smrt-sales` directly\n * (`Earner`, `EarnerCollection`, `Commission`, `CommissionCollection`,\n * `CommissionPayout`, `CommissionPayoutCollection`, plans, earning events,\n * adjustments, services, and money helpers).\n * - The legacy partner ROLES (publisher/salesperson/referrer) are now\n * first-class models: `Referrer` in `@happyvertical/smrt-sales/referrals`\n * and `SalesRepresentative` in `@happyvertical/smrt-sales/crm`, each\n * holding an `earnerId` pointing at the shared financial account.\n * - The data/API migration path (table and column mappings, status mappings,\n * SQL sketches) is documented in this package's `MIGRATION.md`.\n *\n * This shim will be removed in a future major release.\n *\n * @deprecated Use `@happyvertical/smrt-sales` instead. See `MIGRATION.md` in\n * this package for the full data/API migration path.\n * @packageDocumentation\n */\n\nimport type {\n CommissionOptions as SalesCommissionOptions,\n CommissionPayoutOptions as SalesCommissionPayoutOptions,\n EarnerOptions as SalesEarnerOptions,\n} from '@happyvertical/smrt-sales';\n\n// ---------------------------------------------------------------------------\n// Class / collection aliases\n//\n// These are the SAME runtime classes as the `@happyvertical/smrt-sales`\n// exports — `Partner === Earner`, `Payout === CommissionPayout` — re-exported\n// under the legacy names. Data lives in the sales tables (`earners`,\n// `commissions`, `commission_payouts`); the legacy `partners`/`payouts`\n// tables are not read or written by this package. See MIGRATION.md.\n// ---------------------------------------------------------------------------\n\n/**\n * @deprecated Import `Earner` / `EarnerCollection`, `Commission` /\n * `CommissionCollection`, and `CommissionPayout` /\n * `CommissionPayoutCollection` from `@happyvertical/smrt-sales` instead.\n */\nexport {\n Commission,\n CommissionCollection,\n CommissionPayout as Payout,\n CommissionPayoutCollection as PayoutCollection,\n Earner as Partner,\n EarnerCollection as PartnerCollection,\n} from '@happyvertical/smrt-sales';\n\n// ---------------------------------------------------------------------------\n// Option-type aliases\n// ---------------------------------------------------------------------------\n\n/** @deprecated Use `EarnerOptions` from `@happyvertical/smrt-sales`. */\nexport type PartnerOptions = SalesEarnerOptions;\n\n/** @deprecated Use `CommissionOptions` from `@happyvertical/smrt-sales`. */\nexport type CommissionOptions = SalesCommissionOptions;\n\n/** @deprecated Use `CommissionPayoutOptions` from `@happyvertical/smrt-sales`. */\nexport type PayoutOptions = SalesCommissionPayoutOptions;\n\n// ---------------------------------------------------------------------------\n// Legacy enum-compatible const objects\n//\n// The old package exported TS enums; these frozen `as const` objects preserve\n// the exact legacy member names and string values so both value positions\n// (`PartnerStatus.ACTIVE`) and type positions (`status: PartnerStatus`) keep\n// compiling. Where a new equivalent exists, the values align with the\n// `@happyvertical/smrt-sales` string-literal unions.\n// ---------------------------------------------------------------------------\n\n/**\n * Legacy partner status values.\n *\n * @deprecated Use the `EarnerStatus` union\n * (`'pending' | 'active' | 'suspended'`) from `@happyvertical/smrt-sales` —\n * the string values align exactly.\n */\nexport const PartnerStatus = Object.freeze({\n PENDING: 'pending',\n ACTIVE: 'active',\n SUSPENDED: 'suspended',\n} as const);\n/** @deprecated Use `EarnerStatus` from `@happyvertical/smrt-sales`. */\nexport type PartnerStatus = (typeof PartnerStatus)[keyof typeof PartnerStatus];\n\n/**\n * Legacy partner role values.\n *\n * @deprecated Partner roles have NO direct equivalent in\n * `@happyvertical/smrt-sales` — roles are now first-class models instead of a\n * JSON array on the financial account: use `Referrer` from\n * `@happyvertical/smrt-sales/referrals` and `SalesRepresentative` from\n * `@happyvertical/smrt-sales/crm` (each holds an `earnerId`); model\n * publisher-style roles in your application domain. See MIGRATION.md.\n */\nexport const PartnerType = Object.freeze({\n PUBLISHER: 'publisher',\n SALESPERSON: 'salesperson',\n REFERRER: 'referrer',\n} as const);\n/**\n * @deprecated Roles are first-class models in `@happyvertical/smrt-sales`\n * (`Referrer`, `SalesRepresentative`); see MIGRATION.md.\n */\nexport type PartnerType = (typeof PartnerType)[keyof typeof PartnerType];\n\n/**\n * Legacy commission type values.\n *\n * @deprecated Superseded by `CommissionPlan` component keys in\n * `@happyvertical/smrt-sales`: a versioned plan's `components` array replaces\n * the fixed display/referral/sales/parent/overhead taxonomy — each component\n * has its own `key`, `trigger`, `basis`, and `rate`, and every `Commission`\n * records the `componentKey` that produced it. See MIGRATION.md for a worked\n * plan reproducing the legacy waterfall.\n */\nexport const CommissionType = Object.freeze({\n DISPLAY: 'display',\n REFERRAL: 'referral',\n SALES: 'sales',\n PARENT: 'parent',\n OVERHEAD: 'overhead',\n} as const);\n/**\n * @deprecated Superseded by `CommissionPlan` component keys in\n * `@happyvertical/smrt-sales`; see MIGRATION.md.\n */\nexport type CommissionType =\n (typeof CommissionType)[keyof typeof CommissionType];\n\n/**\n * Legacy commission status values.\n *\n * @deprecated Use the `CommissionStatus` union\n * (`'pending' | 'earned' | 'approved' | 'payable' | 'paid'`) from\n * `@happyvertical/smrt-sales`. `PENDING` and `PAID` align; `INCLUDED` has no\n * direct equivalent — the nearest new state is `'payable'` with `payoutId`\n * set (a commission gathered into a payout batch). See MIGRATION.md.\n */\nexport const CommissionStatus = Object.freeze({\n PENDING: 'pending',\n INCLUDED: 'included',\n PAID: 'paid',\n} as const);\n/** @deprecated Use `CommissionStatus` from `@happyvertical/smrt-sales`. */\nexport type CommissionStatus =\n (typeof CommissionStatus)[keyof typeof CommissionStatus];\n\n/**\n * Legacy payout status values.\n *\n * @deprecated Use the `CommissionPayoutStatus` union\n * (`'pending' | 'approved' | 'processing' | 'completed' | 'failed' |\n * 'rejected'`) from `@happyvertical/smrt-sales` — the legacy value set is a\n * subset (legacy affiliates had no reject) and the shared string values\n * align exactly.\n */\nexport const PayoutStatus = Object.freeze({\n PENDING: 'pending',\n APPROVED: 'approved',\n PROCESSING: 'processing',\n COMPLETED: 'completed',\n FAILED: 'failed',\n} as const);\n/** @deprecated Use `CommissionPayoutStatus` from `@happyvertical/smrt-sales`. */\nexport type PayoutStatus = (typeof PayoutStatus)[keyof typeof PayoutStatus];\n\n/**\n * Legacy payout method values.\n *\n * @deprecated Use the `PayoutMethod` union\n * (`'bank_transfer' | 'check' | 'paypal' | 'credit' | 'other'`) from\n * `@happyvertical/smrt-sales` — the legacy values align exactly; the new\n * union adds `'other'`.\n */\nexport const PayoutMethod = Object.freeze({\n BANK_TRANSFER: 'bank_transfer',\n CHECK: 'check',\n PAYPAL: 'paypal',\n CREDIT: 'credit',\n} as const);\n/** @deprecated Use `PayoutMethod` from `@happyvertical/smrt-sales`. */\nexport type PayoutMethod = (typeof PayoutMethod)[keyof typeof PayoutMethod];\n"],"mappings":";;AAyFO,IAAM,gBAAgB,OAAO,OAAO;CACzC,SAAS;CACT,QAAQ;CACR,WAAW;AACb,CAAU;AAcH,IAAM,cAAc,OAAO,OAAO;CACvC,WAAW;CACX,aAAa;CACb,UAAU;AACZ,CAAU;AAiBH,IAAM,iBAAiB,OAAO,OAAO;CAC1C,SAAS;CACT,UAAU;CACV,OAAO;CACP,QAAQ;CACR,UAAU;AACZ,CAAU;AAiBH,IAAM,mBAAmB,OAAO,OAAO;CAC5C,SAAS;CACT,UAAU;CACV,MAAM;AACR,CAAU;AAcH,IAAM,eAAe,OAAO,OAAO;CACxC,SAAS;CACT,UAAU;CACV,YAAY;CACZ,WAAW;CACX,QAAQ;AACV,CAAU;AAYH,IAAM,eAAe,OAAO,OAAO;CACxC,eAAe;CACf,OAAO;CACP,QAAQ;CACR,QAAQ;AACV,CAAU"}
|
package/dist/manifest.json
CHANGED
package/dist/smrt-knowledge.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generatedAt": "2026-07-
|
|
3
|
+
"generatedAt": "2026-07-14T05:50:11.167Z",
|
|
4
4
|
"packageName": "@happyvertical/smrt-affiliates",
|
|
5
|
-
"packageVersion": "0.39.
|
|
5
|
+
"packageVersion": "0.39.15",
|
|
6
6
|
"sourceManifestPath": "dist/manifest.json",
|
|
7
7
|
"agentDocPath": "AGENTS.md",
|
|
8
8
|
"sourceHashes": {
|
|
9
|
-
"manifest": "
|
|
10
|
-
"packageJson": "
|
|
11
|
-
"agents": "
|
|
9
|
+
"manifest": "ec961be38c632f70cb6ef1d9f6ec174ee2bb1d16fb2b7733b09f60f3476194ec",
|
|
10
|
+
"packageJson": "2d7359ee93073b59efec34d8ff82bcdd03e7d041f83d3304e80194ebd63a9dd4",
|
|
11
|
+
"agents": "e88706ca8179c73de1d0cd0b851acac2d2cc1be37cb31c5f9f59529b9de03bf1"
|
|
12
12
|
},
|
|
13
13
|
"exports": [
|
|
14
14
|
".",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"polymorphicAssociations": 0,
|
|
42
42
|
"uuidColumns": 0
|
|
43
43
|
},
|
|
44
|
-
"agentDoc": "# @happyvertical/smrt-affiliates\n\n**DEPRECATED compatibility shim** over the `@happyvertical/smrt-sales`\ncommissions core. This package declares **no models and owns no persistence**\n— every export is a re-export (or a legacy-shaped alias) of the sales\npackage's neutral commissions module, kept so existing imports compile while\nconsumers migrate. It will be removed in a future major release.\n\n- Migration path (tables, columns, statuses, SQL sketches): `MIGRATION.md`\n in this package.\n- The real API: `packages/sales/AGENTS.md` (`commissions` module).\n\n## What the shim exports\n\n| Shim export | Actual thing |\n|---|---|\n| `Partner` / `PartnerCollection` | `Earner` / `EarnerCollection` from `@happyvertical/smrt-sales` (same class references) |\n| `Commission` / `CommissionCollection` | `Commission` / `CommissionCollection` from `@happyvertical/smrt-sales` (new shape) |\n| `Payout` / `PayoutCollection` | `CommissionPayout` / `CommissionPayoutCollection` from `@happyvertical/smrt-sales` |\n| `PartnerOptions` / `CommissionOptions` / `PayoutOptions` | `EarnerOptions` / `CommissionOptions` / `CommissionPayoutOptions` type aliases |\n| `PartnerStatus`, `PartnerType`, `CommissionType`, `CommissionStatus`, `PayoutStatus`, `PayoutMethod` | frozen `as const` objects preserving the exact legacy enum members/values, each with a matching derived type |\n\nThe shim deliberately does **not** re-export the rest of the new surface\n(no `Earner`-named exports, no plans/events/adjustments/services) — new code\nimports `@happyvertical/smrt-sales` directly.\n\n## Name/value mapping notes\n\n- `PartnerStatus` values align exactly with the `EarnerStatus` union.\n- `PayoutStatus` values
|
|
44
|
+
"agentDoc": "# @happyvertical/smrt-affiliates\n\n**DEPRECATED compatibility shim** over the `@happyvertical/smrt-sales`\ncommissions core. This package declares **no models and owns no persistence**\n— every export is a re-export (or a legacy-shaped alias) of the sales\npackage's neutral commissions module, kept so existing imports compile while\nconsumers migrate. It will be removed in a future major release.\n\n- Migration path (tables, columns, statuses, SQL sketches): `MIGRATION.md`\n in this package.\n- The real API: `packages/sales/AGENTS.md` (`commissions` module).\n\n## What the shim exports\n\n| Shim export | Actual thing |\n|---|---|\n| `Partner` / `PartnerCollection` | `Earner` / `EarnerCollection` from `@happyvertical/smrt-sales` (same class references) |\n| `Commission` / `CommissionCollection` | `Commission` / `CommissionCollection` from `@happyvertical/smrt-sales` (new shape) |\n| `Payout` / `PayoutCollection` | `CommissionPayout` / `CommissionPayoutCollection` from `@happyvertical/smrt-sales` |\n| `PartnerOptions` / `CommissionOptions` / `PayoutOptions` | `EarnerOptions` / `CommissionOptions` / `CommissionPayoutOptions` type aliases |\n| `PartnerStatus`, `PartnerType`, `CommissionType`, `CommissionStatus`, `PayoutStatus`, `PayoutMethod` | frozen `as const` objects preserving the exact legacy enum members/values, each with a matching derived type |\n\nThe shim deliberately does **not** re-export the rest of the new surface\n(no `Earner`-named exports, no plans/events/adjustments/services) — new code\nimports `@happyvertical/smrt-sales` directly.\n\n## Name/value mapping notes\n\n- `PartnerStatus` values align exactly with the `EarnerStatus` union.\n- `PayoutStatus` values are a subset of the `CommissionPayoutStatus` union\n (which adds `'rejected'`; legacy affiliates had no reject) — the shared\n string values align exactly. `PayoutMethod` values align with the new\n `PayoutMethod` union (which adds `'other'`).\n- `CommissionStatus.INCLUDED` (`'included'`) has **no direct equivalent**;\n the nearest new state is `'payable'` with `payoutId` set. `PENDING`/`PAID`\n align.\n- `PartnerType` has no equivalent — roles are first-class models now:\n `Referrer` (`@happyvertical/smrt-sales/referrals`) and\n `SalesRepresentative` (`@happyvertical/smrt-sales/crm`), each holding an\n `earnerId`.\n- `CommissionType` is superseded by `CommissionPlan` component keys.\n\n## Gotchas\n\n- **No manifest, no tables**: the package emits no SMRT objects; there is no\n `./manifest` export anymore. Data lives in the sales tables (`earners`,\n `commissions`, `commission_payouts`).\n- **Tenancy stance changed**: the legacy models were intentionally NOT\n tenant-scoped; the sales models are `@TenantScoped({ mode: 'optional' })`.\n Legacy rows migrate with `tenant_id = NULL` (global) — see `MIGRATION.md`.\n- **Do not add models here**: new commission features belong in\n `packages/sales/src/commissions/`.\n"
|
|
45
45
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-affiliates",
|
|
3
|
-
"version": "0.39.
|
|
3
|
+
"version": "0.39.15",
|
|
4
4
|
"description": "DEPRECATED compatibility shim over @happyvertical/smrt-sales — re-exports the legacy Partner/Commission/Payout names. See MIGRATION.md.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
"./manifest.json": "./dist/manifest.json"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@happyvertical/smrt-sales": "0.39.
|
|
23
|
+
"@happyvertical/smrt-sales": "0.39.15"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/node": "24.13.2",
|
|
27
27
|
"typescript": "^5.9.3",
|
|
28
28
|
"vite": "^8.1.3",
|
|
29
29
|
"vitest": "^4.1.9",
|
|
30
|
-
"@happyvertical/smrt-vitest": "0.39.
|
|
30
|
+
"@happyvertical/smrt-vitest": "0.39.15"
|
|
31
31
|
},
|
|
32
32
|
"keywords": [
|
|
33
33
|
"smrt",
|