@fiado/api-invoker 1.2.23 → 1.2.25

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.
@@ -7,6 +7,7 @@ export declare class DirectoryApi implements IDirectoryApi {
7
7
  private httpRequest;
8
8
  private readonly baseUrl;
9
9
  constructor(httpRequest: IHttpRequest);
10
+ validateSecretNumber(directoryId: string, secretNumber: string): Promise<void>;
10
11
  getByIds(ids: string[]): Promise<any>;
11
12
  updateExternalUserId(directoryId: string, provider: Provider, externalUserId: string): Promise<void>;
12
13
  updateScope(directoryId: string, scope: string[]): Promise<void>;
@@ -24,6 +24,15 @@ let DirectoryApi = class DirectoryApi {
24
24
  this.httpRequest = httpRequest;
25
25
  this.baseUrl = process.env.DIRECTORY_LAMBDA_URL || "";
26
26
  }
27
+ async validateSecretNumber(directoryId, secretNumber) {
28
+ const url = `${this.baseUrl}`;
29
+ const operationName = "validateSecretNumber";
30
+ const body = {
31
+ directoryId,
32
+ secretNumber,
33
+ };
34
+ return await this.httpRequest.post(`${url}`, body, { 'operationName': operationName });
35
+ }
27
36
  async getByIds(ids) {
28
37
  if (ids.length === 0) {
29
38
  throw new Error("At least one directory ID is required.");
@@ -51,4 +51,5 @@ export interface IDirectoryApi {
51
51
  updateOwnerDirectoryId(directoryId: string, newOwnerDirectoryId: any): Promise<any>;
52
52
  updateStatus(directoryId: string, status: Status): Promise<void>;
53
53
  getByPeopleId(peopleId: string): Promise<any>;
54
+ validateSecretNumber(directoryId: string, secretNumber: string): Promise<void>;
54
55
  }
@@ -8,6 +8,7 @@ export default class TransactionApi implements ITransactionApi {
8
8
  getActivityProblemsByStatus(status: string, index?: string, pageSize?: number): Promise<any>;
9
9
  updateActivityProblemStatus(id: string, params: {
10
10
  status: string;
11
+ observation?: string;
11
12
  }): Promise<any>;
12
13
  getTransactionsByDirectoryIdAndSource(params: {
13
14
  directoryId: string;
@@ -32,5 +32,6 @@ export interface ITransactionApi {
32
32
  getActivityProblemsByStatus(status: string, index?: string, pageSize?: number): Promise<any>;
33
33
  updateActivityProblemStatus(id: string, params: {
34
34
  status: string;
35
+ observation?: string;
35
36
  }): Promise<any>;
36
37
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "1.2.23",
3
+ "version": "1.2.25",
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
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -15,6 +15,20 @@ export class DirectoryApi implements IDirectoryApi {
15
15
  constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
16
16
  }
17
17
 
18
+
19
+ public async validateSecretNumber(directoryId: string, secretNumber: string): Promise<void> {
20
+
21
+ const url = `${this.baseUrl}`;
22
+ const operationName = "validateSecretNumber";
23
+
24
+ const body = {
25
+ directoryId,
26
+ secretNumber,
27
+ }
28
+
29
+ return await this.httpRequest.post(`${url}`, body, { 'operationName': operationName });
30
+ }
31
+
18
32
  public async getByIds(ids: string[]): Promise<any> {
19
33
 
20
34
  if (ids.length === 0) {
@@ -62,4 +62,8 @@ export interface IDirectoryApi {
62
62
  updateStatus(directoryId: string, status: Status): Promise<void>
63
63
 
64
64
  getByPeopleId(peopleId: string): Promise<any>;
65
+
66
+ validateSecretNumber(directoryId: string, secretNumber: string): Promise<void>;
67
+
68
+
65
69
  }
@@ -29,7 +29,7 @@ export default class TransactionApi implements ITransactionApi {
29
29
  return await this.httpRequest.get(url);
30
30
  }
31
31
 
32
- async updateActivityProblemStatus(id: string, params: { status: string; }): Promise<any> {
32
+ async updateActivityProblemStatus(id: string, params: { status: string, observation?:string }): Promise<any> {
33
33
  const url: string = `${this.baseUrl}private/activityProblems/${id}`;
34
34
  return await this.httpRequest.put(url, params);
35
35
  }
@@ -30,7 +30,7 @@ export interface ITransactionApi {
30
30
 
31
31
  getActivityProblemsByStatus(status:string, index?:string, pageSize?:number): Promise<any>
32
32
 
33
- updateActivityProblemStatus(id:string,params:{status:string}): Promise<any>
33
+ updateActivityProblemStatus(id:string,params:{status:string, observation?:string}): Promise<any>
34
34
 
35
35
 
36
36
  }