@classytic/revenue 0.0.23 → 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 +170 -24
- 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 +16 -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.d.ts +40 -0
- package/utils/index.js +7 -0
- package/utils/subscription/actions.js +68 -0
- package/utils/subscription/index.js +20 -0
- package/utils/subscription/period.js +123 -0
- package/revenue.d.ts +0 -350
|
@@ -0,0 +1,506 @@
|
|
|
1
|
+
export * from "./transaction/index.js";
|
|
2
|
+
export * from "./subscription/index.js";
|
|
3
|
+
export * from "./escrow/index.js";
|
|
4
|
+
export * from "./split/index.js";
|
|
5
|
+
declare const _default: {
|
|
6
|
+
splitItemSchema: {
|
|
7
|
+
type: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
enum: string[];
|
|
10
|
+
required: boolean;
|
|
11
|
+
};
|
|
12
|
+
recipientId: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
required: boolean;
|
|
15
|
+
index: boolean;
|
|
16
|
+
};
|
|
17
|
+
recipientType: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
required: boolean;
|
|
20
|
+
};
|
|
21
|
+
rate: {
|
|
22
|
+
type: NumberConstructor;
|
|
23
|
+
required: boolean;
|
|
24
|
+
min: number;
|
|
25
|
+
max: number;
|
|
26
|
+
};
|
|
27
|
+
grossAmount: {
|
|
28
|
+
type: NumberConstructor;
|
|
29
|
+
required: boolean;
|
|
30
|
+
};
|
|
31
|
+
gatewayFeeRate: {
|
|
32
|
+
type: NumberConstructor;
|
|
33
|
+
default: number;
|
|
34
|
+
};
|
|
35
|
+
gatewayFeeAmount: {
|
|
36
|
+
type: NumberConstructor;
|
|
37
|
+
default: number;
|
|
38
|
+
};
|
|
39
|
+
netAmount: {
|
|
40
|
+
type: NumberConstructor;
|
|
41
|
+
required: boolean;
|
|
42
|
+
};
|
|
43
|
+
status: {
|
|
44
|
+
type: StringConstructor;
|
|
45
|
+
enum: string[];
|
|
46
|
+
default: string;
|
|
47
|
+
};
|
|
48
|
+
dueDate: DateConstructor;
|
|
49
|
+
paidDate: DateConstructor;
|
|
50
|
+
payoutMethod: {
|
|
51
|
+
type: StringConstructor;
|
|
52
|
+
enum: string[];
|
|
53
|
+
required: boolean;
|
|
54
|
+
};
|
|
55
|
+
payoutTransactionId: StringConstructor;
|
|
56
|
+
metadata: {
|
|
57
|
+
type: ObjectConstructor;
|
|
58
|
+
default: {};
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
splitsSchema: {
|
|
62
|
+
splits: {
|
|
63
|
+
type: {
|
|
64
|
+
type: {
|
|
65
|
+
type: StringConstructor;
|
|
66
|
+
enum: string[];
|
|
67
|
+
required: boolean;
|
|
68
|
+
};
|
|
69
|
+
recipientId: {
|
|
70
|
+
type: StringConstructor;
|
|
71
|
+
required: boolean;
|
|
72
|
+
index: boolean;
|
|
73
|
+
};
|
|
74
|
+
recipientType: {
|
|
75
|
+
type: StringConstructor;
|
|
76
|
+
required: boolean;
|
|
77
|
+
};
|
|
78
|
+
rate: {
|
|
79
|
+
type: NumberConstructor;
|
|
80
|
+
required: boolean;
|
|
81
|
+
min: number;
|
|
82
|
+
max: number;
|
|
83
|
+
};
|
|
84
|
+
grossAmount: {
|
|
85
|
+
type: NumberConstructor;
|
|
86
|
+
required: boolean;
|
|
87
|
+
};
|
|
88
|
+
gatewayFeeRate: {
|
|
89
|
+
type: NumberConstructor;
|
|
90
|
+
default: number;
|
|
91
|
+
};
|
|
92
|
+
gatewayFeeAmount: {
|
|
93
|
+
type: NumberConstructor;
|
|
94
|
+
default: number;
|
|
95
|
+
};
|
|
96
|
+
netAmount: {
|
|
97
|
+
type: NumberConstructor;
|
|
98
|
+
required: boolean;
|
|
99
|
+
};
|
|
100
|
+
status: {
|
|
101
|
+
type: StringConstructor;
|
|
102
|
+
enum: string[];
|
|
103
|
+
default: string;
|
|
104
|
+
};
|
|
105
|
+
dueDate: DateConstructor;
|
|
106
|
+
paidDate: DateConstructor;
|
|
107
|
+
payoutMethod: {
|
|
108
|
+
type: StringConstructor;
|
|
109
|
+
enum: string[];
|
|
110
|
+
required: boolean;
|
|
111
|
+
};
|
|
112
|
+
payoutTransactionId: StringConstructor;
|
|
113
|
+
metadata: {
|
|
114
|
+
type: ObjectConstructor;
|
|
115
|
+
default: {};
|
|
116
|
+
};
|
|
117
|
+
}[];
|
|
118
|
+
default: any[];
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
holdSchema: {
|
|
122
|
+
status: {
|
|
123
|
+
type: StringConstructor;
|
|
124
|
+
enum: string[];
|
|
125
|
+
default: string;
|
|
126
|
+
index: boolean;
|
|
127
|
+
};
|
|
128
|
+
heldAmount: {
|
|
129
|
+
type: NumberConstructor;
|
|
130
|
+
required: boolean;
|
|
131
|
+
};
|
|
132
|
+
releasedAmount: {
|
|
133
|
+
type: NumberConstructor;
|
|
134
|
+
default: number;
|
|
135
|
+
};
|
|
136
|
+
reason: {
|
|
137
|
+
type: StringConstructor;
|
|
138
|
+
enum: string[];
|
|
139
|
+
required: boolean;
|
|
140
|
+
};
|
|
141
|
+
holdUntil: {
|
|
142
|
+
type: DateConstructor;
|
|
143
|
+
required: boolean;
|
|
144
|
+
};
|
|
145
|
+
heldAt: DateConstructor;
|
|
146
|
+
releasedAt: DateConstructor;
|
|
147
|
+
cancelledAt: DateConstructor;
|
|
148
|
+
releases: {
|
|
149
|
+
amount: NumberConstructor;
|
|
150
|
+
recipientId: StringConstructor;
|
|
151
|
+
recipientType: StringConstructor;
|
|
152
|
+
releasedAt: DateConstructor;
|
|
153
|
+
releasedBy: StringConstructor;
|
|
154
|
+
reason: StringConstructor;
|
|
155
|
+
metadata: ObjectConstructor;
|
|
156
|
+
}[];
|
|
157
|
+
metadata: {
|
|
158
|
+
type: ObjectConstructor;
|
|
159
|
+
default: {};
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
subscriptionInfoSchema: import("mongoose").Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
163
|
+
_id: false;
|
|
164
|
+
}, {
|
|
165
|
+
metadata: any;
|
|
166
|
+
isActive: boolean;
|
|
167
|
+
plan: {
|
|
168
|
+
key: string;
|
|
169
|
+
label: string;
|
|
170
|
+
duration: number;
|
|
171
|
+
durationUnit: string;
|
|
172
|
+
price: number;
|
|
173
|
+
discount: number;
|
|
174
|
+
};
|
|
175
|
+
autoRenew: boolean;
|
|
176
|
+
renewalCount: number;
|
|
177
|
+
scheduledChange: {
|
|
178
|
+
newPlan: {
|
|
179
|
+
key: string;
|
|
180
|
+
label: string;
|
|
181
|
+
duration: number;
|
|
182
|
+
durationUnit: string;
|
|
183
|
+
price: number;
|
|
184
|
+
discount: number;
|
|
185
|
+
};
|
|
186
|
+
effectiveDate: NativeDate;
|
|
187
|
+
changeType: "upgrade" | "downgrade";
|
|
188
|
+
scheduledAt: NativeDate;
|
|
189
|
+
priceOverride?: number;
|
|
190
|
+
scheduledBy?: import("mongoose").Types.ObjectId;
|
|
191
|
+
calculation?: any;
|
|
192
|
+
};
|
|
193
|
+
startDate?: NativeDate;
|
|
194
|
+
endDate?: NativeDate;
|
|
195
|
+
canceledAt?: NativeDate;
|
|
196
|
+
cancelAt?: NativeDate;
|
|
197
|
+
cancellationReason?: string;
|
|
198
|
+
pausedAt?: NativeDate;
|
|
199
|
+
pauseReason?: string;
|
|
200
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
201
|
+
metadata: any;
|
|
202
|
+
isActive: boolean;
|
|
203
|
+
plan: {
|
|
204
|
+
key: string;
|
|
205
|
+
label: string;
|
|
206
|
+
duration: number;
|
|
207
|
+
durationUnit: string;
|
|
208
|
+
price: number;
|
|
209
|
+
discount: number;
|
|
210
|
+
};
|
|
211
|
+
autoRenew: boolean;
|
|
212
|
+
renewalCount: number;
|
|
213
|
+
scheduledChange: {
|
|
214
|
+
newPlan: {
|
|
215
|
+
key: string;
|
|
216
|
+
label: string;
|
|
217
|
+
duration: number;
|
|
218
|
+
durationUnit: string;
|
|
219
|
+
price: number;
|
|
220
|
+
discount: number;
|
|
221
|
+
};
|
|
222
|
+
effectiveDate: NativeDate;
|
|
223
|
+
changeType: "upgrade" | "downgrade";
|
|
224
|
+
scheduledAt: NativeDate;
|
|
225
|
+
priceOverride?: number;
|
|
226
|
+
scheduledBy?: import("mongoose").Types.ObjectId;
|
|
227
|
+
calculation?: any;
|
|
228
|
+
};
|
|
229
|
+
startDate?: NativeDate;
|
|
230
|
+
endDate?: NativeDate;
|
|
231
|
+
canceledAt?: NativeDate;
|
|
232
|
+
cancelAt?: NativeDate;
|
|
233
|
+
cancellationReason?: string;
|
|
234
|
+
pausedAt?: NativeDate;
|
|
235
|
+
pauseReason?: string;
|
|
236
|
+
}>, {}, import("mongoose").ResolveSchemaOptions<{
|
|
237
|
+
_id: false;
|
|
238
|
+
}>> & import("mongoose").FlatRecord<{
|
|
239
|
+
metadata: any;
|
|
240
|
+
isActive: boolean;
|
|
241
|
+
plan: {
|
|
242
|
+
key: string;
|
|
243
|
+
label: string;
|
|
244
|
+
duration: number;
|
|
245
|
+
durationUnit: string;
|
|
246
|
+
price: number;
|
|
247
|
+
discount: number;
|
|
248
|
+
};
|
|
249
|
+
autoRenew: boolean;
|
|
250
|
+
renewalCount: number;
|
|
251
|
+
scheduledChange: {
|
|
252
|
+
newPlan: {
|
|
253
|
+
key: string;
|
|
254
|
+
label: string;
|
|
255
|
+
duration: number;
|
|
256
|
+
durationUnit: string;
|
|
257
|
+
price: number;
|
|
258
|
+
discount: number;
|
|
259
|
+
};
|
|
260
|
+
effectiveDate: NativeDate;
|
|
261
|
+
changeType: "upgrade" | "downgrade";
|
|
262
|
+
scheduledAt: NativeDate;
|
|
263
|
+
priceOverride?: number;
|
|
264
|
+
scheduledBy?: import("mongoose").Types.ObjectId;
|
|
265
|
+
calculation?: any;
|
|
266
|
+
};
|
|
267
|
+
startDate?: NativeDate;
|
|
268
|
+
endDate?: NativeDate;
|
|
269
|
+
canceledAt?: NativeDate;
|
|
270
|
+
cancelAt?: NativeDate;
|
|
271
|
+
cancellationReason?: string;
|
|
272
|
+
pausedAt?: NativeDate;
|
|
273
|
+
pauseReason?: string;
|
|
274
|
+
}> & {
|
|
275
|
+
_id: import("mongoose").Types.ObjectId;
|
|
276
|
+
} & {
|
|
277
|
+
__v: number;
|
|
278
|
+
}>;
|
|
279
|
+
subscriptionPlanSchema: import("mongoose").Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
280
|
+
_id: false;
|
|
281
|
+
}, {
|
|
282
|
+
key: string;
|
|
283
|
+
label: string;
|
|
284
|
+
duration: number;
|
|
285
|
+
durationUnit: string;
|
|
286
|
+
price: number;
|
|
287
|
+
discount: number;
|
|
288
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
289
|
+
key: string;
|
|
290
|
+
label: string;
|
|
291
|
+
duration: number;
|
|
292
|
+
durationUnit: string;
|
|
293
|
+
price: number;
|
|
294
|
+
discount: number;
|
|
295
|
+
}>, {}, import("mongoose").ResolveSchemaOptions<{
|
|
296
|
+
_id: false;
|
|
297
|
+
}>> & import("mongoose").FlatRecord<{
|
|
298
|
+
key: string;
|
|
299
|
+
label: string;
|
|
300
|
+
duration: number;
|
|
301
|
+
durationUnit: string;
|
|
302
|
+
price: number;
|
|
303
|
+
discount: number;
|
|
304
|
+
}> & {
|
|
305
|
+
_id: import("mongoose").Types.ObjectId;
|
|
306
|
+
} & {
|
|
307
|
+
__v: number;
|
|
308
|
+
}>;
|
|
309
|
+
commonFields: {
|
|
310
|
+
isNewRequest: {
|
|
311
|
+
type: BooleanConstructor;
|
|
312
|
+
default: boolean;
|
|
313
|
+
index: boolean;
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
gatewaySchema: import("mongoose").Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
317
|
+
_id: false;
|
|
318
|
+
}, {
|
|
319
|
+
type: string;
|
|
320
|
+
metadata?: any;
|
|
321
|
+
paymentIntentId?: string;
|
|
322
|
+
sessionId?: string;
|
|
323
|
+
paymentUrl?: string;
|
|
324
|
+
expiresAt?: NativeDate;
|
|
325
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
326
|
+
type: string;
|
|
327
|
+
metadata?: any;
|
|
328
|
+
paymentIntentId?: string;
|
|
329
|
+
sessionId?: string;
|
|
330
|
+
paymentUrl?: string;
|
|
331
|
+
expiresAt?: NativeDate;
|
|
332
|
+
}>, {}, import("mongoose").ResolveSchemaOptions<{
|
|
333
|
+
_id: false;
|
|
334
|
+
}>> & import("mongoose").FlatRecord<{
|
|
335
|
+
type: string;
|
|
336
|
+
metadata?: any;
|
|
337
|
+
paymentIntentId?: string;
|
|
338
|
+
sessionId?: string;
|
|
339
|
+
paymentUrl?: string;
|
|
340
|
+
expiresAt?: NativeDate;
|
|
341
|
+
}> & {
|
|
342
|
+
_id: import("mongoose").Types.ObjectId;
|
|
343
|
+
} & {
|
|
344
|
+
__v: number;
|
|
345
|
+
}>;
|
|
346
|
+
commissionSchema: import("mongoose").Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
347
|
+
_id: false;
|
|
348
|
+
}, {
|
|
349
|
+
status: "pending" | "due" | "paid" | "waived";
|
|
350
|
+
rate?: number;
|
|
351
|
+
grossAmount?: number;
|
|
352
|
+
gatewayFeeRate?: number;
|
|
353
|
+
gatewayFeeAmount?: number;
|
|
354
|
+
netAmount?: number;
|
|
355
|
+
dueDate?: NativeDate;
|
|
356
|
+
paidDate?: NativeDate;
|
|
357
|
+
paidBy?: import("mongoose").Types.ObjectId;
|
|
358
|
+
notes?: string;
|
|
359
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
360
|
+
status: "pending" | "due" | "paid" | "waived";
|
|
361
|
+
rate?: number;
|
|
362
|
+
grossAmount?: number;
|
|
363
|
+
gatewayFeeRate?: number;
|
|
364
|
+
gatewayFeeAmount?: number;
|
|
365
|
+
netAmount?: number;
|
|
366
|
+
dueDate?: NativeDate;
|
|
367
|
+
paidDate?: NativeDate;
|
|
368
|
+
paidBy?: import("mongoose").Types.ObjectId;
|
|
369
|
+
notes?: string;
|
|
370
|
+
}>, {}, import("mongoose").ResolveSchemaOptions<{
|
|
371
|
+
_id: false;
|
|
372
|
+
}>> & import("mongoose").FlatRecord<{
|
|
373
|
+
status: "pending" | "due" | "paid" | "waived";
|
|
374
|
+
rate?: number;
|
|
375
|
+
grossAmount?: number;
|
|
376
|
+
gatewayFeeRate?: number;
|
|
377
|
+
gatewayFeeAmount?: number;
|
|
378
|
+
netAmount?: number;
|
|
379
|
+
dueDate?: NativeDate;
|
|
380
|
+
paidDate?: NativeDate;
|
|
381
|
+
paidBy?: import("mongoose").Types.ObjectId;
|
|
382
|
+
notes?: string;
|
|
383
|
+
}> & {
|
|
384
|
+
_id: import("mongoose").Types.ObjectId;
|
|
385
|
+
} & {
|
|
386
|
+
__v: number;
|
|
387
|
+
}>;
|
|
388
|
+
currentPaymentSchema: import("mongoose").Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
389
|
+
_id: false;
|
|
390
|
+
}, {
|
|
391
|
+
status: string;
|
|
392
|
+
transactionId?: import("mongoose").Types.ObjectId;
|
|
393
|
+
amount?: number;
|
|
394
|
+
method?: string;
|
|
395
|
+
reference?: string;
|
|
396
|
+
verifiedAt?: NativeDate;
|
|
397
|
+
verifiedBy?: import("mongoose").Types.ObjectId;
|
|
398
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
399
|
+
status: string;
|
|
400
|
+
transactionId?: import("mongoose").Types.ObjectId;
|
|
401
|
+
amount?: number;
|
|
402
|
+
method?: string;
|
|
403
|
+
reference?: string;
|
|
404
|
+
verifiedAt?: NativeDate;
|
|
405
|
+
verifiedBy?: import("mongoose").Types.ObjectId;
|
|
406
|
+
}>, {}, import("mongoose").ResolveSchemaOptions<{
|
|
407
|
+
_id: false;
|
|
408
|
+
}>> & import("mongoose").FlatRecord<{
|
|
409
|
+
status: string;
|
|
410
|
+
transactionId?: import("mongoose").Types.ObjectId;
|
|
411
|
+
amount?: number;
|
|
412
|
+
method?: string;
|
|
413
|
+
reference?: string;
|
|
414
|
+
verifiedAt?: NativeDate;
|
|
415
|
+
verifiedBy?: import("mongoose").Types.ObjectId;
|
|
416
|
+
}> & {
|
|
417
|
+
_id: import("mongoose").Types.ObjectId;
|
|
418
|
+
} & {
|
|
419
|
+
__v: number;
|
|
420
|
+
}>;
|
|
421
|
+
paymentSummarySchema: import("mongoose").Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
422
|
+
_id: false;
|
|
423
|
+
}, {
|
|
424
|
+
totalPayments: number;
|
|
425
|
+
totalAmountPaid: number;
|
|
426
|
+
lastPaymentDate?: NativeDate;
|
|
427
|
+
lastPaymentAmount?: number;
|
|
428
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
429
|
+
totalPayments: number;
|
|
430
|
+
totalAmountPaid: number;
|
|
431
|
+
lastPaymentDate?: NativeDate;
|
|
432
|
+
lastPaymentAmount?: number;
|
|
433
|
+
}>, {}, import("mongoose").ResolveSchemaOptions<{
|
|
434
|
+
_id: false;
|
|
435
|
+
}>> & import("mongoose").FlatRecord<{
|
|
436
|
+
totalPayments: number;
|
|
437
|
+
totalAmountPaid: number;
|
|
438
|
+
lastPaymentDate?: NativeDate;
|
|
439
|
+
lastPaymentAmount?: number;
|
|
440
|
+
}> & {
|
|
441
|
+
_id: import("mongoose").Types.ObjectId;
|
|
442
|
+
} & {
|
|
443
|
+
__v: number;
|
|
444
|
+
}>;
|
|
445
|
+
paymentDetailsSchema: import("mongoose").Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
446
|
+
_id: false;
|
|
447
|
+
}, {
|
|
448
|
+
provider?: string;
|
|
449
|
+
walletNumber?: string;
|
|
450
|
+
walletType?: string;
|
|
451
|
+
trxId?: string;
|
|
452
|
+
bankName?: string;
|
|
453
|
+
accountNumber?: string;
|
|
454
|
+
accountName?: string;
|
|
455
|
+
proofUrl?: string;
|
|
456
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
457
|
+
provider?: string;
|
|
458
|
+
walletNumber?: string;
|
|
459
|
+
walletType?: string;
|
|
460
|
+
trxId?: string;
|
|
461
|
+
bankName?: string;
|
|
462
|
+
accountNumber?: string;
|
|
463
|
+
accountName?: string;
|
|
464
|
+
proofUrl?: string;
|
|
465
|
+
}>, {}, import("mongoose").ResolveSchemaOptions<{
|
|
466
|
+
_id: false;
|
|
467
|
+
}>> & import("mongoose").FlatRecord<{
|
|
468
|
+
provider?: string;
|
|
469
|
+
walletNumber?: string;
|
|
470
|
+
walletType?: string;
|
|
471
|
+
trxId?: string;
|
|
472
|
+
bankName?: string;
|
|
473
|
+
accountNumber?: string;
|
|
474
|
+
accountName?: string;
|
|
475
|
+
proofUrl?: string;
|
|
476
|
+
}> & {
|
|
477
|
+
_id: import("mongoose").Types.ObjectId;
|
|
478
|
+
} & {
|
|
479
|
+
__v: number;
|
|
480
|
+
}>;
|
|
481
|
+
tenantSnapshotSchema: import("mongoose").Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
482
|
+
_id: false;
|
|
483
|
+
}, {
|
|
484
|
+
paymentInstructions?: string;
|
|
485
|
+
bkashNumber?: string;
|
|
486
|
+
nagadNumber?: string;
|
|
487
|
+
bankAccount?: string;
|
|
488
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
489
|
+
paymentInstructions?: string;
|
|
490
|
+
bkashNumber?: string;
|
|
491
|
+
nagadNumber?: string;
|
|
492
|
+
bankAccount?: string;
|
|
493
|
+
}>, {}, import("mongoose").ResolveSchemaOptions<{
|
|
494
|
+
_id: false;
|
|
495
|
+
}>> & import("mongoose").FlatRecord<{
|
|
496
|
+
paymentInstructions?: string;
|
|
497
|
+
bkashNumber?: string;
|
|
498
|
+
nagadNumber?: string;
|
|
499
|
+
bankAccount?: string;
|
|
500
|
+
}> & {
|
|
501
|
+
_id: import("mongoose").Types.ObjectId;
|
|
502
|
+
} & {
|
|
503
|
+
__v: number;
|
|
504
|
+
}>;
|
|
505
|
+
};
|
|
506
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export { splitItemSchema };
|
|
3
|
+
export { splitsSchema };
|
|
4
|
+
}
|
|
5
|
+
export default _default;
|
|
6
|
+
import { splitItemSchema } from './split.schema.js';
|
|
7
|
+
import { splitsSchema } from './split.schema.js';
|
|
8
|
+
export { splitItemSchema, splitsSchema };
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
export namespace splitItemSchema {
|
|
2
|
+
namespace type {
|
|
3
|
+
let type_1: StringConstructor;
|
|
4
|
+
export { type_1 as type };
|
|
5
|
+
export { SPLIT_TYPE_VALUES as enum };
|
|
6
|
+
export let required: boolean;
|
|
7
|
+
}
|
|
8
|
+
namespace recipientId {
|
|
9
|
+
let type_2: StringConstructor;
|
|
10
|
+
export { type_2 as type };
|
|
11
|
+
let required_1: boolean;
|
|
12
|
+
export { required_1 as required };
|
|
13
|
+
export let index: boolean;
|
|
14
|
+
}
|
|
15
|
+
namespace recipientType {
|
|
16
|
+
let type_3: StringConstructor;
|
|
17
|
+
export { type_3 as type };
|
|
18
|
+
let required_2: boolean;
|
|
19
|
+
export { required_2 as required };
|
|
20
|
+
}
|
|
21
|
+
namespace rate {
|
|
22
|
+
let type_4: NumberConstructor;
|
|
23
|
+
export { type_4 as type };
|
|
24
|
+
let required_3: boolean;
|
|
25
|
+
export { required_3 as required };
|
|
26
|
+
export let min: number;
|
|
27
|
+
export let max: number;
|
|
28
|
+
}
|
|
29
|
+
namespace grossAmount {
|
|
30
|
+
let type_5: NumberConstructor;
|
|
31
|
+
export { type_5 as type };
|
|
32
|
+
let required_4: boolean;
|
|
33
|
+
export { required_4 as required };
|
|
34
|
+
}
|
|
35
|
+
namespace gatewayFeeRate {
|
|
36
|
+
let type_6: NumberConstructor;
|
|
37
|
+
export { type_6 as type };
|
|
38
|
+
let _default: number;
|
|
39
|
+
export { _default as default };
|
|
40
|
+
}
|
|
41
|
+
namespace gatewayFeeAmount {
|
|
42
|
+
let type_7: NumberConstructor;
|
|
43
|
+
export { type_7 as type };
|
|
44
|
+
let _default_1: number;
|
|
45
|
+
export { _default_1 as default };
|
|
46
|
+
}
|
|
47
|
+
namespace netAmount {
|
|
48
|
+
let type_8: NumberConstructor;
|
|
49
|
+
export { type_8 as type };
|
|
50
|
+
let required_5: boolean;
|
|
51
|
+
export { required_5 as required };
|
|
52
|
+
}
|
|
53
|
+
namespace status {
|
|
54
|
+
let type_9: StringConstructor;
|
|
55
|
+
export { type_9 as type };
|
|
56
|
+
export { SPLIT_STATUS_VALUES as enum };
|
|
57
|
+
let _default_2: string;
|
|
58
|
+
export { _default_2 as default };
|
|
59
|
+
}
|
|
60
|
+
let dueDate: DateConstructor;
|
|
61
|
+
let paidDate: DateConstructor;
|
|
62
|
+
namespace payoutMethod {
|
|
63
|
+
let type_10: StringConstructor;
|
|
64
|
+
export { type_10 as type };
|
|
65
|
+
export { PAYOUT_METHOD_VALUES as enum };
|
|
66
|
+
let required_6: boolean;
|
|
67
|
+
export { required_6 as required };
|
|
68
|
+
}
|
|
69
|
+
let payoutTransactionId: StringConstructor;
|
|
70
|
+
namespace metadata {
|
|
71
|
+
let type_11: ObjectConstructor;
|
|
72
|
+
export { type_11 as type };
|
|
73
|
+
let _default_3: {};
|
|
74
|
+
export { _default_3 as default };
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
export namespace splitsSchema {
|
|
78
|
+
namespace splits {
|
|
79
|
+
let type_12: {
|
|
80
|
+
type: {
|
|
81
|
+
type: StringConstructor;
|
|
82
|
+
enum: string[];
|
|
83
|
+
required: boolean;
|
|
84
|
+
};
|
|
85
|
+
recipientId: {
|
|
86
|
+
type: StringConstructor;
|
|
87
|
+
required: boolean;
|
|
88
|
+
index: boolean;
|
|
89
|
+
};
|
|
90
|
+
recipientType: {
|
|
91
|
+
type: StringConstructor;
|
|
92
|
+
required: boolean;
|
|
93
|
+
};
|
|
94
|
+
rate: {
|
|
95
|
+
type: NumberConstructor;
|
|
96
|
+
required: boolean;
|
|
97
|
+
min: number;
|
|
98
|
+
max: number;
|
|
99
|
+
};
|
|
100
|
+
grossAmount: {
|
|
101
|
+
type: NumberConstructor;
|
|
102
|
+
required: boolean;
|
|
103
|
+
};
|
|
104
|
+
gatewayFeeRate: {
|
|
105
|
+
type: NumberConstructor;
|
|
106
|
+
default: number;
|
|
107
|
+
};
|
|
108
|
+
gatewayFeeAmount: {
|
|
109
|
+
type: NumberConstructor;
|
|
110
|
+
default: number;
|
|
111
|
+
};
|
|
112
|
+
netAmount: {
|
|
113
|
+
type: NumberConstructor;
|
|
114
|
+
required: boolean;
|
|
115
|
+
};
|
|
116
|
+
status: {
|
|
117
|
+
type: StringConstructor;
|
|
118
|
+
enum: string[];
|
|
119
|
+
default: string;
|
|
120
|
+
};
|
|
121
|
+
dueDate: DateConstructor;
|
|
122
|
+
paidDate: DateConstructor;
|
|
123
|
+
payoutMethod: {
|
|
124
|
+
type: StringConstructor;
|
|
125
|
+
enum: string[];
|
|
126
|
+
required: boolean;
|
|
127
|
+
};
|
|
128
|
+
payoutTransactionId: StringConstructor;
|
|
129
|
+
metadata: {
|
|
130
|
+
type: ObjectConstructor;
|
|
131
|
+
default: {};
|
|
132
|
+
};
|
|
133
|
+
}[];
|
|
134
|
+
export { type_12 as type };
|
|
135
|
+
let _default_4: any[];
|
|
136
|
+
export { _default_4 as default };
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
export default splitsSchema;
|
|
140
|
+
import { SPLIT_TYPE_VALUES } from '../../enums/split.enums.js';
|
|
141
|
+
import { SPLIT_STATUS_VALUES } from '../../enums/split.enums.js';
|
|
142
|
+
import { PAYOUT_METHOD_VALUES } from '../../enums/split.enums.js';
|