@yosle/tropipayjs 0.1.28 → 0.2.1
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/accounts/accounts.d.ts +52 -0
- package/api/TropipayAPI.d.ts +2 -0
- package/index.d.ts +102 -1
- package/index.js +68 -15
- package/interfaces/index.d.ts +35 -0
- package/interfaces/paymentlink/index.d.ts +1 -3
- package/package.json +2 -2
- package/src/accounts/accounts.ts +86 -0
- package/src/api/TropipayAPI.ts +23 -29
- package/src/depositAccount/depositAccounts.ts +5 -5
- package/src/interfaces/index.ts +264 -201
- package/src/interfaces/paymentlink/index.d.ts +33 -32
- package/src/interfaces/paymentlink/index.ts +1 -3
- package/src/paymentcard/PaymentCard.ts +4 -4
- package/src/utils/TropipayUtils.ts +40 -1
- package/utils/TropipayUtils.d.ts +14 -1
- package/paymentcard/paymentcard.spec.d.ts +0 -1
package/src/api/TropipayAPI.ts
CHANGED
|
@@ -22,12 +22,13 @@ import PaymentCard from "../paymentcard/PaymentCard";
|
|
|
22
22
|
import MediationPaymentCard from "../mediationPaymentCard/MediationPaymentCard";
|
|
23
23
|
import DepositAccounts from "../depositAccount/depositAccounts";
|
|
24
24
|
import { TropipayJSException, handleExceptions } from "../utils/errors";
|
|
25
|
+
import Accounts from "../accounts/accounts";
|
|
25
26
|
export class Tropipay {
|
|
26
27
|
readonly clientId: string;
|
|
27
28
|
readonly clientSecret: string;
|
|
28
29
|
readonly scopes: String[];
|
|
29
30
|
public request: Axios;
|
|
30
|
-
public loginRequest: Axios;
|
|
31
|
+
public loginRequest: Axios;
|
|
31
32
|
public static accessToken: string | null;
|
|
32
33
|
public static refreshToken: string | null;
|
|
33
34
|
public static expiresIn: number | null;
|
|
@@ -36,6 +37,7 @@ export class Tropipay {
|
|
|
36
37
|
public paymentCards: PaymentCard;
|
|
37
38
|
public depositAccounts: DepositAccounts;
|
|
38
39
|
public mediationPaymentCard: MediationPaymentCard;
|
|
40
|
+
public accounts: Accounts;
|
|
39
41
|
|
|
40
42
|
/**
|
|
41
43
|
* Initializes a new instance of the Tropipay class.
|
|
@@ -73,11 +75,12 @@ export class Tropipay {
|
|
|
73
75
|
this.clientSecret = config.clientSecret;
|
|
74
76
|
this.serverMode = config.serverMode || "Development";
|
|
75
77
|
|
|
76
|
-
const tpp_env =
|
|
77
|
-
|
|
78
|
-
|
|
78
|
+
const tpp_env =
|
|
79
|
+
this.serverMode === "Production"
|
|
80
|
+
? "https://www.tropipay.com"
|
|
81
|
+
: "https://sandbox.tropipay.me";
|
|
79
82
|
this.request = axios.create({
|
|
80
|
-
baseURL: config.customTropipayUrl || tpp_env,
|
|
83
|
+
baseURL: config.customTropipayUrl || tpp_env,
|
|
81
84
|
headers: {
|
|
82
85
|
"Content-Type": "application/json",
|
|
83
86
|
Accept: "application/json",
|
|
@@ -85,21 +88,20 @@ export class Tropipay {
|
|
|
85
88
|
},
|
|
86
89
|
});
|
|
87
90
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
91
|
+
// Create a separate instance for login requests
|
|
92
|
+
this.loginRequest = axios.create({
|
|
93
|
+
baseURL: config.customTropipayUrl || tpp_env,
|
|
94
|
+
headers: {
|
|
95
|
+
"Content-Type": "application/json",
|
|
96
|
+
Accept: "application/json",
|
|
97
|
+
},
|
|
98
|
+
});
|
|
96
99
|
|
|
97
|
-
|
|
98
|
-
|
|
100
|
+
// Add request interceptor for Token expired
|
|
101
|
+
this.request.interceptors.request.use(
|
|
99
102
|
async (config) => {
|
|
100
|
-
console.log("Executing interceptor!!");
|
|
101
103
|
const currentTimestamp = Math.floor(Date.now() / 1000);
|
|
102
|
-
|
|
104
|
+
|
|
103
105
|
if (Tropipay.expiresIn && Tropipay.expiresIn < currentTimestamp) {
|
|
104
106
|
console.debug("Token expired, attempting to log in");
|
|
105
107
|
try {
|
|
@@ -107,34 +109,29 @@ export class Tropipay {
|
|
|
107
109
|
} catch (error) {
|
|
108
110
|
throw handleExceptions(error as Error);
|
|
109
111
|
}
|
|
110
|
-
}
|
|
112
|
+
}
|
|
111
113
|
// Update the Authorization header in the config
|
|
112
|
-
config.headers.Authorization = `Bearer ${Tropipay.accessToken}`;
|
|
114
|
+
config.headers.Authorization = `Bearer ${Tropipay.accessToken}`;
|
|
113
115
|
return config;
|
|
114
116
|
},
|
|
115
117
|
(error) => {
|
|
116
118
|
return Promise.reject(error);
|
|
117
119
|
}
|
|
118
120
|
);
|
|
119
|
-
|
|
120
121
|
|
|
121
122
|
this.hooks = new TropipayHooks(this);
|
|
122
123
|
this.paymentCards = new PaymentCard(this);
|
|
123
124
|
this.mediationPaymentCard = new MediationPaymentCard(this);
|
|
124
125
|
|
|
125
126
|
this.depositAccounts = new DepositAccounts(this);
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
this.accounts = new Accounts(this)
|
|
130
128
|
}
|
|
131
129
|
|
|
132
130
|
public async login() {
|
|
133
131
|
try {
|
|
134
|
-
|
|
135
132
|
// normal credetials login
|
|
136
133
|
const { data } = await this.loginRequest.post<LoginResponse>(
|
|
137
|
-
"/api/
|
|
134
|
+
"/api/v3/access/token",
|
|
138
135
|
{
|
|
139
136
|
client_id: this.clientId,
|
|
140
137
|
client_secret: this.clientSecret,
|
|
@@ -149,13 +146,10 @@ export class Tropipay {
|
|
|
149
146
|
}
|
|
150
147
|
);
|
|
151
148
|
|
|
152
|
-
|
|
153
149
|
Tropipay.accessToken = data.access_token;
|
|
154
150
|
Tropipay.expiresIn = data.expires_in;
|
|
155
151
|
return data;
|
|
156
152
|
} catch (error) {
|
|
157
|
-
|
|
158
|
-
console.log("RAW login error ", error)
|
|
159
153
|
Tropipay.accessToken = null;
|
|
160
154
|
Tropipay.refreshToken = null;
|
|
161
155
|
Tropipay.expiresIn = null;
|
|
@@ -18,7 +18,7 @@ export default class DepositAccounts {
|
|
|
18
18
|
}
|
|
19
19
|
try {
|
|
20
20
|
const deposit = await this.tropipay.request.get(
|
|
21
|
-
`/api/
|
|
21
|
+
`/api/v3/deposit_accounts`,
|
|
22
22
|
{
|
|
23
23
|
headers: {
|
|
24
24
|
"Content-Type": "application/json",
|
|
@@ -43,7 +43,7 @@ export default class DepositAccounts {
|
|
|
43
43
|
}
|
|
44
44
|
try {
|
|
45
45
|
const deposit = await this.tropipay.request.post(
|
|
46
|
-
"/api/
|
|
46
|
+
"/api/v3/deposit_accounts",
|
|
47
47
|
depositAccountObj,
|
|
48
48
|
{
|
|
49
49
|
headers: {
|
|
@@ -70,7 +70,7 @@ export default class DepositAccounts {
|
|
|
70
70
|
}
|
|
71
71
|
try {
|
|
72
72
|
const deposit = await this.tropipay.request.get(
|
|
73
|
-
`/api/
|
|
73
|
+
`/api/v3/deposit_accounts/${id}`,
|
|
74
74
|
{
|
|
75
75
|
headers: {
|
|
76
76
|
"Content-Type": "application/json",
|
|
@@ -96,7 +96,7 @@ export default class DepositAccounts {
|
|
|
96
96
|
}
|
|
97
97
|
try {
|
|
98
98
|
const deposit = await this.tropipay.request.put(
|
|
99
|
-
`/api/
|
|
99
|
+
`/api/v3/deposit_accounts/`,
|
|
100
100
|
{
|
|
101
101
|
headers: {
|
|
102
102
|
"Content-Type": "application/json",
|
|
@@ -122,7 +122,7 @@ export default class DepositAccounts {
|
|
|
122
122
|
}
|
|
123
123
|
try {
|
|
124
124
|
const deposit = await this.tropipay.request.delete(
|
|
125
|
-
`/api/
|
|
125
|
+
`/api/v3/deposit_accounts/${id}`,
|
|
126
126
|
{
|
|
127
127
|
headers: {
|
|
128
128
|
"Content-Type": "application/json",
|
package/src/interfaces/index.ts
CHANGED
|
@@ -1,201 +1,264 @@
|
|
|
1
|
-
import { ServerMode } from "../constants/TropipayConstants";
|
|
2
|
-
|
|
3
|
-
export type AccountBalance = {
|
|
4
|
-
balance: number;
|
|
5
|
-
pendingIn: number;
|
|
6
|
-
pendingOut: number;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export interface TropipayConfig {
|
|
10
|
-
clientId: string;
|
|
11
|
-
clientSecret: string;
|
|
12
|
-
scopes?: string[];
|
|
13
|
-
serverMode?: ServerMode;
|
|
14
|
-
// Custom tropipay environment for testing
|
|
15
|
-
customTropipayUrl?: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export type TropipayCredentials = { clientId: string; clientSecret: string };
|
|
19
|
-
export type HookEventType =
|
|
20
|
-
| "transaction_completed"
|
|
21
|
-
| "transaction_charged"
|
|
22
|
-
| "transaction_guarded"
|
|
23
|
-
| "user_signup"
|
|
24
|
-
| "user_kyc"
|
|
25
|
-
| "payment_in_state_change"
|
|
26
|
-
| "payment_out_state_change"
|
|
27
|
-
| "beneficiary_added"
|
|
28
|
-
| "beneficiary_updated"
|
|
29
|
-
| "beneficiary_deleted"
|
|
30
|
-
| "transaction_new"
|
|
31
|
-
| "transaction_preauthorized"
|
|
32
|
-
| "transaction_pendingin"
|
|
33
|
-
| "transaction_processing"
|
|
34
|
-
| "transaction_error"
|
|
35
|
-
| "transaction_bloqued"
|
|
36
|
-
| "transaction_guarded_send"
|
|
37
|
-
| "transaction_guarded_mediation"
|
|
38
|
-
| "user_after_update"
|
|
39
|
-
| "user_after_create"
|
|
40
|
-
| "userDetail_after_create"
|
|
41
|
-
| "userDetail_after_update"
|
|
42
|
-
| "tpv_callback_ok"
|
|
43
|
-
| "fraud_state_on_change";
|
|
44
|
-
|
|
45
|
-
export type HookTargetType = "web" | "email";
|
|
46
|
-
export interface UserHook {
|
|
47
|
-
event: HookEventType;
|
|
48
|
-
target: string;
|
|
49
|
-
value: string;
|
|
50
|
-
}
|
|
51
|
-
export interface UserHookSubscribed extends UserHook {
|
|
52
|
-
createdAt: string;
|
|
53
|
-
updatedAt: string;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export interface UserHook {
|
|
57
|
-
event: HookEventType;
|
|
58
|
-
target: string;
|
|
59
|
-
value: string;
|
|
60
|
-
}
|
|
61
|
-
export interface UserHookSubscribed extends UserHook {
|
|
62
|
-
createdAt: string;
|
|
63
|
-
updatedAt: string;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
1
|
+
import { ServerMode } from "../constants/TropipayConstants";
|
|
2
|
+
|
|
3
|
+
export type AccountBalance = {
|
|
4
|
+
balance: number;
|
|
5
|
+
pendingIn: number;
|
|
6
|
+
pendingOut: number;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export interface TropipayConfig {
|
|
10
|
+
clientId: string;
|
|
11
|
+
clientSecret: string;
|
|
12
|
+
scopes?: string[];
|
|
13
|
+
serverMode?: ServerMode;
|
|
14
|
+
// Custom tropipay environment for testing
|
|
15
|
+
customTropipayUrl?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type TropipayCredentials = { clientId: string; clientSecret: string };
|
|
19
|
+
export type HookEventType =
|
|
20
|
+
| "transaction_completed"
|
|
21
|
+
| "transaction_charged"
|
|
22
|
+
| "transaction_guarded"
|
|
23
|
+
| "user_signup"
|
|
24
|
+
| "user_kyc"
|
|
25
|
+
| "payment_in_state_change"
|
|
26
|
+
| "payment_out_state_change"
|
|
27
|
+
| "beneficiary_added"
|
|
28
|
+
| "beneficiary_updated"
|
|
29
|
+
| "beneficiary_deleted"
|
|
30
|
+
| "transaction_new"
|
|
31
|
+
| "transaction_preauthorized"
|
|
32
|
+
| "transaction_pendingin"
|
|
33
|
+
| "transaction_processing"
|
|
34
|
+
| "transaction_error"
|
|
35
|
+
| "transaction_bloqued"
|
|
36
|
+
| "transaction_guarded_send"
|
|
37
|
+
| "transaction_guarded_mediation"
|
|
38
|
+
| "user_after_update"
|
|
39
|
+
| "user_after_create"
|
|
40
|
+
| "userDetail_after_create"
|
|
41
|
+
| "userDetail_after_update"
|
|
42
|
+
| "tpv_callback_ok"
|
|
43
|
+
| "fraud_state_on_change";
|
|
44
|
+
|
|
45
|
+
export type HookTargetType = "web" | "email";
|
|
46
|
+
export interface UserHook {
|
|
47
|
+
event: HookEventType;
|
|
48
|
+
target: string;
|
|
49
|
+
value: string;
|
|
50
|
+
}
|
|
51
|
+
export interface UserHookSubscribed extends UserHook {
|
|
52
|
+
createdAt: string;
|
|
53
|
+
updatedAt: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface UserHook {
|
|
57
|
+
event: HookEventType;
|
|
58
|
+
target: string;
|
|
59
|
+
value: string;
|
|
60
|
+
}
|
|
61
|
+
export interface UserHookSubscribed extends UserHook {
|
|
62
|
+
createdAt: string;
|
|
63
|
+
updatedAt: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Interface for creating payment links/cards
|
|
68
|
+
* @see https://tpp.stoplight.io/docs/tropipay-api-doc/b3A6ODgyNTM3OQ-create-a-new-pay-link-charge
|
|
69
|
+
*/
|
|
70
|
+
export interface PaymentLinkPayload {
|
|
71
|
+
/** Account ID where the funds will be received if compatible */
|
|
72
|
+
accountId?: number;
|
|
73
|
+
|
|
74
|
+
/** Reference code for the payment, preferred to be unique */
|
|
75
|
+
reference: string;
|
|
76
|
+
|
|
77
|
+
/** Short description of the payment */
|
|
78
|
+
concept: string;
|
|
79
|
+
|
|
80
|
+
/** Whether to mark this payment link as favorite */
|
|
81
|
+
favorite: boolean;
|
|
82
|
+
|
|
83
|
+
/** Amount to charge in the specified currency */
|
|
84
|
+
amount: number;
|
|
85
|
+
|
|
86
|
+
/** Currency code (EUR, USD, etc.) */
|
|
87
|
+
currency: string;
|
|
88
|
+
|
|
89
|
+
/** Detailed description of the payment */
|
|
90
|
+
description: string;
|
|
91
|
+
|
|
92
|
+
/** If true, the payment link can only be used once */
|
|
93
|
+
singleUse: boolean;
|
|
94
|
+
|
|
95
|
+
/** Reason ID for the payment */
|
|
96
|
+
reasonId: number;
|
|
97
|
+
|
|
98
|
+
/** Number of days until the payment link expires */
|
|
99
|
+
expirationDays: number;
|
|
100
|
+
|
|
101
|
+
/** Language code for the payment page (en, es, etc.) */
|
|
102
|
+
lang: string;
|
|
103
|
+
|
|
104
|
+
/** URL to redirect after successful payment */
|
|
105
|
+
urlSuccess: string;
|
|
106
|
+
|
|
107
|
+
/** URL to redirect after failed payment */
|
|
108
|
+
urlFailed: string;
|
|
109
|
+
|
|
110
|
+
/** Webhook URL for payment notifications */
|
|
111
|
+
urlNotification: string;
|
|
112
|
+
|
|
113
|
+
/** Date when the service will be provided (ISO format) */
|
|
114
|
+
serviceDate: string;
|
|
115
|
+
|
|
116
|
+
/** Client information for the payment */
|
|
117
|
+
client?: {
|
|
118
|
+
/** Client's first name */
|
|
119
|
+
name?: string;
|
|
120
|
+
|
|
121
|
+
/** Client's last name */
|
|
122
|
+
lastName?: string;
|
|
123
|
+
|
|
124
|
+
/** Client's address */
|
|
125
|
+
address?: string;
|
|
126
|
+
|
|
127
|
+
/** Client's phone number */
|
|
128
|
+
phone?: string;
|
|
129
|
+
|
|
130
|
+
/** Client's email address */
|
|
131
|
+
email?: string;
|
|
132
|
+
|
|
133
|
+
/** Client's country ID */
|
|
134
|
+
countryId?: number;
|
|
135
|
+
|
|
136
|
+
/** Client's country ISO code */
|
|
137
|
+
countryIso?: string;
|
|
138
|
+
|
|
139
|
+
/** Client's city */
|
|
140
|
+
city: string;
|
|
141
|
+
|
|
142
|
+
/** Client's postal code */
|
|
143
|
+
postCode: string;
|
|
144
|
+
|
|
145
|
+
/** Whether client accepted terms and conditions */
|
|
146
|
+
termsAndConditions: boolean;
|
|
147
|
+
} | null;
|
|
148
|
+
|
|
149
|
+
/** @deprecated If true, redirects directly to payment page */
|
|
150
|
+
directPayment: boolean;
|
|
151
|
+
|
|
152
|
+
/** List of allowed payment methods */
|
|
153
|
+
paymentMethods?: string[];
|
|
154
|
+
|
|
155
|
+
/** Base64 encoded image for the payment page */
|
|
156
|
+
imageBase?: string;
|
|
157
|
+
|
|
158
|
+
/** Whether to save the payment token for future use */
|
|
159
|
+
saveToken?: boolean;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export interface PaymentLink extends PaymentLinkPayload {
|
|
163
|
+
expirationDate: string;
|
|
164
|
+
hasClient: boolean;
|
|
165
|
+
updatedAt: string;
|
|
166
|
+
createdAt: string;
|
|
167
|
+
qrImage: string;
|
|
168
|
+
shortUrl: string;
|
|
169
|
+
paymentUrl: string;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export interface MediationPaymentCardConfig {
|
|
173
|
+
amount: number;
|
|
174
|
+
currency: "EUR" | "USD";
|
|
175
|
+
concept: string;
|
|
176
|
+
description: string;
|
|
177
|
+
reference: string;
|
|
178
|
+
singleUse: boolean;
|
|
179
|
+
lang: string;
|
|
180
|
+
productUrl?: string;
|
|
181
|
+
buyer: null | any;
|
|
182
|
+
seller: {
|
|
183
|
+
sellerId?: number;
|
|
184
|
+
type?: number;
|
|
185
|
+
email?: string;
|
|
186
|
+
};
|
|
187
|
+
feePercent?: number;
|
|
188
|
+
feeFixed?: number;
|
|
189
|
+
sendMail: boolean;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export type LoginResponse = {
|
|
193
|
+
access_token: string;
|
|
194
|
+
refresh_token: string;
|
|
195
|
+
token_type: "Bearer";
|
|
196
|
+
expires_in: number;
|
|
197
|
+
scope: string;
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
export type LoginError = {
|
|
201
|
+
error: string;
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
export type Country = {
|
|
205
|
+
id: number;
|
|
206
|
+
name: string;
|
|
207
|
+
sepaZone: boolean;
|
|
208
|
+
state: number;
|
|
209
|
+
slug: string;
|
|
210
|
+
slugn: number;
|
|
211
|
+
callingCode: number;
|
|
212
|
+
isDestination: boolean;
|
|
213
|
+
isRisky: boolean;
|
|
214
|
+
currentCurrency: string | null;
|
|
215
|
+
createdAt: string;
|
|
216
|
+
updatedAt: string;
|
|
217
|
+
isFavorite: boolean;
|
|
218
|
+
position: any;
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
export type Deposit = {
|
|
222
|
+
id: number;
|
|
223
|
+
accountNumber: string;
|
|
224
|
+
alias: string;
|
|
225
|
+
swift: string;
|
|
226
|
+
type: number;
|
|
227
|
+
country: number | null;
|
|
228
|
+
firstName: string;
|
|
229
|
+
default: null;
|
|
230
|
+
state: number;
|
|
231
|
+
userId: string;
|
|
232
|
+
countryDestinationId: number;
|
|
233
|
+
lastName: string;
|
|
234
|
+
documentNumber: number;
|
|
235
|
+
userRelationTypeId: number;
|
|
236
|
+
city: string;
|
|
237
|
+
postalCode: string;
|
|
238
|
+
address: string;
|
|
239
|
+
phone: string;
|
|
240
|
+
checked: boolean;
|
|
241
|
+
province: string;
|
|
242
|
+
beneficiaryType: number;
|
|
243
|
+
relatedUserId: null | string;
|
|
244
|
+
currency: string;
|
|
245
|
+
correspondent?: any;
|
|
246
|
+
location: any;
|
|
247
|
+
office: any;
|
|
248
|
+
officeValue: any;
|
|
249
|
+
paymentType: number;
|
|
250
|
+
paymentEntityBeneficiaryId: number;
|
|
251
|
+
paymentEntityAccountId: number;
|
|
252
|
+
verified: any;
|
|
253
|
+
paymentEntityInfo: any;
|
|
254
|
+
documentTypeId: any;
|
|
255
|
+
documentExpirationDate: Date;
|
|
256
|
+
createdAt: Date;
|
|
257
|
+
updatedAt: Date;
|
|
258
|
+
countryDestination: Country;
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
export type AccountDeposits = {
|
|
262
|
+
count: number;
|
|
263
|
+
rows: Deposit[];
|
|
264
|
+
};
|