@temboplus/afloat 0.1.13 → 0.1.31
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/esm/src/features/auth/access/contract.d.ts +14 -0
- package/esm/src/features/auth/access/contract.d.ts.map +1 -0
- package/esm/src/features/auth/access/contract.js +14 -0
- package/esm/src/features/auth/contract.d.ts +20 -20
- package/esm/src/features/auth/contract.js +2 -2
- package/esm/src/features/auth/identity/contract.d.ts +0 -7
- package/esm/src/features/auth/identity/contract.d.ts.map +1 -1
- package/esm/src/features/auth/identity/contract.js +0 -1
- package/esm/src/features/auth/identity/repository.d.ts +2 -2
- package/esm/src/features/auth/identity/repository.d.ts.map +1 -1
- package/esm/src/features/auth/identity/repository.js +5 -5
- package/esm/src/features/auth/manager.js +1 -1
- package/esm/src/features/auth/profile/contract.d.ts +17 -25
- package/esm/src/features/auth/profile/contract.d.ts.map +1 -1
- package/esm/src/features/auth/profile/contract.js +2 -4
- package/esm/src/features/auth/repository.d.ts +0 -1
- package/esm/src/features/auth/repository.d.ts.map +1 -1
- package/esm/src/features/auth/repository.js +3 -11
- package/esm/src/features/auth/storage/server_token_handler.d.ts +7 -6
- package/esm/src/features/auth/storage/server_token_handler.d.ts.map +1 -1
- package/esm/src/features/auth/storage/server_token_handler.js +73 -26
- package/esm/src/features/contact/contract.d.ts +10 -10
- package/esm/src/features/payout/contract.d.ts +16 -16
- package/esm/src/features/wallet/contract.d.ts +3 -6
- package/esm/src/features/wallet/contract.d.ts.map +1 -1
- package/esm/src/features/wallet/repository.d.ts +1 -28
- package/esm/src/features/wallet/repository.d.ts.map +1 -1
- package/esm/src/features/wallet/repository.js +0 -51
- package/esm/src/models/contact/derivatives/contact.js +2 -2
- package/esm/src/models/contact/derivatives/contact_info.d.ts +8 -8
- package/esm/src/models/contact/derivatives/contact_info.d.ts.map +1 -1
- package/esm/src/models/contact/derivatives/contact_info.js +12 -12
- package/esm/src/models/payout/channel.d.ts +4 -4
- package/esm/src/models/payout/channel.d.ts.map +1 -1
- package/esm/src/models/payout/channel.js +10 -3
- package/esm/src/models/payout/derivatives/payout.d.ts.map +1 -1
- package/esm/src/models/payout/derivatives/payout.js +2 -2
- package/esm/src/models/payout/schemas.d.ts +2 -1
- package/esm/src/models/payout/schemas.d.ts.map +1 -1
- package/esm/src/models/payout/schemas.js +1 -0
- package/esm/src/models/payout/status.d.ts +1 -0
- package/esm/src/models/payout/status.d.ts.map +1 -1
- package/esm/src/models/payout/status.js +1 -0
- package/esm/src/models/user/profile.d.ts +135 -12
- package/esm/src/models/user/profile.d.ts.map +1 -1
- package/esm/src/models/user/profile.js +321 -12
- package/esm/src/models/user/user.d.ts +14 -17
- package/esm/src/models/user/user.d.ts.map +1 -1
- package/esm/src/models/user/user.js +109 -26
- package/esm/src/models/wallet/guards.d.ts.map +1 -1
- package/esm/src/models/wallet/guards.js +8 -2
- package/esm/src/models/wallet/index.d.ts +0 -1
- package/esm/src/models/wallet/index.d.ts.map +1 -1
- package/esm/src/models/wallet/index.js +0 -1
- package/esm/src/models/wallet/schemas.d.ts +1 -2
- package/esm/src/models/wallet/schemas.d.ts.map +1 -1
- package/esm/src/models/wallet/schemas.js +3 -12
- package/esm/src/shared/token_required_repository.d.ts +78 -0
- package/esm/src/shared/token_required_repository.d.ts.map +1 -0
- package/esm/src/shared/token_required_repository.js +128 -0
- package/package.json +7 -7
- package/script/src/features/auth/access/contract.d.ts +14 -0
- package/script/src/features/auth/access/contract.d.ts.map +1 -0
- package/script/src/features/auth/access/contract.js +17 -0
- package/script/src/features/auth/contract.d.ts +20 -20
- package/script/src/features/auth/contract.js +1 -1
- package/script/src/features/auth/identity/contract.d.ts +0 -7
- package/script/src/features/auth/identity/contract.d.ts.map +1 -1
- package/script/src/features/auth/identity/contract.js +0 -1
- package/script/src/features/auth/identity/repository.d.ts +2 -2
- package/script/src/features/auth/identity/repository.d.ts.map +1 -1
- package/script/src/features/auth/identity/repository.js +5 -5
- package/script/src/features/auth/manager.js +1 -1
- package/script/src/features/auth/profile/contract.d.ts +17 -25
- package/script/src/features/auth/profile/contract.d.ts.map +1 -1
- package/script/src/features/auth/profile/contract.js +1 -3
- package/script/src/features/auth/repository.d.ts +0 -1
- package/script/src/features/auth/repository.d.ts.map +1 -1
- package/script/src/features/auth/repository.js +3 -11
- package/script/src/features/auth/storage/server_token_handler.d.ts +7 -6
- package/script/src/features/auth/storage/server_token_handler.d.ts.map +1 -1
- package/script/src/features/auth/storage/server_token_handler.js +72 -25
- package/script/src/features/contact/contract.d.ts +10 -10
- package/script/src/features/payout/contract.d.ts +16 -16
- package/script/src/features/wallet/contract.d.ts +3 -6
- package/script/src/features/wallet/contract.d.ts.map +1 -1
- package/script/src/features/wallet/repository.d.ts +1 -28
- package/script/src/features/wallet/repository.d.ts.map +1 -1
- package/script/src/features/wallet/repository.js +0 -51
- package/script/src/models/contact/derivatives/contact.js +1 -1
- package/script/src/models/contact/derivatives/contact_info.d.ts +8 -8
- package/script/src/models/contact/derivatives/contact_info.d.ts.map +1 -1
- package/script/src/models/contact/derivatives/contact_info.js +11 -11
- package/script/src/models/payout/channel.d.ts +4 -4
- package/script/src/models/payout/channel.d.ts.map +1 -1
- package/script/src/models/payout/channel.js +10 -3
- package/script/src/models/payout/derivatives/payout.d.ts.map +1 -1
- package/script/src/models/payout/derivatives/payout.js +1 -1
- package/script/src/models/payout/schemas.d.ts +2 -1
- package/script/src/models/payout/schemas.d.ts.map +1 -1
- package/script/src/models/payout/schemas.js +1 -0
- package/script/src/models/payout/status.d.ts +1 -0
- package/script/src/models/payout/status.d.ts.map +1 -1
- package/script/src/models/payout/status.js +1 -0
- package/script/src/models/user/profile.d.ts +135 -12
- package/script/src/models/user/profile.d.ts.map +1 -1
- package/script/src/models/user/profile.js +323 -13
- package/script/src/models/user/user.d.ts +14 -17
- package/script/src/models/user/user.d.ts.map +1 -1
- package/script/src/models/user/user.js +109 -26
- package/script/src/models/wallet/guards.d.ts.map +1 -1
- package/script/src/models/wallet/guards.js +8 -2
- package/script/src/models/wallet/index.d.ts +0 -1
- package/script/src/models/wallet/index.d.ts.map +1 -1
- package/script/src/models/wallet/index.js +0 -1
- package/script/src/models/wallet/schemas.d.ts +1 -2
- package/script/src/models/wallet/schemas.d.ts.map +1 -1
- package/script/src/models/wallet/schemas.js +3 -12
- package/script/src/shared/token_required_repository.d.ts +78 -0
- package/script/src/shared/token_required_repository.d.ts.map +1 -0
- package/script/src/shared/token_required_repository.js +132 -0
- package/esm/src/features/auth/profile/repository.d.ts +0 -11
- package/esm/src/features/auth/profile/repository.d.ts.map +0 -1
- package/esm/src/features/auth/profile/repository.js +0 -21
- package/esm/src/features/files-gen/contract.d.ts +0 -67
- package/esm/src/features/files-gen/contract.d.ts.map +0 -1
- package/esm/src/features/files-gen/contract.js +0 -40
- package/esm/src/features/files-gen/repository.d.ts +0 -50
- package/esm/src/features/files-gen/repository.d.ts.map +0 -1
- package/esm/src/features/files-gen/repository.js +0 -56
- package/esm/src/models/wallet/statement.d.ts +0 -27
- package/esm/src/models/wallet/statement.d.ts.map +0 -1
- package/esm/src/models/wallet/statement.js +0 -13
- package/script/src/features/auth/profile/repository.d.ts +0 -11
- package/script/src/features/auth/profile/repository.d.ts.map +0 -1
- package/script/src/features/auth/profile/repository.js +0 -25
- package/script/src/features/files-gen/contract.d.ts +0 -67
- package/script/src/features/files-gen/contract.d.ts.map +0 -1
- package/script/src/features/files-gen/contract.js +0 -43
- package/script/src/features/files-gen/repository.d.ts +0 -50
- package/script/src/features/files-gen/repository.d.ts.map +0 -1
- package/script/src/features/files-gen/repository.js +0 -60
- package/script/src/models/wallet/statement.d.ts +0 -27
- package/script/src/models/wallet/statement.d.ts.map +0 -1
- package/script/src/models/wallet/statement.js +0 -16
|
@@ -6,13 +6,6 @@ export declare const identityContract: {
|
|
|
6
6
|
getUserCredentials: {
|
|
7
7
|
method: "GET";
|
|
8
8
|
path: "/me";
|
|
9
|
-
headers: z.ZodObject<{
|
|
10
|
-
token: z.ZodString;
|
|
11
|
-
}, "strip", z.ZodTypeAny, {
|
|
12
|
-
token: string;
|
|
13
|
-
}, {
|
|
14
|
-
token: string;
|
|
15
|
-
}>;
|
|
16
9
|
responses: {
|
|
17
10
|
200: z.ZodObject<{
|
|
18
11
|
name: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../../../src/src/features/auth/identity/contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../../../src/src/features/auth/identity/contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;CAW3B,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { BaseRepository } from "../../../shared/index.js";
|
|
2
1
|
import { identityContract } from "./contract.js";
|
|
3
2
|
import type { ClientInferResponseBody } from "@ts-rest/core";
|
|
3
|
+
import { TokenRequiredRepository } from "../../../shared/token_required_repository.js";
|
|
4
4
|
type GetUserIdentityResponse = ClientInferResponseBody<typeof identityContract.getUserCredentials>;
|
|
5
5
|
/**
|
|
6
6
|
* Class representing the LoginRepository.
|
|
7
7
|
* Provides methods to retrieve user identity-related information.
|
|
8
8
|
*/
|
|
9
|
-
export declare class LoginRepository extends
|
|
9
|
+
export declare class LoginRepository extends TokenRequiredRepository<typeof identityContract> {
|
|
10
10
|
/**
|
|
11
11
|
* Initializes an instance of LoginRepository.
|
|
12
12
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../../../../src/src/features/auth/identity/repository.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../../../../src/src/features/auth/identity/repository.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AAEvF,KAAK,uBAAuB,GAAG,uBAAuB,CACpD,OAAO,gBAAgB,CAAC,kBAAkB,CAC3C,CAAC;AAEF;;;GAGG;AACH,qBAAa,eACX,SAAQ,uBAAuB,CAAC,OAAO,gBAAgB,CAAC;IACxD;;OAEG;;IAKH;;;;OAIG;IACG,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC;CAUnE"}
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LoginRepository = void 0;
|
|
4
4
|
const api_error_js_1 = require("../../../errors/api_error.js");
|
|
5
|
-
const index_js_1 = require("../../../shared/index.js");
|
|
6
5
|
const contract_js_1 = require("./contract.js");
|
|
6
|
+
const token_required_repository_js_1 = require("../../../shared/token_required_repository.js");
|
|
7
7
|
/**
|
|
8
8
|
* Class representing the LoginRepository.
|
|
9
9
|
* Provides methods to retrieve user identity-related information.
|
|
10
10
|
*/
|
|
11
|
-
class LoginRepository extends
|
|
11
|
+
class LoginRepository extends token_required_repository_js_1.TokenRequiredRepository {
|
|
12
12
|
/**
|
|
13
13
|
* Initializes an instance of LoginRepository.
|
|
14
14
|
*/
|
|
15
15
|
constructor() {
|
|
16
|
-
super("login", contract_js_1.identityContract);
|
|
16
|
+
super("login", contract_js_1.identityContract, "");
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* Retrieves the user's login credentials.
|
|
@@ -21,8 +21,8 @@ class LoginRepository extends index_js_1.BaseRepository {
|
|
|
21
21
|
* @throws {APIError} If an error occurs while retrieving the credentials.
|
|
22
22
|
*/
|
|
23
23
|
async getIdentity(token) {
|
|
24
|
-
|
|
25
|
-
const result = await this.client.getUserCredentials(
|
|
24
|
+
this.setToken(token);
|
|
25
|
+
const result = await this.client.getUserCredentials();
|
|
26
26
|
if (result.status === 200)
|
|
27
27
|
return result.body;
|
|
28
28
|
throw new api_error_js_1.APIError({
|
|
@@ -80,7 +80,7 @@ class AfloatAuth {
|
|
|
80
80
|
const store = new server_store_js_1.ServerStore();
|
|
81
81
|
try {
|
|
82
82
|
// Fetch and construct user data
|
|
83
|
-
const user = await tokenHandler.constructUser();
|
|
83
|
+
const user = await tokenHandler.constructUser(token);
|
|
84
84
|
store.setUser(user);
|
|
85
85
|
// Create and initialize auth instance
|
|
86
86
|
const auth = new AfloatAuth(store, tokenHandler);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
1
|
/**
|
|
3
2
|
* Profile API contract
|
|
4
3
|
*/
|
|
@@ -6,38 +5,31 @@ export declare const profileContract: {
|
|
|
6
5
|
getCurrentProfile: {
|
|
7
6
|
method: "GET";
|
|
8
7
|
path: "/me";
|
|
9
|
-
headers: z.ZodObject<{
|
|
10
|
-
token: z.ZodString;
|
|
11
|
-
}, "strip", z.ZodTypeAny, {
|
|
12
|
-
token: string;
|
|
13
|
-
}, {
|
|
14
|
-
token: string;
|
|
15
|
-
}>;
|
|
16
8
|
responses: {
|
|
17
|
-
200:
|
|
18
|
-
id:
|
|
19
|
-
firstName:
|
|
20
|
-
lastName:
|
|
21
|
-
displayName:
|
|
22
|
-
phone:
|
|
23
|
-
accountNo:
|
|
24
|
-
email:
|
|
25
|
-
},
|
|
9
|
+
200: import("zod").ZodObject<{
|
|
10
|
+
id: import("zod").ZodString;
|
|
11
|
+
firstName: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
12
|
+
lastName: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
13
|
+
displayName: import("zod").ZodString;
|
|
14
|
+
phone: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
15
|
+
accountNo: import("zod").ZodString;
|
|
16
|
+
email: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
17
|
+
}, import("zod").UnknownKeysParam, import("zod").ZodTypeAny, {
|
|
26
18
|
id: string;
|
|
27
|
-
firstName: string;
|
|
28
|
-
lastName: string;
|
|
29
19
|
displayName: string;
|
|
30
|
-
phone: string;
|
|
31
20
|
accountNo: string;
|
|
32
|
-
|
|
21
|
+
firstName?: string | null | undefined;
|
|
22
|
+
lastName?: string | null | undefined;
|
|
23
|
+
phone?: string | null | undefined;
|
|
24
|
+
email?: string | null | undefined;
|
|
33
25
|
}, {
|
|
34
26
|
id: string;
|
|
35
|
-
firstName: string;
|
|
36
|
-
lastName: string;
|
|
37
27
|
displayName: string;
|
|
38
|
-
phone: string;
|
|
39
28
|
accountNo: string;
|
|
40
|
-
|
|
29
|
+
firstName?: string | null | undefined;
|
|
30
|
+
lastName?: string | null | undefined;
|
|
31
|
+
phone?: string | null | undefined;
|
|
32
|
+
email?: string | null | undefined;
|
|
41
33
|
}>;
|
|
42
34
|
};
|
|
43
35
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../../../src/src/features/auth/profile/contract.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../../../src/src/features/auth/profile/contract.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQ1B,CAAC"}
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.profileContract = void 0;
|
|
4
4
|
const core_1 = require("@ts-rest/core");
|
|
5
5
|
const index_js_1 = require("../../../models/index.js");
|
|
6
|
-
const zod_1 = require("zod");
|
|
7
6
|
/**
|
|
8
7
|
* Profile API contract
|
|
9
8
|
*/
|
|
@@ -11,9 +10,8 @@ exports.profileContract = (0, core_1.initContract)().router({
|
|
|
11
10
|
getCurrentProfile: {
|
|
12
11
|
method: "GET",
|
|
13
12
|
path: "/me",
|
|
14
|
-
headers: zod_1.z.object({ token: zod_1.z.string() }),
|
|
15
13
|
responses: {
|
|
16
|
-
200: index_js_1.
|
|
14
|
+
200: index_js_1.Profile.schema,
|
|
17
15
|
},
|
|
18
16
|
},
|
|
19
17
|
});
|
|
@@ -26,6 +26,5 @@ export declare class AuthRepository extends BaseRepository<typeof authContract>
|
|
|
26
26
|
* @throws {APIError} If the current password is invalid or another error occurs during the update process.
|
|
27
27
|
*/
|
|
28
28
|
updatePassword(currentPassword: string, newPassword: string): Promise<boolean>;
|
|
29
|
-
getAccessList(token: string): Promise<string[]>;
|
|
30
29
|
}
|
|
31
30
|
//# sourceMappingURL=repository.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../../../src/src/features/auth/repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAI7C;;;GAGG;AACH,qBAAa,cAAe,SAAQ,cAAc,CAAC,OAAO,YAAY,CAAC;IACrE;;OAEG;;IAKH;;;;;;OAMG;IACG,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../../../src/src/features/auth/repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAI7C;;;GAGG;AACH,qBAAa,cAAe,SAAQ,cAAc,CAAC,OAAO,YAAY,CAAC;IACrE;;OAEG;;IAKH;;;;;;OAMG;IACG,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAuB3D;;;;;;OAMG;IACG,cAAc,CAClB,eAAe,EAAE,MAAM,EACvB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,OAAO,CAAC;CAiBpB"}
|
|
@@ -36,8 +36,9 @@ class AuthRepository extends base_repository_js_1.BaseRepository {
|
|
|
36
36
|
if (result.status === 201) {
|
|
37
37
|
const repo = new repository_js_1.LoginRepository();
|
|
38
38
|
const loginCredentials = await repo.getIdentity(result.body.token);
|
|
39
|
-
const user =
|
|
40
|
-
|
|
39
|
+
const user = index_js_1.User.from({ ...result.body, ...loginCredentials });
|
|
40
|
+
if (user)
|
|
41
|
+
return user;
|
|
41
42
|
}
|
|
42
43
|
throw new api_error_js_1.APIError({
|
|
43
44
|
message: "An error occurred while trying to log in",
|
|
@@ -68,14 +69,5 @@ class AuthRepository extends base_repository_js_1.BaseRepository {
|
|
|
68
69
|
statusCode: 502,
|
|
69
70
|
});
|
|
70
71
|
}
|
|
71
|
-
async getAccessList(token) {
|
|
72
|
-
const result = await this.client.access({ headers: { token: token } });
|
|
73
|
-
if (result.status === 200)
|
|
74
|
-
return result.body;
|
|
75
|
-
throw new api_error_js_1.APIError({
|
|
76
|
-
message: "An error occurred while trying to get access list",
|
|
77
|
-
statusCode: 502,
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
72
|
}
|
|
81
73
|
exports.AuthRepository = AuthRepository;
|
|
@@ -3,15 +3,19 @@ import { User } from "../../../models/index.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* Server-side implementation of TokenHandler.
|
|
5
5
|
* Manages tokens in memory for the duration of a request.
|
|
6
|
+
* Uses TokenRequiredRepository instead of repositories that rely on AfloatAuth.
|
|
6
7
|
* @implements {TokenHandler}
|
|
7
8
|
*/
|
|
8
9
|
export declare class ServerTokenHandler implements TokenHandler {
|
|
9
|
-
private token
|
|
10
|
+
private token;
|
|
11
|
+
private accessRepo;
|
|
12
|
+
private profileRepo;
|
|
13
|
+
private identityRepo;
|
|
10
14
|
/**
|
|
11
15
|
* Creates a new instance of ServerTokenHandler.
|
|
12
16
|
* @param {string} [token] - Optional initial token value
|
|
13
17
|
*/
|
|
14
|
-
constructor(token
|
|
18
|
+
constructor(token: string);
|
|
15
19
|
/**
|
|
16
20
|
* Returns the stored token.
|
|
17
21
|
* @returns {string | undefined} The current token or undefined if not set
|
|
@@ -22,14 +26,11 @@ export declare class ServerTokenHandler implements TokenHandler {
|
|
|
22
26
|
* @param {string} token - The token to store
|
|
23
27
|
*/
|
|
24
28
|
setUserToken(token: string): void;
|
|
25
|
-
/**
|
|
26
|
-
* Clears the stored token from memory.
|
|
27
|
-
*/
|
|
28
29
|
clearToken(): void;
|
|
29
30
|
/**
|
|
30
31
|
* Fetches and constructs the full user data
|
|
31
32
|
* @returns {Promise<User>}
|
|
32
33
|
*/
|
|
33
|
-
constructUser(): Promise<User>;
|
|
34
|
+
constructUser(token: string): Promise<User>;
|
|
34
35
|
}
|
|
35
36
|
//# sourceMappingURL=server_token_handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server_token_handler.d.ts","sourceRoot":"","sources":["../../../../../src/src/features/auth/storage/server_token_handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,
|
|
1
|
+
{"version":3,"file":"server_token_handler.d.ts","sourceRoot":"","sources":["../../../../../src/src/features/auth/storage/server_token_handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAW,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAMzD;;;;;GAKG;AACH,qBAAa,kBAAmB,YAAW,YAAY;IACrD,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,UAAU,CAAiD;IACnE,OAAO,CAAC,WAAW,CAAkD;IACrE,OAAO,CAAC,YAAY,CAAmD;IAEvE;;;OAGG;gBACS,KAAK,EAAE,MAAM;IAqBzB;;;OAGG;IACH,YAAY,IAAI,MAAM,GAAG,SAAS;IAIlC;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAOjC,UAAU,IAAI,IAAI;IAOlB;;;OAGG;IACG,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAoDlD"}
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ServerTokenHandler = void 0;
|
|
4
4
|
const index_js_1 = require("../../../models/index.js");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
5
|
+
const contract_js_1 = require("../profile/contract.js");
|
|
6
|
+
const contract_js_2 = require("../identity/contract.js");
|
|
7
|
+
const token_required_repository_js_1 = require("../../../shared/token_required_repository.js");
|
|
8
|
+
const contract_js_3 = require("../access/contract.js");
|
|
8
9
|
/**
|
|
9
10
|
* Server-side implementation of TokenHandler.
|
|
10
11
|
* Manages tokens in memory for the duration of a request.
|
|
12
|
+
* Uses TokenRequiredRepository instead of repositories that rely on AfloatAuth.
|
|
11
13
|
* @implements {TokenHandler}
|
|
12
14
|
*/
|
|
13
15
|
class ServerTokenHandler {
|
|
@@ -20,8 +22,30 @@ class ServerTokenHandler {
|
|
|
20
22
|
enumerable: true,
|
|
21
23
|
configurable: true,
|
|
22
24
|
writable: true,
|
|
23
|
-
value:
|
|
25
|
+
value: void 0
|
|
24
26
|
});
|
|
27
|
+
Object.defineProperty(this, "accessRepo", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
configurable: true,
|
|
30
|
+
writable: true,
|
|
31
|
+
value: void 0
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(this, "profileRepo", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
configurable: true,
|
|
36
|
+
writable: true,
|
|
37
|
+
value: void 0
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(this, "identityRepo", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
configurable: true,
|
|
42
|
+
writable: true,
|
|
43
|
+
value: void 0
|
|
44
|
+
});
|
|
45
|
+
this.token = token;
|
|
46
|
+
this.accessRepo = new token_required_repository_js_1.TokenRequiredRepository("auth", contract_js_3.accessContract, this.token);
|
|
47
|
+
this.profileRepo = new token_required_repository_js_1.TokenRequiredRepository("profile", contract_js_1.profileContract, this.token);
|
|
48
|
+
this.identityRepo = new token_required_repository_js_1.TokenRequiredRepository("login", contract_js_2.identityContract, this.token);
|
|
25
49
|
}
|
|
26
50
|
/**
|
|
27
51
|
* Returns the stored token.
|
|
@@ -36,37 +60,60 @@ class ServerTokenHandler {
|
|
|
36
60
|
*/
|
|
37
61
|
setUserToken(token) {
|
|
38
62
|
this.token = token;
|
|
63
|
+
this.accessRepo.setToken(token);
|
|
64
|
+
this.profileRepo.setToken(token);
|
|
65
|
+
this.identityRepo.setToken(token);
|
|
39
66
|
}
|
|
40
|
-
/**
|
|
41
|
-
* Clears the stored token from memory.
|
|
42
|
-
*/
|
|
43
67
|
clearToken() {
|
|
44
|
-
this.token =
|
|
68
|
+
this.token = "";
|
|
69
|
+
this.accessRepo.setToken("");
|
|
70
|
+
this.profileRepo.setToken("");
|
|
71
|
+
this.identityRepo.setToken("");
|
|
45
72
|
}
|
|
46
73
|
/**
|
|
47
74
|
* Fetches and constructs the full user data
|
|
48
75
|
* @returns {Promise<User>}
|
|
49
76
|
*/
|
|
50
|
-
async constructUser() {
|
|
77
|
+
async constructUser(token) {
|
|
51
78
|
if (!this.token) {
|
|
52
79
|
throw new Error("Token is required to construct user");
|
|
53
80
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
81
|
+
this.setUserToken(token);
|
|
82
|
+
try {
|
|
83
|
+
// Fetch all data concurrently with Promise.all
|
|
84
|
+
const [access, profileResult, identityResult] = await Promise.all([
|
|
85
|
+
this.accessRepo.client.getAccessList(),
|
|
86
|
+
this.profileRepo.client.getCurrentProfile(),
|
|
87
|
+
this.identityRepo.client.getUserCredentials(),
|
|
88
|
+
]);
|
|
89
|
+
// Extract and validate response data
|
|
90
|
+
const accessList = this.accessRepo.handleResponse(access, 200);
|
|
91
|
+
const profileData = this.profileRepo.handleResponse(profileResult, 200);
|
|
92
|
+
const identityData = this.identityRepo.handleResponse(identityResult, 200);
|
|
93
|
+
// Create profile object
|
|
94
|
+
const profile = index_js_1.Profile.from(profileData);
|
|
95
|
+
if (!profile) {
|
|
96
|
+
throw new Error("Failed to create profile from response data");
|
|
97
|
+
}
|
|
98
|
+
// Construct and return user object
|
|
99
|
+
const user = index_js_1.User.from({
|
|
100
|
+
token: this.token,
|
|
101
|
+
profile,
|
|
102
|
+
access: accessList,
|
|
103
|
+
resetPassword: false,
|
|
104
|
+
...identityData,
|
|
105
|
+
});
|
|
106
|
+
if (!user) {
|
|
107
|
+
throw new Error("Failed to construct user");
|
|
108
|
+
}
|
|
109
|
+
return user;
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
const message = error instanceof Error
|
|
113
|
+
? error.message
|
|
114
|
+
: "Unknown error occurred";
|
|
115
|
+
throw new Error(`Error constructing user: ${message}`);
|
|
116
|
+
}
|
|
70
117
|
}
|
|
71
118
|
}
|
|
72
119
|
exports.ServerTokenHandler = ServerTokenHandler;
|
|
@@ -17,14 +17,14 @@ export declare const contract: {
|
|
|
17
17
|
channel: z.ZodString;
|
|
18
18
|
type: z.ZodEnum<["Bank", "Mobile"]>;
|
|
19
19
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
20
|
+
type: "Bank" | "Mobile";
|
|
20
21
|
displayName: string;
|
|
21
22
|
accountNo: string;
|
|
22
|
-
type: "Bank" | "Mobile";
|
|
23
23
|
channel: string;
|
|
24
24
|
}, {
|
|
25
|
+
type: "Bank" | "Mobile";
|
|
25
26
|
displayName: string;
|
|
26
27
|
accountNo: string;
|
|
27
|
-
type: "Bank" | "Mobile";
|
|
28
28
|
channel: string;
|
|
29
29
|
}>;
|
|
30
30
|
path: "/";
|
|
@@ -40,19 +40,19 @@ export declare const contract: {
|
|
|
40
40
|
createdAt: z.ZodDate;
|
|
41
41
|
updatedAt: z.ZodDate;
|
|
42
42
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
43
|
+
type: "Bank" | "Mobile";
|
|
43
44
|
id: string;
|
|
44
45
|
displayName: string;
|
|
45
46
|
accountNo: string;
|
|
46
|
-
type: "Bank" | "Mobile";
|
|
47
47
|
channel: string;
|
|
48
48
|
profileId: string;
|
|
49
49
|
createdAt: Date;
|
|
50
50
|
updatedAt: Date;
|
|
51
51
|
}, {
|
|
52
|
+
type: "Bank" | "Mobile";
|
|
52
53
|
id: string;
|
|
53
54
|
displayName: string;
|
|
54
55
|
accountNo: string;
|
|
55
|
-
type: "Bank" | "Mobile";
|
|
56
56
|
channel: string;
|
|
57
57
|
profileId: string;
|
|
58
58
|
createdAt: Date;
|
|
@@ -68,14 +68,14 @@ export declare const contract: {
|
|
|
68
68
|
channel: z.ZodString;
|
|
69
69
|
type: z.ZodEnum<["Bank", "Mobile"]>;
|
|
70
70
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
71
|
+
type: "Bank" | "Mobile";
|
|
71
72
|
displayName: string;
|
|
72
73
|
accountNo: string;
|
|
73
|
-
type: "Bank" | "Mobile";
|
|
74
74
|
channel: string;
|
|
75
75
|
}, {
|
|
76
|
+
type: "Bank" | "Mobile";
|
|
76
77
|
displayName: string;
|
|
77
78
|
accountNo: string;
|
|
78
|
-
type: "Bank" | "Mobile";
|
|
79
79
|
channel: string;
|
|
80
80
|
}>;
|
|
81
81
|
path: "/:id";
|
|
@@ -91,19 +91,19 @@ export declare const contract: {
|
|
|
91
91
|
createdAt: z.ZodDate;
|
|
92
92
|
updatedAt: z.ZodDate;
|
|
93
93
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
94
|
+
type: "Bank" | "Mobile";
|
|
94
95
|
id: string;
|
|
95
96
|
displayName: string;
|
|
96
97
|
accountNo: string;
|
|
97
|
-
type: "Bank" | "Mobile";
|
|
98
98
|
channel: string;
|
|
99
99
|
profileId: string;
|
|
100
100
|
createdAt: Date;
|
|
101
101
|
updatedAt: Date;
|
|
102
102
|
}, {
|
|
103
|
+
type: "Bank" | "Mobile";
|
|
103
104
|
id: string;
|
|
104
105
|
displayName: string;
|
|
105
106
|
accountNo: string;
|
|
106
|
-
type: "Bank" | "Mobile";
|
|
107
107
|
channel: string;
|
|
108
108
|
profileId: string;
|
|
109
109
|
createdAt: Date;
|
|
@@ -133,19 +133,19 @@ export declare const contract: {
|
|
|
133
133
|
createdAt: z.ZodDate;
|
|
134
134
|
updatedAt: z.ZodDate;
|
|
135
135
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
136
|
+
type: "Bank" | "Mobile";
|
|
136
137
|
id: string;
|
|
137
138
|
displayName: string;
|
|
138
139
|
accountNo: string;
|
|
139
|
-
type: "Bank" | "Mobile";
|
|
140
140
|
channel: string;
|
|
141
141
|
profileId: string;
|
|
142
142
|
createdAt: Date;
|
|
143
143
|
updatedAt: Date;
|
|
144
144
|
}, {
|
|
145
|
+
type: "Bank" | "Mobile";
|
|
145
146
|
id: string;
|
|
146
147
|
displayName: string;
|
|
147
148
|
accountNo: string;
|
|
148
|
-
type: "Bank" | "Mobile";
|
|
149
149
|
channel: string;
|
|
150
150
|
profileId: string;
|
|
151
151
|
createdAt: Date;
|
|
@@ -46,7 +46,7 @@ export declare const contract: {
|
|
|
46
46
|
id: z.ZodString;
|
|
47
47
|
profileId: z.ZodString;
|
|
48
48
|
payeeName: z.ZodString;
|
|
49
|
-
status: z.ZodEnum<[import("../../models/payout/status.js").PAYOUT_STATUS.CREATED, import("../../models/payout/status.js").PAYOUT_STATUS.PAID, import("../../models/payout/status.js").PAYOUT_STATUS.FAILED, import("../../models/payout/status.js").PAYOUT_STATUS.REJECTED, import("../../models/payout/status.js").PAYOUT_STATUS.PENDING]>;
|
|
49
|
+
status: z.ZodEnum<[import("../../models/payout/status.js").PAYOUT_STATUS.CREATED, import("../../models/payout/status.js").PAYOUT_STATUS.PAID, import("../../models/payout/status.js").PAYOUT_STATUS.FAILED, import("../../models/payout/status.js").PAYOUT_STATUS.REJECTED, import("../../models/payout/status.js").PAYOUT_STATUS.PENDING, import("../../models/payout/status.js").PAYOUT_STATUS.QUEUED]>;
|
|
50
50
|
statusMessage: z.ZodString;
|
|
51
51
|
partnerReference: z.ZodOptional<z.ZodEffects<z.ZodNullable<z.ZodString>, string | undefined, string | null>>;
|
|
52
52
|
createdAt: z.ZodDate;
|
|
@@ -85,8 +85,8 @@ export declare const contract: {
|
|
|
85
85
|
identity: string;
|
|
86
86
|
} | null>>;
|
|
87
87
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
88
|
-
id: string;
|
|
89
88
|
status: import("../../models/payout/status.js").PAYOUT_STATUS;
|
|
89
|
+
id: string;
|
|
90
90
|
channel: string;
|
|
91
91
|
profileId: string;
|
|
92
92
|
createdAt: Date;
|
|
@@ -108,8 +108,8 @@ export declare const contract: {
|
|
|
108
108
|
identity: string;
|
|
109
109
|
} | undefined;
|
|
110
110
|
}, {
|
|
111
|
-
id: string;
|
|
112
111
|
status: import("../../models/payout/status.js").PAYOUT_STATUS;
|
|
112
|
+
id: string;
|
|
113
113
|
channel: string;
|
|
114
114
|
profileId: string;
|
|
115
115
|
createdAt: Date;
|
|
@@ -134,8 +134,8 @@ export declare const contract: {
|
|
|
134
134
|
total: z.ZodNumber;
|
|
135
135
|
}, "strip", z.ZodTypeAny, {
|
|
136
136
|
results: {
|
|
137
|
-
id: string;
|
|
138
137
|
status: import("../../models/payout/status.js").PAYOUT_STATUS;
|
|
138
|
+
id: string;
|
|
139
139
|
channel: string;
|
|
140
140
|
profileId: string;
|
|
141
141
|
createdAt: Date;
|
|
@@ -160,8 +160,8 @@ export declare const contract: {
|
|
|
160
160
|
total: number;
|
|
161
161
|
}, {
|
|
162
162
|
results: {
|
|
163
|
-
id: string;
|
|
164
163
|
status: import("../../models/payout/status.js").PAYOUT_STATUS;
|
|
164
|
+
id: string;
|
|
165
165
|
channel: string;
|
|
166
166
|
profileId: string;
|
|
167
167
|
createdAt: Date;
|
|
@@ -220,7 +220,7 @@ export declare const contract: {
|
|
|
220
220
|
id: z.ZodString;
|
|
221
221
|
profileId: z.ZodString;
|
|
222
222
|
payeeName: z.ZodString;
|
|
223
|
-
status: z.ZodEnum<[import("../../models/payout/status.js").PAYOUT_STATUS.CREATED, import("../../models/payout/status.js").PAYOUT_STATUS.PAID, import("../../models/payout/status.js").PAYOUT_STATUS.FAILED, import("../../models/payout/status.js").PAYOUT_STATUS.REJECTED, import("../../models/payout/status.js").PAYOUT_STATUS.PENDING]>;
|
|
223
|
+
status: z.ZodEnum<[import("../../models/payout/status.js").PAYOUT_STATUS.CREATED, import("../../models/payout/status.js").PAYOUT_STATUS.PAID, import("../../models/payout/status.js").PAYOUT_STATUS.FAILED, import("../../models/payout/status.js").PAYOUT_STATUS.REJECTED, import("../../models/payout/status.js").PAYOUT_STATUS.PENDING, import("../../models/payout/status.js").PAYOUT_STATUS.QUEUED]>;
|
|
224
224
|
statusMessage: z.ZodString;
|
|
225
225
|
partnerReference: z.ZodOptional<z.ZodEffects<z.ZodNullable<z.ZodString>, string | undefined, string | null>>;
|
|
226
226
|
createdAt: z.ZodDate;
|
|
@@ -259,8 +259,8 @@ export declare const contract: {
|
|
|
259
259
|
identity: string;
|
|
260
260
|
} | null>>;
|
|
261
261
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
262
|
-
id: string;
|
|
263
262
|
status: import("../../models/payout/status.js").PAYOUT_STATUS;
|
|
263
|
+
id: string;
|
|
264
264
|
channel: string;
|
|
265
265
|
profileId: string;
|
|
266
266
|
createdAt: Date;
|
|
@@ -282,8 +282,8 @@ export declare const contract: {
|
|
|
282
282
|
identity: string;
|
|
283
283
|
} | undefined;
|
|
284
284
|
}, {
|
|
285
|
-
id: string;
|
|
286
285
|
status: import("../../models/payout/status.js").PAYOUT_STATUS;
|
|
286
|
+
id: string;
|
|
287
287
|
channel: string;
|
|
288
288
|
profileId: string;
|
|
289
289
|
createdAt: Date;
|
|
@@ -308,8 +308,8 @@ export declare const contract: {
|
|
|
308
308
|
total: z.ZodNumber;
|
|
309
309
|
}, "strip", z.ZodTypeAny, {
|
|
310
310
|
results: {
|
|
311
|
-
id: string;
|
|
312
311
|
status: import("../../models/payout/status.js").PAYOUT_STATUS;
|
|
312
|
+
id: string;
|
|
313
313
|
channel: string;
|
|
314
314
|
profileId: string;
|
|
315
315
|
createdAt: Date;
|
|
@@ -334,8 +334,8 @@ export declare const contract: {
|
|
|
334
334
|
total: number;
|
|
335
335
|
}, {
|
|
336
336
|
results: {
|
|
337
|
-
id: string;
|
|
338
337
|
status: import("../../models/payout/status.js").PAYOUT_STATUS;
|
|
338
|
+
id: string;
|
|
339
339
|
channel: string;
|
|
340
340
|
profileId: string;
|
|
341
341
|
createdAt: Date;
|
|
@@ -396,7 +396,7 @@ export declare const contract: {
|
|
|
396
396
|
id: z.ZodString;
|
|
397
397
|
profileId: z.ZodString;
|
|
398
398
|
payeeName: z.ZodString;
|
|
399
|
-
status: z.ZodEnum<[import("../../models/payout/status.js").PAYOUT_STATUS.CREATED, import("../../models/payout/status.js").PAYOUT_STATUS.PAID, import("../../models/payout/status.js").PAYOUT_STATUS.FAILED, import("../../models/payout/status.js").PAYOUT_STATUS.REJECTED, import("../../models/payout/status.js").PAYOUT_STATUS.PENDING]>;
|
|
399
|
+
status: z.ZodEnum<[import("../../models/payout/status.js").PAYOUT_STATUS.CREATED, import("../../models/payout/status.js").PAYOUT_STATUS.PAID, import("../../models/payout/status.js").PAYOUT_STATUS.FAILED, import("../../models/payout/status.js").PAYOUT_STATUS.REJECTED, import("../../models/payout/status.js").PAYOUT_STATUS.PENDING, import("../../models/payout/status.js").PAYOUT_STATUS.QUEUED]>;
|
|
400
400
|
statusMessage: z.ZodString;
|
|
401
401
|
partnerReference: z.ZodOptional<z.ZodEffects<z.ZodNullable<z.ZodString>, string | undefined, string | null>>;
|
|
402
402
|
createdAt: z.ZodDate;
|
|
@@ -435,8 +435,8 @@ export declare const contract: {
|
|
|
435
435
|
identity: string;
|
|
436
436
|
} | null>>;
|
|
437
437
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
438
|
-
id: string;
|
|
439
438
|
status: import("../../models/payout/status.js").PAYOUT_STATUS;
|
|
439
|
+
id: string;
|
|
440
440
|
channel: string;
|
|
441
441
|
profileId: string;
|
|
442
442
|
createdAt: Date;
|
|
@@ -458,8 +458,8 @@ export declare const contract: {
|
|
|
458
458
|
identity: string;
|
|
459
459
|
} | undefined;
|
|
460
460
|
}, {
|
|
461
|
-
id: string;
|
|
462
461
|
status: import("../../models/payout/status.js").PAYOUT_STATUS;
|
|
462
|
+
id: string;
|
|
463
463
|
channel: string;
|
|
464
464
|
profileId: string;
|
|
465
465
|
createdAt: Date;
|
|
@@ -526,7 +526,7 @@ export declare const contract: {
|
|
|
526
526
|
id: z.ZodString;
|
|
527
527
|
profileId: z.ZodString;
|
|
528
528
|
payeeName: z.ZodString;
|
|
529
|
-
status: z.ZodEnum<[import("../../models/payout/status.js").PAYOUT_STATUS.CREATED, import("../../models/payout/status.js").PAYOUT_STATUS.PAID, import("../../models/payout/status.js").PAYOUT_STATUS.FAILED, import("../../models/payout/status.js").PAYOUT_STATUS.REJECTED, import("../../models/payout/status.js").PAYOUT_STATUS.PENDING]>;
|
|
529
|
+
status: z.ZodEnum<[import("../../models/payout/status.js").PAYOUT_STATUS.CREATED, import("../../models/payout/status.js").PAYOUT_STATUS.PAID, import("../../models/payout/status.js").PAYOUT_STATUS.FAILED, import("../../models/payout/status.js").PAYOUT_STATUS.REJECTED, import("../../models/payout/status.js").PAYOUT_STATUS.PENDING, import("../../models/payout/status.js").PAYOUT_STATUS.QUEUED]>;
|
|
530
530
|
statusMessage: z.ZodString;
|
|
531
531
|
partnerReference: z.ZodOptional<z.ZodEffects<z.ZodNullable<z.ZodString>, string | undefined, string | null>>;
|
|
532
532
|
createdAt: z.ZodDate;
|
|
@@ -565,8 +565,8 @@ export declare const contract: {
|
|
|
565
565
|
identity: string;
|
|
566
566
|
} | null>>;
|
|
567
567
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
568
|
-
id: string;
|
|
569
568
|
status: import("../../models/payout/status.js").PAYOUT_STATUS;
|
|
569
|
+
id: string;
|
|
570
570
|
channel: string;
|
|
571
571
|
profileId: string;
|
|
572
572
|
createdAt: Date;
|
|
@@ -588,8 +588,8 @@ export declare const contract: {
|
|
|
588
588
|
identity: string;
|
|
589
589
|
} | undefined;
|
|
590
590
|
}, {
|
|
591
|
-
id: string;
|
|
592
591
|
status: import("../../models/payout/status.js").PAYOUT_STATUS;
|
|
592
|
+
id: string;
|
|
593
593
|
channel: string;
|
|
594
594
|
profileId: string;
|
|
595
595
|
createdAt: Date;
|