@classytic/revenue 1.0.2 → 1.1.2
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 +603 -486
- package/dist/application/services/index.d.ts +6 -0
- package/dist/application/services/index.js +3288 -0
- package/dist/application/services/index.js.map +1 -0
- package/dist/core/events.d.ts +455 -0
- package/dist/core/events.js +122 -0
- package/dist/core/events.js.map +1 -0
- package/dist/core/index.d.ts +12 -889
- package/dist/core/index.js +2361 -705
- package/dist/core/index.js.map +1 -1
- package/dist/enums/index.d.ts +54 -25
- package/dist/enums/index.js +143 -14
- package/dist/enums/index.js.map +1 -1
- package/dist/escrow.enums-CE0VQsfe.d.ts +76 -0
- package/dist/{index-BnJWVXuw.d.ts → index-DxIK0UmZ.d.ts} +281 -26
- package/dist/index-EnfKzDbs.d.ts +806 -0
- package/dist/{index-ChVD3P9k.d.ts → index-cLJBLUvx.d.ts} +55 -81
- package/dist/index.d.ts +16 -15
- package/dist/index.js +2583 -2066
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/plugins/index.d.ts +267 -0
- package/dist/infrastructure/plugins/index.js +292 -0
- package/dist/infrastructure/plugins/index.js.map +1 -0
- package/dist/money-widWVD7r.d.ts +111 -0
- package/dist/payment.enums-C1BiGlRa.d.ts +69 -0
- package/dist/plugin-Bb9HOE10.d.ts +336 -0
- package/dist/providers/index.d.ts +19 -6
- package/dist/providers/index.js +22 -3
- package/dist/providers/index.js.map +1 -1
- package/dist/reconciliation/index.d.ts +215 -0
- package/dist/reconciliation/index.js +140 -0
- package/dist/reconciliation/index.js.map +1 -0
- package/dist/{retry-80lBCmSe.d.ts → retry-D4hFUwVk.d.ts} +1 -41
- package/dist/schemas/index.d.ts +1927 -166
- package/dist/schemas/index.js +357 -40
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/validation.d.ts +87 -12
- package/dist/schemas/validation.js +71 -17
- package/dist/schemas/validation.js.map +1 -1
- package/dist/settlement.enums-ByC1x0ye.d.ts +130 -0
- package/dist/settlement.schema-CpamV7ZY.d.ts +343 -0
- package/dist/split.enums-DG3TxQf9.d.ts +42 -0
- package/dist/tax-CV8A0sxl.d.ts +60 -0
- package/dist/utils/index.d.ts +487 -13
- package/dist/utils/index.js +370 -235
- package/dist/utils/index.js.map +1 -1
- package/package.json +27 -13
- package/dist/actions-CwG-b7fR.d.ts +0 -519
- package/dist/services/index.d.ts +0 -3
- package/dist/services/index.js +0 -1632
- package/dist/services/index.js.map +0 -1
- package/dist/split.enums-Bh24jw8p.d.ts +0 -255
- package/dist/split.schema-DYVP7Wu2.d.ts +0 -958
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1,57 +1,1594 @@
|
|
|
1
|
+
import * as bson from 'bson';
|
|
2
|
+
import { P as PaymentStatusValue } from '../payment.enums-C1BiGlRa.js';
|
|
3
|
+
import { P as PlanKeyValue, S as SubscriptionStatusValue, H as HoldStatusValue, b as HoldReasonValue } from '../escrow.enums-CE0VQsfe.js';
|
|
4
|
+
import { S as SplitTypeValue, a as SplitStatusValue, P as PayoutMethodValue } from '../split.enums-DG3TxQf9.js';
|
|
1
5
|
import * as mongoose from 'mongoose';
|
|
2
|
-
|
|
6
|
+
import { Schema } from 'mongoose';
|
|
7
|
+
export { S as SettlementDocument, s as settlementSchema } from '../settlement.schema-CpamV7ZY.js';
|
|
3
8
|
|
|
4
|
-
|
|
5
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Base metadata schema for transactions
|
|
11
|
+
*/
|
|
12
|
+
declare const baseMetadataSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
13
|
+
_id: false;
|
|
14
|
+
strict: false;
|
|
15
|
+
}, {}, mongoose.Document<unknown, {}, {}, {
|
|
16
|
+
id: string;
|
|
17
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
18
|
+
_id: false;
|
|
19
|
+
strict: false;
|
|
20
|
+
}>> & Omit<Required<{
|
|
21
|
+
_id: unknown;
|
|
22
|
+
}> & {
|
|
23
|
+
__v: number;
|
|
24
|
+
}, "id"> & {
|
|
25
|
+
id: string;
|
|
26
|
+
}, {
|
|
27
|
+
[path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
|
|
28
|
+
} | {
|
|
29
|
+
[x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {}, {
|
|
30
|
+
id: string;
|
|
31
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
32
|
+
_id: false;
|
|
33
|
+
strict: false;
|
|
34
|
+
}>> & Omit<Required<{
|
|
35
|
+
_id: unknown;
|
|
36
|
+
}> & {
|
|
37
|
+
__v: number;
|
|
38
|
+
}, "id"> & {
|
|
39
|
+
id: string;
|
|
40
|
+
}> | undefined;
|
|
41
|
+
}, {} & Required<{
|
|
42
|
+
_id: unknown;
|
|
43
|
+
}> & {
|
|
44
|
+
__v: number;
|
|
45
|
+
}>;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Gateway Schema - Embedded in Transaction
|
|
49
|
+
* Tracks payment gateway details
|
|
50
|
+
*/
|
|
51
|
+
declare const gatewaySchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
52
|
+
_id: false;
|
|
53
|
+
}, {
|
|
54
|
+
type: string;
|
|
55
|
+
metadata: any;
|
|
56
|
+
provider?: string | null | undefined;
|
|
57
|
+
sessionId?: string | null | undefined;
|
|
58
|
+
paymentIntentId?: string | null | undefined;
|
|
59
|
+
verificationData?: any;
|
|
60
|
+
}, mongoose.Document<unknown, {}, {
|
|
61
|
+
type: string;
|
|
62
|
+
metadata: any;
|
|
63
|
+
provider?: string | null | undefined;
|
|
64
|
+
sessionId?: string | null | undefined;
|
|
65
|
+
paymentIntentId?: string | null | undefined;
|
|
66
|
+
verificationData?: any;
|
|
67
|
+
}, {
|
|
68
|
+
id: string;
|
|
69
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
70
|
+
_id: false;
|
|
71
|
+
}>> & Omit<{
|
|
72
|
+
type: string;
|
|
73
|
+
metadata: any;
|
|
74
|
+
provider?: string | null | undefined;
|
|
75
|
+
sessionId?: string | null | undefined;
|
|
76
|
+
paymentIntentId?: string | null | undefined;
|
|
77
|
+
verificationData?: any;
|
|
78
|
+
} & {
|
|
79
|
+
_id: mongoose.Types.ObjectId;
|
|
80
|
+
} & {
|
|
81
|
+
__v: number;
|
|
82
|
+
}, "id"> & {
|
|
83
|
+
id: string;
|
|
84
|
+
}, {
|
|
85
|
+
[path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
|
|
86
|
+
} | {
|
|
87
|
+
[x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
|
|
88
|
+
type: string;
|
|
89
|
+
metadata: any;
|
|
90
|
+
provider?: string | null | undefined;
|
|
91
|
+
sessionId?: string | null | undefined;
|
|
92
|
+
paymentIntentId?: string | null | undefined;
|
|
93
|
+
verificationData?: any;
|
|
94
|
+
}, {
|
|
95
|
+
id: string;
|
|
96
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
97
|
+
_id: false;
|
|
98
|
+
}>> & Omit<{
|
|
99
|
+
type: string;
|
|
100
|
+
metadata: any;
|
|
101
|
+
provider?: string | null | undefined;
|
|
102
|
+
sessionId?: string | null | undefined;
|
|
103
|
+
paymentIntentId?: string | null | undefined;
|
|
104
|
+
verificationData?: any;
|
|
105
|
+
} & {
|
|
106
|
+
_id: mongoose.Types.ObjectId;
|
|
107
|
+
} & {
|
|
108
|
+
__v: number;
|
|
109
|
+
}, "id"> & {
|
|
110
|
+
id: string;
|
|
111
|
+
}> | undefined;
|
|
112
|
+
}, {
|
|
113
|
+
type: string;
|
|
114
|
+
metadata: any;
|
|
115
|
+
provider?: string | null | undefined;
|
|
116
|
+
sessionId?: string | null | undefined;
|
|
117
|
+
paymentIntentId?: string | null | undefined;
|
|
118
|
+
verificationData?: any;
|
|
119
|
+
} & {
|
|
120
|
+
_id: mongoose.Types.ObjectId;
|
|
121
|
+
} & {
|
|
122
|
+
__v: number;
|
|
123
|
+
}>;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Individual Payment Entry Schema
|
|
127
|
+
* For split/multi-payment scenarios (e.g., cash + bank + mobile wallet)
|
|
128
|
+
*
|
|
129
|
+
* Use in currentPaymentSchema.payments array
|
|
130
|
+
*/
|
|
131
|
+
declare const paymentEntrySchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
132
|
+
_id: false;
|
|
133
|
+
}, {
|
|
134
|
+
amount: number;
|
|
135
|
+
method: string;
|
|
136
|
+
reference?: string | null | undefined;
|
|
137
|
+
details?: any;
|
|
138
|
+
}, mongoose.Document<unknown, {}, {
|
|
139
|
+
amount: number;
|
|
140
|
+
method: string;
|
|
141
|
+
reference?: string | null | undefined;
|
|
142
|
+
details?: any;
|
|
143
|
+
}, {
|
|
144
|
+
id: string;
|
|
145
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
146
|
+
_id: false;
|
|
147
|
+
}>> & Omit<{
|
|
148
|
+
amount: number;
|
|
149
|
+
method: string;
|
|
150
|
+
reference?: string | null | undefined;
|
|
151
|
+
details?: any;
|
|
152
|
+
} & {
|
|
153
|
+
_id: mongoose.Types.ObjectId;
|
|
154
|
+
} & {
|
|
155
|
+
__v: number;
|
|
156
|
+
}, "id"> & {
|
|
157
|
+
id: string;
|
|
158
|
+
}, {
|
|
159
|
+
[path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
|
|
160
|
+
} | {
|
|
161
|
+
[x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
|
|
162
|
+
amount: number;
|
|
163
|
+
method: string;
|
|
164
|
+
reference?: string | null | undefined;
|
|
165
|
+
details?: any;
|
|
166
|
+
}, {
|
|
167
|
+
id: string;
|
|
168
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
169
|
+
_id: false;
|
|
170
|
+
}>> & Omit<{
|
|
171
|
+
amount: number;
|
|
172
|
+
method: string;
|
|
173
|
+
reference?: string | null | undefined;
|
|
174
|
+
details?: any;
|
|
175
|
+
} & {
|
|
176
|
+
_id: mongoose.Types.ObjectId;
|
|
177
|
+
} & {
|
|
178
|
+
__v: number;
|
|
179
|
+
}, "id"> & {
|
|
180
|
+
id: string;
|
|
181
|
+
}> | undefined;
|
|
182
|
+
}, {
|
|
183
|
+
amount: number;
|
|
184
|
+
method: string;
|
|
185
|
+
reference?: string | null | undefined;
|
|
186
|
+
details?: any;
|
|
187
|
+
} & {
|
|
188
|
+
_id: mongoose.Types.ObjectId;
|
|
189
|
+
} & {
|
|
190
|
+
__v: number;
|
|
191
|
+
}>;
|
|
192
|
+
/**
|
|
193
|
+
* Current Payment Schema
|
|
194
|
+
* Use this in your model: currentPayment: { type: currentPaymentSchema }
|
|
195
|
+
*
|
|
196
|
+
* Tracks the latest payment transaction for an entity
|
|
197
|
+
* Supports both single payments and multi-payment (split) scenarios
|
|
198
|
+
*/
|
|
199
|
+
declare const currentPaymentSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
200
|
+
_id: false;
|
|
201
|
+
}, {
|
|
202
|
+
status: PaymentStatusValue;
|
|
203
|
+
amount?: number | null | undefined;
|
|
204
|
+
transactionId?: mongoose.Types.ObjectId | null | undefined;
|
|
205
|
+
method?: string | null | undefined;
|
|
206
|
+
reference?: string | null | undefined;
|
|
207
|
+
payments?: mongoose.Types.DocumentArray<{
|
|
208
|
+
amount: number;
|
|
209
|
+
method: string;
|
|
210
|
+
reference?: string | null | undefined;
|
|
211
|
+
details?: any;
|
|
212
|
+
}, mongoose.Types.Subdocument<bson.ObjectId, unknown, {
|
|
213
|
+
amount: number;
|
|
214
|
+
method: string;
|
|
215
|
+
reference?: string | null | undefined;
|
|
216
|
+
details?: any;
|
|
217
|
+
}> & {
|
|
218
|
+
amount: number;
|
|
219
|
+
method: string;
|
|
220
|
+
reference?: string | null | undefined;
|
|
221
|
+
details?: any;
|
|
222
|
+
}> | null | undefined;
|
|
223
|
+
verifiedAt?: NativeDate | null | undefined;
|
|
224
|
+
verifiedBy?: mongoose.Types.ObjectId | null | undefined;
|
|
225
|
+
}, mongoose.Document<unknown, {}, {
|
|
226
|
+
status: PaymentStatusValue;
|
|
227
|
+
amount?: number | null | undefined;
|
|
228
|
+
transactionId?: mongoose.Types.ObjectId | null | undefined;
|
|
229
|
+
method?: string | null | undefined;
|
|
230
|
+
reference?: string | null | undefined;
|
|
231
|
+
payments?: mongoose.Types.DocumentArray<{
|
|
232
|
+
amount: number;
|
|
233
|
+
method: string;
|
|
234
|
+
reference?: string | null | undefined;
|
|
235
|
+
details?: any;
|
|
236
|
+
}, mongoose.Types.Subdocument<bson.ObjectId, unknown, {
|
|
237
|
+
amount: number;
|
|
238
|
+
method: string;
|
|
239
|
+
reference?: string | null | undefined;
|
|
240
|
+
details?: any;
|
|
241
|
+
}> & {
|
|
242
|
+
amount: number;
|
|
243
|
+
method: string;
|
|
244
|
+
reference?: string | null | undefined;
|
|
245
|
+
details?: any;
|
|
246
|
+
}> | null | undefined;
|
|
247
|
+
verifiedAt?: NativeDate | null | undefined;
|
|
248
|
+
verifiedBy?: mongoose.Types.ObjectId | null | undefined;
|
|
249
|
+
}, {
|
|
250
|
+
id: string;
|
|
251
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
252
|
+
_id: false;
|
|
253
|
+
}>> & Omit<{
|
|
254
|
+
status: PaymentStatusValue;
|
|
255
|
+
amount?: number | null | undefined;
|
|
256
|
+
transactionId?: mongoose.Types.ObjectId | null | undefined;
|
|
257
|
+
method?: string | null | undefined;
|
|
258
|
+
reference?: string | null | undefined;
|
|
259
|
+
payments?: mongoose.Types.DocumentArray<{
|
|
260
|
+
amount: number;
|
|
261
|
+
method: string;
|
|
262
|
+
reference?: string | null | undefined;
|
|
263
|
+
details?: any;
|
|
264
|
+
}, mongoose.Types.Subdocument<bson.ObjectId, unknown, {
|
|
265
|
+
amount: number;
|
|
266
|
+
method: string;
|
|
267
|
+
reference?: string | null | undefined;
|
|
268
|
+
details?: any;
|
|
269
|
+
}> & {
|
|
270
|
+
amount: number;
|
|
271
|
+
method: string;
|
|
272
|
+
reference?: string | null | undefined;
|
|
273
|
+
details?: any;
|
|
274
|
+
}> | null | undefined;
|
|
275
|
+
verifiedAt?: NativeDate | null | undefined;
|
|
276
|
+
verifiedBy?: mongoose.Types.ObjectId | null | undefined;
|
|
277
|
+
} & {
|
|
278
|
+
_id: mongoose.Types.ObjectId;
|
|
279
|
+
} & {
|
|
280
|
+
__v: number;
|
|
281
|
+
}, "id"> & {
|
|
282
|
+
id: string;
|
|
283
|
+
}, {
|
|
284
|
+
[path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
|
|
285
|
+
} | {
|
|
286
|
+
[x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
|
|
287
|
+
status: PaymentStatusValue;
|
|
288
|
+
amount?: number | null | undefined;
|
|
289
|
+
transactionId?: mongoose.Types.ObjectId | null | undefined;
|
|
290
|
+
method?: string | null | undefined;
|
|
291
|
+
reference?: string | null | undefined;
|
|
292
|
+
payments?: mongoose.Types.DocumentArray<{
|
|
293
|
+
amount: number;
|
|
294
|
+
method: string;
|
|
295
|
+
reference?: string | null | undefined;
|
|
296
|
+
details?: any;
|
|
297
|
+
}, mongoose.Types.Subdocument<bson.ObjectId, unknown, {
|
|
298
|
+
amount: number;
|
|
299
|
+
method: string;
|
|
300
|
+
reference?: string | null | undefined;
|
|
301
|
+
details?: any;
|
|
302
|
+
}> & {
|
|
303
|
+
amount: number;
|
|
304
|
+
method: string;
|
|
305
|
+
reference?: string | null | undefined;
|
|
306
|
+
details?: any;
|
|
307
|
+
}> | null | undefined;
|
|
308
|
+
verifiedAt?: NativeDate | null | undefined;
|
|
309
|
+
verifiedBy?: mongoose.Types.ObjectId | null | undefined;
|
|
310
|
+
}, {
|
|
311
|
+
id: string;
|
|
312
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
313
|
+
_id: false;
|
|
314
|
+
}>> & Omit<{
|
|
315
|
+
status: PaymentStatusValue;
|
|
316
|
+
amount?: number | null | undefined;
|
|
317
|
+
transactionId?: mongoose.Types.ObjectId | null | undefined;
|
|
318
|
+
method?: string | null | undefined;
|
|
319
|
+
reference?: string | null | undefined;
|
|
320
|
+
payments?: mongoose.Types.DocumentArray<{
|
|
321
|
+
amount: number;
|
|
322
|
+
method: string;
|
|
323
|
+
reference?: string | null | undefined;
|
|
324
|
+
details?: any;
|
|
325
|
+
}, mongoose.Types.Subdocument<bson.ObjectId, unknown, {
|
|
326
|
+
amount: number;
|
|
327
|
+
method: string;
|
|
328
|
+
reference?: string | null | undefined;
|
|
329
|
+
details?: any;
|
|
330
|
+
}> & {
|
|
331
|
+
amount: number;
|
|
332
|
+
method: string;
|
|
333
|
+
reference?: string | null | undefined;
|
|
334
|
+
details?: any;
|
|
335
|
+
}> | null | undefined;
|
|
336
|
+
verifiedAt?: NativeDate | null | undefined;
|
|
337
|
+
verifiedBy?: mongoose.Types.ObjectId | null | undefined;
|
|
338
|
+
} & {
|
|
339
|
+
_id: mongoose.Types.ObjectId;
|
|
340
|
+
} & {
|
|
341
|
+
__v: number;
|
|
342
|
+
}, "id"> & {
|
|
343
|
+
id: string;
|
|
344
|
+
}> | undefined;
|
|
345
|
+
}, {
|
|
346
|
+
status: PaymentStatusValue;
|
|
347
|
+
amount?: number | null | undefined;
|
|
348
|
+
transactionId?: mongoose.Types.ObjectId | null | undefined;
|
|
349
|
+
method?: string | null | undefined;
|
|
350
|
+
reference?: string | null | undefined;
|
|
351
|
+
payments?: mongoose.Types.DocumentArray<{
|
|
352
|
+
amount: number;
|
|
353
|
+
method: string;
|
|
354
|
+
reference?: string | null | undefined;
|
|
355
|
+
details?: any;
|
|
356
|
+
}, mongoose.Types.Subdocument<bson.ObjectId, unknown, {
|
|
357
|
+
amount: number;
|
|
358
|
+
method: string;
|
|
359
|
+
reference?: string | null | undefined;
|
|
360
|
+
details?: any;
|
|
361
|
+
}> & {
|
|
362
|
+
amount: number;
|
|
363
|
+
method: string;
|
|
364
|
+
reference?: string | null | undefined;
|
|
365
|
+
details?: any;
|
|
366
|
+
}> | null | undefined;
|
|
367
|
+
verifiedAt?: NativeDate | null | undefined;
|
|
368
|
+
verifiedBy?: mongoose.Types.ObjectId | null | undefined;
|
|
369
|
+
} & {
|
|
370
|
+
_id: mongoose.Types.ObjectId;
|
|
371
|
+
} & {
|
|
372
|
+
__v: number;
|
|
373
|
+
}>;
|
|
374
|
+
/**
|
|
375
|
+
* Payment Summary Schema
|
|
376
|
+
* Use this in your model: paymentSummary: { type: paymentSummarySchema }
|
|
377
|
+
*
|
|
378
|
+
* Tracks payment history and totals
|
|
379
|
+
*/
|
|
380
|
+
declare const paymentSummarySchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
381
|
+
_id: false;
|
|
382
|
+
}, {
|
|
383
|
+
totalPayments: number;
|
|
384
|
+
totalAmountPaid: number;
|
|
385
|
+
lastPaymentDate?: NativeDate | null | undefined;
|
|
386
|
+
lastPaymentAmount?: number | null | undefined;
|
|
387
|
+
}, mongoose.Document<unknown, {}, {
|
|
388
|
+
totalPayments: number;
|
|
389
|
+
totalAmountPaid: number;
|
|
390
|
+
lastPaymentDate?: NativeDate | null | undefined;
|
|
391
|
+
lastPaymentAmount?: number | null | undefined;
|
|
392
|
+
}, {
|
|
393
|
+
id: string;
|
|
394
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
395
|
+
_id: false;
|
|
396
|
+
}>> & Omit<{
|
|
397
|
+
totalPayments: number;
|
|
398
|
+
totalAmountPaid: number;
|
|
399
|
+
lastPaymentDate?: NativeDate | null | undefined;
|
|
400
|
+
lastPaymentAmount?: number | null | undefined;
|
|
401
|
+
} & {
|
|
402
|
+
_id: mongoose.Types.ObjectId;
|
|
403
|
+
} & {
|
|
404
|
+
__v: number;
|
|
405
|
+
}, "id"> & {
|
|
406
|
+
id: string;
|
|
407
|
+
}, {
|
|
408
|
+
[path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
|
|
409
|
+
} | {
|
|
410
|
+
[x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
|
|
411
|
+
totalPayments: number;
|
|
412
|
+
totalAmountPaid: number;
|
|
413
|
+
lastPaymentDate?: NativeDate | null | undefined;
|
|
414
|
+
lastPaymentAmount?: number | null | undefined;
|
|
415
|
+
}, {
|
|
416
|
+
id: string;
|
|
417
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
418
|
+
_id: false;
|
|
419
|
+
}>> & Omit<{
|
|
420
|
+
totalPayments: number;
|
|
421
|
+
totalAmountPaid: number;
|
|
422
|
+
lastPaymentDate?: NativeDate | null | undefined;
|
|
423
|
+
lastPaymentAmount?: number | null | undefined;
|
|
424
|
+
} & {
|
|
425
|
+
_id: mongoose.Types.ObjectId;
|
|
426
|
+
} & {
|
|
427
|
+
__v: number;
|
|
428
|
+
}, "id"> & {
|
|
429
|
+
id: string;
|
|
430
|
+
}> | undefined;
|
|
431
|
+
}, {
|
|
432
|
+
totalPayments: number;
|
|
433
|
+
totalAmountPaid: number;
|
|
434
|
+
lastPaymentDate?: NativeDate | null | undefined;
|
|
435
|
+
lastPaymentAmount?: number | null | undefined;
|
|
436
|
+
} & {
|
|
437
|
+
_id: mongoose.Types.ObjectId;
|
|
438
|
+
} & {
|
|
439
|
+
__v: number;
|
|
440
|
+
}>;
|
|
441
|
+
/**
|
|
442
|
+
* Payment Details Schema (for manual payments)
|
|
443
|
+
* Embedded in Transaction model
|
|
444
|
+
*/
|
|
445
|
+
declare const paymentDetailsSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
446
|
+
_id: false;
|
|
447
|
+
}, {
|
|
448
|
+
provider?: string | null | undefined;
|
|
449
|
+
walletNumber?: string | null | undefined;
|
|
450
|
+
walletType?: string | null | undefined;
|
|
451
|
+
trxId?: string | null | undefined;
|
|
452
|
+
bankName?: string | null | undefined;
|
|
453
|
+
accountNumber?: string | null | undefined;
|
|
454
|
+
accountName?: string | null | undefined;
|
|
455
|
+
proofUrl?: string | null | undefined;
|
|
456
|
+
}, mongoose.Document<unknown, {}, {
|
|
457
|
+
provider?: string | null | undefined;
|
|
458
|
+
walletNumber?: string | null | undefined;
|
|
459
|
+
walletType?: string | null | undefined;
|
|
460
|
+
trxId?: string | null | undefined;
|
|
461
|
+
bankName?: string | null | undefined;
|
|
462
|
+
accountNumber?: string | null | undefined;
|
|
463
|
+
accountName?: string | null | undefined;
|
|
464
|
+
proofUrl?: string | null | undefined;
|
|
465
|
+
}, {
|
|
466
|
+
id: string;
|
|
467
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
468
|
+
_id: false;
|
|
469
|
+
}>> & Omit<{
|
|
470
|
+
provider?: string | null | undefined;
|
|
471
|
+
walletNumber?: string | null | undefined;
|
|
472
|
+
walletType?: string | null | undefined;
|
|
473
|
+
trxId?: string | null | undefined;
|
|
474
|
+
bankName?: string | null | undefined;
|
|
475
|
+
accountNumber?: string | null | undefined;
|
|
476
|
+
accountName?: string | null | undefined;
|
|
477
|
+
proofUrl?: string | null | undefined;
|
|
478
|
+
} & {
|
|
479
|
+
_id: mongoose.Types.ObjectId;
|
|
480
|
+
} & {
|
|
481
|
+
__v: number;
|
|
482
|
+
}, "id"> & {
|
|
483
|
+
id: string;
|
|
484
|
+
}, {
|
|
485
|
+
[path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
|
|
486
|
+
} | {
|
|
487
|
+
[x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
|
|
488
|
+
provider?: string | null | undefined;
|
|
489
|
+
walletNumber?: string | null | undefined;
|
|
490
|
+
walletType?: string | null | undefined;
|
|
491
|
+
trxId?: string | null | undefined;
|
|
492
|
+
bankName?: string | null | undefined;
|
|
493
|
+
accountNumber?: string | null | undefined;
|
|
494
|
+
accountName?: string | null | undefined;
|
|
495
|
+
proofUrl?: string | null | undefined;
|
|
496
|
+
}, {
|
|
497
|
+
id: string;
|
|
498
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
499
|
+
_id: false;
|
|
500
|
+
}>> & Omit<{
|
|
501
|
+
provider?: string | null | undefined;
|
|
502
|
+
walletNumber?: string | null | undefined;
|
|
503
|
+
walletType?: string | null | undefined;
|
|
504
|
+
trxId?: string | null | undefined;
|
|
505
|
+
bankName?: string | null | undefined;
|
|
506
|
+
accountNumber?: string | null | undefined;
|
|
507
|
+
accountName?: string | null | undefined;
|
|
508
|
+
proofUrl?: string | null | undefined;
|
|
509
|
+
} & {
|
|
510
|
+
_id: mongoose.Types.ObjectId;
|
|
511
|
+
} & {
|
|
512
|
+
__v: number;
|
|
513
|
+
}, "id"> & {
|
|
514
|
+
id: string;
|
|
515
|
+
}> | undefined;
|
|
516
|
+
}, {
|
|
517
|
+
provider?: string | null | undefined;
|
|
518
|
+
walletNumber?: string | null | undefined;
|
|
519
|
+
walletType?: string | null | undefined;
|
|
520
|
+
trxId?: string | null | undefined;
|
|
521
|
+
bankName?: string | null | undefined;
|
|
522
|
+
accountNumber?: string | null | undefined;
|
|
523
|
+
accountName?: string | null | undefined;
|
|
524
|
+
proofUrl?: string | null | undefined;
|
|
525
|
+
} & {
|
|
526
|
+
_id: mongoose.Types.ObjectId;
|
|
527
|
+
} & {
|
|
528
|
+
__v: number;
|
|
529
|
+
}>;
|
|
530
|
+
/**
|
|
531
|
+
* Tenant Snapshot Schema
|
|
532
|
+
* Captures organization payment details at transaction time (audit trail)
|
|
533
|
+
*/
|
|
534
|
+
declare const tenantSnapshotSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
535
|
+
_id: false;
|
|
536
|
+
}, {
|
|
537
|
+
paymentInstructions?: string | null | undefined;
|
|
538
|
+
bkashNumber?: string | null | undefined;
|
|
539
|
+
nagadNumber?: string | null | undefined;
|
|
540
|
+
bankAccount?: string | null | undefined;
|
|
541
|
+
}, mongoose.Document<unknown, {}, {
|
|
542
|
+
paymentInstructions?: string | null | undefined;
|
|
543
|
+
bkashNumber?: string | null | undefined;
|
|
544
|
+
nagadNumber?: string | null | undefined;
|
|
545
|
+
bankAccount?: string | null | undefined;
|
|
546
|
+
}, {
|
|
547
|
+
id: string;
|
|
548
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
549
|
+
_id: false;
|
|
550
|
+
}>> & Omit<{
|
|
551
|
+
paymentInstructions?: string | null | undefined;
|
|
552
|
+
bkashNumber?: string | null | undefined;
|
|
553
|
+
nagadNumber?: string | null | undefined;
|
|
554
|
+
bankAccount?: string | null | undefined;
|
|
555
|
+
} & {
|
|
556
|
+
_id: mongoose.Types.ObjectId;
|
|
557
|
+
} & {
|
|
558
|
+
__v: number;
|
|
559
|
+
}, "id"> & {
|
|
560
|
+
id: string;
|
|
561
|
+
}, {
|
|
562
|
+
[path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
|
|
563
|
+
} | {
|
|
564
|
+
[x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
|
|
565
|
+
paymentInstructions?: string | null | undefined;
|
|
566
|
+
bkashNumber?: string | null | undefined;
|
|
567
|
+
nagadNumber?: string | null | undefined;
|
|
568
|
+
bankAccount?: string | null | undefined;
|
|
569
|
+
}, {
|
|
570
|
+
id: string;
|
|
571
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
572
|
+
_id: false;
|
|
573
|
+
}>> & Omit<{
|
|
574
|
+
paymentInstructions?: string | null | undefined;
|
|
575
|
+
bkashNumber?: string | null | undefined;
|
|
576
|
+
nagadNumber?: string | null | undefined;
|
|
577
|
+
bankAccount?: string | null | undefined;
|
|
578
|
+
} & {
|
|
579
|
+
_id: mongoose.Types.ObjectId;
|
|
580
|
+
} & {
|
|
581
|
+
__v: number;
|
|
582
|
+
}, "id"> & {
|
|
583
|
+
id: string;
|
|
584
|
+
}> | undefined;
|
|
585
|
+
}, {
|
|
586
|
+
paymentInstructions?: string | null | undefined;
|
|
587
|
+
bkashNumber?: string | null | undefined;
|
|
588
|
+
nagadNumber?: string | null | undefined;
|
|
589
|
+
bankAccount?: string | null | undefined;
|
|
590
|
+
} & {
|
|
591
|
+
_id: mongoose.Types.ObjectId;
|
|
592
|
+
} & {
|
|
593
|
+
__v: number;
|
|
594
|
+
}>;
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* Commission Schema - Embedded in Transaction
|
|
598
|
+
* Tracks platform commission with gateway fee deduction
|
|
599
|
+
*
|
|
600
|
+
* Usage: commission: commissionSchema
|
|
601
|
+
*/
|
|
602
|
+
declare const commissionSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
603
|
+
_id: false;
|
|
604
|
+
}, {
|
|
605
|
+
splits: string[];
|
|
606
|
+
status: "pending" | "paid" | "waived" | "reversed";
|
|
607
|
+
gatewayFeeRate?: number | null | undefined;
|
|
608
|
+
rate?: number | null | undefined;
|
|
609
|
+
affiliate?: {
|
|
610
|
+
recipientId?: string | null | undefined;
|
|
611
|
+
recipientType?: "user" | "organization" | "partner" | null | undefined;
|
|
612
|
+
rate?: number | null | undefined;
|
|
613
|
+
grossAmount?: number | null | undefined;
|
|
614
|
+
netAmount?: number | null | undefined;
|
|
615
|
+
} | null | undefined;
|
|
616
|
+
grossAmount?: number | null | undefined;
|
|
617
|
+
gatewayFeeAmount?: number | null | undefined;
|
|
618
|
+
netAmount?: number | null | undefined;
|
|
619
|
+
}, mongoose.Document<unknown, {}, {
|
|
620
|
+
splits: string[];
|
|
621
|
+
status: "pending" | "paid" | "waived" | "reversed";
|
|
622
|
+
gatewayFeeRate?: number | null | undefined;
|
|
623
|
+
rate?: number | null | undefined;
|
|
624
|
+
affiliate?: {
|
|
625
|
+
recipientId?: string | null | undefined;
|
|
626
|
+
recipientType?: "user" | "organization" | "partner" | null | undefined;
|
|
627
|
+
rate?: number | null | undefined;
|
|
628
|
+
grossAmount?: number | null | undefined;
|
|
629
|
+
netAmount?: number | null | undefined;
|
|
630
|
+
} | null | undefined;
|
|
631
|
+
grossAmount?: number | null | undefined;
|
|
632
|
+
gatewayFeeAmount?: number | null | undefined;
|
|
633
|
+
netAmount?: number | null | undefined;
|
|
634
|
+
}, {
|
|
635
|
+
id: string;
|
|
636
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
637
|
+
_id: false;
|
|
638
|
+
}>> & Omit<{
|
|
639
|
+
splits: string[];
|
|
640
|
+
status: "pending" | "paid" | "waived" | "reversed";
|
|
641
|
+
gatewayFeeRate?: number | null | undefined;
|
|
642
|
+
rate?: number | null | undefined;
|
|
643
|
+
affiliate?: {
|
|
644
|
+
recipientId?: string | null | undefined;
|
|
645
|
+
recipientType?: "user" | "organization" | "partner" | null | undefined;
|
|
646
|
+
rate?: number | null | undefined;
|
|
647
|
+
grossAmount?: number | null | undefined;
|
|
648
|
+
netAmount?: number | null | undefined;
|
|
649
|
+
} | null | undefined;
|
|
650
|
+
grossAmount?: number | null | undefined;
|
|
651
|
+
gatewayFeeAmount?: number | null | undefined;
|
|
652
|
+
netAmount?: number | null | undefined;
|
|
653
|
+
} & {
|
|
654
|
+
_id: mongoose.Types.ObjectId;
|
|
655
|
+
} & {
|
|
656
|
+
__v: number;
|
|
657
|
+
}, "id"> & {
|
|
658
|
+
id: string;
|
|
659
|
+
}, {
|
|
660
|
+
[path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
|
|
661
|
+
} | {
|
|
662
|
+
[x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
|
|
663
|
+
splits: string[];
|
|
664
|
+
status: "pending" | "paid" | "waived" | "reversed";
|
|
665
|
+
gatewayFeeRate?: number | null | undefined;
|
|
666
|
+
rate?: number | null | undefined;
|
|
667
|
+
affiliate?: {
|
|
668
|
+
recipientId?: string | null | undefined;
|
|
669
|
+
recipientType?: "user" | "organization" | "partner" | null | undefined;
|
|
670
|
+
rate?: number | null | undefined;
|
|
671
|
+
grossAmount?: number | null | undefined;
|
|
672
|
+
netAmount?: number | null | undefined;
|
|
673
|
+
} | null | undefined;
|
|
674
|
+
grossAmount?: number | null | undefined;
|
|
675
|
+
gatewayFeeAmount?: number | null | undefined;
|
|
676
|
+
netAmount?: number | null | undefined;
|
|
677
|
+
}, {
|
|
678
|
+
id: string;
|
|
679
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
680
|
+
_id: false;
|
|
681
|
+
}>> & Omit<{
|
|
682
|
+
splits: string[];
|
|
683
|
+
status: "pending" | "paid" | "waived" | "reversed";
|
|
684
|
+
gatewayFeeRate?: number | null | undefined;
|
|
685
|
+
rate?: number | null | undefined;
|
|
686
|
+
affiliate?: {
|
|
687
|
+
recipientId?: string | null | undefined;
|
|
688
|
+
recipientType?: "user" | "organization" | "partner" | null | undefined;
|
|
689
|
+
rate?: number | null | undefined;
|
|
690
|
+
grossAmount?: number | null | undefined;
|
|
691
|
+
netAmount?: number | null | undefined;
|
|
692
|
+
} | null | undefined;
|
|
693
|
+
grossAmount?: number | null | undefined;
|
|
694
|
+
gatewayFeeAmount?: number | null | undefined;
|
|
695
|
+
netAmount?: number | null | undefined;
|
|
696
|
+
} & {
|
|
697
|
+
_id: mongoose.Types.ObjectId;
|
|
698
|
+
} & {
|
|
699
|
+
__v: number;
|
|
700
|
+
}, "id"> & {
|
|
701
|
+
id: string;
|
|
702
|
+
}> | undefined;
|
|
703
|
+
}, {
|
|
704
|
+
splits: string[];
|
|
705
|
+
status: "pending" | "paid" | "waived" | "reversed";
|
|
706
|
+
gatewayFeeRate?: number | null | undefined;
|
|
707
|
+
rate?: number | null | undefined;
|
|
708
|
+
affiliate?: {
|
|
709
|
+
recipientId?: string | null | undefined;
|
|
710
|
+
recipientType?: "user" | "organization" | "partner" | null | undefined;
|
|
711
|
+
rate?: number | null | undefined;
|
|
712
|
+
grossAmount?: number | null | undefined;
|
|
713
|
+
netAmount?: number | null | undefined;
|
|
714
|
+
} | null | undefined;
|
|
715
|
+
grossAmount?: number | null | undefined;
|
|
716
|
+
gatewayFeeAmount?: number | null | undefined;
|
|
717
|
+
netAmount?: number | null | undefined;
|
|
718
|
+
} & {
|
|
719
|
+
_id: mongoose.Types.ObjectId;
|
|
720
|
+
} & {
|
|
721
|
+
__v: number;
|
|
722
|
+
}>;
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* Tax Breakdown Schema
|
|
726
|
+
* Embed this in Transaction model to track tax
|
|
727
|
+
*
|
|
728
|
+
* @example
|
|
729
|
+
* ```typescript
|
|
730
|
+
* import mongoose from 'mongoose';
|
|
731
|
+
* import { taxBreakdownSchema } from '@classytic/revenue/schemas';
|
|
732
|
+
*
|
|
733
|
+
* const transactionSchema = new mongoose.Schema({
|
|
734
|
+
* amount: Number,
|
|
735
|
+
* tax: taxBreakdownSchema, // Add tax tracking
|
|
736
|
+
* // ... other fields
|
|
737
|
+
* });
|
|
738
|
+
* ```
|
|
739
|
+
*/
|
|
740
|
+
declare const taxBreakdownSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
741
|
+
_id: false;
|
|
742
|
+
}, {
|
|
743
|
+
rate: number;
|
|
744
|
+
isApplicable: boolean;
|
|
745
|
+
baseAmount: number;
|
|
746
|
+
taxAmount: number;
|
|
747
|
+
totalAmount: number;
|
|
748
|
+
type?: "paid" | "collected" | "exempt" | null | undefined;
|
|
749
|
+
pricesIncludeTax?: boolean | null | undefined;
|
|
750
|
+
}, mongoose.Document<unknown, {}, {
|
|
751
|
+
rate: number;
|
|
752
|
+
isApplicable: boolean;
|
|
753
|
+
baseAmount: number;
|
|
754
|
+
taxAmount: number;
|
|
755
|
+
totalAmount: number;
|
|
756
|
+
type?: "paid" | "collected" | "exempt" | null | undefined;
|
|
757
|
+
pricesIncludeTax?: boolean | null | undefined;
|
|
758
|
+
}, {
|
|
759
|
+
id: string;
|
|
760
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
761
|
+
_id: false;
|
|
762
|
+
}>> & Omit<{
|
|
763
|
+
rate: number;
|
|
764
|
+
isApplicable: boolean;
|
|
765
|
+
baseAmount: number;
|
|
766
|
+
taxAmount: number;
|
|
767
|
+
totalAmount: number;
|
|
768
|
+
type?: "paid" | "collected" | "exempt" | null | undefined;
|
|
769
|
+
pricesIncludeTax?: boolean | null | undefined;
|
|
770
|
+
} & {
|
|
771
|
+
_id: mongoose.Types.ObjectId;
|
|
772
|
+
} & {
|
|
773
|
+
__v: number;
|
|
774
|
+
}, "id"> & {
|
|
775
|
+
id: string;
|
|
776
|
+
}, {
|
|
777
|
+
[path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
|
|
778
|
+
} | {
|
|
779
|
+
[x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
|
|
780
|
+
rate: number;
|
|
781
|
+
isApplicable: boolean;
|
|
782
|
+
baseAmount: number;
|
|
783
|
+
taxAmount: number;
|
|
784
|
+
totalAmount: number;
|
|
785
|
+
type?: "paid" | "collected" | "exempt" | null | undefined;
|
|
786
|
+
pricesIncludeTax?: boolean | null | undefined;
|
|
787
|
+
}, {
|
|
788
|
+
id: string;
|
|
789
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
790
|
+
_id: false;
|
|
791
|
+
}>> & Omit<{
|
|
792
|
+
rate: number;
|
|
793
|
+
isApplicable: boolean;
|
|
794
|
+
baseAmount: number;
|
|
795
|
+
taxAmount: number;
|
|
796
|
+
totalAmount: number;
|
|
797
|
+
type?: "paid" | "collected" | "exempt" | null | undefined;
|
|
798
|
+
pricesIncludeTax?: boolean | null | undefined;
|
|
799
|
+
} & {
|
|
800
|
+
_id: mongoose.Types.ObjectId;
|
|
801
|
+
} & {
|
|
802
|
+
__v: number;
|
|
803
|
+
}, "id"> & {
|
|
804
|
+
id: string;
|
|
805
|
+
}> | undefined;
|
|
806
|
+
}, {
|
|
807
|
+
rate: number;
|
|
808
|
+
isApplicable: boolean;
|
|
809
|
+
baseAmount: number;
|
|
810
|
+
taxAmount: number;
|
|
811
|
+
totalAmount: number;
|
|
812
|
+
type?: "paid" | "collected" | "exempt" | null | undefined;
|
|
813
|
+
pricesIncludeTax?: boolean | null | undefined;
|
|
814
|
+
} & {
|
|
815
|
+
_id: mongoose.Types.ObjectId;
|
|
816
|
+
} & {
|
|
817
|
+
__v: number;
|
|
818
|
+
}>;
|
|
819
|
+
/**
|
|
820
|
+
* TypeScript type inference
|
|
821
|
+
*/
|
|
822
|
+
type TaxBreakdown = {
|
|
823
|
+
isApplicable: boolean;
|
|
824
|
+
rate: number;
|
|
825
|
+
baseAmount: number;
|
|
826
|
+
taxAmount: number;
|
|
827
|
+
totalAmount: number;
|
|
828
|
+
pricesIncludeTax?: boolean;
|
|
829
|
+
type?: 'collected' | 'paid' | 'exempt';
|
|
830
|
+
};
|
|
831
|
+
|
|
832
|
+
/**
|
|
833
|
+
* Plan Schema - for defining subscription plans
|
|
834
|
+
*/
|
|
835
|
+
declare const planSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
836
|
+
_id: false;
|
|
837
|
+
}, {
|
|
838
|
+
amount: number;
|
|
839
|
+
currency: string;
|
|
840
|
+
metadata: any;
|
|
841
|
+
interval: "day" | "week" | "month" | "year";
|
|
842
|
+
intervalCount: number;
|
|
843
|
+
name: string;
|
|
844
|
+
key: PlanKeyValue;
|
|
845
|
+
features: string[];
|
|
846
|
+
isActive: boolean;
|
|
847
|
+
description?: string | null | undefined;
|
|
848
|
+
}, mongoose.Document<unknown, {}, {
|
|
849
|
+
amount: number;
|
|
850
|
+
currency: string;
|
|
851
|
+
metadata: any;
|
|
852
|
+
interval: "day" | "week" | "month" | "year";
|
|
853
|
+
intervalCount: number;
|
|
854
|
+
name: string;
|
|
855
|
+
key: PlanKeyValue;
|
|
856
|
+
features: string[];
|
|
857
|
+
isActive: boolean;
|
|
858
|
+
description?: string | null | undefined;
|
|
859
|
+
}, {
|
|
860
|
+
id: string;
|
|
861
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
862
|
+
_id: false;
|
|
863
|
+
}>> & Omit<{
|
|
864
|
+
amount: number;
|
|
865
|
+
currency: string;
|
|
866
|
+
metadata: any;
|
|
867
|
+
interval: "day" | "week" | "month" | "year";
|
|
868
|
+
intervalCount: number;
|
|
869
|
+
name: string;
|
|
870
|
+
key: PlanKeyValue;
|
|
871
|
+
features: string[];
|
|
872
|
+
isActive: boolean;
|
|
873
|
+
description?: string | null | undefined;
|
|
874
|
+
} & {
|
|
875
|
+
_id: mongoose.Types.ObjectId;
|
|
876
|
+
} & {
|
|
877
|
+
__v: number;
|
|
878
|
+
}, "id"> & {
|
|
879
|
+
id: string;
|
|
880
|
+
}, {
|
|
881
|
+
[path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
|
|
882
|
+
} | {
|
|
883
|
+
[x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
|
|
884
|
+
amount: number;
|
|
885
|
+
currency: string;
|
|
886
|
+
metadata: any;
|
|
887
|
+
interval: "day" | "week" | "month" | "year";
|
|
888
|
+
intervalCount: number;
|
|
889
|
+
name: string;
|
|
890
|
+
key: PlanKeyValue;
|
|
891
|
+
features: string[];
|
|
892
|
+
isActive: boolean;
|
|
893
|
+
description?: string | null | undefined;
|
|
894
|
+
}, {
|
|
895
|
+
id: string;
|
|
896
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
6
897
|
_id: false;
|
|
898
|
+
}>> & Omit<{
|
|
899
|
+
amount: number;
|
|
900
|
+
currency: string;
|
|
901
|
+
metadata: any;
|
|
902
|
+
interval: "day" | "week" | "month" | "year";
|
|
903
|
+
intervalCount: number;
|
|
904
|
+
name: string;
|
|
905
|
+
key: PlanKeyValue;
|
|
906
|
+
features: string[];
|
|
907
|
+
isActive: boolean;
|
|
908
|
+
description?: string | null | undefined;
|
|
909
|
+
} & {
|
|
910
|
+
_id: mongoose.Types.ObjectId;
|
|
911
|
+
} & {
|
|
912
|
+
__v: number;
|
|
913
|
+
}, "id"> & {
|
|
914
|
+
id: string;
|
|
915
|
+
}> | undefined;
|
|
916
|
+
}, {
|
|
917
|
+
amount: number;
|
|
918
|
+
currency: string;
|
|
919
|
+
metadata: any;
|
|
920
|
+
interval: "day" | "week" | "month" | "year";
|
|
921
|
+
intervalCount: number;
|
|
922
|
+
name: string;
|
|
923
|
+
key: PlanKeyValue;
|
|
924
|
+
features: string[];
|
|
925
|
+
isActive: boolean;
|
|
926
|
+
description?: string | null | undefined;
|
|
927
|
+
} & {
|
|
928
|
+
_id: mongoose.Types.ObjectId;
|
|
929
|
+
} & {
|
|
930
|
+
__v: number;
|
|
931
|
+
}>;
|
|
932
|
+
|
|
933
|
+
/**
|
|
934
|
+
* Subscription Info Schema
|
|
935
|
+
* Use this in your entity models that have subscriptions
|
|
936
|
+
*
|
|
937
|
+
* @example
|
|
938
|
+
* const OrganizationSchema = new Schema({
|
|
939
|
+
* name: String,
|
|
940
|
+
* subscription: { type: subscriptionInfoSchema },
|
|
941
|
+
* });
|
|
942
|
+
*/
|
|
943
|
+
declare const subscriptionInfoSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
944
|
+
_id: false;
|
|
945
|
+
}, {
|
|
946
|
+
planKey: PlanKeyValue;
|
|
947
|
+
status: SubscriptionStatusValue;
|
|
948
|
+
isActive: boolean;
|
|
949
|
+
renewalCount: number;
|
|
950
|
+
lastPaymentDate?: NativeDate | null | undefined;
|
|
951
|
+
lastPaymentAmount?: number | null | undefined;
|
|
952
|
+
startDate?: NativeDate | null | undefined;
|
|
953
|
+
endDate?: NativeDate | null | undefined;
|
|
954
|
+
canceledAt?: NativeDate | null | undefined;
|
|
955
|
+
cancelAt?: NativeDate | null | undefined;
|
|
956
|
+
pausedAt?: NativeDate | null | undefined;
|
|
957
|
+
}, mongoose.Document<unknown, {}, {
|
|
958
|
+
planKey: PlanKeyValue;
|
|
959
|
+
status: SubscriptionStatusValue;
|
|
960
|
+
isActive: boolean;
|
|
961
|
+
renewalCount: number;
|
|
962
|
+
lastPaymentDate?: NativeDate | null | undefined;
|
|
963
|
+
lastPaymentAmount?: number | null | undefined;
|
|
964
|
+
startDate?: NativeDate | null | undefined;
|
|
965
|
+
endDate?: NativeDate | null | undefined;
|
|
966
|
+
canceledAt?: NativeDate | null | undefined;
|
|
967
|
+
cancelAt?: NativeDate | null | undefined;
|
|
968
|
+
pausedAt?: NativeDate | null | undefined;
|
|
969
|
+
}, {
|
|
970
|
+
id: string;
|
|
971
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
972
|
+
_id: false;
|
|
973
|
+
}>> & Omit<{
|
|
974
|
+
planKey: PlanKeyValue;
|
|
975
|
+
status: SubscriptionStatusValue;
|
|
976
|
+
isActive: boolean;
|
|
977
|
+
renewalCount: number;
|
|
978
|
+
lastPaymentDate?: NativeDate | null | undefined;
|
|
979
|
+
lastPaymentAmount?: number | null | undefined;
|
|
980
|
+
startDate?: NativeDate | null | undefined;
|
|
981
|
+
endDate?: NativeDate | null | undefined;
|
|
982
|
+
canceledAt?: NativeDate | null | undefined;
|
|
983
|
+
cancelAt?: NativeDate | null | undefined;
|
|
984
|
+
pausedAt?: NativeDate | null | undefined;
|
|
985
|
+
} & {
|
|
986
|
+
_id: mongoose.Types.ObjectId;
|
|
987
|
+
} & {
|
|
988
|
+
__v: number;
|
|
989
|
+
}, "id"> & {
|
|
990
|
+
id: string;
|
|
991
|
+
}, {
|
|
992
|
+
[path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
|
|
993
|
+
} | {
|
|
994
|
+
[x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
|
|
995
|
+
planKey: PlanKeyValue;
|
|
996
|
+
status: SubscriptionStatusValue;
|
|
997
|
+
isActive: boolean;
|
|
998
|
+
renewalCount: number;
|
|
999
|
+
lastPaymentDate?: NativeDate | null | undefined;
|
|
1000
|
+
lastPaymentAmount?: number | null | undefined;
|
|
1001
|
+
startDate?: NativeDate | null | undefined;
|
|
1002
|
+
endDate?: NativeDate | null | undefined;
|
|
1003
|
+
canceledAt?: NativeDate | null | undefined;
|
|
1004
|
+
cancelAt?: NativeDate | null | undefined;
|
|
1005
|
+
pausedAt?: NativeDate | null | undefined;
|
|
7
1006
|
}, {
|
|
8
|
-
|
|
1007
|
+
id: string;
|
|
1008
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
1009
|
+
_id: false;
|
|
1010
|
+
}>> & Omit<{
|
|
1011
|
+
planKey: PlanKeyValue;
|
|
1012
|
+
status: SubscriptionStatusValue;
|
|
1013
|
+
isActive: boolean;
|
|
1014
|
+
renewalCount: number;
|
|
1015
|
+
lastPaymentDate?: NativeDate | null | undefined;
|
|
1016
|
+
lastPaymentAmount?: number | null | undefined;
|
|
1017
|
+
startDate?: NativeDate | null | undefined;
|
|
1018
|
+
endDate?: NativeDate | null | undefined;
|
|
1019
|
+
canceledAt?: NativeDate | null | undefined;
|
|
1020
|
+
cancelAt?: NativeDate | null | undefined;
|
|
1021
|
+
pausedAt?: NativeDate | null | undefined;
|
|
1022
|
+
} & {
|
|
1023
|
+
_id: mongoose.Types.ObjectId;
|
|
1024
|
+
} & {
|
|
1025
|
+
__v: number;
|
|
1026
|
+
}, "id"> & {
|
|
1027
|
+
id: string;
|
|
1028
|
+
}> | undefined;
|
|
1029
|
+
}, {
|
|
1030
|
+
planKey: PlanKeyValue;
|
|
1031
|
+
status: SubscriptionStatusValue;
|
|
1032
|
+
isActive: boolean;
|
|
1033
|
+
renewalCount: number;
|
|
1034
|
+
lastPaymentDate?: NativeDate | null | undefined;
|
|
1035
|
+
lastPaymentAmount?: number | null | undefined;
|
|
1036
|
+
startDate?: NativeDate | null | undefined;
|
|
1037
|
+
endDate?: NativeDate | null | undefined;
|
|
1038
|
+
canceledAt?: NativeDate | null | undefined;
|
|
1039
|
+
cancelAt?: NativeDate | null | undefined;
|
|
1040
|
+
pausedAt?: NativeDate | null | undefined;
|
|
1041
|
+
} & {
|
|
1042
|
+
_id: mongoose.Types.ObjectId;
|
|
1043
|
+
} & {
|
|
1044
|
+
__v: number;
|
|
1045
|
+
}>;
|
|
1046
|
+
|
|
1047
|
+
/**
|
|
1048
|
+
* Hold/Escrow Schema
|
|
1049
|
+
* @classytic/revenue
|
|
1050
|
+
*
|
|
1051
|
+
* Schema for platform-as-intermediary escrow flow
|
|
1052
|
+
* Spread into transaction schema when needed
|
|
1053
|
+
*/
|
|
1054
|
+
declare const holdSchema: {
|
|
1055
|
+
readonly status: {
|
|
1056
|
+
readonly type: StringConstructor;
|
|
1057
|
+
readonly enum: HoldStatusValue[];
|
|
1058
|
+
readonly default: "pending";
|
|
1059
|
+
};
|
|
1060
|
+
readonly heldAmount: {
|
|
1061
|
+
readonly type: NumberConstructor;
|
|
1062
|
+
readonly required: false;
|
|
1063
|
+
};
|
|
1064
|
+
readonly releasedAmount: {
|
|
1065
|
+
readonly type: NumberConstructor;
|
|
1066
|
+
readonly default: 0;
|
|
1067
|
+
};
|
|
1068
|
+
readonly reason: {
|
|
1069
|
+
readonly type: StringConstructor;
|
|
1070
|
+
readonly enum: HoldReasonValue[];
|
|
1071
|
+
readonly required: false;
|
|
1072
|
+
};
|
|
1073
|
+
readonly holdUntil: {
|
|
1074
|
+
readonly type: DateConstructor;
|
|
1075
|
+
readonly required: false;
|
|
1076
|
+
};
|
|
1077
|
+
readonly heldAt: DateConstructor;
|
|
1078
|
+
readonly releasedAt: DateConstructor;
|
|
1079
|
+
readonly cancelledAt: DateConstructor;
|
|
1080
|
+
readonly releases: readonly [{
|
|
1081
|
+
readonly amount: NumberConstructor;
|
|
1082
|
+
readonly recipientId: StringConstructor;
|
|
1083
|
+
readonly recipientType: StringConstructor;
|
|
1084
|
+
readonly releasedAt: DateConstructor;
|
|
1085
|
+
readonly releasedBy: StringConstructor;
|
|
1086
|
+
readonly reason: StringConstructor;
|
|
1087
|
+
readonly metadata: ObjectConstructor;
|
|
1088
|
+
}];
|
|
1089
|
+
readonly metadata: {
|
|
1090
|
+
readonly type: ObjectConstructor;
|
|
1091
|
+
readonly default: {};
|
|
1092
|
+
};
|
|
1093
|
+
};
|
|
1094
|
+
|
|
1095
|
+
/**
|
|
1096
|
+
* Split Schema - Embedded in Transaction
|
|
1097
|
+
*/
|
|
1098
|
+
declare const splitSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
1099
|
+
_id: false;
|
|
1100
|
+
}, {
|
|
1101
|
+
type: SplitTypeValue;
|
|
1102
|
+
metadata: any;
|
|
1103
|
+
recipientId: string;
|
|
1104
|
+
recipientType: "user" | "affiliate" | "organization" | "partner" | "platform";
|
|
1105
|
+
gatewayFeeRate: number;
|
|
1106
|
+
rate: number;
|
|
1107
|
+
status: SplitStatusValue;
|
|
1108
|
+
grossAmount: number;
|
|
1109
|
+
gatewayFeeAmount: number;
|
|
1110
|
+
netAmount: number;
|
|
1111
|
+
dueDate?: NativeDate | null | undefined;
|
|
1112
|
+
paidDate?: NativeDate | null | undefined;
|
|
1113
|
+
payoutMethod?: PayoutMethodValue | null | undefined;
|
|
1114
|
+
payoutTransactionId?: string | null | undefined;
|
|
1115
|
+
}, mongoose.Document<unknown, {}, {
|
|
1116
|
+
type: SplitTypeValue;
|
|
1117
|
+
metadata: any;
|
|
1118
|
+
recipientId: string;
|
|
1119
|
+
recipientType: "user" | "affiliate" | "organization" | "partner" | "platform";
|
|
1120
|
+
gatewayFeeRate: number;
|
|
1121
|
+
rate: number;
|
|
1122
|
+
status: SplitStatusValue;
|
|
1123
|
+
grossAmount: number;
|
|
1124
|
+
gatewayFeeAmount: number;
|
|
1125
|
+
netAmount: number;
|
|
1126
|
+
dueDate?: NativeDate | null | undefined;
|
|
1127
|
+
paidDate?: NativeDate | null | undefined;
|
|
1128
|
+
payoutMethod?: PayoutMethodValue | null | undefined;
|
|
1129
|
+
payoutTransactionId?: string | null | undefined;
|
|
1130
|
+
}, {
|
|
1131
|
+
id: string;
|
|
1132
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
1133
|
+
_id: false;
|
|
1134
|
+
}>> & Omit<{
|
|
1135
|
+
type: SplitTypeValue;
|
|
1136
|
+
metadata: any;
|
|
1137
|
+
recipientId: string;
|
|
1138
|
+
recipientType: "user" | "affiliate" | "organization" | "partner" | "platform";
|
|
1139
|
+
gatewayFeeRate: number;
|
|
1140
|
+
rate: number;
|
|
1141
|
+
status: SplitStatusValue;
|
|
1142
|
+
grossAmount: number;
|
|
1143
|
+
gatewayFeeAmount: number;
|
|
1144
|
+
netAmount: number;
|
|
1145
|
+
dueDate?: NativeDate | null | undefined;
|
|
1146
|
+
paidDate?: NativeDate | null | undefined;
|
|
1147
|
+
payoutMethod?: PayoutMethodValue | null | undefined;
|
|
1148
|
+
payoutTransactionId?: string | null | undefined;
|
|
1149
|
+
} & {
|
|
1150
|
+
_id: mongoose.Types.ObjectId;
|
|
1151
|
+
} & {
|
|
1152
|
+
__v: number;
|
|
1153
|
+
}, "id"> & {
|
|
1154
|
+
id: string;
|
|
1155
|
+
}, {
|
|
1156
|
+
[path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
|
|
1157
|
+
} | {
|
|
1158
|
+
[x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
|
|
1159
|
+
type: SplitTypeValue;
|
|
9
1160
|
metadata: any;
|
|
10
1161
|
recipientId: string;
|
|
1162
|
+
recipientType: "user" | "affiliate" | "organization" | "partner" | "platform";
|
|
1163
|
+
gatewayFeeRate: number;
|
|
1164
|
+
rate: number;
|
|
1165
|
+
status: SplitStatusValue;
|
|
11
1166
|
grossAmount: number;
|
|
1167
|
+
gatewayFeeAmount: number;
|
|
12
1168
|
netAmount: number;
|
|
13
|
-
|
|
14
|
-
|
|
1169
|
+
dueDate?: NativeDate | null | undefined;
|
|
1170
|
+
paidDate?: NativeDate | null | undefined;
|
|
1171
|
+
payoutMethod?: PayoutMethodValue | null | undefined;
|
|
1172
|
+
payoutTransactionId?: string | null | undefined;
|
|
1173
|
+
}, {
|
|
1174
|
+
id: string;
|
|
1175
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
1176
|
+
_id: false;
|
|
1177
|
+
}>> & Omit<{
|
|
1178
|
+
type: SplitTypeValue;
|
|
1179
|
+
metadata: any;
|
|
1180
|
+
recipientId: string;
|
|
1181
|
+
recipientType: "user" | "affiliate" | "organization" | "partner" | "platform";
|
|
15
1182
|
gatewayFeeRate: number;
|
|
1183
|
+
rate: number;
|
|
1184
|
+
status: SplitStatusValue;
|
|
1185
|
+
grossAmount: number;
|
|
16
1186
|
gatewayFeeAmount: number;
|
|
17
|
-
|
|
1187
|
+
netAmount: number;
|
|
18
1188
|
dueDate?: NativeDate | null | undefined;
|
|
19
1189
|
paidDate?: NativeDate | null | undefined;
|
|
20
|
-
payoutMethod?:
|
|
1190
|
+
payoutMethod?: PayoutMethodValue | null | undefined;
|
|
21
1191
|
payoutTransactionId?: string | null | undefined;
|
|
22
|
-
}
|
|
23
|
-
|
|
1192
|
+
} & {
|
|
1193
|
+
_id: mongoose.Types.ObjectId;
|
|
1194
|
+
} & {
|
|
1195
|
+
__v: number;
|
|
1196
|
+
}, "id"> & {
|
|
1197
|
+
id: string;
|
|
1198
|
+
}> | undefined;
|
|
1199
|
+
}, {
|
|
1200
|
+
type: SplitTypeValue;
|
|
1201
|
+
metadata: any;
|
|
1202
|
+
recipientId: string;
|
|
1203
|
+
recipientType: "user" | "affiliate" | "organization" | "partner" | "platform";
|
|
1204
|
+
gatewayFeeRate: number;
|
|
1205
|
+
rate: number;
|
|
1206
|
+
status: SplitStatusValue;
|
|
1207
|
+
grossAmount: number;
|
|
1208
|
+
gatewayFeeAmount: number;
|
|
1209
|
+
netAmount: number;
|
|
1210
|
+
dueDate?: NativeDate | null | undefined;
|
|
1211
|
+
paidDate?: NativeDate | null | undefined;
|
|
1212
|
+
payoutMethod?: PayoutMethodValue | null | undefined;
|
|
1213
|
+
payoutTransactionId?: string | null | undefined;
|
|
1214
|
+
} & {
|
|
1215
|
+
_id: mongoose.Types.ObjectId;
|
|
1216
|
+
} & {
|
|
1217
|
+
__v: number;
|
|
1218
|
+
}>;
|
|
1219
|
+
|
|
1220
|
+
declare const _default: {
|
|
1221
|
+
settlementSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
1222
|
+
timestamps: true;
|
|
1223
|
+
}, {
|
|
1224
|
+
type: "split_payout" | "platform_withdrawal" | "manual_payout" | "escrow_release";
|
|
1225
|
+
amount: number;
|
|
1226
|
+
currency: string;
|
|
1227
|
+
metadata: any;
|
|
1228
|
+
organizationId: mongoose.Types.ObjectId;
|
|
1229
|
+
recipientId: mongoose.Types.ObjectId;
|
|
1230
|
+
recipientType: "user" | "affiliate" | "organization" | "partner" | "platform";
|
|
1231
|
+
status: "pending" | "cancelled" | "failed" | "processing" | "completed";
|
|
1232
|
+
payoutMethod: PayoutMethodValue;
|
|
1233
|
+
sourceTransactionIds: mongoose.Types.ObjectId[];
|
|
1234
|
+
sourceSplitIds: string[];
|
|
1235
|
+
retryCount: number;
|
|
1236
|
+
notes?: string | null | undefined;
|
|
1237
|
+
bankTransferDetails?: {
|
|
1238
|
+
bankName?: string | null | undefined;
|
|
1239
|
+
accountNumber?: string | null | undefined;
|
|
1240
|
+
accountName?: string | null | undefined;
|
|
1241
|
+
routingNumber?: string | null | undefined;
|
|
1242
|
+
swiftCode?: string | null | undefined;
|
|
1243
|
+
iban?: string | null | undefined;
|
|
1244
|
+
transferReference?: string | null | undefined;
|
|
1245
|
+
transferredAt?: NativeDate | null | undefined;
|
|
1246
|
+
} | null | undefined;
|
|
1247
|
+
mobileWalletDetails?: {
|
|
1248
|
+
provider?: string | null | undefined;
|
|
1249
|
+
transactionId?: string | null | undefined;
|
|
1250
|
+
accountNumber?: string | null | undefined;
|
|
1251
|
+
transferredAt?: NativeDate | null | undefined;
|
|
1252
|
+
phoneNumber?: string | null | undefined;
|
|
1253
|
+
} | null | undefined;
|
|
1254
|
+
cryptoDetails?: {
|
|
1255
|
+
transferredAt?: NativeDate | null | undefined;
|
|
1256
|
+
network?: string | null | undefined;
|
|
1257
|
+
walletAddress?: string | null | undefined;
|
|
1258
|
+
transactionHash?: string | null | undefined;
|
|
1259
|
+
} | null | undefined;
|
|
1260
|
+
platformBalanceDetails?: {
|
|
1261
|
+
balanceId?: mongoose.Types.ObjectId | null | undefined;
|
|
1262
|
+
appliedAt?: NativeDate | null | undefined;
|
|
1263
|
+
} | null | undefined;
|
|
1264
|
+
scheduledAt?: NativeDate | null | undefined;
|
|
1265
|
+
processedAt?: NativeDate | null | undefined;
|
|
1266
|
+
completedAt?: NativeDate | null | undefined;
|
|
1267
|
+
failedAt?: NativeDate | null | undefined;
|
|
1268
|
+
cancelledAt?: NativeDate | null | undefined;
|
|
1269
|
+
failureReason?: string | null | undefined;
|
|
1270
|
+
failureCode?: string | null | undefined;
|
|
1271
|
+
} & mongoose.DefaultTimestampProps, mongoose.Document<unknown, {}, {
|
|
1272
|
+
type: "split_payout" | "platform_withdrawal" | "manual_payout" | "escrow_release";
|
|
1273
|
+
amount: number;
|
|
1274
|
+
currency: string;
|
|
1275
|
+
metadata: any;
|
|
1276
|
+
organizationId: mongoose.Types.ObjectId;
|
|
1277
|
+
recipientId: mongoose.Types.ObjectId;
|
|
1278
|
+
recipientType: "user" | "affiliate" | "organization" | "partner" | "platform";
|
|
1279
|
+
status: "pending" | "cancelled" | "failed" | "processing" | "completed";
|
|
1280
|
+
payoutMethod: PayoutMethodValue;
|
|
1281
|
+
sourceTransactionIds: mongoose.Types.ObjectId[];
|
|
1282
|
+
sourceSplitIds: string[];
|
|
1283
|
+
retryCount: number;
|
|
1284
|
+
notes?: string | null | undefined;
|
|
1285
|
+
bankTransferDetails?: {
|
|
1286
|
+
bankName?: string | null | undefined;
|
|
1287
|
+
accountNumber?: string | null | undefined;
|
|
1288
|
+
accountName?: string | null | undefined;
|
|
1289
|
+
routingNumber?: string | null | undefined;
|
|
1290
|
+
swiftCode?: string | null | undefined;
|
|
1291
|
+
iban?: string | null | undefined;
|
|
1292
|
+
transferReference?: string | null | undefined;
|
|
1293
|
+
transferredAt?: NativeDate | null | undefined;
|
|
1294
|
+
} | null | undefined;
|
|
1295
|
+
mobileWalletDetails?: {
|
|
1296
|
+
provider?: string | null | undefined;
|
|
1297
|
+
transactionId?: string | null | undefined;
|
|
1298
|
+
accountNumber?: string | null | undefined;
|
|
1299
|
+
transferredAt?: NativeDate | null | undefined;
|
|
1300
|
+
phoneNumber?: string | null | undefined;
|
|
1301
|
+
} | null | undefined;
|
|
1302
|
+
cryptoDetails?: {
|
|
1303
|
+
transferredAt?: NativeDate | null | undefined;
|
|
1304
|
+
network?: string | null | undefined;
|
|
1305
|
+
walletAddress?: string | null | undefined;
|
|
1306
|
+
transactionHash?: string | null | undefined;
|
|
1307
|
+
} | null | undefined;
|
|
1308
|
+
platformBalanceDetails?: {
|
|
1309
|
+
balanceId?: mongoose.Types.ObjectId | null | undefined;
|
|
1310
|
+
appliedAt?: NativeDate | null | undefined;
|
|
1311
|
+
} | null | undefined;
|
|
1312
|
+
scheduledAt?: NativeDate | null | undefined;
|
|
1313
|
+
processedAt?: NativeDate | null | undefined;
|
|
1314
|
+
completedAt?: NativeDate | null | undefined;
|
|
1315
|
+
failedAt?: NativeDate | null | undefined;
|
|
1316
|
+
cancelledAt?: NativeDate | null | undefined;
|
|
1317
|
+
failureReason?: string | null | undefined;
|
|
1318
|
+
failureCode?: string | null | undefined;
|
|
1319
|
+
} & mongoose.DefaultTimestampProps, {
|
|
1320
|
+
id: string;
|
|
1321
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
1322
|
+
timestamps: true;
|
|
1323
|
+
}>> & Omit<{
|
|
1324
|
+
type: "split_payout" | "platform_withdrawal" | "manual_payout" | "escrow_release";
|
|
1325
|
+
amount: number;
|
|
1326
|
+
currency: string;
|
|
1327
|
+
metadata: any;
|
|
1328
|
+
organizationId: mongoose.Types.ObjectId;
|
|
1329
|
+
recipientId: mongoose.Types.ObjectId;
|
|
1330
|
+
recipientType: "user" | "affiliate" | "organization" | "partner" | "platform";
|
|
1331
|
+
status: "pending" | "cancelled" | "failed" | "processing" | "completed";
|
|
1332
|
+
payoutMethod: PayoutMethodValue;
|
|
1333
|
+
sourceTransactionIds: mongoose.Types.ObjectId[];
|
|
1334
|
+
sourceSplitIds: string[];
|
|
1335
|
+
retryCount: number;
|
|
1336
|
+
notes?: string | null | undefined;
|
|
1337
|
+
bankTransferDetails?: {
|
|
1338
|
+
bankName?: string | null | undefined;
|
|
1339
|
+
accountNumber?: string | null | undefined;
|
|
1340
|
+
accountName?: string | null | undefined;
|
|
1341
|
+
routingNumber?: string | null | undefined;
|
|
1342
|
+
swiftCode?: string | null | undefined;
|
|
1343
|
+
iban?: string | null | undefined;
|
|
1344
|
+
transferReference?: string | null | undefined;
|
|
1345
|
+
transferredAt?: NativeDate | null | undefined;
|
|
1346
|
+
} | null | undefined;
|
|
1347
|
+
mobileWalletDetails?: {
|
|
1348
|
+
provider?: string | null | undefined;
|
|
1349
|
+
transactionId?: string | null | undefined;
|
|
1350
|
+
accountNumber?: string | null | undefined;
|
|
1351
|
+
transferredAt?: NativeDate | null | undefined;
|
|
1352
|
+
phoneNumber?: string | null | undefined;
|
|
1353
|
+
} | null | undefined;
|
|
1354
|
+
cryptoDetails?: {
|
|
1355
|
+
transferredAt?: NativeDate | null | undefined;
|
|
1356
|
+
network?: string | null | undefined;
|
|
1357
|
+
walletAddress?: string | null | undefined;
|
|
1358
|
+
transactionHash?: string | null | undefined;
|
|
1359
|
+
} | null | undefined;
|
|
1360
|
+
platformBalanceDetails?: {
|
|
1361
|
+
balanceId?: mongoose.Types.ObjectId | null | undefined;
|
|
1362
|
+
appliedAt?: NativeDate | null | undefined;
|
|
1363
|
+
} | null | undefined;
|
|
1364
|
+
scheduledAt?: NativeDate | null | undefined;
|
|
1365
|
+
processedAt?: NativeDate | null | undefined;
|
|
1366
|
+
completedAt?: NativeDate | null | undefined;
|
|
1367
|
+
failedAt?: NativeDate | null | undefined;
|
|
1368
|
+
cancelledAt?: NativeDate | null | undefined;
|
|
1369
|
+
failureReason?: string | null | undefined;
|
|
1370
|
+
failureCode?: string | null | undefined;
|
|
1371
|
+
} & mongoose.DefaultTimestampProps & {
|
|
1372
|
+
_id: mongoose.Types.ObjectId;
|
|
1373
|
+
} & {
|
|
1374
|
+
__v: number;
|
|
1375
|
+
}, "id"> & {
|
|
1376
|
+
id: string;
|
|
1377
|
+
}, {
|
|
1378
|
+
[path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
|
|
1379
|
+
} | {
|
|
1380
|
+
[x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
|
|
1381
|
+
type: "split_payout" | "platform_withdrawal" | "manual_payout" | "escrow_release";
|
|
1382
|
+
amount: number;
|
|
1383
|
+
currency: string;
|
|
1384
|
+
metadata: any;
|
|
1385
|
+
organizationId: mongoose.Types.ObjectId;
|
|
1386
|
+
recipientId: mongoose.Types.ObjectId;
|
|
1387
|
+
recipientType: "user" | "affiliate" | "organization" | "partner" | "platform";
|
|
1388
|
+
status: "pending" | "cancelled" | "failed" | "processing" | "completed";
|
|
1389
|
+
payoutMethod: PayoutMethodValue;
|
|
1390
|
+
sourceTransactionIds: mongoose.Types.ObjectId[];
|
|
1391
|
+
sourceSplitIds: string[];
|
|
1392
|
+
retryCount: number;
|
|
1393
|
+
notes?: string | null | undefined;
|
|
1394
|
+
bankTransferDetails?: {
|
|
1395
|
+
bankName?: string | null | undefined;
|
|
1396
|
+
accountNumber?: string | null | undefined;
|
|
1397
|
+
accountName?: string | null | undefined;
|
|
1398
|
+
routingNumber?: string | null | undefined;
|
|
1399
|
+
swiftCode?: string | null | undefined;
|
|
1400
|
+
iban?: string | null | undefined;
|
|
1401
|
+
transferReference?: string | null | undefined;
|
|
1402
|
+
transferredAt?: NativeDate | null | undefined;
|
|
1403
|
+
} | null | undefined;
|
|
1404
|
+
mobileWalletDetails?: {
|
|
1405
|
+
provider?: string | null | undefined;
|
|
1406
|
+
transactionId?: string | null | undefined;
|
|
1407
|
+
accountNumber?: string | null | undefined;
|
|
1408
|
+
transferredAt?: NativeDate | null | undefined;
|
|
1409
|
+
phoneNumber?: string | null | undefined;
|
|
1410
|
+
} | null | undefined;
|
|
1411
|
+
cryptoDetails?: {
|
|
1412
|
+
transferredAt?: NativeDate | null | undefined;
|
|
1413
|
+
network?: string | null | undefined;
|
|
1414
|
+
walletAddress?: string | null | undefined;
|
|
1415
|
+
transactionHash?: string | null | undefined;
|
|
1416
|
+
} | null | undefined;
|
|
1417
|
+
platformBalanceDetails?: {
|
|
1418
|
+
balanceId?: mongoose.Types.ObjectId | null | undefined;
|
|
1419
|
+
appliedAt?: NativeDate | null | undefined;
|
|
1420
|
+
} | null | undefined;
|
|
1421
|
+
scheduledAt?: NativeDate | null | undefined;
|
|
1422
|
+
processedAt?: NativeDate | null | undefined;
|
|
1423
|
+
completedAt?: NativeDate | null | undefined;
|
|
1424
|
+
failedAt?: NativeDate | null | undefined;
|
|
1425
|
+
cancelledAt?: NativeDate | null | undefined;
|
|
1426
|
+
failureReason?: string | null | undefined;
|
|
1427
|
+
failureCode?: string | null | undefined;
|
|
1428
|
+
} & mongoose.DefaultTimestampProps, {
|
|
1429
|
+
id: string;
|
|
1430
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
1431
|
+
timestamps: true;
|
|
1432
|
+
}>> & Omit<{
|
|
1433
|
+
type: "split_payout" | "platform_withdrawal" | "manual_payout" | "escrow_release";
|
|
1434
|
+
amount: number;
|
|
1435
|
+
currency: string;
|
|
1436
|
+
metadata: any;
|
|
1437
|
+
organizationId: mongoose.Types.ObjectId;
|
|
1438
|
+
recipientId: mongoose.Types.ObjectId;
|
|
1439
|
+
recipientType: "user" | "affiliate" | "organization" | "partner" | "platform";
|
|
1440
|
+
status: "pending" | "cancelled" | "failed" | "processing" | "completed";
|
|
1441
|
+
payoutMethod: PayoutMethodValue;
|
|
1442
|
+
sourceTransactionIds: mongoose.Types.ObjectId[];
|
|
1443
|
+
sourceSplitIds: string[];
|
|
1444
|
+
retryCount: number;
|
|
1445
|
+
notes?: string | null | undefined;
|
|
1446
|
+
bankTransferDetails?: {
|
|
1447
|
+
bankName?: string | null | undefined;
|
|
1448
|
+
accountNumber?: string | null | undefined;
|
|
1449
|
+
accountName?: string | null | undefined;
|
|
1450
|
+
routingNumber?: string | null | undefined;
|
|
1451
|
+
swiftCode?: string | null | undefined;
|
|
1452
|
+
iban?: string | null | undefined;
|
|
1453
|
+
transferReference?: string | null | undefined;
|
|
1454
|
+
transferredAt?: NativeDate | null | undefined;
|
|
1455
|
+
} | null | undefined;
|
|
1456
|
+
mobileWalletDetails?: {
|
|
1457
|
+
provider?: string | null | undefined;
|
|
1458
|
+
transactionId?: string | null | undefined;
|
|
1459
|
+
accountNumber?: string | null | undefined;
|
|
1460
|
+
transferredAt?: NativeDate | null | undefined;
|
|
1461
|
+
phoneNumber?: string | null | undefined;
|
|
1462
|
+
} | null | undefined;
|
|
1463
|
+
cryptoDetails?: {
|
|
1464
|
+
transferredAt?: NativeDate | null | undefined;
|
|
1465
|
+
network?: string | null | undefined;
|
|
1466
|
+
walletAddress?: string | null | undefined;
|
|
1467
|
+
transactionHash?: string | null | undefined;
|
|
1468
|
+
} | null | undefined;
|
|
1469
|
+
platformBalanceDetails?: {
|
|
1470
|
+
balanceId?: mongoose.Types.ObjectId | null | undefined;
|
|
1471
|
+
appliedAt?: NativeDate | null | undefined;
|
|
1472
|
+
} | null | undefined;
|
|
1473
|
+
scheduledAt?: NativeDate | null | undefined;
|
|
1474
|
+
processedAt?: NativeDate | null | undefined;
|
|
1475
|
+
completedAt?: NativeDate | null | undefined;
|
|
1476
|
+
failedAt?: NativeDate | null | undefined;
|
|
1477
|
+
cancelledAt?: NativeDate | null | undefined;
|
|
1478
|
+
failureReason?: string | null | undefined;
|
|
1479
|
+
failureCode?: string | null | undefined;
|
|
1480
|
+
} & mongoose.DefaultTimestampProps & {
|
|
1481
|
+
_id: mongoose.Types.ObjectId;
|
|
1482
|
+
} & {
|
|
1483
|
+
__v: number;
|
|
1484
|
+
}, "id"> & {
|
|
1485
|
+
id: string;
|
|
1486
|
+
}> | undefined;
|
|
1487
|
+
}, {
|
|
1488
|
+
type: "split_payout" | "platform_withdrawal" | "manual_payout" | "escrow_release";
|
|
1489
|
+
amount: number;
|
|
1490
|
+
currency: string;
|
|
1491
|
+
metadata: any;
|
|
1492
|
+
organizationId: mongoose.Types.ObjectId;
|
|
1493
|
+
recipientId: mongoose.Types.ObjectId;
|
|
1494
|
+
recipientType: "user" | "affiliate" | "organization" | "partner" | "platform";
|
|
1495
|
+
status: "pending" | "cancelled" | "failed" | "processing" | "completed";
|
|
1496
|
+
payoutMethod: PayoutMethodValue;
|
|
1497
|
+
sourceTransactionIds: mongoose.Types.ObjectId[];
|
|
1498
|
+
sourceSplitIds: string[];
|
|
1499
|
+
retryCount: number;
|
|
1500
|
+
notes?: string | null | undefined;
|
|
1501
|
+
bankTransferDetails?: {
|
|
1502
|
+
bankName?: string | null | undefined;
|
|
1503
|
+
accountNumber?: string | null | undefined;
|
|
1504
|
+
accountName?: string | null | undefined;
|
|
1505
|
+
routingNumber?: string | null | undefined;
|
|
1506
|
+
swiftCode?: string | null | undefined;
|
|
1507
|
+
iban?: string | null | undefined;
|
|
1508
|
+
transferReference?: string | null | undefined;
|
|
1509
|
+
transferredAt?: NativeDate | null | undefined;
|
|
1510
|
+
} | null | undefined;
|
|
1511
|
+
mobileWalletDetails?: {
|
|
1512
|
+
provider?: string | null | undefined;
|
|
1513
|
+
transactionId?: string | null | undefined;
|
|
1514
|
+
accountNumber?: string | null | undefined;
|
|
1515
|
+
transferredAt?: NativeDate | null | undefined;
|
|
1516
|
+
phoneNumber?: string | null | undefined;
|
|
1517
|
+
} | null | undefined;
|
|
1518
|
+
cryptoDetails?: {
|
|
1519
|
+
transferredAt?: NativeDate | null | undefined;
|
|
1520
|
+
network?: string | null | undefined;
|
|
1521
|
+
walletAddress?: string | null | undefined;
|
|
1522
|
+
transactionHash?: string | null | undefined;
|
|
1523
|
+
} | null | undefined;
|
|
1524
|
+
platformBalanceDetails?: {
|
|
1525
|
+
balanceId?: mongoose.Types.ObjectId | null | undefined;
|
|
1526
|
+
appliedAt?: NativeDate | null | undefined;
|
|
1527
|
+
} | null | undefined;
|
|
1528
|
+
scheduledAt?: NativeDate | null | undefined;
|
|
1529
|
+
processedAt?: NativeDate | null | undefined;
|
|
1530
|
+
completedAt?: NativeDate | null | undefined;
|
|
1531
|
+
failedAt?: NativeDate | null | undefined;
|
|
1532
|
+
cancelledAt?: NativeDate | null | undefined;
|
|
1533
|
+
failureReason?: string | null | undefined;
|
|
1534
|
+
failureCode?: string | null | undefined;
|
|
1535
|
+
createdAt: NativeDate;
|
|
1536
|
+
updatedAt: NativeDate;
|
|
1537
|
+
} & {
|
|
1538
|
+
_id: mongoose.Types.ObjectId;
|
|
1539
|
+
} & {
|
|
1540
|
+
__v: number;
|
|
1541
|
+
}>;
|
|
1542
|
+
splitSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
1543
|
+
_id: false;
|
|
1544
|
+
}, {
|
|
1545
|
+
type: SplitTypeValue;
|
|
24
1546
|
metadata: any;
|
|
25
1547
|
recipientId: string;
|
|
1548
|
+
recipientType: "user" | "affiliate" | "organization" | "partner" | "platform";
|
|
1549
|
+
gatewayFeeRate: number;
|
|
1550
|
+
rate: number;
|
|
1551
|
+
status: SplitStatusValue;
|
|
26
1552
|
grossAmount: number;
|
|
1553
|
+
gatewayFeeAmount: number;
|
|
27
1554
|
netAmount: number;
|
|
28
|
-
|
|
29
|
-
|
|
1555
|
+
dueDate?: NativeDate | null | undefined;
|
|
1556
|
+
paidDate?: NativeDate | null | undefined;
|
|
1557
|
+
payoutMethod?: PayoutMethodValue | null | undefined;
|
|
1558
|
+
payoutTransactionId?: string | null | undefined;
|
|
1559
|
+
}, mongoose.Document<unknown, {}, {
|
|
1560
|
+
type: SplitTypeValue;
|
|
1561
|
+
metadata: any;
|
|
1562
|
+
recipientId: string;
|
|
1563
|
+
recipientType: "user" | "affiliate" | "organization" | "partner" | "platform";
|
|
30
1564
|
gatewayFeeRate: number;
|
|
1565
|
+
rate: number;
|
|
1566
|
+
status: SplitStatusValue;
|
|
1567
|
+
grossAmount: number;
|
|
31
1568
|
gatewayFeeAmount: number;
|
|
32
|
-
|
|
1569
|
+
netAmount: number;
|
|
33
1570
|
dueDate?: NativeDate | null | undefined;
|
|
34
1571
|
paidDate?: NativeDate | null | undefined;
|
|
35
|
-
payoutMethod?:
|
|
1572
|
+
payoutMethod?: PayoutMethodValue | null | undefined;
|
|
36
1573
|
payoutTransactionId?: string | null | undefined;
|
|
37
1574
|
}, {
|
|
38
1575
|
id: string;
|
|
39
1576
|
}, mongoose.ResolveSchemaOptions<{
|
|
40
1577
|
_id: false;
|
|
41
1578
|
}>> & Omit<{
|
|
42
|
-
type:
|
|
1579
|
+
type: SplitTypeValue;
|
|
43
1580
|
metadata: any;
|
|
44
1581
|
recipientId: string;
|
|
45
|
-
|
|
46
|
-
netAmount: number;
|
|
47
|
-
status: "pending" | "cancelled" | "due" | "paid" | "waived";
|
|
48
|
-
rate: number;
|
|
1582
|
+
recipientType: "user" | "affiliate" | "organization" | "partner" | "platform";
|
|
49
1583
|
gatewayFeeRate: number;
|
|
1584
|
+
rate: number;
|
|
1585
|
+
status: SplitStatusValue;
|
|
1586
|
+
grossAmount: number;
|
|
50
1587
|
gatewayFeeAmount: number;
|
|
51
|
-
|
|
1588
|
+
netAmount: number;
|
|
52
1589
|
dueDate?: NativeDate | null | undefined;
|
|
53
1590
|
paidDate?: NativeDate | null | undefined;
|
|
54
|
-
payoutMethod?:
|
|
1591
|
+
payoutMethod?: PayoutMethodValue | null | undefined;
|
|
55
1592
|
payoutTransactionId?: string | null | undefined;
|
|
56
1593
|
} & {
|
|
57
1594
|
_id: mongoose.Types.ObjectId;
|
|
@@ -63,38 +1600,38 @@ declare const _default: {
|
|
|
63
1600
|
[path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
|
|
64
1601
|
} | {
|
|
65
1602
|
[x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
|
|
66
|
-
type:
|
|
1603
|
+
type: SplitTypeValue;
|
|
67
1604
|
metadata: any;
|
|
68
1605
|
recipientId: string;
|
|
69
|
-
|
|
70
|
-
netAmount: number;
|
|
71
|
-
status: "pending" | "cancelled" | "due" | "paid" | "waived";
|
|
72
|
-
rate: number;
|
|
1606
|
+
recipientType: "user" | "affiliate" | "organization" | "partner" | "platform";
|
|
73
1607
|
gatewayFeeRate: number;
|
|
1608
|
+
rate: number;
|
|
1609
|
+
status: SplitStatusValue;
|
|
1610
|
+
grossAmount: number;
|
|
74
1611
|
gatewayFeeAmount: number;
|
|
75
|
-
|
|
1612
|
+
netAmount: number;
|
|
76
1613
|
dueDate?: NativeDate | null | undefined;
|
|
77
1614
|
paidDate?: NativeDate | null | undefined;
|
|
78
|
-
payoutMethod?:
|
|
1615
|
+
payoutMethod?: PayoutMethodValue | null | undefined;
|
|
79
1616
|
payoutTransactionId?: string | null | undefined;
|
|
80
1617
|
}, {
|
|
81
1618
|
id: string;
|
|
82
1619
|
}, mongoose.ResolveSchemaOptions<{
|
|
83
1620
|
_id: false;
|
|
84
1621
|
}>> & Omit<{
|
|
85
|
-
type:
|
|
1622
|
+
type: SplitTypeValue;
|
|
86
1623
|
metadata: any;
|
|
87
1624
|
recipientId: string;
|
|
88
|
-
|
|
89
|
-
netAmount: number;
|
|
90
|
-
status: "pending" | "cancelled" | "due" | "paid" | "waived";
|
|
91
|
-
rate: number;
|
|
1625
|
+
recipientType: "user" | "affiliate" | "organization" | "partner" | "platform";
|
|
92
1626
|
gatewayFeeRate: number;
|
|
1627
|
+
rate: number;
|
|
1628
|
+
status: SplitStatusValue;
|
|
1629
|
+
grossAmount: number;
|
|
93
1630
|
gatewayFeeAmount: number;
|
|
94
|
-
|
|
1631
|
+
netAmount: number;
|
|
95
1632
|
dueDate?: NativeDate | null | undefined;
|
|
96
1633
|
paidDate?: NativeDate | null | undefined;
|
|
97
|
-
payoutMethod?:
|
|
1634
|
+
payoutMethod?: PayoutMethodValue | null | undefined;
|
|
98
1635
|
payoutTransactionId?: string | null | undefined;
|
|
99
1636
|
} & {
|
|
100
1637
|
_id: mongoose.Types.ObjectId;
|
|
@@ -104,19 +1641,19 @@ declare const _default: {
|
|
|
104
1641
|
id: string;
|
|
105
1642
|
}> | undefined;
|
|
106
1643
|
}, {
|
|
107
|
-
type:
|
|
1644
|
+
type: SplitTypeValue;
|
|
108
1645
|
metadata: any;
|
|
109
1646
|
recipientId: string;
|
|
110
|
-
|
|
111
|
-
netAmount: number;
|
|
112
|
-
status: "pending" | "cancelled" | "due" | "paid" | "waived";
|
|
113
|
-
rate: number;
|
|
1647
|
+
recipientType: "user" | "affiliate" | "organization" | "partner" | "platform";
|
|
114
1648
|
gatewayFeeRate: number;
|
|
1649
|
+
rate: number;
|
|
1650
|
+
status: SplitStatusValue;
|
|
1651
|
+
grossAmount: number;
|
|
115
1652
|
gatewayFeeAmount: number;
|
|
116
|
-
|
|
1653
|
+
netAmount: number;
|
|
117
1654
|
dueDate?: NativeDate | null | undefined;
|
|
118
1655
|
paidDate?: NativeDate | null | undefined;
|
|
119
|
-
payoutMethod?:
|
|
1656
|
+
payoutMethod?: PayoutMethodValue | null | undefined;
|
|
120
1657
|
payoutTransactionId?: string | null | undefined;
|
|
121
1658
|
} & {
|
|
122
1659
|
_id: mongoose.Types.ObjectId;
|
|
@@ -126,9 +1663,8 @@ declare const _default: {
|
|
|
126
1663
|
holdSchema: {
|
|
127
1664
|
readonly status: {
|
|
128
1665
|
readonly type: StringConstructor;
|
|
129
|
-
readonly enum:
|
|
1666
|
+
readonly enum: HoldStatusValue[];
|
|
130
1667
|
readonly default: "pending";
|
|
131
|
-
readonly index: true;
|
|
132
1668
|
};
|
|
133
1669
|
readonly heldAmount: {
|
|
134
1670
|
readonly type: NumberConstructor;
|
|
@@ -140,7 +1676,7 @@ declare const _default: {
|
|
|
140
1676
|
};
|
|
141
1677
|
readonly reason: {
|
|
142
1678
|
readonly type: StringConstructor;
|
|
143
|
-
readonly enum:
|
|
1679
|
+
readonly enum: HoldReasonValue[];
|
|
144
1680
|
readonly required: false;
|
|
145
1681
|
};
|
|
146
1682
|
readonly holdUntil: {
|
|
@@ -170,23 +1706,23 @@ declare const _default: {
|
|
|
170
1706
|
amount: number;
|
|
171
1707
|
currency: string;
|
|
172
1708
|
metadata: any;
|
|
173
|
-
name: string;
|
|
174
|
-
key: "monthly" | "quarterly" | "yearly";
|
|
175
|
-
isActive: boolean;
|
|
176
1709
|
interval: "day" | "week" | "month" | "year";
|
|
177
1710
|
intervalCount: number;
|
|
1711
|
+
name: string;
|
|
1712
|
+
key: PlanKeyValue;
|
|
178
1713
|
features: string[];
|
|
1714
|
+
isActive: boolean;
|
|
179
1715
|
description?: string | null | undefined;
|
|
180
1716
|
}, mongoose.Document<unknown, {}, {
|
|
181
1717
|
amount: number;
|
|
182
1718
|
currency: string;
|
|
183
1719
|
metadata: any;
|
|
184
|
-
name: string;
|
|
185
|
-
key: "monthly" | "quarterly" | "yearly";
|
|
186
|
-
isActive: boolean;
|
|
187
1720
|
interval: "day" | "week" | "month" | "year";
|
|
188
1721
|
intervalCount: number;
|
|
1722
|
+
name: string;
|
|
1723
|
+
key: PlanKeyValue;
|
|
189
1724
|
features: string[];
|
|
1725
|
+
isActive: boolean;
|
|
190
1726
|
description?: string | null | undefined;
|
|
191
1727
|
}, {
|
|
192
1728
|
id: string;
|
|
@@ -196,12 +1732,12 @@ declare const _default: {
|
|
|
196
1732
|
amount: number;
|
|
197
1733
|
currency: string;
|
|
198
1734
|
metadata: any;
|
|
199
|
-
name: string;
|
|
200
|
-
key: "monthly" | "quarterly" | "yearly";
|
|
201
|
-
isActive: boolean;
|
|
202
1735
|
interval: "day" | "week" | "month" | "year";
|
|
203
1736
|
intervalCount: number;
|
|
1737
|
+
name: string;
|
|
1738
|
+
key: PlanKeyValue;
|
|
204
1739
|
features: string[];
|
|
1740
|
+
isActive: boolean;
|
|
205
1741
|
description?: string | null | undefined;
|
|
206
1742
|
} & {
|
|
207
1743
|
_id: mongoose.Types.ObjectId;
|
|
@@ -216,12 +1752,12 @@ declare const _default: {
|
|
|
216
1752
|
amount: number;
|
|
217
1753
|
currency: string;
|
|
218
1754
|
metadata: any;
|
|
219
|
-
name: string;
|
|
220
|
-
key: "monthly" | "quarterly" | "yearly";
|
|
221
|
-
isActive: boolean;
|
|
222
1755
|
interval: "day" | "week" | "month" | "year";
|
|
223
1756
|
intervalCount: number;
|
|
1757
|
+
name: string;
|
|
1758
|
+
key: PlanKeyValue;
|
|
224
1759
|
features: string[];
|
|
1760
|
+
isActive: boolean;
|
|
225
1761
|
description?: string | null | undefined;
|
|
226
1762
|
}, {
|
|
227
1763
|
id: string;
|
|
@@ -231,12 +1767,12 @@ declare const _default: {
|
|
|
231
1767
|
amount: number;
|
|
232
1768
|
currency: string;
|
|
233
1769
|
metadata: any;
|
|
234
|
-
name: string;
|
|
235
|
-
key: "monthly" | "quarterly" | "yearly";
|
|
236
|
-
isActive: boolean;
|
|
237
1770
|
interval: "day" | "week" | "month" | "year";
|
|
238
1771
|
intervalCount: number;
|
|
1772
|
+
name: string;
|
|
1773
|
+
key: PlanKeyValue;
|
|
239
1774
|
features: string[];
|
|
1775
|
+
isActive: boolean;
|
|
240
1776
|
description?: string | null | undefined;
|
|
241
1777
|
} & {
|
|
242
1778
|
_id: mongoose.Types.ObjectId;
|
|
@@ -249,12 +1785,12 @@ declare const _default: {
|
|
|
249
1785
|
amount: number;
|
|
250
1786
|
currency: string;
|
|
251
1787
|
metadata: any;
|
|
252
|
-
name: string;
|
|
253
|
-
key: "monthly" | "quarterly" | "yearly";
|
|
254
|
-
isActive: boolean;
|
|
255
1788
|
interval: "day" | "week" | "month" | "year";
|
|
256
1789
|
intervalCount: number;
|
|
1790
|
+
name: string;
|
|
1791
|
+
key: PlanKeyValue;
|
|
257
1792
|
features: string[];
|
|
1793
|
+
isActive: boolean;
|
|
258
1794
|
description?: string | null | undefined;
|
|
259
1795
|
} & {
|
|
260
1796
|
_id: mongoose.Types.ObjectId;
|
|
@@ -264,45 +1800,45 @@ declare const _default: {
|
|
|
264
1800
|
subscriptionInfoSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
265
1801
|
_id: false;
|
|
266
1802
|
}, {
|
|
267
|
-
planKey:
|
|
268
|
-
status:
|
|
1803
|
+
planKey: PlanKeyValue;
|
|
1804
|
+
status: SubscriptionStatusValue;
|
|
269
1805
|
isActive: boolean;
|
|
270
1806
|
renewalCount: number;
|
|
271
|
-
pausedAt?: NativeDate | null | undefined;
|
|
272
|
-
endDate?: NativeDate | null | undefined;
|
|
273
1807
|
lastPaymentDate?: NativeDate | null | undefined;
|
|
274
1808
|
lastPaymentAmount?: number | null | undefined;
|
|
275
1809
|
startDate?: NativeDate | null | undefined;
|
|
1810
|
+
endDate?: NativeDate | null | undefined;
|
|
276
1811
|
canceledAt?: NativeDate | null | undefined;
|
|
277
1812
|
cancelAt?: NativeDate | null | undefined;
|
|
1813
|
+
pausedAt?: NativeDate | null | undefined;
|
|
278
1814
|
}, mongoose.Document<unknown, {}, {
|
|
279
|
-
planKey:
|
|
280
|
-
status:
|
|
1815
|
+
planKey: PlanKeyValue;
|
|
1816
|
+
status: SubscriptionStatusValue;
|
|
281
1817
|
isActive: boolean;
|
|
282
1818
|
renewalCount: number;
|
|
283
|
-
pausedAt?: NativeDate | null | undefined;
|
|
284
|
-
endDate?: NativeDate | null | undefined;
|
|
285
1819
|
lastPaymentDate?: NativeDate | null | undefined;
|
|
286
1820
|
lastPaymentAmount?: number | null | undefined;
|
|
287
1821
|
startDate?: NativeDate | null | undefined;
|
|
1822
|
+
endDate?: NativeDate | null | undefined;
|
|
288
1823
|
canceledAt?: NativeDate | null | undefined;
|
|
289
1824
|
cancelAt?: NativeDate | null | undefined;
|
|
1825
|
+
pausedAt?: NativeDate | null | undefined;
|
|
290
1826
|
}, {
|
|
291
1827
|
id: string;
|
|
292
1828
|
}, mongoose.ResolveSchemaOptions<{
|
|
293
1829
|
_id: false;
|
|
294
1830
|
}>> & Omit<{
|
|
295
|
-
planKey:
|
|
296
|
-
status:
|
|
1831
|
+
planKey: PlanKeyValue;
|
|
1832
|
+
status: SubscriptionStatusValue;
|
|
297
1833
|
isActive: boolean;
|
|
298
|
-
renewalCount: number;
|
|
299
|
-
pausedAt?: NativeDate | null | undefined;
|
|
300
|
-
endDate?: NativeDate | null | undefined;
|
|
1834
|
+
renewalCount: number;
|
|
301
1835
|
lastPaymentDate?: NativeDate | null | undefined;
|
|
302
1836
|
lastPaymentAmount?: number | null | undefined;
|
|
303
1837
|
startDate?: NativeDate | null | undefined;
|
|
1838
|
+
endDate?: NativeDate | null | undefined;
|
|
304
1839
|
canceledAt?: NativeDate | null | undefined;
|
|
305
1840
|
cancelAt?: NativeDate | null | undefined;
|
|
1841
|
+
pausedAt?: NativeDate | null | undefined;
|
|
306
1842
|
} & {
|
|
307
1843
|
_id: mongoose.Types.ObjectId;
|
|
308
1844
|
} & {
|
|
@@ -313,33 +1849,33 @@ declare const _default: {
|
|
|
313
1849
|
[path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
|
|
314
1850
|
} | {
|
|
315
1851
|
[x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
|
|
316
|
-
planKey:
|
|
317
|
-
status:
|
|
1852
|
+
planKey: PlanKeyValue;
|
|
1853
|
+
status: SubscriptionStatusValue;
|
|
318
1854
|
isActive: boolean;
|
|
319
1855
|
renewalCount: number;
|
|
320
|
-
pausedAt?: NativeDate | null | undefined;
|
|
321
|
-
endDate?: NativeDate | null | undefined;
|
|
322
1856
|
lastPaymentDate?: NativeDate | null | undefined;
|
|
323
1857
|
lastPaymentAmount?: number | null | undefined;
|
|
324
1858
|
startDate?: NativeDate | null | undefined;
|
|
1859
|
+
endDate?: NativeDate | null | undefined;
|
|
325
1860
|
canceledAt?: NativeDate | null | undefined;
|
|
326
1861
|
cancelAt?: NativeDate | null | undefined;
|
|
1862
|
+
pausedAt?: NativeDate | null | undefined;
|
|
327
1863
|
}, {
|
|
328
1864
|
id: string;
|
|
329
1865
|
}, mongoose.ResolveSchemaOptions<{
|
|
330
1866
|
_id: false;
|
|
331
1867
|
}>> & Omit<{
|
|
332
|
-
planKey:
|
|
333
|
-
status:
|
|
1868
|
+
planKey: PlanKeyValue;
|
|
1869
|
+
status: SubscriptionStatusValue;
|
|
334
1870
|
isActive: boolean;
|
|
335
1871
|
renewalCount: number;
|
|
336
|
-
pausedAt?: NativeDate | null | undefined;
|
|
337
|
-
endDate?: NativeDate | null | undefined;
|
|
338
1872
|
lastPaymentDate?: NativeDate | null | undefined;
|
|
339
1873
|
lastPaymentAmount?: number | null | undefined;
|
|
340
1874
|
startDate?: NativeDate | null | undefined;
|
|
1875
|
+
endDate?: NativeDate | null | undefined;
|
|
341
1876
|
canceledAt?: NativeDate | null | undefined;
|
|
342
1877
|
cancelAt?: NativeDate | null | undefined;
|
|
1878
|
+
pausedAt?: NativeDate | null | undefined;
|
|
343
1879
|
} & {
|
|
344
1880
|
_id: mongoose.Types.ObjectId;
|
|
345
1881
|
} & {
|
|
@@ -348,17 +1884,78 @@ declare const _default: {
|
|
|
348
1884
|
id: string;
|
|
349
1885
|
}> | undefined;
|
|
350
1886
|
}, {
|
|
351
|
-
planKey:
|
|
352
|
-
status:
|
|
1887
|
+
planKey: PlanKeyValue;
|
|
1888
|
+
status: SubscriptionStatusValue;
|
|
353
1889
|
isActive: boolean;
|
|
354
1890
|
renewalCount: number;
|
|
355
|
-
pausedAt?: NativeDate | null | undefined;
|
|
356
|
-
endDate?: NativeDate | null | undefined;
|
|
357
1891
|
lastPaymentDate?: NativeDate | null | undefined;
|
|
358
1892
|
lastPaymentAmount?: number | null | undefined;
|
|
359
1893
|
startDate?: NativeDate | null | undefined;
|
|
1894
|
+
endDate?: NativeDate | null | undefined;
|
|
360
1895
|
canceledAt?: NativeDate | null | undefined;
|
|
361
1896
|
cancelAt?: NativeDate | null | undefined;
|
|
1897
|
+
pausedAt?: NativeDate | null | undefined;
|
|
1898
|
+
} & {
|
|
1899
|
+
_id: mongoose.Types.ObjectId;
|
|
1900
|
+
} & {
|
|
1901
|
+
__v: number;
|
|
1902
|
+
}>;
|
|
1903
|
+
paymentEntrySchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
1904
|
+
_id: false;
|
|
1905
|
+
}, {
|
|
1906
|
+
amount: number;
|
|
1907
|
+
method: string;
|
|
1908
|
+
reference?: string | null | undefined;
|
|
1909
|
+
details?: any;
|
|
1910
|
+
}, mongoose.Document<unknown, {}, {
|
|
1911
|
+
amount: number;
|
|
1912
|
+
method: string;
|
|
1913
|
+
reference?: string | null | undefined;
|
|
1914
|
+
details?: any;
|
|
1915
|
+
}, {
|
|
1916
|
+
id: string;
|
|
1917
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
1918
|
+
_id: false;
|
|
1919
|
+
}>> & Omit<{
|
|
1920
|
+
amount: number;
|
|
1921
|
+
method: string;
|
|
1922
|
+
reference?: string | null | undefined;
|
|
1923
|
+
details?: any;
|
|
1924
|
+
} & {
|
|
1925
|
+
_id: mongoose.Types.ObjectId;
|
|
1926
|
+
} & {
|
|
1927
|
+
__v: number;
|
|
1928
|
+
}, "id"> & {
|
|
1929
|
+
id: string;
|
|
1930
|
+
}, {
|
|
1931
|
+
[path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
|
|
1932
|
+
} | {
|
|
1933
|
+
[x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
|
|
1934
|
+
amount: number;
|
|
1935
|
+
method: string;
|
|
1936
|
+
reference?: string | null | undefined;
|
|
1937
|
+
details?: any;
|
|
1938
|
+
}, {
|
|
1939
|
+
id: string;
|
|
1940
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
1941
|
+
_id: false;
|
|
1942
|
+
}>> & Omit<{
|
|
1943
|
+
amount: number;
|
|
1944
|
+
method: string;
|
|
1945
|
+
reference?: string | null | undefined;
|
|
1946
|
+
details?: any;
|
|
1947
|
+
} & {
|
|
1948
|
+
_id: mongoose.Types.ObjectId;
|
|
1949
|
+
} & {
|
|
1950
|
+
__v: number;
|
|
1951
|
+
}, "id"> & {
|
|
1952
|
+
id: string;
|
|
1953
|
+
}> | undefined;
|
|
1954
|
+
}, {
|
|
1955
|
+
amount: number;
|
|
1956
|
+
method: string;
|
|
1957
|
+
reference?: string | null | undefined;
|
|
1958
|
+
details?: any;
|
|
362
1959
|
} & {
|
|
363
1960
|
_id: mongoose.Types.ObjectId;
|
|
364
1961
|
} & {
|
|
@@ -367,33 +1964,81 @@ declare const _default: {
|
|
|
367
1964
|
currentPaymentSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
368
1965
|
_id: false;
|
|
369
1966
|
}, {
|
|
370
|
-
status:
|
|
371
|
-
transactionId?: mongoose.Types.ObjectId | null | undefined;
|
|
1967
|
+
status: PaymentStatusValue;
|
|
372
1968
|
amount?: number | null | undefined;
|
|
1969
|
+
transactionId?: mongoose.Types.ObjectId | null | undefined;
|
|
373
1970
|
method?: string | null | undefined;
|
|
1971
|
+
reference?: string | null | undefined;
|
|
1972
|
+
payments?: mongoose.Types.DocumentArray<{
|
|
1973
|
+
amount: number;
|
|
1974
|
+
method: string;
|
|
1975
|
+
reference?: string | null | undefined;
|
|
1976
|
+
details?: any;
|
|
1977
|
+
}, mongoose.Types.Subdocument<bson.ObjectId, unknown, {
|
|
1978
|
+
amount: number;
|
|
1979
|
+
method: string;
|
|
1980
|
+
reference?: string | null | undefined;
|
|
1981
|
+
details?: any;
|
|
1982
|
+
}> & {
|
|
1983
|
+
amount: number;
|
|
1984
|
+
method: string;
|
|
1985
|
+
reference?: string | null | undefined;
|
|
1986
|
+
details?: any;
|
|
1987
|
+
}> | null | undefined;
|
|
374
1988
|
verifiedAt?: NativeDate | null | undefined;
|
|
375
1989
|
verifiedBy?: mongoose.Types.ObjectId | null | undefined;
|
|
376
|
-
reference?: string | null | undefined;
|
|
377
1990
|
}, mongoose.Document<unknown, {}, {
|
|
378
|
-
status:
|
|
379
|
-
transactionId?: mongoose.Types.ObjectId | null | undefined;
|
|
1991
|
+
status: PaymentStatusValue;
|
|
380
1992
|
amount?: number | null | undefined;
|
|
1993
|
+
transactionId?: mongoose.Types.ObjectId | null | undefined;
|
|
381
1994
|
method?: string | null | undefined;
|
|
1995
|
+
reference?: string | null | undefined;
|
|
1996
|
+
payments?: mongoose.Types.DocumentArray<{
|
|
1997
|
+
amount: number;
|
|
1998
|
+
method: string;
|
|
1999
|
+
reference?: string | null | undefined;
|
|
2000
|
+
details?: any;
|
|
2001
|
+
}, mongoose.Types.Subdocument<bson.ObjectId, unknown, {
|
|
2002
|
+
amount: number;
|
|
2003
|
+
method: string;
|
|
2004
|
+
reference?: string | null | undefined;
|
|
2005
|
+
details?: any;
|
|
2006
|
+
}> & {
|
|
2007
|
+
amount: number;
|
|
2008
|
+
method: string;
|
|
2009
|
+
reference?: string | null | undefined;
|
|
2010
|
+
details?: any;
|
|
2011
|
+
}> | null | undefined;
|
|
382
2012
|
verifiedAt?: NativeDate | null | undefined;
|
|
383
2013
|
verifiedBy?: mongoose.Types.ObjectId | null | undefined;
|
|
384
|
-
reference?: string | null | undefined;
|
|
385
2014
|
}, {
|
|
386
2015
|
id: string;
|
|
387
2016
|
}, mongoose.ResolveSchemaOptions<{
|
|
388
2017
|
_id: false;
|
|
389
2018
|
}>> & Omit<{
|
|
390
|
-
status:
|
|
391
|
-
transactionId?: mongoose.Types.ObjectId | null | undefined;
|
|
2019
|
+
status: PaymentStatusValue;
|
|
392
2020
|
amount?: number | null | undefined;
|
|
2021
|
+
transactionId?: mongoose.Types.ObjectId | null | undefined;
|
|
393
2022
|
method?: string | null | undefined;
|
|
2023
|
+
reference?: string | null | undefined;
|
|
2024
|
+
payments?: mongoose.Types.DocumentArray<{
|
|
2025
|
+
amount: number;
|
|
2026
|
+
method: string;
|
|
2027
|
+
reference?: string | null | undefined;
|
|
2028
|
+
details?: any;
|
|
2029
|
+
}, mongoose.Types.Subdocument<bson.ObjectId, unknown, {
|
|
2030
|
+
amount: number;
|
|
2031
|
+
method: string;
|
|
2032
|
+
reference?: string | null | undefined;
|
|
2033
|
+
details?: any;
|
|
2034
|
+
}> & {
|
|
2035
|
+
amount: number;
|
|
2036
|
+
method: string;
|
|
2037
|
+
reference?: string | null | undefined;
|
|
2038
|
+
details?: any;
|
|
2039
|
+
}> | null | undefined;
|
|
394
2040
|
verifiedAt?: NativeDate | null | undefined;
|
|
395
2041
|
verifiedBy?: mongoose.Types.ObjectId | null | undefined;
|
|
396
|
-
reference?: string | null | undefined;
|
|
397
2042
|
} & {
|
|
398
2043
|
_id: mongoose.Types.ObjectId;
|
|
399
2044
|
} & {
|
|
@@ -404,25 +2049,57 @@ declare const _default: {
|
|
|
404
2049
|
[path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
|
|
405
2050
|
} | {
|
|
406
2051
|
[x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
|
|
407
|
-
status:
|
|
408
|
-
transactionId?: mongoose.Types.ObjectId | null | undefined;
|
|
2052
|
+
status: PaymentStatusValue;
|
|
409
2053
|
amount?: number | null | undefined;
|
|
2054
|
+
transactionId?: mongoose.Types.ObjectId | null | undefined;
|
|
410
2055
|
method?: string | null | undefined;
|
|
2056
|
+
reference?: string | null | undefined;
|
|
2057
|
+
payments?: mongoose.Types.DocumentArray<{
|
|
2058
|
+
amount: number;
|
|
2059
|
+
method: string;
|
|
2060
|
+
reference?: string | null | undefined;
|
|
2061
|
+
details?: any;
|
|
2062
|
+
}, mongoose.Types.Subdocument<bson.ObjectId, unknown, {
|
|
2063
|
+
amount: number;
|
|
2064
|
+
method: string;
|
|
2065
|
+
reference?: string | null | undefined;
|
|
2066
|
+
details?: any;
|
|
2067
|
+
}> & {
|
|
2068
|
+
amount: number;
|
|
2069
|
+
method: string;
|
|
2070
|
+
reference?: string | null | undefined;
|
|
2071
|
+
details?: any;
|
|
2072
|
+
}> | null | undefined;
|
|
411
2073
|
verifiedAt?: NativeDate | null | undefined;
|
|
412
2074
|
verifiedBy?: mongoose.Types.ObjectId | null | undefined;
|
|
413
|
-
reference?: string | null | undefined;
|
|
414
2075
|
}, {
|
|
415
2076
|
id: string;
|
|
416
2077
|
}, mongoose.ResolveSchemaOptions<{
|
|
417
2078
|
_id: false;
|
|
418
2079
|
}>> & Omit<{
|
|
419
|
-
status:
|
|
420
|
-
transactionId?: mongoose.Types.ObjectId | null | undefined;
|
|
2080
|
+
status: PaymentStatusValue;
|
|
421
2081
|
amount?: number | null | undefined;
|
|
2082
|
+
transactionId?: mongoose.Types.ObjectId | null | undefined;
|
|
422
2083
|
method?: string | null | undefined;
|
|
2084
|
+
reference?: string | null | undefined;
|
|
2085
|
+
payments?: mongoose.Types.DocumentArray<{
|
|
2086
|
+
amount: number;
|
|
2087
|
+
method: string;
|
|
2088
|
+
reference?: string | null | undefined;
|
|
2089
|
+
details?: any;
|
|
2090
|
+
}, mongoose.Types.Subdocument<bson.ObjectId, unknown, {
|
|
2091
|
+
amount: number;
|
|
2092
|
+
method: string;
|
|
2093
|
+
reference?: string | null | undefined;
|
|
2094
|
+
details?: any;
|
|
2095
|
+
}> & {
|
|
2096
|
+
amount: number;
|
|
2097
|
+
method: string;
|
|
2098
|
+
reference?: string | null | undefined;
|
|
2099
|
+
details?: any;
|
|
2100
|
+
}> | null | undefined;
|
|
423
2101
|
verifiedAt?: NativeDate | null | undefined;
|
|
424
2102
|
verifiedBy?: mongoose.Types.ObjectId | null | undefined;
|
|
425
|
-
reference?: string | null | undefined;
|
|
426
2103
|
} & {
|
|
427
2104
|
_id: mongoose.Types.ObjectId;
|
|
428
2105
|
} & {
|
|
@@ -431,13 +2108,29 @@ declare const _default: {
|
|
|
431
2108
|
id: string;
|
|
432
2109
|
}> | undefined;
|
|
433
2110
|
}, {
|
|
434
|
-
status:
|
|
435
|
-
transactionId?: mongoose.Types.ObjectId | null | undefined;
|
|
2111
|
+
status: PaymentStatusValue;
|
|
436
2112
|
amount?: number | null | undefined;
|
|
2113
|
+
transactionId?: mongoose.Types.ObjectId | null | undefined;
|
|
437
2114
|
method?: string | null | undefined;
|
|
2115
|
+
reference?: string | null | undefined;
|
|
2116
|
+
payments?: mongoose.Types.DocumentArray<{
|
|
2117
|
+
amount: number;
|
|
2118
|
+
method: string;
|
|
2119
|
+
reference?: string | null | undefined;
|
|
2120
|
+
details?: any;
|
|
2121
|
+
}, mongoose.Types.Subdocument<bson.ObjectId, unknown, {
|
|
2122
|
+
amount: number;
|
|
2123
|
+
method: string;
|
|
2124
|
+
reference?: string | null | undefined;
|
|
2125
|
+
details?: any;
|
|
2126
|
+
}> & {
|
|
2127
|
+
amount: number;
|
|
2128
|
+
method: string;
|
|
2129
|
+
reference?: string | null | undefined;
|
|
2130
|
+
details?: any;
|
|
2131
|
+
}> | null | undefined;
|
|
438
2132
|
verifiedAt?: NativeDate | null | undefined;
|
|
439
2133
|
verifiedBy?: mongoose.Types.ObjectId | null | undefined;
|
|
440
|
-
reference?: string | null | undefined;
|
|
441
2134
|
} & {
|
|
442
2135
|
_id: mongoose.Types.ObjectId;
|
|
443
2136
|
} & {
|
|
@@ -684,32 +2377,21 @@ declare const _default: {
|
|
|
684
2377
|
}> & {
|
|
685
2378
|
__v: number;
|
|
686
2379
|
}>;
|
|
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
2380
|
gatewaySchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
699
2381
|
_id: false;
|
|
700
2382
|
}, {
|
|
701
2383
|
type: string;
|
|
702
2384
|
metadata: any;
|
|
2385
|
+
provider?: string | null | undefined;
|
|
703
2386
|
sessionId?: string | null | undefined;
|
|
704
2387
|
paymentIntentId?: string | null | undefined;
|
|
705
|
-
provider?: string | null | undefined;
|
|
706
2388
|
verificationData?: any;
|
|
707
2389
|
}, mongoose.Document<unknown, {}, {
|
|
708
2390
|
type: string;
|
|
709
2391
|
metadata: any;
|
|
2392
|
+
provider?: string | null | undefined;
|
|
710
2393
|
sessionId?: string | null | undefined;
|
|
711
2394
|
paymentIntentId?: string | null | undefined;
|
|
712
|
-
provider?: string | null | undefined;
|
|
713
2395
|
verificationData?: any;
|
|
714
2396
|
}, {
|
|
715
2397
|
id: string;
|
|
@@ -718,9 +2400,9 @@ declare const _default: {
|
|
|
718
2400
|
}>> & Omit<{
|
|
719
2401
|
type: string;
|
|
720
2402
|
metadata: any;
|
|
2403
|
+
provider?: string | null | undefined;
|
|
721
2404
|
sessionId?: string | null | undefined;
|
|
722
2405
|
paymentIntentId?: string | null | undefined;
|
|
723
|
-
provider?: string | null | undefined;
|
|
724
2406
|
verificationData?: any;
|
|
725
2407
|
} & {
|
|
726
2408
|
_id: mongoose.Types.ObjectId;
|
|
@@ -734,9 +2416,9 @@ declare const _default: {
|
|
|
734
2416
|
[x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
|
|
735
2417
|
type: string;
|
|
736
2418
|
metadata: any;
|
|
2419
|
+
provider?: string | null | undefined;
|
|
737
2420
|
sessionId?: string | null | undefined;
|
|
738
2421
|
paymentIntentId?: string | null | undefined;
|
|
739
|
-
provider?: string | null | undefined;
|
|
740
2422
|
verificationData?: any;
|
|
741
2423
|
}, {
|
|
742
2424
|
id: string;
|
|
@@ -745,9 +2427,9 @@ declare const _default: {
|
|
|
745
2427
|
}>> & Omit<{
|
|
746
2428
|
type: string;
|
|
747
2429
|
metadata: any;
|
|
2430
|
+
provider?: string | null | undefined;
|
|
748
2431
|
sessionId?: string | null | undefined;
|
|
749
2432
|
paymentIntentId?: string | null | undefined;
|
|
750
|
-
provider?: string | null | undefined;
|
|
751
2433
|
verificationData?: any;
|
|
752
2434
|
} & {
|
|
753
2435
|
_id: mongoose.Types.ObjectId;
|
|
@@ -759,9 +2441,9 @@ declare const _default: {
|
|
|
759
2441
|
}, {
|
|
760
2442
|
type: string;
|
|
761
2443
|
metadata: any;
|
|
2444
|
+
provider?: string | null | undefined;
|
|
762
2445
|
sessionId?: string | null | undefined;
|
|
763
2446
|
paymentIntentId?: string | null | undefined;
|
|
764
|
-
provider?: string | null | undefined;
|
|
765
2447
|
verificationData?: any;
|
|
766
2448
|
} & {
|
|
767
2449
|
_id: mongoose.Types.ObjectId;
|
|
@@ -771,54 +2453,54 @@ declare const _default: {
|
|
|
771
2453
|
commissionSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
772
2454
|
_id: false;
|
|
773
2455
|
}, {
|
|
774
|
-
status: "pending" | "paid" | "waived" | "reversed";
|
|
775
2456
|
splits: string[];
|
|
776
|
-
|
|
777
|
-
netAmount?: number | null | undefined;
|
|
778
|
-
rate?: number | null | undefined;
|
|
2457
|
+
status: "pending" | "paid" | "waived" | "reversed";
|
|
779
2458
|
gatewayFeeRate?: number | null | undefined;
|
|
780
|
-
|
|
2459
|
+
rate?: number | null | undefined;
|
|
781
2460
|
affiliate?: {
|
|
782
2461
|
recipientId?: string | null | undefined;
|
|
2462
|
+
recipientType?: "user" | "organization" | "partner" | null | undefined;
|
|
2463
|
+
rate?: number | null | undefined;
|
|
783
2464
|
grossAmount?: number | null | undefined;
|
|
784
2465
|
netAmount?: number | null | undefined;
|
|
785
|
-
rate?: number | null | undefined;
|
|
786
|
-
recipientType?: "user" | "organization" | "partner" | null | undefined;
|
|
787
2466
|
} | null | undefined;
|
|
788
|
-
}, mongoose.Document<unknown, {}, {
|
|
789
|
-
status: "pending" | "paid" | "waived" | "reversed";
|
|
790
|
-
splits: string[];
|
|
791
2467
|
grossAmount?: number | null | undefined;
|
|
2468
|
+
gatewayFeeAmount?: number | null | undefined;
|
|
792
2469
|
netAmount?: number | null | undefined;
|
|
793
|
-
|
|
2470
|
+
}, mongoose.Document<unknown, {}, {
|
|
2471
|
+
splits: string[];
|
|
2472
|
+
status: "pending" | "paid" | "waived" | "reversed";
|
|
794
2473
|
gatewayFeeRate?: number | null | undefined;
|
|
795
|
-
|
|
2474
|
+
rate?: number | null | undefined;
|
|
796
2475
|
affiliate?: {
|
|
797
2476
|
recipientId?: string | null | undefined;
|
|
2477
|
+
recipientType?: "user" | "organization" | "partner" | null | undefined;
|
|
2478
|
+
rate?: number | null | undefined;
|
|
798
2479
|
grossAmount?: number | null | undefined;
|
|
799
2480
|
netAmount?: number | null | undefined;
|
|
800
|
-
rate?: number | null | undefined;
|
|
801
|
-
recipientType?: "user" | "organization" | "partner" | null | undefined;
|
|
802
2481
|
} | null | undefined;
|
|
2482
|
+
grossAmount?: number | null | undefined;
|
|
2483
|
+
gatewayFeeAmount?: number | null | undefined;
|
|
2484
|
+
netAmount?: number | null | undefined;
|
|
803
2485
|
}, {
|
|
804
2486
|
id: string;
|
|
805
2487
|
}, mongoose.ResolveSchemaOptions<{
|
|
806
2488
|
_id: false;
|
|
807
2489
|
}>> & Omit<{
|
|
808
|
-
status: "pending" | "paid" | "waived" | "reversed";
|
|
809
2490
|
splits: string[];
|
|
810
|
-
|
|
811
|
-
netAmount?: number | null | undefined;
|
|
812
|
-
rate?: number | null | undefined;
|
|
2491
|
+
status: "pending" | "paid" | "waived" | "reversed";
|
|
813
2492
|
gatewayFeeRate?: number | null | undefined;
|
|
814
|
-
|
|
2493
|
+
rate?: number | null | undefined;
|
|
815
2494
|
affiliate?: {
|
|
816
2495
|
recipientId?: string | null | undefined;
|
|
2496
|
+
recipientType?: "user" | "organization" | "partner" | null | undefined;
|
|
2497
|
+
rate?: number | null | undefined;
|
|
817
2498
|
grossAmount?: number | null | undefined;
|
|
818
2499
|
netAmount?: number | null | undefined;
|
|
819
|
-
rate?: number | null | undefined;
|
|
820
|
-
recipientType?: "user" | "organization" | "partner" | null | undefined;
|
|
821
2500
|
} | null | undefined;
|
|
2501
|
+
grossAmount?: number | null | undefined;
|
|
2502
|
+
gatewayFeeAmount?: number | null | undefined;
|
|
2503
|
+
netAmount?: number | null | undefined;
|
|
822
2504
|
} & {
|
|
823
2505
|
_id: mongoose.Types.ObjectId;
|
|
824
2506
|
} & {
|
|
@@ -829,39 +2511,39 @@ declare const _default: {
|
|
|
829
2511
|
[path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
|
|
830
2512
|
} | {
|
|
831
2513
|
[x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
|
|
832
|
-
status: "pending" | "paid" | "waived" | "reversed";
|
|
833
2514
|
splits: string[];
|
|
834
|
-
|
|
835
|
-
netAmount?: number | null | undefined;
|
|
836
|
-
rate?: number | null | undefined;
|
|
2515
|
+
status: "pending" | "paid" | "waived" | "reversed";
|
|
837
2516
|
gatewayFeeRate?: number | null | undefined;
|
|
838
|
-
|
|
2517
|
+
rate?: number | null | undefined;
|
|
839
2518
|
affiliate?: {
|
|
840
2519
|
recipientId?: string | null | undefined;
|
|
2520
|
+
recipientType?: "user" | "organization" | "partner" | null | undefined;
|
|
2521
|
+
rate?: number | null | undefined;
|
|
841
2522
|
grossAmount?: number | null | undefined;
|
|
842
2523
|
netAmount?: number | null | undefined;
|
|
843
|
-
rate?: number | null | undefined;
|
|
844
|
-
recipientType?: "user" | "organization" | "partner" | null | undefined;
|
|
845
2524
|
} | null | undefined;
|
|
2525
|
+
grossAmount?: number | null | undefined;
|
|
2526
|
+
gatewayFeeAmount?: number | null | undefined;
|
|
2527
|
+
netAmount?: number | null | undefined;
|
|
846
2528
|
}, {
|
|
847
2529
|
id: string;
|
|
848
2530
|
}, mongoose.ResolveSchemaOptions<{
|
|
849
2531
|
_id: false;
|
|
850
2532
|
}>> & Omit<{
|
|
851
|
-
status: "pending" | "paid" | "waived" | "reversed";
|
|
852
2533
|
splits: string[];
|
|
853
|
-
|
|
854
|
-
netAmount?: number | null | undefined;
|
|
855
|
-
rate?: number | null | undefined;
|
|
2534
|
+
status: "pending" | "paid" | "waived" | "reversed";
|
|
856
2535
|
gatewayFeeRate?: number | null | undefined;
|
|
857
|
-
|
|
2536
|
+
rate?: number | null | undefined;
|
|
858
2537
|
affiliate?: {
|
|
859
2538
|
recipientId?: string | null | undefined;
|
|
2539
|
+
recipientType?: "user" | "organization" | "partner" | null | undefined;
|
|
2540
|
+
rate?: number | null | undefined;
|
|
860
2541
|
grossAmount?: number | null | undefined;
|
|
861
2542
|
netAmount?: number | null | undefined;
|
|
862
|
-
rate?: number | null | undefined;
|
|
863
|
-
recipientType?: "user" | "organization" | "partner" | null | undefined;
|
|
864
2543
|
} | null | undefined;
|
|
2544
|
+
grossAmount?: number | null | undefined;
|
|
2545
|
+
gatewayFeeAmount?: number | null | undefined;
|
|
2546
|
+
netAmount?: number | null | undefined;
|
|
865
2547
|
} & {
|
|
866
2548
|
_id: mongoose.Types.ObjectId;
|
|
867
2549
|
} & {
|
|
@@ -870,20 +2552,99 @@ declare const _default: {
|
|
|
870
2552
|
id: string;
|
|
871
2553
|
}> | undefined;
|
|
872
2554
|
}, {
|
|
873
|
-
status: "pending" | "paid" | "waived" | "reversed";
|
|
874
2555
|
splits: string[];
|
|
875
|
-
|
|
876
|
-
netAmount?: number | null | undefined;
|
|
877
|
-
rate?: number | null | undefined;
|
|
2556
|
+
status: "pending" | "paid" | "waived" | "reversed";
|
|
878
2557
|
gatewayFeeRate?: number | null | undefined;
|
|
879
|
-
|
|
2558
|
+
rate?: number | null | undefined;
|
|
880
2559
|
affiliate?: {
|
|
881
2560
|
recipientId?: string | null | undefined;
|
|
2561
|
+
recipientType?: "user" | "organization" | "partner" | null | undefined;
|
|
2562
|
+
rate?: number | null | undefined;
|
|
882
2563
|
grossAmount?: number | null | undefined;
|
|
883
2564
|
netAmount?: number | null | undefined;
|
|
884
|
-
rate?: number | null | undefined;
|
|
885
|
-
recipientType?: "user" | "organization" | "partner" | null | undefined;
|
|
886
2565
|
} | null | undefined;
|
|
2566
|
+
grossAmount?: number | null | undefined;
|
|
2567
|
+
gatewayFeeAmount?: number | null | undefined;
|
|
2568
|
+
netAmount?: number | null | undefined;
|
|
2569
|
+
} & {
|
|
2570
|
+
_id: mongoose.Types.ObjectId;
|
|
2571
|
+
} & {
|
|
2572
|
+
__v: number;
|
|
2573
|
+
}>;
|
|
2574
|
+
taxBreakdownSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
2575
|
+
_id: false;
|
|
2576
|
+
}, {
|
|
2577
|
+
rate: number;
|
|
2578
|
+
isApplicable: boolean;
|
|
2579
|
+
baseAmount: number;
|
|
2580
|
+
taxAmount: number;
|
|
2581
|
+
totalAmount: number;
|
|
2582
|
+
type?: "paid" | "collected" | "exempt" | null | undefined;
|
|
2583
|
+
pricesIncludeTax?: boolean | null | undefined;
|
|
2584
|
+
}, mongoose.Document<unknown, {}, {
|
|
2585
|
+
rate: number;
|
|
2586
|
+
isApplicable: boolean;
|
|
2587
|
+
baseAmount: number;
|
|
2588
|
+
taxAmount: number;
|
|
2589
|
+
totalAmount: number;
|
|
2590
|
+
type?: "paid" | "collected" | "exempt" | null | undefined;
|
|
2591
|
+
pricesIncludeTax?: boolean | null | undefined;
|
|
2592
|
+
}, {
|
|
2593
|
+
id: string;
|
|
2594
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
2595
|
+
_id: false;
|
|
2596
|
+
}>> & Omit<{
|
|
2597
|
+
rate: number;
|
|
2598
|
+
isApplicable: boolean;
|
|
2599
|
+
baseAmount: number;
|
|
2600
|
+
taxAmount: number;
|
|
2601
|
+
totalAmount: number;
|
|
2602
|
+
type?: "paid" | "collected" | "exempt" | null | undefined;
|
|
2603
|
+
pricesIncludeTax?: boolean | null | undefined;
|
|
2604
|
+
} & {
|
|
2605
|
+
_id: mongoose.Types.ObjectId;
|
|
2606
|
+
} & {
|
|
2607
|
+
__v: number;
|
|
2608
|
+
}, "id"> & {
|
|
2609
|
+
id: string;
|
|
2610
|
+
}, {
|
|
2611
|
+
[path: string]: mongoose.SchemaDefinitionProperty<undefined, any, any>;
|
|
2612
|
+
} | {
|
|
2613
|
+
[x: string]: mongoose.SchemaDefinitionProperty<any, any, mongoose.Document<unknown, {}, {
|
|
2614
|
+
rate: number;
|
|
2615
|
+
isApplicable: boolean;
|
|
2616
|
+
baseAmount: number;
|
|
2617
|
+
taxAmount: number;
|
|
2618
|
+
totalAmount: number;
|
|
2619
|
+
type?: "paid" | "collected" | "exempt" | null | undefined;
|
|
2620
|
+
pricesIncludeTax?: boolean | null | undefined;
|
|
2621
|
+
}, {
|
|
2622
|
+
id: string;
|
|
2623
|
+
}, mongoose.ResolveSchemaOptions<{
|
|
2624
|
+
_id: false;
|
|
2625
|
+
}>> & Omit<{
|
|
2626
|
+
rate: number;
|
|
2627
|
+
isApplicable: boolean;
|
|
2628
|
+
baseAmount: number;
|
|
2629
|
+
taxAmount: number;
|
|
2630
|
+
totalAmount: number;
|
|
2631
|
+
type?: "paid" | "collected" | "exempt" | null | undefined;
|
|
2632
|
+
pricesIncludeTax?: boolean | null | undefined;
|
|
2633
|
+
} & {
|
|
2634
|
+
_id: mongoose.Types.ObjectId;
|
|
2635
|
+
} & {
|
|
2636
|
+
__v: number;
|
|
2637
|
+
}, "id"> & {
|
|
2638
|
+
id: string;
|
|
2639
|
+
}> | undefined;
|
|
2640
|
+
}, {
|
|
2641
|
+
rate: number;
|
|
2642
|
+
isApplicable: boolean;
|
|
2643
|
+
baseAmount: number;
|
|
2644
|
+
taxAmount: number;
|
|
2645
|
+
totalAmount: number;
|
|
2646
|
+
type?: "paid" | "collected" | "exempt" | null | undefined;
|
|
2647
|
+
pricesIncludeTax?: boolean | null | undefined;
|
|
887
2648
|
} & {
|
|
888
2649
|
_id: mongoose.Types.ObjectId;
|
|
889
2650
|
} & {
|
|
@@ -891,4 +2652,4 @@ declare const _default: {
|
|
|
891
2652
|
}>;
|
|
892
2653
|
};
|
|
893
2654
|
|
|
894
|
-
export { _default as default };
|
|
2655
|
+
export { type TaxBreakdown, baseMetadataSchema, commissionSchema, currentPaymentSchema, _default as default, gatewaySchema, holdSchema, paymentDetailsSchema, paymentEntrySchema, paymentSummarySchema, planSchema, splitSchema, subscriptionInfoSchema, taxBreakdownSchema, tenantSnapshotSchema };
|