@fiado/api-invoker 4.50.0 → 4.51.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,6 +1,6 @@
1
1
  import { IIdentityApi } from "./interfaces/IIdentityApi.js";
2
2
  import { LegacyApiResponse } from "./interfaces/LegacyApiResponse.js";
3
- import { IHttpRequest } from "@fiado/http-client";
3
+ import type { IHttpRequest } from "@fiado/http-client";
4
4
  import { PeopleUpdateRequest, UploadDocumentRequest, PeopleResponse, PeopleSelfVerifiedRequest, AgentDocumentKeyResponse, DocumentUploadResponse } from "@fiado/type-kit/bin/identity/index.js";
5
5
  export declare class IdentityApi implements IIdentityApi {
6
6
  private httpRequest;
@@ -18,4 +18,6 @@ export declare class IdentityApi implements IIdentityApi {
18
18
  privateGetLastAgentDocument(directoryId: string): Promise<LegacyApiResponse<AgentDocumentKeyResponse[]>>;
19
19
  privateUploadAgentDocument(directoryId: string, actorDirectoryId: string, document: UploadDocumentRequest): Promise<LegacyApiResponse<DocumentUploadResponse>>;
20
20
  privateUpdatePeopleSelfVerified(directoryId: string, data: PeopleSelfVerifiedRequest): Promise<LegacyApiResponse<unknown>>;
21
+ privateSearchPeople(fullName: string): Promise<LegacyApiResponse<PeopleResponse[]>>;
22
+ privateUpdatePeople(directoryId: string, data: PeopleUpdateRequest): Promise<LegacyApiResponse<unknown>>;
21
23
  }
@@ -109,6 +109,20 @@ let IdentityApi = class IdentityApi {
109
109
  const url = `${this.baseUrl}identities/private/agents/people/${directoryId}/selfverified`;
110
110
  return await this.httpRequest.put(url, data);
111
111
  }
112
+ async privateSearchPeople(fullName) {
113
+ if (!fullName || !fullName.trim()) {
114
+ throw new Error("fullName is required.");
115
+ }
116
+ const url = `${this.baseUrl}identities/people/search?fullName=${encodeURIComponent(fullName)}`;
117
+ return await this.httpRequest.get(url);
118
+ }
119
+ async privateUpdatePeople(directoryId, data) {
120
+ if (!directoryId) {
121
+ throw new Error("Directory ID is required.");
122
+ }
123
+ const url = `${this.baseUrl}identities/private/agents/people/${directoryId}`;
124
+ return await this.httpRequest.put(url, data);
125
+ }
112
126
  };
113
127
  IdentityApi = __decorate([
114
128
  injectable(),
@@ -44,4 +44,8 @@ export interface IIdentityApi {
44
44
  privateUploadAgentDocument(directoryId: string, actorDirectoryId: string, document: UploadDocumentRequest): Promise<LegacyApiResponse<DocumentUploadResponse>>;
45
45
  /** Gemelo private de agentPutPeoplePeopleIdSelfVerified. */
46
46
  privateUpdatePeopleSelfVerified(directoryId: string, data: PeopleSelfVerifiedRequest): Promise<LegacyApiResponse<unknown>>;
47
+ /** Gemelo private de agentGetPeopleSearch (búsqueda por nombre; devuelve lista). */
48
+ privateSearchPeople(fullName: string): Promise<LegacyApiResponse<PeopleResponse[]>>;
49
+ /** Gemelo private de editar persona (PUT sin /selfverified). */
50
+ privateUpdatePeople(directoryId: string, data: PeopleUpdateRequest): Promise<LegacyApiResponse<unknown>>;
47
51
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "4.50.0",
3
+ "version": "4.51.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,7 +1,7 @@
1
1
  import {inject, injectable} from "inversify";
2
2
  import {IIdentityApi} from "./interfaces/IIdentityApi.js";
3
3
  import {LegacyApiResponse} from "./interfaces/LegacyApiResponse.js";
4
- import {IHttpRequest} from "@fiado/http-client";
4
+ import type {IHttpRequest} from "@fiado/http-client";
5
5
  import dotenv from 'dotenv';
6
6
  import {
7
7
  PeopleUpdateRequest, UploadDocumentRequest, PeopleResponse,
@@ -135,4 +135,20 @@ export class IdentityApi implements IIdentityApi {
135
135
  const url = `${this.baseUrl}identities/private/agents/people/${directoryId}/selfverified`;
136
136
  return await this.httpRequest.put<LegacyApiResponse<unknown>>(url, data);
137
137
  }
138
+
139
+ async privateSearchPeople(fullName: string): Promise<LegacyApiResponse<PeopleResponse[]>> {
140
+ if (!fullName || !fullName.trim()) {
141
+ throw new Error("fullName is required.")
142
+ }
143
+ const url = `${this.baseUrl}identities/people/search?fullName=${encodeURIComponent(fullName)}`;
144
+ return await this.httpRequest.get<LegacyApiResponse<PeopleResponse[]>>(url);
145
+ }
146
+
147
+ async privateUpdatePeople(directoryId: string, data: PeopleUpdateRequest): Promise<LegacyApiResponse<unknown>> {
148
+ if (!directoryId) {
149
+ throw new Error("Directory ID is required.")
150
+ }
151
+ const url = `${this.baseUrl}identities/private/agents/people/${directoryId}`;
152
+ return await this.httpRequest.put<LegacyApiResponse<unknown>>(url, data);
153
+ }
138
154
  }
@@ -59,4 +59,8 @@ export interface IIdentityApi {
59
59
  privateUploadAgentDocument(directoryId: string, actorDirectoryId: string, document: UploadDocumentRequest): Promise<LegacyApiResponse<DocumentUploadResponse>>;
60
60
  /** Gemelo private de agentPutPeoplePeopleIdSelfVerified. */
61
61
  privateUpdatePeopleSelfVerified(directoryId: string, data: PeopleSelfVerifiedRequest): Promise<LegacyApiResponse<unknown>>;
62
+ /** Gemelo private de agentGetPeopleSearch (búsqueda por nombre; devuelve lista). */
63
+ privateSearchPeople(fullName: string): Promise<LegacyApiResponse<PeopleResponse[]>>;
64
+ /** Gemelo private de editar persona (PUT sin /selfverified). */
65
+ privateUpdatePeople(directoryId: string, data: PeopleUpdateRequest): Promise<LegacyApiResponse<unknown>>;
62
66
  }