@bytexbyte/ike-app-api 1.0.8 → 1.0.10
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 -8
- package/lib/Auth/index.js +19 -19
- package/package.json +1 -1
package/lib/Auth/index.d.ts
CHANGED
|
@@ -39,14 +39,6 @@ declare class IKEAppAuthApi extends BxBApi {
|
|
|
39
39
|
verify?: undefined;
|
|
40
40
|
error: 'Field(s) cannot be empty.';
|
|
41
41
|
}>;
|
|
42
|
-
signUp(body: {
|
|
43
|
-
phone: string;
|
|
44
|
-
code: string;
|
|
45
|
-
}): Promise<{
|
|
46
|
-
id: string;
|
|
47
|
-
} | {
|
|
48
|
-
error: 'Field(s) cannot be empty.' | 'User already created.' | 'Invalid OTP code.';
|
|
49
|
-
}>;
|
|
50
42
|
createBiometrics(form: {
|
|
51
43
|
publicKey: string;
|
|
52
44
|
id: string;
|
|
@@ -157,5 +149,12 @@ declare class IKEAppAuthApi extends BxBApi {
|
|
|
157
149
|
} | {
|
|
158
150
|
error: 'Phone number is required.' | 'OTP already exists. Please check your messages.';
|
|
159
151
|
}>;
|
|
152
|
+
verifyIdentity(body: {
|
|
153
|
+
phone: string;
|
|
154
|
+
}): Promise<{
|
|
155
|
+
success: 'ok';
|
|
156
|
+
} | {
|
|
157
|
+
error: 'Phone number is required.' | 'User not found.' | 'User already verified.';
|
|
158
|
+
}>;
|
|
160
159
|
}
|
|
161
160
|
export default IKEAppAuthApi;
|
package/lib/Auth/index.js
CHANGED
|
@@ -121,25 +121,6 @@ var IKEAppAuthApi = /** @class */ (function (_super) {
|
|
|
121
121
|
});
|
|
122
122
|
});
|
|
123
123
|
};
|
|
124
|
-
IKEAppAuthApi.prototype.signUp = function (body) {
|
|
125
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
126
|
-
var response;
|
|
127
|
-
return __generator(this, function (_a) {
|
|
128
|
-
switch (_a.label) {
|
|
129
|
-
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
130
|
-
method: 'POST',
|
|
131
|
-
headers: {
|
|
132
|
-
'Content-Type': 'application/json',
|
|
133
|
-
},
|
|
134
|
-
body: JSON.stringify(body),
|
|
135
|
-
}, "sign-up")];
|
|
136
|
-
case 1:
|
|
137
|
-
response = _a.sent();
|
|
138
|
-
return [2 /*return*/, response.json()];
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
});
|
|
142
|
-
};
|
|
143
124
|
IKEAppAuthApi.prototype.createBiometrics = function (form) {
|
|
144
125
|
return __awaiter(this, void 0, void 0, function () {
|
|
145
126
|
var response;
|
|
@@ -406,6 +387,25 @@ var IKEAppAuthApi = /** @class */ (function (_super) {
|
|
|
406
387
|
});
|
|
407
388
|
});
|
|
408
389
|
};
|
|
390
|
+
IKEAppAuthApi.prototype.verifyIdentity = function (body) {
|
|
391
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
392
|
+
var response;
|
|
393
|
+
return __generator(this, function (_a) {
|
|
394
|
+
switch (_a.label) {
|
|
395
|
+
case 0: return [4 /*yield*/, this.bxbFetch({
|
|
396
|
+
method: 'POST',
|
|
397
|
+
headers: {
|
|
398
|
+
'Content-Type': 'application/json',
|
|
399
|
+
},
|
|
400
|
+
body: JSON.stringify(body),
|
|
401
|
+
}, "verify/identity")];
|
|
402
|
+
case 1:
|
|
403
|
+
response = _a.sent();
|
|
404
|
+
return [2 /*return*/, response.json()];
|
|
405
|
+
}
|
|
406
|
+
});
|
|
407
|
+
});
|
|
408
|
+
};
|
|
409
409
|
return IKEAppAuthApi;
|
|
410
410
|
}(bxb_api_1.default));
|
|
411
411
|
exports.default = IKEAppAuthApi;
|