@fiado/api-invoker 1.1.62 → 1.1.63
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/activity/ActivityApi.d.ts +17 -0
- package/bin/activity/ActivityApi.js +72 -0
- package/bin/activity/index.d.ts +2 -0
- package/bin/activity/index.js +18 -0
- package/bin/activity/interfaces/IActivityApi.d.ts +39 -0
- package/bin/activity/interfaces/IActivityApi.js +2 -0
- package/bin/transaction/api/TransactionApi.d.ts +22 -0
- package/bin/transaction/api/TransactionApi.js +52 -0
- package/bin/transaction/api/interfaces/ITransactionApi.d.ts +17 -0
- package/bin/transaction/api/interfaces/ITransactionApi.js +2 -0
- package/bin/transaction/index.d.ts +2 -0
- package/bin/transaction/index.js +2 -0
- package/package.json +28 -28
- package/src/account-beneficiary/AccountBeneficiaryApi.ts +18 -18
- package/src/account-beneficiary/index.ts +2 -2
- package/src/account-beneficiary/interfaces/IAccountBeneficiaryApi.ts +7 -7
- package/src/account-fiadoinc/AccountFiadoIncApi.ts +65 -65
- package/src/account-fiadoinc/index.ts +1 -1
- package/src/account-fiadoinc/interfaces/IAccountFiadoIncApi.ts +32 -32
- package/src/account-fiadosa/AccountFiadoSAApi.ts +32 -32
- package/src/account-fiadosa/index.ts +1 -1
- package/src/account-fiadosa/interfaces/IAccountFiadoSAApi.ts +13 -13
- package/src/account-pagoconfiado/AccountPagoConfiadoApi.ts +46 -46
- package/src/account-pagoconfiado/index.ts +2 -2
- package/src/account-pagoconfiado/interfaces/IAccountPagoConfiadoApi.ts +24 -24
- package/src/activity-business/ActivityApi.ts +34 -34
- package/src/activity-business/index.ts +5 -5
- package/src/activity-business/interfaces/IActivityApi.ts +9 -9
- package/src/activity-business/queue/ActivityPublisher.ts +28 -28
- package/src/activity-business/queue/IActivityPublisher.ts +4 -4
- 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/bankAccount/BankAccountApi.ts +48 -48
- package/src/bankAccount/index.ts +1 -1
- package/src/bankAccount/interfaces/IBankAccountApi.ts +6 -6
- package/src/bbvaRst/api/BBVARstApi.ts +16 -16
- package/src/bbvaRst/api/interfaces/IBBVARstApi.ts +4 -4
- package/src/bbvaRst/index.ts +1 -1
- package/src/card/CardApi.ts +36 -36
- package/src/card/index.ts +3 -3
- package/src/card/interfaces/ICardApi.ts +10 -10
- package/src/cnbv-business/CnbvApi.ts +22 -22
- package/src/cnbv-business/index.ts +4 -4
- package/src/cnbv-business/interfaces/ICnbvApi.ts +6 -6
- package/src/collector/CollectorApi.ts +25 -25
- package/src/collector/index.ts +2 -2
- package/src/collector/interfaces/ICollectorApi.ts +21 -21
- package/src/contactInformation/ContactInformationApi.ts +20 -20
- package/src/contactInformation/index.ts +2 -2
- package/src/contactInformation/interface/IContactInformationApi.ts +8 -8
- package/src/container.config.ts +88 -88
- package/src/contract-generator/ContractGeneratorApi.ts +18 -18
- package/src/contract-generator/index.ts +2 -2
- package/src/contract-generator/interfaces/IContractGeneratorApi.ts +16 -16
- package/src/directory/DirectoryApi.ts +128 -128
- package/src/directory/index.ts +3 -3
- package/src/directory/interfaces/IDirectoryApi.ts +63 -63
- package/src/exchangeRates/ExchangeRatesApi.ts +27 -27
- package/src/exchangeRates/index.ts +1 -1
- package/src/exchangeRates/interfaces/IExchangeRatesApi.ts +8 -8
- package/src/fiadoMessages/api/FiadoMessagesApi.ts +20 -20
- package/src/fiadoMessages/api/interfaces/IFiadoMessagesApi.ts +2 -2
- package/src/fiadoMessages/index.ts +1 -1
- package/src/fraudPreventionEngine/api/FraudPreventionEngineApi.ts +22 -22
- package/src/fraudPreventionEngine/api/interfaces/IFraudPreventionEngineApi.ts +7 -7
- package/src/fraudPreventionEngine/index.ts +1 -1
- package/src/group/GroupApi.ts +24 -24
- package/src/group/index.ts +1 -1
- package/src/group/interfaces/IGroupApi.ts +23 -23
- 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 +31 -31
- 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/p2pContact/api/P2pContactApi.ts +19 -19
- package/src/p2pContact/api/interfaces/IP2pContactApi.ts +4 -4
- package/src/p2pContact/index.ts +1 -1
- 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/pomeloProcessor/api/PomeloProcessorApi.ts +17 -17
- package/src/pomeloProcessor/api/interfaces/IPomeloProcessorApi.ts +2 -2
- package/src/pomeloProcessor/index.ts +2 -2
- package/src/product-catalog/ProductCatalogApi.ts +17 -17
- package/src/product-catalog/index.ts +1 -1
- package/src/product-catalog/interfaces/IProductCatalogApi.ts +6 -6
- package/src/riskProfile/api/RiskProfileApi.ts +29 -29
- package/src/riskProfile/api/interfaces/IRiskProfileApi.ts +10 -10
- package/src/riskProfile/index.ts +4 -4
- package/src/riskProfile/queue/TransactionAlarmPublisher.ts +24 -24
- package/src/riskProfile/queue/interfaces/ITransactionAlarmPublisher.ts +4 -4
- 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 +111 -111
- package/src/stpAccount/api/interfaces/ISTPAccountApi.ts +7 -7
- package/src/stpAccount/index.ts +1 -1
- package/src/stpServicePayment/api/StpServicePaymentApi.ts +40 -40
- package/src/stpServicePayment/api/interfaces/IStpServicePaymentApi.ts +13 -13
- package/src/stpServicePayment/index.ts +1 -1
- package/src/stpSpei/api/StpSpeiApi.ts +32 -32
- package/src/stpSpei/api/interfaces/IStpSpeiApi.ts +6 -6
- package/src/stpSpei/index.ts +1 -1
- package/src/tern/api/TernApi.ts +137 -137
- package/src/tern/api/interfaces/ITernApi.ts +38 -38
- package/src/tern/index.ts +1 -1
- package/src/transaction/api/TransactionApi.ts +46 -0
- package/src/transaction/api/interfaces/ITransactionApi.ts +20 -0
- package/src/transaction/index.ts +5 -2
- package/src/transaction/queue/TransactionPublisher.ts +24 -24
- package/src/transaction/queue/interfaces/ITransactionPublisher.ts +4 -4
- package/src/transactionProcessor/api/TransactionProcessorApi.ts +37 -37
- package/src/transactionProcessor/api/interfaces/ITransactionProcessorApi.ts +15 -15
- package/src/transactionProcessor/index.ts +1 -1
- package/tsconfig.json +21 -21
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
import {IAccountFiadoIncApi} from "./interfaces/IAccountFiadoIncApi";
|
|
2
|
-
import {
|
|
3
|
-
AccountCreateRequest,
|
|
4
|
-
AccountCreateResponse,
|
|
5
|
-
AccountUpdateBalanceRequest, AccountUpdateRequest, ExecuteP2pOperationRequest,
|
|
6
|
-
ExecutePocketOperationRequest,
|
|
7
|
-
GetAccountResponse,
|
|
8
|
-
GetPocketBalanceResponse
|
|
9
|
-
} from "@fiado/type-kit/bin/account";
|
|
10
|
-
import {inject, injectable} from "inversify";
|
|
11
|
-
import {IHttpRequest} from "@fiado/http-client";
|
|
12
|
-
import {ApiGatewayResponse} from "@fiado/gateway-adapter";
|
|
13
|
-
import {OperationEnum} from "@fiado/type-kit/bin/transaction";
|
|
14
|
-
|
|
15
|
-
@injectable()
|
|
16
|
-
export default class AccountFiadoIncApi implements IAccountFiadoIncApi {
|
|
17
|
-
private readonly baseUrl = process.env.ACCOUNT_FIADOINC_LAMBDA_URL || "";
|
|
18
|
-
|
|
19
|
-
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
async createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>> {
|
|
23
|
-
const url = `${this.baseUrl}`;
|
|
24
|
-
return await this.httpRequest.post(url, data);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
async getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>> {
|
|
28
|
-
const url = `${this.baseUrl}users/${directoryId}`;
|
|
29
|
-
return await this.httpRequest.get(url);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
async getPocketBalance(directoryId: string): Promise<ApiGatewayResponse<GetPocketBalanceResponse>> {
|
|
33
|
-
const url = `${this.baseUrl}/pockets/users/${directoryId}/balance`;
|
|
34
|
-
return await this.httpRequest.get(url);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
async updatePocketBalance(pocketId: string, request: AccountUpdateBalanceRequest): Promise<ApiGatewayResponse<null>> {
|
|
38
|
-
const url = `${this.baseUrl}/pockets/${pocketId}/balance`;
|
|
39
|
-
return await this.httpRequest.put(url, request);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
async getPocketBalanceById(pocketId: string): Promise<ApiGatewayResponse<GetPocketBalanceResponse>> {
|
|
43
|
-
const url = `${this.baseUrl}/pockets/${pocketId}/balance`;
|
|
44
|
-
return await this.httpRequest.get(url);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
async executePocketTransaction(pocketId: string, operation: OperationEnum, request: ExecutePocketOperationRequest): Promise<ApiGatewayResponse<any>> {
|
|
48
|
-
const url = `${this.baseUrl}/pockets/${pocketId}/${operation}`;
|
|
49
|
-
return await this.httpRequest.post(url, request);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
async executeP2pTransaction(request: ExecuteP2pOperationRequest): Promise<ApiGatewayResponse<any>> {
|
|
53
|
-
const url = `${this.baseUrl}/p2p/send`;
|
|
54
|
-
return await this.httpRequest.post(url, request);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
async deletePocket(pocketId: string): Promise<ApiGatewayResponse<void>> {
|
|
58
|
-
const url = `${this.baseUrl}pockets/${pocketId}`;
|
|
59
|
-
return await this.httpRequest.delete(url);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
async update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>> {
|
|
63
|
-
const url = `${this.baseUrl}users/${directoryId}`;
|
|
64
|
-
return await this.httpRequest.put(url, data);
|
|
65
|
-
}
|
|
1
|
+
import {IAccountFiadoIncApi} from "./interfaces/IAccountFiadoIncApi";
|
|
2
|
+
import {
|
|
3
|
+
AccountCreateRequest,
|
|
4
|
+
AccountCreateResponse,
|
|
5
|
+
AccountUpdateBalanceRequest, AccountUpdateRequest, ExecuteP2pOperationRequest,
|
|
6
|
+
ExecutePocketOperationRequest,
|
|
7
|
+
GetAccountResponse,
|
|
8
|
+
GetPocketBalanceResponse
|
|
9
|
+
} from "@fiado/type-kit/bin/account";
|
|
10
|
+
import {inject, injectable} from "inversify";
|
|
11
|
+
import {IHttpRequest} from "@fiado/http-client";
|
|
12
|
+
import {ApiGatewayResponse} from "@fiado/gateway-adapter";
|
|
13
|
+
import {OperationEnum} from "@fiado/type-kit/bin/transaction";
|
|
14
|
+
|
|
15
|
+
@injectable()
|
|
16
|
+
export default class AccountFiadoIncApi implements IAccountFiadoIncApi {
|
|
17
|
+
private readonly baseUrl = process.env.ACCOUNT_FIADOINC_LAMBDA_URL || "";
|
|
18
|
+
|
|
19
|
+
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
async createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>> {
|
|
23
|
+
const url = `${this.baseUrl}`;
|
|
24
|
+
return await this.httpRequest.post(url, data);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>> {
|
|
28
|
+
const url = `${this.baseUrl}users/${directoryId}`;
|
|
29
|
+
return await this.httpRequest.get(url);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
async getPocketBalance(directoryId: string): Promise<ApiGatewayResponse<GetPocketBalanceResponse>> {
|
|
33
|
+
const url = `${this.baseUrl}/pockets/users/${directoryId}/balance`;
|
|
34
|
+
return await this.httpRequest.get(url);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
async updatePocketBalance(pocketId: string, request: AccountUpdateBalanceRequest): Promise<ApiGatewayResponse<null>> {
|
|
38
|
+
const url = `${this.baseUrl}/pockets/${pocketId}/balance`;
|
|
39
|
+
return await this.httpRequest.put(url, request);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
async getPocketBalanceById(pocketId: string): Promise<ApiGatewayResponse<GetPocketBalanceResponse>> {
|
|
43
|
+
const url = `${this.baseUrl}/pockets/${pocketId}/balance`;
|
|
44
|
+
return await this.httpRequest.get(url);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
async executePocketTransaction(pocketId: string, operation: OperationEnum, request: ExecutePocketOperationRequest): Promise<ApiGatewayResponse<any>> {
|
|
48
|
+
const url = `${this.baseUrl}/pockets/${pocketId}/${operation}`;
|
|
49
|
+
return await this.httpRequest.post(url, request);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
async executeP2pTransaction(request: ExecuteP2pOperationRequest): Promise<ApiGatewayResponse<any>> {
|
|
53
|
+
const url = `${this.baseUrl}/p2p/send`;
|
|
54
|
+
return await this.httpRequest.post(url, request);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async deletePocket(pocketId: string): Promise<ApiGatewayResponse<void>> {
|
|
58
|
+
const url = `${this.baseUrl}pockets/${pocketId}`;
|
|
59
|
+
return await this.httpRequest.delete(url);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
async update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>> {
|
|
63
|
+
const url = `${this.baseUrl}users/${directoryId}`;
|
|
64
|
+
return await this.httpRequest.put(url, data);
|
|
65
|
+
}
|
|
66
66
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './interfaces/IAccountFiadoIncApi';
|
|
1
|
+
export * from './interfaces/IAccountFiadoIncApi';
|
|
2
2
|
export * from './AccountFiadoIncApi';
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AccountCreateRequest,
|
|
3
|
-
AccountCreateResponse,
|
|
4
|
-
AccountUpdateBalanceRequest,
|
|
5
|
-
AccountUpdateRequest,
|
|
6
|
-
ExecuteP2pOperationRequest,
|
|
7
|
-
ExecutePocketOperationRequest,
|
|
8
|
-
GetAccountResponse,
|
|
9
|
-
GetPocketBalanceResponse
|
|
10
|
-
} from "@fiado/type-kit/bin/account";
|
|
11
|
-
import {ApiGatewayResponse} from "@fiado/gateway-adapter";
|
|
12
|
-
import {OperationEnum} from "@fiado/type-kit/bin/transaction";
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export interface IAccountFiadoIncApi {
|
|
16
|
-
createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
|
|
17
|
-
|
|
18
|
-
getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
|
|
19
|
-
|
|
20
|
-
getPocketBalance(directoryId: string): Promise<ApiGatewayResponse<GetPocketBalanceResponse>>;
|
|
21
|
-
|
|
22
|
-
updatePocketBalance(pocketId: string, request: AccountUpdateBalanceRequest): Promise<ApiGatewayResponse<null>>;
|
|
23
|
-
|
|
24
|
-
getPocketBalanceById(pocketId: string): Promise<ApiGatewayResponse<GetPocketBalanceResponse>>;
|
|
25
|
-
|
|
26
|
-
executePocketTransaction(pocketId: string, operation: OperationEnum, request: ExecutePocketOperationRequest): Promise<ApiGatewayResponse<any>>;
|
|
27
|
-
|
|
28
|
-
executeP2pTransaction(request: ExecuteP2pOperationRequest): Promise<ApiGatewayResponse<any>>;
|
|
29
|
-
|
|
30
|
-
deletePocket(pocketId: string): Promise<ApiGatewayResponse<void>>
|
|
31
|
-
|
|
32
|
-
update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>
|
|
1
|
+
import {
|
|
2
|
+
AccountCreateRequest,
|
|
3
|
+
AccountCreateResponse,
|
|
4
|
+
AccountUpdateBalanceRequest,
|
|
5
|
+
AccountUpdateRequest,
|
|
6
|
+
ExecuteP2pOperationRequest,
|
|
7
|
+
ExecutePocketOperationRequest,
|
|
8
|
+
GetAccountResponse,
|
|
9
|
+
GetPocketBalanceResponse
|
|
10
|
+
} from "@fiado/type-kit/bin/account";
|
|
11
|
+
import {ApiGatewayResponse} from "@fiado/gateway-adapter";
|
|
12
|
+
import {OperationEnum} from "@fiado/type-kit/bin/transaction";
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
export interface IAccountFiadoIncApi {
|
|
16
|
+
createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
|
|
17
|
+
|
|
18
|
+
getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
|
|
19
|
+
|
|
20
|
+
getPocketBalance(directoryId: string): Promise<ApiGatewayResponse<GetPocketBalanceResponse>>;
|
|
21
|
+
|
|
22
|
+
updatePocketBalance(pocketId: string, request: AccountUpdateBalanceRequest): Promise<ApiGatewayResponse<null>>;
|
|
23
|
+
|
|
24
|
+
getPocketBalanceById(pocketId: string): Promise<ApiGatewayResponse<GetPocketBalanceResponse>>;
|
|
25
|
+
|
|
26
|
+
executePocketTransaction(pocketId: string, operation: OperationEnum, request: ExecutePocketOperationRequest): Promise<ApiGatewayResponse<any>>;
|
|
27
|
+
|
|
28
|
+
executeP2pTransaction(request: ExecuteP2pOperationRequest): Promise<ApiGatewayResponse<any>>;
|
|
29
|
+
|
|
30
|
+
deletePocket(pocketId: string): Promise<ApiGatewayResponse<void>>
|
|
31
|
+
|
|
32
|
+
update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>
|
|
33
33
|
}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import {IAccountFiadoSAApi} from "./interfaces/IAccountFiadoSAApi";
|
|
2
|
-
import {AccountCreateRequest, AccountCreateResponse, AccountUpdateRequest, GetAccountResponse} from "@fiado/type-kit/bin/account";
|
|
3
|
-
import {ApiGatewayResponse} from "@fiado/gateway-adapter";
|
|
4
|
-
import {inject, injectable} from "inversify";
|
|
5
|
-
import {IHttpRequest} from "@fiado/http-client";
|
|
6
|
-
|
|
7
|
-
@injectable()
|
|
8
|
-
export default class AccountFiadoSAApi implements IAccountFiadoSAApi {
|
|
9
|
-
private readonly baseUrl = process.env.ACCOUNT_FIADOSA_LAMBDA_URL || "";
|
|
10
|
-
|
|
11
|
-
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
async cancelAccount(directoryId:string,accountNumber: string, documentNumber: string): Promise<ApiGatewayResponse<void>> {
|
|
15
|
-
const url = `${this.baseUrl}/cancel`;
|
|
16
|
-
return await this.httpRequest.post(url, {directoryId,accountNumber,documentNumber});
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
async createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>> {
|
|
20
|
-
const url = `${this.baseUrl}`;
|
|
21
|
-
return await this.httpRequest.post(url, data);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
async getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>> {
|
|
25
|
-
const url = `${this.baseUrl}users/${directoryId}`;
|
|
26
|
-
return await this.httpRequest.get(url);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
async update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>> {
|
|
30
|
-
const url = `${this.baseUrl}users/${directoryId}`;
|
|
31
|
-
return await this.httpRequest.put(url, data);
|
|
32
|
-
}
|
|
1
|
+
import {IAccountFiadoSAApi} from "./interfaces/IAccountFiadoSAApi";
|
|
2
|
+
import {AccountCreateRequest, AccountCreateResponse, AccountUpdateRequest, GetAccountResponse} from "@fiado/type-kit/bin/account";
|
|
3
|
+
import {ApiGatewayResponse} from "@fiado/gateway-adapter";
|
|
4
|
+
import {inject, injectable} from "inversify";
|
|
5
|
+
import {IHttpRequest} from "@fiado/http-client";
|
|
6
|
+
|
|
7
|
+
@injectable()
|
|
8
|
+
export default class AccountFiadoSAApi implements IAccountFiadoSAApi {
|
|
9
|
+
private readonly baseUrl = process.env.ACCOUNT_FIADOSA_LAMBDA_URL || "";
|
|
10
|
+
|
|
11
|
+
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
async cancelAccount(directoryId:string,accountNumber: string, documentNumber: string): Promise<ApiGatewayResponse<void>> {
|
|
15
|
+
const url = `${this.baseUrl}/cancel`;
|
|
16
|
+
return await this.httpRequest.post(url, {directoryId,accountNumber,documentNumber});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
async createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>> {
|
|
20
|
+
const url = `${this.baseUrl}`;
|
|
21
|
+
return await this.httpRequest.post(url, data);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>> {
|
|
25
|
+
const url = `${this.baseUrl}users/${directoryId}`;
|
|
26
|
+
return await this.httpRequest.get(url);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>> {
|
|
30
|
+
const url = `${this.baseUrl}users/${directoryId}`;
|
|
31
|
+
return await this.httpRequest.put(url, data);
|
|
32
|
+
}
|
|
33
33
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './interfaces/IAccountFiadoSAApi';
|
|
1
|
+
export * from './interfaces/IAccountFiadoSAApi';
|
|
2
2
|
export * from './AccountFiadoSAApi';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {AccountCreateRequest, AccountCreateResponse, AccountUpdateRequest, GetAccountResponse} from "@fiado/type-kit/bin/account";
|
|
2
|
-
import {ApiGatewayResponse} from "@fiado/gateway-adapter";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export interface IAccountFiadoSAApi {
|
|
6
|
-
createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>>;
|
|
7
|
-
|
|
8
|
-
getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
|
|
9
|
-
|
|
10
|
-
update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>
|
|
11
|
-
|
|
12
|
-
cancelAccount(directoryId:string,accountNumber:string,documentNumber:string): Promise<ApiGatewayResponse<void>>;
|
|
13
|
-
|
|
1
|
+
import {AccountCreateRequest, AccountCreateResponse, AccountUpdateRequest, GetAccountResponse} from "@fiado/type-kit/bin/account";
|
|
2
|
+
import {ApiGatewayResponse} from "@fiado/gateway-adapter";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export interface IAccountFiadoSAApi {
|
|
6
|
+
createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>>;
|
|
7
|
+
|
|
8
|
+
getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
|
|
9
|
+
|
|
10
|
+
update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>
|
|
11
|
+
|
|
12
|
+
cancelAccount(directoryId:string,accountNumber:string,documentNumber:string): Promise<ApiGatewayResponse<void>>;
|
|
13
|
+
|
|
14
14
|
}
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import {IAccountPagoConfiadoApi} from "./interfaces/IAccountPagoConfiadoApi";
|
|
2
|
-
import {AccountCreateRequest, AccountCreateResponse, AccountUpdateBalanceRequest, AccountUpdateRequest, GetAccountResponse} from "@fiado/type-kit/bin/account";
|
|
3
|
-
import {ApiGatewayResponse} from "@fiado/gateway-adapter";
|
|
4
|
-
import {inject, injectable} from "inversify";
|
|
5
|
-
import {IHttpRequest} from "@fiado/http-client";
|
|
6
|
-
|
|
7
|
-
@injectable()
|
|
8
|
-
export default class AccountPagoConfiadoApi implements IAccountPagoConfiadoApi {
|
|
9
|
-
private readonly baseUrl = process.env.ACCOUNT_PAGOCONFIADO_LAMBDA_URL || "";
|
|
10
|
-
|
|
11
|
-
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {}
|
|
12
|
-
|
|
13
|
-
async cancelAccount(directoryId:string,accountNumber?: string, documentNumber?: string): Promise<ApiGatewayResponse<void>> {
|
|
14
|
-
const url = `${this.baseUrl}/cancel`;
|
|
15
|
-
return await this.httpRequest.post(url, {directoryId,accountNumber,documentNumber});
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
async createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>> {
|
|
19
|
-
const url = `${this.baseUrl}`;
|
|
20
|
-
return await this.httpRequest.post(url, data);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
async getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>> {
|
|
24
|
-
const url = `${this.baseUrl}users/${directoryId}`;
|
|
25
|
-
return await this.httpRequest.get(url);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
async updateAccountBalance(accountId:string, params: AccountUpdateBalanceRequest): Promise<ApiGatewayResponse<Boolean>> {
|
|
29
|
-
const url = `${this.baseUrl}${accountId}/balance`;
|
|
30
|
-
return await this.httpRequest.put(url,params);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
async update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>> {
|
|
34
|
-
const url = `${this.baseUrl}users/${directoryId}`;
|
|
35
|
-
return await this.httpRequest.put(url, data);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
async updateByAccountNumber(accountNumber: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>> {
|
|
39
|
-
const url = `${this.baseUrl}users/accountNumber/${accountNumber}`;
|
|
40
|
-
return await this.httpRequest.put(url, data);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
async getAccountByAccountNumber(accountNumber: string): Promise<ApiGatewayResponse<void>> {
|
|
44
|
-
const url = `${this.baseUrl}users/accountNumber/${accountNumber}`;
|
|
45
|
-
return await this.httpRequest.get(url);
|
|
46
|
-
}
|
|
1
|
+
import {IAccountPagoConfiadoApi} from "./interfaces/IAccountPagoConfiadoApi";
|
|
2
|
+
import {AccountCreateRequest, AccountCreateResponse, AccountUpdateBalanceRequest, AccountUpdateRequest, GetAccountResponse} from "@fiado/type-kit/bin/account";
|
|
3
|
+
import {ApiGatewayResponse} from "@fiado/gateway-adapter";
|
|
4
|
+
import {inject, injectable} from "inversify";
|
|
5
|
+
import {IHttpRequest} from "@fiado/http-client";
|
|
6
|
+
|
|
7
|
+
@injectable()
|
|
8
|
+
export default class AccountPagoConfiadoApi implements IAccountPagoConfiadoApi {
|
|
9
|
+
private readonly baseUrl = process.env.ACCOUNT_PAGOCONFIADO_LAMBDA_URL || "";
|
|
10
|
+
|
|
11
|
+
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {}
|
|
12
|
+
|
|
13
|
+
async cancelAccount(directoryId:string,accountNumber?: string, documentNumber?: string): Promise<ApiGatewayResponse<void>> {
|
|
14
|
+
const url = `${this.baseUrl}/cancel`;
|
|
15
|
+
return await this.httpRequest.post(url, {directoryId,accountNumber,documentNumber});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
async createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>> {
|
|
19
|
+
const url = `${this.baseUrl}`;
|
|
20
|
+
return await this.httpRequest.post(url, data);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
async getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>> {
|
|
24
|
+
const url = `${this.baseUrl}users/${directoryId}`;
|
|
25
|
+
return await this.httpRequest.get(url);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
async updateAccountBalance(accountId:string, params: AccountUpdateBalanceRequest): Promise<ApiGatewayResponse<Boolean>> {
|
|
29
|
+
const url = `${this.baseUrl}${accountId}/balance`;
|
|
30
|
+
return await this.httpRequest.put(url,params);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
async update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>> {
|
|
34
|
+
const url = `${this.baseUrl}users/${directoryId}`;
|
|
35
|
+
return await this.httpRequest.put(url, data);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
async updateByAccountNumber(accountNumber: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>> {
|
|
39
|
+
const url = `${this.baseUrl}users/accountNumber/${accountNumber}`;
|
|
40
|
+
return await this.httpRequest.put(url, data);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
async getAccountByAccountNumber(accountNumber: string): Promise<ApiGatewayResponse<void>> {
|
|
44
|
+
const url = `${this.baseUrl}users/accountNumber/${accountNumber}`;
|
|
45
|
+
return await this.httpRequest.get(url);
|
|
46
|
+
}
|
|
47
47
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './interfaces/IAccountPagoConfiadoApi';
|
|
2
|
-
export * from './AccountPagoConfiadoApi';
|
|
1
|
+
export * from './interfaces/IAccountPagoConfiadoApi';
|
|
2
|
+
export * from './AccountPagoConfiadoApi';
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AccountCreateRequest,
|
|
3
|
-
AccountCreateResponse,
|
|
4
|
-
AccountUpdateBalanceRequest,
|
|
5
|
-
AccountUpdateRequest,
|
|
6
|
-
GetAccountResponse
|
|
7
|
-
} from "@fiado/type-kit/bin/account";
|
|
8
|
-
import {ApiGatewayResponse} from "@fiado/gateway-adapter";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export interface IAccountPagoConfiadoApi {
|
|
12
|
-
createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
|
|
13
|
-
|
|
14
|
-
getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
|
|
15
|
-
|
|
16
|
-
updateAccountBalance(accountId: string, params: AccountUpdateBalanceRequest): Promise<ApiGatewayResponse<Boolean>>;
|
|
17
|
-
|
|
18
|
-
update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
19
|
-
|
|
20
|
-
updateByAccountNumber(accountNumber: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
21
|
-
|
|
22
|
-
getAccountByAccountNumber(accountNumber: string): Promise<ApiGatewayResponse<void>>;
|
|
23
|
-
|
|
24
|
-
cancelAccount(directoryId:string,accountNumber?:string,documentNumber?:string): Promise<ApiGatewayResponse<void>>;
|
|
1
|
+
import {
|
|
2
|
+
AccountCreateRequest,
|
|
3
|
+
AccountCreateResponse,
|
|
4
|
+
AccountUpdateBalanceRequest,
|
|
5
|
+
AccountUpdateRequest,
|
|
6
|
+
GetAccountResponse
|
|
7
|
+
} from "@fiado/type-kit/bin/account";
|
|
8
|
+
import {ApiGatewayResponse} from "@fiado/gateway-adapter";
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
export interface IAccountPagoConfiadoApi {
|
|
12
|
+
createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
|
|
13
|
+
|
|
14
|
+
getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
|
|
15
|
+
|
|
16
|
+
updateAccountBalance(accountId: string, params: AccountUpdateBalanceRequest): Promise<ApiGatewayResponse<Boolean>>;
|
|
17
|
+
|
|
18
|
+
update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
19
|
+
|
|
20
|
+
updateByAccountNumber(accountNumber: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
21
|
+
|
|
22
|
+
getAccountByAccountNumber(accountNumber: string): Promise<ApiGatewayResponse<void>>;
|
|
23
|
+
|
|
24
|
+
cancelAccount(directoryId:string,accountNumber?:string,documentNumber?:string): Promise<ApiGatewayResponse<void>>;
|
|
25
25
|
}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { IHttpRequest } from "@fiado/http-client";
|
|
2
|
-
import { inject, injectable } from "inversify";
|
|
3
|
-
import { IActivityApi } from "./interfaces/IActivityApi";
|
|
4
|
-
|
|
5
|
-
@injectable()
|
|
6
|
-
export default class ActivityApi implements IActivityApi {
|
|
7
|
-
|
|
8
|
-
private readonly baseUrl = process.env.ACTIVITY_LAMBDA_URL || "";
|
|
9
|
-
|
|
10
|
-
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) { }
|
|
11
|
-
|
|
12
|
-
async getActivityByDirectoryId(directoryId: string, typeOfActivityIds: string[]): Promise<any> {
|
|
13
|
-
|
|
14
|
-
const typeOfActivityQuery = typeOfActivityIds.map(id => `typeOfActivity=${encodeURIComponent(id)}`).join('&');
|
|
15
|
-
const url = `${this.baseUrl}activities/directory/${directoryId}?${typeOfActivityQuery}`;
|
|
16
|
-
|
|
17
|
-
return await this.httpRequest.get(url);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
async getActivityById(typeOfActivityIds: string[]): Promise<any> {
|
|
21
|
-
|
|
22
|
-
const query = typeOfActivityIds.map(id => `typeOfActivity=${encodeURIComponent(id)}`).join('&');
|
|
23
|
-
const url = `${this.baseUrl}activities?${query}`;
|
|
24
|
-
|
|
25
|
-
return await this.httpRequest.get(url);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
async getActivityHistory(typeOfActivity:string, startDate: string, endDate: string): Promise<any> {
|
|
29
|
-
|
|
30
|
-
const url = `${this.baseUrl}activities/history?typeOfActivity=${typeOfActivity}&startDate=${startDate}&endDate=${endDate}`;
|
|
31
|
-
|
|
32
|
-
return await this.httpRequest.get(url);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
1
|
+
import { IHttpRequest } from "@fiado/http-client";
|
|
2
|
+
import { inject, injectable } from "inversify";
|
|
3
|
+
import { IActivityApi } from "./interfaces/IActivityApi";
|
|
4
|
+
|
|
5
|
+
@injectable()
|
|
6
|
+
export default class ActivityApi implements IActivityApi {
|
|
7
|
+
|
|
8
|
+
private readonly baseUrl = process.env.ACTIVITY_LAMBDA_URL || "";
|
|
9
|
+
|
|
10
|
+
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) { }
|
|
11
|
+
|
|
12
|
+
async getActivityByDirectoryId(directoryId: string, typeOfActivityIds: string[]): Promise<any> {
|
|
13
|
+
|
|
14
|
+
const typeOfActivityQuery = typeOfActivityIds.map(id => `typeOfActivity=${encodeURIComponent(id)}`).join('&');
|
|
15
|
+
const url = `${this.baseUrl}activities/directory/${directoryId}?${typeOfActivityQuery}`;
|
|
16
|
+
|
|
17
|
+
return await this.httpRequest.get(url);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
async getActivityById(typeOfActivityIds: string[]): Promise<any> {
|
|
21
|
+
|
|
22
|
+
const query = typeOfActivityIds.map(id => `typeOfActivity=${encodeURIComponent(id)}`).join('&');
|
|
23
|
+
const url = `${this.baseUrl}activities?${query}`;
|
|
24
|
+
|
|
25
|
+
return await this.httpRequest.get(url);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
async getActivityHistory(typeOfActivity:string, startDate: string, endDate: string): Promise<any> {
|
|
29
|
+
|
|
30
|
+
const url = `${this.baseUrl}activities/history?typeOfActivity=${typeOfActivity}&startDate=${startDate}&endDate=${endDate}`;
|
|
31
|
+
|
|
32
|
+
return await this.httpRequest.get(url);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export * from './interfaces/IActivityApi';
|
|
4
|
-
export * from './queue/IActivityPublisher';
|
|
5
|
-
export * from './queue/ActivityPublisher';
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
export * from './interfaces/IActivityApi';
|
|
4
|
+
export * from './queue/IActivityPublisher';
|
|
5
|
+
export * from './queue/ActivityPublisher';
|
|
6
6
|
export * from './ActivityApi';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export interface IActivityApi {
|
|
4
|
-
|
|
5
|
-
getActivityByDirectoryId(directoryId: string, typeOfActivityIds: string[]): Promise<any>
|
|
6
|
-
|
|
7
|
-
getActivityById(typeOfActivityIds: string[]): Promise<any>
|
|
8
|
-
|
|
9
|
-
getActivityHistory(typeOfActivity: string, startDate: string, endDate: string): Promise<any>
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
export interface IActivityApi {
|
|
4
|
+
|
|
5
|
+
getActivityByDirectoryId(directoryId: string, typeOfActivityIds: string[]): Promise<any>
|
|
6
|
+
|
|
7
|
+
getActivityById(typeOfActivityIds: string[]): Promise<any>
|
|
8
|
+
|
|
9
|
+
getActivityHistory(typeOfActivity: string, startDate: string, endDate: string): Promise<any>
|
|
10
10
|
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { SendMessageCommand, SendMessageRequest, SQSClient } from "@aws-sdk/client-sqs";
|
|
2
|
-
import { ActivityQueueMessage } from "@fiado/type-kit/bin/activity";
|
|
3
|
-
import { injectable } from "inversify";
|
|
4
|
-
import { IActivityPublisher } from "./IActivityPublisher";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
@injectable()
|
|
8
|
-
export default class ActivityPublisher implements IActivityPublisher {
|
|
9
|
-
private readonly ACTIVITY_QUEUE = process.env.ACTIVITY_QUEUE;
|
|
10
|
-
|
|
11
|
-
async publish(message: ActivityQueueMessage): Promise<void> {
|
|
12
|
-
try {
|
|
13
|
-
|
|
14
|
-
const desduplicationId = message.message.directoryId + message.message.typeOfActivity + message.message.date;
|
|
15
|
-
const client: SQSClient = new SQSClient();
|
|
16
|
-
const sendMessageRequest: SendMessageRequest = {
|
|
17
|
-
QueueUrl: this.ACTIVITY_QUEUE,
|
|
18
|
-
MessageBody: JSON.stringify(message),
|
|
19
|
-
MessageGroupId: message.message.directoryId,
|
|
20
|
-
MessageDeduplicationId: desduplicationId
|
|
21
|
-
};
|
|
22
|
-
const command: SendMessageCommand = new SendMessageCommand(sendMessageRequest);
|
|
23
|
-
await client.send(command);
|
|
24
|
-
} catch (error) {
|
|
25
|
-
throw new Error(`Error publishing message to queue ${': ' + error.message}`);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
1
|
+
import { SendMessageCommand, SendMessageRequest, SQSClient } from "@aws-sdk/client-sqs";
|
|
2
|
+
import { ActivityQueueMessage } from "@fiado/type-kit/bin/activity";
|
|
3
|
+
import { injectable } from "inversify";
|
|
4
|
+
import { IActivityPublisher } from "./IActivityPublisher";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@injectable()
|
|
8
|
+
export default class ActivityPublisher implements IActivityPublisher {
|
|
9
|
+
private readonly ACTIVITY_QUEUE = process.env.ACTIVITY_QUEUE;
|
|
10
|
+
|
|
11
|
+
async publish(message: ActivityQueueMessage): Promise<void> {
|
|
12
|
+
try {
|
|
13
|
+
|
|
14
|
+
const desduplicationId = message.message.directoryId + message.message.typeOfActivity + message.message.date;
|
|
15
|
+
const client: SQSClient = new SQSClient();
|
|
16
|
+
const sendMessageRequest: SendMessageRequest = {
|
|
17
|
+
QueueUrl: this.ACTIVITY_QUEUE,
|
|
18
|
+
MessageBody: JSON.stringify(message),
|
|
19
|
+
MessageGroupId: message.message.directoryId,
|
|
20
|
+
MessageDeduplicationId: desduplicationId
|
|
21
|
+
};
|
|
22
|
+
const command: SendMessageCommand = new SendMessageCommand(sendMessageRequest);
|
|
23
|
+
await client.send(command);
|
|
24
|
+
} catch (error) {
|
|
25
|
+
throw new Error(`Error publishing message to queue ${': ' + error.message}`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ActivityQueueMessage } from "@fiado/type-kit/bin/activity";
|
|
2
|
-
|
|
3
|
-
export interface IActivityPublisher {
|
|
4
|
-
publish(message: ActivityQueueMessage): Promise<void>
|
|
1
|
+
import { ActivityQueueMessage } from "@fiado/type-kit/bin/activity";
|
|
2
|
+
|
|
3
|
+
export interface IActivityPublisher {
|
|
4
|
+
publish(message: ActivityQueueMessage): Promise<void>
|
|
5
5
|
}
|