@classytic/revenue 1.1.4 → 2.0.1
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/CHANGELOG.md +90 -0
- package/README.md +638 -632
- package/dist/audit-B39B0Sdq.mjs +53 -0
- package/dist/audit-DZ0eTr9g.d.mts +89 -0
- package/dist/bridges/index.d.mts +2 -0
- package/dist/bridges/index.mjs +1 -0
- package/dist/context-DRqSeTPM.d.mts +35 -0
- package/dist/core/state-machines.d.mts +53 -0
- package/dist/core/state-machines.mjs +153 -0
- package/dist/engine-types-CcjIb4Fy.d.mts +611 -0
- package/dist/enums/index.d.mts +3 -157
- package/dist/enums/index.mjs +3 -55
- package/dist/errors-DHa8JVQ-.mjs +92 -0
- package/dist/escrow.schema-BBv9oVEW.mjs +322 -0
- package/dist/escrow.schema-D5X32LwX.d.mts +629 -0
- package/dist/event-constants-CEMitnIV.mjs +53 -0
- package/dist/events/index.d.mts +3 -0
- package/dist/events/index.mjs +4 -0
- package/dist/index.d.mts +77 -9
- package/dist/index.mjs +465 -29
- package/dist/monetization.enums-BtiU3t8o.mjs +39 -0
- package/dist/monetization.enums-D2xbxXJM.d.mts +34 -0
- package/dist/plugins/plugin.interface.d.mts +28 -0
- package/dist/plugins/plugin.interface.mjs +26 -0
- package/dist/providers/index.d.mts +2 -3
- package/dist/providers/index.mjs +2 -2
- package/dist/{base-DCoyIUj6.mjs → registry-DhFMsSn5.mjs} +34 -36
- package/dist/{base-CsTlVQJe.d.mts → registry-SvIGPAx_.d.mts} +73 -66
- package/dist/repositories/create-repositories.d.mts +21 -0
- package/dist/repositories/create-repositories.mjs +12 -0
- package/dist/revenue-bridges-sdlrR85c.d.mts +145 -0
- package/dist/revenue-event-catalog-BX3g7RUi.d.mts +823 -0
- package/dist/revenue-event-catalog-LqxPnsU_.mjs +388 -0
- package/dist/settlement.repository-DHIPx5S4.mjs +771 -0
- package/dist/shared/index.d.mts +2 -0
- package/dist/shared/index.mjs +4 -0
- package/dist/splits-BAfY-a9P.mjs +123 -0
- package/dist/subscription.enums-tfoAgsTv.mjs +172 -0
- package/dist/transaction.enums-u4MshXcL.d.mts +154 -0
- package/dist/validators/index.d.mts +2 -0
- package/dist/validators/index.mjs +3 -0
- package/package.json +37 -38
- package/dist/application/services/index.d.mts +0 -4
- package/dist/application/services/index.mjs +0 -3
- package/dist/category-resolver-DV83N8ok.mjs +0 -284
- package/dist/commission-split-BzB8cd39.mjs +0 -485
- package/dist/core/events.d.mts +0 -294
- package/dist/core/events.mjs +0 -100
- package/dist/core/index.d.mts +0 -9
- package/dist/core/index.mjs +0 -8
- package/dist/errors-rRdOqnWx.d.mts +0 -787
- package/dist/escrow.enums-CZGrrdg7.mjs +0 -101
- package/dist/escrow.enums-DwdLuuve.d.mts +0 -78
- package/dist/idempotency-DaYcUGY1.mjs +0 -172
- package/dist/index-Dsp7H5Wb.d.mts +0 -471
- package/dist/infrastructure/plugins/index.d.mts +0 -239
- package/dist/infrastructure/plugins/index.mjs +0 -345
- package/dist/money-CvrDOijQ.mjs +0 -271
- package/dist/money-DPG8AtJ8.d.mts +0 -112
- package/dist/payment.enums-HAuAS9Pp.d.mts +0 -70
- package/dist/payment.enums-tEFVa-Xp.mjs +0 -69
- package/dist/plugin-BbK0OVHy.d.mts +0 -327
- package/dist/plugin-Cd_V04Em.mjs +0 -210
- package/dist/reconciliation/index.d.mts +0 -193
- package/dist/reconciliation/index.mjs +0 -192
- package/dist/retry-HHCOXYdn.d.mts +0 -186
- package/dist/revenue-BhdS7nXh.mjs +0 -553
- package/dist/schemas/index.d.mts +0 -2665
- package/dist/schemas/index.mjs +0 -717
- package/dist/schemas/validation.d.mts +0 -375
- package/dist/schemas/validation.mjs +0 -325
- package/dist/settlement.enums-DFhkqZEY.d.mts +0 -132
- package/dist/settlement.schema-DnNSFpGd.d.mts +0 -344
- package/dist/settlement.service-DjzAjezU.d.mts +0 -594
- package/dist/settlement.service-DmdKv0Zu.mjs +0 -2511
- package/dist/split.enums-BrjabxIX.mjs +0 -86
- package/dist/split.enums-DmskfLOM.d.mts +0 -43
- package/dist/tax-BoCt5cEd.d.mts +0 -61
- package/dist/tax-EQ15DO81.mjs +0 -162
- package/dist/transaction.enums-pCyMFT4Z.mjs +0 -96
- package/dist/utils/index.d.mts +0 -428
- package/dist/utils/index.mjs +0 -346
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { A as SplitInfo, B as validateTaxCalculation, C as multiplyMoney, D as toCurrencyCode, E as sumMoney, F as TaxConfig, H as calculateCommission, I as TaxType, L as calculateTax, M as calculateOrganizationPayout, N as calculateSplits, O as toMajor, P as TaxCalculation, R as getTaxType, S as money, T as subtractMoney, U as reverseCommission, V as CommissionInfo, _ as isMoney, a as CurrencyCode, b as isZeroMoney, c as Money, d as addMoney, f as compareMoney, g as isCurrencyCode, h as fromSmallestUnit, i as CURRENCIES, j as SplitRule, k as toSmallestUnit, l as MoneyValue, m as fromMajor, n as getAuditTrail, o as CurrencyMismatchError, p as equalsMoney, r as getLastStateChange, s as MINOR_UNIT_FACTOR, t as appendAuditEvent, u as absMoney, v as isNegativeMoney, w as negateMoney, x as minorUnitFactor, y as isPositiveMoney, z as reverseTax } from "../audit-DZ0eTr9g.mjs";
|
|
2
|
+
export { CURRENCIES, CommissionInfo, type CurrencyCode, CurrencyMismatchError, MINOR_UNIT_FACTOR, type Money, type MoneyValue, SplitInfo, SplitRule, TaxCalculation, TaxConfig, TaxType, absMoney, addMoney, appendAuditEvent, calculateCommission, calculateOrganizationPayout, calculateSplits, calculateTax, compareMoney, equalsMoney, fromMajor, fromSmallestUnit, getAuditTrail, getLastStateChange, getTaxType, isCurrencyCode, isMoney, isNegativeMoney, isPositiveMoney, isZeroMoney, minorUnitFactor, money, multiplyMoney, negateMoney, reverseCommission, reverseTax, subtractMoney, sumMoney, toCurrencyCode, toMajor, toSmallestUnit, validateTaxCalculation };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { a as reverseTax, c as reverseCommission, i as getTaxType, n as calculateSplits, o as validateTaxCalculation, r as calculateTax, s as calculateCommission, t as calculateOrganizationPayout } from "../splits-BAfY-a9P.mjs";
|
|
2
|
+
import { C as sumMoney, E as toSmallestUnit, S as subtractMoney, T as toMajor, _ as isZeroMoney, a as CurrencyMismatchError, b as multiplyMoney, c as addMoney, d as fromMajor, f as fromSmallestUnit, g as isPositiveMoney, h as isNegativeMoney, i as CURRENCIES, l as compareMoney, m as isMoney, n as getAuditTrail, o as MINOR_UNIT_FACTOR, p as isCurrencyCode, r as getLastStateChange, s as absMoney, t as appendAuditEvent, u as equalsMoney, v as minorUnitFactor, w as toCurrencyCode, x as negateMoney, y as money } from "../audit-B39B0Sdq.mjs";
|
|
3
|
+
|
|
4
|
+
export { CURRENCIES, CurrencyMismatchError, MINOR_UNIT_FACTOR, absMoney, addMoney, appendAuditEvent, calculateCommission, calculateOrganizationPayout, calculateSplits, calculateTax, compareMoney, equalsMoney, fromMajor, fromSmallestUnit, getAuditTrail, getLastStateChange, getTaxType, isCurrencyCode, isMoney, isNegativeMoney, isPositiveMoney, isZeroMoney, minorUnitFactor, money, multiplyMoney, negateMoney, reverseCommission, reverseTax, subtractMoney, sumMoney, toCurrencyCode, toMajor, toSmallestUnit, validateTaxCalculation };
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
//#region src/shared/calculators/commission.ts
|
|
2
|
+
function calculateCommission(amount, commissionRate, gatewayFeeRate = 0) {
|
|
3
|
+
if (!commissionRate || commissionRate <= 0) return null;
|
|
4
|
+
if (amount < 0) throw new Error("Transaction amount cannot be negative");
|
|
5
|
+
if (commissionRate < 0 || commissionRate > 1) throw new Error("Commission rate must be between 0 and 1");
|
|
6
|
+
if (gatewayFeeRate < 0 || gatewayFeeRate > 1) throw new Error("Gateway fee rate must be between 0 and 1");
|
|
7
|
+
const grossAmount = Math.round(amount * commissionRate);
|
|
8
|
+
const gatewayFeeAmount = Math.round(amount * gatewayFeeRate);
|
|
9
|
+
return {
|
|
10
|
+
rate: commissionRate,
|
|
11
|
+
grossAmount,
|
|
12
|
+
gatewayFeeRate,
|
|
13
|
+
gatewayFeeAmount,
|
|
14
|
+
netAmount: Math.max(0, grossAmount - gatewayFeeAmount),
|
|
15
|
+
status: "pending"
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function reverseCommission(originalCommission, originalAmount, refundAmount) {
|
|
19
|
+
if (!originalCommission?.netAmount) return null;
|
|
20
|
+
if (!originalAmount || originalAmount <= 0) throw new Error("Original amount must be greater than 0");
|
|
21
|
+
if (refundAmount < 0) throw new Error("Refund amount cannot be negative");
|
|
22
|
+
if (refundAmount > originalAmount) throw new Error("Refund amount exceeds original amount");
|
|
23
|
+
const refundRatio = refundAmount / originalAmount;
|
|
24
|
+
return {
|
|
25
|
+
rate: originalCommission.rate,
|
|
26
|
+
grossAmount: Math.round(originalCommission.grossAmount * refundRatio),
|
|
27
|
+
gatewayFeeRate: originalCommission.gatewayFeeRate,
|
|
28
|
+
gatewayFeeAmount: Math.round(originalCommission.gatewayFeeAmount * refundRatio),
|
|
29
|
+
netAmount: Math.round(originalCommission.netAmount * refundRatio),
|
|
30
|
+
status: "waived"
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/shared/calculators/tax.ts
|
|
36
|
+
function calculateTax(amount, category, config) {
|
|
37
|
+
if (!config?.isRegistered || config.exemptCategories?.includes(category)) return {
|
|
38
|
+
isApplicable: false,
|
|
39
|
+
rate: 0,
|
|
40
|
+
baseAmount: amount,
|
|
41
|
+
taxAmount: 0,
|
|
42
|
+
totalAmount: amount,
|
|
43
|
+
pricesIncludeTax: false
|
|
44
|
+
};
|
|
45
|
+
const rate = config.defaultRate;
|
|
46
|
+
const [baseAmount, taxAmount, totalAmount] = config.pricesIncludeTax ? [
|
|
47
|
+
Math.round(amount / (1 + rate)),
|
|
48
|
+
Math.round(amount - amount / (1 + rate)),
|
|
49
|
+
amount
|
|
50
|
+
] : [
|
|
51
|
+
amount,
|
|
52
|
+
Math.round(amount * rate),
|
|
53
|
+
Math.round(amount * (1 + rate))
|
|
54
|
+
];
|
|
55
|
+
return {
|
|
56
|
+
isApplicable: true,
|
|
57
|
+
rate,
|
|
58
|
+
baseAmount,
|
|
59
|
+
taxAmount,
|
|
60
|
+
totalAmount,
|
|
61
|
+
pricesIncludeTax: config.pricesIncludeTax
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function getTaxType(transactionFlow, category, exemptCategories = []) {
|
|
65
|
+
if (exemptCategories.includes(category)) return "exempt";
|
|
66
|
+
return transactionFlow === "inflow" ? "collected" : "paid";
|
|
67
|
+
}
|
|
68
|
+
function reverseTax(originalTax, originalAmount, refundAmount) {
|
|
69
|
+
if (!originalTax.isApplicable) return {
|
|
70
|
+
isApplicable: false,
|
|
71
|
+
rate: 0,
|
|
72
|
+
baseAmount: refundAmount,
|
|
73
|
+
taxAmount: 0,
|
|
74
|
+
totalAmount: refundAmount,
|
|
75
|
+
pricesIncludeTax: false
|
|
76
|
+
};
|
|
77
|
+
if (!originalAmount || originalAmount <= 0) throw new Error("Original amount must be greater than 0");
|
|
78
|
+
if (refundAmount < 0) throw new Error("Refund amount cannot be negative");
|
|
79
|
+
if (refundAmount > originalAmount) throw new Error("Refund amount exceeds original amount");
|
|
80
|
+
const refundRatio = refundAmount / originalAmount;
|
|
81
|
+
const reversedType = originalTax.type ? originalTax.type === "collected" ? "paid" : originalTax.type === "paid" ? "collected" : "exempt" : void 0;
|
|
82
|
+
return {
|
|
83
|
+
isApplicable: true,
|
|
84
|
+
rate: originalTax.rate,
|
|
85
|
+
baseAmount: Math.round(originalTax.baseAmount * refundRatio),
|
|
86
|
+
taxAmount: Math.round(originalTax.taxAmount * refundRatio),
|
|
87
|
+
totalAmount: Math.round(originalTax.totalAmount * refundRatio),
|
|
88
|
+
pricesIncludeTax: originalTax.pricesIncludeTax,
|
|
89
|
+
type: reversedType
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
function validateTaxCalculation(tax) {
|
|
93
|
+
if (!tax.isApplicable) return true;
|
|
94
|
+
return Math.abs(tax.baseAmount + tax.taxAmount - tax.totalAmount) <= 1;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region src/shared/calculators/splits.ts
|
|
99
|
+
function calculateSplits(amount, rules, gatewayFeeRate = 0) {
|
|
100
|
+
if (rules.reduce((sum, r) => sum + r.rate, 0) > 1) throw new Error("Split rates exceed 100%");
|
|
101
|
+
return rules.map((rule, index) => {
|
|
102
|
+
const grossAmount = Math.round(amount * rule.rate);
|
|
103
|
+
const feeAmount = index === 0 ? Math.round(amount * gatewayFeeRate) : 0;
|
|
104
|
+
const netAmount = Math.max(0, grossAmount - feeAmount);
|
|
105
|
+
return {
|
|
106
|
+
type: rule.type,
|
|
107
|
+
recipientId: rule.recipientId,
|
|
108
|
+
recipientType: rule.recipientType,
|
|
109
|
+
rate: rule.rate,
|
|
110
|
+
grossAmount,
|
|
111
|
+
gatewayFeeRate: index === 0 ? gatewayFeeRate : 0,
|
|
112
|
+
gatewayFeeAmount: feeAmount,
|
|
113
|
+
netAmount,
|
|
114
|
+
status: "pending"
|
|
115
|
+
};
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
function calculateOrganizationPayout(amount, splits) {
|
|
119
|
+
return amount - splits.reduce((sum, s) => sum + s.grossAmount, 0);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
//#endregion
|
|
123
|
+
export { reverseTax as a, reverseCommission as c, getTaxType as i, calculateSplits as n, validateTaxCalculation as o, calculateTax as r, calculateCommission as s, calculateOrganizationPayout as t };
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
//#region src/enums/transaction.enums.ts
|
|
2
|
+
const TRANSACTION_FLOW = {
|
|
3
|
+
INFLOW: "inflow",
|
|
4
|
+
OUTFLOW: "outflow"
|
|
5
|
+
};
|
|
6
|
+
const TRANSACTION_FLOW_VALUES = Object.values(TRANSACTION_FLOW);
|
|
7
|
+
const TRANSACTION_STATUS = {
|
|
8
|
+
PENDING: "pending",
|
|
9
|
+
PAYMENT_INITIATED: "payment_initiated",
|
|
10
|
+
PROCESSING: "processing",
|
|
11
|
+
REQUIRES_ACTION: "requires_action",
|
|
12
|
+
VERIFIED: "verified",
|
|
13
|
+
COMPLETED: "completed",
|
|
14
|
+
FAILED: "failed",
|
|
15
|
+
CANCELLED: "cancelled",
|
|
16
|
+
EXPIRED: "expired",
|
|
17
|
+
REFUNDED: "refunded",
|
|
18
|
+
PARTIALLY_REFUNDED: "partially_refunded"
|
|
19
|
+
};
|
|
20
|
+
const TRANSACTION_STATUS_VALUES = Object.values(TRANSACTION_STATUS);
|
|
21
|
+
const LIBRARY_CATEGORIES = {
|
|
22
|
+
SUBSCRIPTION: "subscription",
|
|
23
|
+
PURCHASE: "purchase"
|
|
24
|
+
};
|
|
25
|
+
const LIBRARY_CATEGORY_VALUES = Object.values(LIBRARY_CATEGORIES);
|
|
26
|
+
const transactionFlowSet = new Set(TRANSACTION_FLOW_VALUES);
|
|
27
|
+
const transactionStatusSet = new Set(TRANSACTION_STATUS_VALUES);
|
|
28
|
+
const libraryCategorySet = new Set(LIBRARY_CATEGORY_VALUES);
|
|
29
|
+
function isLibraryCategory(value) {
|
|
30
|
+
return typeof value === "string" && libraryCategorySet.has(value);
|
|
31
|
+
}
|
|
32
|
+
function isTransactionFlow(value) {
|
|
33
|
+
return typeof value === "string" && transactionFlowSet.has(value);
|
|
34
|
+
}
|
|
35
|
+
function isTransactionStatus(value) {
|
|
36
|
+
return typeof value === "string" && transactionStatusSet.has(value);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/enums/escrow.enums.ts
|
|
41
|
+
const HOLD_STATUS = {
|
|
42
|
+
PENDING: "pending",
|
|
43
|
+
HELD: "held",
|
|
44
|
+
RELEASED: "released",
|
|
45
|
+
CANCELLED: "cancelled",
|
|
46
|
+
EXPIRED: "expired",
|
|
47
|
+
PARTIALLY_RELEASED: "partially_released"
|
|
48
|
+
};
|
|
49
|
+
const HOLD_STATUS_VALUES = Object.values(HOLD_STATUS);
|
|
50
|
+
const RELEASE_REASON = {
|
|
51
|
+
PAYMENT_VERIFIED: "payment_verified",
|
|
52
|
+
MANUAL_RELEASE: "manual_release",
|
|
53
|
+
AUTO_RELEASE: "auto_release",
|
|
54
|
+
DISPUTE_RESOLVED: "dispute_resolved"
|
|
55
|
+
};
|
|
56
|
+
const RELEASE_REASON_VALUES = Object.values(RELEASE_REASON);
|
|
57
|
+
const HOLD_REASON = {
|
|
58
|
+
PAYMENT_VERIFICATION: "payment_verification",
|
|
59
|
+
FRAUD_CHECK: "fraud_check",
|
|
60
|
+
MANUAL_REVIEW: "manual_review",
|
|
61
|
+
DISPUTE: "dispute",
|
|
62
|
+
COMPLIANCE: "compliance"
|
|
63
|
+
};
|
|
64
|
+
const HOLD_REASON_VALUES = Object.values(HOLD_REASON);
|
|
65
|
+
const holdStatusSet = new Set(HOLD_STATUS_VALUES);
|
|
66
|
+
const releaseReasonSet = new Set(RELEASE_REASON_VALUES);
|
|
67
|
+
const holdReasonSet = new Set(HOLD_REASON_VALUES);
|
|
68
|
+
function isHoldStatus(value) {
|
|
69
|
+
return typeof value === "string" && holdStatusSet.has(value);
|
|
70
|
+
}
|
|
71
|
+
function isReleaseReason(value) {
|
|
72
|
+
return typeof value === "string" && releaseReasonSet.has(value);
|
|
73
|
+
}
|
|
74
|
+
function isHoldReason(value) {
|
|
75
|
+
return typeof value === "string" && holdReasonSet.has(value);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/enums/settlement.enums.ts
|
|
80
|
+
const SETTLEMENT_STATUS = {
|
|
81
|
+
PENDING: "pending",
|
|
82
|
+
PROCESSING: "processing",
|
|
83
|
+
COMPLETED: "completed",
|
|
84
|
+
FAILED: "failed",
|
|
85
|
+
CANCELLED: "cancelled"
|
|
86
|
+
};
|
|
87
|
+
const SETTLEMENT_STATUS_VALUES = Object.values(SETTLEMENT_STATUS);
|
|
88
|
+
const SETTLEMENT_TYPE = {
|
|
89
|
+
SPLIT_PAYOUT: "split_payout",
|
|
90
|
+
PLATFORM_WITHDRAWAL: "platform_withdrawal",
|
|
91
|
+
MANUAL_PAYOUT: "manual_payout",
|
|
92
|
+
ESCROW_RELEASE: "escrow_release"
|
|
93
|
+
};
|
|
94
|
+
const SETTLEMENT_TYPE_VALUES = Object.values(SETTLEMENT_TYPE);
|
|
95
|
+
const settlementStatusSet = new Set(SETTLEMENT_STATUS_VALUES);
|
|
96
|
+
const settlementTypeSet = new Set(SETTLEMENT_TYPE_VALUES);
|
|
97
|
+
function isSettlementStatus(value) {
|
|
98
|
+
return typeof value === "string" && settlementStatusSet.has(value);
|
|
99
|
+
}
|
|
100
|
+
function isSettlementType(value) {
|
|
101
|
+
return typeof value === "string" && settlementTypeSet.has(value);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
//#endregion
|
|
105
|
+
//#region src/enums/split.enums.ts
|
|
106
|
+
const SPLIT_TYPE = {
|
|
107
|
+
PLATFORM_COMMISSION: "platform_commission",
|
|
108
|
+
AFFILIATE_COMMISSION: "affiliate_commission",
|
|
109
|
+
REFERRAL_COMMISSION: "referral_commission",
|
|
110
|
+
PARTNER_COMMISSION: "partner_commission",
|
|
111
|
+
CUSTOM: "custom"
|
|
112
|
+
};
|
|
113
|
+
const SPLIT_TYPE_VALUES = Object.values(SPLIT_TYPE);
|
|
114
|
+
const SPLIT_STATUS = {
|
|
115
|
+
PENDING: "pending",
|
|
116
|
+
DUE: "due",
|
|
117
|
+
PAID: "paid",
|
|
118
|
+
WAIVED: "waived",
|
|
119
|
+
CANCELLED: "cancelled"
|
|
120
|
+
};
|
|
121
|
+
const SPLIT_STATUS_VALUES = Object.values(SPLIT_STATUS);
|
|
122
|
+
const PAYOUT_METHOD = {
|
|
123
|
+
BANK_TRANSFER: "bank_transfer",
|
|
124
|
+
MOBILE_WALLET: "mobile_wallet",
|
|
125
|
+
PLATFORM_BALANCE: "platform_balance",
|
|
126
|
+
CRYPTO: "crypto",
|
|
127
|
+
CHECK: "check",
|
|
128
|
+
MANUAL: "manual"
|
|
129
|
+
};
|
|
130
|
+
const PAYOUT_METHOD_VALUES = Object.values(PAYOUT_METHOD);
|
|
131
|
+
const splitTypeSet = new Set(SPLIT_TYPE_VALUES);
|
|
132
|
+
const splitStatusSet = new Set(SPLIT_STATUS_VALUES);
|
|
133
|
+
const payoutMethodSet = new Set(PAYOUT_METHOD_VALUES);
|
|
134
|
+
function isSplitType(value) {
|
|
135
|
+
return typeof value === "string" && splitTypeSet.has(value);
|
|
136
|
+
}
|
|
137
|
+
function isSplitStatus(value) {
|
|
138
|
+
return typeof value === "string" && splitStatusSet.has(value);
|
|
139
|
+
}
|
|
140
|
+
function isPayoutMethod(value) {
|
|
141
|
+
return typeof value === "string" && payoutMethodSet.has(value);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region src/enums/subscription.enums.ts
|
|
146
|
+
const SUBSCRIPTION_STATUS = {
|
|
147
|
+
ACTIVE: "active",
|
|
148
|
+
PAUSED: "paused",
|
|
149
|
+
CANCELLED: "cancelled",
|
|
150
|
+
EXPIRED: "expired",
|
|
151
|
+
PENDING: "pending",
|
|
152
|
+
PENDING_RENEWAL: "pending_renewal",
|
|
153
|
+
INACTIVE: "inactive"
|
|
154
|
+
};
|
|
155
|
+
const SUBSCRIPTION_STATUS_VALUES = Object.values(SUBSCRIPTION_STATUS);
|
|
156
|
+
const PLAN_KEYS = {
|
|
157
|
+
MONTHLY: "monthly",
|
|
158
|
+
QUARTERLY: "quarterly",
|
|
159
|
+
YEARLY: "yearly"
|
|
160
|
+
};
|
|
161
|
+
const PLAN_KEY_VALUES = Object.values(PLAN_KEYS);
|
|
162
|
+
const subscriptionStatusSet = new Set(SUBSCRIPTION_STATUS_VALUES);
|
|
163
|
+
const planKeySet = new Set(PLAN_KEY_VALUES);
|
|
164
|
+
function isSubscriptionStatus(value) {
|
|
165
|
+
return typeof value === "string" && subscriptionStatusSet.has(value);
|
|
166
|
+
}
|
|
167
|
+
function isPlanKey(value) {
|
|
168
|
+
return typeof value === "string" && planKeySet.has(value);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
//#endregion
|
|
172
|
+
export { isReleaseReason as A, HOLD_REASON_VALUES as C, RELEASE_REASON_VALUES as D, RELEASE_REASON as E, TRANSACTION_STATUS as F, TRANSACTION_STATUS_VALUES as I, isLibraryCategory as L, LIBRARY_CATEGORY_VALUES as M, TRANSACTION_FLOW as N, isHoldReason as O, TRANSACTION_FLOW_VALUES as P, isTransactionFlow as R, HOLD_REASON as S, HOLD_STATUS_VALUES as T, SETTLEMENT_STATUS_VALUES as _, isPlanKey as a, isSettlementStatus as b, PAYOUT_METHOD_VALUES as c, SPLIT_TYPE as d, SPLIT_TYPE_VALUES as f, SETTLEMENT_STATUS as g, isSplitType as h, SUBSCRIPTION_STATUS_VALUES as i, LIBRARY_CATEGORIES as j, isHoldStatus as k, SPLIT_STATUS as l, isSplitStatus as m, PLAN_KEY_VALUES as n, isSubscriptionStatus as o, isPayoutMethod as p, SUBSCRIPTION_STATUS as r, PAYOUT_METHOD as s, PLAN_KEYS as t, SPLIT_STATUS_VALUES as u, SETTLEMENT_TYPE as v, HOLD_STATUS as w, isSettlementType as x, SETTLEMENT_TYPE_VALUES as y, isTransactionStatus as z };
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
//#region src/enums/escrow.enums.d.ts
|
|
2
|
+
declare const HOLD_STATUS: {
|
|
3
|
+
readonly PENDING: "pending";
|
|
4
|
+
readonly HELD: "held";
|
|
5
|
+
readonly RELEASED: "released";
|
|
6
|
+
readonly CANCELLED: "cancelled";
|
|
7
|
+
readonly EXPIRED: "expired";
|
|
8
|
+
readonly PARTIALLY_RELEASED: "partially_released";
|
|
9
|
+
};
|
|
10
|
+
type HoldStatus = typeof HOLD_STATUS;
|
|
11
|
+
type HoldStatusValue = HoldStatus[keyof HoldStatus];
|
|
12
|
+
declare const HOLD_STATUS_VALUES: HoldStatusValue[];
|
|
13
|
+
declare const RELEASE_REASON: {
|
|
14
|
+
readonly PAYMENT_VERIFIED: "payment_verified";
|
|
15
|
+
readonly MANUAL_RELEASE: "manual_release";
|
|
16
|
+
readonly AUTO_RELEASE: "auto_release";
|
|
17
|
+
readonly DISPUTE_RESOLVED: "dispute_resolved";
|
|
18
|
+
};
|
|
19
|
+
type ReleaseReason = typeof RELEASE_REASON;
|
|
20
|
+
type ReleaseReasonValue = ReleaseReason[keyof ReleaseReason];
|
|
21
|
+
declare const RELEASE_REASON_VALUES: ReleaseReasonValue[];
|
|
22
|
+
declare const HOLD_REASON: {
|
|
23
|
+
readonly PAYMENT_VERIFICATION: "payment_verification";
|
|
24
|
+
readonly FRAUD_CHECK: "fraud_check";
|
|
25
|
+
readonly MANUAL_REVIEW: "manual_review";
|
|
26
|
+
readonly DISPUTE: "dispute";
|
|
27
|
+
readonly COMPLIANCE: "compliance";
|
|
28
|
+
};
|
|
29
|
+
type HoldReason = typeof HOLD_REASON;
|
|
30
|
+
type HoldReasonValue = HoldReason[keyof HoldReason];
|
|
31
|
+
declare const HOLD_REASON_VALUES: HoldReasonValue[];
|
|
32
|
+
declare function isHoldStatus(value: unknown): value is HoldStatusValue;
|
|
33
|
+
declare function isReleaseReason(value: unknown): value is ReleaseReasonValue;
|
|
34
|
+
declare function isHoldReason(value: unknown): value is HoldReasonValue;
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/enums/settlement.enums.d.ts
|
|
37
|
+
declare const SETTLEMENT_STATUS: {
|
|
38
|
+
readonly PENDING: "pending";
|
|
39
|
+
readonly PROCESSING: "processing";
|
|
40
|
+
readonly COMPLETED: "completed";
|
|
41
|
+
readonly FAILED: "failed";
|
|
42
|
+
readonly CANCELLED: "cancelled";
|
|
43
|
+
};
|
|
44
|
+
type SettlementStatus = typeof SETTLEMENT_STATUS;
|
|
45
|
+
type SettlementStatusValue = SettlementStatus[keyof SettlementStatus];
|
|
46
|
+
declare const SETTLEMENT_STATUS_VALUES: SettlementStatusValue[];
|
|
47
|
+
declare const SETTLEMENT_TYPE: {
|
|
48
|
+
readonly SPLIT_PAYOUT: "split_payout";
|
|
49
|
+
readonly PLATFORM_WITHDRAWAL: "platform_withdrawal";
|
|
50
|
+
readonly MANUAL_PAYOUT: "manual_payout";
|
|
51
|
+
readonly ESCROW_RELEASE: "escrow_release";
|
|
52
|
+
};
|
|
53
|
+
type SettlementType = typeof SETTLEMENT_TYPE;
|
|
54
|
+
type SettlementTypeValue = SettlementType[keyof SettlementType];
|
|
55
|
+
declare const SETTLEMENT_TYPE_VALUES: SettlementTypeValue[];
|
|
56
|
+
declare function isSettlementStatus(value: unknown): value is SettlementStatusValue;
|
|
57
|
+
declare function isSettlementType(value: unknown): value is SettlementTypeValue;
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/enums/split.enums.d.ts
|
|
60
|
+
declare const SPLIT_TYPE: {
|
|
61
|
+
readonly PLATFORM_COMMISSION: "platform_commission";
|
|
62
|
+
readonly AFFILIATE_COMMISSION: "affiliate_commission";
|
|
63
|
+
readonly REFERRAL_COMMISSION: "referral_commission";
|
|
64
|
+
readonly PARTNER_COMMISSION: "partner_commission";
|
|
65
|
+
readonly CUSTOM: "custom";
|
|
66
|
+
};
|
|
67
|
+
type SplitType = typeof SPLIT_TYPE;
|
|
68
|
+
type SplitTypeValue = SplitType[keyof SplitType];
|
|
69
|
+
declare const SPLIT_TYPE_VALUES: SplitTypeValue[];
|
|
70
|
+
declare const SPLIT_STATUS: {
|
|
71
|
+
readonly PENDING: "pending";
|
|
72
|
+
readonly DUE: "due";
|
|
73
|
+
readonly PAID: "paid";
|
|
74
|
+
readonly WAIVED: "waived";
|
|
75
|
+
readonly CANCELLED: "cancelled";
|
|
76
|
+
};
|
|
77
|
+
type SplitStatus = typeof SPLIT_STATUS;
|
|
78
|
+
type SplitStatusValue = SplitStatus[keyof SplitStatus];
|
|
79
|
+
declare const SPLIT_STATUS_VALUES: SplitStatusValue[];
|
|
80
|
+
declare const PAYOUT_METHOD: {
|
|
81
|
+
readonly BANK_TRANSFER: "bank_transfer";
|
|
82
|
+
readonly MOBILE_WALLET: "mobile_wallet";
|
|
83
|
+
readonly PLATFORM_BALANCE: "platform_balance";
|
|
84
|
+
readonly CRYPTO: "crypto";
|
|
85
|
+
readonly CHECK: "check";
|
|
86
|
+
readonly MANUAL: "manual";
|
|
87
|
+
};
|
|
88
|
+
type PayoutMethod = typeof PAYOUT_METHOD;
|
|
89
|
+
type PayoutMethodValue = PayoutMethod[keyof PayoutMethod];
|
|
90
|
+
declare const PAYOUT_METHOD_VALUES: PayoutMethodValue[];
|
|
91
|
+
declare function isSplitType(value: unknown): value is SplitTypeValue;
|
|
92
|
+
declare function isSplitStatus(value: unknown): value is SplitStatusValue;
|
|
93
|
+
declare function isPayoutMethod(value: unknown): value is PayoutMethodValue;
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region src/enums/subscription.enums.d.ts
|
|
96
|
+
declare const SUBSCRIPTION_STATUS: {
|
|
97
|
+
readonly ACTIVE: "active";
|
|
98
|
+
readonly PAUSED: "paused";
|
|
99
|
+
readonly CANCELLED: "cancelled";
|
|
100
|
+
readonly EXPIRED: "expired";
|
|
101
|
+
readonly PENDING: "pending";
|
|
102
|
+
readonly PENDING_RENEWAL: "pending_renewal";
|
|
103
|
+
readonly INACTIVE: "inactive";
|
|
104
|
+
};
|
|
105
|
+
type SubscriptionStatus = typeof SUBSCRIPTION_STATUS;
|
|
106
|
+
type SubscriptionStatusValue = SubscriptionStatus[keyof SubscriptionStatus];
|
|
107
|
+
declare const SUBSCRIPTION_STATUS_VALUES: SubscriptionStatusValue[];
|
|
108
|
+
declare const PLAN_KEYS: {
|
|
109
|
+
readonly MONTHLY: "monthly";
|
|
110
|
+
readonly QUARTERLY: "quarterly";
|
|
111
|
+
readonly YEARLY: "yearly";
|
|
112
|
+
};
|
|
113
|
+
type PlanKeys = typeof PLAN_KEYS;
|
|
114
|
+
type PlanKeyValue = PlanKeys[keyof PlanKeys];
|
|
115
|
+
declare const PLAN_KEY_VALUES: PlanKeyValue[];
|
|
116
|
+
declare function isSubscriptionStatus(value: unknown): value is SubscriptionStatusValue;
|
|
117
|
+
declare function isPlanKey(value: unknown): value is PlanKeyValue;
|
|
118
|
+
//#endregion
|
|
119
|
+
//#region src/enums/transaction.enums.d.ts
|
|
120
|
+
declare const TRANSACTION_FLOW: {
|
|
121
|
+
readonly INFLOW: "inflow";
|
|
122
|
+
readonly OUTFLOW: "outflow";
|
|
123
|
+
};
|
|
124
|
+
type TransactionFlow = typeof TRANSACTION_FLOW;
|
|
125
|
+
type TransactionFlowValue = TransactionFlow[keyof TransactionFlow];
|
|
126
|
+
declare const TRANSACTION_FLOW_VALUES: TransactionFlowValue[];
|
|
127
|
+
declare const TRANSACTION_STATUS: {
|
|
128
|
+
readonly PENDING: "pending";
|
|
129
|
+
readonly PAYMENT_INITIATED: "payment_initiated";
|
|
130
|
+
readonly PROCESSING: "processing";
|
|
131
|
+
readonly REQUIRES_ACTION: "requires_action";
|
|
132
|
+
readonly VERIFIED: "verified";
|
|
133
|
+
readonly COMPLETED: "completed";
|
|
134
|
+
readonly FAILED: "failed";
|
|
135
|
+
readonly CANCELLED: "cancelled";
|
|
136
|
+
readonly EXPIRED: "expired";
|
|
137
|
+
readonly REFUNDED: "refunded";
|
|
138
|
+
readonly PARTIALLY_REFUNDED: "partially_refunded";
|
|
139
|
+
};
|
|
140
|
+
type TransactionStatus = typeof TRANSACTION_STATUS;
|
|
141
|
+
type TransactionStatusValue = TransactionStatus[keyof TransactionStatus];
|
|
142
|
+
declare const TRANSACTION_STATUS_VALUES: TransactionStatusValue[];
|
|
143
|
+
declare const LIBRARY_CATEGORIES: {
|
|
144
|
+
readonly SUBSCRIPTION: "subscription";
|
|
145
|
+
readonly PURCHASE: "purchase";
|
|
146
|
+
};
|
|
147
|
+
type LibraryCategories = typeof LIBRARY_CATEGORIES;
|
|
148
|
+
type LibraryCategoryValue = LibraryCategories[keyof LibraryCategories];
|
|
149
|
+
declare const LIBRARY_CATEGORY_VALUES: LibraryCategoryValue[];
|
|
150
|
+
declare function isLibraryCategory(value: unknown): value is LibraryCategoryValue;
|
|
151
|
+
declare function isTransactionFlow(value: unknown): value is TransactionFlowValue;
|
|
152
|
+
declare function isTransactionStatus(value: unknown): value is TransactionStatusValue;
|
|
153
|
+
//#endregion
|
|
154
|
+
export { HOLD_STATUS as $, SPLIT_STATUS as A, isSplitType as B, SubscriptionStatusValue as C, PAYOUT_METHOD_VALUES as D, PAYOUT_METHOD as E, SplitStatusValue as F, SettlementStatus as G, SETTLEMENT_STATUS_VALUES as H, SplitType as I, SettlementTypeValue as J, SettlementStatusValue as K, SplitTypeValue as L, SPLIT_TYPE as M, SPLIT_TYPE_VALUES as N, PayoutMethod as O, SplitStatus as P, HOLD_REASON_VALUES as Q, isPayoutMethod as R, SubscriptionStatus as S, isSubscriptionStatus as T, SETTLEMENT_TYPE as U, SETTLEMENT_STATUS as V, SETTLEMENT_TYPE_VALUES as W, isSettlementType as X, isSettlementStatus as Y, HOLD_REASON as Z, PLAN_KEY_VALUES as _, TRANSACTION_FLOW as a, RELEASE_REASON as at, SUBSCRIPTION_STATUS as b, TRANSACTION_STATUS_VALUES as c, ReleaseReasonValue as ct, TransactionStatus as d, isReleaseReason as dt, HOLD_STATUS_VALUES as et, TransactionStatusValue as f, PLAN_KEYS as g, isTransactionStatus as h, LibraryCategoryValue as i, HoldStatusValue as it, SPLIT_STATUS_VALUES as j, PayoutMethodValue as k, TransactionFlow as l, isHoldReason as lt, isTransactionFlow as m, LIBRARY_CATEGORY_VALUES as n, HoldReasonValue as nt, TRANSACTION_FLOW_VALUES as o, RELEASE_REASON_VALUES as ot, isLibraryCategory as p, SettlementType as q, LibraryCategories as r, HoldStatus as rt, TRANSACTION_STATUS as s, ReleaseReason as st, LIBRARY_CATEGORIES as t, HoldReason as tt, TransactionFlowValue as u, isHoldStatus as ut, PlanKeyValue as v, isPlanKey as w, SUBSCRIPTION_STATUS_VALUES as x, PlanKeys as y, isSplitStatus as z };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { A as transactionBaseSchema, C as subscriptionBaseSchema, D as TransactionCreateInput, E as subscriptionUpdateSchema, M as transactionListFilterSchema, N as transactionUpdateSchema, O as TransactionListFilter, S as SubscriptionUpdateInput, T as subscriptionListFilterSchema, _ as settlementCreateSchema, a as escrowReleaseSchema, b as SubscriptionCreateInput, c as PaymentVerifyInput, d as paymentVerifySchema, f as refundSchema, g as settlementBaseSchema, h as SettlementUpdateInput, i as escrowHoldSchema, j as transactionCreateSchema, k as TransactionUpdateInput, l as RefundInput, m as SettlementListFilter, n as EscrowReleaseInput, o as splitRuleSchema, p as SettlementCreateInput, r as SplitRuleInput, s as PaymentIntentInput, t as EscrowHoldInput, u as paymentIntentSchema, v as settlementListFilterSchema, w as subscriptionCreateSchema, x as SubscriptionListFilter, y as settlementUpdateSchema } from "../escrow.schema-D5X32LwX.mjs";
|
|
2
|
+
export { EscrowHoldInput, EscrowReleaseInput, PaymentIntentInput, PaymentVerifyInput, RefundInput, SettlementCreateInput, SettlementListFilter, SettlementUpdateInput, SplitRuleInput, SubscriptionCreateInput, SubscriptionListFilter, SubscriptionUpdateInput, TransactionCreateInput, TransactionListFilter, TransactionUpdateInput, escrowHoldSchema, escrowReleaseSchema, paymentIntentSchema, paymentVerifySchema, refundSchema, settlementBaseSchema, settlementCreateSchema, settlementListFilterSchema, settlementUpdateSchema, splitRuleSchema, subscriptionBaseSchema, subscriptionCreateSchema, subscriptionListFilterSchema, subscriptionUpdateSchema, transactionBaseSchema, transactionCreateSchema, transactionListFilterSchema, transactionUpdateSchema };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { _ as transactionListFilterSchema, a as paymentVerifySchema, c as settlementCreateSchema, d as subscriptionBaseSchema, f as subscriptionCreateSchema, g as transactionCreateSchema, h as transactionBaseSchema, i as paymentIntentSchema, l as settlementListFilterSchema, m as subscriptionUpdateSchema, n as escrowReleaseSchema, o as refundSchema, p as subscriptionListFilterSchema, r as splitRuleSchema, s as settlementBaseSchema, t as escrowHoldSchema, u as settlementUpdateSchema, v as transactionUpdateSchema } from "../escrow.schema-BBv9oVEW.mjs";
|
|
2
|
+
|
|
3
|
+
export { escrowHoldSchema, escrowReleaseSchema, paymentIntentSchema, paymentVerifySchema, refundSchema, settlementBaseSchema, settlementCreateSchema, settlementListFilterSchema, settlementUpdateSchema, splitRuleSchema, subscriptionBaseSchema, subscriptionCreateSchema, subscriptionListFilterSchema, subscriptionUpdateSchema, transactionBaseSchema, transactionCreateSchema, transactionListFilterSchema, transactionUpdateSchema };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@classytic/revenue",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
|
+
"description": "Payment lifecycle engine — transactions, subscriptions, escrow, settlements, commissions. MongoKit-powered, Arc-compatible, framework-agnostic.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.mjs",
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
"payment",
|
|
15
15
|
"saas",
|
|
16
16
|
"billing",
|
|
17
|
-
"proration",
|
|
18
17
|
"recurring",
|
|
19
18
|
"gateway",
|
|
20
19
|
"webhook",
|
|
@@ -22,7 +21,6 @@
|
|
|
22
21
|
"sslcommerz",
|
|
23
22
|
"bkash",
|
|
24
23
|
"transaction",
|
|
25
|
-
"invoice",
|
|
26
24
|
"escrow",
|
|
27
25
|
"hold",
|
|
28
26
|
"release",
|
|
@@ -30,6 +28,8 @@
|
|
|
30
28
|
"affiliate",
|
|
31
29
|
"commission",
|
|
32
30
|
"marketplace",
|
|
31
|
+
"mongokit",
|
|
32
|
+
"arc",
|
|
33
33
|
"typescript"
|
|
34
34
|
],
|
|
35
35
|
"author": "Classytic <classytic.dev@gmail.com> (https://github.com/classytic)",
|
|
@@ -49,75 +49,74 @@
|
|
|
49
49
|
"build": "tsdown",
|
|
50
50
|
"dev": "tsdown --watch",
|
|
51
51
|
"typecheck": "tsc --noEmit",
|
|
52
|
-
"prepublishOnly": "
|
|
53
|
-
"test": "cd .. && vitest run"
|
|
52
|
+
"prepublishOnly": "tsdown",
|
|
53
|
+
"test": "cd .. && vitest run",
|
|
54
|
+
"release:push": "node -e \"require('child_process').execSync('npm run push -- main',{cwd:require('node:path').resolve('..'),stdio:'inherit'})\"",
|
|
55
|
+
"release:tag": "node -e \"const v=require('./package.json').version,p=require('node:path').resolve('..'),{execSync:e}=require('child_process'),r=c=>e(c,{cwd:p,stdio:'inherit'});r('git tag -a revenue-v'+v+' -m revenue-v'+v);r('npm run push -- revenue-v'+v)\"",
|
|
56
|
+
"release": "npm run release:push && npm run release:tag && npm publish"
|
|
54
57
|
},
|
|
55
58
|
"exports": {
|
|
56
59
|
".": {
|
|
57
60
|
"types": "./dist/index.d.mts",
|
|
58
61
|
"default": "./dist/index.mjs"
|
|
59
62
|
},
|
|
60
|
-
"./
|
|
61
|
-
"types": "./dist/
|
|
62
|
-
"default": "./dist/
|
|
63
|
+
"./schemas": {
|
|
64
|
+
"types": "./dist/validators/index.d.mts",
|
|
65
|
+
"default": "./dist/validators/index.mjs"
|
|
63
66
|
},
|
|
64
67
|
"./enums": {
|
|
65
68
|
"types": "./dist/enums/index.d.mts",
|
|
66
69
|
"default": "./dist/enums/index.mjs"
|
|
67
70
|
},
|
|
68
71
|
"./events": {
|
|
69
|
-
"types": "./dist/
|
|
70
|
-
"default": "./dist/
|
|
71
|
-
},
|
|
72
|
-
"./plugins": {
|
|
73
|
-
"types": "./dist/infrastructure/plugins/index.d.mts",
|
|
74
|
-
"default": "./dist/infrastructure/plugins/index.mjs"
|
|
72
|
+
"types": "./dist/events/index.d.mts",
|
|
73
|
+
"default": "./dist/events/index.mjs"
|
|
75
74
|
},
|
|
76
75
|
"./providers": {
|
|
77
76
|
"types": "./dist/providers/index.d.mts",
|
|
78
77
|
"default": "./dist/providers/index.mjs"
|
|
79
78
|
},
|
|
80
|
-
"./
|
|
81
|
-
"types": "./dist/
|
|
82
|
-
"default": "./dist/
|
|
83
|
-
},
|
|
84
|
-
"./schemas": {
|
|
85
|
-
"types": "./dist/schemas/index.d.mts",
|
|
86
|
-
"default": "./dist/schemas/index.mjs"
|
|
79
|
+
"./bridges": {
|
|
80
|
+
"types": "./dist/bridges/index.d.mts",
|
|
81
|
+
"default": "./dist/bridges/index.mjs"
|
|
87
82
|
},
|
|
88
|
-
"./
|
|
89
|
-
"types": "./dist/
|
|
90
|
-
"default": "./dist/
|
|
91
|
-
},
|
|
92
|
-
"./services": {
|
|
93
|
-
"types": "./dist/application/services/index.d.mts",
|
|
94
|
-
"default": "./dist/application/services/index.mjs"
|
|
83
|
+
"./repositories": {
|
|
84
|
+
"types": "./dist/repositories/create-repositories.d.mts",
|
|
85
|
+
"default": "./dist/repositories/create-repositories.mjs"
|
|
95
86
|
},
|
|
96
87
|
"./utils": {
|
|
97
|
-
"types": "./dist/
|
|
98
|
-
"default": "./dist/
|
|
88
|
+
"types": "./dist/shared/index.d.mts",
|
|
89
|
+
"default": "./dist/shared/index.mjs"
|
|
90
|
+
},
|
|
91
|
+
"./core": {
|
|
92
|
+
"types": "./dist/core/state-machines.d.mts",
|
|
93
|
+
"default": "./dist/core/state-machines.mjs"
|
|
99
94
|
}
|
|
100
95
|
},
|
|
101
96
|
"files": [
|
|
102
97
|
"dist",
|
|
103
98
|
"README.md",
|
|
99
|
+
"CHANGELOG.md",
|
|
104
100
|
"LICENSE"
|
|
105
101
|
],
|
|
106
102
|
"peerDependencies": {
|
|
107
|
-
"@classytic/
|
|
108
|
-
"
|
|
109
|
-
"
|
|
103
|
+
"@classytic/mongokit": ">=3.11.0",
|
|
104
|
+
"@classytic/repo-core": ">=0.2.0",
|
|
105
|
+
"@classytic/primitives": ">=0.2.0",
|
|
106
|
+
"mongoose": ">=9.4.1",
|
|
107
|
+
"zod": ">=4.0.0"
|
|
110
108
|
},
|
|
111
109
|
"engines": {
|
|
112
110
|
"node": ">=18.0.0"
|
|
113
111
|
},
|
|
114
112
|
"devDependencies": {
|
|
113
|
+
"@classytic/mongokit": ">=3.11.0",
|
|
114
|
+
"@classytic/repo-core": ">=0.2.0",
|
|
115
|
+
"@classytic/primitives": ">=0.2.0",
|
|
115
116
|
"@types/node": "^22.8.7",
|
|
117
|
+
"mongoose": "^9.4.1",
|
|
116
118
|
"tsdown": "^0.20.3",
|
|
117
119
|
"typescript": "^5.6.3",
|
|
118
120
|
"zod": "^4.1.13"
|
|
119
|
-
},
|
|
120
|
-
"dependencies": {
|
|
121
|
-
"nanoid": "^5.1.6"
|
|
122
121
|
}
|
|
123
|
-
}
|
|
122
|
+
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { a as MonetizationService, i as PaymentService, n as EscrowService, r as TransactionService, t as SettlementService } from "../../settlement.service-DjzAjezU.mjs";
|
|
2
|
-
import "../../index-Dsp7H5Wb.mjs";
|
|
3
|
-
import "../../settlement.schema-DnNSFpGd.mjs";
|
|
4
|
-
export { EscrowService, MonetizationService, PaymentService, SettlementService, TransactionService };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { a as MonetizationService, i as PaymentService, n as EscrowService, r as TransactionService, t as SettlementService } from "../../settlement.service-DmdKv0Zu.mjs";
|
|
2
|
-
|
|
3
|
-
export { EscrowService, MonetizationService, PaymentService, SettlementService, TransactionService };
|