@fiado/api-invoker 1.3.40 → 1.3.42

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.
@@ -5,7 +5,7 @@ import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiRespo
5
5
  import { CreateExternalBankAccountRequest, CreateExternalBankAccountResponse } from "@fiado/type-kit/bin/bankAccount";
6
6
  import GetExternalBankAccountResponse from "@fiado/type-kit/bin/bankAccount/dtos/GetExternalBankAccountResponse";
7
7
  import { ActivateBankAccountCardRequest, ActivateBankAccountCardResponse, CardBatchRequest, CardBatchResponse, CardStatementListResponse, CreateBankAccountCardRequest, CreateBankAccountCardResponse, GetBankAccountCardBalanceResponse, GetBankAccountCardResponse, ReplaceBankAccountCardRequest, ReplaceBankAccountCardResponse, StatementDocumentResponse, UpdateBankAccountCardRequest, UpdateBankAccountCardResponse } from "@fiado/type-kit/bin/card";
8
- import { HealthcheckResponse, OOWQuestionsResponse, SubmitOOWQuestionAnswersRequest } from "@fiado/type-kit/bin/centralPayments";
8
+ import { GetMerchantLocationsQueryParams, GetMerchantLocationsResponse, HealthcheckResponse, OOWQuestionsResponse, SubmitOOWQuestionAnswersRequest } from "@fiado/type-kit/bin/centralPayments";
9
9
  import { ProviderDocumentUploadRequest, ProviderDocumentUploadResponse } from "@fiado/type-kit/bin/provider";
10
10
  import { CentralPaymentsQueryParams, CentralPaymentsTransactionItem, ProviderTransactionCompletionRequest, ProviderTransactionCompletionResponse, ProviderTransactionReversalRequest, ProviderTransactionReversalResponse, TransactionListResponse } from "@fiado/type-kit/bin/transaction";
11
11
  import { InvokerUtils } from "../utils/InvokerUtils";
@@ -55,4 +55,6 @@ export declare class CentralPaymentsConnectorApi implements ICentralPaymentsConn
55
55
  getACHBankAccountDetail(bankAccountId: string): Promise<FiadoApiResponse<GetExternalBankAccountResponse>>;
56
56
  deleteACHBankAccount(bankAccountId: string): Promise<FiadoApiResponse<null>>;
57
57
  verifyACHBankAccount(bankAccountId: string, request: any): Promise<FiadoApiResponse<GetExternalBankAccountResponse>>;
58
+ /** MERCHANT LOCATIONS **/
59
+ getMerchantLocations(params: GetMerchantLocationsQueryParams): Promise<FiadoApiResponse<GetMerchantLocationsResponse>>;
58
60
  }
@@ -191,6 +191,11 @@ let CentralPaymentsConnectorApi = class CentralPaymentsConnectorApi {
191
191
  // TODO FALTA DEFINIR EL BODY
192
192
  return await this.httpRequest.put(url, request);
193
193
  }
194
+ /** MERCHANT LOCATIONS **/
195
+ async getMerchantLocations(params) {
196
+ const url = `${this.baseUrl}/merchants/locations?${this._invokerUtils.toQueryStringParameters(params)}`;
197
+ return await this.httpRequest.get(url);
198
+ }
194
199
  };
195
200
  exports.CentralPaymentsConnectorApi = CentralPaymentsConnectorApi;
196
201
  exports.CentralPaymentsConnectorApi = CentralPaymentsConnectorApi = __decorate([
@@ -4,7 +4,7 @@ import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiRespo
4
4
  import { CreateExternalBankAccountRequest, CreateExternalBankAccountResponse } from "@fiado/type-kit/bin/bankAccount";
5
5
  import GetExternalBankAccountResponse from "@fiado/type-kit/bin/bankAccount/dtos/GetExternalBankAccountResponse";
6
6
  import { ActivateBankAccountCardRequest, ActivateBankAccountCardResponse, CardBatchRequest, CardBatchResponse, CardStatementListResponse, CreateBankAccountCardRequest, CreateBankAccountCardResponse, GetBankAccountCardBalanceResponse, GetBankAccountCardResponse, ReplaceBankAccountCardRequest, ReplaceBankAccountCardResponse, StatementDocumentResponse, UpdateBankAccountCardRequest, UpdateBankAccountCardResponse } from "@fiado/type-kit/bin/card";
7
- import { HealthcheckResponse, OOWQuestionsResponse, SubmitOOWQuestionAnswersRequest } from "@fiado/type-kit/bin/centralPayments";
7
+ import { GetMerchantLocationsQueryParams, GetMerchantLocationsResponse, HealthcheckResponse, OOWQuestionsResponse, SubmitOOWQuestionAnswersRequest } from "@fiado/type-kit/bin/centralPayments";
8
8
  import { ProviderDocumentUploadRequest, ProviderDocumentUploadResponse } from "@fiado/type-kit/bin/provider";
9
9
  import { CentralPaymentsQueryParams, CentralPaymentsTransactionItem, ProviderTransactionCompletionRequest, ProviderTransactionCompletionResponse, ProviderTransactionReversalRequest, ProviderTransactionReversalResponse, TransactionListResponse } from "@fiado/type-kit/bin/transaction";
10
10
  export interface ICentralPaymentsConnectorApi {
@@ -48,4 +48,5 @@ export interface ICentralPaymentsConnectorApi {
48
48
  getACHBankAccountDetail(bankAccountId: string): Promise<FiadoApiResponse<GetExternalBankAccountResponse>>;
49
49
  deleteACHBankAccount(bankAccountId: string): Promise<FiadoApiResponse<null>>;
50
50
  verifyACHBankAccount(bankAccountId: string, request: any): Promise<FiadoApiResponse<GetExternalBankAccountResponse>>;
51
+ getMerchantLocations(params: GetMerchantLocationsQueryParams): Promise<FiadoApiResponse<GetMerchantLocationsResponse>>;
51
52
  }
@@ -0,0 +1,9 @@
1
+ import { IHttpRequest } from "@fiado/http-client";
2
+ import { IOrderCollectorApi } from './interfaces/IOrderCollectorApi';
3
+ import { CollectionOrderBusiness } from '@fiado/type-kit/bin/collector/dtos/CollectionOrderBusiness';
4
+ export declare class OrderCollectorApi implements IOrderCollectorApi {
5
+ private httpRequest;
6
+ private readonly baseUrl;
7
+ constructor(httpRequest: IHttpRequest);
8
+ executeOrder(object: CollectionOrderBusiness[]): Promise<any>;
9
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ var __importDefault = (this && this.__importDefault) || function (mod) {
15
+ return (mod && mod.__esModule) ? mod : { "default": mod };
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.OrderCollectorApi = void 0;
19
+ const dotenv_1 = __importDefault(require("dotenv"));
20
+ const inversify_1 = require("inversify");
21
+ dotenv_1.default.config();
22
+ let OrderCollectorApi = class OrderCollectorApi {
23
+ constructor(httpRequest) {
24
+ this.httpRequest = httpRequest;
25
+ this.baseUrl = process.env.COLLECTOR_LAMBDA_URL || "";
26
+ }
27
+ async executeOrder(object) {
28
+ const url = `${this.baseUrl}order-collector/executeOrder`;
29
+ return await this.httpRequest.post(url, object);
30
+ }
31
+ };
32
+ exports.OrderCollectorApi = OrderCollectorApi;
33
+ exports.OrderCollectorApi = OrderCollectorApi = __decorate([
34
+ (0, inversify_1.injectable)(),
35
+ __param(0, (0, inversify_1.inject)("IHttpRequest")),
36
+ __metadata("design:paramtypes", [Object])
37
+ ], OrderCollectorApi);
@@ -0,0 +1,2 @@
1
+ export * from './interfaces/IOrderCollectorApi';
2
+ export * from './OrderCollectorApi';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./interfaces/IOrderCollectorApi"), exports);
18
+ __exportStar(require("./OrderCollectorApi"), exports);
@@ -0,0 +1,7 @@
1
+ import { CollectionOrderBusiness } from '@fiado/type-kit/bin/collector/dtos/CollectionOrderBusiness';
2
+ /**
3
+ * Interfaz para el servicio Contract Generator.
4
+ */
5
+ export interface IOrderCollectorApi {
6
+ executeOrder(object: CollectionOrderBusiness[]): Promise<any>;
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "1.3.40",
3
+ "version": "1.3.42",
4
4
  "description": "Sirve como un puente entre diferentes funciones lambda, facilitando la comunicación entre ellas a través de invocaciones http",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -16,7 +16,7 @@
16
16
  "@fiado/gateway-adapter": "^1.1.43",
17
17
  "@fiado/http-client": "^1.0.5",
18
18
  "@fiado/logger": "^1.0.3",
19
- "@fiado/type-kit": "^1.9.61",
19
+ "@fiado/type-kit": "^1.9.76",
20
20
  "dotenv": "^16.4.7",
21
21
  "inversify": "^6.2.2",
22
22
  "reflect-metadata": "^0.2.2"
@@ -35,6 +35,7 @@ import {
35
35
  UpdateBankAccountCardResponse
36
36
  } from "@fiado/type-kit/bin/card";
37
37
  import {
38
+ GetMerchantLocationsQueryParams, GetMerchantLocationsResponse,
38
39
  HealthcheckResponse,
39
40
  OOWQuestionsResponse,
40
41
  SubmitOOWQuestionAnswersRequest
@@ -273,4 +274,10 @@ export class CentralPaymentsConnectorApi implements ICentralPaymentsConnectorApi
273
274
  // TODO FALTA DEFINIR EL BODY
274
275
  return await this.httpRequest.put(url, request);
275
276
  }
277
+
278
+ /** MERCHANT LOCATIONS **/
279
+ async getMerchantLocations(params: GetMerchantLocationsQueryParams): Promise<FiadoApiResponse<GetMerchantLocationsResponse>> {
280
+ const url = `${this.baseUrl}/merchants/locations?${this._invokerUtils.toQueryStringParameters(params)}`;
281
+ return await this.httpRequest.get(url);
282
+ }
276
283
  }
@@ -34,6 +34,7 @@ import {
34
34
  UpdateBankAccountCardResponse
35
35
  } from "@fiado/type-kit/bin/card";
36
36
  import {
37
+ GetMerchantLocationsQueryParams, GetMerchantLocationsResponse,
37
38
  HealthcheckResponse,
38
39
  OOWQuestionsResponse,
39
40
  SubmitOOWQuestionAnswersRequest
@@ -129,4 +130,6 @@ export interface ICentralPaymentsConnectorApi {
129
130
  deleteACHBankAccount(bankAccountId: string): Promise<FiadoApiResponse<null>>;
130
131
 
131
132
  verifyACHBankAccount(bankAccountId: string, request: any): Promise<FiadoApiResponse<GetExternalBankAccountResponse>>;
133
+
134
+ getMerchantLocations(params: GetMerchantLocationsQueryParams): Promise<FiadoApiResponse<GetMerchantLocationsResponse>>;
132
135
  }
@@ -0,0 +1,20 @@
1
+ import dotenv from 'dotenv';
2
+ import { inject, injectable } from "inversify";
3
+ import { IHttpRequest } from "@fiado/http-client";
4
+ import { IOrderCollectorApi } from './interfaces/IOrderCollectorApi';
5
+ import { CollectionOrderBusiness } from '@fiado/type-kit/bin/collector/dtos/CollectionOrderBusiness';
6
+
7
+ dotenv.config();
8
+
9
+ @injectable()
10
+ export class OrderCollectorApi implements IOrderCollectorApi {
11
+
12
+ private readonly baseUrl = process.env.COLLECTOR_LAMBDA_URL || "";
13
+
14
+ constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) { }
15
+
16
+ async executeOrder(object: CollectionOrderBusiness[]): Promise<any> {
17
+ const url = `${this.baseUrl}order-collector/executeOrder`;
18
+ return await this.httpRequest.post(url, object);
19
+ }
20
+ }
@@ -0,0 +1,3 @@
1
+
2
+ export * from './interfaces/IOrderCollectorApi';
3
+ export * from './OrderCollectorApi';
@@ -0,0 +1,10 @@
1
+ import { CollectionOrderBusiness } from '@fiado/type-kit/bin/collector/dtos/CollectionOrderBusiness';
2
+
3
+ /**
4
+ * Interfaz para el servicio Contract Generator.
5
+ */
6
+ export interface IOrderCollectorApi {
7
+
8
+ executeOrder(object: CollectionOrderBusiness[]): Promise<any>;
9
+
10
+ }
@@ -1,46 +0,0 @@
1
- import { ChangePasswordRequest, GetUserRequest, GetUserResponse, RefreshTokenRequest, RefreshTokenResponse, RespondToAuthChallengeRequest, SetPasswordRequest, SignInRequest, SignInResponse, SignUpConfirmRequest, SignUpRequest, SignUpResponse } from "@fiado/type-kit/bin/cognitoConnector";
2
- export interface ICognitoApi {
3
- /**
4
- * Healthcheck for the cognito-connector
5
- */
6
- healthcheck(): Promise<HealthcheckResponse>;
7
- /**
8
- * Create a new user in Cognito
9
- */
10
- signUp(request: SignUpRequest): Promise<SignUpResponse>;
11
- /**
12
- * Confirm sign-up for a user in Cognito
13
- */
14
- signUpConfirm(request: SignUpConfirmRequest): Promise<void>;
15
- /**
16
- * Sign in a user
17
- */
18
- signIn(request: SignInRequest): Promise<SignInResponse>;
19
- /**
20
- * Sign out a user
21
- */
22
- signOut(): Promise<void>;
23
- /**
24
- * Change a user's password
25
- */
26
- changePassword(request: ChangePasswordRequest): Promise<void>;
27
- /**
28
- * Retrieve user details
29
- */
30
- getUser(request: GetUserRequest): Promise<GetUserResponse>;
31
- /**
32
- * Refresh a user's tokens
33
- */
34
- refreshToken(request: RefreshTokenRequest): Promise<RefreshTokenResponse>;
35
- /**
36
- * Respond to an auth challenge
37
- */
38
- respondToAuthChallenge(request: RespondToAuthChallengeRequest): Promise<any>;
39
- /**
40
- * Reset a user's password
41
- */
42
- resetPassword(request: SetPasswordRequest): Promise<void>;
43
- }
44
- export interface HealthcheckResponse {
45
- status: string;
46
- }