@classytic/revenue 1.1.3 → 1.1.4
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/application/services/index.d.mts +2 -2
- package/dist/application/services/index.mjs +1 -1
- package/dist/core/events.d.mts +1 -1
- package/dist/core/index.d.mts +3 -3
- package/dist/core/index.mjs +2 -2
- package/dist/{errors-CorrWz7A.d.mts → errors-rRdOqnWx.d.mts} +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +2 -2
- package/dist/infrastructure/plugins/index.d.mts +1 -1
- package/dist/{revenue-9scqKSef.mjs → revenue-BhdS7nXh.mjs} +1 -1
- package/dist/schemas/index.d.mts +301 -301
- package/dist/{settlement.schema-D5uWB5tP.d.mts → settlement.schema-DnNSFpGd.d.mts} +36 -36
- package/dist/{settlement.service-BxuiHpNC.d.mts → settlement.service-DjzAjezU.d.mts} +1 -1
- package/dist/{settlement.service-CUxbUTzT.mjs → settlement.service-DmdKv0Zu.mjs} +1 -0
- package/package.json +2 -2
|
@@ -18,18 +18,17 @@ declare const settlementSchema: mongoose.Schema<any, mongoose.Model<any, any, an
|
|
|
18
18
|
timestamps: true;
|
|
19
19
|
}, {
|
|
20
20
|
type: "split_payout" | "platform_withdrawal" | "manual_payout" | "escrow_release";
|
|
21
|
-
amount: number;
|
|
22
|
-
currency: string;
|
|
23
21
|
metadata: any;
|
|
24
|
-
organizationId: mongoose.Types.ObjectId;
|
|
25
|
-
recipientId: mongoose.Types.ObjectId;
|
|
26
|
-
recipientType: "user" | "affiliate" | "organization" | "partner" | "platform";
|
|
27
22
|
status: "pending" | "processing" | "completed" | "failed" | "cancelled";
|
|
23
|
+
recipientId: mongoose.Types.ObjectId;
|
|
24
|
+
recipientType: "affiliate" | "user" | "organization" | "partner" | "platform";
|
|
25
|
+
amount: number;
|
|
26
|
+
currency: string;
|
|
28
27
|
payoutMethod: PayoutMethodValue;
|
|
28
|
+
organizationId: mongoose.Types.ObjectId;
|
|
29
29
|
sourceTransactionIds: mongoose.Types.ObjectId[];
|
|
30
30
|
sourceSplitIds: string[];
|
|
31
31
|
retryCount: number;
|
|
32
|
-
notes?: string | null | undefined;
|
|
33
32
|
bankTransferDetails?: {
|
|
34
33
|
bankName?: string | null | undefined;
|
|
35
34
|
accountNumber?: string | null | undefined;
|
|
@@ -64,20 +63,20 @@ declare const settlementSchema: mongoose.Schema<any, mongoose.Model<any, any, an
|
|
|
64
63
|
cancelledAt?: NativeDate | null | undefined;
|
|
65
64
|
failureReason?: string | null | undefined;
|
|
66
65
|
failureCode?: string | null | undefined;
|
|
66
|
+
notes?: string | null | undefined;
|
|
67
67
|
} & mongoose.DefaultTimestampProps, mongoose.Document<unknown, {}, {
|
|
68
68
|
type: "split_payout" | "platform_withdrawal" | "manual_payout" | "escrow_release";
|
|
69
|
-
amount: number;
|
|
70
|
-
currency: string;
|
|
71
69
|
metadata: any;
|
|
72
|
-
organizationId: mongoose.Types.ObjectId;
|
|
73
|
-
recipientId: mongoose.Types.ObjectId;
|
|
74
|
-
recipientType: "user" | "affiliate" | "organization" | "partner" | "platform";
|
|
75
70
|
status: "pending" | "processing" | "completed" | "failed" | "cancelled";
|
|
71
|
+
recipientId: mongoose.Types.ObjectId;
|
|
72
|
+
recipientType: "affiliate" | "user" | "organization" | "partner" | "platform";
|
|
73
|
+
amount: number;
|
|
74
|
+
currency: string;
|
|
76
75
|
payoutMethod: PayoutMethodValue;
|
|
76
|
+
organizationId: mongoose.Types.ObjectId;
|
|
77
77
|
sourceTransactionIds: mongoose.Types.ObjectId[];
|
|
78
78
|
sourceSplitIds: string[];
|
|
79
79
|
retryCount: number;
|
|
80
|
-
notes?: string | null | undefined;
|
|
81
80
|
bankTransferDetails?: {
|
|
82
81
|
bankName?: string | null | undefined;
|
|
83
82
|
accountNumber?: string | null | undefined;
|
|
@@ -112,24 +111,24 @@ declare const settlementSchema: mongoose.Schema<any, mongoose.Model<any, any, an
|
|
|
112
111
|
cancelledAt?: NativeDate | null | undefined;
|
|
113
112
|
failureReason?: string | null | undefined;
|
|
114
113
|
failureCode?: string | null | undefined;
|
|
114
|
+
notes?: string | null | undefined;
|
|
115
115
|
} & mongoose.DefaultTimestampProps, {
|
|
116
116
|
id: string;
|
|
117
117
|
}, mongoose.ResolveSchemaOptions<{
|
|
118
118
|
timestamps: true;
|
|
119
119
|
}>> & Omit<{
|
|
120
120
|
type: "split_payout" | "platform_withdrawal" | "manual_payout" | "escrow_release";
|
|
121
|
-
amount: number;
|
|
122
|
-
currency: string;
|
|
123
121
|
metadata: any;
|
|
124
|
-
organizationId: mongoose.Types.ObjectId;
|
|
125
|
-
recipientId: mongoose.Types.ObjectId;
|
|
126
|
-
recipientType: "user" | "affiliate" | "organization" | "partner" | "platform";
|
|
127
122
|
status: "pending" | "processing" | "completed" | "failed" | "cancelled";
|
|
123
|
+
recipientId: mongoose.Types.ObjectId;
|
|
124
|
+
recipientType: "affiliate" | "user" | "organization" | "partner" | "platform";
|
|
125
|
+
amount: number;
|
|
126
|
+
currency: string;
|
|
128
127
|
payoutMethod: PayoutMethodValue;
|
|
128
|
+
organizationId: mongoose.Types.ObjectId;
|
|
129
129
|
sourceTransactionIds: mongoose.Types.ObjectId[];
|
|
130
130
|
sourceSplitIds: string[];
|
|
131
131
|
retryCount: number;
|
|
132
|
-
notes?: string | null | undefined;
|
|
133
132
|
bankTransferDetails?: {
|
|
134
133
|
bankName?: string | null | undefined;
|
|
135
134
|
accountNumber?: string | null | undefined;
|
|
@@ -164,6 +163,7 @@ declare const settlementSchema: mongoose.Schema<any, mongoose.Model<any, any, an
|
|
|
164
163
|
cancelledAt?: NativeDate | null | undefined;
|
|
165
164
|
failureReason?: string | null | undefined;
|
|
166
165
|
failureCode?: string | null | undefined;
|
|
166
|
+
notes?: string | null | undefined;
|
|
167
167
|
} & mongoose.DefaultTimestampProps & {
|
|
168
168
|
_id: mongoose.Types.ObjectId;
|
|
169
169
|
} & {
|
|
@@ -175,18 +175,17 @@ declare const settlementSchema: mongoose.Schema<any, mongoose.Model<any, any, an
|
|
|
175
175
|
} | {
|
|
176
176
|
[x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
|
|
177
177
|
type: "split_payout" | "platform_withdrawal" | "manual_payout" | "escrow_release";
|
|
178
|
-
amount: number;
|
|
179
|
-
currency: string;
|
|
180
178
|
metadata: any;
|
|
181
|
-
organizationId: mongoose.Types.ObjectId;
|
|
182
|
-
recipientId: mongoose.Types.ObjectId;
|
|
183
|
-
recipientType: "user" | "affiliate" | "organization" | "partner" | "platform";
|
|
184
179
|
status: "pending" | "processing" | "completed" | "failed" | "cancelled";
|
|
180
|
+
recipientId: mongoose.Types.ObjectId;
|
|
181
|
+
recipientType: "affiliate" | "user" | "organization" | "partner" | "platform";
|
|
182
|
+
amount: number;
|
|
183
|
+
currency: string;
|
|
185
184
|
payoutMethod: PayoutMethodValue;
|
|
185
|
+
organizationId: mongoose.Types.ObjectId;
|
|
186
186
|
sourceTransactionIds: mongoose.Types.ObjectId[];
|
|
187
187
|
sourceSplitIds: string[];
|
|
188
188
|
retryCount: number;
|
|
189
|
-
notes?: string | null | undefined;
|
|
190
189
|
bankTransferDetails?: {
|
|
191
190
|
bankName?: string | null | undefined;
|
|
192
191
|
accountNumber?: string | null | undefined;
|
|
@@ -221,24 +220,24 @@ declare const settlementSchema: mongoose.Schema<any, mongoose.Model<any, any, an
|
|
|
221
220
|
cancelledAt?: NativeDate | null | undefined;
|
|
222
221
|
failureReason?: string | null | undefined;
|
|
223
222
|
failureCode?: string | null | undefined;
|
|
223
|
+
notes?: string | null | undefined;
|
|
224
224
|
} & mongoose.DefaultTimestampProps, {
|
|
225
225
|
id: string;
|
|
226
226
|
}, mongoose.ResolveSchemaOptions<{
|
|
227
227
|
timestamps: true;
|
|
228
228
|
}>> & Omit<{
|
|
229
229
|
type: "split_payout" | "platform_withdrawal" | "manual_payout" | "escrow_release";
|
|
230
|
-
amount: number;
|
|
231
|
-
currency: string;
|
|
232
230
|
metadata: any;
|
|
233
|
-
organizationId: mongoose.Types.ObjectId;
|
|
234
|
-
recipientId: mongoose.Types.ObjectId;
|
|
235
|
-
recipientType: "user" | "affiliate" | "organization" | "partner" | "platform";
|
|
236
231
|
status: "pending" | "processing" | "completed" | "failed" | "cancelled";
|
|
232
|
+
recipientId: mongoose.Types.ObjectId;
|
|
233
|
+
recipientType: "affiliate" | "user" | "organization" | "partner" | "platform";
|
|
234
|
+
amount: number;
|
|
235
|
+
currency: string;
|
|
237
236
|
payoutMethod: PayoutMethodValue;
|
|
237
|
+
organizationId: mongoose.Types.ObjectId;
|
|
238
238
|
sourceTransactionIds: mongoose.Types.ObjectId[];
|
|
239
239
|
sourceSplitIds: string[];
|
|
240
240
|
retryCount: number;
|
|
241
|
-
notes?: string | null | undefined;
|
|
242
241
|
bankTransferDetails?: {
|
|
243
242
|
bankName?: string | null | undefined;
|
|
244
243
|
accountNumber?: string | null | undefined;
|
|
@@ -273,6 +272,7 @@ declare const settlementSchema: mongoose.Schema<any, mongoose.Model<any, any, an
|
|
|
273
272
|
cancelledAt?: NativeDate | null | undefined;
|
|
274
273
|
failureReason?: string | null | undefined;
|
|
275
274
|
failureCode?: string | null | undefined;
|
|
275
|
+
notes?: string | null | undefined;
|
|
276
276
|
} & mongoose.DefaultTimestampProps & {
|
|
277
277
|
_id: mongoose.Types.ObjectId;
|
|
278
278
|
} & {
|
|
@@ -282,18 +282,17 @@ declare const settlementSchema: mongoose.Schema<any, mongoose.Model<any, any, an
|
|
|
282
282
|
}> | undefined;
|
|
283
283
|
}, {
|
|
284
284
|
type: "split_payout" | "platform_withdrawal" | "manual_payout" | "escrow_release";
|
|
285
|
-
amount: number;
|
|
286
|
-
currency: string;
|
|
287
285
|
metadata: any;
|
|
288
|
-
organizationId: mongoose.Types.ObjectId;
|
|
289
|
-
recipientId: mongoose.Types.ObjectId;
|
|
290
|
-
recipientType: "user" | "affiliate" | "organization" | "partner" | "platform";
|
|
291
286
|
status: "pending" | "processing" | "completed" | "failed" | "cancelled";
|
|
287
|
+
recipientId: mongoose.Types.ObjectId;
|
|
288
|
+
recipientType: "affiliate" | "user" | "organization" | "partner" | "platform";
|
|
289
|
+
amount: number;
|
|
290
|
+
currency: string;
|
|
292
291
|
payoutMethod: PayoutMethodValue;
|
|
292
|
+
organizationId: mongoose.Types.ObjectId;
|
|
293
293
|
sourceTransactionIds: mongoose.Types.ObjectId[];
|
|
294
294
|
sourceSplitIds: string[];
|
|
295
295
|
retryCount: number;
|
|
296
|
-
notes?: string | null | undefined;
|
|
297
296
|
bankTransferDetails?: {
|
|
298
297
|
bankName?: string | null | undefined;
|
|
299
298
|
accountNumber?: string | null | undefined;
|
|
@@ -328,6 +327,7 @@ declare const settlementSchema: mongoose.Schema<any, mongoose.Model<any, any, an
|
|
|
328
327
|
cancelledAt?: NativeDate | null | undefined;
|
|
329
328
|
failureReason?: string | null | undefined;
|
|
330
329
|
failureCode?: string | null | undefined;
|
|
330
|
+
notes?: string | null | undefined;
|
|
331
331
|
createdAt: NativeDate;
|
|
332
332
|
updatedAt: NativeDate;
|
|
333
333
|
} & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as ReleaseOptions, B as TransactionDocument, C as PaymentVerifyResult, G as WebhookResult, H as TransactionListResult, I as SplitResult, L as SplitRule, M as RenewalParams, N as ResumeOptions, O as RefundOptions, R as SubscriptionDocument, S as PaymentVerifyOptions, f as MonetizationCreateParams, g as PauseOptions, j as ReleaseResult, l as HoldOptions, n as CancelHoldOptions, p as MonetizationCreateResult, r as CancelOptions, s as EscrowStatusResult, t as ActivateOptions, u as ListOptions, v as PaymentProviderInterface, x as PaymentStatusResult, y as PaymentRefundResult } from "./index-Dsp7H5Wb.mjs";
|
|
2
|
-
import { t as SettlementDocument } from "./settlement.schema-
|
|
2
|
+
import { t as SettlementDocument } from "./settlement.schema-DnNSFpGd.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/core/container.d.ts
|
|
5
5
|
/**
|
|
@@ -1383,6 +1383,7 @@ var PaymentService = class {
|
|
|
1383
1383
|
method: transaction.method ?? "manual",
|
|
1384
1384
|
status: "completed",
|
|
1385
1385
|
gateway: {
|
|
1386
|
+
type: transaction.gateway?.type ?? gatewayType,
|
|
1386
1387
|
provider: transaction.gateway?.provider ?? "manual",
|
|
1387
1388
|
paymentIntentId: refundResult.id,
|
|
1388
1389
|
chargeId: refundResult.id
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@classytic/revenue",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "Enterprise revenue management system with subscriptions, payments, escrow, splits - Modern, Type-safe, Resilient",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -120,4 +120,4 @@
|
|
|
120
120
|
"dependencies": {
|
|
121
121
|
"nanoid": "^5.1.6"
|
|
122
122
|
}
|
|
123
|
-
}
|
|
123
|
+
}
|