@classytic/revenue 0.0.24 → 0.1.0
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 +131 -19
- package/core/builder.js +39 -0
- package/dist/types/core/builder.d.ts +87 -0
- package/dist/types/core/container.d.ts +57 -0
- package/dist/types/core/errors.d.ts +122 -0
- package/dist/types/enums/escrow.enums.d.ts +24 -0
- package/dist/types/enums/index.d.ts +69 -0
- package/dist/types/enums/monetization.enums.d.ts +6 -0
- package/dist/types/enums/payment.enums.d.ts +16 -0
- package/dist/types/enums/split.enums.d.ts +25 -0
- package/dist/types/enums/subscription.enums.d.ts +15 -0
- package/dist/types/enums/transaction.enums.d.ts +24 -0
- package/dist/types/index.d.ts +22 -0
- package/dist/types/providers/base.d.ts +126 -0
- package/dist/types/schemas/escrow/hold.schema.d.ts +54 -0
- package/dist/types/schemas/escrow/index.d.ts +6 -0
- package/dist/types/schemas/index.d.ts +506 -0
- package/dist/types/schemas/split/index.d.ts +8 -0
- package/dist/types/schemas/split/split.schema.d.ts +142 -0
- package/dist/types/schemas/subscription/index.d.ts +152 -0
- package/dist/types/schemas/subscription/info.schema.d.ts +128 -0
- package/dist/types/schemas/subscription/plan.schema.d.ts +39 -0
- package/dist/types/schemas/transaction/common.schema.d.ts +12 -0
- package/dist/types/schemas/transaction/gateway.schema.d.ts +86 -0
- package/dist/types/schemas/transaction/index.d.ts +202 -0
- package/dist/types/schemas/transaction/payment.schema.d.ts +145 -0
- package/dist/types/services/escrow.service.d.ts +51 -0
- package/dist/types/services/payment.service.d.ts +80 -0
- package/dist/types/services/subscription.service.d.ts +138 -0
- package/dist/types/services/transaction.service.d.ts +40 -0
- package/dist/types/utils/category-resolver.d.ts +46 -0
- package/dist/types/utils/commission-split.d.ts +56 -0
- package/dist/types/utils/commission.d.ts +29 -0
- package/dist/types/utils/hooks.d.ts +17 -0
- package/dist/types/utils/index.d.ts +6 -0
- package/dist/types/utils/logger.d.ts +12 -0
- package/dist/types/utils/subscription/actions.d.ts +28 -0
- package/dist/types/utils/subscription/index.d.ts +2 -0
- package/dist/types/utils/subscription/period.d.ts +47 -0
- package/dist/types/utils/transaction-type.d.ts +102 -0
- package/enums/escrow.enums.js +36 -0
- package/enums/index.js +36 -0
- package/enums/split.enums.js +37 -0
- package/index.js +6 -0
- package/package.json +91 -74
- package/schemas/escrow/hold.schema.js +62 -0
- package/schemas/escrow/index.js +15 -0
- package/schemas/index.js +6 -0
- package/schemas/split/index.js +16 -0
- package/schemas/split/split.schema.js +86 -0
- package/services/escrow.service.js +353 -0
- package/services/payment.service.js +54 -3
- package/services/subscription.service.js +15 -9
- package/utils/commission-split.js +180 -0
- package/utils/index.js +6 -0
- package/revenue.d.ts +0 -350
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
export * from "./plan.schema.js";
|
|
2
|
+
export * from "./info.schema.js";
|
|
3
|
+
declare const _default: {
|
|
4
|
+
subscriptionInfoSchema: import("mongoose").Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
5
|
+
_id: false;
|
|
6
|
+
}, {
|
|
7
|
+
metadata: any;
|
|
8
|
+
isActive: boolean;
|
|
9
|
+
plan: {
|
|
10
|
+
key: string;
|
|
11
|
+
label: string;
|
|
12
|
+
duration: number;
|
|
13
|
+
durationUnit: string;
|
|
14
|
+
price: number;
|
|
15
|
+
discount: number;
|
|
16
|
+
};
|
|
17
|
+
autoRenew: boolean;
|
|
18
|
+
renewalCount: number;
|
|
19
|
+
scheduledChange: {
|
|
20
|
+
newPlan: {
|
|
21
|
+
key: string;
|
|
22
|
+
label: string;
|
|
23
|
+
duration: number;
|
|
24
|
+
durationUnit: string;
|
|
25
|
+
price: number;
|
|
26
|
+
discount: number;
|
|
27
|
+
};
|
|
28
|
+
effectiveDate: NativeDate;
|
|
29
|
+
changeType: "upgrade" | "downgrade";
|
|
30
|
+
scheduledAt: NativeDate;
|
|
31
|
+
priceOverride?: number;
|
|
32
|
+
scheduledBy?: import("mongoose").Types.ObjectId;
|
|
33
|
+
calculation?: any;
|
|
34
|
+
};
|
|
35
|
+
startDate?: NativeDate;
|
|
36
|
+
endDate?: NativeDate;
|
|
37
|
+
canceledAt?: NativeDate;
|
|
38
|
+
cancelAt?: NativeDate;
|
|
39
|
+
cancellationReason?: string;
|
|
40
|
+
pausedAt?: NativeDate;
|
|
41
|
+
pauseReason?: string;
|
|
42
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
43
|
+
metadata: any;
|
|
44
|
+
isActive: boolean;
|
|
45
|
+
plan: {
|
|
46
|
+
key: string;
|
|
47
|
+
label: string;
|
|
48
|
+
duration: number;
|
|
49
|
+
durationUnit: string;
|
|
50
|
+
price: number;
|
|
51
|
+
discount: number;
|
|
52
|
+
};
|
|
53
|
+
autoRenew: boolean;
|
|
54
|
+
renewalCount: number;
|
|
55
|
+
scheduledChange: {
|
|
56
|
+
newPlan: {
|
|
57
|
+
key: string;
|
|
58
|
+
label: string;
|
|
59
|
+
duration: number;
|
|
60
|
+
durationUnit: string;
|
|
61
|
+
price: number;
|
|
62
|
+
discount: number;
|
|
63
|
+
};
|
|
64
|
+
effectiveDate: NativeDate;
|
|
65
|
+
changeType: "upgrade" | "downgrade";
|
|
66
|
+
scheduledAt: NativeDate;
|
|
67
|
+
priceOverride?: number;
|
|
68
|
+
scheduledBy?: import("mongoose").Types.ObjectId;
|
|
69
|
+
calculation?: any;
|
|
70
|
+
};
|
|
71
|
+
startDate?: NativeDate;
|
|
72
|
+
endDate?: NativeDate;
|
|
73
|
+
canceledAt?: NativeDate;
|
|
74
|
+
cancelAt?: NativeDate;
|
|
75
|
+
cancellationReason?: string;
|
|
76
|
+
pausedAt?: NativeDate;
|
|
77
|
+
pauseReason?: string;
|
|
78
|
+
}>, {}, import("mongoose").ResolveSchemaOptions<{
|
|
79
|
+
_id: false;
|
|
80
|
+
}>> & import("mongoose").FlatRecord<{
|
|
81
|
+
metadata: any;
|
|
82
|
+
isActive: boolean;
|
|
83
|
+
plan: {
|
|
84
|
+
key: string;
|
|
85
|
+
label: string;
|
|
86
|
+
duration: number;
|
|
87
|
+
durationUnit: string;
|
|
88
|
+
price: number;
|
|
89
|
+
discount: number;
|
|
90
|
+
};
|
|
91
|
+
autoRenew: boolean;
|
|
92
|
+
renewalCount: number;
|
|
93
|
+
scheduledChange: {
|
|
94
|
+
newPlan: {
|
|
95
|
+
key: string;
|
|
96
|
+
label: string;
|
|
97
|
+
duration: number;
|
|
98
|
+
durationUnit: string;
|
|
99
|
+
price: number;
|
|
100
|
+
discount: number;
|
|
101
|
+
};
|
|
102
|
+
effectiveDate: NativeDate;
|
|
103
|
+
changeType: "upgrade" | "downgrade";
|
|
104
|
+
scheduledAt: NativeDate;
|
|
105
|
+
priceOverride?: number;
|
|
106
|
+
scheduledBy?: import("mongoose").Types.ObjectId;
|
|
107
|
+
calculation?: any;
|
|
108
|
+
};
|
|
109
|
+
startDate?: NativeDate;
|
|
110
|
+
endDate?: NativeDate;
|
|
111
|
+
canceledAt?: NativeDate;
|
|
112
|
+
cancelAt?: NativeDate;
|
|
113
|
+
cancellationReason?: string;
|
|
114
|
+
pausedAt?: NativeDate;
|
|
115
|
+
pauseReason?: string;
|
|
116
|
+
}> & {
|
|
117
|
+
_id: import("mongoose").Types.ObjectId;
|
|
118
|
+
} & {
|
|
119
|
+
__v: number;
|
|
120
|
+
}>;
|
|
121
|
+
subscriptionPlanSchema: import("mongoose").Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
122
|
+
_id: false;
|
|
123
|
+
}, {
|
|
124
|
+
key: string;
|
|
125
|
+
label: string;
|
|
126
|
+
duration: number;
|
|
127
|
+
durationUnit: string;
|
|
128
|
+
price: number;
|
|
129
|
+
discount: number;
|
|
130
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
131
|
+
key: string;
|
|
132
|
+
label: string;
|
|
133
|
+
duration: number;
|
|
134
|
+
durationUnit: string;
|
|
135
|
+
price: number;
|
|
136
|
+
discount: number;
|
|
137
|
+
}>, {}, import("mongoose").ResolveSchemaOptions<{
|
|
138
|
+
_id: false;
|
|
139
|
+
}>> & import("mongoose").FlatRecord<{
|
|
140
|
+
key: string;
|
|
141
|
+
label: string;
|
|
142
|
+
duration: number;
|
|
143
|
+
durationUnit: string;
|
|
144
|
+
price: number;
|
|
145
|
+
discount: number;
|
|
146
|
+
}> & {
|
|
147
|
+
_id: import("mongoose").Types.ObjectId;
|
|
148
|
+
} & {
|
|
149
|
+
__v: number;
|
|
150
|
+
}>;
|
|
151
|
+
};
|
|
152
|
+
export default _default;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Subscription Info Schema
|
|
3
|
+
* Use this in your model: subscription: { type: subscriptionInfoSchema }
|
|
4
|
+
*
|
|
5
|
+
* Complete subscription information
|
|
6
|
+
*/
|
|
7
|
+
export const subscriptionInfoSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
8
|
+
_id: false;
|
|
9
|
+
}, {
|
|
10
|
+
metadata: any;
|
|
11
|
+
isActive: boolean;
|
|
12
|
+
plan: {
|
|
13
|
+
key: string;
|
|
14
|
+
label: string;
|
|
15
|
+
duration: number;
|
|
16
|
+
durationUnit: string;
|
|
17
|
+
price: number;
|
|
18
|
+
discount: number;
|
|
19
|
+
};
|
|
20
|
+
autoRenew: boolean;
|
|
21
|
+
renewalCount: number;
|
|
22
|
+
scheduledChange: {
|
|
23
|
+
newPlan: {
|
|
24
|
+
key: string;
|
|
25
|
+
label: string;
|
|
26
|
+
duration: number;
|
|
27
|
+
durationUnit: string;
|
|
28
|
+
price: number;
|
|
29
|
+
discount: number;
|
|
30
|
+
};
|
|
31
|
+
effectiveDate: NativeDate;
|
|
32
|
+
changeType: "upgrade" | "downgrade";
|
|
33
|
+
scheduledAt: NativeDate;
|
|
34
|
+
priceOverride?: number;
|
|
35
|
+
scheduledBy?: import("mongoose").Types.ObjectId;
|
|
36
|
+
calculation?: any;
|
|
37
|
+
};
|
|
38
|
+
startDate?: NativeDate;
|
|
39
|
+
endDate?: NativeDate;
|
|
40
|
+
canceledAt?: NativeDate;
|
|
41
|
+
cancelAt?: NativeDate;
|
|
42
|
+
cancellationReason?: string;
|
|
43
|
+
pausedAt?: NativeDate;
|
|
44
|
+
pauseReason?: string;
|
|
45
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
46
|
+
metadata: any;
|
|
47
|
+
isActive: boolean;
|
|
48
|
+
plan: {
|
|
49
|
+
key: string;
|
|
50
|
+
label: string;
|
|
51
|
+
duration: number;
|
|
52
|
+
durationUnit: string;
|
|
53
|
+
price: number;
|
|
54
|
+
discount: number;
|
|
55
|
+
};
|
|
56
|
+
autoRenew: boolean;
|
|
57
|
+
renewalCount: number;
|
|
58
|
+
scheduledChange: {
|
|
59
|
+
newPlan: {
|
|
60
|
+
key: string;
|
|
61
|
+
label: string;
|
|
62
|
+
duration: number;
|
|
63
|
+
durationUnit: string;
|
|
64
|
+
price: number;
|
|
65
|
+
discount: number;
|
|
66
|
+
};
|
|
67
|
+
effectiveDate: NativeDate;
|
|
68
|
+
changeType: "upgrade" | "downgrade";
|
|
69
|
+
scheduledAt: NativeDate;
|
|
70
|
+
priceOverride?: number;
|
|
71
|
+
scheduledBy?: import("mongoose").Types.ObjectId;
|
|
72
|
+
calculation?: any;
|
|
73
|
+
};
|
|
74
|
+
startDate?: NativeDate;
|
|
75
|
+
endDate?: NativeDate;
|
|
76
|
+
canceledAt?: NativeDate;
|
|
77
|
+
cancelAt?: NativeDate;
|
|
78
|
+
cancellationReason?: string;
|
|
79
|
+
pausedAt?: NativeDate;
|
|
80
|
+
pauseReason?: string;
|
|
81
|
+
}>, {}, import("mongoose").ResolveSchemaOptions<{
|
|
82
|
+
_id: false;
|
|
83
|
+
}>> & import("mongoose").FlatRecord<{
|
|
84
|
+
metadata: any;
|
|
85
|
+
isActive: boolean;
|
|
86
|
+
plan: {
|
|
87
|
+
key: string;
|
|
88
|
+
label: string;
|
|
89
|
+
duration: number;
|
|
90
|
+
durationUnit: string;
|
|
91
|
+
price: number;
|
|
92
|
+
discount: number;
|
|
93
|
+
};
|
|
94
|
+
autoRenew: boolean;
|
|
95
|
+
renewalCount: number;
|
|
96
|
+
scheduledChange: {
|
|
97
|
+
newPlan: {
|
|
98
|
+
key: string;
|
|
99
|
+
label: string;
|
|
100
|
+
duration: number;
|
|
101
|
+
durationUnit: string;
|
|
102
|
+
price: number;
|
|
103
|
+
discount: number;
|
|
104
|
+
};
|
|
105
|
+
effectiveDate: NativeDate;
|
|
106
|
+
changeType: "upgrade" | "downgrade";
|
|
107
|
+
scheduledAt: NativeDate;
|
|
108
|
+
priceOverride?: number;
|
|
109
|
+
scheduledBy?: import("mongoose").Types.ObjectId;
|
|
110
|
+
calculation?: any;
|
|
111
|
+
};
|
|
112
|
+
startDate?: NativeDate;
|
|
113
|
+
endDate?: NativeDate;
|
|
114
|
+
canceledAt?: NativeDate;
|
|
115
|
+
cancelAt?: NativeDate;
|
|
116
|
+
cancellationReason?: string;
|
|
117
|
+
pausedAt?: NativeDate;
|
|
118
|
+
pauseReason?: string;
|
|
119
|
+
}> & {
|
|
120
|
+
_id: import("mongoose").Types.ObjectId;
|
|
121
|
+
} & {
|
|
122
|
+
__v: number;
|
|
123
|
+
}>;
|
|
124
|
+
declare namespace _default {
|
|
125
|
+
export { subscriptionInfoSchema };
|
|
126
|
+
}
|
|
127
|
+
export default _default;
|
|
128
|
+
import { Schema } from 'mongoose';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Subscription Plan Schema
|
|
3
|
+
* Embedded in subscription info
|
|
4
|
+
*/
|
|
5
|
+
export const subscriptionPlanSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
6
|
+
_id: false;
|
|
7
|
+
}, {
|
|
8
|
+
key: string;
|
|
9
|
+
label: string;
|
|
10
|
+
duration: number;
|
|
11
|
+
durationUnit: string;
|
|
12
|
+
price: number;
|
|
13
|
+
discount: number;
|
|
14
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
15
|
+
key: string;
|
|
16
|
+
label: string;
|
|
17
|
+
duration: number;
|
|
18
|
+
durationUnit: string;
|
|
19
|
+
price: number;
|
|
20
|
+
discount: number;
|
|
21
|
+
}>, {}, import("mongoose").ResolveSchemaOptions<{
|
|
22
|
+
_id: false;
|
|
23
|
+
}>> & import("mongoose").FlatRecord<{
|
|
24
|
+
key: string;
|
|
25
|
+
label: string;
|
|
26
|
+
duration: number;
|
|
27
|
+
durationUnit: string;
|
|
28
|
+
price: number;
|
|
29
|
+
discount: number;
|
|
30
|
+
}> & {
|
|
31
|
+
_id: import("mongoose").Types.ObjectId;
|
|
32
|
+
} & {
|
|
33
|
+
__v: number;
|
|
34
|
+
}>;
|
|
35
|
+
declare namespace _default {
|
|
36
|
+
export { subscriptionPlanSchema };
|
|
37
|
+
}
|
|
38
|
+
export default _default;
|
|
39
|
+
import { Schema } from 'mongoose';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export namespace commonFields {
|
|
2
|
+
namespace isNewRequest {
|
|
3
|
+
export let type: BooleanConstructor;
|
|
4
|
+
let _default: boolean;
|
|
5
|
+
export { _default as default };
|
|
6
|
+
export let index: boolean;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
declare namespace _default {
|
|
10
|
+
export { commonFields };
|
|
11
|
+
}
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gateway Schema
|
|
3
|
+
* For payment gateway integration details
|
|
4
|
+
*/
|
|
5
|
+
export const gatewaySchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
6
|
+
_id: false;
|
|
7
|
+
}, {
|
|
8
|
+
type: string;
|
|
9
|
+
metadata?: any;
|
|
10
|
+
paymentIntentId?: string;
|
|
11
|
+
sessionId?: string;
|
|
12
|
+
paymentUrl?: string;
|
|
13
|
+
expiresAt?: NativeDate;
|
|
14
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
15
|
+
type: string;
|
|
16
|
+
metadata?: any;
|
|
17
|
+
paymentIntentId?: string;
|
|
18
|
+
sessionId?: string;
|
|
19
|
+
paymentUrl?: string;
|
|
20
|
+
expiresAt?: NativeDate;
|
|
21
|
+
}>, {}, import("mongoose").ResolveSchemaOptions<{
|
|
22
|
+
_id: false;
|
|
23
|
+
}>> & import("mongoose").FlatRecord<{
|
|
24
|
+
type: string;
|
|
25
|
+
metadata?: any;
|
|
26
|
+
paymentIntentId?: string;
|
|
27
|
+
sessionId?: string;
|
|
28
|
+
paymentUrl?: string;
|
|
29
|
+
expiresAt?: NativeDate;
|
|
30
|
+
}> & {
|
|
31
|
+
_id: import("mongoose").Types.ObjectId;
|
|
32
|
+
} & {
|
|
33
|
+
__v: number;
|
|
34
|
+
}>;
|
|
35
|
+
/**
|
|
36
|
+
* Commission Schema
|
|
37
|
+
* Commission tracking for marketplace transactions
|
|
38
|
+
*/
|
|
39
|
+
export const commissionSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
40
|
+
_id: false;
|
|
41
|
+
}, {
|
|
42
|
+
status: "pending" | "due" | "paid" | "waived";
|
|
43
|
+
rate?: number;
|
|
44
|
+
grossAmount?: number;
|
|
45
|
+
gatewayFeeRate?: number;
|
|
46
|
+
gatewayFeeAmount?: number;
|
|
47
|
+
netAmount?: number;
|
|
48
|
+
dueDate?: NativeDate;
|
|
49
|
+
paidDate?: NativeDate;
|
|
50
|
+
paidBy?: import("mongoose").Types.ObjectId;
|
|
51
|
+
notes?: string;
|
|
52
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
53
|
+
status: "pending" | "due" | "paid" | "waived";
|
|
54
|
+
rate?: number;
|
|
55
|
+
grossAmount?: number;
|
|
56
|
+
gatewayFeeRate?: number;
|
|
57
|
+
gatewayFeeAmount?: number;
|
|
58
|
+
netAmount?: number;
|
|
59
|
+
dueDate?: NativeDate;
|
|
60
|
+
paidDate?: NativeDate;
|
|
61
|
+
paidBy?: import("mongoose").Types.ObjectId;
|
|
62
|
+
notes?: string;
|
|
63
|
+
}>, {}, import("mongoose").ResolveSchemaOptions<{
|
|
64
|
+
_id: false;
|
|
65
|
+
}>> & import("mongoose").FlatRecord<{
|
|
66
|
+
status: "pending" | "due" | "paid" | "waived";
|
|
67
|
+
rate?: number;
|
|
68
|
+
grossAmount?: number;
|
|
69
|
+
gatewayFeeRate?: number;
|
|
70
|
+
gatewayFeeAmount?: number;
|
|
71
|
+
netAmount?: number;
|
|
72
|
+
dueDate?: NativeDate;
|
|
73
|
+
paidDate?: NativeDate;
|
|
74
|
+
paidBy?: import("mongoose").Types.ObjectId;
|
|
75
|
+
notes?: string;
|
|
76
|
+
}> & {
|
|
77
|
+
_id: import("mongoose").Types.ObjectId;
|
|
78
|
+
} & {
|
|
79
|
+
__v: number;
|
|
80
|
+
}>;
|
|
81
|
+
declare namespace _default {
|
|
82
|
+
export { gatewaySchema };
|
|
83
|
+
export { commissionSchema };
|
|
84
|
+
}
|
|
85
|
+
export default _default;
|
|
86
|
+
import { Schema } from 'mongoose';
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
export * from "./payment.schema.js";
|
|
2
|
+
export * from "./gateway.schema.js";
|
|
3
|
+
export * from "./common.schema.js";
|
|
4
|
+
declare const _default: {
|
|
5
|
+
commonFields: {
|
|
6
|
+
isNewRequest: {
|
|
7
|
+
type: BooleanConstructor;
|
|
8
|
+
default: boolean;
|
|
9
|
+
index: boolean;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
gatewaySchema: import("mongoose").Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
13
|
+
_id: false;
|
|
14
|
+
}, {
|
|
15
|
+
type: string;
|
|
16
|
+
metadata?: any;
|
|
17
|
+
paymentIntentId?: string;
|
|
18
|
+
sessionId?: string;
|
|
19
|
+
paymentUrl?: string;
|
|
20
|
+
expiresAt?: NativeDate;
|
|
21
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
22
|
+
type: string;
|
|
23
|
+
metadata?: any;
|
|
24
|
+
paymentIntentId?: string;
|
|
25
|
+
sessionId?: string;
|
|
26
|
+
paymentUrl?: string;
|
|
27
|
+
expiresAt?: NativeDate;
|
|
28
|
+
}>, {}, import("mongoose").ResolveSchemaOptions<{
|
|
29
|
+
_id: false;
|
|
30
|
+
}>> & import("mongoose").FlatRecord<{
|
|
31
|
+
type: string;
|
|
32
|
+
metadata?: any;
|
|
33
|
+
paymentIntentId?: string;
|
|
34
|
+
sessionId?: string;
|
|
35
|
+
paymentUrl?: string;
|
|
36
|
+
expiresAt?: NativeDate;
|
|
37
|
+
}> & {
|
|
38
|
+
_id: import("mongoose").Types.ObjectId;
|
|
39
|
+
} & {
|
|
40
|
+
__v: number;
|
|
41
|
+
}>;
|
|
42
|
+
commissionSchema: import("mongoose").Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
43
|
+
_id: false;
|
|
44
|
+
}, {
|
|
45
|
+
status: "pending" | "due" | "paid" | "waived";
|
|
46
|
+
rate?: number;
|
|
47
|
+
grossAmount?: number;
|
|
48
|
+
gatewayFeeRate?: number;
|
|
49
|
+
gatewayFeeAmount?: number;
|
|
50
|
+
netAmount?: number;
|
|
51
|
+
dueDate?: NativeDate;
|
|
52
|
+
paidDate?: NativeDate;
|
|
53
|
+
paidBy?: import("mongoose").Types.ObjectId;
|
|
54
|
+
notes?: string;
|
|
55
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
56
|
+
status: "pending" | "due" | "paid" | "waived";
|
|
57
|
+
rate?: number;
|
|
58
|
+
grossAmount?: number;
|
|
59
|
+
gatewayFeeRate?: number;
|
|
60
|
+
gatewayFeeAmount?: number;
|
|
61
|
+
netAmount?: number;
|
|
62
|
+
dueDate?: NativeDate;
|
|
63
|
+
paidDate?: NativeDate;
|
|
64
|
+
paidBy?: import("mongoose").Types.ObjectId;
|
|
65
|
+
notes?: string;
|
|
66
|
+
}>, {}, import("mongoose").ResolveSchemaOptions<{
|
|
67
|
+
_id: false;
|
|
68
|
+
}>> & import("mongoose").FlatRecord<{
|
|
69
|
+
status: "pending" | "due" | "paid" | "waived";
|
|
70
|
+
rate?: number;
|
|
71
|
+
grossAmount?: number;
|
|
72
|
+
gatewayFeeRate?: number;
|
|
73
|
+
gatewayFeeAmount?: number;
|
|
74
|
+
netAmount?: number;
|
|
75
|
+
dueDate?: NativeDate;
|
|
76
|
+
paidDate?: NativeDate;
|
|
77
|
+
paidBy?: import("mongoose").Types.ObjectId;
|
|
78
|
+
notes?: string;
|
|
79
|
+
}> & {
|
|
80
|
+
_id: import("mongoose").Types.ObjectId;
|
|
81
|
+
} & {
|
|
82
|
+
__v: number;
|
|
83
|
+
}>;
|
|
84
|
+
currentPaymentSchema: import("mongoose").Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
85
|
+
_id: false;
|
|
86
|
+
}, {
|
|
87
|
+
status: string;
|
|
88
|
+
transactionId?: import("mongoose").Types.ObjectId;
|
|
89
|
+
amount?: number;
|
|
90
|
+
method?: string;
|
|
91
|
+
reference?: string;
|
|
92
|
+
verifiedAt?: NativeDate;
|
|
93
|
+
verifiedBy?: import("mongoose").Types.ObjectId;
|
|
94
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
95
|
+
status: string;
|
|
96
|
+
transactionId?: import("mongoose").Types.ObjectId;
|
|
97
|
+
amount?: number;
|
|
98
|
+
method?: string;
|
|
99
|
+
reference?: string;
|
|
100
|
+
verifiedAt?: NativeDate;
|
|
101
|
+
verifiedBy?: import("mongoose").Types.ObjectId;
|
|
102
|
+
}>, {}, import("mongoose").ResolveSchemaOptions<{
|
|
103
|
+
_id: false;
|
|
104
|
+
}>> & import("mongoose").FlatRecord<{
|
|
105
|
+
status: string;
|
|
106
|
+
transactionId?: import("mongoose").Types.ObjectId;
|
|
107
|
+
amount?: number;
|
|
108
|
+
method?: string;
|
|
109
|
+
reference?: string;
|
|
110
|
+
verifiedAt?: NativeDate;
|
|
111
|
+
verifiedBy?: import("mongoose").Types.ObjectId;
|
|
112
|
+
}> & {
|
|
113
|
+
_id: import("mongoose").Types.ObjectId;
|
|
114
|
+
} & {
|
|
115
|
+
__v: number;
|
|
116
|
+
}>;
|
|
117
|
+
paymentSummarySchema: import("mongoose").Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
118
|
+
_id: false;
|
|
119
|
+
}, {
|
|
120
|
+
totalPayments: number;
|
|
121
|
+
totalAmountPaid: number;
|
|
122
|
+
lastPaymentDate?: NativeDate;
|
|
123
|
+
lastPaymentAmount?: number;
|
|
124
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
125
|
+
totalPayments: number;
|
|
126
|
+
totalAmountPaid: number;
|
|
127
|
+
lastPaymentDate?: NativeDate;
|
|
128
|
+
lastPaymentAmount?: number;
|
|
129
|
+
}>, {}, import("mongoose").ResolveSchemaOptions<{
|
|
130
|
+
_id: false;
|
|
131
|
+
}>> & import("mongoose").FlatRecord<{
|
|
132
|
+
totalPayments: number;
|
|
133
|
+
totalAmountPaid: number;
|
|
134
|
+
lastPaymentDate?: NativeDate;
|
|
135
|
+
lastPaymentAmount?: number;
|
|
136
|
+
}> & {
|
|
137
|
+
_id: import("mongoose").Types.ObjectId;
|
|
138
|
+
} & {
|
|
139
|
+
__v: number;
|
|
140
|
+
}>;
|
|
141
|
+
paymentDetailsSchema: import("mongoose").Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
142
|
+
_id: false;
|
|
143
|
+
}, {
|
|
144
|
+
provider?: string;
|
|
145
|
+
walletNumber?: string;
|
|
146
|
+
walletType?: string;
|
|
147
|
+
trxId?: string;
|
|
148
|
+
bankName?: string;
|
|
149
|
+
accountNumber?: string;
|
|
150
|
+
accountName?: string;
|
|
151
|
+
proofUrl?: string;
|
|
152
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
153
|
+
provider?: string;
|
|
154
|
+
walletNumber?: string;
|
|
155
|
+
walletType?: string;
|
|
156
|
+
trxId?: string;
|
|
157
|
+
bankName?: string;
|
|
158
|
+
accountNumber?: string;
|
|
159
|
+
accountName?: string;
|
|
160
|
+
proofUrl?: string;
|
|
161
|
+
}>, {}, import("mongoose").ResolveSchemaOptions<{
|
|
162
|
+
_id: false;
|
|
163
|
+
}>> & import("mongoose").FlatRecord<{
|
|
164
|
+
provider?: string;
|
|
165
|
+
walletNumber?: string;
|
|
166
|
+
walletType?: string;
|
|
167
|
+
trxId?: string;
|
|
168
|
+
bankName?: string;
|
|
169
|
+
accountNumber?: string;
|
|
170
|
+
accountName?: string;
|
|
171
|
+
proofUrl?: string;
|
|
172
|
+
}> & {
|
|
173
|
+
_id: import("mongoose").Types.ObjectId;
|
|
174
|
+
} & {
|
|
175
|
+
__v: number;
|
|
176
|
+
}>;
|
|
177
|
+
tenantSnapshotSchema: import("mongoose").Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
178
|
+
_id: false;
|
|
179
|
+
}, {
|
|
180
|
+
paymentInstructions?: string;
|
|
181
|
+
bkashNumber?: string;
|
|
182
|
+
nagadNumber?: string;
|
|
183
|
+
bankAccount?: string;
|
|
184
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
185
|
+
paymentInstructions?: string;
|
|
186
|
+
bkashNumber?: string;
|
|
187
|
+
nagadNumber?: string;
|
|
188
|
+
bankAccount?: string;
|
|
189
|
+
}>, {}, import("mongoose").ResolveSchemaOptions<{
|
|
190
|
+
_id: false;
|
|
191
|
+
}>> & import("mongoose").FlatRecord<{
|
|
192
|
+
paymentInstructions?: string;
|
|
193
|
+
bkashNumber?: string;
|
|
194
|
+
nagadNumber?: string;
|
|
195
|
+
bankAccount?: string;
|
|
196
|
+
}> & {
|
|
197
|
+
_id: import("mongoose").Types.ObjectId;
|
|
198
|
+
} & {
|
|
199
|
+
__v: number;
|
|
200
|
+
}>;
|
|
201
|
+
};
|
|
202
|
+
export default _default;
|