@happyvertical/smrt-affiliates 0.57.34 → 0.57.36
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 -0
- package/dist/manifest.json +1 -1
- package/dist/smrt-knowledge.json +5 -5
- package/package.json +3 -3
package/AGENTS.md
CHANGED
|
@@ -50,3 +50,7 @@ imports `@happyvertical/smrt-sales` directly.
|
|
|
50
50
|
Legacy rows migrate with `tenant_id = NULL` (global) — see `MIGRATION.md`.
|
|
51
51
|
- **Do not add models here**: new commission features belong in
|
|
52
52
|
`packages/sales/src/commissions/`.
|
|
53
|
+
|
|
54
|
+
## Recipe
|
|
55
|
+
|
|
56
|
+
The `affiliates.referrals` recipe is declared in `@happyvertical/smrt-sales` (`src/referrals/recipes.ts`), not here: this package has no models.
|
package/dist/manifest.json
CHANGED
package/dist/smrt-knowledge.json
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
"sensitiveFieldsExcluded": true,
|
|
4
4
|
"generatedAt": "1970-01-01T00:00:00.000Z",
|
|
5
5
|
"packageName": "@happyvertical/smrt-affiliates",
|
|
6
|
-
"packageVersion": "0.57.
|
|
6
|
+
"packageVersion": "0.57.36",
|
|
7
7
|
"sourceManifestPath": "dist/manifest.json",
|
|
8
8
|
"agentDocPath": "AGENTS.md",
|
|
9
9
|
"sourceHashes": {
|
|
10
|
-
"manifest": "
|
|
11
|
-
"packageJson": "
|
|
12
|
-
"agents": "
|
|
10
|
+
"manifest": "1d270ecb49bc3dff2140745636f64e39152d509989f2754eba14a1482efb7f9c",
|
|
11
|
+
"packageJson": "8501cd54d7f5dc576ad28eadc63ca6629fab57a2d94454278cd506a49fe23522",
|
|
12
|
+
"agents": "0aa09b825a67fd9923fbb737ca9dfda8929c1446ba9a6121c679af90dc1f6805"
|
|
13
13
|
},
|
|
14
14
|
"exports": [
|
|
15
15
|
".",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"polymorphicAssociations": 0,
|
|
53
53
|
"uuidColumns": 0
|
|
54
54
|
},
|
|
55
|
-
"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'`, `'stripe_connect'`, and `'crypto'`).\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"
|
|
55
|
+
"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'`, `'stripe_connect'`, and `'crypto'`).\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\n## Recipe\n\nThe `affiliates.referrals` recipe is declared in `@happyvertical/smrt-sales` (`src/referrals/recipes.ts`), not here: this package has no models.\n"
|
|
56
56
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-affiliates",
|
|
3
|
-
"version": "0.57.
|
|
3
|
+
"version": "0.57.36",
|
|
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,10 +20,10 @@
|
|
|
20
20
|
"./manifest.json": "./dist/manifest.json"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@happyvertical/smrt-sales": "0.57.
|
|
23
|
+
"@happyvertical/smrt-sales": "0.57.36"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@happyvertical/smrt-vitest": "0.57.
|
|
26
|
+
"@happyvertical/smrt-vitest": "0.57.36",
|
|
27
27
|
"@types/node": "24.13.6",
|
|
28
28
|
"typescript": "6.0.3",
|
|
29
29
|
"vite": "8.1.6",
|