@happyvertical/smrt-sales 0.61.3 → 0.61.5
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/dist/agreements.js +2 -2
- package/dist/chunks/__smrt-register__-BgS-tiR9.js +6 -0
- package/dist/chunks/__smrt-register__-BgS-tiR9.js.map +1 -0
- package/dist/chunks/{agreements-C8rxIVGB.js → agreements-BZuNlupb.js} +49 -13
- package/dist/chunks/agreements-BZuNlupb.js.map +1 -0
- package/dist/chunks/{commissions-DbhfPQbi.js → commissions-BLGKek_x.js} +39 -11
- package/dist/chunks/commissions-BLGKek_x.js.map +1 -0
- package/dist/chunks/{crm-C4iAa-zA.js → crm-BG43OsyB.js} +22 -13
- package/dist/chunks/crm-BG43OsyB.js.map +1 -0
- package/dist/chunks/{referrals-STQ8kdIv.js → referrals-BNTsWVEM.js} +74 -23
- package/dist/chunks/referrals-BNTsWVEM.js.map +1 -0
- package/dist/commissions/models/Commission.d.ts.map +1 -1
- package/dist/commissions/models/CommissionAdjustment.d.ts +1 -1
- package/dist/commissions/models/CommissionAdjustment.d.ts.map +1 -1
- package/dist/commissions/models/CommissionAdjustmentOperation.d.ts.map +1 -1
- package/dist/commissions/models/CommissionPayout.d.ts.map +1 -1
- package/dist/commissions.js +2 -2
- package/dist/crm/models/Lead.d.ts +1 -1
- package/dist/crm/models/Lead.d.ts.map +1 -1
- package/dist/crm/models/Opportunity.d.ts +1 -1
- package/dist/crm/models/Opportunity.d.ts.map +1 -1
- package/dist/crm/models/PipelineDefinition.d.ts.map +1 -1
- package/dist/crm/models/PipelineStage.d.ts.map +1 -1
- package/dist/crm/models/SalesActivity.d.ts.map +1 -1
- package/dist/crm.js +2 -2
- package/dist/index.js +5 -5
- package/dist/manifest.json +2599 -690
- package/dist/referrals/models/ReferralClickOperation.d.ts.map +1 -1
- package/dist/referrals/models/ReferralProgram.d.ts.map +1 -1
- package/dist/referrals.js +2 -2
- package/dist/smrt-knowledge.json +9 -8
- package/package.json +8 -8
- package/dist/chunks/__smrt-register__-DFcq7osk.js +0 -6
- package/dist/chunks/__smrt-register__-DFcq7osk.js.map +0 -1
- package/dist/chunks/agreements-C8rxIVGB.js.map +0 -1
- package/dist/chunks/commissions-DbhfPQbi.js.map +0 -1
- package/dist/chunks/crm-C4iAa-zA.js.map +0 -1
- package/dist/chunks/referrals-STQ8kdIv.js.map +0 -1
|
@@ -114,9 +114,15 @@ var CommissionAdjustment = class extends SmrtObject {
|
|
|
114
114
|
};
|
|
115
115
|
__publicField$7(CommissionAdjustment, "__smrtPackage__", "@happyvertical/smrt-sales");
|
|
116
116
|
__decorateClass$7([tenantId({ nullable: true })], CommissionAdjustment.prototype, "tenantId", 2);
|
|
117
|
-
__decorateClass$7([foreignKey("Commission", {
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
__decorateClass$7([foreignKey("Commission", {
|
|
118
|
+
required: true,
|
|
119
|
+
requiredFor: "identity"
|
|
120
|
+
})], CommissionAdjustment.prototype, "commissionId", 2);
|
|
121
|
+
__decorateClass$7([foreignKey("Earner", {
|
|
122
|
+
required: true,
|
|
123
|
+
requiredFor: "identity"
|
|
124
|
+
})], CommissionAdjustment.prototype, "earnerId", 2);
|
|
125
|
+
__decorateClass$7([field()], CommissionAdjustment.prototype, "reason", 2);
|
|
120
126
|
__decorateClass$7([crossPackageRef("@happyvertical/smrt-profiles:Profile")], CommissionAdjustment.prototype, "createdByProfileId", 2);
|
|
121
127
|
__decorateClass$7([foreignKey("CommissionPayout")], CommissionAdjustment.prototype, "payoutId", 2);
|
|
122
128
|
CommissionAdjustment = __decorateClass$7([TenantScoped({ mode: "optional" }), smrt({
|
|
@@ -233,6 +239,7 @@ __decorateClass$6([tenantId()], CommissionAdjustmentOperation.prototype, "tenant
|
|
|
233
239
|
__decorateClass$6([field({
|
|
234
240
|
sqlType: "UUID",
|
|
235
241
|
required: true,
|
|
242
|
+
requiredFor: "identity",
|
|
236
243
|
readonly: true,
|
|
237
244
|
indexed: true
|
|
238
245
|
})], CommissionAdjustmentOperation.prototype, "adjustmentId", 2);
|
|
@@ -587,7 +594,10 @@ var Commission = class extends SmrtObject {
|
|
|
587
594
|
};
|
|
588
595
|
__publicField$5(Commission, "__smrtPackage__", "@happyvertical/smrt-sales");
|
|
589
596
|
__decorateClass$5([tenantId({ nullable: true })], Commission.prototype, "tenantId", 2);
|
|
590
|
-
__decorateClass$5([field({ description: "The affiliate who earned this commission." }), foreignKey("Earner", {
|
|
597
|
+
__decorateClass$5([field({ description: "The affiliate who earned this commission." }), foreignKey("Earner", {
|
|
598
|
+
required: true,
|
|
599
|
+
requiredFor: "identity"
|
|
600
|
+
})], Commission.prototype, "earnerId", 2);
|
|
591
601
|
__decorateClass$5([foreignKey("EarningEvent")], Commission.prototype, "earningEventId", 2);
|
|
592
602
|
__decorateClass$5([field({ description: "How much was earned, in the smallest unit of the currency." })], Commission.prototype, "amountCents", 2);
|
|
593
603
|
__decorateClass$5([field({ description: "The currency the commission is paid in." })], Commission.prototype, "currency", 2);
|
|
@@ -595,6 +605,7 @@ __decorateClass$5([field({ description: "Where the commission stands, from pendi
|
|
|
595
605
|
__decorateClass$5([foreignKey("CommissionPayout")], Commission.prototype, "payoutId", 2);
|
|
596
606
|
__decorateClass$5([field({
|
|
597
607
|
required: true,
|
|
608
|
+
requiredFor: "idempotency",
|
|
598
609
|
description: "A reference that stops the same commission being recorded twice."
|
|
599
610
|
})], Commission.prototype, "dedupeKey", 2);
|
|
600
611
|
Commission = __decorateClass$5([TenantScoped({ mode: "optional" }), smrt({
|
|
@@ -1322,7 +1333,10 @@ ${memo}` : memo;
|
|
|
1322
1333
|
};
|
|
1323
1334
|
__publicField$3(CommissionPayout, "__smrtPackage__", "@happyvertical/smrt-sales");
|
|
1324
1335
|
__decorateClass$3([tenantId({ nullable: true })], CommissionPayout.prototype, "tenantId", 2);
|
|
1325
|
-
__decorateClass$3([field({ description: "The affiliate being paid." }), foreignKey("Earner", {
|
|
1336
|
+
__decorateClass$3([field({ description: "The affiliate being paid." }), foreignKey("Earner", {
|
|
1337
|
+
required: true,
|
|
1338
|
+
requiredFor: "identity"
|
|
1339
|
+
})], CommissionPayout.prototype, "earnerId", 2);
|
|
1326
1340
|
__decorateClass$3([field({ description: "The total being paid, in the smallest unit of the currency." })], CommissionPayout.prototype, "totalAmountCents", 2);
|
|
1327
1341
|
__decorateClass$3([field({ description: "The currency of the payment." })], CommissionPayout.prototype, "currency", 2);
|
|
1328
1342
|
__decorateClass$3([field({ description: "Whether the payment is waiting, being sent, completed or failed." })], CommissionPayout.prototype, "status", 2);
|
|
@@ -1330,6 +1344,7 @@ __decorateClass$3([field({ description: "When the payment went out." })], Commis
|
|
|
1330
1344
|
__decorateClass$3([crossPackageRef("@happyvertical/smrt-commerce:Invoice")], CommissionPayout.prototype, "invoiceId", 2);
|
|
1331
1345
|
__decorateClass$3([field({
|
|
1332
1346
|
required: true,
|
|
1347
|
+
requiredFor: "idempotency",
|
|
1333
1348
|
description: "A reference that stops the same payout being made twice."
|
|
1334
1349
|
})], CommissionPayout.prototype, "idempotencyKey", 2);
|
|
1335
1350
|
__decorateClass$3([field({ indexed: true })], CommissionPayout.prototype, "sourceId", 2);
|
|
@@ -2259,7 +2274,10 @@ var CommissionPlan = class extends SmrtObject {
|
|
|
2259
2274
|
};
|
|
2260
2275
|
__publicField$2(CommissionPlan, "__smrtPackage__", "@happyvertical/smrt-sales");
|
|
2261
2276
|
__decorateClass$2([tenantId({ nullable: true })], CommissionPlan.prototype, "tenantId", 2);
|
|
2262
|
-
__decorateClass$2([field({
|
|
2277
|
+
__decorateClass$2([field({
|
|
2278
|
+
required: true,
|
|
2279
|
+
requiredFor: "identity"
|
|
2280
|
+
})], CommissionPlan.prototype, "planKey", 2);
|
|
2263
2281
|
CommissionPlan = __decorateClass$2([TenantScoped({ mode: "optional" }), smrt({
|
|
2264
2282
|
conflictColumns: [
|
|
2265
2283
|
"tenant_id",
|
|
@@ -2484,10 +2502,17 @@ var EarnerSourceAttribution = class extends SmrtObject {
|
|
|
2484
2502
|
};
|
|
2485
2503
|
__publicField$1(EarnerSourceAttribution, "__smrtPackage__", "@happyvertical/smrt-sales");
|
|
2486
2504
|
__decorateClass$1([tenantId({ nullable: true })], EarnerSourceAttribution.prototype, "tenantId", 2);
|
|
2487
|
-
__decorateClass$1([foreignKey("Earner", {
|
|
2488
|
-
|
|
2505
|
+
__decorateClass$1([foreignKey("Earner", {
|
|
2506
|
+
required: true,
|
|
2507
|
+
requiredFor: "identity"
|
|
2508
|
+
})], EarnerSourceAttribution.prototype, "earnerId", 2);
|
|
2509
|
+
__decorateClass$1([field({
|
|
2510
|
+
required: true,
|
|
2511
|
+
requiredFor: "identity"
|
|
2512
|
+
})], EarnerSourceAttribution.prototype, "sourceKind", 2);
|
|
2489
2513
|
__decorateClass$1([field({
|
|
2490
2514
|
required: true,
|
|
2515
|
+
requiredFor: "identity",
|
|
2491
2516
|
indexed: true
|
|
2492
2517
|
})], EarnerSourceAttribution.prototype, "sourceId", 2);
|
|
2493
2518
|
EarnerSourceAttribution = __decorateClass$1([TenantScoped({ mode: "optional" }), smrt({
|
|
@@ -2722,7 +2747,7 @@ var EarningEvent = class extends SmrtObject {
|
|
|
2722
2747
|
};
|
|
2723
2748
|
__publicField(EarningEvent, "__smrtPackage__", "@happyvertical/smrt-sales");
|
|
2724
2749
|
__decorateClass([tenantId({ nullable: true })], EarningEvent.prototype, "tenantId", 2);
|
|
2725
|
-
__decorateClass([field(
|
|
2750
|
+
__decorateClass([field()], EarningEvent.prototype, "eventKind", 2);
|
|
2726
2751
|
__decorateClass([field({
|
|
2727
2752
|
type: "integer",
|
|
2728
2753
|
nullable: true
|
|
@@ -2731,7 +2756,10 @@ __decorateClass([field({
|
|
|
2731
2756
|
type: "integer",
|
|
2732
2757
|
nullable: true
|
|
2733
2758
|
})], EarningEvent.prototype, "marginCents", 2);
|
|
2734
|
-
__decorateClass([field({
|
|
2759
|
+
__decorateClass([field({
|
|
2760
|
+
required: true,
|
|
2761
|
+
requiredFor: "idempotency"
|
|
2762
|
+
})], EarningEvent.prototype, "dedupeKey", 2);
|
|
2735
2763
|
EarningEvent = __decorateClass([TenantScoped({ mode: "optional" }), smrt({
|
|
2736
2764
|
conflictColumns: ["tenant_id", "dedupe_key"],
|
|
2737
2765
|
api: { include: [
|
|
@@ -4441,4 +4469,4 @@ var EarnerAttributionService = class EarnerAttributionService {
|
|
|
4441
4469
|
//#endregion
|
|
4442
4470
|
export { ADJUSTMENT_SETTLEABLE_COMMISSION_STATUSES as A, PAYOUT_METHODS as B, calculateWaterfallWithPools as C, CommissionPayout as D, CommissionPayoutCollection as E, COMMISSION_STATUSES as F, Commission as G, WATERFALL_POOL_RESIDUAL_RULES as H, EARNER_KINDS as I, CommissionAdjustmentCollection as J, CommissionAdjustmentOperationCollection as K, EARNER_SOURCE_ATTRIBUTION_STATUSES as L, COMMISSION_BASES as M, COMMISSION_PAYOUT_STATUSES as N, Earner as O, COMMISSION_PLAN_STATUSES as P, EARNER_STATUSES as R, calculateWaterfall as S, validateWaterfallPlan as T, WATERFALL_POOL_ZERO_WEIGHT_RULES as U, PAYOUT_METHODS_REQUIRING_DESTINATION as V, CommissionCollection as W, CommissionAdjustment as Y, EarnerCollection as _, CommissionBalanceService as a, validateCommissionPlanComponents as b, CommissionAdjustmentValidationError as c, centsToAmount as d, roundCents as f, EarnerSourceAttribution as g, EarnerSourceAttributionCollection as h, CommissionCalculationService as i, COMMISSION_ADJUSTMENT_KINDS as j, validatePayoutDestination as k, amountToCents as l, EarningEvent as m, CommissionSettlementService as n, CommissionAdjustmentReplayConflictError as o, EarningEventCollection as p, CommissionAdjustmentOperation as q, CommissionPayoutService as r, CommissionAdjustmentService as s, EarnerAttributionService as t, calculateCommissionAmountCents as u, CommissionPlanCollection as v, prepareWaterfallPools as w, WaterfallRecipientResolverRegistry as x, CommissionPlan as y, EARNING_EVENT_KINDS as z };
|
|
4443
4471
|
|
|
4444
|
-
//# sourceMappingURL=commissions-
|
|
4472
|
+
//# sourceMappingURL=commissions-BLGKek_x.js.map
|