@fiado/api-invoker 3.0.20 → 3.0.22
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.
- package/bin/container.config.js +2 -0
- package/bin/contract-business/api/ContractBusinessApi.d.ts +13 -0
- package/bin/contract-business/api/ContractBusinessApi.js +30 -0
- package/bin/contract-business/api/interfaces/IContractBusinessApi.d.ts +8 -0
- package/bin/contract-business/api/interfaces/IContractBusinessApi.js +2 -0
- package/bin/contract-business/index.d.ts +2 -0
- package/bin/contract-business/index.js +18 -0
- package/bin/index.d.ts +1 -0
- package/bin/index.js +1 -0
- package/package.json +2 -2
- package/src/container.config.ts +3 -0
- package/src/contract-business/api/ContractBusinessApi.ts +21 -0
- package/src/contract-business/api/interfaces/IContractBusinessApi.ts +8 -0
- package/src/contract-business/index.ts +2 -0
- package/src/index.ts +1 -0
package/bin/container.config.js
CHANGED
|
@@ -22,6 +22,7 @@ const authentication_1 = require("./authentication");
|
|
|
22
22
|
const card_1 = require("./card");
|
|
23
23
|
const transaction_1 = require("./transaction");
|
|
24
24
|
const contract_generator_1 = require("./contract-generator");
|
|
25
|
+
const ContractBusinessApi_1 = __importDefault(require("./contract-business/api/ContractBusinessApi"));
|
|
25
26
|
const ProductCatalogApi_1 = __importDefault(require("./product-catalog/ProductCatalogApi"));
|
|
26
27
|
const collector_1 = require("./collector");
|
|
27
28
|
const P2pContactApi_1 = __importDefault(require("./p2pContact/api/P2pContactApi"));
|
|
@@ -111,6 +112,7 @@ exports.apiInvokerBindings = new inversify_1.ContainerModule((bind) => {
|
|
|
111
112
|
bind("IAuthenticationApi").to(authentication_1.AuthenticationApi);
|
|
112
113
|
bind("ICardApi").to(card_1.CardApi);
|
|
113
114
|
bind("IContractGeneratorApi").to(contract_generator_1.ContractGeneratorApi);
|
|
115
|
+
bind("IContractBusinessApi").to(ContractBusinessApi_1.default);
|
|
114
116
|
bind("ICollectorApi").to(collector_1.CollectorApi);
|
|
115
117
|
bind("IProductCatalogApi").to(ProductCatalogApi_1.default);
|
|
116
118
|
bind("IP2pContactApi").to(P2pContactApi_1.default);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IHttpRequest } from "@fiado/http-client";
|
|
2
|
+
import { IContractBusinessApi } from "./interfaces/IContractBusinessApi";
|
|
3
|
+
export default class ContractBusinessApi implements IContractBusinessApi {
|
|
4
|
+
private httpRequest;
|
|
5
|
+
private readonly baseUrl;
|
|
6
|
+
constructor(httpRequest: IHttpRequest);
|
|
7
|
+
signDomiciliation(params: {
|
|
8
|
+
directoryId: string;
|
|
9
|
+
peopleId: string;
|
|
10
|
+
folio: string;
|
|
11
|
+
sessionId: string;
|
|
12
|
+
}): Promise<any>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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 ContractBusinessApi = class ContractBusinessApi {
|
|
17
|
+
constructor(httpRequest) {
|
|
18
|
+
this.httpRequest = httpRequest;
|
|
19
|
+
this.baseUrl = process.env.CONTRACT_BUSINESS_LAMBDA_URL || "";
|
|
20
|
+
}
|
|
21
|
+
async signDomiciliation(params) {
|
|
22
|
+
return await this.httpRequest.post(`${this.baseUrl}domiciliation/sign`, params);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
ContractBusinessApi = __decorate([
|
|
26
|
+
(0, inversify_1.injectable)(),
|
|
27
|
+
__param(0, (0, inversify_1.inject)("IHttpRequest")),
|
|
28
|
+
__metadata("design:paramtypes", [Object])
|
|
29
|
+
], ContractBusinessApi);
|
|
30
|
+
exports.default = ContractBusinessApi;
|
|
@@ -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("./api/ContractBusinessApi"), exports);
|
|
18
|
+
__exportStar(require("./api/interfaces/IContractBusinessApi"), exports);
|
package/bin/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export * from "./exchangeRates";
|
|
|
15
15
|
export * from "./authentication";
|
|
16
16
|
export * from "./transaction";
|
|
17
17
|
export * from "./contract-generator";
|
|
18
|
+
export * from "./contract-business";
|
|
18
19
|
export * from "./product-catalog";
|
|
19
20
|
export * from "./collector";
|
|
20
21
|
export * from "./p2pContact";
|
package/bin/index.js
CHANGED
|
@@ -31,6 +31,7 @@ __exportStar(require("./exchangeRates"), exports);
|
|
|
31
31
|
__exportStar(require("./authentication"), exports);
|
|
32
32
|
__exportStar(require("./transaction"), exports);
|
|
33
33
|
__exportStar(require("./contract-generator"), exports);
|
|
34
|
+
__exportStar(require("./contract-business"), exports);
|
|
34
35
|
__exportStar(require("./product-catalog"), exports);
|
|
35
36
|
__exportStar(require("./collector"), exports);
|
|
36
37
|
__exportStar(require("./p2pContact"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.22",
|
|
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.50",
|
|
17
17
|
"@fiado/http-client": "^1.0.7",
|
|
18
18
|
"@fiado/logger": "^1.0.3",
|
|
19
|
-
"@fiado/type-kit": "^3.0.
|
|
19
|
+
"@fiado/type-kit": "^3.0.24",
|
|
20
20
|
"dotenv": "^16.4.7",
|
|
21
21
|
"inversify": "^6.2.2",
|
|
22
22
|
"reflect-metadata": "^0.2.2"
|
package/src/container.config.ts
CHANGED
|
@@ -23,6 +23,8 @@ import { AuthenticationApi, IAuthenticationApi } from "./authentication";
|
|
|
23
23
|
import { CardApi, ICardApi } from "./card";
|
|
24
24
|
import { ITransactionApi, ITransactionPublisher, TransactionPublisher } from "./transaction";
|
|
25
25
|
import { ContractGeneratorApi, IContractGeneratorApi } from "./contract-generator";
|
|
26
|
+
import { IContractBusinessApi } from "./contract-business";
|
|
27
|
+
import ContractBusinessApi from "./contract-business/api/ContractBusinessApi";
|
|
26
28
|
import { IProductCatalogApi } from "./product-catalog";
|
|
27
29
|
import ProductCatalogApi from "./product-catalog/ProductCatalogApi";
|
|
28
30
|
import { CollectorApi, ICollectorApi } from "./collector";
|
|
@@ -154,6 +156,7 @@ export const apiInvokerBindings = new ContainerModule((bind: interfaces.Bind) =>
|
|
|
154
156
|
bind<IAuthenticationApi>("IAuthenticationApi").to(AuthenticationApi);
|
|
155
157
|
bind<ICardApi>("ICardApi").to(CardApi);
|
|
156
158
|
bind<IContractGeneratorApi>("IContractGeneratorApi").to(ContractGeneratorApi);
|
|
159
|
+
bind<IContractBusinessApi>("IContractBusinessApi").to(ContractBusinessApi);
|
|
157
160
|
bind<ICollectorApi>("ICollectorApi").to(CollectorApi);
|
|
158
161
|
bind<IProductCatalogApi>("IProductCatalogApi").to(ProductCatalogApi);
|
|
159
162
|
bind<IP2pContactApi>("IP2pContactApi").to(P2pContactApi);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { inject, injectable } from "inversify";
|
|
2
|
+
import { IHttpRequest } from "@fiado/http-client";
|
|
3
|
+
import { IContractBusinessApi } from "./interfaces/IContractBusinessApi";
|
|
4
|
+
|
|
5
|
+
@injectable()
|
|
6
|
+
export default class ContractBusinessApi implements IContractBusinessApi {
|
|
7
|
+
|
|
8
|
+
private readonly baseUrl = process.env.CONTRACT_BUSINESS_LAMBDA_URL || "";
|
|
9
|
+
|
|
10
|
+
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async signDomiciliation(params: {
|
|
14
|
+
directoryId: string;
|
|
15
|
+
peopleId: string;
|
|
16
|
+
folio: string;
|
|
17
|
+
sessionId: string;
|
|
18
|
+
}): Promise<any> {
|
|
19
|
+
return await this.httpRequest.post(`${this.baseUrl}domiciliation/sign`, params);
|
|
20
|
+
}
|
|
21
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -15,6 +15,7 @@ export * from "./exchangeRates";
|
|
|
15
15
|
export * from "./authentication";
|
|
16
16
|
export * from "./transaction";
|
|
17
17
|
export * from "./contract-generator";
|
|
18
|
+
export * from "./contract-business";
|
|
18
19
|
export * from "./product-catalog";
|
|
19
20
|
export * from "./collector";
|
|
20
21
|
export * from "./p2pContact";
|