@bytexbyte/berify-analytics-api 1.0.15 → 1.0.17

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,11 +1,12 @@
1
1
  import BxBApi from '@bytexbyte/bxb-api';
2
- import { HeatmapApi, HeatmapResult } from './type';
2
+ import { HeatmapApi, HeatmapResponse, LastUpdatedAtResponse } from './type';
3
3
  declare class BerifyHeatMapApi extends BxBApi {
4
4
  constructor({ host, secretKey, secret }: {
5
5
  host: string;
6
6
  secretKey?: string;
7
7
  secret?: string;
8
8
  });
9
- getHeatmap(form: Parameters<HeatmapApi>[0]): Promise<HeatmapResult>;
9
+ getHeatmap(form: Parameters<HeatmapApi>[0]): Promise<HeatmapResponse>;
10
+ getLastUpdatedAt(): Promise<LastUpdatedAtResponse>;
10
11
  }
11
12
  export default BerifyHeatMapApi;
@@ -82,6 +82,24 @@ var BerifyHeatMapApi = /** @class */ (function (_super) {
82
82
  });
83
83
  });
84
84
  };
85
+ BerifyHeatMapApi.prototype.getLastUpdatedAt = function () {
86
+ return __awaiter(this, void 0, void 0, function () {
87
+ var response;
88
+ return __generator(this, function (_a) {
89
+ switch (_a.label) {
90
+ case 0: return [4 /*yield*/, this.bxbFetch({
91
+ method: 'POST',
92
+ headers: {
93
+ 'Content-Type': 'application/json'
94
+ }
95
+ })];
96
+ case 1:
97
+ response = _a.sent();
98
+ return [2 /*return*/, response.json()];
99
+ }
100
+ });
101
+ });
102
+ };
85
103
  return BerifyHeatMapApi;
86
104
  }(bxb_api_1.default));
87
105
  exports.default = BerifyHeatMapApi;
@@ -24,4 +24,9 @@ export type HeatmapResponse = {
24
24
  data?: HeatmapResult;
25
25
  error?: string;
26
26
  };
27
+ export type LastUpdatedAtResponse = {
28
+ status: 'ok' | 'error';
29
+ data?: Date;
30
+ error?: string;
31
+ };
27
32
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytexbyte/berify-analytics-api",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
4
4
  "description": "api",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",