@temboplus/afloat 0.2.0-beta.9 → 0.2.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 +42 -62
- 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 +40 -0
- package/dist/modules/payout/payout.model.d.ts +4 -4
- 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
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { BeneficiaryType
|
|
2
|
-
import {
|
|
1
|
+
import { BeneficiaryType } from "@/modules/beneficiary/beneficiary.dtos.js";
|
|
2
|
+
import type { BeneficiaryDTO, BeneficiaryInputDTO } from "@/modules/beneficiary/beneficiary.dtos.js";
|
|
3
|
+
import type { PayoutDTO } from "@/modules/payout/payout.dtos.js";
|
|
3
4
|
import { Bank, PhoneNumber } from "@temboplus/frontend-core";
|
|
4
|
-
import type { BankSwiftCode, ISO2CountryCode, MobileMoneyProviderId } from "@temboplus/frontend-core";
|
|
5
|
+
import type { BankSwiftCode, ISO2CountryCode, MobileMoneyProvider, MobileMoneyProviderId } from "@temboplus/frontend-core";
|
|
5
6
|
import { z } from "zod";
|
|
6
7
|
export declare const MobileBeneficiaryJSONSchema: z.ZodObject<{
|
|
7
8
|
type: z.ZodLiteral<"Mobile">;
|
|
8
9
|
name: z.ZodString;
|
|
9
10
|
phoneNumber: z.ZodString;
|
|
10
11
|
mnoId: z.ZodString;
|
|
11
|
-
|
|
12
|
+
_version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
12
13
|
}, "strip", z.ZodTypeAny, {
|
|
13
14
|
type: "Mobile";
|
|
14
15
|
name: string;
|
|
15
|
-
|
|
16
|
+
_version: string;
|
|
16
17
|
phoneNumber: string;
|
|
17
18
|
mnoId: string;
|
|
18
19
|
}, {
|
|
@@ -20,7 +21,7 @@ export declare const MobileBeneficiaryJSONSchema: z.ZodObject<{
|
|
|
20
21
|
name: string;
|
|
21
22
|
phoneNumber: string;
|
|
22
23
|
mnoId: string;
|
|
23
|
-
|
|
24
|
+
_version?: string | undefined;
|
|
24
25
|
}>;
|
|
25
26
|
export declare const BankBeneficiaryJSONSchema: z.ZodObject<{
|
|
26
27
|
type: z.ZodLiteral<"Bank">;
|
|
@@ -28,10 +29,10 @@ export declare const BankBeneficiaryJSONSchema: z.ZodObject<{
|
|
|
28
29
|
swiftCode: z.ZodString;
|
|
29
30
|
countryCode: z.ZodString;
|
|
30
31
|
accNo: z.ZodString;
|
|
31
|
-
|
|
32
|
+
_version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
32
33
|
}, "strip", z.ZodTypeAny, {
|
|
33
34
|
type: "Bank";
|
|
34
|
-
|
|
35
|
+
_version: string;
|
|
35
36
|
countryCode: string;
|
|
36
37
|
accName: string;
|
|
37
38
|
swiftCode: string;
|
|
@@ -42,18 +43,18 @@ export declare const BankBeneficiaryJSONSchema: z.ZodObject<{
|
|
|
42
43
|
accName: string;
|
|
43
44
|
swiftCode: string;
|
|
44
45
|
accNo: string;
|
|
45
|
-
|
|
46
|
+
_version?: string | undefined;
|
|
46
47
|
}>;
|
|
47
48
|
export declare const BeneficiaryJSONSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
48
49
|
type: z.ZodLiteral<"Mobile">;
|
|
49
50
|
name: z.ZodString;
|
|
50
51
|
phoneNumber: z.ZodString;
|
|
51
52
|
mnoId: z.ZodString;
|
|
52
|
-
|
|
53
|
+
_version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
53
54
|
}, "strip", z.ZodTypeAny, {
|
|
54
55
|
type: "Mobile";
|
|
55
56
|
name: string;
|
|
56
|
-
|
|
57
|
+
_version: string;
|
|
57
58
|
phoneNumber: string;
|
|
58
59
|
mnoId: string;
|
|
59
60
|
}, {
|
|
@@ -61,17 +62,17 @@ export declare const BeneficiaryJSONSchema: z.ZodDiscriminatedUnion<"type", [z.Z
|
|
|
61
62
|
name: string;
|
|
62
63
|
phoneNumber: string;
|
|
63
64
|
mnoId: string;
|
|
64
|
-
|
|
65
|
+
_version?: string | undefined;
|
|
65
66
|
}>, z.ZodObject<{
|
|
66
67
|
type: z.ZodLiteral<"Bank">;
|
|
67
68
|
accName: z.ZodString;
|
|
68
69
|
swiftCode: z.ZodString;
|
|
69
70
|
countryCode: z.ZodString;
|
|
70
71
|
accNo: z.ZodString;
|
|
71
|
-
|
|
72
|
+
_version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
72
73
|
}, "strip", z.ZodTypeAny, {
|
|
73
74
|
type: "Bank";
|
|
74
|
-
|
|
75
|
+
_version: string;
|
|
75
76
|
countryCode: string;
|
|
76
77
|
accName: string;
|
|
77
78
|
swiftCode: string;
|
|
@@ -82,7 +83,7 @@ export declare const BeneficiaryJSONSchema: z.ZodDiscriminatedUnion<"type", [z.Z
|
|
|
82
83
|
accName: string;
|
|
83
84
|
swiftCode: string;
|
|
84
85
|
accNo: string;
|
|
85
|
-
|
|
86
|
+
_version?: string | undefined;
|
|
86
87
|
}>]>;
|
|
87
88
|
export type MobileBeneficiaryJSON = z.infer<typeof MobileBeneficiaryJSONSchema>;
|
|
88
89
|
export type BankBeneficiaryJSON = z.infer<typeof BankBeneficiaryJSONSchema>;
|
|
@@ -148,6 +149,7 @@ export declare class MobileBeneficiaryInfo extends BaseBeneficiary {
|
|
|
148
149
|
phoneNumber: PhoneNumber;
|
|
149
150
|
mnoId?: MobileMoneyProviderId;
|
|
150
151
|
}): MobileBeneficiaryInfo | undefined;
|
|
152
|
+
static fromInputDTO(info: BeneficiaryInputDTO): MobileBeneficiaryInfo | undefined;
|
|
151
153
|
static fromBeneficiaryDTO(info: BeneficiaryDTO): MobileBeneficiaryInfo | undefined;
|
|
152
154
|
static fromPayoutDTO(info: PayoutDTO): MobileBeneficiaryInfo | undefined;
|
|
153
155
|
/**
|
|
@@ -164,6 +166,7 @@ export declare class MobileBeneficiaryInfo extends BaseBeneficiary {
|
|
|
164
166
|
get channelLabel(): string;
|
|
165
167
|
get channelId(): MobileMoneyProviderId;
|
|
166
168
|
get channelName(): string;
|
|
169
|
+
get mobileMoneyProvider(): MobileMoneyProvider | undefined;
|
|
167
170
|
toJSON(): MobileBeneficiaryJSON;
|
|
168
171
|
static fromJSON(json: MobileBeneficiaryJSON | string): MobileBeneficiaryInfo | undefined;
|
|
169
172
|
static fromJSONString(s: string): MobileBeneficiaryInfo | undefined;
|
|
@@ -184,6 +187,7 @@ export declare class BankBeneficiaryInfo extends BaseBeneficiary {
|
|
|
184
187
|
bank: Bank;
|
|
185
188
|
accNo: string;
|
|
186
189
|
}): BankBeneficiaryInfo | undefined;
|
|
190
|
+
static fromInputDTO(info: BeneficiaryInputDTO): BankBeneficiaryInfo | undefined;
|
|
187
191
|
static fromBeneficiaryDTO(info: BeneficiaryDTO): BankBeneficiaryInfo | undefined;
|
|
188
192
|
static fromPayoutDTO(info: PayoutDTO): BankBeneficiaryInfo | undefined;
|
|
189
193
|
static is(obj: unknown): obj is BankBeneficiaryInfo;
|
|
@@ -203,10 +207,24 @@ export declare class BankBeneficiaryInfo extends BaseBeneficiary {
|
|
|
203
207
|
}
|
|
204
208
|
export type BeneficiaryInfo = MobileBeneficiaryInfo | BankBeneficiaryInfo;
|
|
205
209
|
/**
|
|
206
|
-
*
|
|
210
|
+
* Factory for building / recognizing a beneficiary without
|
|
207
211
|
* caring about the variant. Each method dispatches on the discriminator.
|
|
208
212
|
*/
|
|
213
|
+
export declare class BeneficiaryInfoFactory {
|
|
214
|
+
static fromInputDTO(info: BeneficiaryInputDTO): BeneficiaryInfo | undefined;
|
|
215
|
+
static fromBeneficiaryDTO(info: BeneficiaryDTO): BeneficiaryInfo | undefined;
|
|
216
|
+
static fromPayoutDTO(info: PayoutDTO): BeneficiaryInfo | undefined;
|
|
217
|
+
static fromJSON(json: BeneficiaryJSON | string): BeneficiaryInfo | undefined;
|
|
218
|
+
static fromJSONString(s: string): BeneficiaryInfo | undefined;
|
|
219
|
+
static is(obj: unknown): obj is BeneficiaryInfo;
|
|
220
|
+
static isJSON(obj: unknown): obj is BeneficiaryJSON;
|
|
221
|
+
private static fromDTO;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* @deprecated Use BeneficiaryInfoFactory instead.
|
|
225
|
+
*/
|
|
209
226
|
export declare const BeneficiaryInfo: {
|
|
227
|
+
fromInputDTO(info: BeneficiaryInputDTO): BeneficiaryInfo | undefined;
|
|
210
228
|
fromBeneficiaryDTO(info: BeneficiaryDTO): BeneficiaryInfo | undefined;
|
|
211
229
|
fromPayoutDTO(info: PayoutDTO): BeneficiaryInfo | undefined;
|
|
212
230
|
fromJSON(json: BeneficiaryJSON | string): BeneficiaryInfo | undefined;
|
|
@@ -1,75 +1,54 @@
|
|
|
1
1
|
import { BeneficiaryDTO, BeneficiaryType } from "@/modules/beneficiary/beneficiary.dtos.js";
|
|
2
|
-
import { BeneficiaryInfo } from "./beneficiary-info.model.js";
|
|
2
|
+
import { type BeneficiaryInfo } from "./beneficiary-info.model.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
/**
|
|
5
5
|
* Zod schema for Beneficiary JSON serialization
|
|
6
6
|
* This schema validates the JSON representation of a Beneficiary instance
|
|
7
7
|
*
|
|
8
|
-
* The Beneficiary JSON format
|
|
9
|
-
*
|
|
8
|
+
* The Beneficiary JSON format is a flat BeneficiaryDTO structure with metadata
|
|
9
|
+
* under underscored keys.
|
|
10
10
|
*/
|
|
11
11
|
export declare const BeneficiaryJSONSchema: z.ZodObject<{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
type: BeneficiaryType;
|
|
25
|
-
createdAt: string;
|
|
26
|
-
id: string;
|
|
27
|
-
displayName: string;
|
|
28
|
-
accountNo: string;
|
|
29
|
-
profileId: string;
|
|
30
|
-
updatedAt: string;
|
|
31
|
-
channel: string;
|
|
32
|
-
}, {
|
|
33
|
-
type: BeneficiaryType;
|
|
34
|
-
createdAt: string;
|
|
35
|
-
id: string;
|
|
36
|
-
displayName: string;
|
|
37
|
-
accountNo: string;
|
|
38
|
-
profileId: string;
|
|
39
|
-
updatedAt: string;
|
|
40
|
-
channel: string;
|
|
41
|
-
}>;
|
|
42
|
-
/** Version for future compatibility */
|
|
43
|
-
version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
12
|
+
id: z.ZodString;
|
|
13
|
+
profileId: z.ZodString;
|
|
14
|
+
createdAt: z.ZodString;
|
|
15
|
+
updatedAt: z.ZodString;
|
|
16
|
+
} & {
|
|
17
|
+
displayName: z.ZodString;
|
|
18
|
+
accountNo: z.ZodString;
|
|
19
|
+
channel: z.ZodString;
|
|
20
|
+
type: z.ZodNativeEnum<typeof BeneficiaryType>;
|
|
21
|
+
} & {
|
|
22
|
+
/** Serialization version for future compatibility */
|
|
23
|
+
_version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
44
24
|
}, "strip", z.ZodTypeAny, {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
channel: string;
|
|
55
|
-
};
|
|
25
|
+
type: BeneficiaryType;
|
|
26
|
+
createdAt: string;
|
|
27
|
+
id: string;
|
|
28
|
+
displayName: string;
|
|
29
|
+
accountNo: string;
|
|
30
|
+
_version: string;
|
|
31
|
+
profileId: string;
|
|
32
|
+
updatedAt: string;
|
|
33
|
+
channel: string;
|
|
56
34
|
}, {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
};
|
|
67
|
-
version?: string | undefined;
|
|
35
|
+
type: BeneficiaryType;
|
|
36
|
+
createdAt: string;
|
|
37
|
+
id: string;
|
|
38
|
+
displayName: string;
|
|
39
|
+
accountNo: string;
|
|
40
|
+
profileId: string;
|
|
41
|
+
updatedAt: string;
|
|
42
|
+
channel: string;
|
|
43
|
+
_version?: string | undefined;
|
|
68
44
|
}>;
|
|
69
45
|
/**
|
|
70
46
|
* Infer the BeneficiaryJSON type from the schema
|
|
71
47
|
*/
|
|
72
48
|
export type BeneficiaryJSON = z.infer<typeof BeneficiaryJSONSchema>;
|
|
49
|
+
type LegacyBeneficiaryJSON = {
|
|
50
|
+
data: BeneficiaryDTO;
|
|
51
|
+
} & Record<string, unknown>;
|
|
73
52
|
/**
|
|
74
53
|
* Beneficiary class that wraps the Zod schema and provides additional functionality.
|
|
75
54
|
* Represents a beneficiary entity with validation and type-safe access to beneficiary information.
|
|
@@ -342,7 +321,7 @@ export declare class Beneficiary {
|
|
|
342
321
|
* ```typescript
|
|
343
322
|
* const beneficiary = Beneficiary.from(beneficiaryData);
|
|
344
323
|
* const json = beneficiary.toJSON();
|
|
345
|
-
* // {
|
|
324
|
+
* // { id: "123", displayName: "John", ..., _version: "1.0" }
|
|
346
325
|
*
|
|
347
326
|
* // Store in localStorage
|
|
348
327
|
* localStorage.setItem('beneficiary', JSON.stringify(json));
|
|
@@ -378,13 +357,13 @@ export declare class Beneficiary {
|
|
|
378
357
|
* 4. Constructs Beneficiary instance with validated data
|
|
379
358
|
*
|
|
380
359
|
* @static
|
|
381
|
-
* @param {BeneficiaryJSON | string} json - JSON object or string containing beneficiary data
|
|
360
|
+
* @param {BeneficiaryJSON | LegacyBeneficiaryJSON | string} json - JSON object or string containing beneficiary data
|
|
382
361
|
* @returns {Beneficiary | undefined} New Beneficiary instance if successful, undefined if parsing/validation fails
|
|
383
362
|
*
|
|
384
363
|
* @example
|
|
385
364
|
* ```typescript
|
|
386
365
|
* // From JSON object
|
|
387
|
-
* const json = {
|
|
366
|
+
* const json = { id: "123", displayName: "John", ..., _version: "1.0" };
|
|
388
367
|
* const beneficiary = Beneficiary.fromJSON(json);
|
|
389
368
|
*
|
|
390
369
|
* // From JSON string
|
|
@@ -400,7 +379,7 @@ export declare class Beneficiary {
|
|
|
400
379
|
* }
|
|
401
380
|
* ```
|
|
402
381
|
*/
|
|
403
|
-
static fromJSON(json: BeneficiaryJSON | string): Beneficiary | undefined;
|
|
382
|
+
static fromJSON(json: BeneficiaryJSON | LegacyBeneficiaryJSON | string): Beneficiary | undefined;
|
|
404
383
|
/**
|
|
405
384
|
* Creates a Beneficiary instance from a JSON string
|
|
406
385
|
*
|
|
@@ -412,7 +391,7 @@ export declare class Beneficiary {
|
|
|
412
391
|
*
|
|
413
392
|
* @example
|
|
414
393
|
* ```typescript
|
|
415
|
-
* const jsonString = '{"
|
|
394
|
+
* const jsonString = '{"id":"123","displayName":"John",...,"_version":"1.0"}';
|
|
416
395
|
* const beneficiary = Beneficiary.fromJSONString(jsonString);
|
|
417
396
|
* ```
|
|
418
397
|
*/
|
|
@@ -448,3 +427,4 @@ export declare class Beneficiary {
|
|
|
448
427
|
*/
|
|
449
428
|
static isBeneficiaryJSON(obj: unknown): obj is BeneficiaryJSON;
|
|
450
429
|
}
|
|
430
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from "./beneficiary.repository.js";
|
|
2
2
|
export * from "./beneficiary.dtos.js";
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export { BankBeneficiaryInfo, BankBeneficiaryJSONSchema, BeneficiaryError, BeneficiaryInfo, BeneficiaryInfoFactory, BeneficiaryJSONSchema as BeneficiaryInfoJSONSchema, MobileBeneficiaryInfo, MobileBeneficiaryJSONSchema, type BankBeneficiaryJSON, type BeneficiaryJSON as BeneficiaryInfoJSON, type MobileBeneficiaryJSON, } from "./beneficiary-info.model.js";
|
|
4
|
+
export { Beneficiary, BeneficiaryJSONSchema, type BeneficiaryJSON, } from "./beneficiary.model.js";
|
|
5
5
|
export * from "./beneficiary-input-handler.js";
|
|
6
6
|
export * from "./beneficiary.api-contract.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LogInDTO } from "./login.dtos.js";
|
|
2
|
+
import { Permission } from "./permission.type.js";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
/**
|
|
4
5
|
* Zod schema for LogIn JSON serialization
|
|
@@ -17,13 +18,13 @@ export declare const LogInJSONSchema: z.ZodObject<{
|
|
|
17
18
|
createdAt: z.ZodString;
|
|
18
19
|
updatedAt: z.ZodString;
|
|
19
20
|
access: z.ZodArray<z.ZodString, "many">;
|
|
20
|
-
|
|
21
|
+
_version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
21
22
|
}, "strip", z.ZodTypeAny, {
|
|
22
23
|
type: string;
|
|
23
24
|
name: string;
|
|
24
25
|
createdAt: string;
|
|
25
26
|
id: string;
|
|
26
|
-
|
|
27
|
+
_version: string;
|
|
27
28
|
profileId: string;
|
|
28
29
|
identity: string;
|
|
29
30
|
roleId: string;
|
|
@@ -45,7 +46,7 @@ export declare const LogInJSONSchema: z.ZodObject<{
|
|
|
45
46
|
resetPassword: boolean;
|
|
46
47
|
updatedAt: string;
|
|
47
48
|
access: string[];
|
|
48
|
-
|
|
49
|
+
_version?: string | undefined;
|
|
49
50
|
}>;
|
|
50
51
|
/**
|
|
51
52
|
* Infer the LogInJSON type from the schema
|
|
@@ -74,6 +75,7 @@ export declare class LogIn {
|
|
|
74
75
|
private readonly _createdAt;
|
|
75
76
|
private readonly _updatedAt;
|
|
76
77
|
private readonly _access;
|
|
78
|
+
private readonly _permissionMap;
|
|
77
79
|
private constructor();
|
|
78
80
|
/**
|
|
79
81
|
* Creates a LogIn instance from a validated DTO.
|
|
@@ -149,6 +151,27 @@ export declare class LogIn {
|
|
|
149
151
|
* Gets the user's permissions/access list.
|
|
150
152
|
*/
|
|
151
153
|
get access(): ReadonlyArray<string>;
|
|
154
|
+
/**
|
|
155
|
+
* Checks if the login has a specific permission.
|
|
156
|
+
*
|
|
157
|
+
* @param permission - The permission to check
|
|
158
|
+
* @returns true if the login has the permission
|
|
159
|
+
*/
|
|
160
|
+
can(permission: Permission): boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Checks if the login has any of the specified permissions.
|
|
163
|
+
*
|
|
164
|
+
* @param permissions - Array of permissions to check
|
|
165
|
+
* @returns true if the login has at least one permission
|
|
166
|
+
*/
|
|
167
|
+
canAny(permissions: Permission[]): boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Checks if the login has all of the specified permissions.
|
|
170
|
+
*
|
|
171
|
+
* @param permissions - Array of permissions to check
|
|
172
|
+
* @returns true if the login has all permissions
|
|
173
|
+
*/
|
|
174
|
+
canAll(permissions: Permission[]): boolean;
|
|
152
175
|
/**
|
|
153
176
|
* Serializes the LogIn instance to a JSON-compatible object
|
|
154
177
|
*/
|
|
@@ -646,6 +646,46 @@ export declare const contract: {
|
|
|
646
646
|
identity: string;
|
|
647
647
|
} | null | undefined;
|
|
648
648
|
}>;
|
|
649
|
+
400: z.ZodObject<{
|
|
650
|
+
message: z.ZodString;
|
|
651
|
+
statusCode: z.ZodNumber;
|
|
652
|
+
error: z.ZodOptional<z.ZodString>;
|
|
653
|
+
details: z.ZodOptional<z.AnyZodObject>;
|
|
654
|
+
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
655
|
+
message: string;
|
|
656
|
+
statusCode: number;
|
|
657
|
+
error?: string | undefined;
|
|
658
|
+
details?: {
|
|
659
|
+
[x: string]: any;
|
|
660
|
+
} | undefined;
|
|
661
|
+
}, {
|
|
662
|
+
message: string;
|
|
663
|
+
statusCode: number;
|
|
664
|
+
error?: string | undefined;
|
|
665
|
+
details?: {
|
|
666
|
+
[x: string]: any;
|
|
667
|
+
} | undefined;
|
|
668
|
+
}>;
|
|
669
|
+
401: z.ZodObject<{
|
|
670
|
+
message: z.ZodString;
|
|
671
|
+
statusCode: z.ZodNumber;
|
|
672
|
+
error: z.ZodOptional<z.ZodString>;
|
|
673
|
+
details: z.ZodOptional<z.AnyZodObject>;
|
|
674
|
+
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
675
|
+
message: string;
|
|
676
|
+
statusCode: number;
|
|
677
|
+
error?: string | undefined;
|
|
678
|
+
details?: {
|
|
679
|
+
[x: string]: any;
|
|
680
|
+
} | undefined;
|
|
681
|
+
}, {
|
|
682
|
+
message: string;
|
|
683
|
+
statusCode: number;
|
|
684
|
+
error?: string | undefined;
|
|
685
|
+
details?: {
|
|
686
|
+
[x: string]: any;
|
|
687
|
+
} | undefined;
|
|
688
|
+
}>;
|
|
649
689
|
404: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
650
690
|
409: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
651
691
|
};
|
|
@@ -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
|
|
@@ -50,12 +50,12 @@ export declare const PayoutJSONSchema: z.ZodObject<{
|
|
|
50
50
|
id: string;
|
|
51
51
|
identity: string;
|
|
52
52
|
}>>>;
|
|
53
|
-
|
|
53
|
+
_version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
54
54
|
}, "strip", z.ZodTypeAny, {
|
|
55
55
|
status: PayoutStatus;
|
|
56
56
|
createdAt: string;
|
|
57
57
|
id: string;
|
|
58
|
-
|
|
58
|
+
_version: string;
|
|
59
59
|
profileId: string;
|
|
60
60
|
updatedAt: string;
|
|
61
61
|
description: string;
|
|
@@ -94,7 +94,7 @@ export declare const PayoutJSONSchema: z.ZodObject<{
|
|
|
94
94
|
countryCode: string;
|
|
95
95
|
currencyCode: string;
|
|
96
96
|
statusMessage: string;
|
|
97
|
-
|
|
97
|
+
_version?: string | undefined;
|
|
98
98
|
notes?: string | null | undefined;
|
|
99
99
|
partnerReference?: string | null | undefined;
|
|
100
100
|
actionedAt?: string | null | undefined;
|
|
@@ -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
|
/**
|
|
@@ -35,12 +35,12 @@ export declare const TeamMemberJSONSchema: z.ZodObject<{
|
|
|
35
35
|
access: z.ZodArray<z.ZodString, "many">;
|
|
36
36
|
createdAt: z.ZodString;
|
|
37
37
|
updatedAt: z.ZodString;
|
|
38
|
-
|
|
38
|
+
_version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
39
39
|
}, "strip", z.ZodTypeAny, {
|
|
40
40
|
name: string;
|
|
41
41
|
createdAt: string;
|
|
42
42
|
id: string;
|
|
43
|
-
|
|
43
|
+
_version: string;
|
|
44
44
|
updatedAt: string;
|
|
45
45
|
access: string[];
|
|
46
46
|
description?: string | undefined;
|
|
@@ -50,18 +50,18 @@ export declare const TeamMemberJSONSchema: z.ZodObject<{
|
|
|
50
50
|
id: string;
|
|
51
51
|
updatedAt: string;
|
|
52
52
|
access: string[];
|
|
53
|
-
|
|
53
|
+
_version?: string | undefined;
|
|
54
54
|
description?: string | undefined;
|
|
55
55
|
}>>;
|
|
56
56
|
createdAt: z.ZodString;
|
|
57
57
|
updatedAt: z.ZodString;
|
|
58
|
-
|
|
58
|
+
_version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
59
59
|
}, "strip", z.ZodTypeAny, {
|
|
60
60
|
type: string;
|
|
61
61
|
name: string;
|
|
62
62
|
createdAt: string;
|
|
63
63
|
id: string;
|
|
64
|
-
|
|
64
|
+
_version: string;
|
|
65
65
|
profileId: string;
|
|
66
66
|
identity: string;
|
|
67
67
|
roleId: string;
|
|
@@ -73,7 +73,7 @@ export declare const TeamMemberJSONSchema: z.ZodObject<{
|
|
|
73
73
|
name: string;
|
|
74
74
|
createdAt: string;
|
|
75
75
|
id: string;
|
|
76
|
-
|
|
76
|
+
_version: string;
|
|
77
77
|
updatedAt: string;
|
|
78
78
|
access: string[];
|
|
79
79
|
description?: string | undefined;
|
|
@@ -90,14 +90,14 @@ export declare const TeamMemberJSONSchema: z.ZodObject<{
|
|
|
90
90
|
isArchived: boolean;
|
|
91
91
|
resetPassword: boolean;
|
|
92
92
|
updatedAt: string;
|
|
93
|
-
|
|
93
|
+
_version?: string | undefined;
|
|
94
94
|
role?: {
|
|
95
95
|
name: string;
|
|
96
96
|
createdAt: string;
|
|
97
97
|
id: string;
|
|
98
98
|
updatedAt: string;
|
|
99
99
|
access: string[];
|
|
100
|
-
|
|
100
|
+
_version?: string | undefined;
|
|
101
101
|
description?: string | undefined;
|
|
102
102
|
} | undefined;
|
|
103
103
|
}>;
|
|
@@ -17,13 +17,13 @@ export declare const LEGACY_MOBILE_NARR_PREFIX: string;
|
|
|
17
17
|
*/
|
|
18
18
|
export declare const NarrationJSONSchema: z.ZodObject<{
|
|
19
19
|
text: z.ZodString;
|
|
20
|
-
|
|
20
|
+
_version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
21
21
|
}, "strip", z.ZodTypeAny, {
|
|
22
|
-
|
|
22
|
+
_version: string;
|
|
23
23
|
text: string;
|
|
24
24
|
}, {
|
|
25
25
|
text: string;
|
|
26
|
-
|
|
26
|
+
_version?: string | undefined;
|
|
27
27
|
}>;
|
|
28
28
|
export type NarrationJSON = z.infer<typeof NarrationJSONSchema>;
|
|
29
29
|
/**
|