@fiado/api-invoker 1.1.42 → 1.1.43

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.
@@ -0,0 +1,9 @@
1
+ import { ContactInfoCreateRequest } from "@fiado/type-kit/bin/contactInfo";
2
+ import { IContactInformationApi } from "./interface/IContactInformationApi";
3
+ import { IHttpRequest } from "@fiado/http-client";
4
+ export declare class ContactInformationApi implements IContactInformationApi {
5
+ private httpRequest;
6
+ private readonly baseUrl;
7
+ constructor(httpRequest: IHttpRequest);
8
+ create(input: ContactInfoCreateRequest): Promise<void>;
9
+ }
@@ -0,0 +1,31 @@
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
+ exports.ContactInformationApi = void 0;
16
+ const inversify_1 = require("inversify");
17
+ let ContactInformationApi = class ContactInformationApi {
18
+ constructor(httpRequest) {
19
+ this.httpRequest = httpRequest;
20
+ this.baseUrl = process.env.CONTACT_INFORMATION_LAMBDA || "";
21
+ }
22
+ async create(input) {
23
+ const url = `${this.baseUrl}`;
24
+ return await this.httpRequest.post(`${url}`, input);
25
+ }
26
+ };
27
+ exports.ContactInformationApi = ContactInformationApi;
28
+ exports.ContactInformationApi = ContactInformationApi = __decorate([
29
+ __param(0, (0, inversify_1.inject)("IHttpRequest")),
30
+ __metadata("design:paramtypes", [Object])
31
+ ], ContactInformationApi);
@@ -0,0 +1,2 @@
1
+ export * from './interface/IContactInformationApi';
2
+ export * from './ContactInformationApi';
@@ -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("./interface/IContactInformationApi"), exports);
18
+ __exportStar(require("./ContactInformationApi"), exports);
@@ -0,0 +1,4 @@
1
+ import { ContactInfoCreateRequest } from "@fiado/type-kit/bin/contactInfo";
2
+ export interface IContactInformationApi {
3
+ create(input: ContactInfoCreateRequest): Promise<void>;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -36,6 +36,7 @@ const TransactionProcessorApi_1 = __importDefault(require("./transactionProcesso
36
36
  const ActivityPublisher_1 = __importDefault(require("./activity-business/queue/ActivityPublisher"));
37
37
  const RiskProfileApi_1 = __importDefault(require("./riskProfile/api/RiskProfileApi"));
38
38
  const riskProfile_1 = require("./riskProfile");
39
+ const contactInformation_1 = require("./contactInformation");
39
40
  exports.apiInvokerBindings = new inversify_1.ContainerModule((bind) => {
40
41
  bind("IDirectoryApi").to(directory_1.DirectoryApi);
41
42
  bind("IIdentityApi").to(identity_1.IdentityApi);
@@ -68,4 +69,5 @@ exports.apiInvokerBindings = new inversify_1.ContainerModule((bind) => {
68
69
  bind("IActivityPublisher").to(ActivityPublisher_1.default);
69
70
  bind("IRiskProfileApi").to(RiskProfileApi_1.default);
70
71
  bind("ITransactionAlarmPublisher").to(riskProfile_1.TransactionAlarmPublisher);
72
+ bind("IContactInformationApi").to(contactInformation_1.ContactInformationApi);
71
73
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "1.1.42",
3
+ "version": "1.1.43",
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",
@@ -0,0 +1,21 @@
1
+ import { ContactInfoCreateRequest } from "@fiado/type-kit/bin/contactInfo";
2
+ import { IContactInformationApi } from "./interface/IContactInformationApi";
3
+ import { IHttpRequest } from "@fiado/http-client";
4
+ import { inject } from "inversify";
5
+
6
+
7
+
8
+
9
+ export class ContactInformationApi implements IContactInformationApi {
10
+
11
+ private readonly baseUrl = process.env.CONTACT_INFORMATION_LAMBDA || "";
12
+
13
+ constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) { }
14
+
15
+
16
+ async create(input: ContactInfoCreateRequest): Promise<void> {
17
+ const url = `${this.baseUrl}`;
18
+ return await this.httpRequest.post(`${url}`, input);
19
+ }
20
+
21
+ }
@@ -0,0 +1,3 @@
1
+
2
+ export * from './interface/IContactInformationApi';
3
+ export * from './ContactInformationApi';
@@ -0,0 +1,9 @@
1
+ import { ContactInfoCreateRequest } from "@fiado/type-kit/bin/contactInfo";
2
+
3
+
4
+
5
+ export interface IContactInformationApi {
6
+
7
+ create(input: ContactInfoCreateRequest): Promise<void>
8
+
9
+ }
@@ -45,6 +45,7 @@ import {ITransactionProcessorApi} from "./transactionProcessor";
45
45
  import ActivityPublisher from "./activity-business/queue/ActivityPublisher";
46
46
  import RiskProfileApi from "./riskProfile/api/RiskProfileApi";
47
47
  import {IRiskProfileApi, ITransactionAlarmPublisher, TransactionAlarmPublisher} from "./riskProfile";
48
+ import { ContactInformationApi, IContactInformationApi } from "./contactInformation";
48
49
 
49
50
  export const apiInvokerBindings = new ContainerModule((bind: interfaces.Bind) => {
50
51
  bind<IDirectoryApi>("IDirectoryApi").to(DirectoryApi);
@@ -78,4 +79,5 @@ export const apiInvokerBindings = new ContainerModule((bind: interfaces.Bind) =>
78
79
  bind<IActivityPublisher>("IActivityPublisher").to(ActivityPublisher);
79
80
  bind<IRiskProfileApi>("IRiskProfileApi").to(RiskProfileApi);
80
81
  bind<ITransactionAlarmPublisher>("ITransactionAlarmPublisher").to(TransactionAlarmPublisher);
82
+ bind<IContactInformationApi>("IContactInformationApi").to(ContactInformationApi);
81
83
  });