@fiado/api-invoker 3.18.1 → 4.1.0

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.
Files changed (130) hide show
  1. package/bin/account-beneficiary/AccountBeneficiaryApi.js +2 -1
  2. package/bin/account-fiadoinc/AccountFiadoIncApi.js +3 -1
  3. package/bin/account-fiadoinc/queue/Publisher.js +3 -4
  4. package/bin/account-fiadosa/AccountFiadoSAApi.js +2 -1
  5. package/bin/account-pagoconfiado/AccountPagoConfiadoApi.js +2 -1
  6. package/bin/activity-business/ActivityApi.js +2 -1
  7. package/bin/activity-business/queue/ActivityPublisher.js +3 -4
  8. package/bin/address/AddressApi.js +3 -2
  9. package/bin/ai-engine-connector/AiEngineApi.js +2 -1
  10. package/bin/appselectondata/AppSelectionDataApi.js +2 -1
  11. package/bin/authentication/AuthenticationApi.js +1 -0
  12. package/bin/bankAccount/BankAccountApi.js +2 -1
  13. package/bin/bbvaRst/api/BBVARstApi.js +2 -1
  14. package/bin/benefits-marketplace/api/BenefitsMarketplaceApi.js +2 -1
  15. package/bin/blacklist/BlackListApi.js +2 -1
  16. package/bin/card/CardApi.js +2 -1
  17. package/bin/card-business/queue/CardBusinessPublisher.js +3 -4
  18. package/bin/centralPayments/CentralPaymentsConnectorApi.js +3 -1
  19. package/bin/circuloCredito/api/CirculoCreditoApi.js +2 -1
  20. package/bin/cnbv-business/CnbvApi.js +2 -1
  21. package/bin/cnbv-connector/CnbvConnectorApi.js +2 -1
  22. package/bin/cognitoConnector/CognitoConnectorApi.js +2 -1
  23. package/bin/cognitoConnector/CognitoConnectorV2.js +2 -1
  24. package/bin/collector/CollectorApi.js +2 -1
  25. package/bin/commission-business/CommissionBusinessApi.js +2 -1
  26. package/bin/contactInformation/ContactInformationApi.js +2 -1
  27. package/bin/container.config.js +1 -1
  28. package/bin/contract-business/api/ContractBusinessApi.js +2 -1
  29. package/bin/contract-generator/ContractGeneratorApi.js +2 -1
  30. package/bin/countries-business/CountriesBusinessApi.js +2 -1
  31. package/bin/credit-engine/CreditEngineApi.js +2 -1
  32. package/bin/credit-engine/queue/CreditCollectionPublisher.js +3 -4
  33. package/bin/credit-engine/queue/CreditDelinquencyPublisher.js +3 -4
  34. package/bin/credit-engine/queue/CreditIncomeDetectionPublisher.js +3 -4
  35. package/bin/credit-engine/queue/CreditLienCollectionPublisher.js +3 -4
  36. package/bin/credit-engine/queue/CreditNotificationPublisher.js +3 -4
  37. package/bin/credit-engine/queue/CreditOfferGenerationPublisher.js +3 -4
  38. package/bin/credit-engine/queue/CreditReconciliationPublisher.js +3 -4
  39. package/bin/credit-engine/queue/CreditScoringPublisher.js +3 -4
  40. package/bin/credit-engine/queue/CreditStatementPublisher.js +3 -4
  41. package/bin/credit-engine/queue/CreditTransferPublisher.js +3 -4
  42. package/bin/credit-payment/CreditPaymentApi.js +2 -1
  43. package/bin/credit-statements/api/CreditStatementsApi.js +2 -1
  44. package/bin/device/DeviceApi.js +2 -1
  45. package/bin/directories/DirectoriesApi.js +2 -1
  46. package/bin/directory/DirectoryApi.d.ts +2 -2
  47. package/bin/directory/DirectoryApi.js +2 -1
  48. package/bin/directory/interfaces/IDirectoryApi.d.ts +2 -2
  49. package/bin/directorySetting/DirectorySettingApi.js +2 -1
  50. package/bin/disputes/DisputesApi.js +2 -1
  51. package/bin/document-generator/DocumentGeneratorApi.js +2 -1
  52. package/bin/document-image-processor/DocumentImageProcessorApi.js +2 -1
  53. package/bin/estafeta/api/EstafetaApi.js +2 -1
  54. package/bin/event-history-business/EventHistoryApi.js +2 -1
  55. package/bin/exchangeRates/ExchangeRatesApi.js +2 -1
  56. package/bin/fiadoMessages/api/FiadoMessagesApi.js +2 -1
  57. package/bin/firebase-connector/FirebaseConnectorApi.js +2 -1
  58. package/bin/fraudPreventionEngine/api/FraudPreventionEngineApi.js +2 -1
  59. package/bin/group/GroupApi.js +2 -1
  60. package/bin/identity/IdentityApi.js +2 -1
  61. package/bin/legalDocument/api/LegalDocumentApi.js +2 -1
  62. package/bin/milestone-business/api/MilestoneBusinessApi.js +2 -1
  63. package/bin/multicommServicePayment/api/MulticommServicePaymentApi.js +6 -5
  64. package/bin/notificationMessages/queue/NotificationMessagePublisher.js +5 -3
  65. package/bin/notificationWebsockets/queue/NotificationWSMessagePublisher.js +4 -4
  66. package/bin/observations/ObservationsApi.js +2 -1
  67. package/bin/onboarding/api/OnboardingApi.js +2 -1
  68. package/bin/onboarding-business/api/OnboardingBusinessApi.js +2 -1
  69. package/bin/order-collector-business/OrderCollectorApi.js +2 -1
  70. package/bin/p2pContact/api/P2pContactApi.js +2 -1
  71. package/bin/payroll-business/PayrollApi.js +2 -1
  72. package/bin/people-business/api/PeopleBusinessApi.js +2 -1
  73. package/bin/platform-error-events/queue/PlatformErrorEventsPublisher.js +3 -4
  74. package/bin/pomelo/api/PomeloApi.js +2 -1
  75. package/bin/pomeloProcessor/api/PomeloProcessorApi.js +2 -1
  76. package/bin/pricelist-business/PriceListApi.js +2 -1
  77. package/bin/product-catalog/ProductCatalogApi.js +2 -1
  78. package/bin/product-payment/api/ProductPaymentApi.js +3 -2
  79. package/bin/referral-business/ReferralBusinessApi.js +2 -1
  80. package/bin/report-processor-business/api/ReportProcessorBusinessApi.js +2 -1
  81. package/bin/riskProfile/api/RiskProfileApi.js +2 -1
  82. package/bin/riskProfile/api/TransactionAlertApi.js +2 -1
  83. package/bin/riskProfile/queue/TransactionAlarmPublisher.js +3 -4
  84. package/bin/service-business/ServiceApi.js +2 -1
  85. package/bin/sessionActivity/queue/SessionActivityPublisher.js +3 -4
  86. package/bin/stp-business/api/STPBusinessApi.js +2 -1
  87. package/bin/stpAccount/api/STPAccountApi.js +2 -1
  88. package/bin/stpServicePayment/api/StpServicePaymentApi.js +5 -4
  89. package/bin/stpSpei/api/StpSpeiApi.js +2 -1
  90. package/bin/teams-connector/queue/TeamsNotificationPublisher.js +3 -4
  91. package/bin/tern/api/TernApi.js +2 -1
  92. package/bin/transaction/api/TransactionApi.js +2 -1
  93. package/bin/transaction/queue/TransactionPublisher.js +3 -4
  94. package/bin/transactionProcessor/api/TransactionProcessorApi.js +2 -1
  95. package/bin/uniteller-connector/api/UnitellerConnectorApi.d.ts +15 -1
  96. package/bin/uniteller-connector/api/UnitellerConnectorApi.js +26 -1
  97. package/bin/uniteller-connector/api/interfaces/IUnitellerConnectorApi.d.ts +23 -1
  98. package/bin/zendesk/ZendeskApi.js +2 -1
  99. package/package.json +16 -10
  100. package/src/account-fiadoinc/queue/Publisher.ts +2 -1
  101. package/src/activity-business/queue/ActivityPublisher.ts +2 -1
  102. package/src/address/AddressApi.ts +1 -1
  103. package/src/card-business/queue/CardBusinessPublisher.ts +2 -1
  104. package/src/container.config.ts +2 -2
  105. package/src/credit-engine/queue/CreditCollectionPublisher.ts +2 -1
  106. package/src/credit-engine/queue/CreditDelinquencyPublisher.ts +2 -1
  107. package/src/credit-engine/queue/CreditIncomeDetectionPublisher.ts +2 -1
  108. package/src/credit-engine/queue/CreditLienCollectionPublisher.ts +2 -1
  109. package/src/credit-engine/queue/CreditNotificationPublisher.ts +2 -1
  110. package/src/credit-engine/queue/CreditOfferGenerationPublisher.ts +2 -1
  111. package/src/credit-engine/queue/CreditReconciliationPublisher.ts +2 -1
  112. package/src/credit-engine/queue/CreditScoringPublisher.ts +2 -1
  113. package/src/credit-engine/queue/CreditStatementPublisher.ts +2 -1
  114. package/src/credit-engine/queue/CreditTransferPublisher.ts +2 -1
  115. package/src/directory/DirectoryApi.ts +2 -2
  116. package/src/directory/interfaces/IDirectoryApi.ts +2 -2
  117. package/src/multicommServicePayment/api/MulticommServicePaymentApi.ts +5 -5
  118. package/src/notificationMessages/queue/NotificationMessagePublisher.ts +2 -1
  119. package/src/notificationWebsockets/queue/NotificationWSMessagePublisher.ts +2 -1
  120. package/src/platform-error-events/queue/PlatformErrorEventsPublisher.ts +2 -1
  121. package/src/pricelist-business/PriceListApi.ts +1 -1
  122. package/src/product-payment/api/ProductPaymentApi.ts +1 -1
  123. package/src/riskProfile/queue/TransactionAlarmPublisher.ts +2 -1
  124. package/src/sessionActivity/queue/SessionActivityPublisher.ts +2 -1
  125. package/src/stpServicePayment/api/StpServicePaymentApi.ts +4 -4
  126. package/src/teams-connector/queue/TeamsNotificationPublisher.ts +2 -1
  127. package/src/transaction/queue/TransactionPublisher.ts +2 -1
  128. package/src/uniteller-connector/api/UnitellerConnectorApi.ts +32 -0
  129. package/src/uniteller-connector/api/interfaces/IUnitellerConnectorApi.ts +32 -0
  130. package/tsconfig.json +0 -21
@@ -10,9 +10,7 @@ exports.TransactionAlarmPublisher = void 0;
10
10
  const client_sqs_1 = require("@aws-sdk/client-sqs");
11
11
  const inversify_1 = require("inversify");
12
12
  let TransactionAlarmPublisher = class TransactionAlarmPublisher {
13
- constructor() {
14
- this.TRANSACTION_ALARM_QUEUE = process.env.TRANSACTION_ALARM_QUEUE;
15
- }
13
+ TRANSACTION_ALARM_QUEUE = process.env.TRANSACTION_ALARM_QUEUE;
16
14
  async publish(message) {
17
15
  try {
18
16
  const client = new client_sqs_1.SQSClient();
@@ -26,7 +24,8 @@ let TransactionAlarmPublisher = class TransactionAlarmPublisher {
26
24
  await client.send(command);
27
25
  }
28
26
  catch (error) {
29
- throw new Error(`Error publishing message to queue ${': ' + error.message}`);
27
+ const errorMessage = error instanceof Error ? error.message : String(error);
28
+ throw new Error(`Error publishing message to queue ${': ' + errorMessage}`);
30
29
  }
31
30
  }
32
31
  };
@@ -20,9 +20,10 @@ const inversify_1 = require("inversify");
20
20
  const dotenv_1 = __importDefault(require("dotenv"));
21
21
  dotenv_1.default.config();
22
22
  let ServiceApi = class ServiceApi {
23
+ httpRequest;
24
+ baseUrl = process.env.SERVICE_BUSINESS_URL || "";
23
25
  constructor(httpRequest) {
24
26
  this.httpRequest = httpRequest;
25
- this.baseUrl = process.env.SERVICE_BUSINESS_URL || "";
26
27
  }
27
28
  async updateMultipleStatus(parameters) {
28
29
  const url = `${this.baseUrl}services/memberships/batch/update/status`;
@@ -10,9 +10,7 @@ exports.SessionActivityPublisher = void 0;
10
10
  const client_sqs_1 = require("@aws-sdk/client-sqs");
11
11
  const inversify_1 = require("inversify");
12
12
  let SessionActivityPublisher = class SessionActivityPublisher {
13
- constructor() {
14
- this.SESSION_ACTIVITY_QUEUE = process.env.SESSION_ACTIVITY_QUEUE;
15
- }
13
+ SESSION_ACTIVITY_QUEUE = process.env.SESSION_ACTIVITY_QUEUE;
16
14
  async publish(message) {
17
15
  try {
18
16
  const client = new client_sqs_1.SQSClient();
@@ -24,7 +22,8 @@ let SessionActivityPublisher = class SessionActivityPublisher {
24
22
  await client.send(command);
25
23
  }
26
24
  catch (error) {
27
- throw new Error(`Error publishing message to queue ${': ' + error.message}`);
25
+ const errorMessage = error instanceof Error ? error.message : String(error);
26
+ throw new Error(`Error publishing message to queue ${': ' + errorMessage}`);
28
27
  }
29
28
  }
30
29
  };
@@ -14,9 +14,10 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const inversify_1 = require("inversify");
16
16
  let STPBusinessApi = class STPBusinessApi {
17
+ httpRequest;
18
+ baseUrl = process.env.STP_BUSINESS_LAMBDA_URL || "";
17
19
  constructor(httpRequest) {
18
20
  this.httpRequest = httpRequest;
19
- this.baseUrl = process.env.STP_BUSINESS_LAMBDA_URL || "";
20
21
  }
21
22
  async getFiadoSAConciliation(params) {
22
23
  const queryParams = new URLSearchParams();
@@ -14,9 +14,10 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const inversify_1 = require("inversify");
16
16
  let STPAccountApi = class STPAccountApi {
17
+ httpRequest;
18
+ baseUrl = process.env.STP_ACCOUNT_LAMBDA_URL || "";
17
19
  constructor(httpRequest) {
18
20
  this.httpRequest = httpRequest;
19
- this.baseUrl = process.env.STP_ACCOUNT_LAMBDA_URL || "";
20
21
  }
21
22
  async updateAccountDetails(request) {
22
23
  const url = `${this.baseUrl}account/update`;
@@ -14,12 +14,13 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const inversify_1 = require("inversify");
16
16
  let StpServicePaymentApi = class StpServicePaymentApi {
17
+ httpRequest;
18
+ baseUrl = process.env.STP_SERVICE_PAY_LAMBDA_URL || "";
17
19
  constructor(httpRequest) {
18
20
  this.httpRequest = httpRequest;
19
- this.baseUrl = process.env.STP_SERVICE_PAY_LAMBDA_URL || "";
20
21
  }
21
22
  async getSTPTransactionDownload(params) {
22
- const url = `${this.baseUrl}transaction-download?${Object.keys(params).map(key => `${key}=${encodeURIComponent(params[key])}`).join('&')}`;
23
+ const url = `${this.baseUrl}transaction-download?${Object.keys(params).map(key => `${key}=${encodeURIComponent(String(params[key]))}`).join('&')}`;
23
24
  return await this.httpRequest.get(url);
24
25
  }
25
26
  async pay(request) {
@@ -41,7 +42,7 @@ let StpServicePaymentApi = class StpServicePaymentApi {
41
42
  async getCatalog(params) {
42
43
  let url = `${this.baseUrl}/catalog`;
43
44
  if (params) {
44
- url += `?${Object.keys(params).map(key => `${key}=${encodeURIComponent(params[key])}`).join('&')}`;
45
+ url += `?${Object.keys(params).map(key => `${key}=${encodeURIComponent(String(params[key]))}`).join('&')}`;
45
46
  }
46
47
  return await this.httpRequest.get(url);
47
48
  }
@@ -54,7 +55,7 @@ let StpServicePaymentApi = class StpServicePaymentApi {
54
55
  let url = `${this.baseUrl}transactions/${directoryId}`;
55
56
  const query = Object.keys(queryParams)
56
57
  .filter(key => queryParams[key] !== undefined)
57
- .map(key => `${key}=${encodeURIComponent(queryParams[key])}`)
58
+ .map(key => `${key}=${encodeURIComponent(String(queryParams[key]))}`)
58
59
  .join('&');
59
60
  if (query)
60
61
  url += `?${query}`;
@@ -15,9 +15,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.StpSpeiApi = void 0;
16
16
  const inversify_1 = require("inversify");
17
17
  let StpSpeiApi = class StpSpeiApi {
18
+ httpRequest;
19
+ baseUrl = process.env.STP_SPEI_LAMBDA_URL || "";
18
20
  constructor(httpRequest) {
19
21
  this.httpRequest = httpRequest;
20
- this.baseUrl = process.env.STP_SPEI_LAMBDA_URL || "";
21
22
  }
22
23
  async putStpOrder(request) {
23
24
  const url = `${this.baseUrl}`;
@@ -9,9 +9,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
9
9
  const client_sqs_1 = require("@aws-sdk/client-sqs");
10
10
  const inversify_1 = require("inversify");
11
11
  let TeamsNotificationPublisher = class TeamsNotificationPublisher {
12
- constructor() {
13
- this.TEAMS_NOTIFICATION_QUEUE = process.env.TEAMS_NOTIFICATION_QUEUE;
14
- }
12
+ TEAMS_NOTIFICATION_QUEUE = process.env.TEAMS_NOTIFICATION_QUEUE;
15
13
  async publish(message) {
16
14
  try {
17
15
  const client = new client_sqs_1.SQSClient();
@@ -23,7 +21,8 @@ let TeamsNotificationPublisher = class TeamsNotificationPublisher {
23
21
  await client.send(command);
24
22
  }
25
23
  catch (error) {
26
- throw new Error(`Error publishing message to TeamsNotificationQueue${': ' + error.message}`);
24
+ const errorMessage = error instanceof Error ? error.message : String(error);
25
+ throw new Error(`Error publishing message to TeamsNotificationQueue${': ' + errorMessage}`);
27
26
  }
28
27
  }
29
28
  };
@@ -14,9 +14,10 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const inversify_1 = require("inversify");
16
16
  let TernApi = class TernApi {
17
+ httpRequest;
18
+ baseUrl = process.env.TERN_LAMBDA_URL || "";
17
19
  constructor(httpRequest) {
18
20
  this.httpRequest = httpRequest;
19
- this.baseUrl = process.env.TERN_LAMBDA_URL || "";
20
21
  }
21
22
  /// USERS
22
23
  async getUser(request) {
@@ -14,9 +14,10 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const inversify_1 = require("inversify");
16
16
  let TransactionApi = class TransactionApi {
17
+ httpRequest;
18
+ baseUrl = process.env.TRANSACTION_LAMBDA_URL || "";
17
19
  constructor(httpRequest) {
18
20
  this.httpRequest = httpRequest;
19
- this.baseUrl = process.env.TRANSACTION_LAMBDA_URL || "";
20
21
  }
21
22
  async getActivityProblemsByStatus(status, index, pageSize) {
22
23
  let queryParams = [];
@@ -10,9 +10,7 @@ exports.TransactionPublisher = void 0;
10
10
  const client_sqs_1 = require("@aws-sdk/client-sqs");
11
11
  const inversify_1 = require("inversify");
12
12
  let TransactionPublisher = class TransactionPublisher {
13
- constructor() {
14
- this.TRANSACTION_QUEUE = process.env.TRANSACTION_QUEUE;
15
- }
13
+ TRANSACTION_QUEUE = process.env.TRANSACTION_QUEUE;
16
14
  async publish(message) {
17
15
  try {
18
16
  const client = new client_sqs_1.SQSClient();
@@ -26,7 +24,8 @@ let TransactionPublisher = class TransactionPublisher {
26
24
  await client.send(command);
27
25
  }
28
26
  catch (error) {
29
- throw new Error(`Error publishing message to queue ${': ' + error.message}`);
27
+ const errorMessage = error instanceof Error ? error.message : String(error);
28
+ throw new Error(`Error publishing message to queue ${': ' + errorMessage}`);
30
29
  }
31
30
  }
32
31
  };
@@ -14,9 +14,10 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const inversify_1 = require("inversify");
16
16
  let TransactionProcessorApi = class TransactionProcessorApi {
17
+ httpRequest;
18
+ baseUrl = process.env.TRANSACTION_PROCESSOR_LAMBDA_URL || "";
17
19
  constructor(httpRequest) {
18
20
  this.httpRequest = httpRequest;
19
- this.baseUrl = process.env.TRANSACTION_PROCESSOR_LAMBDA_URL || "";
20
21
  }
21
22
  async authorizeTransaction(request) {
22
23
  const url = `${this.baseUrl}authorize`;
@@ -1,7 +1,7 @@
1
1
  import { IHttpRequest } from "@fiado/http-client";
2
2
  import { ApiGatewayResponse } from "@fiado/gateway-adapter";
3
3
  import { ConnectorCatalogItem } from "@fiado/type-kit/bin/benefitCenter";
4
- import { RemittanceAddBeneficiaryRequest, RemittanceBeneficiary, RemittanceHomeResponse, RemittanceListBeneficiariesResponse, RemittanceOnboardRequest, RemittanceOnboardResponse, RemittanceQuoteRequest, RemittanceQuoteResponse, RemittanceSecurityQuestionsResponse, RemittanceSendPreviewRequest, RemittanceSendPreviewResponse, RemittanceUpdateBeneficiaryRequest } from "@fiado/type-kit/bin/remittance";
4
+ import { RemittanceAddBeneficiaryRequest, RemittanceBeneficiary, RemittanceHomeResponse, RemittanceListBeneficiariesResponse, RemittanceOnboardRequest, RemittanceOnboardResponse, RemittancePayerAdditionalFieldDto, RemittancePayerBranchDto, RemittancePayerDto, RemittanceQuoteRequest, RemittanceQuoteResponse, RemittanceSecurityQuestionsResponse, RemittanceSendPreviewRequest, RemittanceSendPreviewResponse, RemittanceStateDto, RemittanceUpdateBeneficiaryRequest } from "@fiado/type-kit/bin/remittance";
5
5
  import { IUnitellerConnectorApi } from "./interfaces/IUnitellerConnectorApi";
6
6
  export default class UnitellerConnectorApi implements IUnitellerConnectorApi {
7
7
  private httpRequest;
@@ -11,6 +11,20 @@ export default class UnitellerConnectorApi implements IUnitellerConnectorApi {
11
11
  getSecurityQuestions(): Promise<ApiGatewayResponse<RemittanceSecurityQuestionsResponse>>;
12
12
  onboard(request: RemittanceOnboardRequest): Promise<ApiGatewayResponse<RemittanceOnboardResponse>>;
13
13
  getStandardCatalog(): Promise<ApiGatewayResponse<ConnectorCatalogItem[]>>;
14
+ countryStates(countryISO: string): Promise<ApiGatewayResponse<RemittanceStateDto[]>>;
15
+ countryPayers(countryISO: string, currencyISO: string): Promise<ApiGatewayResponse<RemittancePayerDto[]>>;
16
+ payerBranches(params: {
17
+ payerCode: string;
18
+ receptionMethodName: string;
19
+ countryISO: string;
20
+ currencyISO: string;
21
+ stateISO: string;
22
+ }): Promise<ApiGatewayResponse<RemittancePayerBranchDto[]>>;
23
+ payerAdditionalFields(params: {
24
+ payerCode: string;
25
+ currencyISO: string;
26
+ receptionMethodName: string;
27
+ }): Promise<ApiGatewayResponse<RemittancePayerAdditionalFieldDto[]>>;
14
28
  listBeneficiaries(directoryId: string, includeDeactivated?: boolean): Promise<ApiGatewayResponse<RemittanceListBeneficiariesResponse>>;
15
29
  getBeneficiary(directoryId: string, beneficiaryId: string): Promise<ApiGatewayResponse<RemittanceBeneficiary>>;
16
30
  addBeneficiary(directoryId: string, request: RemittanceAddBeneficiaryRequest): Promise<ApiGatewayResponse<RemittanceBeneficiary>>;
@@ -14,9 +14,10 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const inversify_1 = require("inversify");
16
16
  let UnitellerConnectorApi = class UnitellerConnectorApi {
17
+ httpRequest;
18
+ baseUrl = process.env.UNITELLER_CONNECTOR_LAMBDA_URL || "";
17
19
  constructor(httpRequest) {
18
20
  this.httpRequest = httpRequest;
19
- this.baseUrl = process.env.UNITELLER_CONNECTOR_LAMBDA_URL || "";
20
21
  }
21
22
  async getHome(directoryId) {
22
23
  const url = `${this.baseUrl}/home`;
@@ -34,6 +35,30 @@ let UnitellerConnectorApi = class UnitellerConnectorApi {
34
35
  const url = `${this.baseUrl}/catalog/standard`;
35
36
  return await this.httpRequest.get(url);
36
37
  }
38
+ async countryStates(countryISO) {
39
+ const url = `${this.baseUrl}/countries/${encodeURIComponent(countryISO)}/states`;
40
+ return await this.httpRequest.get(url);
41
+ }
42
+ async countryPayers(countryISO, currencyISO) {
43
+ const url = `${this.baseUrl}/countries/${encodeURIComponent(countryISO)}/payers`;
44
+ return await this.httpRequest.get(url, { currencyISO });
45
+ }
46
+ async payerBranches(params) {
47
+ const url = `${this.baseUrl}/payers/${encodeURIComponent(params.payerCode)}/branches`;
48
+ return await this.httpRequest.get(url, {
49
+ receptionMethodName: params.receptionMethodName,
50
+ countryISO: params.countryISO,
51
+ currencyISO: params.currencyISO,
52
+ stateISO: params.stateISO,
53
+ });
54
+ }
55
+ async payerAdditionalFields(params) {
56
+ const url = `${this.baseUrl}/payers/${encodeURIComponent(params.payerCode)}/fields`;
57
+ return await this.httpRequest.get(url, {
58
+ currencyISO: params.currencyISO,
59
+ receptionMethodName: params.receptionMethodName,
60
+ });
61
+ }
37
62
  async listBeneficiaries(directoryId, includeDeactivated) {
38
63
  const url = `${this.baseUrl}/beneficiaries/list`;
39
64
  return await this.httpRequest.post(url, { directoryId, includeDeactivated });
@@ -1,6 +1,6 @@
1
1
  import { ApiGatewayResponse } from "@fiado/gateway-adapter";
2
2
  import { ConnectorCatalogItem } from "@fiado/type-kit/bin/benefitCenter";
3
- import { RemittanceAddBeneficiaryRequest, RemittanceBeneficiary, RemittanceHomeResponse, RemittanceListBeneficiariesResponse, RemittanceOnboardRequest, RemittanceOnboardResponse, RemittanceQuoteRequest, RemittanceQuoteResponse, RemittanceSecurityQuestionsResponse, RemittanceSendPreviewRequest, RemittanceSendPreviewResponse, RemittanceUpdateBeneficiaryRequest } from "@fiado/type-kit/bin/remittance";
3
+ import { RemittanceAddBeneficiaryRequest, RemittanceBeneficiary, RemittanceHomeResponse, RemittanceListBeneficiariesResponse, RemittanceOnboardRequest, RemittanceOnboardResponse, RemittancePayerAdditionalFieldDto, RemittancePayerBranchDto, RemittancePayerDto, RemittanceQuoteRequest, RemittanceQuoteResponse, RemittanceSecurityQuestionsResponse, RemittanceSendPreviewRequest, RemittanceSendPreviewResponse, RemittanceStateDto, RemittanceUpdateBeneficiaryRequest } from "@fiado/type-kit/bin/remittance";
4
4
  export interface IUnitellerConnectorApi {
5
5
  /** Estado del módulo remesas para un directoryId. */
6
6
  getHome(directoryId: string): Promise<ApiGatewayResponse<RemittanceHomeResponse>>;
@@ -14,6 +14,28 @@ export interface IUnitellerConnectorApi {
14
14
  * del benefit Remittance (D-F3.7).
15
15
  */
16
16
  getStandardCatalog(): Promise<ApiGatewayResponse<ConnectorCatalogItem[]>>;
17
+ /** Estados / departamentos del país destino (ej. GT-GU, SV-SS). */
18
+ countryStates(countryISO: string): Promise<ApiGatewayResponse<RemittanceStateDto[]>>;
19
+ /**
20
+ * Payers disponibles para el país+currency (deduplicado por payerSpecificCode),
21
+ * con `beneAccountRegex`, `isPayerBranchRequired` y `isAdditionalFieldRequired`
22
+ * para que el cliente decida los pasos del wizard.
23
+ */
24
+ countryPayers(countryISO: string, currencyISO: string): Promise<ApiGatewayResponse<RemittancePayerDto[]>>;
25
+ /** Sucursales del payer (cuando isPayerBranchRequired = YES y receptionMethod = Cash Pickup). */
26
+ payerBranches(params: {
27
+ payerCode: string;
28
+ receptionMethodName: string;
29
+ countryISO: string;
30
+ currencyISO: string;
31
+ stateISO: string;
32
+ }): Promise<ApiGatewayResponse<RemittancePayerBranchDto[]>>;
33
+ /** Additional fields requeridos por el payer (cuando isAdditionalFieldRequired = YES). */
34
+ payerAdditionalFields(params: {
35
+ payerCode: string;
36
+ currencyISO: string;
37
+ receptionMethodName: string;
38
+ }): Promise<ApiGatewayResponse<RemittancePayerAdditionalFieldDto[]>>;
17
39
  listBeneficiaries(directoryId: string, includeDeactivated?: boolean): Promise<ApiGatewayResponse<RemittanceListBeneficiariesResponse>>;
18
40
  getBeneficiary(directoryId: string, beneficiaryId: string): Promise<ApiGatewayResponse<RemittanceBeneficiary>>;
19
41
  addBeneficiary(directoryId: string, request: RemittanceAddBeneficiaryRequest): Promise<ApiGatewayResponse<RemittanceBeneficiary>>;
@@ -20,9 +20,10 @@ const dotenv_1 = __importDefault(require("dotenv"));
20
20
  const inversify_1 = require("inversify");
21
21
  dotenv_1.default.config();
22
22
  let ZendeskApi = class ZendeskApi {
23
+ httpRequest;
24
+ baseUrl = process.env.ZENDESK_BUSINESS_URL || "";
23
25
  constructor(httpRequest) {
24
26
  this.httpRequest = httpRequest;
25
- this.baseUrl = process.env.ZENDESK_BUSINESS_URL || "";
26
27
  }
27
28
  async createUser(data) {
28
29
  const url = `${this.baseUrl}users/create`;
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "3.18.1",
3
+ "version": "4.1.0",
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",
7
7
  "scripts": {
8
- "test": "test",
8
+ "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
9
9
  "build": "tsc",
10
10
  "prepublishOnly": "npm run build"
11
11
  },
@@ -14,17 +14,23 @@
14
14
  "license": "ISC",
15
15
  "dependencies": {
16
16
  "@aws-sdk/client-sqs": "^3.919.0",
17
- "@fiado/gateway-adapter": "^1.1.50",
18
- "@fiado/http-client": "^1.0.7",
17
+ "@fiado/gateway-adapter": "^2.0.0",
18
+ "@fiado/http-client": "^2.0.0",
19
19
  "@fiado/logger": "^1.0.3",
20
- "@fiado/type-kit": "^3.27.0",
21
- "dotenv": "^16.4.7",
22
- "i": "^0.3.7",
23
- "inversify": "^6.2.2",
24
- "npm": "^11.11.1",
20
+ "@fiado/type-kit": "^3.30.0",
21
+ "dotenv": "^16.4.7"
22
+ },
23
+ "peerDependencies": {
24
+ "inversify": "^8.0.0",
25
25
  "reflect-metadata": "^0.2.2"
26
26
  },
27
27
  "devDependencies": {
28
- "@types/node": "^20.17.24"
28
+ "@types/jest": "^30.0.0",
29
+ "@types/node": "^25.9.1",
30
+ "inversify": "^8.1.0",
31
+ "jest": "^30.4.2",
32
+ "reflect-metadata": "^0.2.2",
33
+ "ts-jest": "^29.4.11",
34
+ "typescript": "^6.0.3"
29
35
  }
30
36
  }
@@ -17,7 +17,8 @@ export class Publisher implements IPublisher {
17
17
  const command: SendMessageCommand = new SendMessageCommand(sendMessageRequest);
18
18
  await client.send(command);
19
19
  } catch (error) {
20
- throw new Error(`Error publishing message to queue ${': ' + error.message}`);
20
+ const errorMessage = error instanceof Error ? error.message : String(error);
21
+ throw new Error(`Error publishing message to queue ${': ' + errorMessage}`);
21
22
  }
22
23
  }
23
24
  }
@@ -23,7 +23,8 @@ export default class ActivityPublisher implements IActivityPublisher {
23
23
  const command: SendMessageCommand = new SendMessageCommand(sendMessageRequest);
24
24
  await client.send(command);
25
25
  } catch (error) {
26
- throw new Error(`Error publishing message to queue ${': ' + error.message}`);
26
+ const errorMessage = error instanceof Error ? error.message : String(error);
27
+ throw new Error(`Error publishing message to queue ${': ' + errorMessage}`);
27
28
  }
28
29
  }
29
30
  }
@@ -17,7 +17,7 @@ export class AddressApi implements IAddressApi {
17
17
 
18
18
  const url = `${this.baseUrl}users/${directoryId}`;
19
19
 
20
- return await this.httpRequest.get(`${url}`, null);
20
+ return await this.httpRequest.get(`${url}`, undefined);
21
21
  }
22
22
 
23
23
  async create(directoryId: string, address: AddressCreateRequest): Promise<void> {
@@ -16,7 +16,8 @@ export default class CardBusinessPublisher implements ICardBusinessPublisher {
16
16
  const command: SendMessageCommand = new SendMessageCommand(sendMessageRequest);
17
17
  await client.send(command);
18
18
  } catch (error) {
19
- throw new Error(`Error publishing message to queue ${': ' + error.message}`);
19
+ const errorMessage = error instanceof Error ? error.message : String(error);
20
+ throw new Error(`Error publishing message to queue ${': ' + errorMessage}`);
20
21
  }
21
22
  }
22
23
  }
@@ -1,4 +1,4 @@
1
- import { ContainerModule, interfaces } from "inversify";
1
+ import { ContainerModule } from "inversify";
2
2
  import { DirectoryApi, IDirectoryApi } from "./directory";
3
3
  import { IdentityApi, IIdentityApi } from "./identity";
4
4
  import { INotificationMessagesPublisher } from "./notificationMessages";
@@ -153,7 +153,7 @@ import BenefitsMarketplaceApi from "./benefits-marketplace/api/BenefitsMarketpla
153
153
  // UniTeller remittance connector (Fase 2 remittance)
154
154
  import { IUnitellerConnectorApi, UnitellerConnectorApi } from "./uniteller-connector";
155
155
 
156
- export const apiInvokerBindings = new ContainerModule((bind: interfaces.Bind) => {
156
+ export const apiInvokerBindings = new ContainerModule(({ bind }) => {
157
157
  // UTILS bindings
158
158
  bind<InvokerUtils>("InvokerUtils").to(InvokerUtils);
159
159
 
@@ -17,7 +17,8 @@ export default class CreditCollectionPublisher implements ICreditCollectionPubli
17
17
  const command: SendMessageCommand = new SendMessageCommand(sendMessageRequest);
18
18
  await client.send(command);
19
19
  } catch (error) {
20
- throw new Error(`Error publishing message to CreditCollectionQueue${': ' + error.message}`);
20
+ const errorMessage = error instanceof Error ? error.message : String(error);
21
+ throw new Error(`Error publishing message to CreditCollectionQueue${': ' + errorMessage}`);
21
22
  }
22
23
  }
23
24
  }
@@ -17,7 +17,8 @@ export default class CreditDelinquencyPublisher implements ICreditDelinquencyPub
17
17
  const command: SendMessageCommand = new SendMessageCommand(sendMessageRequest);
18
18
  await client.send(command);
19
19
  } catch (error) {
20
- throw new Error(`Error publishing message to CreditDelinquencyQueue: ${error.message}`);
20
+ const errorMessage = error instanceof Error ? error.message : String(error);
21
+ throw new Error(`Error publishing message to CreditDelinquencyQueue: ${errorMessage}`);
21
22
  }
22
23
  }
23
24
  }
@@ -17,7 +17,8 @@ export default class CreditIncomeDetectionPublisher implements ICreditIncomeDete
17
17
  const command: SendMessageCommand = new SendMessageCommand(sendMessageRequest);
18
18
  await client.send(command);
19
19
  } catch (error) {
20
- throw new Error(`Error publishing message to CreditIncomeDetectionQueue${': ' + error.message}`);
20
+ const errorMessage = error instanceof Error ? error.message : String(error);
21
+ throw new Error(`Error publishing message to CreditIncomeDetectionQueue${': ' + errorMessage}`);
21
22
  }
22
23
  }
23
24
  }
@@ -17,7 +17,8 @@ export default class CreditLienCollectionPublisher implements ICreditLienCollect
17
17
  const command: SendMessageCommand = new SendMessageCommand(sendMessageRequest);
18
18
  await client.send(command);
19
19
  } catch (error) {
20
- throw new Error(`Error publishing message to CreditLienCollectionQueue${': ' + (error.message || '')}`);
20
+ const errorMessage = error instanceof Error ? error.message : String(error);
21
+ throw new Error(`Error publishing message to CreditLienCollectionQueue${': ' + (errorMessage || '')}`);
21
22
  }
22
23
  }
23
24
  }
@@ -17,7 +17,8 @@ export default class CreditNotificationPublisher implements ICreditNotificationP
17
17
  const command: SendMessageCommand = new SendMessageCommand(sendMessageRequest);
18
18
  await client.send(command);
19
19
  } catch (error) {
20
- throw new Error(`Error publishing message to CreditNotificationQueue${': ' + error.message}`);
20
+ const errorMessage = error instanceof Error ? error.message : String(error);
21
+ throw new Error(`Error publishing message to CreditNotificationQueue${': ' + errorMessage}`);
21
22
  }
22
23
  }
23
24
  }
@@ -17,7 +17,8 @@ export default class CreditOfferGenerationPublisher implements ICreditOfferGener
17
17
  const command: SendMessageCommand = new SendMessageCommand(sendMessageRequest);
18
18
  await client.send(command);
19
19
  } catch (error) {
20
- throw new Error(`Error publishing message to CreditOfferGenerationQueue${': ' + error.message}`);
20
+ const errorMessage = error instanceof Error ? error.message : String(error);
21
+ throw new Error(`Error publishing message to CreditOfferGenerationQueue${': ' + errorMessage}`);
21
22
  }
22
23
  }
23
24
  }
@@ -17,7 +17,8 @@ export default class CreditReconciliationPublisher implements ICreditReconciliat
17
17
  const command: SendMessageCommand = new SendMessageCommand(sendMessageRequest);
18
18
  await client.send(command);
19
19
  } catch (error) {
20
- throw new Error(`Error publishing message to CreditReconciliationQueue${': ' + (error.message || '')}`);
20
+ const errorMessage = error instanceof Error ? error.message : String(error);
21
+ throw new Error(`Error publishing message to CreditReconciliationQueue${': ' + (errorMessage || '')}`);
21
22
  }
22
23
  }
23
24
  }
@@ -17,7 +17,8 @@ export default class CreditScoringPublisher implements ICreditScoringPublisher {
17
17
  const command: SendMessageCommand = new SendMessageCommand(sendMessageRequest);
18
18
  await client.send(command);
19
19
  } catch (error) {
20
- throw new Error(`Error publishing message to CreditScoringQueue${': ' + error.message}`);
20
+ const errorMessage = error instanceof Error ? error.message : String(error);
21
+ throw new Error(`Error publishing message to CreditScoringQueue${': ' + errorMessage}`);
21
22
  }
22
23
  }
23
24
  }
@@ -17,7 +17,8 @@ export default class CreditStatementPublisher implements ICreditStatementPublish
17
17
  const command: SendMessageCommand = new SendMessageCommand(sendMessageRequest);
18
18
  await client.send(command);
19
19
  } catch (error) {
20
- throw new Error(`Error publishing message to CreditStatementQueue${': ' + error.message}`);
20
+ const errorMessage = error instanceof Error ? error.message : String(error);
21
+ throw new Error(`Error publishing message to CreditStatementQueue${': ' + errorMessage}`);
21
22
  }
22
23
  }
23
24
  }
@@ -17,7 +17,8 @@ export default class CreditTransferPublisher implements ICreditTransferPublisher
17
17
  const command: SendMessageCommand = new SendMessageCommand(sendMessageRequest);
18
18
  await client.send(command);
19
19
  } catch (error) {
20
- throw new Error(`Error publishing message to CreditTransferQueue${': ' + error.message}`);
20
+ const errorMessage = error instanceof Error ? error.message : String(error);
21
+ throw new Error(`Error publishing message to CreditTransferQueue${': ' + errorMessage}`);
21
22
  }
22
23
  }
23
24
  }
@@ -120,7 +120,7 @@ export class DirectoryApi implements IDirectoryApi {
120
120
  return await this.httpRequest.post(`${url}`, null, { 'operationName': operationName });
121
121
  }
122
122
 
123
- public async addOwnerDirectoryId(directoryId: string, newOwnerDirectoryId): Promise<any> {
123
+ public async addOwnerDirectoryId(directoryId: string, newOwnerDirectoryId: string): Promise<any> {
124
124
 
125
125
  const url = `${this.baseUrl}`;
126
126
  const operationName = "addOwnerDirectoryId";
@@ -133,7 +133,7 @@ export class DirectoryApi implements IDirectoryApi {
133
133
  return await this.httpRequest.post(`${url}`, data, { 'operationName': operationName });
134
134
  }
135
135
 
136
- public async updateOwnerDirectoryId(directoryId: string, newOwnerDirectoryId): Promise<any> {
136
+ public async updateOwnerDirectoryId(directoryId: string, newOwnerDirectoryId: string): Promise<any> {
137
137
 
138
138
  const url = `${this.baseUrl}`;
139
139
  const operationName = "updateOwnerDirectoryId";
@@ -53,11 +53,11 @@ export interface IDirectoryApi {
53
53
  */
54
54
  getByPhoneNumber(phoneNumber: string): Promise<any>
55
55
 
56
- addOwnerDirectoryId(directoryId: string, newOwnerDirectoryId): Promise<any>
56
+ addOwnerDirectoryId(directoryId: string, newOwnerDirectoryId: string): Promise<any>
57
57
 
58
58
  updateUserProfile(directoryId: string, profile: Profile): Promise<void>
59
59
 
60
- updateOwnerDirectoryId(directoryId: string, newOwnerDirectoryId): Promise<any>
60
+ updateOwnerDirectoryId(directoryId: string, newOwnerDirectoryId: string): Promise<any>
61
61
 
62
62
  updateStatus(directoryId: string, status: Status): Promise<void>
63
63