@fiado/api-invoker 1.0.94 → 1.0.96

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,7 @@
1
1
  import { IHttpRequest } from "@fiado/http-client";
2
2
  import { IDirectoryApi } from "./interfaces/IDirectoryApi";
3
3
  import { Provider } from '@fiado/type-kit/bin/provider';
4
+ import { Profile } from '@fiado/type-kit/bin/directory/enums/Profile';
4
5
  export declare class DirectoryApi implements IDirectoryApi {
5
6
  private httpRequest;
6
7
  private readonly baseUrl;
@@ -11,4 +12,5 @@ export declare class DirectoryApi implements IDirectoryApi {
11
12
  getByOwnerDirectoryId(ownerDirectoryId: string): Promise<any>;
12
13
  getByPhoneNumber(phoneNumber: string): Promise<any>;
13
14
  addOwnerDirectoryId(directoryId: string, newOwnerDirectoryId: any): Promise<any>;
15
+ updateUserProfile(directoryId: string, profile: Profile): Promise<void>;
14
16
  }
@@ -72,6 +72,16 @@ let DirectoryApi = class DirectoryApi {
72
72
  };
73
73
  return await this.httpRequest.delete(`${url}`, data, { 'operationName': operationName });
74
74
  }
75
+ async updateUserProfile(directoryId, profile) {
76
+ const url = `${this.baseUrl}`;
77
+ const operationName = "updateUserProfile";
78
+ const body = {
79
+ directoryId: directoryId,
80
+ typeOfDirectoryId: "USER",
81
+ profile: profile
82
+ };
83
+ return await this.httpRequest.post(`${url}`, body, { 'operationName': operationName });
84
+ }
75
85
  };
76
86
  exports.DirectoryApi = DirectoryApi;
77
87
  exports.DirectoryApi = DirectoryApi = __decorate([
@@ -1,3 +1,4 @@
1
+ import { Profile } from "@fiado/type-kit/bin/directory/enums/Profile";
1
2
  import { Provider } from "@fiado/type-kit/bin/provider";
2
3
  /**
3
4
  * Interfaz para el servicio Directory que permite operaciones sobre directorios.
@@ -44,9 +45,6 @@ export interface IDirectoryApi {
44
45
  * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
45
46
  */
46
47
  getByPhoneNumber(phoneNumber: string): Promise<any>;
47
- /**
48
- *
49
- * @param pocketId
50
- */
51
48
  addOwnerDirectoryId(directoryId: string, newOwnerDirectoryId: any): Promise<any>;
49
+ updateUserProfile(directoryId: string, profile: Profile): Promise<void>;
52
50
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "1.0.94",
3
+ "version": "1.0.96",
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",
@@ -25,4 +25,6 @@ export interface IAccountFiadoIncApi {
25
25
  executePocketTransaction(pocketId: string, operation: OperationEnum, request: ExecutePocketOperationRequest): Promise<ApiGatewayResponse<any>>;
26
26
 
27
27
  executeP2pTransaction(request: ExecuteP2pOperationRequest): Promise<ApiGatewayResponse<any>>;
28
+
29
+ deletePocket(pocketId: string): Promise<ApiGatewayResponse<void>>
28
30
  }
@@ -3,6 +3,7 @@ import { inject, injectable } from "inversify";
3
3
  import { IHttpRequest } from "@fiado/http-client";
4
4
  import { IDirectoryApi } from "./interfaces/IDirectoryApi";
5
5
  import { Provider } from '@fiado/type-kit/bin/provider';
6
+ import { Profile } from '@fiado/type-kit/bin/directory/enums/Profile';
6
7
 
7
8
  dotenv.config();
8
9
 
@@ -84,4 +85,18 @@ export class DirectoryApi implements IDirectoryApi {
84
85
 
85
86
  return await this.httpRequest.delete(`${url}`, data, { 'operationName': operationName });
86
87
  }
88
+
89
+ public async updateUserProfile(directoryId: string, profile: Profile): Promise<void> {
90
+
91
+ const url = `${this.baseUrl}`;
92
+ const operationName = "updateUserProfile";
93
+
94
+ const body = {
95
+ directoryId: directoryId,
96
+ typeOfDirectoryId: "USER",
97
+ profile: profile
98
+ }
99
+
100
+ return await this.httpRequest.post(`${url}`, body, { 'operationName': operationName });
101
+ }
87
102
  }
@@ -1,3 +1,4 @@
1
+ import { Profile } from "@fiado/type-kit/bin/directory/enums/Profile";
1
2
  import { Provider } from "@fiado/type-kit/bin/provider";
2
3
 
3
4
  /**
@@ -52,9 +53,12 @@ export interface IDirectoryApi {
52
53
  getByPhoneNumber(phoneNumber: string): Promise<any>
53
54
 
54
55
 
55
- /**
56
- *
57
- * @param pocketId
58
- */
56
+
59
57
  addOwnerDirectoryId(directoryId: string, newOwnerDirectoryId): Promise<any>
58
+
59
+
60
+
61
+ updateUserProfile(directoryId: string, profile: Profile): Promise<void>
62
+
63
+
60
64
  }