@fiado/api-invoker 1.2.55 → 1.2.57
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/bin/centralPayments/CentralPaymentsConnectorApi.d.ts +2 -1
- package/bin/centralPayments/CentralPaymentsConnectorApi.js +4 -0
- package/bin/centralPayments/interfaces/ICentralPaymentsConnectorApi.d.ts +2 -1
- package/bin/tern/api/TernApi.d.ts +1 -0
- package/bin/tern/api/TernApi.js +4 -0
- package/bin/tern/api/interfaces/ITernApi.d.ts +1 -0
- package/package.json +2 -2
- package/src/centralPayments/CentralPaymentsConnectorApi.ts +6 -1
- package/src/centralPayments/interfaces/ICentralPaymentsConnectorApi.ts +3 -1
- package/src/tern/api/TernApi.ts +134 -129
- package/src/tern/api/interfaces/ITernApi.ts +24 -17
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ICentralPaymentsConnectorApi } from "./interfaces/ICentralPaymentsConnectorApi";
|
|
2
2
|
import { IHttpRequest } from "@fiado/http-client";
|
|
3
|
-
import { CreateBankAccountUserRequest, CreateBankAccountUserResponse, GetBankAccountUserResponse, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
|
|
3
|
+
import { CreateBankAccountUserRequest, CreateBankAccountUserResponse, GetBankAccountResponse, GetBankAccountUserResponse, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
|
|
4
4
|
import { CentralPaymentsDocumentUploadRequest, HealthcheckResponse, OOWQuestionsResponse, SubmitOOWQuestionAnswersRequest } from "@fiado/type-kit/bin/centralPayments";
|
|
5
5
|
import { ActivateBankAccountCardRequest, ActivateBankAccountCardResponse, CardBatchRequest, CardBatchResponse, CardStatementListResponse, GetBankAccountCardBalanceResponse, GetBankAccountCardResponse, StatementDocumentResponse, UpdateBankAccountCardRequest, UpdateBankAccountCardResponse } from "@fiado/type-kit/bin/card";
|
|
6
6
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
@@ -29,6 +29,7 @@ export declare class CentralPaymentsConnectorApi implements ICentralPaymentsConn
|
|
|
29
29
|
orderPhysicalCard(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
30
30
|
createSecondaryCard(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
31
31
|
getCardsByUserId(externalUserId: string, includeSecondary?: boolean): Promise<FiadoApiResponse<GetBankAccountCardResponse[]>>;
|
|
32
|
+
getAccountsByUserId(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountResponse[]>>;
|
|
32
33
|
generateCardsInBatch(request: CardBatchRequest): Promise<FiadoApiResponse<CardBatchResponse>>;
|
|
33
34
|
getCardBatch(batchId: string): Promise<FiadoApiResponse<CardBatchResponse>>;
|
|
34
35
|
deleteCardBatch(batchId: string): Promise<FiadoApiResponse<CardBatchResponse>>;
|
|
@@ -98,6 +98,10 @@ let CentralPaymentsConnectorApi = class CentralPaymentsConnectorApi {
|
|
|
98
98
|
const param = includeSecondary ? `?includeSecondary=${includeSecondary}` : null;
|
|
99
99
|
return await this.httpRequest.get(`${url}${param ?? ""}`);
|
|
100
100
|
}
|
|
101
|
+
async getAccountsByUserId(externalUserId) {
|
|
102
|
+
const url = `${this.baseUrl}/accounts/cardholders/${externalUserId}`;
|
|
103
|
+
return await this.httpRequest.get(url);
|
|
104
|
+
}
|
|
101
105
|
async generateCardsInBatch(request) {
|
|
102
106
|
const url = `${this.baseUrl}/cards/batch`;
|
|
103
107
|
return await this.httpRequest.post(url, request);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateBankAccountUserRequest, CreateBankAccountUserResponse, GetBankAccountUserResponse, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
|
|
1
|
+
import { CreateBankAccountUserRequest, CreateBankAccountUserResponse, GetBankAccountResponse, GetBankAccountUserResponse, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
|
|
2
2
|
import { CentralPaymentsDocumentUploadRequest, HealthcheckResponse, OOWQuestionsResponse, SubmitOOWQuestionAnswersRequest } from "@fiado/type-kit/bin/centralPayments";
|
|
3
3
|
import { ActivateBankAccountCardRequest, ActivateBankAccountCardResponse, CardBatchRequest, CardBatchResponse, CardStatementListResponse, GetBankAccountCardBalanceResponse, GetBankAccountCardResponse, StatementDocumentResponse, UpdateBankAccountCardRequest, UpdateBankAccountCardResponse } from "@fiado/type-kit/bin/card";
|
|
4
4
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
@@ -22,6 +22,7 @@ export interface ICentralPaymentsConnectorApi {
|
|
|
22
22
|
orderPhysicalCard(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
23
23
|
createSecondaryCard(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
24
24
|
getCardsByUserId(externalUserId: string, includeSecondary?: boolean): Promise<FiadoApiResponse<GetBankAccountCardResponse[]>>;
|
|
25
|
+
getAccountsByUserId(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountResponse[]>>;
|
|
25
26
|
generateCardsInBatch(request: CardBatchRequest): Promise<FiadoApiResponse<CardBatchResponse>>;
|
|
26
27
|
getCardBatch(batchId: string): Promise<FiadoApiResponse<CardBatchResponse>>;
|
|
27
28
|
deleteCardBatch(batchId: string): Promise<FiadoApiResponse<CardBatchResponse>>;
|
|
@@ -23,4 +23,5 @@ export default class TernApi implements ITernApi {
|
|
|
23
23
|
getTransactions(accountId: string, page: number, pageSize?: number | null, startDate?: string | null, endDate?: string | null, detail?: boolean, raw?: boolean): Promise<any>;
|
|
24
24
|
getCardTransactions(externalUserId: string, page: number, pageSize: number): Promise<any>;
|
|
25
25
|
getAccountTransactions(accountId: string): Promise<any>;
|
|
26
|
+
getCardsByUserId(externalUserId: string): Promise<any>;
|
|
26
27
|
}
|
package/bin/tern/api/TernApi.js
CHANGED
|
@@ -108,6 +108,10 @@ let TernApi = class TernApi {
|
|
|
108
108
|
const url = `${this.baseUrl}accounts/${accountId}/transactions/all`;
|
|
109
109
|
return await this.httpRequest.get(url);
|
|
110
110
|
}
|
|
111
|
+
async getCardsByUserId(externalUserId) {
|
|
112
|
+
const url = `${this.baseUrl}users/${externalUserId}/cards`;
|
|
113
|
+
return await this.httpRequest.get(url);
|
|
114
|
+
}
|
|
111
115
|
};
|
|
112
116
|
TernApi = __decorate([
|
|
113
117
|
(0, inversify_1.injectable)(),
|
|
@@ -19,4 +19,5 @@ export interface ITernApi {
|
|
|
19
19
|
getTransactions(accountId: string, page: number, pageSize?: number | null, startDate?: string | null, endDate?: string | null, detail?: boolean): Promise<any>;
|
|
20
20
|
getCardTransactions(externalUserId: string, page: number, pageSize: number): Promise<any>;
|
|
21
21
|
getAccountTransactions(accountId: string): Promise<any>;
|
|
22
|
+
getCardsByUserId(externalUserId: string): Promise<any>;
|
|
22
23
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.57",
|
|
4
4
|
"description": "Sirve como un puente entre diferentes funciones lambda, facilitando la comunicación entre ellas a través de invocaciones http",
|
|
5
5
|
"main": "bin/index.js",
|
|
6
6
|
"types": "bin/index.d.ts",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@fiado/gateway-adapter": "^1.1.40",
|
|
17
17
|
"@fiado/http-client": "^1.0.4",
|
|
18
18
|
"@fiado/logger": "^1.0.3",
|
|
19
|
-
"@fiado/type-kit": "^1.8.
|
|
19
|
+
"@fiado/type-kit": "^1.8.26",
|
|
20
20
|
"dotenv": "^16.4.7",
|
|
21
21
|
"inversify": "^6.2.2",
|
|
22
22
|
"reflect-metadata": "^0.2.2"
|
|
@@ -3,7 +3,7 @@ import { inject, injectable } from "inversify";
|
|
|
3
3
|
import { IHttpRequest } from "@fiado/http-client";
|
|
4
4
|
import {
|
|
5
5
|
CreateBankAccountUserRequest,
|
|
6
|
-
CreateBankAccountUserResponse,
|
|
6
|
+
CreateBankAccountUserResponse, GetBankAccountResponse,
|
|
7
7
|
GetBankAccountUserResponse,
|
|
8
8
|
UpdateBankAccountUserRequest
|
|
9
9
|
} from "@fiado/type-kit/bin/account";
|
|
@@ -139,6 +139,11 @@ export class CentralPaymentsConnectorApi implements ICentralPaymentsConnectorApi
|
|
|
139
139
|
return await this.httpRequest.get(`${url}${param ?? ""}`);
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
+
async getAccountsByUserId(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountResponse[]>> {
|
|
143
|
+
const url = `${this.baseUrl}/accounts/cardholders/${externalUserId}`;
|
|
144
|
+
return await this.httpRequest.get(url);
|
|
145
|
+
}
|
|
146
|
+
|
|
142
147
|
async generateCardsInBatch(request: CardBatchRequest): Promise<FiadoApiResponse<CardBatchResponse>> {
|
|
143
148
|
const url = `${this.baseUrl}/cards/batch`;
|
|
144
149
|
return await this.httpRequest.post(url, request);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CreateBankAccountUserRequest,
|
|
3
|
-
CreateBankAccountUserResponse,
|
|
3
|
+
CreateBankAccountUserResponse, GetBankAccountResponse,
|
|
4
4
|
GetBankAccountUserResponse,
|
|
5
5
|
UpdateBankAccountUserRequest
|
|
6
6
|
} from "@fiado/type-kit/bin/account";
|
|
@@ -66,6 +66,8 @@ export interface ICentralPaymentsConnectorApi {
|
|
|
66
66
|
|
|
67
67
|
getCardsByUserId(externalUserId: string, includeSecondary?: boolean): Promise<FiadoApiResponse<GetBankAccountCardResponse[]>>;
|
|
68
68
|
|
|
69
|
+
getAccountsByUserId(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountResponse[]>>;
|
|
70
|
+
|
|
69
71
|
generateCardsInBatch(request: CardBatchRequest): Promise<FiadoApiResponse<CardBatchResponse>>;
|
|
70
72
|
|
|
71
73
|
getCardBatch(batchId: string): Promise<FiadoApiResponse<CardBatchResponse>>;
|
package/src/tern/api/TernApi.ts
CHANGED
|
@@ -1,138 +1,143 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import {ITernApi} from "./interfaces/ITernApi";
|
|
2
|
+
import {inject, injectable} from "inversify";
|
|
3
|
+
import {IHttpRequest} from "@fiado/http-client";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
BankAccountP2pTransferRequest,
|
|
6
|
+
CreateBankAccountRequest,
|
|
7
|
+
CreateBankAccountUserRequest,
|
|
8
|
+
GetBankAccountRequest,
|
|
9
|
+
GetBankAccountUserRequest,
|
|
10
10
|
} from "@fiado/type-kit/bin/account";
|
|
11
11
|
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
ActivateBankAccountCardRequest,
|
|
13
|
+
AssignCardRequest,
|
|
14
|
+
CreateBankAccountCardRequest,
|
|
15
|
+
UpdateBankAccountCardRequest
|
|
16
16
|
} from "@fiado/type-kit/bin/card";
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
@injectable()
|
|
20
20
|
export default class TernApi implements ITernApi {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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
|
-
|
|
21
|
+
private readonly baseUrl = process.env.TERN_LAMBDA_URL || "";
|
|
22
|
+
|
|
23
|
+
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/// USERS
|
|
27
|
+
async getUser(request: GetBankAccountUserRequest): Promise<any> {
|
|
28
|
+
const url: string = `${this.baseUrl}users/${request.externalUserId}`;
|
|
29
|
+
return await this.httpRequest.get(url);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
async createUser(request: CreateBankAccountUserRequest): Promise<any> {
|
|
33
|
+
const url: string = `${this.baseUrl}users/create`;
|
|
34
|
+
return await this.httpRequest.post(url, request);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/// ACCOUNTS
|
|
38
|
+
async getAccount(request: GetBankAccountRequest): Promise<any> {
|
|
39
|
+
const url: string = `${this.baseUrl}accounts/${request.externalAccountId}`;
|
|
40
|
+
return await this.httpRequest.get(url);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
async getBusinessAccount(request: GetBankAccountRequest): Promise<any> {
|
|
44
|
+
const url: string = `${this.baseUrl}accounts/${request.externalAccountId}?accountType=BUSINESS`;
|
|
45
|
+
return await this.httpRequest.get(url);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
async createAccount(request: CreateBankAccountRequest): Promise<any> {
|
|
49
|
+
const url: string = `${this.baseUrl}accounts/create`;
|
|
50
|
+
return await this.httpRequest.post(url, request);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/// CARDS
|
|
54
|
+
|
|
55
|
+
async getCardSensitiveInformation(externalCardId: string, externalUserId?: string): Promise<any> {
|
|
56
|
+
|
|
57
|
+
const url = `${this.baseUrl}cards/${externalCardId}/sensitive`;
|
|
58
|
+
return await this.httpRequest.get(url);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
async getCardsById(externalCardId: string): Promise<any> {
|
|
62
|
+
|
|
63
|
+
const url = `${this.baseUrl}cards/${externalCardId}/`;
|
|
64
|
+
return await this.httpRequest.get(url);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
async createCard(request: CreateBankAccountCardRequest): Promise<any> {
|
|
68
|
+
const url = `${this.baseUrl}cards/create`;
|
|
69
|
+
return await this.httpRequest.post(url, request);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
async blockCard(request: UpdateBankAccountCardRequest): Promise<any> {
|
|
73
|
+
const url = `${this.baseUrl}cards/block`;
|
|
74
|
+
return await this.httpRequest.post(url, request);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
async changePin(request: UpdateBankAccountCardRequest): Promise<any> {
|
|
78
|
+
const url = `${this.baseUrl}cards/${request.cardId}/`;
|
|
79
|
+
return await this.httpRequest.put(url, request);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
async updateCard(request: UpdateBankAccountCardRequest): Promise<any> {
|
|
83
|
+
const url = `${this.baseUrl}cards/${request.cardId}/`;
|
|
84
|
+
return await this.httpRequest.put(url, request);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
async activateCard(request: ActivateBankAccountCardRequest): Promise<any> {
|
|
88
|
+
const url = `${this.baseUrl}cards/activate`;
|
|
89
|
+
return await this.httpRequest.post(url, request);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
async assignCardToUser(request: AssignCardRequest): Promise<any> {
|
|
93
|
+
const url = `${this.baseUrl}cards/activate`;
|
|
94
|
+
return await this.httpRequest.post(url, request);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
async p2pTransfer(request: BankAccountP2pTransferRequest): Promise<any> {
|
|
98
|
+
const url: string = `${this.baseUrl}users/accounts/transfer_balances`;
|
|
99
|
+
return await this.httpRequest.patch(url, request);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
//transactions
|
|
103
|
+
async getTransactions(accountId: string, page: number, pageSize?: number | null, startDate?: string | null, endDate?: string | null, detail: boolean = false, raw: boolean = false): Promise<any> {
|
|
104
|
+
try {
|
|
105
|
+
let url = `${this.baseUrl}users/${accountId}/v2/transactions?page=${page}&detail=${detail}&raw=${raw}`;
|
|
106
|
+
|
|
107
|
+
// Verificar si pageSize es válido y agregarlo
|
|
108
|
+
if (pageSize != null) {
|
|
109
|
+
url += `&pageSize=${encodeURIComponent(pageSize)}`;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Verificar si startDate es válido y agregarlo
|
|
113
|
+
if (startDate) {
|
|
114
|
+
url += `&startDate=${encodeURIComponent(startDate)}`;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Verificar si endDate es válido y agregarlo
|
|
118
|
+
if (endDate) {
|
|
119
|
+
url += `&endDate=${encodeURIComponent(endDate)}`;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return await this.httpRequest.get(url);
|
|
123
|
+
} catch (error) {
|
|
124
|
+
console.log(error);
|
|
125
|
+
throw error;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
async getCardTransactions(externalUserId: string, page: number, pageSize: number): Promise<any> {
|
|
130
|
+
const url = `${this.baseUrl}users/${externalUserId}/transactions?page=${page}&pageSize=${pageSize}`;
|
|
131
|
+
return await this.httpRequest.get(url);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
async getAccountTransactions(accountId: string): Promise<any> {
|
|
135
|
+
const url = `${this.baseUrl}accounts/${accountId}/transactions/all`;
|
|
136
|
+
return await this.httpRequest.get(url);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
async getCardsByUserId(externalUserId: string): Promise<any> {
|
|
140
|
+
const url = `${this.baseUrl}users/${externalUserId}/cards`;
|
|
141
|
+
return await this.httpRequest.get(url);
|
|
142
|
+
}
|
|
138
143
|
}
|
|
@@ -1,39 +1,46 @@
|
|
|
1
1
|
import {CreateBankAccountRequest, CreateBankAccountUserRequest} from "@fiado/type-kit/bin/account";
|
|
2
2
|
import {GetBankAccountUserRequest} from "@fiado/type-kit/bin/account/dtos/GetBankAccountUserRequest";
|
|
3
3
|
import {GetBankAccountRequest} from "@fiado/type-kit/bin/account/dtos/GetBankAccountRequest";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
ActivateBankAccountCardRequest,
|
|
6
|
+
AssignCardRequest,
|
|
7
|
+
CreateBankAccountCardRequest,
|
|
8
|
+
UpdateBankAccountCardRequest
|
|
9
|
+
} from "@fiado/type-kit/bin/card";
|
|
5
10
|
|
|
6
11
|
export interface ITernApi {
|
|
7
|
-
|
|
12
|
+
getUser(request: GetBankAccountUserRequest): Promise<any>;
|
|
8
13
|
|
|
9
|
-
|
|
14
|
+
getAccount(request: GetBankAccountRequest): Promise<any>;
|
|
10
15
|
|
|
11
|
-
|
|
16
|
+
getBusinessAccount(request: GetBankAccountRequest): Promise<any>
|
|
12
17
|
|
|
13
|
-
|
|
18
|
+
createUser(request: CreateBankAccountUserRequest): Promise<any>;
|
|
14
19
|
|
|
15
|
-
|
|
20
|
+
createAccount(request: CreateBankAccountRequest): Promise<any>
|
|
16
21
|
|
|
17
|
-
|
|
22
|
+
getCardsById(externalCardId: string): Promise<any>;
|
|
18
23
|
|
|
19
|
-
|
|
24
|
+
createCard(request: CreateBankAccountCardRequest): Promise<any>;
|
|
20
25
|
|
|
21
|
-
|
|
26
|
+
blockCard(request: UpdateBankAccountCardRequest): Promise<any>;
|
|
22
27
|
|
|
23
|
-
|
|
28
|
+
changePin(request: UpdateBankAccountCardRequest): Promise<any>;
|
|
24
29
|
|
|
25
|
-
|
|
30
|
+
updateCard(request: UpdateBankAccountCardRequest): Promise<any>;
|
|
26
31
|
|
|
27
|
-
|
|
32
|
+
activateCard(request: ActivateBankAccountCardRequest): Promise<any>;
|
|
28
33
|
|
|
29
|
-
|
|
34
|
+
assignCardToUser(request: AssignCardRequest): Promise<any>;
|
|
30
35
|
|
|
31
|
-
|
|
36
|
+
p2pTransfer(request: any): Promise<any>
|
|
32
37
|
|
|
33
|
-
|
|
38
|
+
getTransactions(accountId: string, page: number, pageSize?: number | null, startDate?: string | null, endDate?: string | null, detail?: boolean): Promise<any>;
|
|
34
39
|
|
|
35
|
-
|
|
40
|
+
getCardTransactions(externalUserId: string, page: number, pageSize: number): Promise<any>;
|
|
36
41
|
|
|
37
|
-
|
|
42
|
+
getAccountTransactions(accountId: string): Promise<any>;
|
|
43
|
+
|
|
44
|
+
getCardsByUserId(externalUserId: string): Promise<any>;
|
|
38
45
|
|
|
39
46
|
}
|