@temboplus/afloat 0.2.0-beta.9 → 0.2.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +150 -238
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/lib/api/base-repository.d.ts +8 -8
- package/dist/modules/auth/auth.contract.d.ts +30 -28
- package/dist/modules/auth/auth.dtos.d.ts +117 -0
- package/dist/modules/auth/auth.repository.d.ts +9 -4
- package/dist/modules/auth/company-membership.model.d.ts +13 -13
- package/dist/modules/auth/index.d.ts +1 -0
- package/dist/modules/auth/user.model.d.ts +27 -66
- package/dist/modules/beneficiary/beneficiary-info.model.d.ts +34 -16
- package/dist/modules/beneficiary/beneficiary.model.d.ts +53 -65
- package/dist/modules/beneficiary/index.d.ts +2 -2
- package/dist/modules/login/login.model.d.ts +26 -3
- package/dist/modules/payout/payout.api-contract.d.ts +78 -0
- package/dist/modules/payout/payout.dtos.d.ts +108 -0
- package/dist/modules/payout/payout.model.d.ts +60 -29
- package/dist/modules/payout/payout.query.d.ts +52 -4
- package/dist/modules/payout/payout.repository.d.ts +1 -1
- package/dist/modules/profile/profile.model.d.ts +3 -3
- package/dist/modules/team-member/role.model.d.ts +3 -3
- package/dist/modules/team-member/team-member.model.d.ts +8 -8
- package/dist/modules/wallet/narration.model.d.ts +3 -3
- package/dist/modules/wallet/statement-entry.model.d.ts +23 -23
- package/dist/modules/wallet/wallet.model.d.ts +3 -3
- package/dist/modules/wallet/wallet.repository.d.ts +2 -2
- package/package.json +3 -4
|
@@ -116,6 +116,8 @@ declare const PayoutDTOSchema: z.ZodObject<{
|
|
|
116
116
|
updatedAt: z.ZodDate;
|
|
117
117
|
actionedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
118
118
|
approvalStatus: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof PayoutApprovalStatus>>>;
|
|
119
|
+
createdById: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
120
|
+
actionedById: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
119
121
|
createdBy: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
120
122
|
id: z.ZodString;
|
|
121
123
|
name: z.ZodString;
|
|
@@ -160,6 +162,8 @@ declare const PayoutDTOSchema: z.ZodObject<{
|
|
|
160
162
|
partnerReference?: string | null | undefined;
|
|
161
163
|
actionedAt?: Date | null | undefined;
|
|
162
164
|
approvalStatus?: PayoutApprovalStatus | null | undefined;
|
|
165
|
+
createdById?: string | null | undefined;
|
|
166
|
+
actionedById?: string | null | undefined;
|
|
163
167
|
createdBy?: {
|
|
164
168
|
name: string;
|
|
165
169
|
id: string;
|
|
@@ -188,6 +192,8 @@ declare const PayoutDTOSchema: z.ZodObject<{
|
|
|
188
192
|
partnerReference?: string | null | undefined;
|
|
189
193
|
actionedAt?: Date | null | undefined;
|
|
190
194
|
approvalStatus?: PayoutApprovalStatus | null | undefined;
|
|
195
|
+
createdById?: string | null | undefined;
|
|
196
|
+
actionedById?: string | null | undefined;
|
|
191
197
|
createdBy?: {
|
|
192
198
|
name: string;
|
|
193
199
|
id: string;
|
|
@@ -211,13 +217,21 @@ declare const PayoutFiltersSchema: z.ZodObject<{
|
|
|
211
217
|
endDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
212
218
|
payeeName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
213
219
|
msisdn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
220
|
+
msisdnIn: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>>;
|
|
214
221
|
profileId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
215
222
|
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
216
223
|
partnerReference: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
217
224
|
channel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
225
|
+
channelIn: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>>;
|
|
218
226
|
currencyCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
219
227
|
status: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof PayoutStatus>>>;
|
|
228
|
+
statusIn: z.ZodOptional<z.ZodNullable<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>, z.ZodArray<z.ZodNativeEnum<typeof PayoutStatus>, "many">>>>;
|
|
220
229
|
approvalStatus: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof PayoutApprovalStatus>>>;
|
|
230
|
+
approvalStatusIn: z.ZodOptional<z.ZodNullable<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>, z.ZodArray<z.ZodNativeEnum<typeof PayoutApprovalStatus>, "many">>>>;
|
|
231
|
+
createdById: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
232
|
+
createdByIdIn: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>>;
|
|
233
|
+
actionedById: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
234
|
+
actionedByIdIn: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>>;
|
|
221
235
|
minAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
222
236
|
maxAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
223
237
|
search: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -236,8 +250,16 @@ declare const PayoutFiltersSchema: z.ZodObject<{
|
|
|
236
250
|
currencyCode?: string | null | undefined;
|
|
237
251
|
partnerReference?: string | null | undefined;
|
|
238
252
|
approvalStatus?: PayoutApprovalStatus | null | undefined;
|
|
253
|
+
createdById?: string | null | undefined;
|
|
254
|
+
actionedById?: string | null | undefined;
|
|
239
255
|
startDate?: string | null | undefined;
|
|
240
256
|
endDate?: string | null | undefined;
|
|
257
|
+
msisdnIn?: string[] | null | undefined;
|
|
258
|
+
channelIn?: string[] | null | undefined;
|
|
259
|
+
statusIn?: PayoutStatus[] | null | undefined;
|
|
260
|
+
approvalStatusIn?: PayoutApprovalStatus[] | null | undefined;
|
|
261
|
+
createdByIdIn?: string[] | null | undefined;
|
|
262
|
+
actionedByIdIn?: string[] | null | undefined;
|
|
241
263
|
minAmount?: number | null | undefined;
|
|
242
264
|
maxAmount?: number | null | undefined;
|
|
243
265
|
}, {
|
|
@@ -253,10 +275,18 @@ declare const PayoutFiltersSchema: z.ZodObject<{
|
|
|
253
275
|
currencyCode?: string | null | undefined;
|
|
254
276
|
partnerReference?: string | null | undefined;
|
|
255
277
|
approvalStatus?: PayoutApprovalStatus | null | undefined;
|
|
278
|
+
createdById?: string | null | undefined;
|
|
279
|
+
actionedById?: string | null | undefined;
|
|
256
280
|
sortBy?: string | undefined;
|
|
257
281
|
sortOrder?: "asc" | "desc" | undefined;
|
|
258
282
|
startDate?: string | null | undefined;
|
|
259
283
|
endDate?: string | null | undefined;
|
|
284
|
+
msisdnIn?: string | string[] | null | undefined;
|
|
285
|
+
channelIn?: string | string[] | null | undefined;
|
|
286
|
+
statusIn?: string | string[] | null | undefined;
|
|
287
|
+
approvalStatusIn?: string | string[] | null | undefined;
|
|
288
|
+
createdByIdIn?: string | string[] | null | undefined;
|
|
289
|
+
actionedByIdIn?: string | string[] | null | undefined;
|
|
260
290
|
minAmount?: number | null | undefined;
|
|
261
291
|
maxAmount?: number | null | undefined;
|
|
262
292
|
}>;
|
|
@@ -272,12 +302,20 @@ declare const PayoutURLQueryParamsSchema: z.ZodObject<{
|
|
|
272
302
|
endDate: z.ZodOptional<z.ZodString>;
|
|
273
303
|
payeeName: z.ZodOptional<z.ZodString>;
|
|
274
304
|
msisdn: z.ZodOptional<z.ZodString>;
|
|
305
|
+
msisdnIn: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>;
|
|
275
306
|
profileId: z.ZodOptional<z.ZodString>;
|
|
276
307
|
id: z.ZodOptional<z.ZodString>;
|
|
277
308
|
partnerReference: z.ZodOptional<z.ZodString>;
|
|
278
309
|
channel: z.ZodOptional<z.ZodString>;
|
|
310
|
+
channelIn: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>;
|
|
279
311
|
status: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, PayoutStatus, string>>;
|
|
312
|
+
statusIn: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>, z.ZodArray<z.ZodNativeEnum<typeof PayoutStatus>, "many">>>;
|
|
280
313
|
approvalStatus: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, PayoutApprovalStatus, string>>;
|
|
314
|
+
approvalStatusIn: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>, z.ZodArray<z.ZodNativeEnum<typeof PayoutApprovalStatus>, "many">>>;
|
|
315
|
+
createdById: z.ZodOptional<z.ZodString>;
|
|
316
|
+
createdByIdIn: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>;
|
|
317
|
+
actionedById: z.ZodOptional<z.ZodString>;
|
|
318
|
+
actionedByIdIn: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>;
|
|
281
319
|
minAmount: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
282
320
|
maxAmount: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
283
321
|
search: z.ZodOptional<z.ZodString>;
|
|
@@ -295,8 +333,16 @@ declare const PayoutURLQueryParamsSchema: z.ZodObject<{
|
|
|
295
333
|
payeeName?: string | undefined;
|
|
296
334
|
partnerReference?: string | undefined;
|
|
297
335
|
approvalStatus?: PayoutApprovalStatus | undefined;
|
|
336
|
+
createdById?: string | undefined;
|
|
337
|
+
actionedById?: string | undefined;
|
|
298
338
|
startDate?: string | undefined;
|
|
299
339
|
endDate?: string | undefined;
|
|
340
|
+
msisdnIn?: string[] | undefined;
|
|
341
|
+
channelIn?: string[] | undefined;
|
|
342
|
+
statusIn?: PayoutStatus[] | undefined;
|
|
343
|
+
approvalStatusIn?: PayoutApprovalStatus[] | undefined;
|
|
344
|
+
createdByIdIn?: string[] | undefined;
|
|
345
|
+
actionedByIdIn?: string[] | undefined;
|
|
300
346
|
minAmount?: number | undefined;
|
|
301
347
|
maxAmount?: number | undefined;
|
|
302
348
|
}, {
|
|
@@ -311,10 +357,18 @@ declare const PayoutURLQueryParamsSchema: z.ZodObject<{
|
|
|
311
357
|
payeeName?: string | undefined;
|
|
312
358
|
partnerReference?: string | undefined;
|
|
313
359
|
approvalStatus?: string | undefined;
|
|
360
|
+
createdById?: string | undefined;
|
|
361
|
+
actionedById?: string | undefined;
|
|
314
362
|
sortBy?: string | undefined;
|
|
315
363
|
sortOrder?: "asc" | "desc" | undefined;
|
|
316
364
|
startDate?: string | undefined;
|
|
317
365
|
endDate?: string | undefined;
|
|
366
|
+
msisdnIn?: string | string[] | undefined;
|
|
367
|
+
channelIn?: string | string[] | undefined;
|
|
368
|
+
statusIn?: string | string[] | undefined;
|
|
369
|
+
approvalStatusIn?: string | string[] | undefined;
|
|
370
|
+
createdByIdIn?: string | string[] | undefined;
|
|
371
|
+
actionedByIdIn?: string | string[] | undefined;
|
|
318
372
|
minAmount?: string | undefined;
|
|
319
373
|
maxAmount?: string | undefined;
|
|
320
374
|
}>;
|
|
@@ -365,6 +419,8 @@ export declare const PayoutDTOSchemas: {
|
|
|
365
419
|
updatedAt: z.ZodDate;
|
|
366
420
|
actionedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
367
421
|
approvalStatus: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof PayoutApprovalStatus>>>;
|
|
422
|
+
createdById: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
423
|
+
actionedById: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
368
424
|
createdBy: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
369
425
|
id: z.ZodString;
|
|
370
426
|
name: z.ZodString;
|
|
@@ -409,6 +465,8 @@ export declare const PayoutDTOSchemas: {
|
|
|
409
465
|
partnerReference?: string | null | undefined;
|
|
410
466
|
actionedAt?: Date | null | undefined;
|
|
411
467
|
approvalStatus?: PayoutApprovalStatus | null | undefined;
|
|
468
|
+
createdById?: string | null | undefined;
|
|
469
|
+
actionedById?: string | null | undefined;
|
|
412
470
|
createdBy?: {
|
|
413
471
|
name: string;
|
|
414
472
|
id: string;
|
|
@@ -437,6 +495,8 @@ export declare const PayoutDTOSchemas: {
|
|
|
437
495
|
partnerReference?: string | null | undefined;
|
|
438
496
|
actionedAt?: Date | null | undefined;
|
|
439
497
|
approvalStatus?: PayoutApprovalStatus | null | undefined;
|
|
498
|
+
createdById?: string | null | undefined;
|
|
499
|
+
actionedById?: string | null | undefined;
|
|
440
500
|
createdBy?: {
|
|
441
501
|
name: string;
|
|
442
502
|
id: string;
|
|
@@ -495,13 +555,21 @@ export declare const PayoutDTOSchemas: {
|
|
|
495
555
|
endDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
496
556
|
payeeName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
497
557
|
msisdn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
558
|
+
msisdnIn: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>>;
|
|
498
559
|
profileId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
499
560
|
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
500
561
|
partnerReference: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
501
562
|
channel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
563
|
+
channelIn: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>>;
|
|
502
564
|
currencyCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
503
565
|
status: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof PayoutStatus>>>;
|
|
566
|
+
statusIn: z.ZodOptional<z.ZodNullable<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>, z.ZodArray<z.ZodNativeEnum<typeof PayoutStatus>, "many">>>>;
|
|
504
567
|
approvalStatus: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof PayoutApprovalStatus>>>;
|
|
568
|
+
approvalStatusIn: z.ZodOptional<z.ZodNullable<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>, z.ZodArray<z.ZodNativeEnum<typeof PayoutApprovalStatus>, "many">>>>;
|
|
569
|
+
createdById: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
570
|
+
createdByIdIn: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>>;
|
|
571
|
+
actionedById: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
572
|
+
actionedByIdIn: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>>;
|
|
505
573
|
minAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
506
574
|
maxAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
507
575
|
search: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -520,8 +588,16 @@ export declare const PayoutDTOSchemas: {
|
|
|
520
588
|
currencyCode?: string | null | undefined;
|
|
521
589
|
partnerReference?: string | null | undefined;
|
|
522
590
|
approvalStatus?: PayoutApprovalStatus | null | undefined;
|
|
591
|
+
createdById?: string | null | undefined;
|
|
592
|
+
actionedById?: string | null | undefined;
|
|
523
593
|
startDate?: string | null | undefined;
|
|
524
594
|
endDate?: string | null | undefined;
|
|
595
|
+
msisdnIn?: string[] | null | undefined;
|
|
596
|
+
channelIn?: string[] | null | undefined;
|
|
597
|
+
statusIn?: PayoutStatus[] | null | undefined;
|
|
598
|
+
approvalStatusIn?: PayoutApprovalStatus[] | null | undefined;
|
|
599
|
+
createdByIdIn?: string[] | null | undefined;
|
|
600
|
+
actionedByIdIn?: string[] | null | undefined;
|
|
525
601
|
minAmount?: number | null | undefined;
|
|
526
602
|
maxAmount?: number | null | undefined;
|
|
527
603
|
}, {
|
|
@@ -537,10 +613,18 @@ export declare const PayoutDTOSchemas: {
|
|
|
537
613
|
currencyCode?: string | null | undefined;
|
|
538
614
|
partnerReference?: string | null | undefined;
|
|
539
615
|
approvalStatus?: PayoutApprovalStatus | null | undefined;
|
|
616
|
+
createdById?: string | null | undefined;
|
|
617
|
+
actionedById?: string | null | undefined;
|
|
540
618
|
sortBy?: string | undefined;
|
|
541
619
|
sortOrder?: "asc" | "desc" | undefined;
|
|
542
620
|
startDate?: string | null | undefined;
|
|
543
621
|
endDate?: string | null | undefined;
|
|
622
|
+
msisdnIn?: string | string[] | null | undefined;
|
|
623
|
+
channelIn?: string | string[] | null | undefined;
|
|
624
|
+
statusIn?: string | string[] | null | undefined;
|
|
625
|
+
approvalStatusIn?: string | string[] | null | undefined;
|
|
626
|
+
createdByIdIn?: string | string[] | null | undefined;
|
|
627
|
+
actionedByIdIn?: string | string[] | null | undefined;
|
|
544
628
|
minAmount?: number | null | undefined;
|
|
545
629
|
maxAmount?: number | null | undefined;
|
|
546
630
|
}>;
|
|
@@ -553,12 +637,20 @@ export declare const PayoutDTOSchemas: {
|
|
|
553
637
|
endDate: z.ZodOptional<z.ZodString>;
|
|
554
638
|
payeeName: z.ZodOptional<z.ZodString>;
|
|
555
639
|
msisdn: z.ZodOptional<z.ZodString>;
|
|
640
|
+
msisdnIn: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>;
|
|
556
641
|
profileId: z.ZodOptional<z.ZodString>;
|
|
557
642
|
id: z.ZodOptional<z.ZodString>;
|
|
558
643
|
partnerReference: z.ZodOptional<z.ZodString>;
|
|
559
644
|
channel: z.ZodOptional<z.ZodString>;
|
|
645
|
+
channelIn: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>;
|
|
560
646
|
status: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, PayoutStatus, string>>;
|
|
647
|
+
statusIn: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>, z.ZodArray<z.ZodNativeEnum<typeof PayoutStatus>, "many">>>;
|
|
561
648
|
approvalStatus: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, PayoutApprovalStatus, string>>;
|
|
649
|
+
approvalStatusIn: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>, z.ZodArray<z.ZodNativeEnum<typeof PayoutApprovalStatus>, "many">>>;
|
|
650
|
+
createdById: z.ZodOptional<z.ZodString>;
|
|
651
|
+
createdByIdIn: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>;
|
|
652
|
+
actionedById: z.ZodOptional<z.ZodString>;
|
|
653
|
+
actionedByIdIn: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>;
|
|
562
654
|
minAmount: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
563
655
|
maxAmount: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
564
656
|
search: z.ZodOptional<z.ZodString>;
|
|
@@ -576,8 +668,16 @@ export declare const PayoutDTOSchemas: {
|
|
|
576
668
|
payeeName?: string | undefined;
|
|
577
669
|
partnerReference?: string | undefined;
|
|
578
670
|
approvalStatus?: PayoutApprovalStatus | undefined;
|
|
671
|
+
createdById?: string | undefined;
|
|
672
|
+
actionedById?: string | undefined;
|
|
579
673
|
startDate?: string | undefined;
|
|
580
674
|
endDate?: string | undefined;
|
|
675
|
+
msisdnIn?: string[] | undefined;
|
|
676
|
+
channelIn?: string[] | undefined;
|
|
677
|
+
statusIn?: PayoutStatus[] | undefined;
|
|
678
|
+
approvalStatusIn?: PayoutApprovalStatus[] | undefined;
|
|
679
|
+
createdByIdIn?: string[] | undefined;
|
|
680
|
+
actionedByIdIn?: string[] | undefined;
|
|
581
681
|
minAmount?: number | undefined;
|
|
582
682
|
maxAmount?: number | undefined;
|
|
583
683
|
}, {
|
|
@@ -592,10 +692,18 @@ export declare const PayoutDTOSchemas: {
|
|
|
592
692
|
payeeName?: string | undefined;
|
|
593
693
|
partnerReference?: string | undefined;
|
|
594
694
|
approvalStatus?: string | undefined;
|
|
695
|
+
createdById?: string | undefined;
|
|
696
|
+
actionedById?: string | undefined;
|
|
595
697
|
sortBy?: string | undefined;
|
|
596
698
|
sortOrder?: "asc" | "desc" | undefined;
|
|
597
699
|
startDate?: string | undefined;
|
|
598
700
|
endDate?: string | undefined;
|
|
701
|
+
msisdnIn?: string | string[] | undefined;
|
|
702
|
+
channelIn?: string | string[] | undefined;
|
|
703
|
+
statusIn?: string | string[] | undefined;
|
|
704
|
+
approvalStatusIn?: string | string[] | undefined;
|
|
705
|
+
createdByIdIn?: string | string[] | undefined;
|
|
706
|
+
actionedByIdIn?: string | string[] | undefined;
|
|
599
707
|
minAmount?: string | undefined;
|
|
600
708
|
maxAmount?: string | undefined;
|
|
601
709
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PayoutDTO, PayoutStatus, PayoutApprovalStatus, PayoutAuthorizer } from "@/modules/payout/payout.dtos.js";
|
|
2
2
|
import { Amount } from "@temboplus/frontend-core";
|
|
3
|
-
import { BeneficiaryInfo } from "../beneficiary/beneficiary-info.model.js";
|
|
3
|
+
import { type BeneficiaryInfo } from "../beneficiary/beneficiary-info.model.js";
|
|
4
4
|
import z from "zod";
|
|
5
5
|
/**
|
|
6
6
|
* Zod schema for Payout JSON serialization
|
|
@@ -24,6 +24,8 @@ export declare const PayoutJSONSchema: z.ZodObject<{
|
|
|
24
24
|
updatedAt: z.ZodString;
|
|
25
25
|
actionedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
26
26
|
approvalStatus: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof PayoutApprovalStatus>>>;
|
|
27
|
+
createdById: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
28
|
+
actionedById: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
27
29
|
createdBy: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
28
30
|
id: z.ZodString;
|
|
29
31
|
name: z.ZodString;
|
|
@@ -50,12 +52,12 @@ export declare const PayoutJSONSchema: z.ZodObject<{
|
|
|
50
52
|
id: string;
|
|
51
53
|
identity: string;
|
|
52
54
|
}>>>;
|
|
53
|
-
|
|
55
|
+
_version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
54
56
|
}, "strip", z.ZodTypeAny, {
|
|
55
57
|
status: PayoutStatus;
|
|
56
58
|
createdAt: string;
|
|
57
59
|
id: string;
|
|
58
|
-
|
|
60
|
+
_version: string;
|
|
59
61
|
profileId: string;
|
|
60
62
|
updatedAt: string;
|
|
61
63
|
description: string;
|
|
@@ -70,6 +72,8 @@ export declare const PayoutJSONSchema: z.ZodObject<{
|
|
|
70
72
|
partnerReference?: string | null | undefined;
|
|
71
73
|
actionedAt?: string | null | undefined;
|
|
72
74
|
approvalStatus?: PayoutApprovalStatus | null | undefined;
|
|
75
|
+
createdById?: string | null | undefined;
|
|
76
|
+
actionedById?: string | null | undefined;
|
|
73
77
|
createdBy?: {
|
|
74
78
|
name: string;
|
|
75
79
|
id: string;
|
|
@@ -94,11 +98,13 @@ export declare const PayoutJSONSchema: z.ZodObject<{
|
|
|
94
98
|
countryCode: string;
|
|
95
99
|
currencyCode: string;
|
|
96
100
|
statusMessage: string;
|
|
97
|
-
|
|
101
|
+
_version?: string | undefined;
|
|
98
102
|
notes?: string | null | undefined;
|
|
99
103
|
partnerReference?: string | null | undefined;
|
|
100
104
|
actionedAt?: string | null | undefined;
|
|
101
105
|
approvalStatus?: PayoutApprovalStatus | null | undefined;
|
|
106
|
+
createdById?: string | null | undefined;
|
|
107
|
+
actionedById?: string | null | undefined;
|
|
102
108
|
createdBy?: {
|
|
103
109
|
name: string;
|
|
104
110
|
id: string;
|
|
@@ -118,7 +124,27 @@ export type PayoutJSON = z.infer<typeof PayoutJSONSchema>;
|
|
|
118
124
|
* Payout class that wraps the Zod schema and provides additional functionality
|
|
119
125
|
*/
|
|
120
126
|
export declare class Payout {
|
|
121
|
-
private readonly
|
|
127
|
+
private readonly _id;
|
|
128
|
+
private readonly _profileId;
|
|
129
|
+
private readonly _payeeName;
|
|
130
|
+
private readonly _channel;
|
|
131
|
+
private readonly _msisdn;
|
|
132
|
+
private readonly _amount;
|
|
133
|
+
private readonly _currencyCode;
|
|
134
|
+
private readonly _countryCode;
|
|
135
|
+
private readonly _description;
|
|
136
|
+
private readonly _notes;
|
|
137
|
+
private readonly _status;
|
|
138
|
+
private readonly _statusMessage;
|
|
139
|
+
private readonly _partnerReference;
|
|
140
|
+
private readonly _createdAt;
|
|
141
|
+
private readonly _updatedAt;
|
|
142
|
+
private readonly _actionedAt;
|
|
143
|
+
private readonly _approvalStatus;
|
|
144
|
+
private readonly _createdById;
|
|
145
|
+
private readonly _actionedById;
|
|
146
|
+
private readonly _createdBy;
|
|
147
|
+
private readonly _actionedBy;
|
|
122
148
|
/**
|
|
123
149
|
* Private constructor - use static methods to create instances
|
|
124
150
|
*/
|
|
@@ -167,6 +193,10 @@ export declare class Payout {
|
|
|
167
193
|
get actionedAt(): Date | undefined | null;
|
|
168
194
|
/** Current approval status of the payout */
|
|
169
195
|
get approvalStatus(): PayoutApprovalStatus | undefined | null;
|
|
196
|
+
/** Identifier of the user who created the payout */
|
|
197
|
+
get createdById(): string | undefined | null;
|
|
198
|
+
/** Identifier of the user who last actioned the payout */
|
|
199
|
+
get actionedById(): string | undefined | null;
|
|
170
200
|
/** Information about who created the payout */
|
|
171
201
|
get createdBy(): PayoutAuthorizer | undefined | null;
|
|
172
202
|
/** Information about who last actioned the payout */
|
|
@@ -199,7 +229,7 @@ export declare class Payout {
|
|
|
199
229
|
* This is useful when validating raw data structures before instantiation.
|
|
200
230
|
*
|
|
201
231
|
* @param {unknown} obj - The value containing potential payout data
|
|
202
|
-
* @returns {obj is
|
|
232
|
+
* @returns {obj is PayoutDTO} Type predicate indicating if a Payout can be constructed
|
|
203
233
|
*
|
|
204
234
|
* @example
|
|
205
235
|
* ```typescript
|
|
@@ -216,7 +246,7 @@ export declare class Payout {
|
|
|
216
246
|
* @remarks
|
|
217
247
|
* This method performs strict validation against the {@link PayoutData} schema
|
|
218
248
|
*/
|
|
219
|
-
static canConstruct(obj: unknown): obj is
|
|
249
|
+
static canConstruct(obj: unknown): obj is PayoutDTO;
|
|
220
250
|
/**
|
|
221
251
|
* Validates if an unknown value is a Payout instance.
|
|
222
252
|
* This is a runtime type guard that ensures proper object structure and data validity.
|
|
@@ -238,8 +268,8 @@ export declare class Payout {
|
|
|
238
268
|
* @remarks
|
|
239
269
|
* This method performs a complete structural validation:
|
|
240
270
|
* 1. Checks if the value is an object
|
|
241
|
-
* 2. Verifies
|
|
242
|
-
* 3. Validates the
|
|
271
|
+
* 2. Verifies the instance can serialize to a valid flat PayoutJSON
|
|
272
|
+
* 3. Validates the JSON against PayoutData schema
|
|
243
273
|
* 4. Ensures the object is a proper Payout instance
|
|
244
274
|
*
|
|
245
275
|
* Use this method when:
|
|
@@ -250,26 +280,26 @@ export declare class Payout {
|
|
|
250
280
|
*/
|
|
251
281
|
static is(obj: unknown): obj is Payout;
|
|
252
282
|
/**
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
283
|
+
* Serializes the Payout instance to a JSON-compatible object
|
|
284
|
+
*
|
|
285
|
+
* Converts all Date objects to ISO strings for proper JSON serialization.
|
|
286
|
+
* The resulting object can be safely stringified and stored or transmitted.
|
|
287
|
+
*
|
|
288
|
+
* @returns {PayoutJSON} A plain object containing all payout data
|
|
289
|
+
*
|
|
290
|
+
* @example
|
|
291
|
+
* ```typescript
|
|
292
|
+
* const payout = Payout.create(payoutData);
|
|
293
|
+
* const json = payout.toJSON();
|
|
294
|
+
* // {
|
|
295
|
+
* // id: "payout-123",
|
|
296
|
+
* // amount: 50000,
|
|
297
|
+
* // currencyCode: "TZS",
|
|
298
|
+
* // createdAt: "2024-01-15T10:30:00.000Z",
|
|
299
|
+
* // ...
|
|
300
|
+
* // }
|
|
301
|
+
* ```
|
|
302
|
+
*/
|
|
273
303
|
toJSON(): PayoutJSON;
|
|
274
304
|
/**
|
|
275
305
|
* Serializes the Payout instance to a JSON string
|
|
@@ -380,4 +410,5 @@ export declare class Payout {
|
|
|
380
410
|
* ```
|
|
381
411
|
*/
|
|
382
412
|
static toJSONArray(payouts: Payout[]): PayoutJSON[];
|
|
413
|
+
private toDTO;
|
|
383
414
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { QueryBuilder } from "@/lib/query/index.js";
|
|
2
2
|
import { PayoutStatus, PayoutApprovalStatus, PayoutFilters } from "./payout.dtos.js";
|
|
3
3
|
import { Amount } from "@temboplus/frontend-core";
|
|
4
|
+
type PayoutUrlParams = Record<string, string | string[]>;
|
|
4
5
|
/**
|
|
5
6
|
* Represents an active filter with its label and value
|
|
6
7
|
*/
|
|
@@ -28,7 +29,7 @@ export declare class PayoutQuery extends QueryBuilder {
|
|
|
28
29
|
/**
|
|
29
30
|
* Create from URL search parameters (strings)
|
|
30
31
|
*/
|
|
31
|
-
static fromUrlParams(params:
|
|
32
|
+
static fromUrlParams(params: PayoutUrlParams): PayoutQuery;
|
|
32
33
|
/**
|
|
33
34
|
* Create from URLSearchParams object
|
|
34
35
|
*/
|
|
@@ -40,14 +41,20 @@ export declare class PayoutQuery extends QueryBuilder {
|
|
|
40
41
|
/**
|
|
41
42
|
* Create from any supported input type
|
|
42
43
|
*/
|
|
43
|
-
static from(input: QueryBuilder | PayoutFilters |
|
|
44
|
+
static from(input: QueryBuilder | PayoutFilters | PayoutUrlParams | URLSearchParams | null | undefined): PayoutQuery;
|
|
44
45
|
/**
|
|
45
|
-
* Type guard for
|
|
46
|
+
* Type guard for URL param records
|
|
46
47
|
*/
|
|
47
|
-
private static
|
|
48
|
+
private static isUrlParamsRecord;
|
|
49
|
+
private static searchParamsToRecord;
|
|
50
|
+
private static normalizeUrlParams;
|
|
51
|
+
private static toStringList;
|
|
48
52
|
whereStatus(status: PayoutStatus): this;
|
|
53
|
+
whereStatusIn(statuses: PayoutStatus[]): this;
|
|
49
54
|
whereApprovalStatus(approvalStatus: PayoutApprovalStatus): this;
|
|
55
|
+
whereApprovalStatusIn(approvalStatuses: PayoutApprovalStatus[]): this;
|
|
50
56
|
whereChannel(channel: string): this;
|
|
57
|
+
whereChannelIn(channels: string[]): this;
|
|
51
58
|
wherePending(): this;
|
|
52
59
|
whereApproved(): this;
|
|
53
60
|
whereRejected(): this;
|
|
@@ -56,7 +63,12 @@ export declare class PayoutQuery extends QueryBuilder {
|
|
|
56
63
|
whereAmountBetween(min: Amount, max: Amount): this;
|
|
57
64
|
wherePayee(payeeName: string): this;
|
|
58
65
|
whereMsisdn(msisdn: string): this;
|
|
66
|
+
whereMsisdnIn(msisdns: string[]): this;
|
|
59
67
|
whereProfileId(profileId: string): this;
|
|
68
|
+
whereCreatedById(createdById: string): this;
|
|
69
|
+
whereCreatedByIdIn(createdByIds: string[]): this;
|
|
70
|
+
whereActionedById(actionedById: string): this;
|
|
71
|
+
whereActionedByIdIn(actionedByIds: string[]): this;
|
|
60
72
|
wherePartnerReference(partnerReference: string): this;
|
|
61
73
|
whereSearch(searchTerm: string): this;
|
|
62
74
|
whereCurrencyCode(currencyCode: string): this;
|
|
@@ -96,14 +108,46 @@ export declare class PayoutQuery extends QueryBuilder {
|
|
|
96
108
|
* Create new instance with status filter
|
|
97
109
|
*/
|
|
98
110
|
withStatus(status?: PayoutStatus): PayoutQuery;
|
|
111
|
+
/**
|
|
112
|
+
* Create new instance with status in filter
|
|
113
|
+
*/
|
|
114
|
+
withStatusIn(statuses?: PayoutStatus[]): PayoutQuery;
|
|
99
115
|
/**
|
|
100
116
|
* Create new instance with approval status filter
|
|
101
117
|
*/
|
|
102
118
|
withApprovalStatus(approvalStatus?: PayoutApprovalStatus): PayoutQuery;
|
|
119
|
+
/**
|
|
120
|
+
* Create new instance with approval status in filter
|
|
121
|
+
*/
|
|
122
|
+
withApprovalStatusIn(approvalStatuses?: PayoutApprovalStatus[]): PayoutQuery;
|
|
103
123
|
/**
|
|
104
124
|
* Create new instance with channel filter
|
|
105
125
|
*/
|
|
106
126
|
withChannel(channel?: string): PayoutQuery;
|
|
127
|
+
/**
|
|
128
|
+
* Create new instance with channel in filter
|
|
129
|
+
*/
|
|
130
|
+
withChannelIn(channels?: string[]): PayoutQuery;
|
|
131
|
+
/**
|
|
132
|
+
* Create new instance with MSISDN in filter
|
|
133
|
+
*/
|
|
134
|
+
withMsisdnIn(msisdns?: string[]): PayoutQuery;
|
|
135
|
+
/**
|
|
136
|
+
* Create new instance with creator ID filter
|
|
137
|
+
*/
|
|
138
|
+
withCreatedById(createdById?: string): PayoutQuery;
|
|
139
|
+
/**
|
|
140
|
+
* Create new instance with creator ID in filter
|
|
141
|
+
*/
|
|
142
|
+
withCreatedByIdIn(createdByIds?: string[]): PayoutQuery;
|
|
143
|
+
/**
|
|
144
|
+
* Create new instance with actioner ID filter
|
|
145
|
+
*/
|
|
146
|
+
withActionedById(actionedById?: string): PayoutQuery;
|
|
147
|
+
/**
|
|
148
|
+
* Create new instance with actioner ID in filter
|
|
149
|
+
*/
|
|
150
|
+
withActionedByIdIn(actionedByIds?: string[]): PayoutQuery;
|
|
107
151
|
/**
|
|
108
152
|
* Includes default relations for eager loading.
|
|
109
153
|
* This ensures that related data (createdBy, actionedBy) is fetched automatically.
|
|
@@ -174,6 +218,9 @@ export declare class PayoutQuery extends QueryBuilder {
|
|
|
174
218
|
* Extract primary sort order
|
|
175
219
|
*/
|
|
176
220
|
private extractSortOrder;
|
|
221
|
+
private whereInValues;
|
|
222
|
+
private getValidStatuses;
|
|
223
|
+
private getValidApprovalStatuses;
|
|
177
224
|
/**
|
|
178
225
|
* Type guard for valid statuses
|
|
179
226
|
*/
|
|
@@ -183,3 +230,4 @@ export declare class PayoutQuery extends QueryBuilder {
|
|
|
183
230
|
*/
|
|
184
231
|
private isValidApprovalStatus;
|
|
185
232
|
}
|
|
233
|
+
export {};
|
|
@@ -40,7 +40,7 @@ export interface RejectPayoutInput {
|
|
|
40
40
|
/**
|
|
41
41
|
* Flexible query input type - supports the class, filters interface, URL params, etc.
|
|
42
42
|
*/
|
|
43
|
-
export type PayoutQueryInput = PayoutQuery | PayoutFilters | Record<string, string> | URLSearchParams | null | undefined;
|
|
43
|
+
export type PayoutQueryInput = PayoutQuery | PayoutFilters | Record<string, string | string[]> | URLSearchParams | null | undefined;
|
|
44
44
|
/**
|
|
45
45
|
* Repository class for managing payout operations including creation, approval,
|
|
46
46
|
* rejection, and retrieval of payouts.
|
|
@@ -11,12 +11,12 @@ export declare const ProfileJSONSchema: z.ZodObject<{
|
|
|
11
11
|
accountNo: z.ZodString;
|
|
12
12
|
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
13
13
|
autoApprove: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
14
|
-
|
|
14
|
+
_version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
15
15
|
}, "strip", z.ZodTypeAny, {
|
|
16
16
|
id: string;
|
|
17
17
|
displayName: string;
|
|
18
18
|
accountNo: string;
|
|
19
|
-
|
|
19
|
+
_version: string;
|
|
20
20
|
firstName?: string | null | undefined;
|
|
21
21
|
lastName?: string | null | undefined;
|
|
22
22
|
phone?: string | null | undefined;
|
|
@@ -31,7 +31,7 @@ export declare const ProfileJSONSchema: z.ZodObject<{
|
|
|
31
31
|
phone?: string | null | undefined;
|
|
32
32
|
email?: string | null | undefined;
|
|
33
33
|
autoApprove?: boolean | null | undefined;
|
|
34
|
-
|
|
34
|
+
_version?: string | undefined;
|
|
35
35
|
}>;
|
|
36
36
|
/**
|
|
37
37
|
* Infer the ProfileJSON type from the schema
|
|
@@ -10,12 +10,12 @@ export declare const RoleJSONSchema: z.ZodObject<{
|
|
|
10
10
|
access: z.ZodArray<z.ZodString, "many">;
|
|
11
11
|
createdAt: z.ZodString;
|
|
12
12
|
updatedAt: z.ZodString;
|
|
13
|
-
|
|
13
|
+
_version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
14
14
|
}, "strip", z.ZodTypeAny, {
|
|
15
15
|
name: string;
|
|
16
16
|
createdAt: string;
|
|
17
17
|
id: string;
|
|
18
|
-
|
|
18
|
+
_version: string;
|
|
19
19
|
updatedAt: string;
|
|
20
20
|
access: string[];
|
|
21
21
|
description?: string | undefined;
|
|
@@ -25,7 +25,7 @@ export declare const RoleJSONSchema: z.ZodObject<{
|
|
|
25
25
|
id: string;
|
|
26
26
|
updatedAt: string;
|
|
27
27
|
access: string[];
|
|
28
|
-
|
|
28
|
+
_version?: string | undefined;
|
|
29
29
|
description?: string | undefined;
|
|
30
30
|
}>;
|
|
31
31
|
/**
|