@fiado/api-invoker 1.0.55 → 1.0.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/README.md +64 -64
- package/bin/card/CardApi.d.ts +11 -0
- package/bin/card/CardApi.js +32 -0
- package/bin/card/index.d.ts +2 -0
- package/bin/card/index.js +18 -0
- package/bin/card/interfaces/ICardApi.d.ts +6 -0
- package/bin/card/interfaces/ICardApi.js +2 -0
- package/package.json +28 -28
- package/src/account-fiadoinc/AccountFiadoIncApi.ts +32 -32
- package/src/account-fiadoinc/index.ts +1 -1
- package/src/account-fiadoinc/interfaces/IAccountFiadoIncApi.ts +15 -15
- package/src/account-fiadosa/AccountFiadoSAApi.ts +22 -22
- package/src/account-fiadosa/index.ts +1 -1
- package/src/account-fiadosa/interfaces/IAccountFiadoSAApi.ts +9 -9
- package/src/account-pagoconfiado/AccountPagoConfiadoApi.ts +22 -22
- package/src/account-pagoconfiado/index.ts +2 -2
- package/src/account-pagoconfiado/interfaces/IAccountPagoConfiadoApi.ts +8 -8
- package/src/address/AddressApi.ts +46 -46
- package/src/address/index.ts +3 -3
- package/src/address/interfaces/IAddressApi.ts +30 -30
- package/src/authentication/AuthenticationApi.ts +16 -16
- package/src/authentication/index.ts +4 -4
- package/src/authentication/interfaces/IAuthenticationApi.ts +5 -5
- package/src/card/CardApi.ts +26 -0
- package/src/card/index.ts +4 -0
- package/src/card/interfaces/ICardApi.ts +9 -0
- package/src/container.config.ts +38 -38
- package/src/directory/DirectoryApi.ts +74 -74
- package/src/directory/index.ts +3 -3
- package/src/directory/interfaces/IDirectoryApi.ts +53 -53
- package/src/exchangeRates/ExchangeRatesApi.ts +18 -18
- package/src/exchangeRates/index.ts +1 -1
- package/src/exchangeRates/interfaces/IExchangeRatesApi.ts +5 -5
- package/src/identity/IdentityApi.ts +47 -47
- package/src/identity/index.ts +3 -3
- package/src/identity/interfaces/IIdentityApi.ts +33 -33
- package/src/index.ts +13 -13
- package/src/notificationMessages/index.ts +1 -1
- package/src/notificationMessages/queue/NotificationMessagePublisher.ts +22 -22
- package/src/notificationMessages/queue/interfaces/INotificationMessagesPublisher.ts +4 -4
- package/src/pomelo/api/PomeloApi.ts +99 -99
- package/src/pomelo/api/interfaces/IPomeloApi.ts +27 -27
- package/src/pomelo/index.ts +1 -1
- package/src/sessionActivity/index.ts +2 -2
- package/src/sessionActivity/queue/SessionActivityPublisher.ts +22 -22
- package/src/sessionActivity/queue/interfaces/ISessionActivityPublisher.ts +4 -4
- package/src/stpAccount/api/STPAccountApi.ts +102 -102
- package/src/stpAccount/api/interfaces/ISTPAccountApi.ts +6 -6
- package/src/stpAccount/index.ts +1 -1
- package/src/tern/api/TernApi.ts +85 -85
- package/src/tern/api/interfaces/ITernApi.ts +27 -27
- package/src/tern/index.ts +1 -1
- package/tsconfig.json +21 -21
|
@@ -1,102 +1,102 @@
|
|
|
1
|
-
import {ISTPAccountApi } from "./interfaces/ISTPAccountApi";
|
|
2
|
-
import {inject, injectable} from "inversify";
|
|
3
|
-
import {IHttpRequest} from "@fiado/http-client";
|
|
4
|
-
import {CreateBankAccountRequest, CreateBankAccountUserRequest, UpdateBankAccountUserRequest} from "@fiado/type-kit/bin/account";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
@injectable()
|
|
8
|
-
export default class PomeloApi implements ISTPAccountApi {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
private readonly baseUrl = process.env.STP_ACCOUNT_LAMBDA_URL || "";
|
|
12
|
-
|
|
13
|
-
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
//ACCOUNT
|
|
17
|
-
// //USER
|
|
18
|
-
async createAccount(request: CreateBankAccountRequest): Promise<any> {
|
|
19
|
-
const url: string = `${this.baseUrl}account/create`;
|
|
20
|
-
return await this.httpRequest.post(url, request);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
// //USER
|
|
25
|
-
// async createUser(request: CreateBankAccountUserRequest): Promise<any> {
|
|
26
|
-
// const url: string = `${this.baseUrl}users/create`;
|
|
27
|
-
// return await this.httpRequest.post(url, request);
|
|
28
|
-
// }
|
|
29
|
-
|
|
30
|
-
// public async getUserById(externalUserId: string): Promise<any> {
|
|
31
|
-
// const url: string = `${this.baseUrl}users/${externalUserId}`;
|
|
32
|
-
// return await this.httpRequest.get(url);
|
|
33
|
-
// }
|
|
34
|
-
|
|
35
|
-
// public async updateUser(object: UpdateBankAccountUserRequest): Promise<any> {
|
|
36
|
-
// const url: string = `${this.baseUrl}/users/${object.id}`;
|
|
37
|
-
// return await this.httpRequest.put(url, object);
|
|
38
|
-
// }
|
|
39
|
-
|
|
40
|
-
// //Card
|
|
41
|
-
// public async getCardSensitiveInformation(externalCardId: string, externalUserId?: string): Promise<GetBankAccountSensitiveInformationOutput> {
|
|
42
|
-
// const url: string = `${this.baseUrl}cards/${externalCardId}/sensitive?externalUserId=${externalUserId}`;
|
|
43
|
-
// return await this.httpRequest.get(url);
|
|
44
|
-
// }
|
|
45
|
-
|
|
46
|
-
// public async getCardsById(externalCardId: string): Promise<GetBankAccountCardOutput> {
|
|
47
|
-
// const url: string = `${this.baseUrl}cards?externalCardId=${externalCardId}`;
|
|
48
|
-
// return await this.httpRequest.get(url);
|
|
49
|
-
// }
|
|
50
|
-
|
|
51
|
-
// public async getCardsByUserId(externalUserId: string): Promise<GetBankAccountCardOutput> {
|
|
52
|
-
// const url: string = `${this.baseUrl}cards?externalUserId=${externalUserId}`;
|
|
53
|
-
// return await this.httpRequest.get(url);
|
|
54
|
-
// }
|
|
55
|
-
|
|
56
|
-
// public async createCard(object: CreateBankAccountCardInput): Promise<CreateBankAccountCardOutput> {
|
|
57
|
-
// const url: string = `${this.baseUrl}cards/create`;
|
|
58
|
-
// return await this.httpRequest.post(url, object);
|
|
59
|
-
// }
|
|
60
|
-
|
|
61
|
-
// public async blockCard(object: UpdateBankAccountCardInput): Promise<UpdateBankAccountCardOutput> {
|
|
62
|
-
// const url: string = `${this.baseUrl}cards/${object.cardId}/`;
|
|
63
|
-
// return await this.httpRequest.put(url, object);
|
|
64
|
-
// }
|
|
65
|
-
|
|
66
|
-
// public async changePin(object: UpdateBankAccountCardInput): Promise<UpdateBankAccountCardOutput> {
|
|
67
|
-
// const url: string = `${this.baseUrl}cards/${object.cardId}/`;
|
|
68
|
-
// return await this.httpRequest.put(url, object);
|
|
69
|
-
// }
|
|
70
|
-
|
|
71
|
-
// public async activateCard(object: ActivateBankAccountCardInput): Promise<ActivateBankAccountCardOutput> {
|
|
72
|
-
// const url: string = `${this.baseUrl}cards/activate`;
|
|
73
|
-
// return await this.httpRequest.post(url, object);
|
|
74
|
-
// }
|
|
75
|
-
|
|
76
|
-
// public async updateCard(object: UpdateBankAccountCardInput): Promise<UpdateBankAccountCardOutput> {
|
|
77
|
-
// const url: string = `${this.baseUrl}cards/${object.cardId}/`;
|
|
78
|
-
// return await this.httpRequest.put(url, object);
|
|
79
|
-
// }
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
// //Shipping
|
|
83
|
-
|
|
84
|
-
// public async createShipment(object: CreateBankAccountCardShippingInput): Promise<any> {
|
|
85
|
-
// const url: string = `${this.baseUrl}shipment/create`;
|
|
86
|
-
// return await this.httpRequest.post(url, object);
|
|
87
|
-
// }
|
|
88
|
-
|
|
89
|
-
// public async getShipment(object: GetBankAccountShippingInput): Promise<GetBankAccountShippingOutput> {
|
|
90
|
-
// const url: string = `${this.baseUrl}shipment/${object.shippingId}`;
|
|
91
|
-
// return await this.httpRequest.get(url);
|
|
92
|
-
// }
|
|
93
|
-
|
|
94
|
-
// public async replaceCardByExternalId(object: ExternalReplaceCardInput): Promise<ExternalReplaceCardOutput> {
|
|
95
|
-
// const url: string = `${this.baseUrl}cards/${object.externalCardId}/replace`;
|
|
96
|
-
// return await this.httpRequest.put(url, object);
|
|
97
|
-
// }
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
1
|
+
import {ISTPAccountApi } from "./interfaces/ISTPAccountApi";
|
|
2
|
+
import {inject, injectable} from "inversify";
|
|
3
|
+
import {IHttpRequest} from "@fiado/http-client";
|
|
4
|
+
import {CreateBankAccountRequest, CreateBankAccountUserRequest, UpdateBankAccountUserRequest} from "@fiado/type-kit/bin/account";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@injectable()
|
|
8
|
+
export default class PomeloApi implements ISTPAccountApi {
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
private readonly baseUrl = process.env.STP_ACCOUNT_LAMBDA_URL || "";
|
|
12
|
+
|
|
13
|
+
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
//ACCOUNT
|
|
17
|
+
// //USER
|
|
18
|
+
async createAccount(request: CreateBankAccountRequest): Promise<any> {
|
|
19
|
+
const url: string = `${this.baseUrl}account/create`;
|
|
20
|
+
return await this.httpRequest.post(url, request);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
// //USER
|
|
25
|
+
// async createUser(request: CreateBankAccountUserRequest): Promise<any> {
|
|
26
|
+
// const url: string = `${this.baseUrl}users/create`;
|
|
27
|
+
// return await this.httpRequest.post(url, request);
|
|
28
|
+
// }
|
|
29
|
+
|
|
30
|
+
// public async getUserById(externalUserId: string): Promise<any> {
|
|
31
|
+
// const url: string = `${this.baseUrl}users/${externalUserId}`;
|
|
32
|
+
// return await this.httpRequest.get(url);
|
|
33
|
+
// }
|
|
34
|
+
|
|
35
|
+
// public async updateUser(object: UpdateBankAccountUserRequest): Promise<any> {
|
|
36
|
+
// const url: string = `${this.baseUrl}/users/${object.id}`;
|
|
37
|
+
// return await this.httpRequest.put(url, object);
|
|
38
|
+
// }
|
|
39
|
+
|
|
40
|
+
// //Card
|
|
41
|
+
// public async getCardSensitiveInformation(externalCardId: string, externalUserId?: string): Promise<GetBankAccountSensitiveInformationOutput> {
|
|
42
|
+
// const url: string = `${this.baseUrl}cards/${externalCardId}/sensitive?externalUserId=${externalUserId}`;
|
|
43
|
+
// return await this.httpRequest.get(url);
|
|
44
|
+
// }
|
|
45
|
+
|
|
46
|
+
// public async getCardsById(externalCardId: string): Promise<GetBankAccountCardOutput> {
|
|
47
|
+
// const url: string = `${this.baseUrl}cards?externalCardId=${externalCardId}`;
|
|
48
|
+
// return await this.httpRequest.get(url);
|
|
49
|
+
// }
|
|
50
|
+
|
|
51
|
+
// public async getCardsByUserId(externalUserId: string): Promise<GetBankAccountCardOutput> {
|
|
52
|
+
// const url: string = `${this.baseUrl}cards?externalUserId=${externalUserId}`;
|
|
53
|
+
// return await this.httpRequest.get(url);
|
|
54
|
+
// }
|
|
55
|
+
|
|
56
|
+
// public async createCard(object: CreateBankAccountCardInput): Promise<CreateBankAccountCardOutput> {
|
|
57
|
+
// const url: string = `${this.baseUrl}cards/create`;
|
|
58
|
+
// return await this.httpRequest.post(url, object);
|
|
59
|
+
// }
|
|
60
|
+
|
|
61
|
+
// public async blockCard(object: UpdateBankAccountCardInput): Promise<UpdateBankAccountCardOutput> {
|
|
62
|
+
// const url: string = `${this.baseUrl}cards/${object.cardId}/`;
|
|
63
|
+
// return await this.httpRequest.put(url, object);
|
|
64
|
+
// }
|
|
65
|
+
|
|
66
|
+
// public async changePin(object: UpdateBankAccountCardInput): Promise<UpdateBankAccountCardOutput> {
|
|
67
|
+
// const url: string = `${this.baseUrl}cards/${object.cardId}/`;
|
|
68
|
+
// return await this.httpRequest.put(url, object);
|
|
69
|
+
// }
|
|
70
|
+
|
|
71
|
+
// public async activateCard(object: ActivateBankAccountCardInput): Promise<ActivateBankAccountCardOutput> {
|
|
72
|
+
// const url: string = `${this.baseUrl}cards/activate`;
|
|
73
|
+
// return await this.httpRequest.post(url, object);
|
|
74
|
+
// }
|
|
75
|
+
|
|
76
|
+
// public async updateCard(object: UpdateBankAccountCardInput): Promise<UpdateBankAccountCardOutput> {
|
|
77
|
+
// const url: string = `${this.baseUrl}cards/${object.cardId}/`;
|
|
78
|
+
// return await this.httpRequest.put(url, object);
|
|
79
|
+
// }
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
// //Shipping
|
|
83
|
+
|
|
84
|
+
// public async createShipment(object: CreateBankAccountCardShippingInput): Promise<any> {
|
|
85
|
+
// const url: string = `${this.baseUrl}shipment/create`;
|
|
86
|
+
// return await this.httpRequest.post(url, object);
|
|
87
|
+
// }
|
|
88
|
+
|
|
89
|
+
// public async getShipment(object: GetBankAccountShippingInput): Promise<GetBankAccountShippingOutput> {
|
|
90
|
+
// const url: string = `${this.baseUrl}shipment/${object.shippingId}`;
|
|
91
|
+
// return await this.httpRequest.get(url);
|
|
92
|
+
// }
|
|
93
|
+
|
|
94
|
+
// public async replaceCardByExternalId(object: ExternalReplaceCardInput): Promise<ExternalReplaceCardOutput> {
|
|
95
|
+
// const url: string = `${this.baseUrl}cards/${object.externalCardId}/replace`;
|
|
96
|
+
// return await this.httpRequest.put(url, object);
|
|
97
|
+
// }
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {CreateBankAccountRequest, CreateBankAccountUserRequest, CreateBankAccountUserResponse, GetBankAccountUserRequest, GetBankAccountUserResponse, UpdateBankAccountUserRequest, UpdateBankAccountUserResponse} from "@fiado/type-kit/bin/account";
|
|
2
|
-
|
|
3
|
-
export interface ISTPAccountApi {
|
|
4
|
-
// updateUser(object: UpdateBankAccountUserRequest): Promise<any>
|
|
5
|
-
// getUserById(externalUserId: string): Promise<any>
|
|
6
|
-
createAccount(request: CreateBankAccountRequest): Promise<any>;
|
|
1
|
+
import {CreateBankAccountRequest, CreateBankAccountUserRequest, CreateBankAccountUserResponse, GetBankAccountUserRequest, GetBankAccountUserResponse, UpdateBankAccountUserRequest, UpdateBankAccountUserResponse} from "@fiado/type-kit/bin/account";
|
|
2
|
+
|
|
3
|
+
export interface ISTPAccountApi {
|
|
4
|
+
// updateUser(object: UpdateBankAccountUserRequest): Promise<any>
|
|
5
|
+
// getUserById(externalUserId: string): Promise<any>
|
|
6
|
+
createAccount(request: CreateBankAccountRequest): Promise<any>;
|
|
7
7
|
}
|
package/src/stpAccount/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './api/STPAccountApi';
|
|
1
|
+
export * from './api/STPAccountApi';
|
|
2
2
|
export * from './api/interfaces/ISTPAccountApi';
|
package/src/tern/api/TernApi.ts
CHANGED
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
import {ITernApi} from "./interfaces/ITernApi";
|
|
2
|
-
import {inject, injectable} from "inversify";
|
|
3
|
-
import {IHttpRequest} from "@fiado/http-client";
|
|
4
|
-
import {
|
|
5
|
-
CreateBankAccountRequest,
|
|
6
|
-
CreateBankAccountUserRequest,
|
|
7
|
-
GetBankAccountRequest,
|
|
8
|
-
GetBankAccountUserRequest,
|
|
9
|
-
} from "@fiado/type-kit/bin/account";
|
|
10
|
-
import { ActivateBankAccountCardRequest, AssignCardRequest, CreateBankAccountCardRequest, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
@injectable()
|
|
14
|
-
export default class TernApi implements ITernApi {
|
|
15
|
-
private readonly baseUrl = process.env.TERN_LAMBDA_URL || "";
|
|
16
|
-
|
|
17
|
-
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/// USERS
|
|
21
|
-
async getUser(request: GetBankAccountUserRequest): Promise<any> {
|
|
22
|
-
const url: string = `${this.baseUrl}users/${request.externalUserId}`;
|
|
23
|
-
return await this.httpRequest.get(url);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
async createUser(request: CreateBankAccountUserRequest): Promise<any> {
|
|
27
|
-
const url: string = `${this.baseUrl}users/create`;
|
|
28
|
-
return await this.httpRequest.post(url, request);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/// ACCOUNTS
|
|
32
|
-
async getAccount(request: GetBankAccountRequest): Promise<any> {
|
|
33
|
-
const url: string = `${this.baseUrl}accounts/${request.externalAccountId}`;
|
|
34
|
-
return await this.httpRequest.get(url);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
async createAccount(request: CreateBankAccountRequest): Promise<any> {
|
|
38
|
-
const url: string = `${this.baseUrl}accounts/create`;
|
|
39
|
-
return await this.httpRequest.post(url, request);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/// CARDS
|
|
43
|
-
|
|
44
|
-
async getCardSensitiveInformation(externalCardId: string, externalUserId?: string): Promise<any> {
|
|
45
|
-
|
|
46
|
-
const url = `${this.baseUrl}cards/${externalCardId}/sensitive`;
|
|
47
|
-
return await this.httpRequest.get(url);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
async getCardsById(externalCardId: string): Promise<any> {
|
|
51
|
-
|
|
52
|
-
const url = `${this.baseUrl}cards/${externalCardId}/`;
|
|
53
|
-
return await this.httpRequest.get(url);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
async createCard(request: CreateBankAccountCardRequest): Promise<any> {
|
|
57
|
-
const url = `${this.baseUrl}cards/create`;
|
|
58
|
-
return await this.httpRequest.post(url, request);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
async blockCard(request: UpdateBankAccountCardRequest): Promise<any> {
|
|
62
|
-
const url = `${this.baseUrl}cards/block`;
|
|
63
|
-
return await this.httpRequest.post(url, request);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
async changePin(request: UpdateBankAccountCardRequest): Promise<any> {
|
|
67
|
-
const url = `${this.baseUrl}cards/${request.cardId}/`;
|
|
68
|
-
return await this.httpRequest.put(url, request);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
async updateCard(request: UpdateBankAccountCardRequest): Promise<any> {
|
|
72
|
-
const url = `${this.baseUrl}cards/${request.cardId}/`;
|
|
73
|
-
return await this.httpRequest.put(url, request);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
async activateCard(request: ActivateBankAccountCardRequest): Promise<any> {
|
|
77
|
-
const url = `${this.baseUrl}cards/activate`;
|
|
78
|
-
return await this.httpRequest.post(url, request);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
async assignCardToUser(request: AssignCardRequest): Promise<any> {
|
|
82
|
-
const url = `${this.baseUrl}cards/activate`;
|
|
83
|
-
return await this.httpRequest.post(url, request);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
1
|
+
import {ITernApi} from "./interfaces/ITernApi";
|
|
2
|
+
import {inject, injectable} from "inversify";
|
|
3
|
+
import {IHttpRequest} from "@fiado/http-client";
|
|
4
|
+
import {
|
|
5
|
+
CreateBankAccountRequest,
|
|
6
|
+
CreateBankAccountUserRequest,
|
|
7
|
+
GetBankAccountRequest,
|
|
8
|
+
GetBankAccountUserRequest,
|
|
9
|
+
} from "@fiado/type-kit/bin/account";
|
|
10
|
+
import { ActivateBankAccountCardRequest, AssignCardRequest, CreateBankAccountCardRequest, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card";
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@injectable()
|
|
14
|
+
export default class TernApi implements ITernApi {
|
|
15
|
+
private readonly baseUrl = process.env.TERN_LAMBDA_URL || "";
|
|
16
|
+
|
|
17
|
+
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/// USERS
|
|
21
|
+
async getUser(request: GetBankAccountUserRequest): Promise<any> {
|
|
22
|
+
const url: string = `${this.baseUrl}users/${request.externalUserId}`;
|
|
23
|
+
return await this.httpRequest.get(url);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
async createUser(request: CreateBankAccountUserRequest): Promise<any> {
|
|
27
|
+
const url: string = `${this.baseUrl}users/create`;
|
|
28
|
+
return await this.httpRequest.post(url, request);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/// ACCOUNTS
|
|
32
|
+
async getAccount(request: GetBankAccountRequest): Promise<any> {
|
|
33
|
+
const url: string = `${this.baseUrl}accounts/${request.externalAccountId}`;
|
|
34
|
+
return await this.httpRequest.get(url);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
async createAccount(request: CreateBankAccountRequest): Promise<any> {
|
|
38
|
+
const url: string = `${this.baseUrl}accounts/create`;
|
|
39
|
+
return await this.httpRequest.post(url, request);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/// CARDS
|
|
43
|
+
|
|
44
|
+
async getCardSensitiveInformation(externalCardId: string, externalUserId?: string): Promise<any> {
|
|
45
|
+
|
|
46
|
+
const url = `${this.baseUrl}cards/${externalCardId}/sensitive`;
|
|
47
|
+
return await this.httpRequest.get(url);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
async getCardsById(externalCardId: string): Promise<any> {
|
|
51
|
+
|
|
52
|
+
const url = `${this.baseUrl}cards/${externalCardId}/`;
|
|
53
|
+
return await this.httpRequest.get(url);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
async createCard(request: CreateBankAccountCardRequest): Promise<any> {
|
|
57
|
+
const url = `${this.baseUrl}cards/create`;
|
|
58
|
+
return await this.httpRequest.post(url, request);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
async blockCard(request: UpdateBankAccountCardRequest): Promise<any> {
|
|
62
|
+
const url = `${this.baseUrl}cards/block`;
|
|
63
|
+
return await this.httpRequest.post(url, request);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
async changePin(request: UpdateBankAccountCardRequest): Promise<any> {
|
|
67
|
+
const url = `${this.baseUrl}cards/${request.cardId}/`;
|
|
68
|
+
return await this.httpRequest.put(url, request);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
async updateCard(request: UpdateBankAccountCardRequest): Promise<any> {
|
|
72
|
+
const url = `${this.baseUrl}cards/${request.cardId}/`;
|
|
73
|
+
return await this.httpRequest.put(url, request);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
async activateCard(request: ActivateBankAccountCardRequest): Promise<any> {
|
|
77
|
+
const url = `${this.baseUrl}cards/activate`;
|
|
78
|
+
return await this.httpRequest.post(url, request);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
async assignCardToUser(request: AssignCardRequest): Promise<any> {
|
|
82
|
+
const url = `${this.baseUrl}cards/activate`;
|
|
83
|
+
return await this.httpRequest.post(url, request);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import {CreateBankAccountRequest, CreateBankAccountUserRequest} from "@fiado/type-kit/bin/account";
|
|
2
|
-
import {GetBankAccountUserRequest} from "@fiado/type-kit/bin/account/dtos/GetBankAccountUserRequest";
|
|
3
|
-
import {GetBankAccountRequest} from "@fiado/type-kit/bin/account/dtos/GetBankAccountRequest";
|
|
4
|
-
import { ActivateBankAccountCardRequest, AssignCardRequest, CreateBankAccountCardRequest, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card";
|
|
5
|
-
|
|
6
|
-
export interface ITernApi {
|
|
7
|
-
getUser(request: GetBankAccountUserRequest): Promise<any>;
|
|
8
|
-
|
|
9
|
-
getAccount(request: GetBankAccountRequest): Promise<any>;
|
|
10
|
-
|
|
11
|
-
createUser(request: CreateBankAccountUserRequest): Promise<any>;
|
|
12
|
-
|
|
13
|
-
createAccount(request: CreateBankAccountRequest): Promise<any>
|
|
14
|
-
|
|
15
|
-
getCardsById(externalCardId: string): Promise<any>;
|
|
16
|
-
|
|
17
|
-
createCard(request: CreateBankAccountCardRequest): Promise<any>;
|
|
18
|
-
|
|
19
|
-
blockCard(request: UpdateBankAccountCardRequest): Promise<any>;
|
|
20
|
-
|
|
21
|
-
changePin(request: UpdateBankAccountCardRequest): Promise<any>;
|
|
22
|
-
|
|
23
|
-
updateCard(request: UpdateBankAccountCardRequest): Promise<any>;
|
|
24
|
-
|
|
25
|
-
activateCard(request: ActivateBankAccountCardRequest): Promise<any>;
|
|
26
|
-
|
|
27
|
-
assignCardToUser(request: AssignCardRequest): Promise<any>;
|
|
1
|
+
import {CreateBankAccountRequest, CreateBankAccountUserRequest} from "@fiado/type-kit/bin/account";
|
|
2
|
+
import {GetBankAccountUserRequest} from "@fiado/type-kit/bin/account/dtos/GetBankAccountUserRequest";
|
|
3
|
+
import {GetBankAccountRequest} from "@fiado/type-kit/bin/account/dtos/GetBankAccountRequest";
|
|
4
|
+
import { ActivateBankAccountCardRequest, AssignCardRequest, CreateBankAccountCardRequest, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card";
|
|
5
|
+
|
|
6
|
+
export interface ITernApi {
|
|
7
|
+
getUser(request: GetBankAccountUserRequest): Promise<any>;
|
|
8
|
+
|
|
9
|
+
getAccount(request: GetBankAccountRequest): Promise<any>;
|
|
10
|
+
|
|
11
|
+
createUser(request: CreateBankAccountUserRequest): Promise<any>;
|
|
12
|
+
|
|
13
|
+
createAccount(request: CreateBankAccountRequest): Promise<any>
|
|
14
|
+
|
|
15
|
+
getCardsById(externalCardId: string): Promise<any>;
|
|
16
|
+
|
|
17
|
+
createCard(request: CreateBankAccountCardRequest): Promise<any>;
|
|
18
|
+
|
|
19
|
+
blockCard(request: UpdateBankAccountCardRequest): Promise<any>;
|
|
20
|
+
|
|
21
|
+
changePin(request: UpdateBankAccountCardRequest): Promise<any>;
|
|
22
|
+
|
|
23
|
+
updateCard(request: UpdateBankAccountCardRequest): Promise<any>;
|
|
24
|
+
|
|
25
|
+
activateCard(request: ActivateBankAccountCardRequest): Promise<any>;
|
|
26
|
+
|
|
27
|
+
assignCardToUser(request: AssignCardRequest): Promise<any>;
|
|
28
28
|
}
|
package/src/tern/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './api/TernApi';
|
|
1
|
+
export * from './api/TernApi';
|
|
2
2
|
export * from './api/interfaces/ITernApi';
|
package/tsconfig.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"module": "commonjs",
|
|
5
|
-
"esModuleInterop": true,
|
|
6
|
-
"skipLibCheck": true,
|
|
7
|
-
"forceConsistentCasingInFileNames": true,
|
|
8
|
-
"experimentalDecorators": true,
|
|
9
|
-
"emitDecoratorMetadata": true,
|
|
10
|
-
"outDir": "./bin",
|
|
11
|
-
"rootDir": "./src",
|
|
12
|
-
"moduleResolution": "node",
|
|
13
|
-
"declaration": true,
|
|
14
|
-
},
|
|
15
|
-
"include": [
|
|
16
|
-
"./src/**/*"
|
|
17
|
-
],
|
|
18
|
-
"exclude": [
|
|
19
|
-
"node_modules"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"esModuleInterop": true,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"forceConsistentCasingInFileNames": true,
|
|
8
|
+
"experimentalDecorators": true,
|
|
9
|
+
"emitDecoratorMetadata": true,
|
|
10
|
+
"outDir": "./bin",
|
|
11
|
+
"rootDir": "./src",
|
|
12
|
+
"moduleResolution": "node",
|
|
13
|
+
"declaration": true,
|
|
14
|
+
},
|
|
15
|
+
"include": [
|
|
16
|
+
"./src/**/*"
|
|
17
|
+
],
|
|
18
|
+
"exclude": [
|
|
19
|
+
"node_modules"
|
|
20
|
+
]
|
|
21
|
+
}
|