@bytexbyte/ike-app-api 1.0.54 → 1.0.56
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/Product/index.d.ts +2 -2
- package/lib/Product/index.js +13 -7
- package/lib/User/index.d.ts +6 -0
- package/lib/User/index.js +19 -0
- package/package.json +1 -1
package/lib/Product/index.d.ts
CHANGED
|
@@ -15,8 +15,8 @@ declare class IKEAppProductApi extends BxBApi {
|
|
|
15
15
|
}>;
|
|
16
16
|
getIsSmokeFreeByMacAddress(form: {
|
|
17
17
|
macAddress: string;
|
|
18
|
-
longitude
|
|
19
|
-
latitude
|
|
18
|
+
longitude?: number;
|
|
19
|
+
latitude?: number;
|
|
20
20
|
}): Promise<{
|
|
21
21
|
isSmokeFree: boolean;
|
|
22
22
|
} | {
|
package/lib/Product/index.js
CHANGED
|
@@ -93,15 +93,21 @@ var IKEAppProductApi = /** @class */ (function (_super) {
|
|
|
93
93
|
};
|
|
94
94
|
IKEAppProductApi.prototype.getIsSmokeFreeByMacAddress = function (form) {
|
|
95
95
|
return __awaiter(this, void 0, void 0, function () {
|
|
96
|
-
var response;
|
|
96
|
+
var params, response;
|
|
97
97
|
return __generator(this, function (_a) {
|
|
98
98
|
switch (_a.label) {
|
|
99
|
-
case 0:
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
99
|
+
case 0:
|
|
100
|
+
params = new URLSearchParams();
|
|
101
|
+
if (form.longitude)
|
|
102
|
+
params.append('longitude', form.longitude.toString());
|
|
103
|
+
if (form.latitude)
|
|
104
|
+
params.append('latitude', form.latitude.toString());
|
|
105
|
+
return [4 /*yield*/, this.bxbFetch({
|
|
106
|
+
method: 'GET',
|
|
107
|
+
headers: {
|
|
108
|
+
'Content-Type': 'application/json',
|
|
109
|
+
},
|
|
110
|
+
}, "".concat(form.macAddress, "/isSmokeFree?").concat(params.toString()))];
|
|
105
111
|
case 1:
|
|
106
112
|
response = _a.sent();
|
|
107
113
|
return [2 /*return*/, response.json()];
|
package/lib/User/index.d.ts
CHANGED
|
@@ -184,5 +184,11 @@ declare class IKEAppUserApi extends BxBApi {
|
|
|
184
184
|
}): Promise<UserLog | {
|
|
185
185
|
error: 'You are not logged in.' | 'Incorrect userId.' | 'Incorrect tagTokenId.' | 'Incorrect action.' | 'Incorrect detail.' | 'You cannot create log to this user.' | 'Field(s) cannot be empty.' | 'User not found.' | 'User has not been verified.';
|
|
186
186
|
}>;
|
|
187
|
+
updateIncodeId(userId: string, body: {
|
|
188
|
+
token: string;
|
|
189
|
+
interviewId: string;
|
|
190
|
+
}): Promise<UpdateResult & {
|
|
191
|
+
incodeId: string | null;
|
|
192
|
+
}>;
|
|
187
193
|
}
|
|
188
194
|
export default IKEAppUserApi;
|
package/lib/User/index.js
CHANGED
|
@@ -591,6 +591,25 @@ var IKEAppUserApi = /** @class */ (function (_super) {
|
|
|
591
591
|
});
|
|
592
592
|
});
|
|
593
593
|
};
|
|
594
|
+
IKEAppUserApi.prototype.updateIncodeId = function (userId, body) {
|
|
595
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
596
|
+
var response;
|
|
597
|
+
return __generator(this, function (_a) {
|
|
598
|
+
switch (_a.label) {
|
|
599
|
+
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
600
|
+
method: 'PUT',
|
|
601
|
+
headers: {
|
|
602
|
+
'Content-Type': 'application/json',
|
|
603
|
+
},
|
|
604
|
+
body: JSON.stringify(body),
|
|
605
|
+
}, "".concat(userId, "/incodeId"))];
|
|
606
|
+
case 1:
|
|
607
|
+
response = _a.sent();
|
|
608
|
+
return [2 /*return*/, response.json()];
|
|
609
|
+
}
|
|
610
|
+
});
|
|
611
|
+
});
|
|
612
|
+
};
|
|
594
613
|
return IKEAppUserApi;
|
|
595
614
|
}(bxb_api_1.default));
|
|
596
615
|
exports.default = IKEAppUserApi;
|