@bytexbyte/ike-app-api 1.0.12 → 1.0.14

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.
@@ -156,5 +156,13 @@ 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
+ isEnabledBiometrics?: boolean;
164
+ } | {
165
+ error: 'Phone number is required.';
166
+ }>;
159
167
  }
160
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.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;
@@ -70,6 +70,18 @@ export declare type SignInEmailBiometrics = (provider: 'email-biometrics', form:
70
70
  id?: undefined;
71
71
  error: 'Authentication error.' | 'Field(s) cannot be empty.' | 'id not found.' | 'Email not verified.' | 'Sign in to turn on biometrics.' | 'New device login requires password credentials.' | 'signature error.' | 'URL not found.';
72
72
  }>;
73
+ export declare type SignInPhoneBiometrics = (provider: 'phone-biometrics', form: {
74
+ publicKey: string;
75
+ id: string;
76
+ signature: string;
77
+ csrfToken?: string;
78
+ }) => Promise<{
79
+ id: string;
80
+ error?: undefined;
81
+ } | {
82
+ id?: undefined;
83
+ error: 'Authentication error.' | 'Field(s) cannot be empty.' | 'id not found.' | 'Sign in to turn on biometrics.' | 'New device login requires password credentials.' | 'signature error.' | 'URL not found.';
84
+ }>;
73
85
  export declare type SignInKyc = (provider: 'kyc', form: {
74
86
  kycId: string;
75
87
  firstName: string;
@@ -92,4 +104,4 @@ export declare type SignInPhoneOTP = (provider: 'phone-otp', form: {
92
104
  } | {
93
105
  error: 'Authentication error.' | 'Field(s) cannot be empty.' | 'Invalid OTP code.';
94
106
  }>;
95
- export declare type SignIn = SignInEmailPassword | SignInGoogleIos | SignInGoogleAndroid | SignInFacebookMobile | SignInAppleMobile | SignInEmailBiometrics | SignInKyc | SignInPhoneOTP;
107
+ export declare type SignIn = SignInEmailPassword | SignInGoogleIos | SignInGoogleAndroid | SignInFacebookMobile | SignInAppleMobile | SignInEmailBiometrics | SignInPhoneBiometrics | SignInKyc | SignInPhoneOTP;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytexbyte/ike-app-api",
3
- "version": "1.0.12",
3
+ "version": "1.0.14",
4
4
  "description": "app api",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",