@classytic/revenue 1.0.6 → 1.1.3

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.
Files changed (81) hide show
  1. package/README.md +582 -633
  2. package/dist/application/services/index.d.mts +4 -0
  3. package/dist/application/services/index.mjs +3 -0
  4. package/dist/base-CsTlVQJe.d.mts +136 -0
  5. package/dist/base-DCoyIUj6.mjs +152 -0
  6. package/dist/category-resolver-DV83N8ok.mjs +284 -0
  7. package/dist/commission-split-BzB8cd39.mjs +485 -0
  8. package/dist/core/events.d.mts +294 -0
  9. package/dist/core/events.mjs +100 -0
  10. package/dist/core/index.d.mts +9 -0
  11. package/dist/core/index.mjs +8 -0
  12. package/dist/enums/index.d.mts +157 -0
  13. package/dist/enums/index.mjs +56 -0
  14. package/dist/errors-CorrWz7A.d.mts +787 -0
  15. package/dist/escrow.enums-CZGrrdg7.mjs +101 -0
  16. package/dist/escrow.enums-DwdLuuve.d.mts +78 -0
  17. package/dist/idempotency-DaYcUGY1.mjs +172 -0
  18. package/dist/index-Dsp7H5Wb.d.mts +471 -0
  19. package/dist/index.d.mts +9 -0
  20. package/dist/index.mjs +38 -0
  21. package/dist/infrastructure/plugins/index.d.mts +239 -0
  22. package/dist/infrastructure/plugins/index.mjs +345 -0
  23. package/dist/money-CvrDOijQ.mjs +271 -0
  24. package/dist/money-DPG8AtJ8.d.mts +112 -0
  25. package/dist/payment.enums-HAuAS9Pp.d.mts +70 -0
  26. package/dist/payment.enums-tEFVa-Xp.mjs +69 -0
  27. package/dist/plugin-BbK0OVHy.d.mts +327 -0
  28. package/dist/plugin-Cd_V04Em.mjs +210 -0
  29. package/dist/providers/index.d.mts +3 -0
  30. package/dist/providers/index.mjs +3 -0
  31. package/dist/reconciliation/index.d.mts +193 -0
  32. package/dist/reconciliation/index.mjs +192 -0
  33. package/dist/retry-HHCOXYdn.d.mts +186 -0
  34. package/dist/revenue-9scqKSef.mjs +553 -0
  35. package/dist/schemas/index.d.mts +2665 -0
  36. package/dist/schemas/index.mjs +717 -0
  37. package/dist/schemas/validation.d.mts +375 -0
  38. package/dist/schemas/validation.mjs +325 -0
  39. package/dist/settlement.enums-DFhkqZEY.d.mts +132 -0
  40. package/dist/settlement.schema-D5uWB5tP.d.mts +344 -0
  41. package/dist/settlement.service-BxuiHpNC.d.mts +594 -0
  42. package/dist/settlement.service-CUxbUTzT.mjs +2510 -0
  43. package/dist/split.enums-BrjabxIX.mjs +86 -0
  44. package/dist/split.enums-DmskfLOM.d.mts +43 -0
  45. package/dist/tax-BoCt5cEd.d.mts +61 -0
  46. package/dist/tax-EQ15DO81.mjs +162 -0
  47. package/dist/transaction.enums-pCyMFT4Z.mjs +96 -0
  48. package/dist/utils/index.d.mts +428 -0
  49. package/dist/utils/index.mjs +346 -0
  50. package/package.json +48 -33
  51. package/dist/actions-Ctf2XUL-.d.ts +0 -519
  52. package/dist/core/index.d.ts +0 -890
  53. package/dist/core/index.js +0 -3005
  54. package/dist/core/index.js.map +0 -1
  55. package/dist/enums/index.d.ts +0 -138
  56. package/dist/enums/index.js +0 -263
  57. package/dist/enums/index.js.map +0 -1
  58. package/dist/index-BnEXsnLJ.d.ts +0 -378
  59. package/dist/index-C5SsOrV0.d.ts +0 -534
  60. package/dist/index.d.ts +0 -43
  61. package/dist/index.js +0 -4498
  62. package/dist/index.js.map +0 -1
  63. package/dist/payment.enums-B_RwB8iR.d.ts +0 -184
  64. package/dist/providers/index.d.ts +0 -132
  65. package/dist/providers/index.js +0 -122
  66. package/dist/providers/index.js.map +0 -1
  67. package/dist/retry-80lBCmSe.d.ts +0 -234
  68. package/dist/schemas/index.d.ts +0 -1051
  69. package/dist/schemas/index.js +0 -627
  70. package/dist/schemas/index.js.map +0 -1
  71. package/dist/schemas/validation.d.ts +0 -384
  72. package/dist/schemas/validation.js +0 -302
  73. package/dist/schemas/validation.js.map +0 -1
  74. package/dist/services/index.d.ts +0 -3
  75. package/dist/services/index.js +0 -1702
  76. package/dist/services/index.js.map +0 -1
  77. package/dist/split.schema-DLVF3XBI.d.ts +0 -1122
  78. package/dist/transaction.enums-7uBnuswI.d.ts +0 -87
  79. package/dist/utils/index.d.ts +0 -24
  80. package/dist/utils/index.js +0 -1140
  81. package/dist/utils/index.js.map +0 -1
@@ -0,0 +1,271 @@
1
+ //#region src/shared/utils/formatters/money.ts
2
+ /** Supported currencies with their decimal places */
3
+ const CURRENCIES = {
4
+ USD: {
5
+ code: "USD",
6
+ decimals: 2,
7
+ symbol: "$",
8
+ name: "US Dollar"
9
+ },
10
+ EUR: {
11
+ code: "EUR",
12
+ decimals: 2,
13
+ symbol: "€",
14
+ name: "Euro"
15
+ },
16
+ GBP: {
17
+ code: "GBP",
18
+ decimals: 2,
19
+ symbol: "£",
20
+ name: "British Pound"
21
+ },
22
+ BDT: {
23
+ code: "BDT",
24
+ decimals: 2,
25
+ symbol: "৳",
26
+ name: "Bangladeshi Taka"
27
+ },
28
+ INR: {
29
+ code: "INR",
30
+ decimals: 2,
31
+ symbol: "₹",
32
+ name: "Indian Rupee"
33
+ },
34
+ JPY: {
35
+ code: "JPY",
36
+ decimals: 0,
37
+ symbol: "¥",
38
+ name: "Japanese Yen"
39
+ },
40
+ CNY: {
41
+ code: "CNY",
42
+ decimals: 2,
43
+ symbol: "¥",
44
+ name: "Chinese Yuan"
45
+ },
46
+ AED: {
47
+ code: "AED",
48
+ decimals: 2,
49
+ symbol: "د.إ",
50
+ name: "UAE Dirham"
51
+ },
52
+ SAR: {
53
+ code: "SAR",
54
+ decimals: 2,
55
+ symbol: "﷼",
56
+ name: "Saudi Riyal"
57
+ },
58
+ SGD: {
59
+ code: "SGD",
60
+ decimals: 2,
61
+ symbol: "S$",
62
+ name: "Singapore Dollar"
63
+ },
64
+ AUD: {
65
+ code: "AUD",
66
+ decimals: 2,
67
+ symbol: "A$",
68
+ name: "Australian Dollar"
69
+ },
70
+ CAD: {
71
+ code: "CAD",
72
+ decimals: 2,
73
+ symbol: "C$",
74
+ name: "Canadian Dollar"
75
+ }
76
+ };
77
+ /**
78
+ * Money class - immutable money representation
79
+ */
80
+ var Money = class Money {
81
+ amount;
82
+ currency;
83
+ constructor(amount, currency) {
84
+ if (!Number.isInteger(amount)) throw new Error(`Money amount must be integer (smallest unit). Got: ${amount}`);
85
+ this.amount = amount;
86
+ this.currency = currency.toUpperCase();
87
+ }
88
+ /**
89
+ * Create money from smallest unit (cents, paisa)
90
+ * @example Money.cents(1999, 'USD') // $19.99
91
+ */
92
+ static cents(amount, currency = "USD") {
93
+ return new Money(Math.round(amount), currency);
94
+ }
95
+ /**
96
+ * Create money from major unit (dollars, taka)
97
+ * @example Money.of(19.99, 'USD') // $19.99 (stored as 1999 cents)
98
+ */
99
+ static of(amount, currency = "USD") {
100
+ const config = CURRENCIES[currency.toUpperCase()] ?? { decimals: 2 };
101
+ const multiplier = Math.pow(10, config.decimals);
102
+ return new Money(Math.round(amount * multiplier), currency);
103
+ }
104
+ /**
105
+ * Create zero money
106
+ */
107
+ static zero(currency = "USD") {
108
+ return new Money(0, currency);
109
+ }
110
+ static usd(cents) {
111
+ return Money.cents(cents, "USD");
112
+ }
113
+ static eur(cents) {
114
+ return Money.cents(cents, "EUR");
115
+ }
116
+ static gbp(pence) {
117
+ return Money.cents(pence, "GBP");
118
+ }
119
+ static bdt(paisa) {
120
+ return Money.cents(paisa, "BDT");
121
+ }
122
+ static inr(paisa) {
123
+ return Money.cents(paisa, "INR");
124
+ }
125
+ static jpy(yen) {
126
+ return Money.cents(yen, "JPY");
127
+ }
128
+ /**
129
+ * Add two money values (must be same currency)
130
+ */
131
+ add(other) {
132
+ this.assertSameCurrency(other);
133
+ return new Money(this.amount + other.amount, this.currency);
134
+ }
135
+ /**
136
+ * Subtract money (must be same currency)
137
+ */
138
+ subtract(other) {
139
+ this.assertSameCurrency(other);
140
+ return new Money(this.amount - other.amount, this.currency);
141
+ }
142
+ /**
143
+ * Multiply by a factor (rounds to nearest integer)
144
+ */
145
+ multiply(factor) {
146
+ return new Money(Math.round(this.amount * factor), this.currency);
147
+ }
148
+ /**
149
+ * Divide by a divisor (rounds to nearest integer)
150
+ */
151
+ divide(divisor) {
152
+ if (divisor === 0) throw new Error("Cannot divide by zero");
153
+ return new Money(Math.round(this.amount / divisor), this.currency);
154
+ }
155
+ /**
156
+ * Calculate percentage
157
+ * @example money.percentage(10) // 10% of money
158
+ */
159
+ percentage(percent) {
160
+ return this.multiply(percent / 100);
161
+ }
162
+ /**
163
+ * Allocate money among recipients (handles rounding)
164
+ * @example Money.usd(100).allocate([1, 1, 1]) // [34, 33, 33] cents
165
+ */
166
+ allocate(ratios) {
167
+ const total = ratios.reduce((a, b) => a + b, 0);
168
+ if (total === 0) throw new Error("Ratios must sum to more than 0");
169
+ let remainder = this.amount;
170
+ const results = [];
171
+ for (let i = 0; i < ratios.length; i++) {
172
+ const share = Math.floor(this.amount * ratios[i] / total);
173
+ results.push(new Money(share, this.currency));
174
+ remainder -= share;
175
+ }
176
+ for (let i = 0; i < remainder; i++) results[i] = new Money(results[i].amount + 1, this.currency);
177
+ return results;
178
+ }
179
+ /**
180
+ * Split equally among n recipients
181
+ */
182
+ split(parts) {
183
+ return this.allocate(Array(parts).fill(1));
184
+ }
185
+ isZero() {
186
+ return this.amount === 0;
187
+ }
188
+ isPositive() {
189
+ return this.amount > 0;
190
+ }
191
+ isNegative() {
192
+ return this.amount < 0;
193
+ }
194
+ equals(other) {
195
+ return this.amount === other.amount && this.currency === other.currency;
196
+ }
197
+ greaterThan(other) {
198
+ this.assertSameCurrency(other);
199
+ return this.amount > other.amount;
200
+ }
201
+ lessThan(other) {
202
+ this.assertSameCurrency(other);
203
+ return this.amount < other.amount;
204
+ }
205
+ greaterThanOrEqual(other) {
206
+ return this.greaterThan(other) || this.equals(other);
207
+ }
208
+ lessThanOrEqual(other) {
209
+ return this.lessThan(other) || this.equals(other);
210
+ }
211
+ /**
212
+ * Get amount in major unit (dollars, taka)
213
+ */
214
+ toUnit() {
215
+ const config = CURRENCIES[this.currency] ?? { decimals: 2 };
216
+ return this.amount / Math.pow(10, config.decimals);
217
+ }
218
+ /**
219
+ * Format for display
220
+ * @example Money.usd(1999).format() // "$19.99"
221
+ */
222
+ format(locale = "en-US") {
223
+ return new Intl.NumberFormat(locale, {
224
+ style: "currency",
225
+ currency: this.currency
226
+ }).format(this.toUnit());
227
+ }
228
+ /**
229
+ * Format without currency symbol
230
+ */
231
+ formatAmount(locale = "en-US") {
232
+ const config = CURRENCIES[this.currency] ?? { decimals: 2 };
233
+ return new Intl.NumberFormat(locale, {
234
+ minimumFractionDigits: config.decimals,
235
+ maximumFractionDigits: config.decimals
236
+ }).format(this.toUnit());
237
+ }
238
+ /**
239
+ * Convert to JSON-serializable object
240
+ */
241
+ toJSON() {
242
+ return {
243
+ amount: this.amount,
244
+ currency: this.currency
245
+ };
246
+ }
247
+ /**
248
+ * Create from JSON
249
+ */
250
+ static fromJSON(json) {
251
+ return new Money(json.amount, json.currency);
252
+ }
253
+ toString() {
254
+ return `${this.currency} ${this.amount}`;
255
+ }
256
+ assertSameCurrency(other) {
257
+ if (this.currency !== other.currency) throw new Error(`Currency mismatch: ${this.currency} vs ${other.currency}. Convert first.`);
258
+ }
259
+ };
260
+ /**
261
+ * Helper functions for legacy compatibility
262
+ */
263
+ function toSmallestUnit(amount, currency = "USD") {
264
+ return Money.of(amount, currency).amount;
265
+ }
266
+ function fromSmallestUnit(amount, currency = "USD") {
267
+ return Money.cents(amount, currency).toUnit();
268
+ }
269
+
270
+ //#endregion
271
+ export { fromSmallestUnit as n, toSmallestUnit as r, Money as t };
@@ -0,0 +1,112 @@
1
+ //#region src/shared/utils/formatters/money.d.ts
2
+ /**
3
+ * Money Utility - Integer-safe currency handling
4
+ * @classytic/revenue
5
+ *
6
+ * Never use floating point for money!
7
+ * All amounts stored as smallest unit (cents, paisa, etc.)
8
+ *
9
+ * Inspired by: Stripe, Dinero.js, tc39/proposal-decimal
10
+ */
11
+ interface MoneyValue {
12
+ /** Amount in smallest currency unit (cents, paisa, etc.) */
13
+ readonly amount: number;
14
+ /** ISO 4217 currency code */
15
+ readonly currency: string;
16
+ }
17
+ /**
18
+ * Money class - immutable money representation
19
+ */
20
+ declare class Money implements MoneyValue {
21
+ readonly amount: number;
22
+ readonly currency: string;
23
+ private constructor();
24
+ /**
25
+ * Create money from smallest unit (cents, paisa)
26
+ * @example Money.cents(1999, 'USD') // $19.99
27
+ */
28
+ static cents(amount: number, currency?: string): Money;
29
+ /**
30
+ * Create money from major unit (dollars, taka)
31
+ * @example Money.of(19.99, 'USD') // $19.99 (stored as 1999 cents)
32
+ */
33
+ static of(amount: number, currency?: string): Money;
34
+ /**
35
+ * Create zero money
36
+ */
37
+ static zero(currency?: string): Money;
38
+ static usd(cents: number): Money;
39
+ static eur(cents: number): Money;
40
+ static gbp(pence: number): Money;
41
+ static bdt(paisa: number): Money;
42
+ static inr(paisa: number): Money;
43
+ static jpy(yen: number): Money;
44
+ /**
45
+ * Add two money values (must be same currency)
46
+ */
47
+ add(other: Money): Money;
48
+ /**
49
+ * Subtract money (must be same currency)
50
+ */
51
+ subtract(other: Money): Money;
52
+ /**
53
+ * Multiply by a factor (rounds to nearest integer)
54
+ */
55
+ multiply(factor: number): Money;
56
+ /**
57
+ * Divide by a divisor (rounds to nearest integer)
58
+ */
59
+ divide(divisor: number): Money;
60
+ /**
61
+ * Calculate percentage
62
+ * @example money.percentage(10) // 10% of money
63
+ */
64
+ percentage(percent: number): Money;
65
+ /**
66
+ * Allocate money among recipients (handles rounding)
67
+ * @example Money.usd(100).allocate([1, 1, 1]) // [34, 33, 33] cents
68
+ */
69
+ allocate(ratios: number[]): Money[];
70
+ /**
71
+ * Split equally among n recipients
72
+ */
73
+ split(parts: number): Money[];
74
+ isZero(): boolean;
75
+ isPositive(): boolean;
76
+ isNegative(): boolean;
77
+ equals(other: Money): boolean;
78
+ greaterThan(other: Money): boolean;
79
+ lessThan(other: Money): boolean;
80
+ greaterThanOrEqual(other: Money): boolean;
81
+ lessThanOrEqual(other: Money): boolean;
82
+ /**
83
+ * Get amount in major unit (dollars, taka)
84
+ */
85
+ toUnit(): number;
86
+ /**
87
+ * Format for display
88
+ * @example Money.usd(1999).format() // "$19.99"
89
+ */
90
+ format(locale?: string): string;
91
+ /**
92
+ * Format without currency symbol
93
+ */
94
+ formatAmount(locale?: string): string;
95
+ /**
96
+ * Convert to JSON-serializable object
97
+ */
98
+ toJSON(): MoneyValue;
99
+ /**
100
+ * Create from JSON
101
+ */
102
+ static fromJSON(json: MoneyValue): Money;
103
+ toString(): string;
104
+ private assertSameCurrency;
105
+ }
106
+ /**
107
+ * Helper functions for legacy compatibility
108
+ */
109
+ declare function toSmallestUnit(amount: number, currency?: string): number;
110
+ declare function fromSmallestUnit(amount: number, currency?: string): number;
111
+ //#endregion
112
+ export { toSmallestUnit as i, MoneyValue as n, fromSmallestUnit as r, Money as t };
@@ -0,0 +1,70 @@
1
+ //#region src/enums/payment.enums.d.ts
2
+ /**
3
+ * Payment Enums
4
+ * @classytic/revenue
5
+ *
6
+ * Library-managed payment enums only.
7
+ * Users define their own payment methods in their schema.
8
+ */
9
+ /**
10
+ * Payment Status - Library-managed states
11
+ */
12
+ declare const PAYMENT_STATUS: {
13
+ readonly PENDING: "pending";
14
+ readonly VERIFIED: "verified";
15
+ readonly FAILED: "failed";
16
+ readonly REFUNDED: "refunded";
17
+ readonly CANCELLED: "cancelled";
18
+ };
19
+ type PaymentStatus = typeof PAYMENT_STATUS;
20
+ type PaymentStatusValue = PaymentStatus[keyof PaymentStatus];
21
+ declare const PAYMENT_STATUS_VALUES: PaymentStatusValue[];
22
+ /**
23
+ * Common gateway type constants for convenience
24
+ *
25
+ * ⚠️ IMPORTANT: These are NOT restrictions - just common reference values
26
+ *
27
+ * You can register ANY custom gateway provider by passing it to createRevenue():
28
+ *
29
+ * @example
30
+ * ```typescript
31
+ * const revenue = createRevenue({
32
+ * providers: {
33
+ * manual: new ManualProvider(),
34
+ * bkash: new BkashProvider(), // ✅ Custom gateway
35
+ * nagad: new NagadProvider(), // ✅ Custom gateway
36
+ * stripe: new StripeProvider(), // ✅ Custom gateway
37
+ * paypal: new PaypalProvider(), // ✅ Any gateway you want
38
+ * }
39
+ * });
40
+ *
41
+ * // Use by name
42
+ * await revenue.monetization.create({ gateway: 'bkash', ... });
43
+ * ```
44
+ *
45
+ * Reference values:
46
+ * - MANUAL: Built-in manual provider (@classytic/revenue-manual)
47
+ * - STRIPE: Stripe provider (build with @classytic/revenue-stripe)
48
+ * - SSLCOMMERZ: SSLCommerz provider (build with @classytic/revenue-sslcommerz)
49
+ *
50
+ * Add your own: bkash, nagad, rocket, paypal, razorpay, flutterwave, etc.
51
+ */
52
+ declare const PAYMENT_GATEWAY_TYPE: {
53
+ readonly MANUAL: "manual";
54
+ readonly STRIPE: "stripe";
55
+ readonly SSLCOMMERZ: "sslcommerz";
56
+ };
57
+ type PaymentGatewayType = typeof PAYMENT_GATEWAY_TYPE;
58
+ type PaymentGatewayTypeValue = PaymentGatewayType[keyof PaymentGatewayType];
59
+ declare const PAYMENT_GATEWAY_TYPE_VALUES: PaymentGatewayTypeValue[];
60
+ declare const GATEWAY_TYPES: {
61
+ readonly MANUAL: "manual";
62
+ readonly STRIPE: "stripe";
63
+ readonly SSLCOMMERZ: "sslcommerz";
64
+ };
65
+ declare const GATEWAY_TYPE_VALUES: PaymentGatewayTypeValue[];
66
+ declare function isPaymentStatus(value: unknown): value is PaymentStatusValue;
67
+ declare function isPaymentGatewayType(value: unknown): value is PaymentGatewayTypeValue;
68
+ declare const isGatewayType: typeof isPaymentGatewayType;
69
+ //#endregion
70
+ export { PAYMENT_STATUS as a, PaymentGatewayTypeValue as c, isGatewayType as d, isPaymentGatewayType as f, PAYMENT_GATEWAY_TYPE_VALUES as i, PaymentStatus as l, GATEWAY_TYPE_VALUES as n, PAYMENT_STATUS_VALUES as o, isPaymentStatus as p, PAYMENT_GATEWAY_TYPE as r, PaymentGatewayType as s, GATEWAY_TYPES as t, PaymentStatusValue as u };
@@ -0,0 +1,69 @@
1
+ //#region src/enums/payment.enums.ts
2
+ /**
3
+ * Payment Enums
4
+ * @classytic/revenue
5
+ *
6
+ * Library-managed payment enums only.
7
+ * Users define their own payment methods in their schema.
8
+ */
9
+ /**
10
+ * Payment Status - Library-managed states
11
+ */
12
+ const PAYMENT_STATUS = {
13
+ PENDING: "pending",
14
+ VERIFIED: "verified",
15
+ FAILED: "failed",
16
+ REFUNDED: "refunded",
17
+ CANCELLED: "cancelled"
18
+ };
19
+ const PAYMENT_STATUS_VALUES = Object.values(PAYMENT_STATUS);
20
+ /**
21
+ * Common gateway type constants for convenience
22
+ *
23
+ * ⚠️ IMPORTANT: These are NOT restrictions - just common reference values
24
+ *
25
+ * You can register ANY custom gateway provider by passing it to createRevenue():
26
+ *
27
+ * @example
28
+ * ```typescript
29
+ * const revenue = createRevenue({
30
+ * providers: {
31
+ * manual: new ManualProvider(),
32
+ * bkash: new BkashProvider(), // ✅ Custom gateway
33
+ * nagad: new NagadProvider(), // ✅ Custom gateway
34
+ * stripe: new StripeProvider(), // ✅ Custom gateway
35
+ * paypal: new PaypalProvider(), // ✅ Any gateway you want
36
+ * }
37
+ * });
38
+ *
39
+ * // Use by name
40
+ * await revenue.monetization.create({ gateway: 'bkash', ... });
41
+ * ```
42
+ *
43
+ * Reference values:
44
+ * - MANUAL: Built-in manual provider (@classytic/revenue-manual)
45
+ * - STRIPE: Stripe provider (build with @classytic/revenue-stripe)
46
+ * - SSLCOMMERZ: SSLCommerz provider (build with @classytic/revenue-sslcommerz)
47
+ *
48
+ * Add your own: bkash, nagad, rocket, paypal, razorpay, flutterwave, etc.
49
+ */
50
+ const PAYMENT_GATEWAY_TYPE = {
51
+ MANUAL: "manual",
52
+ STRIPE: "stripe",
53
+ SSLCOMMERZ: "sslcommerz"
54
+ };
55
+ const PAYMENT_GATEWAY_TYPE_VALUES = Object.values(PAYMENT_GATEWAY_TYPE);
56
+ const GATEWAY_TYPES = PAYMENT_GATEWAY_TYPE;
57
+ const GATEWAY_TYPE_VALUES = PAYMENT_GATEWAY_TYPE_VALUES;
58
+ const paymentStatusSet = new Set(PAYMENT_STATUS_VALUES);
59
+ const paymentGatewayTypeSet = new Set(PAYMENT_GATEWAY_TYPE_VALUES);
60
+ function isPaymentStatus(value) {
61
+ return typeof value === "string" && paymentStatusSet.has(value);
62
+ }
63
+ function isPaymentGatewayType(value) {
64
+ return typeof value === "string" && paymentGatewayTypeSet.has(value);
65
+ }
66
+ const isGatewayType = isPaymentGatewayType;
67
+
68
+ //#endregion
69
+ export { PAYMENT_STATUS as a, isPaymentGatewayType as c, PAYMENT_GATEWAY_TYPE_VALUES as i, isPaymentStatus as l, GATEWAY_TYPE_VALUES as n, PAYMENT_STATUS_VALUES as o, PAYMENT_GATEWAY_TYPE as r, isGatewayType as s, GATEWAY_TYPES as t };