@fiado/api-invoker 1.0.97 → 1.1.1

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.
@@ -12,5 +12,6 @@ export declare class DirectoryApi implements IDirectoryApi {
12
12
  getByOwnerDirectoryId(ownerDirectoryId: string): Promise<any>;
13
13
  getByPhoneNumber(phoneNumber: string): Promise<any>;
14
14
  addOwnerDirectoryId(directoryId: string, newOwnerDirectoryId: any): Promise<any>;
15
+ updateOwnerDirectoryId(directoryId: string, newOwnerDirectoryId: any): Promise<any>;
15
16
  updateUserProfile(directoryId: string, profile: Profile): Promise<void>;
16
17
  }
@@ -70,7 +70,16 @@ let DirectoryApi = class DirectoryApi {
70
70
  directoryId: directoryId,
71
71
  ownerDirectoryId: newOwnerDirectoryId
72
72
  };
73
- return await this.httpRequest.delete(`${url}`, data, { 'operationName': operationName });
73
+ return await this.httpRequest.post(`${url}`, data, { 'operationName': operationName });
74
+ }
75
+ async updateOwnerDirectoryId(directoryId, newOwnerDirectoryId) {
76
+ const url = `${this.baseUrl}`;
77
+ const operationName = "updateOwnerDirectoryId";
78
+ const data = {
79
+ directoryId: directoryId,
80
+ ownerDirectoryId: newOwnerDirectoryId
81
+ };
82
+ return await this.httpRequest.post(`${url}`, data, { 'operationName': operationName });
74
83
  }
75
84
  async updateUserProfile(directoryId, profile) {
76
85
  const url = `${this.baseUrl}`;
@@ -47,4 +47,5 @@ export interface IDirectoryApi {
47
47
  getByPhoneNumber(phoneNumber: string): Promise<any>;
48
48
  addOwnerDirectoryId(directoryId: string, newOwnerDirectoryId: any): Promise<any>;
49
49
  updateUserProfile(directoryId: string, profile: Profile): Promise<void>;
50
+ updateOwnerDirectoryId(directoryId: string, newOwnerDirectoryId: any): Promise<any>;
50
51
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "1.0.97",
3
+ "version": "1.1.1",
4
4
  "description": "Sirve como un puente entre diferentes funciones lambda, facilitando la comunicación entre ellas a traves de invocaciones http",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -83,7 +83,20 @@ export class DirectoryApi implements IDirectoryApi {
83
83
  ownerDirectoryId: newOwnerDirectoryId
84
84
  }
85
85
 
86
- return await this.httpRequest.delete(`${url}`, data, { 'operationName': operationName });
86
+ return await this.httpRequest.post(`${url}`, data, { 'operationName': operationName });
87
+ }
88
+
89
+ public async updateOwnerDirectoryId(directoryId: string, newOwnerDirectoryId): Promise<any> {
90
+
91
+ const url = `${this.baseUrl}`;
92
+ const operationName = "updateOwnerDirectoryId";
93
+
94
+ const data = {
95
+ directoryId: directoryId,
96
+ ownerDirectoryId: newOwnerDirectoryId
97
+ }
98
+
99
+ return await this.httpRequest.post(`${url}`, data, { 'operationName': operationName });
87
100
  }
88
101
 
89
102
  public async updateUserProfile(directoryId: string, profile: Profile): Promise<void> {
@@ -60,5 +60,7 @@ export interface IDirectoryApi {
60
60
 
61
61
  updateUserProfile(directoryId: string, profile: Profile): Promise<void>
62
62
 
63
+ updateOwnerDirectoryId(directoryId: string, newOwnerDirectoryId): Promise<any>
64
+
63
65
 
64
66
  }