@frontegg/rest-api 3.0.1 → 3.0.4
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/ContextHolder.js +67 -101
- package/account-settings/index.js +4 -43
- package/audits/index.js +16 -69
- package/auth/enums.js +2 -2
- package/auth/index.d.ts +4 -0
- package/auth/index.js +354 -2044
- package/auth/interfaces.js +1 -1
- package/auth/secutiry-poilicy/index.js +45 -254
- package/connectivity/index.js +79 -73
- package/constants.js +1 -1
- package/error.js +9 -33
- package/fetch.js +165 -519
- package/index.js +26 -26
- package/jwt.js +19 -45
- package/metadata/index.js +19 -159
- package/node/ContextHolder.js +68 -104
- package/node/account-settings/index.js +4 -46
- package/node/audits/index.js +15 -68
- package/node/auth/enums.js +2 -2
- package/node/auth/index.js +487 -2099
- package/node/auth/interfaces.js +2 -2
- package/node/auth/secutiry-poilicy/index.js +36 -240
- package/node/connectivity/index.js +78 -71
- package/node/constants.js +1 -1
- package/node/error.js +9 -38
- package/node/fetch.js +166 -521
- package/node/index.js +47 -49
- package/node/jwt.js +19 -51
- package/node/metadata/index.js +19 -163
- package/node/notifications/index.js +18 -94
- package/node/reports/index.js +62 -171
- package/node/roles/index.js +34 -172
- package/node/routers.js +2 -2
- package/node/sub-tenants/index.js +12 -126
- package/node/subscriptions/enums.js +4 -4
- package/node/subscriptions/index.js +10 -10
- package/node/subscriptions/interfaces.js +1 -1
- package/node/subscriptions/invoices.js +10 -70
- package/node/subscriptions/managedSubscriptions.js +16 -111
- package/node/subscriptions/paymentMethods.js +15 -69
- package/node/subscriptions/paymentProviders.js +2 -26
- package/node/subscriptions/plans.js +4 -46
- package/node/subscriptions/providers/index.js +1 -1
- package/node/subscriptions/providers/stripe/index.js +10 -106
- package/node/subscriptions/subscriptions.js +16 -111
- package/node/subscriptions/summaries.js +2 -26
- package/node/subscriptions/tenantConfiguration.js +4 -46
- package/node/teams/index.js +57 -406
- package/node/tenants/index.js +8 -86
- package/node/vendor/index.js +2 -26
- package/notifications/index.js +18 -93
- package/package.json +1 -1
- package/reports/index.js +65 -175
- package/roles/index.js +34 -175
- package/routers.js +2 -2
- package/sub-tenants/index.js +12 -127
- package/subscriptions/enums.js +4 -4
- package/subscriptions/invoices.js +12 -70
- package/subscriptions/managedSubscriptions.js +20 -115
- package/subscriptions/paymentMethods.js +16 -70
- package/subscriptions/paymentProviders.js +2 -22
- package/subscriptions/plans.js +4 -43
- package/subscriptions/providers/stripe/index.js +10 -106
- package/subscriptions/subscriptions.js +20 -115
- package/subscriptions/summaries.js +2 -22
- package/subscriptions/tenantConfiguration.js +4 -43
- package/teams/index.js +56 -420
- package/tenants/index.js +8 -85
- package/vendor/index.js +2 -23
package/node/audits/index.js
CHANGED
|
@@ -9,82 +9,29 @@ exports.exportAudits = exportAudits;
|
|
|
9
9
|
exports.getAudits = getAudits;
|
|
10
10
|
exports.getAuditsStats = getAuditsStats;
|
|
11
11
|
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
|
-
|
|
16
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
12
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
17
13
|
|
|
18
14
|
var _fetch = require("../fetch");
|
|
19
15
|
|
|
20
16
|
var _constants = require("../constants");
|
|
21
17
|
|
|
22
|
-
|
|
23
|
-
return _getAudits.apply(this, arguments);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function _getAudits() {
|
|
27
|
-
_getAudits = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(params) {
|
|
28
|
-
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
29
|
-
while (1) {
|
|
30
|
-
switch (_context.prev = _context.next) {
|
|
31
|
-
case 0:
|
|
32
|
-
return _context.abrupt("return", (0, _fetch.Get)(_constants.urls.audits.v1, params));
|
|
33
|
-
|
|
34
|
-
case 1:
|
|
35
|
-
case "end":
|
|
36
|
-
return _context.stop();
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}, _callee);
|
|
40
|
-
}));
|
|
41
|
-
return _getAudits.apply(this, arguments);
|
|
42
|
-
}
|
|
18
|
+
const _excluded = ["endpoint", "headerProps"];
|
|
43
19
|
|
|
44
|
-
function
|
|
45
|
-
return
|
|
20
|
+
async function getAudits(params) {
|
|
21
|
+
return (0, _fetch.Get)(_constants.urls.audits.v1, params);
|
|
46
22
|
}
|
|
47
23
|
|
|
48
|
-
function
|
|
49
|
-
|
|
50
|
-
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
51
|
-
while (1) {
|
|
52
|
-
switch (_context2.prev = _context2.next) {
|
|
53
|
-
case 0:
|
|
54
|
-
return _context2.abrupt("return", (0, _fetch.Get)("".concat(_constants.urls.audits.v1, "/stats"), params));
|
|
55
|
-
|
|
56
|
-
case 1:
|
|
57
|
-
case "end":
|
|
58
|
-
return _context2.stop();
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}, _callee2);
|
|
62
|
-
}));
|
|
63
|
-
return _getAuditsStats.apply(this, arguments);
|
|
24
|
+
async function getAuditsStats(params) {
|
|
25
|
+
return (0, _fetch.Get)(`${_constants.urls.audits.v1}/stats`, params);
|
|
64
26
|
}
|
|
65
27
|
|
|
66
|
-
function exportAudits(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
switch (_context3.prev = _context3.next) {
|
|
76
|
-
case 0:
|
|
77
|
-
endpoint = params.endpoint, headerProps = params.headerProps, restParams = (0, _objectWithoutProperties2["default"])(params, ["endpoint", "headerProps"]);
|
|
78
|
-
return _context3.abrupt("return", (0, _fetch.PostDownload)("".concat(_constants.urls.audits.v1, "/export/").concat(endpoint), {
|
|
79
|
-
properties: headerProps
|
|
80
|
-
}, restParams));
|
|
81
|
-
|
|
82
|
-
case 2:
|
|
83
|
-
case "end":
|
|
84
|
-
return _context3.stop();
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}, _callee3);
|
|
88
|
-
}));
|
|
89
|
-
return _exportAudits.apply(this, arguments);
|
|
28
|
+
async function exportAudits(params) {
|
|
29
|
+
const {
|
|
30
|
+
endpoint,
|
|
31
|
+
headerProps
|
|
32
|
+
} = params,
|
|
33
|
+
restParams = (0, _objectWithoutPropertiesLoose2.default)(params, _excluded);
|
|
34
|
+
return (0, _fetch.PostDownload)(`${_constants.urls.audits.v1}/export/${endpoint}`, {
|
|
35
|
+
properties: headerProps
|
|
36
|
+
}, restParams);
|
|
90
37
|
}
|
package/node/auth/enums.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.SocialLoginProviders = exports.AuthStrategyEnum = void 0;
|
|
7
|
-
|
|
7
|
+
let SocialLoginProviders;
|
|
8
8
|
exports.SocialLoginProviders = SocialLoginProviders;
|
|
9
9
|
|
|
10
10
|
(function (SocialLoginProviders) {
|
|
@@ -14,7 +14,7 @@ exports.SocialLoginProviders = SocialLoginProviders;
|
|
|
14
14
|
SocialLoginProviders["Github"] = "github";
|
|
15
15
|
})(SocialLoginProviders || (exports.SocialLoginProviders = SocialLoginProviders = {}));
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
let AuthStrategyEnum;
|
|
18
18
|
exports.AuthStrategyEnum = AuthStrategyEnum;
|
|
19
19
|
|
|
20
20
|
(function (AuthStrategyEnum) {
|