@bytexbyte/berify-analytics-api 2.1.7 → 2.1.9

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 { ScanReportRequest, ScanReportResponse, UserReportRequest, UserReportResponse, ScanRateResponse, ScanRateByTimeRequest, ScanRateByTimeResponse, User, BatchScanDataRequest, BatchScanDataResponse, LeaderBoardResponse, LeaderBoardRequest, TagSearchRequest, TagScanResponse } from './type';
2
+ import { ScanReportRequest, ScanReportResponse, UserReportRequest, UserReportResponse, ScanRateResponse, ScanRateByTimeRequest, ScanRateByTimeResponse, User, BatchScanDataRequest, BatchScanDataResponse, LeaderBoardResponse, LeaderBoardRequest, TagSearchRequest, TagScanResponse, BatchScannedUsersExportRequest, BatchScannedUsersExportResponse } from './type';
3
3
  declare class BerifyScanChartApi extends BxBApi {
4
4
  constructor({ host, secretKey, secret }: {
5
5
  host: string;
@@ -13,5 +13,6 @@ declare class BerifyScanChartApi extends BxBApi {
13
13
  getBatchScanData(form: BatchScanDataRequest): Promise<BatchScanDataResponse>;
14
14
  getLeaderBoard(user: User, form: LeaderBoardRequest): Promise<LeaderBoardResponse>;
15
15
  getTagScanHistory(form: TagSearchRequest): Promise<TagScanResponse>;
16
+ exportBatchScannedUsers(user: User, form: BatchScannedUsersExportRequest): Promise<BatchScannedUsersExportResponse>;
16
17
  }
17
18
  export default BerifyScanChartApi;
@@ -79,5 +79,16 @@ class BerifyScanChartApi extends bxb_api_1.default {
79
79
  }, 'tagScanHistory');
80
80
  return response.json();
81
81
  }
82
+ async exportBatchScannedUsers(user, form) {
83
+ const response = await fetch(`${this.host}/api/export/batch-scanned-users`, {
84
+ method: 'POST',
85
+ headers: {
86
+ 'Content-Type': 'application/json',
87
+ [this.secretKey]: this.secret,
88
+ },
89
+ body: JSON.stringify({ user, form }),
90
+ });
91
+ return response.json();
92
+ }
82
93
  }
83
94
  exports.default = BerifyScanChartApi;
@@ -126,6 +126,17 @@ export type BatchScanDataResponse = {
126
126
  pageSize: number;
127
127
  totalItems: number;
128
128
  };
129
+ export type BatchScannedUsersExportRequest = {
130
+ batchId: string;
131
+ };
132
+ export type BatchScannedUsersExportResponse = {
133
+ status: 'ok' | 'error';
134
+ data?: {
135
+ downloadUrl: string;
136
+ totalEmails: number;
137
+ };
138
+ error?: string;
139
+ };
129
140
  export type LeaderBoardRequest = {
130
141
  tagId?: string;
131
142
  batchId?: string;
@@ -8,4 +8,4 @@ var TimeInterval;
8
8
  TimeInterval["LastDay"] = "Last day";
9
9
  TimeInterval["LastWeek"] = "Last week";
10
10
  TimeInterval["LastMonth"] = "Last month";
11
- })(TimeInterval = exports.TimeInterval || (exports.TimeInterval = {}));
11
+ })(TimeInterval || (exports.TimeInterval = TimeInterval = {}));
@@ -8,10 +8,10 @@ var CompanyRoleType;
8
8
  CompanyRoleType["marketing"] = "marketing";
9
9
  CompanyRoleType["supplier"] = "supplier";
10
10
  CompanyRoleType["seo"] = "seo";
11
- })(CompanyRoleType = exports.CompanyRoleType || (exports.CompanyRoleType = {}));
11
+ })(CompanyRoleType || (exports.CompanyRoleType = CompanyRoleType = {}));
12
12
  var ScanType;
13
13
  (function (ScanType) {
14
14
  ScanType["AppClip"] = "AppClip";
15
15
  ScanType["App"] = "App";
16
16
  ScanType["Web"] = "Web";
17
- })(ScanType = exports.ScanType || (exports.ScanType = {}));
17
+ })(ScanType || (exports.ScanType = ScanType = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytexbyte/berify-analytics-api",
3
- "version": "2.1.7",
3
+ "version": "2.1.9",
4
4
  "description": "api",
5
5
  "main": "lib/berifyAnalyticsApi/src/index.js",
6
6
  "types": "lib/berifyAnalyticsApi/src/index.d.ts",
@@ -23,11 +23,11 @@
23
23
  "license": "ISC",
24
24
  "homepage": "https://dev.azure.com/ByteXByte/Berify/_git/Berify-web?path=/next/app-api",
25
25
  "devDependencies": {
26
- "@types/node": "^18.7.1",
26
+ "@types/node": "^24.7.0",
27
27
  "prettier": "^2.7.1",
28
28
  "tslint": "^6.1.3",
29
29
  "tslint-config-prettier": "^1.18.0",
30
- "typescript": "^4.7.4"
30
+ "typescript": "^5.9.3"
31
31
  },
32
32
  "files": [
33
33
  "lib/**/*"
@@ -75,4 +75,4 @@
75
75
  "tsutils": "^2.29.0",
76
76
  "wrappy": "^1.0.2"
77
77
  }
78
- }
78
+ }