@bytexbyte/ike-app-api 1.0.19 → 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.
- package/lib/User/index.d.ts +2 -1
- package/lib/User/index.js +23 -0
- package/package.json +1 -1
package/lib/User/index.d.ts
CHANGED
|
@@ -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;
|