@fiado/api-invoker 1.2.14 → 1.2.16

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.
@@ -16,4 +16,5 @@ export declare class DirectoryApi implements IDirectoryApi {
16
16
  updateOwnerDirectoryId(directoryId: string, newOwnerDirectoryId: any): Promise<any>;
17
17
  updateUserProfile(directoryId: string, profile: Profile): Promise<void>;
18
18
  updateStatus(directoryId: string, status: Status): Promise<void>;
19
+ getByPeopleId(peopleId: string): Promise<any>;
19
20
  }
@@ -100,6 +100,11 @@ let DirectoryApi = class DirectoryApi {
100
100
  };
101
101
  await this.httpRequest.post(`${url}`, body, { 'operationName': operationName });
102
102
  }
103
+ async getByPeopleId(peopleId) {
104
+ const url = `${this.baseUrl}?peopleId=${peopleId}`;
105
+ const operationName = "getUserInfoByParams";
106
+ return await this.httpRequest.post(`${url}`, null, { 'operationName': operationName });
107
+ }
103
108
  };
104
109
  exports.DirectoryApi = DirectoryApi;
105
110
  exports.DirectoryApi = DirectoryApi = __decorate([
@@ -50,4 +50,5 @@ export interface IDirectoryApi {
50
50
  updateUserProfile(directoryId: string, profile: Profile): Promise<void>;
51
51
  updateOwnerDirectoryId(directoryId: string, newOwnerDirectoryId: any): Promise<any>;
52
52
  updateStatus(directoryId: string, status: Status): Promise<void>;
53
+ getByPeopleId(peopleId: string): Promise<any>;
53
54
  }
@@ -10,4 +10,5 @@ export declare class IdentityApi implements IIdentityApi {
10
10
  updatePeopleById(id: string, data: PeopleUpdateRequest): Promise<void>;
11
11
  getProfilePicture(directoryId: string): Promise<any>;
12
12
  privateUploadDocument(directoryId: string, document: UploadDocumentRequest): Promise<any>;
13
+ getPeopleByFullName(fullName: string): Promise<any>;
13
14
  }
@@ -61,6 +61,13 @@ let IdentityApi = class IdentityApi {
61
61
  const url = `${this.baseUrl}/documents/${directoryId}/upload`;
62
62
  return await this.httpRequest.post(url, document);
63
63
  }
64
+ async getPeopleByFullName(fullName) {
65
+ if (!fullName) {
66
+ throw new Error("Full name is required.");
67
+ }
68
+ const url = `${this.baseUrl}identities/people/search?fullName=${fullName}`;
69
+ return await this.httpRequest.get(url);
70
+ }
64
71
  };
65
72
  exports.IdentityApi = IdentityApi;
66
73
  exports.IdentityApi = IdentityApi = __decorate([
@@ -28,4 +28,5 @@ export interface IIdentityApi {
28
28
  getProfilePicture(directoryId: string): Promise<any>;
29
29
  getPeopleByCurp(curp: string): Promise<any>;
30
30
  privateUploadDocument(directoryId: string, document: UploadDocumentRequest): Promise<any>;
31
+ getPeopleByFullName(fullName: string): Promise<any>;
31
32
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "1.2.14",
4
- "description": "Sirve como un puente entre diferentes funciones lambda, facilitando la comunicación entre ellas a traves de invocaciones http",
3
+ "version": "1.2.16",
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",
7
7
  "scripts": {
@@ -125,4 +125,12 @@ export class DirectoryApi implements IDirectoryApi {
125
125
 
126
126
  await this.httpRequest.post(`${url}`, body, { 'operationName': operationName });
127
127
  }
128
+
129
+ public async getByPeopleId(peopleId: string): Promise<any> {
130
+
131
+ const url = `${this.baseUrl}?peopleId=${peopleId}`;
132
+ const operationName = "getUserInfoByParams";
133
+
134
+ return await this.httpRequest.post(`${url}`, null, { 'operationName': operationName });
135
+ }
128
136
  }
@@ -60,4 +60,6 @@ export interface IDirectoryApi {
60
60
  updateOwnerDirectoryId(directoryId: string, newOwnerDirectoryId): Promise<any>
61
61
 
62
62
  updateStatus(directoryId: string, status: Status): Promise<void>
63
+
64
+ getByPeopleId(peopleId: string): Promise<any>;
63
65
  }
@@ -68,4 +68,12 @@ export class IdentityApi implements IIdentityApi {
68
68
  const url = `${this.baseUrl}/documents/${directoryId}/upload`;
69
69
  return await this.httpRequest.post(url, document);
70
70
  }
71
+
72
+ async getPeopleByFullName(fullName: string): Promise<any> {
73
+ if (!fullName) {
74
+ throw new Error("Full name is required.")
75
+ }
76
+ const url = `${this.baseUrl}identities/people/search?fullName=${fullName}`;
77
+ return await this.httpRequest.get(url);
78
+ }
71
79
  }
@@ -33,4 +33,6 @@ export interface IIdentityApi {
33
33
  getPeopleByCurp(curp: string): Promise<any>;
34
34
 
35
35
  privateUploadDocument(directoryId: string, document: UploadDocumentRequest): Promise<any>;
36
+
37
+ getPeopleByFullName(fullName: string): Promise<any>
36
38
  }