@bytexbyte/berify-analytics-api 1.6.0 → 1.6.2

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,5 +1,5 @@
1
1
  import BxBApi from '@bytexbyte/bxb-api';
2
- import { HeatmapRequest, HeatmapResponse, LastUpdatedAtResponse } from './type';
2
+ import { HeatmapRequest, HeatmapResponse, LastUpdatedAtResponse, ReskinHeatmapRequest } from './type';
3
3
  declare class BerifyHeatMapApi extends BxBApi {
4
4
  constructor({ host, secretKey, secret }: {
5
5
  host: string;
@@ -8,5 +8,6 @@ declare class BerifyHeatMapApi extends BxBApi {
8
8
  });
9
9
  getHeatmap(form: HeatmapRequest): Promise<HeatmapResponse>;
10
10
  getLastUpdatedAt(): Promise<LastUpdatedAtResponse>;
11
+ getReskinHeatmap(form: ReskinHeatmapRequest): Promise<HeatmapResponse>;
11
12
  }
12
13
  export default BerifyHeatMapApi;
@@ -100,6 +100,25 @@ var BerifyHeatMapApi = /** @class */ (function (_super) {
100
100
  });
101
101
  });
102
102
  };
103
+ BerifyHeatMapApi.prototype.getReskinHeatmap = function (form) {
104
+ return __awaiter(this, void 0, void 0, function () {
105
+ var response;
106
+ return __generator(this, function (_a) {
107
+ switch (_a.label) {
108
+ case 0: return [4 /*yield*/, this.bxbFetch({
109
+ method: 'POST',
110
+ headers: {
111
+ 'Content-Type': 'application/json'
112
+ },
113
+ body: JSON.stringify(form)
114
+ })];
115
+ case 1:
116
+ response = _a.sent();
117
+ return [2 /*return*/, response.json()];
118
+ }
119
+ });
120
+ });
121
+ };
103
122
  return BerifyHeatMapApi;
104
123
  }(bxb_api_1.default));
105
124
  exports.default = BerifyHeatMapApi;
@@ -15,6 +15,15 @@ export type HeatmapRequest = {
15
15
  collectionRuleId?: number;
16
16
  timeInterval: TimeInterval;
17
17
  };
18
+ export type ReskinHeatmapRequest = {
19
+ userId: string;
20
+ companyId?: number;
21
+ tagTokenId?: string;
22
+ batchId?: string;
23
+ collectionRuleId?: number;
24
+ startDate: Date;
25
+ endDate: Date;
26
+ };
18
27
  export type HeatmapResult = {
19
28
  id: number;
20
29
  latitude: Decimal | null;
@@ -25,6 +25,7 @@ export interface Scan {
25
25
  id: number;
26
26
  latitude: Decimal | null;
27
27
  longitude: Decimal | null;
28
+ location: string | null;
28
29
  createdAt: Date;
29
30
  tagTokenId: string;
30
31
  userId: string;
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@bytexbyte/berify-analytics-api",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "description": "api",
5
- "main": "lib/berifyAnalyticsApi/index.js",
6
- "types": "lib/berifyAnalyticsApi/index.d.ts",
5
+ "main": "lib/berifyAnalyticsApi/src/index.js",
6
+ "types": "lib/berifyAnalyticsApi/src/index.d.ts",
7
7
  "scripts": {
8
8
  "test": "echo \"Error: no test specified\" && exit 1",
9
9
  "build": "tsc",