@bytexbyte/berify-analytics-api 1.4.3 → 1.4.5

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,10 +6,10 @@ declare class BerifyScanChartApi extends BxBApi {
6
6
  secretKey?: string;
7
7
  secret?: string;
8
8
  });
9
- getScanReport(form: ScanReportRequest): Promise<ScanReportResponse>;
10
- getUserReport(form: UserReportRequest): Promise<UserReportResponse>;
9
+ getScanReport(user: User, form: ScanReportRequest): Promise<ScanReportResponse>;
10
+ getUserReport(user: User, form: UserReportRequest): Promise<UserReportResponse>;
11
11
  getScanRateAll(user: User, form: UserReportRequest): Promise<ScanRateResponse>;
12
- getScanRateByTime(user: User, form: ScanRateByTimeRequest): Promise<ScanRateByTimeResponse[]>;
12
+ getScanRateByTime(user: User, form: ScanRateByTimeRequest): Promise<ScanRateByTimeResponse>;
13
13
  getBatchScanData(form: BatchScanDataRequest): Promise<BatchScanDataResponse>;
14
14
  }
15
15
  export default BerifyScanChartApi;
@@ -63,7 +63,7 @@ var BerifyScanChartApi = /** @class */ (function (_super) {
63
63
  secret: secret !== null && secret !== void 0 ? secret : 'secret'
64
64
  }) || this;
65
65
  }
66
- BerifyScanChartApi.prototype.getScanReport = function (form) {
66
+ BerifyScanChartApi.prototype.getScanReport = function (user, form) {
67
67
  return __awaiter(this, void 0, void 0, function () {
68
68
  var response;
69
69
  return __generator(this, function (_a) {
@@ -73,7 +73,7 @@ var BerifyScanChartApi = /** @class */ (function (_super) {
73
73
  headers: {
74
74
  'Content-Type': 'application/json'
75
75
  },
76
- body: JSON.stringify(form)
76
+ body: JSON.stringify({ user: user, form: form })
77
77
  }, 'scan-report')];
78
78
  case 1:
79
79
  response = _a.sent();
@@ -82,7 +82,7 @@ var BerifyScanChartApi = /** @class */ (function (_super) {
82
82
  });
83
83
  });
84
84
  };
85
- BerifyScanChartApi.prototype.getUserReport = function (form) {
85
+ BerifyScanChartApi.prototype.getUserReport = function (user, form) {
86
86
  return __awaiter(this, void 0, void 0, function () {
87
87
  var response;
88
88
  return __generator(this, function (_a) {
@@ -92,7 +92,7 @@ var BerifyScanChartApi = /** @class */ (function (_super) {
92
92
  headers: {
93
93
  'Content-Type': 'application/json'
94
94
  },
95
- body: JSON.stringify(form)
95
+ body: JSON.stringify({ user: user, form: form })
96
96
  }, 'user-report')];
97
97
  case 1:
98
98
  response = _a.sent();
@@ -52,13 +52,17 @@ export type ScanRateByTimeRequest = {
52
52
  time: TimeInterval;
53
53
  };
54
54
  export type ScanRateByTimeResponse = {
55
- scanCounts: number;
56
- date?: Date;
57
- year?: string;
58
- month?: string;
59
- day?: string;
60
- hour?: string;
61
- minute?: string;
55
+ status: 'ok' | 'error';
56
+ data?: {
57
+ scanCounts: number;
58
+ date?: Date;
59
+ year?: string;
60
+ month?: string;
61
+ day?: string;
62
+ hour?: string;
63
+ minute?: string;
64
+ }[];
65
+ error?: string;
62
66
  };
63
67
  export type CompanyRoleType = 'super' | 'admin' | 'marketing' | 'supplier' | 'seo' | 'associate';
64
68
  export type User = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytexbyte/berify-analytics-api",
3
- "version": "1.4.3",
3
+ "version": "1.4.5",
4
4
  "description": "api",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",