@fiado/api-invoker 1.0.42 → 1.0.44

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.
@@ -16,10 +16,12 @@ const AccountPagoConfiadoApi_1 = __importDefault(require("./account-pagoconfiado
16
16
  const AccountFiadoSAApi_1 = __importDefault(require("./account-fiadosa/AccountFiadoSAApi"));
17
17
  const STPAccountApi_1 = __importDefault(require("./stpAccount/api/STPAccountApi"));
18
18
  const sessionActivity_1 = require("./sessionActivity");
19
+ const ExchangeRatesApi_1 = __importDefault(require("./exchangeRates/ExchangeRatesApi"));
19
20
  exports.apiInvokerBindings = new inversify_1.ContainerModule((bind) => {
20
21
  bind("IDirectoryApi").to(directory_1.DirectoryApi);
21
22
  bind("IIdentityApi").to(identity_1.IdentityApi);
22
23
  bind("IAddressApi").to(address_1.AddressApi);
24
+ bind("IExchangeRatesApi").to(ExchangeRatesApi_1.default);
23
25
  bind("ITernApi").to(TernApi_1.default);
24
26
  bind("IPomeloApi").to(PomeloApi_1.default);
25
27
  bind("ISTPAccountApi").to(STPAccountApi_1.default);
@@ -0,0 +1,9 @@
1
+ import { IExchangeRatesApi } from "./interfaces/IExchangeRatesApi";
2
+ import { IHttpRequest } from "@fiado/http-client";
3
+ import GetExchangeRatesRequest from "@fiado/type-kit/bin/exchangeRate/dtos/GetExchangeRatesRequest";
4
+ export default class ExchangeRatesApi implements IExchangeRatesApi {
5
+ private httpRequest;
6
+ private readonly baseUrl;
7
+ constructor(httpRequest: IHttpRequest);
8
+ getExchangeRates(request: GetExchangeRatesRequest): Promise<any>;
9
+ }
@@ -0,0 +1,33 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ const inversify_1 = require("inversify");
16
+ let ExchangeRatesApi = class ExchangeRatesApi {
17
+ constructor(httpRequest) {
18
+ this.httpRequest = httpRequest;
19
+ this.baseUrl = process.env.EXCHANGE_RATES_LAMBDA_URL || "";
20
+ }
21
+ async getExchangeRates(request) {
22
+ const headers = {
23
+ "operationName": "getExchangeRates"
24
+ };
25
+ return await this.httpRequest.post(this.baseUrl, request, headers);
26
+ }
27
+ };
28
+ ExchangeRatesApi = __decorate([
29
+ (0, inversify_1.injectable)(),
30
+ __param(0, (0, inversify_1.inject)("IHttpRequest")),
31
+ __metadata("design:paramtypes", [Object])
32
+ ], ExchangeRatesApi);
33
+ exports.default = ExchangeRatesApi;
@@ -0,0 +1,2 @@
1
+ export * from './interfaces/IExchangeRatesApi';
2
+ export * from './ExchangeRatesApi';
@@ -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/IExchangeRatesApi"), exports);
18
+ __exportStar(require("./ExchangeRatesApi"), exports);
@@ -0,0 +1,4 @@
1
+ import GetExchangeRatesRequest from "@fiado/type-kit/bin/exchangeRate/dtos/GetExchangeRatesRequest";
2
+ export interface IExchangeRatesApi {
3
+ getExchangeRates(request: GetExchangeRatesRequest): Promise<any>;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/bin/index.d.ts CHANGED
@@ -10,3 +10,4 @@ export * from "./container.config";
10
10
  export * from "./account-fiadoinc";
11
11
  export * from "./account-fiadosa";
12
12
  export * from "./account-pagoconfiado";
13
+ export * from "./exchangeRates";
package/bin/index.js CHANGED
@@ -26,3 +26,4 @@ __exportStar(require("./container.config"), exports);
26
26
  __exportStar(require("./account-fiadoinc"), exports);
27
27
  __exportStar(require("./account-fiadosa"), exports);
28
28
  __exportStar(require("./account-pagoconfiado"), exports);
29
+ __exportStar(require("./exchangeRates"), exports);
@@ -1,5 +1,5 @@
1
1
  import { CreateBankAccountRequest, CreateBankAccountUserRequest, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
2
- import { UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card";
2
+ import { CreateBankAccountCardShippingRequest, GetBankAccountShippingRequest, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card";
3
3
  export interface IPomeloApi {
4
4
  updateUser(object: UpdateBankAccountUserRequest): Promise<any>;
5
5
  getUserById(externalUserId: string): Promise<any>;
@@ -11,4 +11,6 @@ export interface IPomeloApi {
11
11
  blockCard(object: UpdateBankAccountCardRequest): Promise<any>;
12
12
  changePin(object: UpdateBankAccountCardRequest): Promise<any>;
13
13
  activateCard(object: UpdateBankAccountCardRequest): Promise<any>;
14
+ createShipment(object: CreateBankAccountCardShippingRequest): Promise<any>;
15
+ getShipment(object: GetBankAccountShippingRequest): Promise<any>;
14
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "1.0.42",
3
+ "version": "1.0.44",
4
4
  "description": "Sirve como un puente entre diferentes funciones lambda, facilitando la comunicación entre ellas a traves de invocaciones http",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -16,7 +16,7 @@
16
16
  "@fiado/api-invoker": "^1.0.19",
17
17
  "@fiado/gateway-adapter": "^1.0.30",
18
18
  "@fiado/http-client": "^1.0.1",
19
- "@fiado/type-kit": "^1.0.79",
19
+ "@fiado/type-kit": "^1.0.89",
20
20
  "dotenv": "^16.4.5",
21
21
  "inversify": "^6.0.2",
22
22
  "reflect-metadata": "^0.2.1",
@@ -14,14 +14,17 @@ import {IAccountPagoConfiadoApi} from "./account-pagoconfiado";
14
14
  import AccountPagoConfiadoApi from "./account-pagoconfiado/AccountPagoConfiadoApi";
15
15
  import {IAccountFiadoSAApi} from "./account-fiadosa";
16
16
  import AccountFiadoSAApi from "./account-fiadosa/AccountFiadoSAApi";
17
- import { ISTPAccountApi } from "./stpAccount";
17
+ import {ISTPAccountApi} from "./stpAccount";
18
18
  import STPAccountApi from "./stpAccount/api/STPAccountApi";
19
- import { ISessionActivityPublisher, SessionActivityPublisher } from "./sessionActivity";
19
+ import {ISessionActivityPublisher, SessionActivityPublisher} from "./sessionActivity";
20
+ import {IExchangeRatesApi} from "./exchangeRates";
21
+ import ExchangeRatesApi from "./exchangeRates/ExchangeRatesApi";
20
22
 
21
23
  export const apiInvokerBindings = new ContainerModule((bind: interfaces.Bind) => {
22
24
  bind<IDirectoryApi>("IDirectoryApi").to(DirectoryApi);
23
25
  bind<IIdentityApi>("IIdentityApi").to(IdentityApi);
24
26
  bind<IAddressApi>("IAddressApi").to(AddressApi);
27
+ bind<IExchangeRatesApi>("IExchangeRatesApi").to(ExchangeRatesApi);
25
28
  bind<ITernApi>("ITernApi").to(TernApi);
26
29
  bind<IPomeloApi>("IPomeloApi").to(PomeloApi);
27
30
  bind<ISTPAccountApi>("ISTPAccountApi").to(STPAccountApi);
@@ -0,0 +1,19 @@
1
+ import {IExchangeRatesApi} from "./interfaces/IExchangeRatesApi";
2
+ import {inject, injectable} from "inversify";
3
+ import {IHttpRequest} from "@fiado/http-client";
4
+ import GetExchangeRatesRequest from "@fiado/type-kit/bin/exchangeRate/dtos/GetExchangeRatesRequest";
5
+
6
+ @injectable()
7
+ export default class ExchangeRatesApi implements IExchangeRatesApi {
8
+ private readonly baseUrl = process.env.EXCHANGE_RATES_LAMBDA_URL || "";
9
+
10
+ constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
11
+ }
12
+
13
+ async getExchangeRates(request: GetExchangeRatesRequest): Promise<any> {
14
+ const headers = {
15
+ "operationName": "getExchangeRates"
16
+ }
17
+ return await this.httpRequest.post(this.baseUrl, request, headers);
18
+ }
19
+ }
@@ -0,0 +1,2 @@
1
+ export * from './interfaces/IExchangeRatesApi';
2
+ export * from './ExchangeRatesApi';
@@ -0,0 +1,6 @@
1
+ import GetExchangeRatesRequest from "@fiado/type-kit/bin/exchangeRate/dtos/GetExchangeRatesRequest";
2
+
3
+
4
+ export interface IExchangeRatesApi {
5
+ getExchangeRates(request: GetExchangeRatesRequest): Promise<any>;
6
+ }
package/src/index.ts CHANGED
@@ -10,6 +10,7 @@ export * from "./container.config";
10
10
  export * from "./account-fiadoinc";
11
11
  export * from "./account-fiadosa";
12
12
  export * from "./account-pagoconfiado";
13
+ export * from "./exchangeRates";
13
14
 
14
15
 
15
16
 
@@ -1,5 +1,5 @@
1
1
  import {CreateBankAccountRequest, CreateBankAccountUserRequest, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
2
- import { UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card";
2
+ import { CreateBankAccountCardShippingRequest, GetBankAccountShippingRequest, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card";
3
3
 
4
4
  export interface IPomeloApi {
5
5
 
@@ -17,4 +17,12 @@ export interface IPomeloApi {
17
17
  changePin(object: UpdateBankAccountCardRequest): Promise<any>
18
18
  activateCard(object: UpdateBankAccountCardRequest): Promise<any>
19
19
 
20
+
21
+ // //Shipping
22
+
23
+ createShipment(object: CreateBankAccountCardShippingRequest): Promise<any>
24
+ getShipment(object: GetBankAccountShippingRequest): Promise<any>
25
+
26
+
27
+
20
28
  }