@fiado/api-invoker 1.1.53 → 1.1.55

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.
@@ -6,4 +6,5 @@ export default class ActivityApi implements IActivityApi {
6
6
  constructor(httpRequest: IHttpRequest);
7
7
  getActivityByDirectoryId(directoryId: string, typeOfActivityIds: string[]): Promise<any>;
8
8
  getActivityById(typeOfActivityIds: string[]): Promise<any>;
9
+ getActivityHistory(typeOfActivity: string, startDate: string, endDate: string): Promise<any>;
9
10
  }
@@ -28,6 +28,10 @@ let ActivityApi = class ActivityApi {
28
28
  const url = `${this.baseUrl}activities?${query}`;
29
29
  return await this.httpRequest.get(url);
30
30
  }
31
+ async getActivityHistory(typeOfActivity, startDate, endDate) {
32
+ const url = `${this.baseUrl}activities/history?typeOfActivity=${typeOfActivity}&startDate=${startDate}&endDate=${endDate}`;
33
+ return await this.httpRequest.get(url);
34
+ }
31
35
  };
32
36
  ActivityApi = __decorate([
33
37
  (0, inversify_1.injectable)(),
@@ -1,4 +1,5 @@
1
1
  export interface IActivityApi {
2
2
  getActivityByDirectoryId(directoryId: string, typeOfActivityIds: string[]): Promise<any>;
3
3
  getActivityById(typeOfActivityIds: string[]): Promise<any>;
4
+ getActivityHistory(typeOfActivity: string, startDate: string, endDate: string): Promise<any>;
4
5
  }
@@ -28,8 +28,15 @@ let StpSpeiApi = class StpSpeiApi {
28
28
  return await this.httpRequest.post(url, request, headers);
29
29
  }
30
30
  async getBusinessAccountBalance(businessName) {
31
- const url = `${this.baseUrl}accounts/${businessName}/balance`;
32
- return await this.httpRequest.get(url);
31
+ const url = `${this.baseUrl}`;
32
+ const request = {
33
+ business: businessName
34
+ };
35
+ const headers = {
36
+ 'Content-Type': 'application/json',
37
+ operationName: "getBusinessAccountBalance"
38
+ };
39
+ return await this.httpRequest.post(url, request, headers);
33
40
  }
34
41
  };
35
42
  exports.StpSpeiApi = StpSpeiApi;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "1.1.53",
3
+ "version": "1.1.55",
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",
@@ -24,4 +24,11 @@ export default class ActivityApi implements IActivityApi {
24
24
 
25
25
  return await this.httpRequest.get(url);
26
26
  }
27
+
28
+ async getActivityHistory(typeOfActivity:string, startDate: string, endDate: string): Promise<any> {
29
+
30
+ const url = `${this.baseUrl}activities/history?typeOfActivity=${typeOfActivity}&startDate=${startDate}&endDate=${endDate}`;
31
+
32
+ return await this.httpRequest.get(url);
33
+ }
27
34
  }
@@ -5,4 +5,6 @@ export interface IActivityApi {
5
5
  getActivityByDirectoryId(directoryId: string, typeOfActivityIds: string[]): Promise<any>
6
6
 
7
7
  getActivityById(typeOfActivityIds: string[]): Promise<any>
8
+
9
+ getActivityHistory(typeOfActivity: string, startDate: string, endDate: string): Promise<any>
8
10
  }
@@ -20,7 +20,14 @@ export class StpSpeiApi implements IStpSpeiApi {
20
20
  }
21
21
 
22
22
  async getBusinessAccountBalance(businessName: BusinessNameEnum): Promise<any> {
23
- const url = `${this.baseUrl}accounts/${businessName}/balance`;
24
- return await this.httpRequest.get(url);
23
+ const url: string = `${this.baseUrl}`;
24
+ const request = {
25
+ business: businessName
26
+ }
27
+ const headers = {
28
+ 'Content-Type': 'application/json',
29
+ operationName: "getBusinessAccountBalance"
30
+ }
31
+ return await this.httpRequest.post(url, request, headers);
25
32
  }
26
33
  }