@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.
Files changed (69) hide show
  1. package/ContextHolder.js +67 -101
  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.d.ts +4 -0
  6. package/auth/index.js +354 -2044
  7. package/auth/interfaces.js +1 -1
  8. package/auth/secutiry-poilicy/index.js +45 -254
  9. package/connectivity/index.js +79 -73
  10. package/constants.js +1 -1
  11. package/error.js +9 -33
  12. package/fetch.js +165 -519
  13. package/index.js +26 -26
  14. package/jwt.js +19 -45
  15. package/metadata/index.js +19 -159
  16. package/node/ContextHolder.js +68 -104
  17. package/node/account-settings/index.js +4 -46
  18. package/node/audits/index.js +15 -68
  19. package/node/auth/enums.js +2 -2
  20. package/node/auth/index.js +487 -2099
  21. package/node/auth/interfaces.js +2 -2
  22. package/node/auth/secutiry-poilicy/index.js +36 -240
  23. package/node/connectivity/index.js +78 -71
  24. package/node/constants.js +1 -1
  25. package/node/error.js +9 -38
  26. package/node/fetch.js +166 -521
  27. package/node/index.js +47 -49
  28. package/node/jwt.js +19 -51
  29. package/node/metadata/index.js +19 -163
  30. package/node/notifications/index.js +18 -94
  31. package/node/reports/index.js +62 -171
  32. package/node/roles/index.js +34 -172
  33. package/node/routers.js +2 -2
  34. package/node/sub-tenants/index.js +12 -126
  35. package/node/subscriptions/enums.js +4 -4
  36. package/node/subscriptions/index.js +10 -10
  37. package/node/subscriptions/interfaces.js +1 -1
  38. package/node/subscriptions/invoices.js +10 -70
  39. package/node/subscriptions/managedSubscriptions.js +16 -111
  40. package/node/subscriptions/paymentMethods.js +15 -69
  41. package/node/subscriptions/paymentProviders.js +2 -26
  42. package/node/subscriptions/plans.js +4 -46
  43. package/node/subscriptions/providers/index.js +1 -1
  44. package/node/subscriptions/providers/stripe/index.js +10 -106
  45. package/node/subscriptions/subscriptions.js +16 -111
  46. package/node/subscriptions/summaries.js +2 -26
  47. package/node/subscriptions/tenantConfiguration.js +4 -46
  48. package/node/teams/index.js +57 -406
  49. package/node/tenants/index.js +8 -86
  50. package/node/vendor/index.js +2 -26
  51. package/notifications/index.js +18 -93
  52. package/package.json +1 -1
  53. package/reports/index.js +65 -175
  54. package/roles/index.js +34 -175
  55. package/routers.js +2 -2
  56. package/sub-tenants/index.js +12 -127
  57. package/subscriptions/enums.js +4 -4
  58. package/subscriptions/invoices.js +12 -70
  59. package/subscriptions/managedSubscriptions.js +20 -115
  60. package/subscriptions/paymentMethods.js +16 -70
  61. package/subscriptions/paymentProviders.js +2 -22
  62. package/subscriptions/plans.js +4 -43
  63. package/subscriptions/providers/stripe/index.js +10 -106
  64. package/subscriptions/subscriptions.js +20 -115
  65. package/subscriptions/summaries.js +2 -22
  66. package/subscriptions/tenantConfiguration.js +4 -43
  67. package/teams/index.js +56 -420
  68. package/tenants/index.js +8 -85
  69. 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) {