@classytic/revenue 0.2.4 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +4362 -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 +906 -0
  19. package/dist/schemas/index.js +533 -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-CETjPq10.d.ts +976 -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,906 @@
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-CETjPq10.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
+ refundedAmount: number;
372
+ transactionId?: mongoose.Types.ObjectId | null | undefined;
373
+ amount?: number | null | undefined;
374
+ method?: string | null | undefined;
375
+ verifiedAt?: NativeDate | null | undefined;
376
+ verifiedBy?: mongoose.Types.ObjectId | null | undefined;
377
+ refundedAt?: NativeDate | null | undefined;
378
+ reference?: string | null | undefined;
379
+ }, mongoose.Document<unknown, {}, {
380
+ status: "pending" | "verified" | "failed" | "cancelled" | "refunded";
381
+ refundedAmount: number;
382
+ transactionId?: mongoose.Types.ObjectId | null | undefined;
383
+ amount?: number | null | undefined;
384
+ method?: string | null | undefined;
385
+ verifiedAt?: NativeDate | null | undefined;
386
+ verifiedBy?: mongoose.Types.ObjectId | null | undefined;
387
+ refundedAt?: NativeDate | null | undefined;
388
+ reference?: string | null | undefined;
389
+ }, {
390
+ id: string;
391
+ }, mongoose.ResolveSchemaOptions<{
392
+ _id: false;
393
+ }>> & Omit<{
394
+ status: "pending" | "verified" | "failed" | "cancelled" | "refunded";
395
+ refundedAmount: number;
396
+ transactionId?: mongoose.Types.ObjectId | null | undefined;
397
+ amount?: number | null | undefined;
398
+ method?: string | null | undefined;
399
+ verifiedAt?: NativeDate | null | undefined;
400
+ verifiedBy?: mongoose.Types.ObjectId | null | undefined;
401
+ refundedAt?: NativeDate | null | undefined;
402
+ reference?: string | null | undefined;
403
+ } & {
404
+ _id: mongoose.Types.ObjectId;
405
+ } & {
406
+ __v: number;
407
+ }, "id"> & {
408
+ id: string;
409
+ }, {
410
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
411
+ } | {
412
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
413
+ status: "pending" | "verified" | "failed" | "cancelled" | "refunded";
414
+ refundedAmount: number;
415
+ transactionId?: mongoose.Types.ObjectId | null | undefined;
416
+ amount?: number | null | undefined;
417
+ method?: string | null | undefined;
418
+ verifiedAt?: NativeDate | null | undefined;
419
+ verifiedBy?: mongoose.Types.ObjectId | null | undefined;
420
+ refundedAt?: NativeDate | null | undefined;
421
+ reference?: string | null | undefined;
422
+ }, {
423
+ id: string;
424
+ }, mongoose.ResolveSchemaOptions<{
425
+ _id: false;
426
+ }>> & Omit<{
427
+ status: "pending" | "verified" | "failed" | "cancelled" | "refunded";
428
+ refundedAmount: number;
429
+ transactionId?: mongoose.Types.ObjectId | null | undefined;
430
+ amount?: number | null | undefined;
431
+ method?: string | null | undefined;
432
+ verifiedAt?: NativeDate | null | undefined;
433
+ verifiedBy?: mongoose.Types.ObjectId | null | undefined;
434
+ refundedAt?: NativeDate | null | undefined;
435
+ reference?: string | null | undefined;
436
+ } & {
437
+ _id: mongoose.Types.ObjectId;
438
+ } & {
439
+ __v: number;
440
+ }, "id"> & {
441
+ id: string;
442
+ }> | undefined;
443
+ }, {
444
+ status: "pending" | "verified" | "failed" | "cancelled" | "refunded";
445
+ refundedAmount: number;
446
+ transactionId?: mongoose.Types.ObjectId | null | undefined;
447
+ amount?: number | null | undefined;
448
+ method?: string | null | undefined;
449
+ verifiedAt?: NativeDate | null | undefined;
450
+ verifiedBy?: mongoose.Types.ObjectId | null | undefined;
451
+ refundedAt?: NativeDate | null | undefined;
452
+ reference?: string | null | undefined;
453
+ } & {
454
+ _id: mongoose.Types.ObjectId;
455
+ } & {
456
+ __v: number;
457
+ }>;
458
+ paymentSummarySchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
459
+ _id: false;
460
+ }, {
461
+ totalPayments: number;
462
+ totalAmountPaid: number;
463
+ lastPaymentDate?: NativeDate | null | undefined;
464
+ lastPaymentAmount?: number | null | undefined;
465
+ }, mongoose.Document<unknown, {}, {
466
+ totalPayments: number;
467
+ totalAmountPaid: number;
468
+ lastPaymentDate?: NativeDate | null | undefined;
469
+ lastPaymentAmount?: number | null | undefined;
470
+ }, {
471
+ id: string;
472
+ }, mongoose.ResolveSchemaOptions<{
473
+ _id: false;
474
+ }>> & Omit<{
475
+ totalPayments: number;
476
+ totalAmountPaid: number;
477
+ lastPaymentDate?: NativeDate | null | undefined;
478
+ lastPaymentAmount?: number | null | undefined;
479
+ } & {
480
+ _id: mongoose.Types.ObjectId;
481
+ } & {
482
+ __v: number;
483
+ }, "id"> & {
484
+ id: string;
485
+ }, {
486
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
487
+ } | {
488
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
489
+ totalPayments: number;
490
+ totalAmountPaid: number;
491
+ lastPaymentDate?: NativeDate | null | undefined;
492
+ lastPaymentAmount?: number | null | undefined;
493
+ }, {
494
+ id: string;
495
+ }, mongoose.ResolveSchemaOptions<{
496
+ _id: false;
497
+ }>> & Omit<{
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
+ }, "id"> & {
507
+ id: string;
508
+ }> | undefined;
509
+ }, {
510
+ totalPayments: number;
511
+ totalAmountPaid: number;
512
+ lastPaymentDate?: NativeDate | null | undefined;
513
+ lastPaymentAmount?: number | null | undefined;
514
+ } & {
515
+ _id: mongoose.Types.ObjectId;
516
+ } & {
517
+ __v: number;
518
+ }>;
519
+ paymentDetailsSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
520
+ _id: false;
521
+ }, {
522
+ provider?: string | null | undefined;
523
+ walletNumber?: string | null | undefined;
524
+ walletType?: string | null | undefined;
525
+ trxId?: string | null | undefined;
526
+ bankName?: string | null | undefined;
527
+ accountNumber?: string | null | undefined;
528
+ accountName?: string | null | undefined;
529
+ proofUrl?: string | null | undefined;
530
+ }, mongoose.Document<unknown, {}, {
531
+ provider?: string | null | undefined;
532
+ walletNumber?: string | null | undefined;
533
+ walletType?: string | null | undefined;
534
+ trxId?: string | null | undefined;
535
+ bankName?: string | null | undefined;
536
+ accountNumber?: string | null | undefined;
537
+ accountName?: string | null | undefined;
538
+ proofUrl?: string | null | undefined;
539
+ }, {
540
+ id: string;
541
+ }, mongoose.ResolveSchemaOptions<{
542
+ _id: false;
543
+ }>> & Omit<{
544
+ provider?: string | null | undefined;
545
+ walletNumber?: string | null | undefined;
546
+ walletType?: string | null | undefined;
547
+ trxId?: string | null | undefined;
548
+ bankName?: string | null | undefined;
549
+ accountNumber?: string | null | undefined;
550
+ accountName?: string | null | undefined;
551
+ proofUrl?: string | null | undefined;
552
+ } & {
553
+ _id: mongoose.Types.ObjectId;
554
+ } & {
555
+ __v: number;
556
+ }, "id"> & {
557
+ id: string;
558
+ }, {
559
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
560
+ } | {
561
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
562
+ provider?: string | null | undefined;
563
+ walletNumber?: string | null | undefined;
564
+ walletType?: string | null | undefined;
565
+ trxId?: string | null | undefined;
566
+ bankName?: string | null | undefined;
567
+ accountNumber?: string | null | undefined;
568
+ accountName?: string | null | undefined;
569
+ proofUrl?: string | null | undefined;
570
+ }, {
571
+ id: string;
572
+ }, mongoose.ResolveSchemaOptions<{
573
+ _id: false;
574
+ }>> & Omit<{
575
+ provider?: string | null | undefined;
576
+ walletNumber?: string | null | undefined;
577
+ walletType?: string | null | undefined;
578
+ trxId?: string | null | undefined;
579
+ bankName?: string | null | undefined;
580
+ accountNumber?: string | null | undefined;
581
+ accountName?: string | null | undefined;
582
+ proofUrl?: string | null | undefined;
583
+ } & {
584
+ _id: mongoose.Types.ObjectId;
585
+ } & {
586
+ __v: number;
587
+ }, "id"> & {
588
+ id: string;
589
+ }> | undefined;
590
+ }, {
591
+ provider?: string | null | undefined;
592
+ walletNumber?: string | null | undefined;
593
+ walletType?: string | null | undefined;
594
+ trxId?: string | null | undefined;
595
+ bankName?: string | null | undefined;
596
+ accountNumber?: string | null | undefined;
597
+ accountName?: string | null | undefined;
598
+ proofUrl?: string | null | undefined;
599
+ } & {
600
+ _id: mongoose.Types.ObjectId;
601
+ } & {
602
+ __v: number;
603
+ }>;
604
+ tenantSnapshotSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
605
+ _id: false;
606
+ }, {
607
+ paymentInstructions?: string | null | undefined;
608
+ bkashNumber?: string | null | undefined;
609
+ nagadNumber?: string | null | undefined;
610
+ bankAccount?: string | null | undefined;
611
+ }, mongoose.Document<unknown, {}, {
612
+ paymentInstructions?: string | null | undefined;
613
+ bkashNumber?: string | null | undefined;
614
+ nagadNumber?: string | null | undefined;
615
+ bankAccount?: string | null | undefined;
616
+ }, {
617
+ id: string;
618
+ }, mongoose.ResolveSchemaOptions<{
619
+ _id: false;
620
+ }>> & Omit<{
621
+ paymentInstructions?: string | null | undefined;
622
+ bkashNumber?: string | null | undefined;
623
+ nagadNumber?: string | null | undefined;
624
+ bankAccount?: string | null | undefined;
625
+ } & {
626
+ _id: mongoose.Types.ObjectId;
627
+ } & {
628
+ __v: number;
629
+ }, "id"> & {
630
+ id: string;
631
+ }, {
632
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
633
+ } | {
634
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
635
+ paymentInstructions?: string | null | undefined;
636
+ bkashNumber?: string | null | undefined;
637
+ nagadNumber?: string | null | undefined;
638
+ bankAccount?: string | null | undefined;
639
+ }, {
640
+ id: string;
641
+ }, mongoose.ResolveSchemaOptions<{
642
+ _id: false;
643
+ }>> & Omit<{
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
+ }, "id"> & {
653
+ id: string;
654
+ }> | undefined;
655
+ }, {
656
+ paymentInstructions?: string | null | undefined;
657
+ bkashNumber?: string | null | undefined;
658
+ nagadNumber?: string | null | undefined;
659
+ bankAccount?: string | null | undefined;
660
+ } & {
661
+ _id: mongoose.Types.ObjectId;
662
+ } & {
663
+ __v: number;
664
+ }>;
665
+ baseMetadataSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
666
+ _id: false;
667
+ strict: false;
668
+ }, {}, mongoose.Document<unknown, {}, {}, {
669
+ id: string;
670
+ }, mongoose.ResolveSchemaOptions<{
671
+ _id: false;
672
+ strict: false;
673
+ }>> & Omit<Required<{
674
+ _id: unknown;
675
+ }> & {
676
+ __v: number;
677
+ }, "id"> & {
678
+ id: string;
679
+ }, {
680
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
681
+ } | {
682
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {}, {
683
+ id: string;
684
+ }, mongoose.ResolveSchemaOptions<{
685
+ _id: false;
686
+ strict: false;
687
+ }>> & Omit<Required<{
688
+ _id: unknown;
689
+ }> & {
690
+ __v: number;
691
+ }, "id"> & {
692
+ id: string;
693
+ }> | undefined;
694
+ }, {} & Required<{
695
+ _id: unknown;
696
+ }> & {
697
+ __v: number;
698
+ }>;
699
+ referenceSchema: {
700
+ referenceId: {
701
+ type: typeof mongoose.Schema.Types.ObjectId;
702
+ refPath: string;
703
+ index: boolean;
704
+ };
705
+ referenceModel: {
706
+ type: StringConstructor;
707
+ enum: string[];
708
+ };
709
+ };
710
+ gatewaySchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
711
+ _id: false;
712
+ }, {
713
+ type: string;
714
+ metadata: any;
715
+ sessionId?: string | null | undefined;
716
+ paymentIntentId?: string | null | undefined;
717
+ provider?: string | null | undefined;
718
+ verificationData?: any;
719
+ }, mongoose.Document<unknown, {}, {
720
+ type: string;
721
+ metadata: any;
722
+ sessionId?: string | null | undefined;
723
+ paymentIntentId?: string | null | undefined;
724
+ provider?: string | null | undefined;
725
+ verificationData?: any;
726
+ }, {
727
+ id: string;
728
+ }, mongoose.ResolveSchemaOptions<{
729
+ _id: false;
730
+ }>> & Omit<{
731
+ type: string;
732
+ metadata: any;
733
+ sessionId?: string | null | undefined;
734
+ paymentIntentId?: string | null | undefined;
735
+ provider?: string | null | undefined;
736
+ verificationData?: any;
737
+ } & {
738
+ _id: mongoose.Types.ObjectId;
739
+ } & {
740
+ __v: number;
741
+ }, "id"> & {
742
+ id: string;
743
+ }, {
744
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
745
+ } | {
746
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
747
+ type: string;
748
+ metadata: any;
749
+ sessionId?: string | null | undefined;
750
+ paymentIntentId?: string | null | undefined;
751
+ provider?: string | null | undefined;
752
+ verificationData?: any;
753
+ }, {
754
+ id: string;
755
+ }, mongoose.ResolveSchemaOptions<{
756
+ _id: false;
757
+ }>> & Omit<{
758
+ type: string;
759
+ metadata: any;
760
+ sessionId?: string | null | undefined;
761
+ paymentIntentId?: string | null | undefined;
762
+ provider?: string | null | undefined;
763
+ verificationData?: any;
764
+ } & {
765
+ _id: mongoose.Types.ObjectId;
766
+ } & {
767
+ __v: number;
768
+ }, "id"> & {
769
+ id: string;
770
+ }> | undefined;
771
+ }, {
772
+ type: string;
773
+ metadata: any;
774
+ sessionId?: string | null | undefined;
775
+ paymentIntentId?: string | null | undefined;
776
+ provider?: string | null | undefined;
777
+ verificationData?: any;
778
+ } & {
779
+ _id: mongoose.Types.ObjectId;
780
+ } & {
781
+ __v: number;
782
+ }>;
783
+ commissionSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
784
+ _id: false;
785
+ }, {
786
+ status: "pending" | "paid" | "waived" | "reversed";
787
+ splits: string[];
788
+ grossAmount?: number | null | undefined;
789
+ netAmount?: number | null | undefined;
790
+ rate?: number | null | undefined;
791
+ gatewayFeeRate?: number | null | undefined;
792
+ gatewayFeeAmount?: number | null | undefined;
793
+ affiliate?: {
794
+ recipientId?: string | null | undefined;
795
+ grossAmount?: number | null | undefined;
796
+ netAmount?: number | null | undefined;
797
+ rate?: number | null | undefined;
798
+ recipientType?: "user" | "organization" | "partner" | null | undefined;
799
+ } | null | undefined;
800
+ }, mongoose.Document<unknown, {}, {
801
+ status: "pending" | "paid" | "waived" | "reversed";
802
+ splits: string[];
803
+ grossAmount?: number | null | undefined;
804
+ netAmount?: number | null | undefined;
805
+ rate?: number | null | undefined;
806
+ gatewayFeeRate?: number | null | undefined;
807
+ gatewayFeeAmount?: number | null | undefined;
808
+ affiliate?: {
809
+ recipientId?: string | null | undefined;
810
+ grossAmount?: number | null | undefined;
811
+ netAmount?: number | null | undefined;
812
+ rate?: number | null | undefined;
813
+ recipientType?: "user" | "organization" | "partner" | null | undefined;
814
+ } | null | undefined;
815
+ }, {
816
+ id: string;
817
+ }, mongoose.ResolveSchemaOptions<{
818
+ _id: false;
819
+ }>> & Omit<{
820
+ status: "pending" | "paid" | "waived" | "reversed";
821
+ splits: string[];
822
+ grossAmount?: number | null | undefined;
823
+ netAmount?: number | null | undefined;
824
+ rate?: number | null | undefined;
825
+ gatewayFeeRate?: number | null | undefined;
826
+ gatewayFeeAmount?: number | null | undefined;
827
+ affiliate?: {
828
+ recipientId?: string | null | undefined;
829
+ grossAmount?: number | null | undefined;
830
+ netAmount?: number | null | undefined;
831
+ rate?: number | null | undefined;
832
+ recipientType?: "user" | "organization" | "partner" | null | undefined;
833
+ } | null | undefined;
834
+ } & {
835
+ _id: mongoose.Types.ObjectId;
836
+ } & {
837
+ __v: number;
838
+ }, "id"> & {
839
+ id: string;
840
+ }, {
841
+ [path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
842
+ } | {
843
+ [x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
844
+ status: "pending" | "paid" | "waived" | "reversed";
845
+ splits: string[];
846
+ grossAmount?: number | null | undefined;
847
+ netAmount?: number | null | undefined;
848
+ rate?: number | null | undefined;
849
+ gatewayFeeRate?: number | null | undefined;
850
+ gatewayFeeAmount?: number | null | undefined;
851
+ affiliate?: {
852
+ recipientId?: string | null | undefined;
853
+ grossAmount?: number | null | undefined;
854
+ netAmount?: number | null | undefined;
855
+ rate?: number | null | undefined;
856
+ recipientType?: "user" | "organization" | "partner" | null | undefined;
857
+ } | null | undefined;
858
+ }, {
859
+ id: string;
860
+ }, mongoose.ResolveSchemaOptions<{
861
+ _id: false;
862
+ }>> & Omit<{
863
+ status: "pending" | "paid" | "waived" | "reversed";
864
+ splits: string[];
865
+ grossAmount?: number | null | undefined;
866
+ netAmount?: number | null | undefined;
867
+ rate?: number | null | undefined;
868
+ gatewayFeeRate?: number | null | undefined;
869
+ gatewayFeeAmount?: number | null | undefined;
870
+ affiliate?: {
871
+ recipientId?: string | null | undefined;
872
+ grossAmount?: number | null | undefined;
873
+ netAmount?: number | null | undefined;
874
+ rate?: number | null | undefined;
875
+ recipientType?: "user" | "organization" | "partner" | null | undefined;
876
+ } | null | undefined;
877
+ } & {
878
+ _id: mongoose.Types.ObjectId;
879
+ } & {
880
+ __v: number;
881
+ }, "id"> & {
882
+ id: string;
883
+ }> | undefined;
884
+ }, {
885
+ status: "pending" | "paid" | "waived" | "reversed";
886
+ splits: string[];
887
+ grossAmount?: number | null | undefined;
888
+ netAmount?: number | null | undefined;
889
+ rate?: number | null | undefined;
890
+ gatewayFeeRate?: number | null | undefined;
891
+ gatewayFeeAmount?: number | null | undefined;
892
+ affiliate?: {
893
+ recipientId?: string | null | undefined;
894
+ grossAmount?: number | null | undefined;
895
+ netAmount?: number | null | undefined;
896
+ rate?: number | null | undefined;
897
+ recipientType?: "user" | "organization" | "partner" | null | undefined;
898
+ } | null | undefined;
899
+ } & {
900
+ _id: mongoose.Types.ObjectId;
901
+ } & {
902
+ __v: number;
903
+ }>;
904
+ };
905
+
906
+ export { _default as default };