@fiado/api-invoker 3.0.36 → 3.0.38

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.
@@ -4,7 +4,8 @@ export default class ContractBusinessApi implements IContractBusinessApi {
4
4
  private httpRequest;
5
5
  private readonly baseUrl;
6
6
  constructor(httpRequest: IHttpRequest);
7
- signDomiciliation(params: {
7
+ signDocument(params: {
8
+ documentType: string;
8
9
  directoryId: string;
9
10
  peopleId: string;
10
11
  folio: string;
@@ -18,8 +18,9 @@ let ContractBusinessApi = class ContractBusinessApi {
18
18
  this.httpRequest = httpRequest;
19
19
  this.baseUrl = process.env.CONTRACT_BUSINESS_LAMBDA_URL || "";
20
20
  }
21
- async signDomiciliation(params) {
22
- return await this.httpRequest.post(`${this.baseUrl}domiciliation/sign`, params);
21
+ async signDocument(params) {
22
+ const { documentType, ...body } = params;
23
+ return await this.httpRequest.post(`${this.baseUrl}/sign/${documentType}`, body);
23
24
  }
24
25
  };
25
26
  ContractBusinessApi = __decorate([
@@ -1,5 +1,6 @@
1
1
  export interface IContractBusinessApi {
2
- signDomiciliation(params: {
2
+ signDocument(params: {
3
+ documentType: string;
3
4
  directoryId: string;
4
5
  peopleId: string;
5
6
  folio: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "3.0.36",
3
+ "version": "3.0.38",
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.1.4",
19
+ "@fiado/type-kit": "^3.1.8",
20
20
  "dotenv": "^16.4.7",
21
21
  "i": "^0.3.7",
22
22
  "inversify": "^6.2.2",
@@ -10,12 +10,14 @@ export default class ContractBusinessApi implements IContractBusinessApi {
10
10
  constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
11
11
  }
12
12
 
13
- async signDomiciliation(params: {
13
+ async signDocument(params: {
14
+ documentType: string;
14
15
  directoryId: string;
15
16
  peopleId: string;
16
17
  folio: string;
17
18
  sessionId: string;
18
19
  }): Promise<any> {
19
- return await this.httpRequest.post(`${this.baseUrl}domiciliation/sign`, params);
20
+ const { documentType, ...body } = params;
21
+ return await this.httpRequest.post(`${this.baseUrl}/sign/${documentType}`, body);
20
22
  }
21
23
  }
@@ -1,5 +1,6 @@
1
1
  export interface IContractBusinessApi {
2
- signDomiciliation(params: {
2
+ signDocument(params: {
3
+ documentType: string;
3
4
  directoryId: string;
4
5
  peopleId: string;
5
6
  folio: string;