@fiado/api-invoker 5.65.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.
@@ -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.65.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",
@@ -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
  }