@fiado/api-invoker 3.18.1 → 4.0.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 (126) 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.js +2 -1
  96. package/bin/zendesk/ZendeskApi.js +2 -1
  97. package/package.json +15 -9
  98. package/src/account-fiadoinc/queue/Publisher.ts +2 -1
  99. package/src/activity-business/queue/ActivityPublisher.ts +2 -1
  100. package/src/address/AddressApi.ts +1 -1
  101. package/src/card-business/queue/CardBusinessPublisher.ts +2 -1
  102. package/src/container.config.ts +2 -2
  103. package/src/credit-engine/queue/CreditCollectionPublisher.ts +2 -1
  104. package/src/credit-engine/queue/CreditDelinquencyPublisher.ts +2 -1
  105. package/src/credit-engine/queue/CreditIncomeDetectionPublisher.ts +2 -1
  106. package/src/credit-engine/queue/CreditLienCollectionPublisher.ts +2 -1
  107. package/src/credit-engine/queue/CreditNotificationPublisher.ts +2 -1
  108. package/src/credit-engine/queue/CreditOfferGenerationPublisher.ts +2 -1
  109. package/src/credit-engine/queue/CreditReconciliationPublisher.ts +2 -1
  110. package/src/credit-engine/queue/CreditScoringPublisher.ts +2 -1
  111. package/src/credit-engine/queue/CreditStatementPublisher.ts +2 -1
  112. package/src/credit-engine/queue/CreditTransferPublisher.ts +2 -1
  113. package/src/directory/DirectoryApi.ts +2 -2
  114. package/src/directory/interfaces/IDirectoryApi.ts +2 -2
  115. package/src/multicommServicePayment/api/MulticommServicePaymentApi.ts +5 -5
  116. package/src/notificationMessages/queue/NotificationMessagePublisher.ts +2 -1
  117. package/src/notificationWebsockets/queue/NotificationWSMessagePublisher.ts +2 -1
  118. package/src/platform-error-events/queue/PlatformErrorEventsPublisher.ts +2 -1
  119. package/src/pricelist-business/PriceListApi.ts +1 -1
  120. package/src/product-payment/api/ProductPaymentApi.ts +1 -1
  121. package/src/riskProfile/queue/TransactionAlarmPublisher.ts +2 -1
  122. package/src/sessionActivity/queue/SessionActivityPublisher.ts +2 -1
  123. package/src/stpServicePayment/api/StpServicePaymentApi.ts +4 -4
  124. package/src/teams-connector/queue/TeamsNotificationPublisher.ts +2 -1
  125. package/src/transaction/queue/TransactionPublisher.ts +2 -1
  126. package/tsconfig.json +0 -21
@@ -13,7 +13,7 @@ export default class StpServicePaymentApi implements IStpServicePaymentApi {
13
13
  constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
14
14
  }
15
15
  async getSTPTransactionDownload(params: { date: string; index?: string; pageSize?: number; sort?: string; }): Promise<ApiGatewayResponse<any>> {
16
- const url= `${this.baseUrl}transaction-download?${Object.keys(params).map(key => `${key}=${encodeURIComponent(params[key])}`).join('&')}`;
16
+ const url= `${this.baseUrl}transaction-download?${(Object.keys(params) as (keyof typeof params)[]).map(key => `${key}=${encodeURIComponent(String(params[key]))}`).join('&')}`;
17
17
  return await this.httpRequest.get(url);
18
18
  }
19
19
 
@@ -40,7 +40,7 @@ export default class StpServicePaymentApi implements IStpServicePaymentApi {
40
40
  async getCatalog(params: GetCatalogParams): Promise<ApiGatewayResponse<any>> {
41
41
  let url = `${this.baseUrl}/catalog`;
42
42
  if (params) {
43
- url += `?${Object.keys(params).map(key => `${key}=${encodeURIComponent(params[key])}`).join('&')}`;
43
+ url += `?${(Object.keys(params) as (keyof typeof params)[]).map(key => `${key}=${encodeURIComponent(String(params[key]))}`).join('&')}`;
44
44
  }
45
45
  return await this.httpRequest.get(url);
46
46
  }
@@ -53,9 +53,9 @@ export default class StpServicePaymentApi implements IStpServicePaymentApi {
53
53
  async getTransactions(params: GetFavoritesParams): Promise<FiadoApiResponse<GetFavoritesResponse>> {
54
54
  const { directoryId, ...queryParams } = params;
55
55
  let url = `${this.baseUrl}transactions/${directoryId}`;
56
- const query = Object.keys(queryParams)
56
+ const query = (Object.keys(queryParams) as (keyof typeof queryParams)[])
57
57
  .filter(key => queryParams[key] !== undefined)
58
- .map(key => `${key}=${encodeURIComponent(queryParams[key])}`)
58
+ .map(key => `${key}=${encodeURIComponent(String(queryParams[key]))}`)
59
59
  .join('&');
60
60
  if (query) url += `?${query}`;
61
61
  return await this.httpRequest.get(url);
@@ -17,7 +17,8 @@ export default class TeamsNotificationPublisher implements ITeamsNotificationPub
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 TeamsNotificationQueue${': ' + error.message}`);
20
+ const errorMessage = error instanceof Error ? error.message : String(error);
21
+ throw new Error(`Error publishing message to TeamsNotificationQueue${': ' + errorMessage}`);
21
22
  }
22
23
  }
23
24
  }
@@ -19,7 +19,8 @@ export class TransactionPublisher implements ITransactionPublisher {
19
19
  const command: SendMessageCommand = new SendMessageCommand(sendMessageRequest);
20
20
  await client.send(command);
21
21
  } catch (error) {
22
- throw new Error(`Error publishing message to queue ${': ' + error.message}`);
22
+ const errorMessage = error instanceof Error ? error.message : String(error);
23
+ throw new Error(`Error publishing message to queue ${': ' + errorMessage}`);
23
24
  }
24
25
  }
25
26
  }
package/tsconfig.json DELETED
@@ -1,21 +0,0 @@
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
- }