@bytexbyte/ike-app-api 1.0.8 → 1.0.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.
- package/lib/Auth/index.d.ts +7 -0
- package/lib/Auth/index.js +19 -0
- package/package.json +1 -1
package/lib/Auth/index.d.ts
CHANGED
|
@@ -157,5 +157,12 @@ declare class IKEAppAuthApi extends BxBApi {
|
|
|
157
157
|
} | {
|
|
158
158
|
error: 'Phone number is required.' | 'OTP already exists. Please check your messages.';
|
|
159
159
|
}>;
|
|
160
|
+
verifyIdentity(body: {
|
|
161
|
+
phone: string;
|
|
162
|
+
}): Promise<{
|
|
163
|
+
success: 'ok';
|
|
164
|
+
} | {
|
|
165
|
+
error: 'Phone number is required.' | 'User not found.' | 'User already verified.';
|
|
166
|
+
}>;
|
|
160
167
|
}
|
|
161
168
|
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.verifyIdentity = 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
|
+
}, "verify/identity")];
|
|
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;
|