@spritz-finance/service-client 0.2.70 → 0.2.71
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.
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
|
+
export declare enum UnblockUserStatus {
|
|
3
|
+
Created = "CREATED",
|
|
4
|
+
KycNeeded = "KYC_NEEDED",
|
|
5
|
+
PendingKycData = "PENDING_KYC_DATA",
|
|
6
|
+
KycPending = "KYC_PENDING",
|
|
7
|
+
SoftKycFailed = "SOFT_KYC_FAILED",
|
|
8
|
+
HardKycFailed = "HARD_KYC_FAILED",
|
|
9
|
+
FullUser = "FULL_USER",
|
|
10
|
+
Suspended = "SUSPENDED"
|
|
11
|
+
}
|
|
2
12
|
export type CreateUnblockAccountInput = {
|
|
3
13
|
otp: string;
|
|
4
14
|
userId: string;
|
|
@@ -10,11 +20,37 @@ export type CreateUnblockAccountInput = {
|
|
|
10
20
|
currency?: string;
|
|
11
21
|
};
|
|
12
22
|
};
|
|
23
|
+
export type CreateUnblockUserInput = {
|
|
24
|
+
userId: string;
|
|
25
|
+
firstName: string;
|
|
26
|
+
lastName: string;
|
|
27
|
+
email: string;
|
|
28
|
+
targetAddress?: string;
|
|
29
|
+
country: string;
|
|
30
|
+
};
|
|
13
31
|
export type UnblockAccount = {
|
|
14
32
|
id: string;
|
|
15
33
|
_id: string;
|
|
16
34
|
userId: string;
|
|
17
|
-
|
|
35
|
+
status: UnblockUserStatus;
|
|
36
|
+
externalId: string;
|
|
37
|
+
first_name: string;
|
|
38
|
+
last_name: string;
|
|
39
|
+
date_of_birth: string;
|
|
40
|
+
email: string;
|
|
41
|
+
target_address: string;
|
|
42
|
+
address: {
|
|
43
|
+
address_line_1: string;
|
|
44
|
+
address_line_2: string;
|
|
45
|
+
post_code: string;
|
|
46
|
+
city: string;
|
|
47
|
+
country: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
export type UnblockUser = {
|
|
51
|
+
id: string;
|
|
52
|
+
_id: string;
|
|
53
|
+
userId: string;
|
|
18
54
|
externalId: string;
|
|
19
55
|
account_name: string;
|
|
20
56
|
iban: string;
|
|
@@ -31,4 +67,5 @@ export declare class UnblockServiceClient {
|
|
|
31
67
|
success: boolean;
|
|
32
68
|
}>;
|
|
33
69
|
createUnblockAccount(input: CreateUnblockAccountInput): Promise<UnblockAccount>;
|
|
70
|
+
createUnblockUser(input: CreateUnblockUserInput): Promise<UnblockAccount>;
|
|
34
71
|
}
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UnblockServiceClient = void 0;
|
|
3
|
+
exports.UnblockServiceClient = exports.UnblockUserStatus = void 0;
|
|
4
4
|
const config_1 = require("./config");
|
|
5
5
|
const serviceClient_1 = require("./serviceClient");
|
|
6
|
+
var UnblockUserStatus;
|
|
7
|
+
(function (UnblockUserStatus) {
|
|
8
|
+
UnblockUserStatus["Created"] = "CREATED";
|
|
9
|
+
UnblockUserStatus["KycNeeded"] = "KYC_NEEDED";
|
|
10
|
+
UnblockUserStatus["PendingKycData"] = "PENDING_KYC_DATA";
|
|
11
|
+
UnblockUserStatus["KycPending"] = "KYC_PENDING";
|
|
12
|
+
UnblockUserStatus["SoftKycFailed"] = "SOFT_KYC_FAILED";
|
|
13
|
+
UnblockUserStatus["HardKycFailed"] = "HARD_KYC_FAILED";
|
|
14
|
+
UnblockUserStatus["FullUser"] = "FULL_USER";
|
|
15
|
+
UnblockUserStatus["Suspended"] = "SUSPENDED";
|
|
16
|
+
})(UnblockUserStatus || (exports.UnblockUserStatus = UnblockUserStatus = {}));
|
|
6
17
|
class UnblockServiceClient {
|
|
7
18
|
constructor() {
|
|
8
19
|
this.client = (0, serviceClient_1.createServiceClient)({
|
|
@@ -19,5 +30,10 @@ class UnblockServiceClient {
|
|
|
19
30
|
.post(`/account`, input)
|
|
20
31
|
.then((res) => res.data);
|
|
21
32
|
}
|
|
33
|
+
async createUnblockUser(input) {
|
|
34
|
+
return this.client
|
|
35
|
+
.post(`/user`, input)
|
|
36
|
+
.then((res) => res.data);
|
|
37
|
+
}
|
|
22
38
|
}
|
|
23
39
|
exports.UnblockServiceClient = UnblockServiceClient;
|