@frontegg/rest-api 3.1.74 → 3.1.76-alpha.9502349697
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/BaseApiClient.d.ts +16 -0
- package/BaseApiClient.js +39 -0
- package/ContextHolder/index.d.ts +108 -27
- package/ContextHolder/index.js +155 -50
- package/FetchClient.d.ts +42 -0
- package/FetchClient.js +308 -0
- package/account-settings/index.d.ts +19 -7
- package/account-settings/index.js +23 -13
- package/applications/index.d.ts +49 -44
- package/applications/index.js +51 -37
- package/audits/index.d.ts +27 -15
- package/audits/index.js +27 -17
- package/auth/index.d.ts +817 -768
- package/auth/index.js +902 -721
- package/auth/secutiry-poilicy/index.d.ts +58 -102
- package/auth/secutiry-poilicy/index.js +122 -90
- package/auth/utils.d.ts +2 -2
- package/auth/utils.js +9 -8
- package/connectivity/index.d.ts +126 -27
- package/connectivity/index.js +147 -114
- package/directory/index.d.ts +31 -22
- package/directory/index.js +27 -15
- package/entitlements/index.d.ts +14 -8
- package/entitlements/index.js +12 -4
- package/feature-flags/index.d.ts +8 -2
- package/feature-flags/index.js +16 -8
- package/groups/index.d.ts +73 -49
- package/groups/index.js +64 -45
- package/impersonate/index.d.ts +15 -6
- package/impersonate/index.js +13 -5
- package/index.d.ts +154 -108
- package/index.js +109 -78
- package/interfaces.d.ts +10 -0
- package/metadata/index.d.ts +67 -7
- package/metadata/index.js +52 -32
- package/node/BaseApiClient.js +49 -0
- package/node/ContextHolder/index.js +155 -50
- package/node/FetchClient.js +326 -0
- package/node/account-settings/index.js +27 -16
- package/node/applications/index.js +51 -44
- package/node/audits/index.js +31 -20
- package/node/auth/index.js +768 -1035
- package/node/auth/secutiry-poilicy/index.js +125 -136
- package/node/auth/utils.js +9 -7
- package/node/connectivity/index.js +148 -187
- package/node/directory/index.js +29 -20
- package/node/entitlements/index.js +18 -5
- package/node/feature-flags/index.js +21 -9
- package/node/groups/index.js +65 -63
- package/node/impersonate/index.js +18 -5
- package/node/index.js +116 -71
- package/node/metadata/index.js +61 -52
- package/node/notifications/index.js +37 -27
- package/node/reports/index.js +78 -70
- package/node/roles/index.js +56 -51
- package/node/security-center/index.js +21 -9
- package/node/sub-tenants/index.js +90 -89
- package/node/subscriptions/index.js +69 -107
- package/node/subscriptions/invoices.js +25 -17
- package/node/subscriptions/managedSubscriptions.js +32 -27
- package/node/subscriptions/paymentMethods.js +27 -20
- package/node/subscriptions/paymentProviders.js +15 -6
- package/node/subscriptions/plans.js +17 -9
- package/node/subscriptions/providers/stripe/index.js +26 -21
- package/node/subscriptions/subscriptions.js +32 -27
- package/node/subscriptions/summaries.js +15 -6
- package/node/subscriptions/tenantConfiguration.js +17 -9
- package/node/subscriptions/vendorPublicConfigurations.js +15 -6
- package/node/teams/index.js +130 -138
- package/node/tenants/index.js +65 -60
- package/node/user-phone-numbers/index.js +32 -24
- package/node/users/index.js +58 -53
- package/node/vendor/index.js +17 -6
- package/notifications/index.d.ts +22 -16
- package/notifications/index.js +33 -22
- package/package.json +1 -1
- package/reports/index.d.ts +50 -44
- package/reports/index.js +75 -62
- package/roles/index.d.ts +44 -38
- package/roles/index.js +57 -41
- package/security-center/index.d.ts +14 -2
- package/security-center/index.js +15 -6
- package/sub-tenants/index.d.ts +57 -15
- package/sub-tenants/index.js +88 -68
- package/subscriptions/index.d.ts +56 -11
- package/subscriptions/index.js +58 -11
- package/subscriptions/invoices.d.ts +16 -13
- package/subscriptions/invoices.js +24 -14
- package/subscriptions/managedSubscriptions.d.ts +18 -15
- package/subscriptions/managedSubscriptions.js +33 -22
- package/subscriptions/paymentMethods.d.ts +16 -13
- package/subscriptions/paymentMethods.js +26 -17
- package/subscriptions/paymentProviders.d.ts +8 -5
- package/subscriptions/paymentProviders.js +11 -4
- package/subscriptions/plans.d.ts +11 -8
- package/subscriptions/plans.js +14 -6
- package/subscriptions/providers/stripe/index.d.ts +24 -21
- package/subscriptions/providers/stripe/index.js +27 -16
- package/subscriptions/subscriptions.d.ts +24 -21
- package/subscriptions/subscriptions.js +33 -22
- package/subscriptions/summaries.d.ts +7 -4
- package/subscriptions/summaries.js +10 -3
- package/subscriptions/tenantConfiguration.d.ts +6 -3
- package/subscriptions/tenantConfiguration.js +15 -7
- package/subscriptions/vendorPublicConfigurations.d.ts +5 -2
- package/subscriptions/vendorPublicConfigurations.js +11 -4
- package/teams/index.d.ts +35 -131
- package/teams/index.js +122 -93
- package/tenants/index.d.ts +25 -37
- package/tenants/index.js +62 -46
- package/tenants/interfaces.d.ts +2 -0
- package/user-phone-numbers/index.d.ts +32 -26
- package/user-phone-numbers/index.js +32 -19
- package/users/index.d.ts +21 -15
- package/users/index.js +60 -44
- package/vendor/index.d.ts +12 -6
- package/vendor/index.js +11 -4
- package/fetch.d.ts +0 -24
- package/fetch.js +0 -265
- package/node/fetch.js +0 -306
- package/node/subscriptions/providers/index.js +0 -18
- package/subscriptions/providers/index.d.ts +0 -1
- package/subscriptions/providers/index.js +0 -1
|
@@ -3,58 +3,65 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
exports.getApplicationsData = getApplicationsData;
|
|
8
|
-
exports.getTenantsApplications = getTenantsApplications;
|
|
9
|
-
exports.getUserApplicationsId = getUserApplicationsId;
|
|
10
|
-
exports.getUsersApplicationsId = getUsersApplicationsId;
|
|
11
|
-
exports.getUsersOfApplications = getUsersOfApplications;
|
|
12
|
-
exports.unassignUserFromApplications = unassignUserFromApplications;
|
|
6
|
+
exports.default = exports.ApplicationsApi = void 0;
|
|
13
7
|
|
|
14
8
|
var _constants = require("../constants");
|
|
15
9
|
|
|
16
|
-
var
|
|
10
|
+
var _BaseApiClient = require("../BaseApiClient");
|
|
17
11
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return (0, _fetch.Get)(`${_constants.urls.identity.applications.v1}/${userId}/apps`);
|
|
22
|
-
}
|
|
12
|
+
class ApplicationsApi extends _BaseApiClient.BaseApiClient {
|
|
13
|
+
constructor(appName) {
|
|
14
|
+
super(appName);
|
|
23
15
|
|
|
24
|
-
async
|
|
25
|
-
|
|
26
|
-
}) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
});
|
|
30
|
-
}
|
|
16
|
+
this.getUserApplicationsId = async ({
|
|
17
|
+
userId
|
|
18
|
+
}) => {
|
|
19
|
+
return this.get(`${_constants.urls.identity.applications.v1}/${userId}/apps`);
|
|
20
|
+
};
|
|
31
21
|
|
|
32
|
-
async
|
|
33
|
-
|
|
34
|
-
}
|
|
22
|
+
this.getUsersApplicationsId = async ({
|
|
23
|
+
userIds
|
|
24
|
+
}) => {
|
|
25
|
+
return this.get(`${_constants.urls.identity.applications.v1}/users-apps`, {
|
|
26
|
+
userIds: userIds.join(',')
|
|
27
|
+
});
|
|
28
|
+
};
|
|
35
29
|
|
|
36
|
-
async
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}) {
|
|
40
|
-
return (0, _fetch.Get)(_constants.urls.applications.v1, {
|
|
41
|
-
ids: appIds.join(','),
|
|
42
|
-
_includeFreeAccess: includeFreeAccess
|
|
43
|
-
});
|
|
44
|
-
}
|
|
30
|
+
this.getTenantsApplications = async () => {
|
|
31
|
+
return this.get(_constants.urls.applications.tenant.v1);
|
|
32
|
+
};
|
|
45
33
|
|
|
46
|
-
async
|
|
47
|
-
|
|
48
|
-
|
|
34
|
+
this.getApplicationsData = async ({
|
|
35
|
+
appIds,
|
|
36
|
+
includeFreeAccess = true
|
|
37
|
+
}) => {
|
|
38
|
+
return this.get(_constants.urls.applications.v1, {
|
|
39
|
+
ids: appIds.join(','),
|
|
40
|
+
_includeFreeAccess: includeFreeAccess
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
this.assignUserToApplications = async body => {
|
|
45
|
+
return this.post(`${_constants.urls.identity.applications.v1}/apps-user`, body);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
this.unassignUserFromApplications = async body => {
|
|
49
|
+
return this.delete(`${_constants.urls.identity.applications.v1}/user-apps`, body);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
this.getUsersOfApplications = async ({
|
|
53
|
+
appIds
|
|
54
|
+
}) => {
|
|
55
|
+
return this.get(`${_constants.urls.identity.applications.v1}/apps-users`, {
|
|
56
|
+
appIds: appIds.join(',')
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
}
|
|
49
60
|
|
|
50
|
-
async function unassignUserFromApplications(body) {
|
|
51
|
-
return (0, _fetch.Delete)(`${_constants.urls.identity.applications.v1}/user-apps`, body);
|
|
52
61
|
}
|
|
53
62
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
});
|
|
60
|
-
}
|
|
63
|
+
exports.ApplicationsApi = ApplicationsApi;
|
|
64
|
+
|
|
65
|
+
var _default = new ApplicationsApi('default');
|
|
66
|
+
|
|
67
|
+
exports.default = _default;
|
package/node/audits/index.js
CHANGED
|
@@ -5,33 +5,44 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
9
|
-
exports.getAudits = getAudits;
|
|
10
|
-
exports.getAuditsStats = getAuditsStats;
|
|
8
|
+
exports.default = exports.AuditsApi = void 0;
|
|
11
9
|
|
|
12
10
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
13
11
|
|
|
14
|
-
var _fetch = require("../fetch");
|
|
15
|
-
|
|
16
12
|
var _constants = require("../constants");
|
|
17
13
|
|
|
14
|
+
var _BaseApiClient = require("../BaseApiClient");
|
|
15
|
+
|
|
18
16
|
const _excluded = ["endpoint", "headerProps"];
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
class AuditsApi extends _BaseApiClient.BaseApiClient {
|
|
19
|
+
constructor(appName) {
|
|
20
|
+
super(appName);
|
|
21
|
+
|
|
22
|
+
this.getAudits = async params => {
|
|
23
|
+
return this.get(_constants.urls.audits.v1, params);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
this.getAuditsStats = async params => {
|
|
27
|
+
return this.get(`${_constants.urls.audits.v1}/stats`, params);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
this.exportAudits = async params => {
|
|
31
|
+
const {
|
|
32
|
+
endpoint,
|
|
33
|
+
headerProps
|
|
34
|
+
} = params,
|
|
35
|
+
restParams = (0, _objectWithoutPropertiesLoose2.default)(params, _excluded);
|
|
36
|
+
return this.postDownload(`${_constants.urls.audits.v1}/export/${endpoint}`, {
|
|
37
|
+
properties: headerProps
|
|
38
|
+
}, restParams);
|
|
39
|
+
};
|
|
40
|
+
}
|
|
23
41
|
|
|
24
|
-
async function getAuditsStats(params) {
|
|
25
|
-
return (0, _fetch.Get)(`${_constants.urls.audits.v1}/stats`, params);
|
|
26
42
|
}
|
|
27
43
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
restParams = (0, _objectWithoutPropertiesLoose2.default)(params, _excluded);
|
|
34
|
-
return (0, _fetch.PostDownload)(`${_constants.urls.audits.v1}/export/${endpoint}`, {
|
|
35
|
-
properties: headerProps
|
|
36
|
-
}, restParams);
|
|
37
|
-
}
|
|
44
|
+
exports.AuditsApi = AuditsApi;
|
|
45
|
+
|
|
46
|
+
var _default = new AuditsApi('default');
|
|
47
|
+
|
|
48
|
+
exports.default = _default;
|