@temboplus/afloat 0.2.0-beta.8 → 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 +113 -56
- package/dist/modules/beneficiary/beneficiary.model.d.ts +53 -64
- package/dist/modules/beneficiary/index.d.ts +2 -2
- package/dist/modules/login/login.model.d.ts +26 -3
- package/dist/modules/payout/payout-channel-handler.d.ts +7 -6
- 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 +5 -5
- 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,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
|
/**
|
|
@@ -199,8 +199,8 @@ export declare class Narration {
|
|
|
199
199
|
*/
|
|
200
200
|
static is(obj: unknown): obj is Narration;
|
|
201
201
|
/**
|
|
202
|
-
|
|
203
|
-
|
|
202
|
+
* Serializes the Narration instance to a JSON-compatible object
|
|
203
|
+
*/
|
|
204
204
|
toJSON(): NarrationJSON;
|
|
205
205
|
/**
|
|
206
206
|
* Serializes the Narration instance to a JSON string
|
|
@@ -10,13 +10,13 @@ export declare const WalletStatementEntryJSONSchema: z.ZodObject<{
|
|
|
10
10
|
tranRefNo: z.ZodString;
|
|
11
11
|
narration: z.ZodObject<{
|
|
12
12
|
text: z.ZodString;
|
|
13
|
-
|
|
13
|
+
_version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
14
14
|
}, "strip", z.ZodTypeAny, {
|
|
15
|
-
|
|
15
|
+
_version: string;
|
|
16
16
|
text: string;
|
|
17
17
|
}, {
|
|
18
18
|
text: string;
|
|
19
|
-
|
|
19
|
+
_version?: string | undefined;
|
|
20
20
|
}>;
|
|
21
21
|
txnDate: z.ZodString;
|
|
22
22
|
valueDate: z.ZodString;
|
|
@@ -24,9 +24,9 @@ export declare const WalletStatementEntryJSONSchema: z.ZodObject<{
|
|
|
24
24
|
value: z.ZodNumber;
|
|
25
25
|
text: z.ZodString;
|
|
26
26
|
currencyCode: z.ZodString;
|
|
27
|
-
|
|
27
|
+
_version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
28
28
|
}, "strip", z.ZodTypeAny, {
|
|
29
|
-
|
|
29
|
+
_version: string;
|
|
30
30
|
value: number;
|
|
31
31
|
text: string;
|
|
32
32
|
currencyCode: string;
|
|
@@ -34,15 +34,15 @@ export declare const WalletStatementEntryJSONSchema: z.ZodObject<{
|
|
|
34
34
|
value: number;
|
|
35
35
|
text: string;
|
|
36
36
|
currencyCode: string;
|
|
37
|
-
|
|
37
|
+
_version?: string | undefined;
|
|
38
38
|
}>;
|
|
39
39
|
amountDebited: z.ZodObject<{
|
|
40
40
|
value: z.ZodNumber;
|
|
41
41
|
text: z.ZodString;
|
|
42
42
|
currencyCode: z.ZodString;
|
|
43
|
-
|
|
43
|
+
_version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
44
44
|
}, "strip", z.ZodTypeAny, {
|
|
45
|
-
|
|
45
|
+
_version: string;
|
|
46
46
|
value: number;
|
|
47
47
|
text: string;
|
|
48
48
|
currencyCode: string;
|
|
@@ -50,15 +50,15 @@ export declare const WalletStatementEntryJSONSchema: z.ZodObject<{
|
|
|
50
50
|
value: number;
|
|
51
51
|
text: string;
|
|
52
52
|
currencyCode: string;
|
|
53
|
-
|
|
53
|
+
_version?: string | undefined;
|
|
54
54
|
}>;
|
|
55
55
|
balance: z.ZodObject<{
|
|
56
56
|
value: z.ZodNumber;
|
|
57
57
|
text: z.ZodString;
|
|
58
58
|
currencyCode: z.ZodString;
|
|
59
|
-
|
|
59
|
+
_version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
60
60
|
}, "strip", z.ZodTypeAny, {
|
|
61
|
-
|
|
61
|
+
_version: string;
|
|
62
62
|
value: number;
|
|
63
63
|
text: string;
|
|
64
64
|
currencyCode: string;
|
|
@@ -66,35 +66,35 @@ export declare const WalletStatementEntryJSONSchema: z.ZodObject<{
|
|
|
66
66
|
value: number;
|
|
67
67
|
text: string;
|
|
68
68
|
currencyCode: string;
|
|
69
|
-
|
|
69
|
+
_version?: string | undefined;
|
|
70
70
|
}>;
|
|
71
71
|
currencyCode: z.ZodString;
|
|
72
|
-
|
|
72
|
+
_version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
73
73
|
}, "strip", z.ZodTypeAny, {
|
|
74
|
-
|
|
74
|
+
_version: string;
|
|
75
75
|
currencyCode: string;
|
|
76
76
|
debitOrCredit: string;
|
|
77
77
|
tranRefNo: string;
|
|
78
78
|
narration: {
|
|
79
|
-
|
|
79
|
+
_version: string;
|
|
80
80
|
text: string;
|
|
81
81
|
};
|
|
82
82
|
txnDate: string;
|
|
83
83
|
valueDate: string;
|
|
84
84
|
amountCredited: {
|
|
85
|
-
|
|
85
|
+
_version: string;
|
|
86
86
|
value: number;
|
|
87
87
|
text: string;
|
|
88
88
|
currencyCode: string;
|
|
89
89
|
};
|
|
90
90
|
amountDebited: {
|
|
91
|
-
|
|
91
|
+
_version: string;
|
|
92
92
|
value: number;
|
|
93
93
|
text: string;
|
|
94
94
|
currencyCode: string;
|
|
95
95
|
};
|
|
96
96
|
balance: {
|
|
97
|
-
|
|
97
|
+
_version: string;
|
|
98
98
|
value: number;
|
|
99
99
|
text: string;
|
|
100
100
|
currencyCode: string;
|
|
@@ -106,7 +106,7 @@ export declare const WalletStatementEntryJSONSchema: z.ZodObject<{
|
|
|
106
106
|
tranRefNo: string;
|
|
107
107
|
narration: {
|
|
108
108
|
text: string;
|
|
109
|
-
|
|
109
|
+
_version?: string | undefined;
|
|
110
110
|
};
|
|
111
111
|
txnDate: string;
|
|
112
112
|
valueDate: string;
|
|
@@ -114,22 +114,22 @@ export declare const WalletStatementEntryJSONSchema: z.ZodObject<{
|
|
|
114
114
|
value: number;
|
|
115
115
|
text: string;
|
|
116
116
|
currencyCode: string;
|
|
117
|
-
|
|
117
|
+
_version?: string | undefined;
|
|
118
118
|
};
|
|
119
119
|
amountDebited: {
|
|
120
120
|
value: number;
|
|
121
121
|
text: string;
|
|
122
122
|
currencyCode: string;
|
|
123
|
-
|
|
123
|
+
_version?: string | undefined;
|
|
124
124
|
};
|
|
125
125
|
balance: {
|
|
126
126
|
value: number;
|
|
127
127
|
text: string;
|
|
128
128
|
currencyCode: string;
|
|
129
|
-
|
|
129
|
+
_version?: string | undefined;
|
|
130
130
|
};
|
|
131
131
|
accountNo?: string | undefined;
|
|
132
|
-
|
|
132
|
+
_version?: string | undefined;
|
|
133
133
|
}>;
|
|
134
134
|
export type WalletStatementEntryJSON = z.infer<typeof WalletStatementEntryJSONSchema>;
|
|
135
135
|
/**
|
|
@@ -14,12 +14,12 @@ export declare const WalletJSONSchema: z.ZodObject<{
|
|
|
14
14
|
currencyCode: z.ZodString;
|
|
15
15
|
createdAt: z.ZodString;
|
|
16
16
|
updatedAt: z.ZodString;
|
|
17
|
-
|
|
17
|
+
_version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
18
18
|
}, "strip", z.ZodTypeAny, {
|
|
19
19
|
createdAt: string;
|
|
20
20
|
id: string;
|
|
21
21
|
accountNo: string;
|
|
22
|
-
|
|
22
|
+
_version: string;
|
|
23
23
|
profileId: string;
|
|
24
24
|
updatedAt: string;
|
|
25
25
|
channel: string;
|
|
@@ -36,7 +36,7 @@ export declare const WalletJSONSchema: z.ZodObject<{
|
|
|
36
36
|
countryCode: string;
|
|
37
37
|
currencyCode: string;
|
|
38
38
|
accountName: string;
|
|
39
|
-
|
|
39
|
+
_version?: string | undefined;
|
|
40
40
|
}>;
|
|
41
41
|
export type WalletJSON = z.infer<typeof WalletJSONSchema>;
|
|
42
42
|
/**
|
|
@@ -24,8 +24,8 @@ export type WalletQueryInput = WalletQuery | WalletQueryDTO | Record<string, str
|
|
|
24
24
|
* const repo = new WalletRepository({ token: userToken });
|
|
25
25
|
* const balance = await repo.getBalance({ wallet });
|
|
26
26
|
*
|
|
27
|
-
* //
|
|
28
|
-
* const repo = new WalletRepository();
|
|
27
|
+
* // Reuse the same construction shape for authenticated calls
|
|
28
|
+
* const repo = new WalletRepository({ token: userToken });
|
|
29
29
|
* const wallets = await repo.getWallets();
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@temboplus/afloat",
|
|
3
|
-
"version": "0.2.0
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "A foundational library for Temboplus-Afloat projects.",
|
|
5
5
|
"main": "./dist/index.cjs.js",
|
|
6
6
|
"module": "./dist/index.esm.js",
|
|
@@ -40,8 +40,7 @@
|
|
|
40
40
|
"@ts-rest/core": "^3.52.1",
|
|
41
41
|
"tslib": "^2.8.1",
|
|
42
42
|
"uuid": "^11.1.0",
|
|
43
|
-
"zod": "^3.24.2"
|
|
44
|
-
"zustand": "^5.0.9"
|
|
43
|
+
"zod": "^3.24.2"
|
|
45
44
|
},
|
|
46
45
|
"devDependencies": {
|
|
47
46
|
"@rollup/plugin-alias": "^6.0.0",
|
|
@@ -58,6 +57,6 @@
|
|
|
58
57
|
"typescript": "^5.9.3"
|
|
59
58
|
},
|
|
60
59
|
"dependencies": {
|
|
61
|
-
"@temboplus/frontend-core": "^
|
|
60
|
+
"@temboplus/frontend-core": "^1.0.1"
|
|
62
61
|
}
|
|
63
62
|
}
|