@classytic/revenue 1.0.0 → 1.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/README.md +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/schemas/index.d.ts +13 -1
- package/dist/schemas/index.js +9 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/{split.schema-BPdFZMbU.d.ts → split.schema-CETjPq10.d.ts} +18 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -402,7 +402,7 @@ export const Transaction = mongoose.model('Transaction', transactionSchema);
|
|
|
402
402
|
| `paymentDetailsSchema` | Manual payment info | `paymentDetails: paymentDetailsSchema` |
|
|
403
403
|
| `holdSchema` | Escrow hold/release | `hold: holdSchema` |
|
|
404
404
|
| `splitSchema` | Multi-party splits | `splits: [splitSchema]` |
|
|
405
|
-
| `currentPaymentSchema` | For Order/Subscription models | `currentPayment: currentPaymentSchema` |
|
|
405
|
+
| `currentPaymentSchema` | For Order/Subscription models (includes refund tracking) | `currentPayment: currentPaymentSchema` |
|
|
406
406
|
|
|
407
407
|
**Usage:** Import and use as nested objects (NOT spread):
|
|
408
408
|
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { CancelSubscriptionInput, CancelSubscriptionSchema, CommissionConfig, Co
|
|
|
9
9
|
import { PaymentProvider } from './providers/index.js';
|
|
10
10
|
export { PaymentIntent, PaymentResult, RefundResult, WebhookEvent } from './providers/index.js';
|
|
11
11
|
export { G as GATEWAY_TYPES, n as GATEWAY_TYPE_VALUES, x as HOLD_REASON, z as HOLD_REASON_VALUES, H as HOLD_STATUS, u as HOLD_STATUS_VALUES, y as HoldReason, L as LIBRARY_CATEGORIES, h as LIBRARY_CATEGORY_VALUES, f as LibraryCategories, g as LibraryCategoryValue, M as MONETIZATION_TYPES, t as MONETIZATION_TYPE_VALUES, s as MonetizationTypes, k as PAYMENT_GATEWAY_TYPE, m as PAYMENT_GATEWAY_TYPE_VALUES, P as PAYMENT_STATUS, j as PAYMENT_STATUS_VALUES, I as PAYOUT_METHOD, K as PAYOUT_METHOD_VALUES, p as PLAN_KEYS, r as PLAN_KEY_VALUES, l as PaymentGatewayType, i as PaymentStatus, J as PayoutMethod, q as PlanKeys, R as RELEASE_REASON, w as RELEASE_REASON_VALUES, v as ReleaseReason, D as SPLIT_STATUS, F as SPLIT_STATUS_VALUES, A as SPLIT_TYPE, C as SPLIT_TYPE_VALUES, S as SUBSCRIPTION_STATUS, o as SUBSCRIPTION_STATUS_VALUES, E as SplitStatus, B as SplitType, c as TRANSACTION_STATUS, e as TRANSACTION_STATUS_VALUES, T as TRANSACTION_TYPE, b as TRANSACTION_TYPE_VALUES, d as TransactionStatus, a as TransactionType } from './split.enums-DHdM1YAV.js';
|
|
12
|
-
export { b as baseMetadataSchema, d as commissionSchema, c as currentPaymentSchema, g as gatewaySchema, h as holdSchema, a as paymentDetailsSchema, p as paymentSummarySchema, e as planSchema, r as referenceSchema, f as splitSchema, s as subscriptionInfoSchema, t as tenantSnapshotSchema } from './split.schema-
|
|
12
|
+
export { b as baseMetadataSchema, d as commissionSchema, c as currentPaymentSchema, g as gatewaySchema, h as holdSchema, a as paymentDetailsSchema, p as paymentSummarySchema, e as planSchema, r as referenceSchema, f as splitSchema, s as subscriptionInfoSchema, t as tenantSnapshotSchema } from './split.schema-CETjPq10.js';
|
|
13
13
|
export { G as ActivateOptions, a3 as CancelHoldOptions, J as CancelOptions, C as CommissionInfo, ab as CommissionWithSplitsOptions, q as CreateIntentParams, B as CreateRevenueOptions, a9 as DurationResult, a5 as EscrowStatusResult, ad as FieldUpdateValidationResult, H as HoldInfo, a0 as HoldOptions, j as HoldReasonValue, i as HoldStatusValue, z as HooksRegistry, Q as ListOptions, L as Logger, x as ModelsRegistry, E as MonetizationCreateParams, F as MonetizationCreateResult, D as MonetizationData, h as MonetizationTypeValue, M as MongooseDoc, a as MongooseModel, O as ObjectId, K as PauseOptions, g as PaymentGatewayTypeValue, r as PaymentIntentData, w as PaymentProviderInterface, Z as PaymentRefundResult, s as PaymentResultData, X as PaymentStatusResult, f as PaymentStatusValue, U as PaymentVerifyOptions, V as PaymentVerifyResult, n as PayoutMethodValue, a6 as PeriodRangeParams, a7 as PeriodRangeResult, P as PlanKeyValue, a8 as ProratedAmountParams, v as ProviderCapabilities, y as ProvidersRegistry, Y as RefundOptions, t as RefundResultData, a1 as ReleaseOptions, k as ReleaseReasonValue, R as ReleaseRecord, a2 as ReleaseResult, I as RenewalParams, N as ResumeOptions, A as RevenueConfig, p as SplitInfo, a4 as SplitResult, o as SplitRule, m as SplitStatusValue, l as SplitTypeValue, e as SubscriptionDocument, aa as SubscriptionEntity, S as SubscriptionStatusValue, d as TransactionDocument, c as TransactionGateway, $ as TransactionListResult, T as TransactionStatusValue, ac as TransactionTypeOptions, b as TransactionTypeValue, u as WebhookEventData, W as WebhookInfo, _ as WebhookResult } from './index-ChVD3P9k.js';
|
|
14
14
|
import * as z from 'zod';
|
|
15
15
|
export { z };
|
package/dist/index.js
CHANGED
|
@@ -3753,6 +3753,15 @@ var currentPaymentSchema = new Schema(
|
|
|
3753
3753
|
verifiedBy: {
|
|
3754
3754
|
type: Schema.Types.ObjectId,
|
|
3755
3755
|
ref: "User"
|
|
3756
|
+
},
|
|
3757
|
+
// Refund tracking fields
|
|
3758
|
+
refundedAmount: {
|
|
3759
|
+
type: Number,
|
|
3760
|
+
default: 0,
|
|
3761
|
+
min: 0
|
|
3762
|
+
},
|
|
3763
|
+
refundedAt: {
|
|
3764
|
+
type: Date
|
|
3756
3765
|
}
|
|
3757
3766
|
},
|
|
3758
3767
|
{ _id: false }
|