@frontegg/rest-api 3.0.1 → 3.0.2

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.
Files changed (68) hide show
  1. package/ContextHolder.js +64 -100
  2. package/account-settings/index.js +4 -43
  3. package/audits/index.js +16 -69
  4. package/auth/enums.js +2 -2
  5. package/auth/index.js +352 -2045
  6. package/auth/interfaces.js +1 -1
  7. package/auth/secutiry-poilicy/index.js +45 -254
  8. package/connectivity/index.js +79 -73
  9. package/constants.js +1 -1
  10. package/error.js +9 -33
  11. package/fetch.js +159 -519
  12. package/index.js +26 -26
  13. package/jwt.js +19 -45
  14. package/metadata/index.js +18 -160
  15. package/node/ContextHolder.js +68 -104
  16. package/node/account-settings/index.js +4 -46
  17. package/node/audits/index.js +15 -68
  18. package/node/auth/enums.js +2 -2
  19. package/node/auth/index.js +481 -2099
  20. package/node/auth/interfaces.js +2 -2
  21. package/node/auth/secutiry-poilicy/index.js +36 -240
  22. package/node/connectivity/index.js +78 -71
  23. package/node/constants.js +1 -1
  24. package/node/error.js +9 -38
  25. package/node/fetch.js +166 -521
  26. package/node/index.js +47 -49
  27. package/node/jwt.js +19 -51
  28. package/node/metadata/index.js +19 -163
  29. package/node/notifications/index.js +18 -94
  30. package/node/reports/index.js +62 -171
  31. package/node/roles/index.js +34 -172
  32. package/node/routers.js +2 -2
  33. package/node/sub-tenants/index.js +12 -126
  34. package/node/subscriptions/enums.js +4 -4
  35. package/node/subscriptions/index.js +10 -10
  36. package/node/subscriptions/interfaces.js +1 -1
  37. package/node/subscriptions/invoices.js +10 -70
  38. package/node/subscriptions/managedSubscriptions.js +16 -111
  39. package/node/subscriptions/paymentMethods.js +15 -69
  40. package/node/subscriptions/paymentProviders.js +2 -26
  41. package/node/subscriptions/plans.js +4 -46
  42. package/node/subscriptions/providers/index.js +1 -1
  43. package/node/subscriptions/providers/stripe/index.js +10 -106
  44. package/node/subscriptions/subscriptions.js +16 -111
  45. package/node/subscriptions/summaries.js +2 -26
  46. package/node/subscriptions/tenantConfiguration.js +4 -46
  47. package/node/teams/index.js +57 -406
  48. package/node/tenants/index.js +8 -86
  49. package/node/vendor/index.js +2 -26
  50. package/notifications/index.js +18 -93
  51. package/package.json +1 -1
  52. package/reports/index.js +65 -175
  53. package/roles/index.js +34 -175
  54. package/routers.js +2 -2
  55. package/sub-tenants/index.js +12 -127
  56. package/subscriptions/enums.js +4 -4
  57. package/subscriptions/invoices.js +12 -70
  58. package/subscriptions/managedSubscriptions.js +20 -115
  59. package/subscriptions/paymentMethods.js +16 -70
  60. package/subscriptions/paymentProviders.js +2 -22
  61. package/subscriptions/plans.js +4 -43
  62. package/subscriptions/providers/stripe/index.js +10 -106
  63. package/subscriptions/subscriptions.js +20 -115
  64. package/subscriptions/summaries.js +2 -22
  65. package/subscriptions/tenantConfiguration.js +4 -43
  66. package/teams/index.js +55 -421
  67. package/tenants/index.js +8 -85
  68. package/vendor/index.js +2 -23
@@ -9,82 +9,29 @@ exports.exportAudits = exportAudits;
9
9
  exports.getAudits = getAudits;
10
10
  exports.getAuditsStats = getAuditsStats;
11
11
 
12
- var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
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
- function getAudits(_x) {
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 getAuditsStats(_x2) {
45
- return _getAuditsStats.apply(this, arguments);
20
+ async function getAudits(params) {
21
+ return (0, _fetch.Get)(_constants.urls.audits.v1, params);
46
22
  }
47
23
 
48
- function _getAuditsStats() {
49
- _getAuditsStats = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee2(params) {
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(_x3) {
67
- return _exportAudits.apply(this, arguments);
68
- }
69
-
70
- function _exportAudits() {
71
- _exportAudits = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee3(params) {
72
- var endpoint, headerProps, restParams;
73
- return _regenerator["default"].wrap(function _callee3$(_context3) {
74
- while (1) {
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
  }
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.SocialLoginProviders = exports.AuthStrategyEnum = void 0;
7
- var SocialLoginProviders;
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
- var AuthStrategyEnum;
17
+ let AuthStrategyEnum;
18
18
  exports.AuthStrategyEnum = AuthStrategyEnum;
19
19
 
20
20
  (function (AuthStrategyEnum) {