@bytexbyte/ike-app-api 1.0.18 → 1.0.20

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.
@@ -14,6 +14,8 @@ declare type User = {
14
14
  accounts: {
15
15
  provider: string;
16
16
  }[];
17
+ idVerified: Date | null;
18
+ isAgeVerified: boolean;
17
19
  };
18
20
  declare type Session = {
19
21
  expires: Date;
@@ -47,7 +47,7 @@ declare type LogoutResult = {
47
47
  error?: 'You are not logged in.' | 'Incorrect userID.' | 'You cannot make changes to this user.' | 'Missing userId.';
48
48
  };
49
49
  declare type RemoveScanHistoryResult = {
50
- error?: 'You are not logged in.' | 'Incorrect userID.' | 'You cannot make changes to this user.' | 'Missing userId.' | 'Missing scanHistoryId.';
50
+ error?: 'You are not logged in.' | 'Incorrect userID.' | 'Incorrect tagUid.' | 'You cannot make changes to this user.' | 'Missing userId.' | 'Missing scanHistoryId.' | 'Missing tagUid.';
51
51
  };
52
52
  declare type RemoveAllScanHistoryResult = {
53
53
  error?: 'You are not logged in.' | 'Incorrect userID.' | 'You cannot make changes to this user.' | 'Missing userId.';
@@ -136,5 +136,6 @@ declare class IKEAppUserApi extends BxBApi {
136
136
  error: 'Incorrect userID.' | 'Authentication type error.' | 'You cannot make changes to this user.' | 'You are not logged in.' | 'Missing userId.' | 'Missing companyId.' | 'Missing rewardRuleId.' | 'No available discount codes found.' | undefined;
137
137
  }>;
138
138
  getUserIdByEmail(userId: string, email: string): Promise<GetUserIdByEmailResult>;
139
+ removeScanHistoryByTagUid(userId: string, tagUid: string): Promise<RemoveScanHistoryResult>;
139
140
  }
140
141
  export default IKEAppUserApi;
package/lib/User/index.js CHANGED
@@ -501,6 +501,29 @@ var IKEAppUserApi = /** @class */ (function (_super) {
501
501
  });
502
502
  });
503
503
  };
504
+ IKEAppUserApi.prototype.removeScanHistoryByTagUid = function (userId, tagUid) {
505
+ return __awaiter(this, void 0, void 0, function () {
506
+ var response;
507
+ return __generator(this, function (_a) {
508
+ switch (_a.label) {
509
+ case 0: return [4 /*yield*/, this.bxbFetch({
510
+ method: 'DELETE',
511
+ headers: userId
512
+ ? {
513
+ 'Content-Type': 'application/json',
514
+ 'IKE-App-User-Id': userId,
515
+ }
516
+ : {
517
+ 'Content-Type': 'application/json',
518
+ },
519
+ }, "".concat(userId, "/scan-history/tag-uid/").concat(tagUid))];
520
+ case 1:
521
+ response = _a.sent();
522
+ return [2 /*return*/, response.json()];
523
+ }
524
+ });
525
+ });
526
+ };
504
527
  return IKEAppUserApi;
505
528
  }(bxb_api_1.default));
506
529
  exports.default = IKEAppUserApi;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytexbyte/ike-app-api",
3
- "version": "1.0.18",
3
+ "version": "1.0.20",
4
4
  "description": "app api",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",