@classytic/revenue 0.2.4 → 1.0.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.
Files changed (111) hide show
  1. package/README.md +498 -501
  2. package/dist/actions-CwG-b7fR.d.ts +519 -0
  3. package/dist/core/index.d.ts +884 -0
  4. package/dist/core/index.js +2941 -0
  5. package/dist/core/index.js.map +1 -0
  6. package/dist/enums/index.d.ts +130 -0
  7. package/dist/enums/index.js +167 -0
  8. package/dist/enums/index.js.map +1 -0
  9. package/dist/index-BnJWVXuw.d.ts +378 -0
  10. package/dist/index-ChVD3P9k.d.ts +504 -0
  11. package/dist/index.d.ts +42 -0
  12. package/dist/index.js +4353 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/providers/index.d.ts +132 -0
  15. package/dist/providers/index.js +122 -0
  16. package/dist/providers/index.js.map +1 -0
  17. package/dist/retry-80lBCmSe.d.ts +234 -0
  18. package/dist/schemas/index.d.ts +894 -0
  19. package/dist/schemas/index.js +524 -0
  20. package/dist/schemas/index.js.map +1 -0
  21. package/dist/schemas/validation.d.ts +309 -0
  22. package/dist/schemas/validation.js +249 -0
  23. package/dist/schemas/validation.js.map +1 -0
  24. package/dist/services/index.d.ts +3 -0
  25. package/dist/services/index.js +1632 -0
  26. package/dist/services/index.js.map +1 -0
  27. package/dist/split.enums-DHdM1YAV.d.ts +255 -0
  28. package/dist/split.schema-BPdFZMbU.d.ts +958 -0
  29. package/dist/utils/index.d.ts +24 -0
  30. package/dist/utils/index.js +1067 -0
  31. package/dist/utils/index.js.map +1 -0
  32. package/package.json +48 -32
  33. package/core/builder.js +0 -219
  34. package/core/container.js +0 -119
  35. package/core/errors.js +0 -262
  36. package/dist/types/core/builder.d.ts +0 -97
  37. package/dist/types/core/container.d.ts +0 -57
  38. package/dist/types/core/errors.d.ts +0 -122
  39. package/dist/types/enums/escrow.enums.d.ts +0 -24
  40. package/dist/types/enums/index.d.ts +0 -69
  41. package/dist/types/enums/monetization.enums.d.ts +0 -6
  42. package/dist/types/enums/payment.enums.d.ts +0 -16
  43. package/dist/types/enums/split.enums.d.ts +0 -25
  44. package/dist/types/enums/subscription.enums.d.ts +0 -15
  45. package/dist/types/enums/transaction.enums.d.ts +0 -24
  46. package/dist/types/index.d.ts +0 -22
  47. package/dist/types/providers/base.d.ts +0 -128
  48. package/dist/types/schemas/escrow/hold.schema.d.ts +0 -54
  49. package/dist/types/schemas/escrow/index.d.ts +0 -6
  50. package/dist/types/schemas/index.d.ts +0 -506
  51. package/dist/types/schemas/split/index.d.ts +0 -8
  52. package/dist/types/schemas/split/split.schema.d.ts +0 -142
  53. package/dist/types/schemas/subscription/index.d.ts +0 -152
  54. package/dist/types/schemas/subscription/info.schema.d.ts +0 -128
  55. package/dist/types/schemas/subscription/plan.schema.d.ts +0 -39
  56. package/dist/types/schemas/transaction/common.schema.d.ts +0 -12
  57. package/dist/types/schemas/transaction/gateway.schema.d.ts +0 -86
  58. package/dist/types/schemas/transaction/index.d.ts +0 -202
  59. package/dist/types/schemas/transaction/payment.schema.d.ts +0 -145
  60. package/dist/types/services/escrow.service.d.ts +0 -51
  61. package/dist/types/services/monetization.service.d.ts +0 -193
  62. package/dist/types/services/payment.service.d.ts +0 -117
  63. package/dist/types/services/transaction.service.d.ts +0 -40
  64. package/dist/types/utils/category-resolver.d.ts +0 -46
  65. package/dist/types/utils/commission-split.d.ts +0 -56
  66. package/dist/types/utils/commission.d.ts +0 -29
  67. package/dist/types/utils/hooks.d.ts +0 -17
  68. package/dist/types/utils/index.d.ts +0 -6
  69. package/dist/types/utils/logger.d.ts +0 -12
  70. package/dist/types/utils/subscription/actions.d.ts +0 -28
  71. package/dist/types/utils/subscription/index.d.ts +0 -2
  72. package/dist/types/utils/subscription/period.d.ts +0 -47
  73. package/dist/types/utils/transaction-type.d.ts +0 -102
  74. package/enums/escrow.enums.js +0 -36
  75. package/enums/index.d.ts +0 -116
  76. package/enums/index.js +0 -110
  77. package/enums/monetization.enums.js +0 -15
  78. package/enums/payment.enums.js +0 -64
  79. package/enums/split.enums.js +0 -37
  80. package/enums/subscription.enums.js +0 -33
  81. package/enums/transaction.enums.js +0 -69
  82. package/index.js +0 -76
  83. package/providers/base.js +0 -162
  84. package/schemas/escrow/hold.schema.js +0 -62
  85. package/schemas/escrow/index.js +0 -15
  86. package/schemas/index.d.ts +0 -33
  87. package/schemas/index.js +0 -27
  88. package/schemas/split/index.js +0 -16
  89. package/schemas/split/split.schema.js +0 -86
  90. package/schemas/subscription/index.js +0 -17
  91. package/schemas/subscription/info.schema.js +0 -115
  92. package/schemas/subscription/plan.schema.js +0 -48
  93. package/schemas/transaction/common.schema.js +0 -22
  94. package/schemas/transaction/gateway.schema.js +0 -69
  95. package/schemas/transaction/index.js +0 -20
  96. package/schemas/transaction/payment.schema.js +0 -110
  97. package/services/escrow.service.js +0 -353
  98. package/services/monetization.service.js +0 -675
  99. package/services/payment.service.js +0 -535
  100. package/services/transaction.service.js +0 -142
  101. package/utils/category-resolver.js +0 -74
  102. package/utils/commission-split.js +0 -180
  103. package/utils/commission.js +0 -83
  104. package/utils/hooks.js +0 -44
  105. package/utils/index.d.ts +0 -164
  106. package/utils/index.js +0 -16
  107. package/utils/logger.js +0 -36
  108. package/utils/subscription/actions.js +0 -68
  109. package/utils/subscription/index.js +0 -20
  110. package/utils/subscription/period.js +0 -123
  111. package/utils/transaction-type.js +0 -254
@@ -0,0 +1,894 @@
1
+ import * as mongoose from 'mongoose';
2
+ 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-BPdFZMbU.js';
3
+
4
+ declare const _default: {
5
+ splitSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
6
+ _id: false;
7
+ }, {
8
+ type: "platform_commission" | "affiliate_commission" | "referral_commission" | "partner_commission" | "custom";
9
+ metadata: any;
10
+ recipientId: string;
11
+ grossAmount: number;
12
+ netAmount: number;
13
+ status: "pending" | "cancelled" | "paid" | "waived" | "due";
14
+ rate: number;
15
+ gatewayFeeRate: number;
16
+ gatewayFeeAmount: number;
17
+ recipientType: "user" | "platform" | "organization" | "affiliate" | "partner";
18
+ dueDate?: NativeDate | null | undefined;
19
+ paidDate?: NativeDate | null | undefined;
20
+ payoutMethod?: "manual" | "bank_transfer" | "mobile_wallet" | "platform_balance" | "crypto" | "check" | null | undefined;
21
+ payoutTransactionId?: string | null | undefined;
22
+ }, mongoose.Document<unknown, {}, {
23
+ type: "platform_commission" | "affiliate_commission" | "referral_commission" | "partner_commission" | "custom";
24
+ metadata: any;
25
+ recipientId: string;
26
+ grossAmount: number;
27
+ netAmount: number;
28
+ status: "pending" | "cancelled" | "paid" | "waived" | "due";
29
+ rate: number;
30
+ gatewayFeeRate: number;
31
+ gatewayFeeAmount: number;
32
+ recipientType: "user" | "platform" | "organization" | "affiliate" | "partner";
33
+ dueDate?: NativeDate | null | undefined;
34
+ paidDate?: NativeDate | null | undefined;
35
+ payoutMethod?: "manual" | "bank_transfer" | "mobile_wallet" | "platform_balance" | "crypto" | "check" | null | undefined;
36
+ payoutTransactionId?: string | null | undefined;
37
+ }, {
38
+ id: string;
39
+ }, mongoose.ResolveSchemaOptions<{
40
+ _id: false;
41
+ }>> & Omit<{
42
+ type: "platform_commission" | "affiliate_commission" | "referral_commission" | "partner_commission" | "custom";
43
+ metadata: any;
44
+ recipientId: string;
45
+ grossAmount: number;
46
+ netAmount: number;
47
+ status: "pending" | "cancelled" | "paid" | "waived" | "due";
48
+ rate: number;
49
+ gatewayFeeRate: number;
50
+ gatewayFeeAmount: number;
51
+ recipientType: "user" | "platform" | "organization" | "affiliate" | "partner";
52
+ dueDate?: NativeDate | null | undefined;
53
+ paidDate?: NativeDate | null | undefined;
54
+ payoutMethod?: "manual" | "bank_transfer" | "mobile_wallet" | "platform_balance" | "crypto" | "check" | null | undefined;
55
+ payoutTransactionId?: string | null | undefined;
56
+ } & {
57
+ _id: mongoose.Types.ObjectId;
58
+ } & {
59
+ __v: number;
60
+ }, "id"> & {
61
+ id: string;
62
+ }, {
63
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
64
+ } | {
65
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
66
+ type: "platform_commission" | "affiliate_commission" | "referral_commission" | "partner_commission" | "custom";
67
+ metadata: any;
68
+ recipientId: string;
69
+ grossAmount: number;
70
+ netAmount: number;
71
+ status: "pending" | "cancelled" | "paid" | "waived" | "due";
72
+ rate: number;
73
+ gatewayFeeRate: number;
74
+ gatewayFeeAmount: number;
75
+ recipientType: "user" | "platform" | "organization" | "affiliate" | "partner";
76
+ dueDate?: NativeDate | null | undefined;
77
+ paidDate?: NativeDate | null | undefined;
78
+ payoutMethod?: "manual" | "bank_transfer" | "mobile_wallet" | "platform_balance" | "crypto" | "check" | null | undefined;
79
+ payoutTransactionId?: string | null | undefined;
80
+ }, {
81
+ id: string;
82
+ }, mongoose.ResolveSchemaOptions<{
83
+ _id: false;
84
+ }>> & Omit<{
85
+ type: "platform_commission" | "affiliate_commission" | "referral_commission" | "partner_commission" | "custom";
86
+ metadata: any;
87
+ recipientId: string;
88
+ grossAmount: number;
89
+ netAmount: number;
90
+ status: "pending" | "cancelled" | "paid" | "waived" | "due";
91
+ rate: number;
92
+ gatewayFeeRate: number;
93
+ gatewayFeeAmount: number;
94
+ recipientType: "user" | "platform" | "organization" | "affiliate" | "partner";
95
+ dueDate?: NativeDate | null | undefined;
96
+ paidDate?: NativeDate | null | undefined;
97
+ payoutMethod?: "manual" | "bank_transfer" | "mobile_wallet" | "platform_balance" | "crypto" | "check" | null | undefined;
98
+ payoutTransactionId?: string | null | undefined;
99
+ } & {
100
+ _id: mongoose.Types.ObjectId;
101
+ } & {
102
+ __v: number;
103
+ }, "id"> & {
104
+ id: string;
105
+ }> | undefined;
106
+ }, {
107
+ type: "platform_commission" | "affiliate_commission" | "referral_commission" | "partner_commission" | "custom";
108
+ metadata: any;
109
+ recipientId: string;
110
+ grossAmount: number;
111
+ netAmount: number;
112
+ status: "pending" | "cancelled" | "paid" | "waived" | "due";
113
+ rate: number;
114
+ gatewayFeeRate: number;
115
+ gatewayFeeAmount: number;
116
+ recipientType: "user" | "platform" | "organization" | "affiliate" | "partner";
117
+ dueDate?: NativeDate | null | undefined;
118
+ paidDate?: NativeDate | null | undefined;
119
+ payoutMethod?: "manual" | "bank_transfer" | "mobile_wallet" | "platform_balance" | "crypto" | "check" | null | undefined;
120
+ payoutTransactionId?: string | null | undefined;
121
+ } & {
122
+ _id: mongoose.Types.ObjectId;
123
+ } & {
124
+ __v: number;
125
+ }>;
126
+ holdSchema: {
127
+ readonly status: {
128
+ readonly type: StringConstructor;
129
+ readonly enum: ("pending" | "cancelled" | "expired" | "held" | "released" | "partially_released")[];
130
+ readonly default: "pending";
131
+ readonly index: true;
132
+ };
133
+ readonly heldAmount: {
134
+ readonly type: NumberConstructor;
135
+ readonly required: false;
136
+ };
137
+ readonly releasedAmount: {
138
+ readonly type: NumberConstructor;
139
+ readonly default: 0;
140
+ };
141
+ readonly reason: {
142
+ readonly type: StringConstructor;
143
+ readonly enum: ("payment_verification" | "fraud_check" | "manual_review" | "dispute" | "compliance")[];
144
+ readonly required: false;
145
+ };
146
+ readonly holdUntil: {
147
+ readonly type: DateConstructor;
148
+ readonly required: false;
149
+ };
150
+ readonly heldAt: DateConstructor;
151
+ readonly releasedAt: DateConstructor;
152
+ readonly cancelledAt: DateConstructor;
153
+ readonly releases: readonly [{
154
+ readonly amount: NumberConstructor;
155
+ readonly recipientId: StringConstructor;
156
+ readonly recipientType: StringConstructor;
157
+ readonly releasedAt: DateConstructor;
158
+ readonly releasedBy: StringConstructor;
159
+ readonly reason: StringConstructor;
160
+ readonly metadata: ObjectConstructor;
161
+ }];
162
+ readonly metadata: {
163
+ readonly type: ObjectConstructor;
164
+ readonly default: {};
165
+ };
166
+ };
167
+ planSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
168
+ _id: false;
169
+ }, {
170
+ amount: number;
171
+ currency: string;
172
+ metadata: any;
173
+ name: string;
174
+ key: "monthly" | "quarterly" | "yearly";
175
+ isActive: boolean;
176
+ interval: "day" | "week" | "month" | "year";
177
+ intervalCount: number;
178
+ features: string[];
179
+ description?: string | null | undefined;
180
+ }, mongoose.Document<unknown, {}, {
181
+ amount: number;
182
+ currency: string;
183
+ metadata: any;
184
+ name: string;
185
+ key: "monthly" | "quarterly" | "yearly";
186
+ isActive: boolean;
187
+ interval: "day" | "week" | "month" | "year";
188
+ intervalCount: number;
189
+ features: string[];
190
+ description?: string | null | undefined;
191
+ }, {
192
+ id: string;
193
+ }, mongoose.ResolveSchemaOptions<{
194
+ _id: false;
195
+ }>> & Omit<{
196
+ amount: number;
197
+ currency: string;
198
+ metadata: any;
199
+ name: string;
200
+ key: "monthly" | "quarterly" | "yearly";
201
+ isActive: boolean;
202
+ interval: "day" | "week" | "month" | "year";
203
+ intervalCount: number;
204
+ features: string[];
205
+ description?: string | null | undefined;
206
+ } & {
207
+ _id: mongoose.Types.ObjectId;
208
+ } & {
209
+ __v: number;
210
+ }, "id"> & {
211
+ id: string;
212
+ }, {
213
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
214
+ } | {
215
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
216
+ amount: number;
217
+ currency: string;
218
+ metadata: any;
219
+ name: string;
220
+ key: "monthly" | "quarterly" | "yearly";
221
+ isActive: boolean;
222
+ interval: "day" | "week" | "month" | "year";
223
+ intervalCount: number;
224
+ features: string[];
225
+ description?: string | null | undefined;
226
+ }, {
227
+ id: string;
228
+ }, mongoose.ResolveSchemaOptions<{
229
+ _id: false;
230
+ }>> & Omit<{
231
+ amount: number;
232
+ currency: string;
233
+ metadata: any;
234
+ name: string;
235
+ key: "monthly" | "quarterly" | "yearly";
236
+ isActive: boolean;
237
+ interval: "day" | "week" | "month" | "year";
238
+ intervalCount: number;
239
+ features: string[];
240
+ description?: string | null | undefined;
241
+ } & {
242
+ _id: mongoose.Types.ObjectId;
243
+ } & {
244
+ __v: number;
245
+ }, "id"> & {
246
+ id: string;
247
+ }> | undefined;
248
+ }, {
249
+ amount: number;
250
+ currency: string;
251
+ metadata: any;
252
+ name: string;
253
+ key: "monthly" | "quarterly" | "yearly";
254
+ isActive: boolean;
255
+ interval: "day" | "week" | "month" | "year";
256
+ intervalCount: number;
257
+ features: string[];
258
+ description?: string | null | undefined;
259
+ } & {
260
+ _id: mongoose.Types.ObjectId;
261
+ } & {
262
+ __v: number;
263
+ }>;
264
+ subscriptionInfoSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
265
+ _id: false;
266
+ }, {
267
+ planKey: "monthly" | "quarterly" | "yearly";
268
+ status: "pending" | "cancelled" | "expired" | "active" | "paused" | "inactive";
269
+ isActive: boolean;
270
+ renewalCount: number;
271
+ pausedAt?: NativeDate | null | undefined;
272
+ endDate?: NativeDate | null | undefined;
273
+ lastPaymentDate?: NativeDate | null | undefined;
274
+ lastPaymentAmount?: number | null | undefined;
275
+ startDate?: NativeDate | null | undefined;
276
+ canceledAt?: NativeDate | null | undefined;
277
+ cancelAt?: NativeDate | null | undefined;
278
+ }, mongoose.Document<unknown, {}, {
279
+ planKey: "monthly" | "quarterly" | "yearly";
280
+ status: "pending" | "cancelled" | "expired" | "active" | "paused" | "inactive";
281
+ isActive: boolean;
282
+ renewalCount: number;
283
+ pausedAt?: NativeDate | null | undefined;
284
+ endDate?: NativeDate | null | undefined;
285
+ lastPaymentDate?: NativeDate | null | undefined;
286
+ lastPaymentAmount?: number | null | undefined;
287
+ startDate?: NativeDate | null | undefined;
288
+ canceledAt?: NativeDate | null | undefined;
289
+ cancelAt?: NativeDate | null | undefined;
290
+ }, {
291
+ id: string;
292
+ }, mongoose.ResolveSchemaOptions<{
293
+ _id: false;
294
+ }>> & Omit<{
295
+ planKey: "monthly" | "quarterly" | "yearly";
296
+ status: "pending" | "cancelled" | "expired" | "active" | "paused" | "inactive";
297
+ isActive: boolean;
298
+ renewalCount: number;
299
+ pausedAt?: NativeDate | null | undefined;
300
+ endDate?: NativeDate | null | undefined;
301
+ lastPaymentDate?: NativeDate | null | undefined;
302
+ lastPaymentAmount?: number | null | undefined;
303
+ startDate?: NativeDate | null | undefined;
304
+ canceledAt?: NativeDate | null | undefined;
305
+ cancelAt?: NativeDate | null | undefined;
306
+ } & {
307
+ _id: mongoose.Types.ObjectId;
308
+ } & {
309
+ __v: number;
310
+ }, "id"> & {
311
+ id: string;
312
+ }, {
313
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
314
+ } | {
315
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
316
+ planKey: "monthly" | "quarterly" | "yearly";
317
+ status: "pending" | "cancelled" | "expired" | "active" | "paused" | "inactive";
318
+ isActive: boolean;
319
+ renewalCount: number;
320
+ pausedAt?: NativeDate | null | undefined;
321
+ endDate?: NativeDate | null | undefined;
322
+ lastPaymentDate?: NativeDate | null | undefined;
323
+ lastPaymentAmount?: number | null | undefined;
324
+ startDate?: NativeDate | null | undefined;
325
+ canceledAt?: NativeDate | null | undefined;
326
+ cancelAt?: NativeDate | null | undefined;
327
+ }, {
328
+ id: string;
329
+ }, mongoose.ResolveSchemaOptions<{
330
+ _id: false;
331
+ }>> & Omit<{
332
+ planKey: "monthly" | "quarterly" | "yearly";
333
+ status: "pending" | "cancelled" | "expired" | "active" | "paused" | "inactive";
334
+ isActive: boolean;
335
+ renewalCount: number;
336
+ pausedAt?: NativeDate | null | undefined;
337
+ endDate?: NativeDate | null | undefined;
338
+ lastPaymentDate?: NativeDate | null | undefined;
339
+ lastPaymentAmount?: number | null | undefined;
340
+ startDate?: NativeDate | null | undefined;
341
+ canceledAt?: NativeDate | null | undefined;
342
+ cancelAt?: NativeDate | null | undefined;
343
+ } & {
344
+ _id: mongoose.Types.ObjectId;
345
+ } & {
346
+ __v: number;
347
+ }, "id"> & {
348
+ id: string;
349
+ }> | undefined;
350
+ }, {
351
+ planKey: "monthly" | "quarterly" | "yearly";
352
+ status: "pending" | "cancelled" | "expired" | "active" | "paused" | "inactive";
353
+ isActive: boolean;
354
+ renewalCount: number;
355
+ pausedAt?: NativeDate | null | undefined;
356
+ endDate?: NativeDate | null | undefined;
357
+ lastPaymentDate?: NativeDate | null | undefined;
358
+ lastPaymentAmount?: number | null | undefined;
359
+ startDate?: NativeDate | null | undefined;
360
+ canceledAt?: NativeDate | null | undefined;
361
+ cancelAt?: NativeDate | null | undefined;
362
+ } & {
363
+ _id: mongoose.Types.ObjectId;
364
+ } & {
365
+ __v: number;
366
+ }>;
367
+ currentPaymentSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
368
+ _id: false;
369
+ }, {
370
+ status: "pending" | "verified" | "failed" | "cancelled" | "refunded";
371
+ transactionId?: mongoose.Types.ObjectId | null | undefined;
372
+ amount?: number | null | undefined;
373
+ method?: string | null | undefined;
374
+ verifiedAt?: NativeDate | null | undefined;
375
+ verifiedBy?: mongoose.Types.ObjectId | null | undefined;
376
+ reference?: string | null | undefined;
377
+ }, mongoose.Document<unknown, {}, {
378
+ status: "pending" | "verified" | "failed" | "cancelled" | "refunded";
379
+ transactionId?: mongoose.Types.ObjectId | null | undefined;
380
+ amount?: number | null | undefined;
381
+ method?: string | null | undefined;
382
+ verifiedAt?: NativeDate | null | undefined;
383
+ verifiedBy?: mongoose.Types.ObjectId | null | undefined;
384
+ reference?: string | null | undefined;
385
+ }, {
386
+ id: string;
387
+ }, mongoose.ResolveSchemaOptions<{
388
+ _id: false;
389
+ }>> & Omit<{
390
+ status: "pending" | "verified" | "failed" | "cancelled" | "refunded";
391
+ transactionId?: mongoose.Types.ObjectId | null | undefined;
392
+ amount?: number | null | undefined;
393
+ method?: string | null | undefined;
394
+ verifiedAt?: NativeDate | null | undefined;
395
+ verifiedBy?: mongoose.Types.ObjectId | null | undefined;
396
+ reference?: string | null | undefined;
397
+ } & {
398
+ _id: mongoose.Types.ObjectId;
399
+ } & {
400
+ __v: number;
401
+ }, "id"> & {
402
+ id: string;
403
+ }, {
404
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
405
+ } | {
406
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
407
+ status: "pending" | "verified" | "failed" | "cancelled" | "refunded";
408
+ transactionId?: mongoose.Types.ObjectId | null | undefined;
409
+ amount?: number | null | undefined;
410
+ method?: string | null | undefined;
411
+ verifiedAt?: NativeDate | null | undefined;
412
+ verifiedBy?: mongoose.Types.ObjectId | null | undefined;
413
+ reference?: string | null | undefined;
414
+ }, {
415
+ id: string;
416
+ }, mongoose.ResolveSchemaOptions<{
417
+ _id: false;
418
+ }>> & Omit<{
419
+ status: "pending" | "verified" | "failed" | "cancelled" | "refunded";
420
+ transactionId?: mongoose.Types.ObjectId | null | undefined;
421
+ amount?: number | null | undefined;
422
+ method?: string | null | undefined;
423
+ verifiedAt?: NativeDate | null | undefined;
424
+ verifiedBy?: mongoose.Types.ObjectId | null | undefined;
425
+ reference?: string | null | undefined;
426
+ } & {
427
+ _id: mongoose.Types.ObjectId;
428
+ } & {
429
+ __v: number;
430
+ }, "id"> & {
431
+ id: string;
432
+ }> | undefined;
433
+ }, {
434
+ status: "pending" | "verified" | "failed" | "cancelled" | "refunded";
435
+ transactionId?: mongoose.Types.ObjectId | null | undefined;
436
+ amount?: number | null | undefined;
437
+ method?: string | null | undefined;
438
+ verifiedAt?: NativeDate | null | undefined;
439
+ verifiedBy?: mongoose.Types.ObjectId | null | undefined;
440
+ reference?: string | null | undefined;
441
+ } & {
442
+ _id: mongoose.Types.ObjectId;
443
+ } & {
444
+ __v: number;
445
+ }>;
446
+ paymentSummarySchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
447
+ _id: false;
448
+ }, {
449
+ totalPayments: number;
450
+ totalAmountPaid: number;
451
+ lastPaymentDate?: NativeDate | null | undefined;
452
+ lastPaymentAmount?: number | null | undefined;
453
+ }, mongoose.Document<unknown, {}, {
454
+ totalPayments: number;
455
+ totalAmountPaid: number;
456
+ lastPaymentDate?: NativeDate | null | undefined;
457
+ lastPaymentAmount?: number | null | undefined;
458
+ }, {
459
+ id: string;
460
+ }, mongoose.ResolveSchemaOptions<{
461
+ _id: false;
462
+ }>> & Omit<{
463
+ totalPayments: number;
464
+ totalAmountPaid: number;
465
+ lastPaymentDate?: NativeDate | null | undefined;
466
+ lastPaymentAmount?: number | null | undefined;
467
+ } & {
468
+ _id: mongoose.Types.ObjectId;
469
+ } & {
470
+ __v: number;
471
+ }, "id"> & {
472
+ id: string;
473
+ }, {
474
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
475
+ } | {
476
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
477
+ totalPayments: number;
478
+ totalAmountPaid: number;
479
+ lastPaymentDate?: NativeDate | null | undefined;
480
+ lastPaymentAmount?: number | null | undefined;
481
+ }, {
482
+ id: string;
483
+ }, mongoose.ResolveSchemaOptions<{
484
+ _id: false;
485
+ }>> & Omit<{
486
+ totalPayments: number;
487
+ totalAmountPaid: number;
488
+ lastPaymentDate?: NativeDate | null | undefined;
489
+ lastPaymentAmount?: number | null | undefined;
490
+ } & {
491
+ _id: mongoose.Types.ObjectId;
492
+ } & {
493
+ __v: number;
494
+ }, "id"> & {
495
+ id: string;
496
+ }> | undefined;
497
+ }, {
498
+ totalPayments: number;
499
+ totalAmountPaid: number;
500
+ lastPaymentDate?: NativeDate | null | undefined;
501
+ lastPaymentAmount?: number | null | undefined;
502
+ } & {
503
+ _id: mongoose.Types.ObjectId;
504
+ } & {
505
+ __v: number;
506
+ }>;
507
+ paymentDetailsSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
508
+ _id: false;
509
+ }, {
510
+ provider?: string | null | undefined;
511
+ walletNumber?: string | null | undefined;
512
+ walletType?: string | null | undefined;
513
+ trxId?: string | null | undefined;
514
+ bankName?: string | null | undefined;
515
+ accountNumber?: string | null | undefined;
516
+ accountName?: string | null | undefined;
517
+ proofUrl?: string | null | undefined;
518
+ }, mongoose.Document<unknown, {}, {
519
+ provider?: string | null | undefined;
520
+ walletNumber?: string | null | undefined;
521
+ walletType?: string | null | undefined;
522
+ trxId?: string | null | undefined;
523
+ bankName?: string | null | undefined;
524
+ accountNumber?: string | null | undefined;
525
+ accountName?: string | null | undefined;
526
+ proofUrl?: string | null | undefined;
527
+ }, {
528
+ id: string;
529
+ }, mongoose.ResolveSchemaOptions<{
530
+ _id: false;
531
+ }>> & Omit<{
532
+ provider?: string | null | undefined;
533
+ walletNumber?: string | null | undefined;
534
+ walletType?: string | null | undefined;
535
+ trxId?: string | null | undefined;
536
+ bankName?: string | null | undefined;
537
+ accountNumber?: string | null | undefined;
538
+ accountName?: string | null | undefined;
539
+ proofUrl?: string | null | undefined;
540
+ } & {
541
+ _id: mongoose.Types.ObjectId;
542
+ } & {
543
+ __v: number;
544
+ }, "id"> & {
545
+ id: string;
546
+ }, {
547
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
548
+ } | {
549
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
550
+ provider?: string | null | undefined;
551
+ walletNumber?: string | null | undefined;
552
+ walletType?: string | null | undefined;
553
+ trxId?: string | null | undefined;
554
+ bankName?: string | null | undefined;
555
+ accountNumber?: string | null | undefined;
556
+ accountName?: string | null | undefined;
557
+ proofUrl?: string | null | undefined;
558
+ }, {
559
+ id: string;
560
+ }, mongoose.ResolveSchemaOptions<{
561
+ _id: false;
562
+ }>> & Omit<{
563
+ provider?: string | null | undefined;
564
+ walletNumber?: string | null | undefined;
565
+ walletType?: string | null | undefined;
566
+ trxId?: string | null | undefined;
567
+ bankName?: string | null | undefined;
568
+ accountNumber?: string | null | undefined;
569
+ accountName?: string | null | undefined;
570
+ proofUrl?: string | null | undefined;
571
+ } & {
572
+ _id: mongoose.Types.ObjectId;
573
+ } & {
574
+ __v: number;
575
+ }, "id"> & {
576
+ id: string;
577
+ }> | undefined;
578
+ }, {
579
+ provider?: string | null | undefined;
580
+ walletNumber?: string | null | undefined;
581
+ walletType?: string | null | undefined;
582
+ trxId?: string | null | undefined;
583
+ bankName?: string | null | undefined;
584
+ accountNumber?: string | null | undefined;
585
+ accountName?: string | null | undefined;
586
+ proofUrl?: string | null | undefined;
587
+ } & {
588
+ _id: mongoose.Types.ObjectId;
589
+ } & {
590
+ __v: number;
591
+ }>;
592
+ tenantSnapshotSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
593
+ _id: false;
594
+ }, {
595
+ paymentInstructions?: string | null | undefined;
596
+ bkashNumber?: string | null | undefined;
597
+ nagadNumber?: string | null | undefined;
598
+ bankAccount?: string | null | undefined;
599
+ }, mongoose.Document<unknown, {}, {
600
+ paymentInstructions?: string | null | undefined;
601
+ bkashNumber?: string | null | undefined;
602
+ nagadNumber?: string | null | undefined;
603
+ bankAccount?: string | null | undefined;
604
+ }, {
605
+ id: string;
606
+ }, mongoose.ResolveSchemaOptions<{
607
+ _id: false;
608
+ }>> & Omit<{
609
+ paymentInstructions?: string | null | undefined;
610
+ bkashNumber?: string | null | undefined;
611
+ nagadNumber?: string | null | undefined;
612
+ bankAccount?: string | null | undefined;
613
+ } & {
614
+ _id: mongoose.Types.ObjectId;
615
+ } & {
616
+ __v: number;
617
+ }, "id"> & {
618
+ id: string;
619
+ }, {
620
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
621
+ } | {
622
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
623
+ paymentInstructions?: string | null | undefined;
624
+ bkashNumber?: string | null | undefined;
625
+ nagadNumber?: string | null | undefined;
626
+ bankAccount?: string | null | undefined;
627
+ }, {
628
+ id: string;
629
+ }, mongoose.ResolveSchemaOptions<{
630
+ _id: false;
631
+ }>> & Omit<{
632
+ paymentInstructions?: string | null | undefined;
633
+ bkashNumber?: string | null | undefined;
634
+ nagadNumber?: string | null | undefined;
635
+ bankAccount?: string | null | undefined;
636
+ } & {
637
+ _id: mongoose.Types.ObjectId;
638
+ } & {
639
+ __v: number;
640
+ }, "id"> & {
641
+ id: string;
642
+ }> | undefined;
643
+ }, {
644
+ paymentInstructions?: string | null | undefined;
645
+ bkashNumber?: string | null | undefined;
646
+ nagadNumber?: string | null | undefined;
647
+ bankAccount?: string | null | undefined;
648
+ } & {
649
+ _id: mongoose.Types.ObjectId;
650
+ } & {
651
+ __v: number;
652
+ }>;
653
+ baseMetadataSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
654
+ _id: false;
655
+ strict: false;
656
+ }, {}, mongoose.Document<unknown, {}, {}, {
657
+ id: string;
658
+ }, mongoose.ResolveSchemaOptions<{
659
+ _id: false;
660
+ strict: false;
661
+ }>> & Omit<Required<{
662
+ _id: unknown;
663
+ }> & {
664
+ __v: number;
665
+ }, "id"> & {
666
+ id: string;
667
+ }, {
668
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
669
+ } | {
670
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {}, {
671
+ id: string;
672
+ }, mongoose.ResolveSchemaOptions<{
673
+ _id: false;
674
+ strict: false;
675
+ }>> & Omit<Required<{
676
+ _id: unknown;
677
+ }> & {
678
+ __v: number;
679
+ }, "id"> & {
680
+ id: string;
681
+ }> | undefined;
682
+ }, {} & Required<{
683
+ _id: unknown;
684
+ }> & {
685
+ __v: number;
686
+ }>;
687
+ referenceSchema: {
688
+ referenceId: {
689
+ type: typeof mongoose.Schema.Types.ObjectId;
690
+ refPath: string;
691
+ index: boolean;
692
+ };
693
+ referenceModel: {
694
+ type: StringConstructor;
695
+ enum: string[];
696
+ };
697
+ };
698
+ gatewaySchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
699
+ _id: false;
700
+ }, {
701
+ type: string;
702
+ metadata: any;
703
+ sessionId?: string | null | undefined;
704
+ paymentIntentId?: string | null | undefined;
705
+ provider?: string | null | undefined;
706
+ verificationData?: any;
707
+ }, mongoose.Document<unknown, {}, {
708
+ type: string;
709
+ metadata: any;
710
+ sessionId?: string | null | undefined;
711
+ paymentIntentId?: string | null | undefined;
712
+ provider?: string | null | undefined;
713
+ verificationData?: any;
714
+ }, {
715
+ id: string;
716
+ }, mongoose.ResolveSchemaOptions<{
717
+ _id: false;
718
+ }>> & Omit<{
719
+ type: string;
720
+ metadata: any;
721
+ sessionId?: string | null | undefined;
722
+ paymentIntentId?: string | null | undefined;
723
+ provider?: string | null | undefined;
724
+ verificationData?: any;
725
+ } & {
726
+ _id: mongoose.Types.ObjectId;
727
+ } & {
728
+ __v: number;
729
+ }, "id"> & {
730
+ id: string;
731
+ }, {
732
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
733
+ } | {
734
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
735
+ type: string;
736
+ metadata: any;
737
+ sessionId?: string | null | undefined;
738
+ paymentIntentId?: string | null | undefined;
739
+ provider?: string | null | undefined;
740
+ verificationData?: any;
741
+ }, {
742
+ id: string;
743
+ }, mongoose.ResolveSchemaOptions<{
744
+ _id: false;
745
+ }>> & Omit<{
746
+ type: string;
747
+ metadata: any;
748
+ sessionId?: string | null | undefined;
749
+ paymentIntentId?: string | null | undefined;
750
+ provider?: string | null | undefined;
751
+ verificationData?: any;
752
+ } & {
753
+ _id: mongoose.Types.ObjectId;
754
+ } & {
755
+ __v: number;
756
+ }, "id"> & {
757
+ id: string;
758
+ }> | undefined;
759
+ }, {
760
+ type: string;
761
+ metadata: any;
762
+ sessionId?: string | null | undefined;
763
+ paymentIntentId?: string | null | undefined;
764
+ provider?: string | null | undefined;
765
+ verificationData?: any;
766
+ } & {
767
+ _id: mongoose.Types.ObjectId;
768
+ } & {
769
+ __v: number;
770
+ }>;
771
+ commissionSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
772
+ _id: false;
773
+ }, {
774
+ status: "pending" | "paid" | "waived" | "reversed";
775
+ splits: string[];
776
+ grossAmount?: number | null | undefined;
777
+ netAmount?: number | null | undefined;
778
+ rate?: number | null | undefined;
779
+ gatewayFeeRate?: number | null | undefined;
780
+ gatewayFeeAmount?: number | null | undefined;
781
+ affiliate?: {
782
+ recipientId?: string | null | undefined;
783
+ grossAmount?: number | null | undefined;
784
+ netAmount?: number | null | undefined;
785
+ rate?: number | null | undefined;
786
+ recipientType?: "user" | "organization" | "partner" | null | undefined;
787
+ } | null | undefined;
788
+ }, mongoose.Document<unknown, {}, {
789
+ status: "pending" | "paid" | "waived" | "reversed";
790
+ splits: string[];
791
+ grossAmount?: number | null | undefined;
792
+ netAmount?: number | null | undefined;
793
+ rate?: number | null | undefined;
794
+ gatewayFeeRate?: number | null | undefined;
795
+ gatewayFeeAmount?: number | null | undefined;
796
+ affiliate?: {
797
+ recipientId?: string | null | undefined;
798
+ grossAmount?: number | null | undefined;
799
+ netAmount?: number | null | undefined;
800
+ rate?: number | null | undefined;
801
+ recipientType?: "user" | "organization" | "partner" | null | undefined;
802
+ } | null | undefined;
803
+ }, {
804
+ id: string;
805
+ }, mongoose.ResolveSchemaOptions<{
806
+ _id: false;
807
+ }>> & Omit<{
808
+ status: "pending" | "paid" | "waived" | "reversed";
809
+ splits: string[];
810
+ grossAmount?: number | null | undefined;
811
+ netAmount?: number | null | undefined;
812
+ rate?: number | null | undefined;
813
+ gatewayFeeRate?: number | null | undefined;
814
+ gatewayFeeAmount?: number | null | undefined;
815
+ affiliate?: {
816
+ recipientId?: string | null | undefined;
817
+ grossAmount?: number | null | undefined;
818
+ netAmount?: number | null | undefined;
819
+ rate?: number | null | undefined;
820
+ recipientType?: "user" | "organization" | "partner" | null | undefined;
821
+ } | null | undefined;
822
+ } & {
823
+ _id: mongoose.Types.ObjectId;
824
+ } & {
825
+ __v: number;
826
+ }, "id"> & {
827
+ id: string;
828
+ }, {
829
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
830
+ } | {
831
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
832
+ status: "pending" | "paid" | "waived" | "reversed";
833
+ splits: string[];
834
+ grossAmount?: number | null | undefined;
835
+ netAmount?: number | null | undefined;
836
+ rate?: number | null | undefined;
837
+ gatewayFeeRate?: number | null | undefined;
838
+ gatewayFeeAmount?: number | null | undefined;
839
+ affiliate?: {
840
+ recipientId?: string | null | undefined;
841
+ grossAmount?: number | null | undefined;
842
+ netAmount?: number | null | undefined;
843
+ rate?: number | null | undefined;
844
+ recipientType?: "user" | "organization" | "partner" | null | undefined;
845
+ } | null | undefined;
846
+ }, {
847
+ id: string;
848
+ }, mongoose.ResolveSchemaOptions<{
849
+ _id: false;
850
+ }>> & Omit<{
851
+ status: "pending" | "paid" | "waived" | "reversed";
852
+ splits: string[];
853
+ grossAmount?: number | null | undefined;
854
+ netAmount?: number | null | undefined;
855
+ rate?: number | null | undefined;
856
+ gatewayFeeRate?: number | null | undefined;
857
+ gatewayFeeAmount?: number | null | undefined;
858
+ affiliate?: {
859
+ recipientId?: string | null | undefined;
860
+ grossAmount?: number | null | undefined;
861
+ netAmount?: number | null | undefined;
862
+ rate?: number | null | undefined;
863
+ recipientType?: "user" | "organization" | "partner" | null | undefined;
864
+ } | null | undefined;
865
+ } & {
866
+ _id: mongoose.Types.ObjectId;
867
+ } & {
868
+ __v: number;
869
+ }, "id"> & {
870
+ id: string;
871
+ }> | undefined;
872
+ }, {
873
+ status: "pending" | "paid" | "waived" | "reversed";
874
+ splits: string[];
875
+ grossAmount?: number | null | undefined;
876
+ netAmount?: number | null | undefined;
877
+ rate?: number | null | undefined;
878
+ gatewayFeeRate?: number | null | undefined;
879
+ gatewayFeeAmount?: number | null | undefined;
880
+ affiliate?: {
881
+ recipientId?: string | null | undefined;
882
+ grossAmount?: number | null | undefined;
883
+ netAmount?: number | null | undefined;
884
+ rate?: number | null | undefined;
885
+ recipientType?: "user" | "organization" | "partner" | null | undefined;
886
+ } | null | undefined;
887
+ } & {
888
+ _id: mongoose.Types.ObjectId;
889
+ } & {
890
+ __v: number;
891
+ }>;
892
+ };
893
+
894
+ export { _default as default };