@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,428 @@
1
+ import { B as TransactionDocument, E as ProratedAmountParams, F as SplitInfo, L as SplitRule, R as SubscriptionDocument, T as PeriodRangeResult, U as TransactionTypeOptions, c as FieldUpdateValidationResult, d as Logger, i as CommissionInfo, m as MonetizationTypeValue, o as DurationResult, w as PeriodRangeParams, z as SubscriptionEntity } from "../index-Dsp7H5Wb.mjs";
2
+ import { a as createCircuitBreaker, i as RetryConfig, l as Result, n as CircuitBreakerConfig, o as retry, r as CircuitState, t as CircuitBreaker } from "../retry-HHCOXYdn.mjs";
3
+ import { i as toSmallestUnit, n as MoneyValue, r as fromSmallestUnit, t as Money } from "../money-DPG8AtJ8.mjs";
4
+ import { n as TaxConfig, r as TaxType, t as TaxCalculation } from "../tax-BoCt5cEd.mjs";
5
+
6
+ //#region src/shared/utils/calculators/commission.d.ts
7
+ /**
8
+ * Build commission object for transaction
9
+ *
10
+ * @param amount - Transaction amount
11
+ * @param commissionRate - Commission rate (0 to 1, e.g., 0.10 for 10%)
12
+ * @param gatewayFeeRate - Gateway fee rate (0 to 1, e.g., 0.018 for 1.8%)
13
+ * @returns Commission object or null
14
+ */
15
+ declare function calculateCommission(amount: number, commissionRate: number, gatewayFeeRate?: number): CommissionInfo | null;
16
+ /**
17
+ * Reverse commission on refund (proportional)
18
+ *
19
+ * @param originalCommission - Original commission object
20
+ * @param originalAmount - Original transaction amount
21
+ * @param refundAmount - Amount being refunded
22
+ * @returns Reversed commission or null
23
+ */
24
+ declare function reverseCommission(originalCommission: CommissionInfo | null | undefined, originalAmount: number, refundAmount: number): CommissionInfo | null;
25
+ //#endregion
26
+ //#region src/shared/utils/calculators/tax.d.ts
27
+ /**
28
+ * Calculate tax for a transaction
29
+ *
30
+ * Handles both tax-inclusive and tax-exclusive pricing:
31
+ * - Tax-exclusive: Customer pays baseAmount + tax
32
+ * - Tax-inclusive: Customer pays totalAmount (which includes tax)
33
+ *
34
+ * @param amount - Transaction amount (in smallest currency unit, e.g., cents)
35
+ * @param category - Transaction category (for exemption check)
36
+ * @param config - Tax configuration from app
37
+ * @returns Tax calculation result
38
+ *
39
+ * @example
40
+ * ```typescript
41
+ * // Tax-exclusive pricing (customer pays base + tax)
42
+ * const result = calculateTax(10000, 'subscription', {
43
+ * isRegistered: true,
44
+ * defaultRate: 0.15,
45
+ * pricesIncludeTax: false,
46
+ * });
47
+ * // result = {
48
+ * // isApplicable: true,
49
+ * // rate: 0.15,
50
+ * // baseAmount: 10000,
51
+ * // taxAmount: 1500,
52
+ * // totalAmount: 11500,
53
+ * // pricesIncludeTax: false
54
+ * // }
55
+ *
56
+ * // Tax-inclusive pricing (price already includes tax)
57
+ * const result2 = calculateTax(11500, 'subscription', {
58
+ * isRegistered: true,
59
+ * defaultRate: 0.15,
60
+ * pricesIncludeTax: true,
61
+ * });
62
+ * // result2 = {
63
+ * // isApplicable: true,
64
+ * // rate: 0.15,
65
+ * // baseAmount: 10000,
66
+ * // taxAmount: 1500,
67
+ * // totalAmount: 11500,
68
+ * // pricesIncludeTax: true
69
+ * // }
70
+ * ```
71
+ */
72
+ declare function calculateTax(amount: number, category: string, config: TaxConfig | null): TaxCalculation;
73
+ /**
74
+ * Get tax type based on transaction flow
75
+ *
76
+ * - Inflow transactions → tax is "collected" (you collect from customer)
77
+ * - Outflow transactions → tax is "paid" (you pay to supplier)
78
+ * - Exempt categories → "exempt"
79
+ *
80
+ * @param transactionFlow - 'inflow' or 'outflow'
81
+ * @param category - Transaction category
82
+ * @param exemptCategories - List of exempt categories
83
+ * @returns Tax type
84
+ *
85
+ * @example
86
+ * ```typescript
87
+ * getTaxType('inflow', 'subscription', []) // 'collected'
88
+ * getTaxType('outflow', 'refund', []) // 'paid'
89
+ * getTaxType('inflow', 'education', ['education']) // 'exempt'
90
+ * ```
91
+ */
92
+ declare function getTaxType(transactionFlow: 'inflow' | 'outflow', category: string, exemptCategories?: string[]): TaxType;
93
+ /**
94
+ * Reverse tax calculation for refunds
95
+ * When refunding a transaction, tax must be reversed proportionally
96
+ *
97
+ * @param originalTax - Tax from original transaction
98
+ * @param originalAmount - Original transaction amount
99
+ * @param refundAmount - Amount being refunded
100
+ * @returns Reversed tax calculation
101
+ *
102
+ * @example
103
+ * ```typescript
104
+ * // Original: $100 + $15 tax = $115
105
+ * const originalTax = {
106
+ * isApplicable: true,
107
+ * rate: 0.15,
108
+ * baseAmount: 10000,
109
+ * taxAmount: 1500,
110
+ * totalAmount: 11500,
111
+ * type: 'collected',
112
+ * };
113
+ *
114
+ * // Refund 50% ($57.50)
115
+ * const refundTax = reverseTax(originalTax, 11500, 5750);
116
+ * // refundTax = {
117
+ * // isApplicable: true,
118
+ * // rate: 0.15,
119
+ * // baseAmount: 5000,
120
+ * // taxAmount: 750,
121
+ * // totalAmount: 5750,
122
+ * // type: 'paid', // Reversed!
123
+ * // }
124
+ * ```
125
+ */
126
+ declare function reverseTax(originalTax: TaxCalculation & {
127
+ type?: TaxType;
128
+ }, originalAmount: number, refundAmount: number): TaxCalculation & {
129
+ type?: TaxType;
130
+ };
131
+ //#endregion
132
+ //#region src/shared/utils/calculators/commission-split.d.ts
133
+ /**
134
+ * Calculate multi-party commission splits
135
+ *
136
+ * @param amount - Transaction amount
137
+ * @param splitRules - Split configuration
138
+ * @param gatewayFeeRate - Gateway fee rate (optional)
139
+ * @returns Split objects
140
+ *
141
+ * @example
142
+ * calculateSplits(1000, [
143
+ * { type: 'platform_commission', recipientId: 'platform', recipientType: 'platform', rate: 0.10 },
144
+ * { type: 'affiliate_commission', recipientId: 'affiliate-123', recipientType: 'user', rate: 0.02 },
145
+ * ], 0.018);
146
+ *
147
+ * Returns:
148
+ * [
149
+ * { type: 'platform_commission', recipientId: 'platform', grossAmount: 100, gatewayFeeAmount: 18, netAmount: 82, ... },
150
+ * { type: 'affiliate_commission', recipientId: 'affiliate-123', grossAmount: 20, gatewayFeeAmount: 0, netAmount: 20, ... },
151
+ * ]
152
+ */
153
+ declare function calculateSplits(amount: number, splitRules?: SplitRule[], gatewayFeeRate?: number): SplitInfo[];
154
+ /**
155
+ * Calculate organization payout after splits
156
+ *
157
+ * @param amount - Total transaction amount
158
+ * @param splits - Calculated splits
159
+ * @returns Amount organization receives
160
+ */
161
+ declare function calculateOrganizationPayout(amount: number, splits?: SplitInfo[]): number;
162
+ /**
163
+ * Reverse splits proportionally on refund
164
+ *
165
+ * @param originalSplits - Original split objects
166
+ * @param originalAmount - Original transaction amount
167
+ * @param refundAmount - Amount being refunded
168
+ * @returns Reversed splits
169
+ */
170
+ declare function reverseSplits(originalSplits: SplitInfo[] | undefined | null, originalAmount: number, refundAmount: number): SplitInfo[];
171
+ //#endregion
172
+ //#region src/shared/utils/resilience/idempotency.d.ts
173
+ interface IdempotencyRecord<T = unknown> {
174
+ /** Idempotency key */
175
+ key: string;
176
+ /** Operation result (if completed) */
177
+ result?: T;
178
+ /** Operation status */
179
+ status: 'pending' | 'completed' | 'failed';
180
+ /** Creation timestamp */
181
+ createdAt: Date;
182
+ /** Completion timestamp */
183
+ completedAt?: Date;
184
+ /** Request hash for validation */
185
+ requestHash: string;
186
+ /** TTL - when record expires */
187
+ expiresAt: Date;
188
+ }
189
+ interface IdempotencyStore {
190
+ /** Get record by key */
191
+ get<T>(key: string): Promise<IdempotencyRecord<T> | null>;
192
+ /** Set or update record */
193
+ set<T>(key: string, record: IdempotencyRecord<T>): Promise<void>;
194
+ /** Delete record */
195
+ delete(key: string): Promise<void>;
196
+ /** Check if key exists */
197
+ exists(key: string): Promise<boolean>;
198
+ }
199
+ interface IdempotencyConfig {
200
+ /** TTL in milliseconds (default: 24 hours) */
201
+ ttl?: number;
202
+ /** Custom store implementation */
203
+ store?: IdempotencyStore;
204
+ /** Key prefix */
205
+ prefix?: string;
206
+ }
207
+ declare class IdempotencyError extends Error {
208
+ readonly code: 'DUPLICATE_REQUEST' | 'REQUEST_IN_PROGRESS' | 'REQUEST_MISMATCH';
209
+ constructor(message: string, code: 'DUPLICATE_REQUEST' | 'REQUEST_IN_PROGRESS' | 'REQUEST_MISMATCH');
210
+ }
211
+ /**
212
+ * Idempotency manager
213
+ */
214
+ declare class IdempotencyManager {
215
+ private store;
216
+ private ttl;
217
+ private prefix;
218
+ constructor(config?: IdempotencyConfig);
219
+ /**
220
+ * Generate a unique idempotency key
221
+ */
222
+ generateKey(): string;
223
+ /**
224
+ * Hash request parameters for validation
225
+ * Uses deterministic JSON serialization and simple hash function
226
+ */
227
+ private hashRequest;
228
+ /**
229
+ * Execute operation with idempotency protection
230
+ */
231
+ execute<T>(key: string, params: unknown, operation: () => Promise<T>): Promise<Result<T, IdempotencyError>>;
232
+ /**
233
+ * Check if operation with key was already completed
234
+ */
235
+ wasCompleted(key: string): Promise<boolean>;
236
+ /**
237
+ * Get cached result for key
238
+ */
239
+ getCached<T>(key: string): Promise<T | null>;
240
+ /**
241
+ * Invalidate a key (force re-execution on next call)
242
+ */
243
+ invalidate(key: string): Promise<void>;
244
+ /**
245
+ * Destroy the idempotency manager and cleanup resources
246
+ * Call this when shutting down to prevent memory leaks
247
+ */
248
+ destroy(): void;
249
+ }
250
+ /**
251
+ * Create idempotency manager
252
+ */
253
+ declare function createIdempotencyManager(config?: IdempotencyConfig): IdempotencyManager;
254
+ //#endregion
255
+ //#region src/shared/utils/validators/category-resolver.d.ts
256
+ /**
257
+ * Resolve category for a transaction based on entity and monetizationType
258
+ *
259
+ * Resolution Logic:
260
+ * 1. If categoryMappings[entity] exists → use it
261
+ * 2. Otherwise → fall back to default library category
262
+ *
263
+ * @param entity - The logical entity/identifier (e.g., 'Order', 'PlatformSubscription', 'Membership')
264
+ * NOTE: This is NOT a database model name - it's just a logical identifier
265
+ * @param monetizationType - The monetization type ('subscription', 'purchase', 'free')
266
+ * @param categoryMappings - User-defined category mappings from config
267
+ * @returns Category name for the transaction
268
+ *
269
+ * @example
270
+ * // With mapping defined
271
+ * resolveCategory('Order', 'subscription', { Order: 'order_subscription' })
272
+ * // Returns: 'order_subscription'
273
+ *
274
+ * @example
275
+ * // Without mapping, falls back to library default
276
+ * resolveCategory('Order', 'subscription', {})
277
+ * // Returns: 'subscription'
278
+ *
279
+ * @example
280
+ * // Different entities with different mappings
281
+ * const mappings = {
282
+ * Order: 'order_subscription',
283
+ * PlatformSubscription: 'platform_subscription',
284
+ * TenantUpgrade: 'tenant_upgrade',
285
+ * Membership: 'gym_membership',
286
+ * Enrollment: 'course_enrollment',
287
+ * };
288
+ * resolveCategory('PlatformSubscription', 'subscription', mappings)
289
+ * // Returns: 'platform_subscription'
290
+ */
291
+ declare function resolveCategory(entity: string | null | undefined, monetizationType: MonetizationTypeValue, categoryMappings?: Record<string, string>): string;
292
+ //#endregion
293
+ //#region src/utils/transaction-type.d.ts
294
+ /**
295
+ * Transaction types with different protection rules
296
+ */
297
+ declare const TRANSACTION_MANAGEMENT_TYPE: {
298
+ readonly MONETIZATION: "monetization";
299
+ readonly MANUAL: "manual";
300
+ };
301
+ type TransactionManagementType = typeof TRANSACTION_MANAGEMENT_TYPE[keyof typeof TRANSACTION_MANAGEMENT_TYPE];
302
+ /**
303
+ * Check if transaction is monetization-managed
304
+ *
305
+ * Monetization-managed means:
306
+ * - Created through subscription/purchase flows via the library
307
+ * - Status controlled by payment webhooks/verification
308
+ * - Amount/commission calculated by library
309
+ * - Protected fields: status, amount, commission, gateway, verifiedAt, verifiedBy
310
+ *
311
+ * @param transaction - Transaction document or data
312
+ * @param options - Options
313
+ */
314
+ declare function isMonetizationTransaction(transaction: Partial<TransactionDocument>, options?: TransactionTypeOptions): boolean;
315
+ /**
316
+ * Check if transaction is manual admin transaction
317
+ *
318
+ * Manual transactions:
319
+ * - Created directly by admins for operational expenses/income
320
+ * - Can be self-verified by admins
321
+ * - More flexible updates allowed
322
+ * - No commission/gateway complexity
323
+ *
324
+ * @param transaction - Transaction document or data
325
+ * @param options - Options (same as isMonetizationTransaction)
326
+ */
327
+ declare function isManualTransaction(transaction: Partial<TransactionDocument>, options?: TransactionTypeOptions): boolean;
328
+ /**
329
+ * Get transaction type
330
+ *
331
+ * @param transaction - Transaction document or data
332
+ * @param options - Options (same as isMonetizationTransaction)
333
+ */
334
+ declare function getTransactionType(transaction: Partial<TransactionDocument>, options?: TransactionTypeOptions): TransactionManagementType;
335
+ /**
336
+ * Protected fields for monetization transactions
337
+ * These fields cannot be updated directly by admins
338
+ */
339
+ declare const PROTECTED_MONETIZATION_FIELDS: readonly ["status", "amount", "platformCommission", "netAmount", "verifiedAt", "verifiedBy", "gateway", "webhook", "metadata.commission", "metadata.gateway", "type", "category", "sourceModel", "sourceId"];
340
+ /**
341
+ * Editable fields for monetization transactions (before verification)
342
+ * These fields can be updated by frontend/customer before payment is verified
343
+ */
344
+ declare const EDITABLE_MONETIZATION_FIELDS_PRE_VERIFICATION: readonly ["reference", "paymentDetails", "notes"];
345
+ /**
346
+ * Allowed fields for manual transaction creation
347
+ */
348
+ declare const MANUAL_TRANSACTION_CREATE_FIELDS: readonly ["organizationId", "type", "category", "amount", "method", "reference", "paymentDetails", "notes", "date", "description"];
349
+ /**
350
+ * Allowed fields for manual transaction updates
351
+ */
352
+ declare const MANUAL_TRANSACTION_UPDATE_FIELDS: readonly ["amount", "method", "reference", "paymentDetails", "notes", "date", "description"];
353
+ /**
354
+ * Get allowed update fields based on transaction type and status
355
+ *
356
+ * @param transaction - Transaction document
357
+ * @param options - Options for transaction type detection
358
+ */
359
+ declare function getAllowedUpdateFields(transaction: Partial<TransactionDocument>, options?: TransactionTypeOptions): readonly string[];
360
+ /**
361
+ * Validate if field update is allowed
362
+ *
363
+ * @param transaction - Transaction document
364
+ * @param fieldName - Field being updated
365
+ * @param options - Options for transaction type detection
366
+ */
367
+ declare function validateFieldUpdate(transaction: Partial<TransactionDocument>, fieldName: string, options?: TransactionTypeOptions): FieldUpdateValidationResult;
368
+ /**
369
+ * Check if transaction can be self-verified by admin
370
+ *
371
+ * @param transaction - Transaction document
372
+ * @param options - Options for transaction type detection
373
+ */
374
+ declare function canSelfVerify(transaction: Partial<TransactionDocument>, options?: TransactionTypeOptions): boolean;
375
+ //#endregion
376
+ //#region src/utils/logger.d.ts
377
+ /**
378
+ * Set custom logger implementation
379
+ * @param customLogger - Logger instance with info, warn, error, debug methods
380
+ */
381
+ declare function setLogger(customLogger: Logger): void;
382
+ /**
383
+ * Logger proxy - delegates to current logger implementation
384
+ */
385
+ declare const logger: Logger;
386
+ //#endregion
387
+ //#region src/utils/subscription/period.d.ts
388
+ type DurationUnit = 'days' | 'day' | 'weeks' | 'week' | 'months' | 'month' | 'years' | 'year';
389
+ /**
390
+ * Add duration to date
391
+ */
392
+ declare function addDuration(startDate: Date, duration: number, unit?: DurationUnit): Date;
393
+ /**
394
+ * Calculate subscription period start/end dates
395
+ */
396
+ declare function calculatePeriodRange(params: PeriodRangeParams): PeriodRangeResult;
397
+ /**
398
+ * Calculate prorated refund amount for unused period
399
+ */
400
+ declare function calculateProratedAmount(params: ProratedAmountParams): number;
401
+ /**
402
+ * Convert interval + count to duration/unit
403
+ */
404
+ declare function resolveIntervalToDuration(interval?: string, intervalCount?: number): DurationResult;
405
+ //#endregion
406
+ //#region src/utils/subscription/actions.d.ts
407
+ /**
408
+ * Check if subscription is active
409
+ */
410
+ declare function isSubscriptionActive(subscription: Partial<SubscriptionDocument> | null | undefined): boolean;
411
+ /**
412
+ * Check if can renew
413
+ */
414
+ declare function canRenewSubscription(entity: SubscriptionEntity | null | undefined): boolean;
415
+ /**
416
+ * Check if can cancel
417
+ */
418
+ declare function canCancelSubscription(entity: SubscriptionEntity | null | undefined): boolean;
419
+ /**
420
+ * Check if can pause
421
+ */
422
+ declare function canPauseSubscription(entity: SubscriptionEntity | null | undefined): boolean;
423
+ /**
424
+ * Check if can resume
425
+ */
426
+ declare function canResumeSubscription(entity: SubscriptionEntity | null | undefined): boolean;
427
+ //#endregion
428
+ export { CircuitBreaker, CircuitBreakerConfig, CircuitState, type DurationUnit, EDITABLE_MONETIZATION_FIELDS_PRE_VERIFICATION, IdempotencyManager, MANUAL_TRANSACTION_CREATE_FIELDS, MANUAL_TRANSACTION_UPDATE_FIELDS, Money, MoneyValue, PROTECTED_MONETIZATION_FIELDS, RetryConfig, TRANSACTION_MANAGEMENT_TYPE, TransactionManagementType, addDuration, calculateCommission, calculateOrganizationPayout, calculatePeriodRange, calculateProratedAmount, calculateSplits, calculateTax, canCancelSubscription, canPauseSubscription, canRenewSubscription, canResumeSubscription, canSelfVerify, createCircuitBreaker, createIdempotencyManager, fromSmallestUnit, getAllowedUpdateFields, getTaxType, getTransactionType, isManualTransaction, isMonetizationTransaction, isSubscriptionActive, logger, logger as loggerDefault, resolveCategory, resolveIntervalToDuration, retry, reverseCommission, reverseSplits, reverseTax, setLogger, toSmallestUnit, validateFieldUpdate };