oro-sdk-apis 1.0.0 → 1.1.0
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/dist/models/error.d.ts +2 -0
- package/dist/oro-sdk-apis.cjs.development.js +28 -15
- package/dist/oro-sdk-apis.cjs.development.js.map +1 -1
- package/dist/oro-sdk-apis.cjs.production.min.js +1 -1
- package/dist/oro-sdk-apis.cjs.production.min.js.map +1 -1
- package/dist/oro-sdk-apis.esm.js +28 -16
- package/dist/oro-sdk-apis.esm.js.map +1 -1
- package/dist/services/guard.d.ts +2 -2
- package/package.json +1 -1
- package/src/models/error.ts +1 -0
- package/src/services/guard.ts +12 -22
- package/LICENSE +0 -21
package/dist/models/error.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export declare class AuthenticationBadRequest extends Error {
|
|
|
4
4
|
}
|
|
5
5
|
export declare class AuthenticationServerError extends Error {
|
|
6
6
|
}
|
|
7
|
+
export declare class AuthenticationUnconfirmedEmail extends Error {
|
|
8
|
+
}
|
|
7
9
|
export declare class IdentityCreationFailed extends Error {
|
|
8
10
|
}
|
|
9
11
|
export declare class IdentityCreationBadRequest extends Error {
|
|
@@ -1235,29 +1235,38 @@ var AuthenticationServerError = /*#__PURE__*/function (_Error3) {
|
|
|
1235
1235
|
|
|
1236
1236
|
return AuthenticationServerError;
|
|
1237
1237
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
1238
|
-
var
|
|
1239
|
-
_inheritsLoose(
|
|
1238
|
+
var AuthenticationUnconfirmedEmail = /*#__PURE__*/function (_Error4) {
|
|
1239
|
+
_inheritsLoose(AuthenticationUnconfirmedEmail, _Error4);
|
|
1240
1240
|
|
|
1241
|
-
function
|
|
1241
|
+
function AuthenticationUnconfirmedEmail() {
|
|
1242
1242
|
return _Error4.apply(this, arguments) || this;
|
|
1243
1243
|
}
|
|
1244
1244
|
|
|
1245
|
+
return AuthenticationUnconfirmedEmail;
|
|
1246
|
+
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
1247
|
+
var IdentityCreationFailed = /*#__PURE__*/function (_Error5) {
|
|
1248
|
+
_inheritsLoose(IdentityCreationFailed, _Error5);
|
|
1249
|
+
|
|
1250
|
+
function IdentityCreationFailed() {
|
|
1251
|
+
return _Error5.apply(this, arguments) || this;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1245
1254
|
return IdentityCreationFailed;
|
|
1246
1255
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
1247
|
-
var IdentityCreationBadRequest = /*#__PURE__*/function (
|
|
1248
|
-
_inheritsLoose(IdentityCreationBadRequest,
|
|
1256
|
+
var IdentityCreationBadRequest = /*#__PURE__*/function (_Error6) {
|
|
1257
|
+
_inheritsLoose(IdentityCreationBadRequest, _Error6);
|
|
1249
1258
|
|
|
1250
1259
|
function IdentityCreationBadRequest() {
|
|
1251
|
-
return
|
|
1260
|
+
return _Error6.apply(this, arguments) || this;
|
|
1252
1261
|
}
|
|
1253
1262
|
|
|
1254
1263
|
return IdentityCreationBadRequest;
|
|
1255
1264
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
1256
|
-
var IdentityCreationConflict = /*#__PURE__*/function (
|
|
1257
|
-
_inheritsLoose(IdentityCreationConflict,
|
|
1265
|
+
var IdentityCreationConflict = /*#__PURE__*/function (_Error7) {
|
|
1266
|
+
_inheritsLoose(IdentityCreationConflict, _Error7);
|
|
1258
1267
|
|
|
1259
1268
|
function IdentityCreationConflict() {
|
|
1260
|
-
return
|
|
1269
|
+
return _Error7.apply(this, arguments) || this;
|
|
1261
1270
|
}
|
|
1262
1271
|
|
|
1263
1272
|
return IdentityCreationConflict;
|
|
@@ -1793,7 +1802,7 @@ var GuardService = /*#__PURE__*/function () {
|
|
|
1793
1802
|
accessToken: resp.accessToken,
|
|
1794
1803
|
refreshToken: resp.refreshToken
|
|
1795
1804
|
});
|
|
1796
|
-
_context.next =
|
|
1805
|
+
_context.next = 20;
|
|
1797
1806
|
break;
|
|
1798
1807
|
|
|
1799
1808
|
case 8:
|
|
@@ -1801,31 +1810,34 @@ var GuardService = /*#__PURE__*/function () {
|
|
|
1801
1810
|
_context.t0 = _context["catch"](0);
|
|
1802
1811
|
|
|
1803
1812
|
if (!_context.t0.isAxiosError) {
|
|
1804
|
-
_context.next =
|
|
1813
|
+
_context.next = 19;
|
|
1805
1814
|
break;
|
|
1806
1815
|
}
|
|
1807
1816
|
|
|
1808
1817
|
code = (_e$response = _context.t0.response) == null ? void 0 : _e$response.status;
|
|
1809
1818
|
_context.t1 = code;
|
|
1810
|
-
_context.next = _context.t1 === 400 ? 15 : _context.t1 ===
|
|
1819
|
+
_context.next = _context.t1 === 400 ? 15 : _context.t1 === 424 ? 16 : _context.t1 === 500 ? 17 : _context.t1 === 401 ? 18 : 18;
|
|
1811
1820
|
break;
|
|
1812
1821
|
|
|
1813
1822
|
case 15:
|
|
1814
1823
|
throw new AuthenticationBadRequest();
|
|
1815
1824
|
|
|
1816
1825
|
case 16:
|
|
1817
|
-
throw new
|
|
1826
|
+
throw new AuthenticationUnconfirmedEmail();
|
|
1818
1827
|
|
|
1819
1828
|
case 17:
|
|
1820
|
-
throw new
|
|
1829
|
+
throw new AuthenticationServerError();
|
|
1821
1830
|
|
|
1822
1831
|
case 18:
|
|
1823
1832
|
throw new AuthenticationFailed();
|
|
1824
1833
|
|
|
1825
1834
|
case 19:
|
|
1826
|
-
|
|
1835
|
+
throw new AuthenticationFailed();
|
|
1827
1836
|
|
|
1828
1837
|
case 20:
|
|
1838
|
+
return _context.abrupt("return", resp);
|
|
1839
|
+
|
|
1840
|
+
case 21:
|
|
1829
1841
|
case "end":
|
|
1830
1842
|
return _context.stop();
|
|
1831
1843
|
}
|
|
@@ -3004,6 +3016,7 @@ exports.APIService = APIService;
|
|
|
3004
3016
|
exports.AuthenticationBadRequest = AuthenticationBadRequest;
|
|
3005
3017
|
exports.AuthenticationFailed = AuthenticationFailed;
|
|
3006
3018
|
exports.AuthenticationServerError = AuthenticationServerError;
|
|
3019
|
+
exports.AuthenticationUnconfirmedEmail = AuthenticationUnconfirmedEmail;
|
|
3007
3020
|
exports.AxiosService = AxiosService;
|
|
3008
3021
|
exports.ConsultService = ConsultService;
|
|
3009
3022
|
exports.DiagnosisService = DiagnosisService;
|