@bytexbyte/ike-app-api 1.0.11 → 1.0.13
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/Auth/index.d.ts +7 -0
- package/lib/Auth/index.js +19 -0
- package/lib/Auth/type.d.ts +1 -0
- package/package.json +1 -1
package/lib/Auth/index.d.ts
CHANGED
|
@@ -156,5 +156,12 @@ declare class IKEAppAuthApi extends BxBApi {
|
|
|
156
156
|
} | {
|
|
157
157
|
error: 'Phone number is required.' | 'User not found.' | 'User already verified.';
|
|
158
158
|
}>;
|
|
159
|
+
isPhoneExisted(body: {
|
|
160
|
+
phone: string;
|
|
161
|
+
}): Promise<{
|
|
162
|
+
isExisted: boolean;
|
|
163
|
+
} | {
|
|
164
|
+
error: 'Phone number is required.';
|
|
165
|
+
}>;
|
|
159
166
|
}
|
|
160
167
|
export default IKEAppAuthApi;
|
package/lib/Auth/index.js
CHANGED
|
@@ -406,6 +406,25 @@ var IKEAppAuthApi = /** @class */ (function (_super) {
|
|
|
406
406
|
});
|
|
407
407
|
});
|
|
408
408
|
};
|
|
409
|
+
IKEAppAuthApi.prototype.isPhoneExisted = function (body) {
|
|
410
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
411
|
+
var response;
|
|
412
|
+
return __generator(this, function (_a) {
|
|
413
|
+
switch (_a.label) {
|
|
414
|
+
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
415
|
+
method: 'POST',
|
|
416
|
+
headers: {
|
|
417
|
+
'Content-Type': 'application/json',
|
|
418
|
+
},
|
|
419
|
+
body: JSON.stringify(body),
|
|
420
|
+
}, "is-phone-existed")];
|
|
421
|
+
case 1:
|
|
422
|
+
response = _a.sent();
|
|
423
|
+
return [2 /*return*/, response.json()];
|
|
424
|
+
}
|
|
425
|
+
});
|
|
426
|
+
});
|
|
427
|
+
};
|
|
409
428
|
return IKEAppAuthApi;
|
|
410
429
|
}(bxb_api_1.default));
|
|
411
430
|
exports.default = IKEAppAuthApi;
|
package/lib/Auth/type.d.ts
CHANGED