@bytexbyte/ike-app-api 1.0.16 → 1.0.18
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 +9 -1
- package/lib/Auth/index.js +19 -0
- package/package.json +1 -1
package/lib/Auth/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import BxBApi from '@bytexbyte/bxb-api';
|
|
2
|
-
import { SignInAppleMobile, SignInEmailBiometrics, SignInEmailPassword, SignInFacebookMobile, SignInGoogleAndroid, SignInGoogleIos, SignInKyc,
|
|
2
|
+
import { SignInAppleMobile, SignInEmailBiometrics, SignInEmailPassword, SignInFacebookMobile, SignInGoogleAndroid, SignInGoogleIos, SignInKyc, SignInPhoneBiometrics, SignInPhoneOTP } from './type';
|
|
3
3
|
declare type User = {
|
|
4
4
|
id: string;
|
|
5
5
|
image: string | null;
|
|
@@ -157,6 +157,14 @@ declare class IKEAppAuthApi extends BxBApi {
|
|
|
157
157
|
} | {
|
|
158
158
|
error: 'Phone number is required.' | 'User not found.' | 'User already verified.';
|
|
159
159
|
}>;
|
|
160
|
+
verifyAge(body: {
|
|
161
|
+
phone: string;
|
|
162
|
+
birthDate: Date;
|
|
163
|
+
}): Promise<{
|
|
164
|
+
isVerified: boolean;
|
|
165
|
+
} | {
|
|
166
|
+
error: 'Field(s) cannot be empty.' | 'User not found.';
|
|
167
|
+
}>;
|
|
160
168
|
isPhoneExisted(body: {
|
|
161
169
|
phone: string;
|
|
162
170
|
}): Promise<{
|
package/lib/Auth/index.js
CHANGED
|
@@ -406,6 +406,25 @@ var IKEAppAuthApi = /** @class */ (function (_super) {
|
|
|
406
406
|
});
|
|
407
407
|
});
|
|
408
408
|
};
|
|
409
|
+
IKEAppAuthApi.prototype.verifyAge = 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/age")];
|
|
421
|
+
case 1:
|
|
422
|
+
response = _a.sent();
|
|
423
|
+
return [2 /*return*/, response.json()];
|
|
424
|
+
}
|
|
425
|
+
});
|
|
426
|
+
});
|
|
427
|
+
};
|
|
409
428
|
IKEAppAuthApi.prototype.isPhoneExisted = function (body) {
|
|
410
429
|
return __awaiter(this, void 0, void 0, function () {
|
|
411
430
|
var response;
|