@fiado/api-invoker 5.64.0 → 5.66.0

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.
@@ -7,4 +7,5 @@ export declare class LegalDocumentApi implements ILegalDocumentApi {
7
7
  getPendingSign(directoryId: string): Promise<any>;
8
8
  getDirectoryAcceptanceByDirectoryId(directoryId: string): Promise<any>;
9
9
  getDocumentByType(type: string): Promise<any>;
10
+ getAllDocuments(): Promise<any>;
10
11
  }
@@ -38,6 +38,10 @@ let LegalDocumentApi = class LegalDocumentApi {
38
38
  const url = `${this.baseUrl}documents/types/${encodeURIComponent(type)}`;
39
39
  return await this.httpRequest.get(url);
40
40
  }
41
+ async getAllDocuments() {
42
+ const url = `${this.baseUrl}documents`;
43
+ return await this.httpRequest.get(url);
44
+ }
41
45
  };
42
46
  LegalDocumentApi = __decorate([
43
47
  injectable(),
@@ -6,4 +6,10 @@ export interface ILegalDocumentApi {
6
6
  * Devuelve el documento con su URL firmada y el vencimiento de esa URL.
7
7
  */
8
8
  getDocumentByType(type: string): Promise<any>;
9
+ /**
10
+ * Todos los documentos legales ACTIVOS con su `order` de despliegue.
11
+ * `LegalDocument_GT` es la fuente de verdad del orden; usar este método en vez
12
+ * del catálogo AppSelectionData cuando se necesita ordenar documentos.
13
+ */
14
+ getAllDocuments(): Promise<any>;
9
15
  }
@@ -1,5 +1,5 @@
1
- import { IHttpRequest } from "@fiado/http-client";
2
- import { IOnboardingBusinessApi } from "./interfaces/IOnboardingBusinessApi.js";
1
+ import type { IHttpRequest } from "@fiado/http-client";
2
+ import type { IOnboardingBusinessApi } from "./interfaces/IOnboardingBusinessApi.js";
3
3
  export default class OnboardingBusinessApi implements IOnboardingBusinessApi {
4
4
  private httpRequest;
5
5
  private readonly baseUrl;
@@ -27,4 +27,8 @@ export default class OnboardingBusinessApi implements IOnboardingBusinessApi {
27
27
  getBatchByIds(ids: string[]): Promise<any>;
28
28
  tagsSummary(): Promise<any>;
29
29
  tagsByDirectories(directoryIds: string[]): Promise<any>;
30
+ assignTag(params: {
31
+ directoryId: string;
32
+ tag: string;
33
+ }): Promise<any>;
30
34
  }
@@ -101,6 +101,10 @@ let OnboardingBusinessApi = class OnboardingBusinessApi {
101
101
  const url = `${this.baseUrl}private/tags/by-directories`;
102
102
  return await this.httpRequest.post(`${url}`, { directoryIds });
103
103
  }
104
+ async assignTag(params) {
105
+ const url = `${this.baseUrl}private/tags`;
106
+ return await this.httpRequest.post(`${url}`, { directoryId: params.directoryId, tag: params.tag });
107
+ }
104
108
  };
105
109
  OnboardingBusinessApi = __decorate([
106
110
  injectable(),
@@ -24,4 +24,9 @@ export interface IOnboardingBusinessApi {
24
24
  tagsSummary(): Promise<any>;
25
25
  /** Dashboard Ops Segmentos — tags por usuario para un batch de directoryIds (TagsByDirectoriesResponse en data). */
26
26
  tagsByDirectories(directoryIds: string[]): Promise<any>;
27
+ /** Asigna un tag a un directoryId. Idempotente: si ya estaba responde 200 con alreadyAssigned true. */
28
+ assignTag(params: {
29
+ directoryId: string;
30
+ tag: string;
31
+ }): Promise<any>;
27
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "5.64.0",
3
+ "version": "5.66.0",
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
  "type": "module",
6
6
  "main": "bin/index.js",
@@ -45,5 +45,12 @@ export class LegalDocumentApi implements ILegalDocumentApi {
45
45
 
46
46
  return await this.httpRequest.get<any>(url);
47
47
  }
48
+
49
+ async getAllDocuments(): Promise<any> {
50
+
51
+ const url = `${this.baseUrl}documents`;
52
+
53
+ return await this.httpRequest.get<any>(url);
54
+ }
48
55
  }
49
56
 
@@ -11,4 +11,11 @@ export interface ILegalDocumentApi {
11
11
  */
12
12
  getDocumentByType(type: string): Promise<any>;
13
13
 
14
+ /**
15
+ * Todos los documentos legales ACTIVOS con su `order` de despliegue.
16
+ * `LegalDocument_GT` es la fuente de verdad del orden; usar este método en vez
17
+ * del catálogo AppSelectionData cuando se necesita ordenar documentos.
18
+ */
19
+ getAllDocuments(): Promise<any>;
20
+
14
21
  }
@@ -1,6 +1,6 @@
1
1
  import { inject, injectable } from "inversify";
2
- import { IHttpRequest } from "@fiado/http-client";
3
- import { IOnboardingBusinessApi } from "./interfaces/IOnboardingBusinessApi.js";
2
+ import type { IHttpRequest } from "@fiado/http-client";
3
+ import type { IOnboardingBusinessApi } from "./interfaces/IOnboardingBusinessApi.js";
4
4
 
5
5
 
6
6
  @injectable()
@@ -101,6 +101,11 @@ export default class OnboardingBusinessApi implements IOnboardingBusinessApi {
101
101
  return await this.httpRequest.post(`${url}`, { directoryIds });
102
102
  }
103
103
 
104
+ async assignTag(params: { directoryId: string; tag: string }): Promise<any> {
105
+ const url = `${this.baseUrl}private/tags`;
106
+ return await this.httpRequest.post(`${url}`, { directoryId: params.directoryId, tag: params.tag });
107
+ }
108
+
104
109
  }
105
110
 
106
111
 
@@ -12,4 +12,6 @@ export interface IOnboardingBusinessApi {
12
12
  tagsSummary(): Promise<any>
13
13
  /** Dashboard Ops Segmentos — tags por usuario para un batch de directoryIds (TagsByDirectoriesResponse en data). */
14
14
  tagsByDirectories(directoryIds: string[]): Promise<any>
15
+ /** Asigna un tag a un directoryId. Idempotente: si ya estaba responde 200 con alreadyAssigned true. */
16
+ assignTag(params: { directoryId: string; tag: string }): Promise<any>
15
17
  }