@frontegg/rest-api 3.0.92 → 3.0.94
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/constants.d.ts +4 -3
- package/constants.js +4 -3
- package/groups/enums.d.ts +4 -0
- package/groups/enums.js +8 -1
- package/groups/index.d.ts +5 -1
- package/groups/index.js +9 -4
- package/groups/interfaces.d.ts +6 -1
- package/index.d.ts +1 -0
- package/index.js +2 -1
- package/node/constants.js +4 -3
- package/node/groups/enums.js +10 -2
- package/node/groups/index.js +11 -4
- package/node/index.js +15 -1
- package/package.json +1 -1
package/constants.d.ts
CHANGED
package/constants.js
CHANGED
|
@@ -83,12 +83,13 @@ export const urls = {
|
|
|
83
83
|
v1: '/identity/resources/impersonation/v1'
|
|
84
84
|
},
|
|
85
85
|
groups: {
|
|
86
|
+
v1: '/identity/resources/groups/v1',
|
|
86
87
|
configurations: {
|
|
87
88
|
v1: '/identity/resources/groups/v1/config'
|
|
88
89
|
},
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
getByIds: {
|
|
91
|
+
v1: '/identity/resources/groups/v1/bulkGet'
|
|
92
|
+
}
|
|
92
93
|
}
|
|
93
94
|
},
|
|
94
95
|
team: {
|
package/groups/enums.d.ts
CHANGED
package/groups/enums.js
CHANGED
|
@@ -4,4 +4,11 @@ export let GroupRelations;
|
|
|
4
4
|
GroupRelations["roles"] = "roles";
|
|
5
5
|
GroupRelations["users"] = "users";
|
|
6
6
|
GroupRelations["rolesAndUsers"] = "rolesAndUsers";
|
|
7
|
-
})(GroupRelations || (GroupRelations = {}));
|
|
7
|
+
})(GroupRelations || (GroupRelations = {}));
|
|
8
|
+
|
|
9
|
+
export let GroupManagedByEnum;
|
|
10
|
+
|
|
11
|
+
(function (GroupManagedByEnum) {
|
|
12
|
+
GroupManagedByEnum["FRONTEGG"] = "frontegg";
|
|
13
|
+
GroupManagedByEnum["SCIM2"] = "scim2";
|
|
14
|
+
})(GroupManagedByEnum || (GroupManagedByEnum = {}));
|
package/groups/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ICreateGroup, ICreateGroupResponse, IGetGroup, IGetGroupQueryOptions, IGroupConfigResponse, IGroupResponse, IUpdateGroup, IUpdateGroupConfig, IUpdateGroupRoles, IUpdateGroupUsers } from "./interfaces";
|
|
1
|
+
import { ICreateGroup, ICreateGroupResponse, IGetGroup, IGetGroupQueryOptions, IGetGroupsByIds, IGroupConfigResponse, IGroupResponse, IUpdateGroup, IUpdateGroupConfig, IUpdateGroupRoles, IUpdateGroupUsers } from "./interfaces";
|
|
2
2
|
/**
|
|
3
3
|
* Get group by given id
|
|
4
4
|
*/
|
|
@@ -7,6 +7,10 @@ export declare function getGroupById({ groupId }: IGetGroup, query?: IGetGroupQu
|
|
|
7
7
|
* Get all tenant groups
|
|
8
8
|
*/
|
|
9
9
|
export declare function getGroups(query?: IGetGroupQueryOptions): Promise<IGroupResponse[]>;
|
|
10
|
+
/**
|
|
11
|
+
* Get groups by ids
|
|
12
|
+
*/
|
|
13
|
+
export declare function getGroupsByIds(body: IGetGroupsByIds, params?: IGetGroupQueryOptions): Promise<IGroupResponse[]>;
|
|
10
14
|
/**
|
|
11
15
|
* Create new group
|
|
12
16
|
*/
|
package/groups/index.js
CHANGED
|
@@ -11,6 +11,11 @@ export async function getGroupById({
|
|
|
11
11
|
export async function getGroups(query) {
|
|
12
12
|
return Get(`${urls.identity.groups.v1}`, _extends({}, query));
|
|
13
13
|
}
|
|
14
|
+
export async function getGroupsByIds(body, params) {
|
|
15
|
+
return Post(`${urls.identity.groups.getByIds.v1}`, body, {
|
|
16
|
+
params
|
|
17
|
+
});
|
|
18
|
+
}
|
|
14
19
|
export async function createGroup(body) {
|
|
15
20
|
return Post(`${urls.identity.groups.v1}`, body);
|
|
16
21
|
}
|
|
@@ -26,16 +31,16 @@ export async function deleteGroup(groupId) {
|
|
|
26
31
|
return Delete(`${urls.identity.groups.v1}/${groupId}`);
|
|
27
32
|
}
|
|
28
33
|
export async function addRolesToGroup(groupId, body) {
|
|
29
|
-
return Post(`${urls.identity.groups.v1}/${groupId}
|
|
34
|
+
return Post(`${urls.identity.groups.v1}/${groupId}/roles`, body);
|
|
30
35
|
}
|
|
31
36
|
export async function deleteRolesFromGroup(groupId, body) {
|
|
32
|
-
return Delete(`${urls.identity.groups.v1}/${groupId}
|
|
37
|
+
return Delete(`${urls.identity.groups.v1}/${groupId}/roles`, body);
|
|
33
38
|
}
|
|
34
39
|
export async function addUsersToGroup(groupId, body) {
|
|
35
|
-
return Post(`${urls.identity.groups.v1}/${groupId}
|
|
40
|
+
return Post(`${urls.identity.groups.v1}/${groupId}/users`, body);
|
|
36
41
|
}
|
|
37
42
|
export async function deleteUsersFromGroup(groupId, body) {
|
|
38
|
-
return Delete(`${urls.identity.groups.v1}/${groupId}
|
|
43
|
+
return Delete(`${urls.identity.groups.v1}/${groupId}/users`, body);
|
|
39
44
|
}
|
|
40
45
|
export async function getGroupConfiguration() {
|
|
41
46
|
return Get(`${urls.identity.groups.configurations.v1}`);
|
package/groups/interfaces.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IRole } from "../roles/interfaces";
|
|
2
|
-
import { GroupRelations } from "./enums";
|
|
2
|
+
import { GroupManagedByEnum, GroupRelations } from "./enums";
|
|
3
3
|
export declare type IGetGroup = {
|
|
4
4
|
groupId: string;
|
|
5
5
|
};
|
|
@@ -19,6 +19,7 @@ export declare type IGroupResponse = {
|
|
|
19
19
|
metadata?: string;
|
|
20
20
|
roles?: IRole[];
|
|
21
21
|
users?: IGroupUser[];
|
|
22
|
+
managedBy: GroupManagedByEnum;
|
|
22
23
|
};
|
|
23
24
|
export declare type ICreateGroup = {
|
|
24
25
|
name: string;
|
|
@@ -32,6 +33,7 @@ export declare type ICreateGroupResponse = {
|
|
|
32
33
|
color?: string;
|
|
33
34
|
description?: string;
|
|
34
35
|
metadata?: string;
|
|
36
|
+
managedBy: GroupManagedByEnum;
|
|
35
37
|
};
|
|
36
38
|
export declare type IUpdateGroup = {
|
|
37
39
|
groupId: string;
|
|
@@ -57,3 +59,6 @@ export declare type IUpdateGroupUsers = {
|
|
|
57
59
|
export declare type IGetGroupQueryOptions = {
|
|
58
60
|
_groupsRelations?: GroupRelations;
|
|
59
61
|
};
|
|
62
|
+
export declare type IGetGroupsByIds = {
|
|
63
|
+
groupsIds: string[];
|
|
64
|
+
};
|
package/index.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ export * from "./directory";
|
|
|
39
39
|
export * from "./directory/interfaces";
|
|
40
40
|
export * from "./impersonate/interfaces";
|
|
41
41
|
export * from "./groups/interfaces";
|
|
42
|
+
export * from "./groups/enums";
|
|
42
43
|
import { AuthStrategyEnum, SocialLoginProviders, MachineToMachineAuthStrategy } from "./auth";
|
|
43
44
|
import { ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType } from "./subscriptions";
|
|
44
45
|
declare const api: {
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license Frontegg v3.0.
|
|
1
|
+
/** @license Frontegg v3.0.94
|
|
2
2
|
*
|
|
3
3
|
* This source code is licensed under the MIT license found in the
|
|
4
4
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -44,6 +44,7 @@ export * from "./directory";
|
|
|
44
44
|
export * from "./directory/interfaces";
|
|
45
45
|
export * from "./impersonate/interfaces";
|
|
46
46
|
export * from "./groups/interfaces";
|
|
47
|
+
export * from "./groups/enums";
|
|
47
48
|
import { AuthStrategyEnum, SocialLoginProviders, MachineToMachineAuthStrategy } from "./auth";
|
|
48
49
|
import { ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType } from "./subscriptions";
|
|
49
50
|
const api = {
|
package/node/constants.js
CHANGED
|
@@ -89,12 +89,13 @@ const urls = {
|
|
|
89
89
|
v1: '/identity/resources/impersonation/v1'
|
|
90
90
|
},
|
|
91
91
|
groups: {
|
|
92
|
+
v1: '/identity/resources/groups/v1',
|
|
92
93
|
configurations: {
|
|
93
94
|
v1: '/identity/resources/groups/v1/config'
|
|
94
95
|
},
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
getByIds: {
|
|
97
|
+
v1: '/identity/resources/groups/v1/bulkGet'
|
|
98
|
+
}
|
|
98
99
|
}
|
|
99
100
|
},
|
|
100
101
|
team: {
|
package/node/groups/enums.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.GroupRelations = void 0;
|
|
6
|
+
exports.GroupRelations = exports.GroupManagedByEnum = void 0;
|
|
7
7
|
let GroupRelations;
|
|
8
8
|
exports.GroupRelations = GroupRelations;
|
|
9
9
|
|
|
@@ -11,4 +11,12 @@ exports.GroupRelations = GroupRelations;
|
|
|
11
11
|
GroupRelations["roles"] = "roles";
|
|
12
12
|
GroupRelations["users"] = "users";
|
|
13
13
|
GroupRelations["rolesAndUsers"] = "rolesAndUsers";
|
|
14
|
-
})(GroupRelations || (exports.GroupRelations = GroupRelations = {}));
|
|
14
|
+
})(GroupRelations || (exports.GroupRelations = GroupRelations = {}));
|
|
15
|
+
|
|
16
|
+
let GroupManagedByEnum;
|
|
17
|
+
exports.GroupManagedByEnum = GroupManagedByEnum;
|
|
18
|
+
|
|
19
|
+
(function (GroupManagedByEnum) {
|
|
20
|
+
GroupManagedByEnum["FRONTEGG"] = "frontegg";
|
|
21
|
+
GroupManagedByEnum["SCIM2"] = "scim2";
|
|
22
|
+
})(GroupManagedByEnum || (exports.GroupManagedByEnum = GroupManagedByEnum = {}));
|
package/node/groups/index.js
CHANGED
|
@@ -14,6 +14,7 @@ exports.deleteUsersFromGroup = deleteUsersFromGroup;
|
|
|
14
14
|
exports.getGroupById = getGroupById;
|
|
15
15
|
exports.getGroupConfiguration = getGroupConfiguration;
|
|
16
16
|
exports.getGroups = getGroups;
|
|
17
|
+
exports.getGroupsByIds = getGroupsByIds;
|
|
17
18
|
exports.updateGroup = updateGroup;
|
|
18
19
|
exports.updateGroupConfiguration = updateGroupConfiguration;
|
|
19
20
|
|
|
@@ -37,6 +38,12 @@ async function getGroups(query) {
|
|
|
37
38
|
return (0, _fetch.Get)(`${_constants.urls.identity.groups.v1}`, (0, _extends2.default)({}, query));
|
|
38
39
|
}
|
|
39
40
|
|
|
41
|
+
async function getGroupsByIds(body, params) {
|
|
42
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.groups.getByIds.v1}`, body, {
|
|
43
|
+
params
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
40
47
|
async function createGroup(body) {
|
|
41
48
|
return (0, _fetch.Post)(`${_constants.urls.identity.groups.v1}`, body);
|
|
42
49
|
}
|
|
@@ -54,19 +61,19 @@ async function deleteGroup(groupId) {
|
|
|
54
61
|
}
|
|
55
62
|
|
|
56
63
|
async function addRolesToGroup(groupId, body) {
|
|
57
|
-
return (0, _fetch.Post)(`${_constants.urls.identity.groups.v1}/${groupId}
|
|
64
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.groups.v1}/${groupId}/roles`, body);
|
|
58
65
|
}
|
|
59
66
|
|
|
60
67
|
async function deleteRolesFromGroup(groupId, body) {
|
|
61
|
-
return (0, _fetch.Delete)(`${_constants.urls.identity.groups.v1}/${groupId}
|
|
68
|
+
return (0, _fetch.Delete)(`${_constants.urls.identity.groups.v1}/${groupId}/roles`, body);
|
|
62
69
|
}
|
|
63
70
|
|
|
64
71
|
async function addUsersToGroup(groupId, body) {
|
|
65
|
-
return (0, _fetch.Post)(`${_constants.urls.identity.groups.v1}/${groupId}
|
|
72
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.groups.v1}/${groupId}/users`, body);
|
|
66
73
|
}
|
|
67
74
|
|
|
68
75
|
async function deleteUsersFromGroup(groupId, body) {
|
|
69
|
-
return (0, _fetch.Delete)(`${_constants.urls.identity.groups.v1}/${groupId}
|
|
76
|
+
return (0, _fetch.Delete)(`${_constants.urls.identity.groups.v1}/${groupId}/users`, body);
|
|
70
77
|
}
|
|
71
78
|
|
|
72
79
|
async function getGroupConfiguration() {
|
package/node/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license Frontegg v3.0.
|
|
1
|
+
/** @license Frontegg v3.0.94
|
|
2
2
|
*
|
|
3
3
|
* This source code is licensed under the MIT license found in the
|
|
4
4
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -416,6 +416,20 @@ Object.keys(_interfaces18).forEach(function (key) {
|
|
|
416
416
|
});
|
|
417
417
|
});
|
|
418
418
|
|
|
419
|
+
var _enums = require("./groups/enums");
|
|
420
|
+
|
|
421
|
+
Object.keys(_enums).forEach(function (key) {
|
|
422
|
+
if (key === "default" || key === "__esModule") return;
|
|
423
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
424
|
+
if (key in exports && exports[key] === _enums[key]) return;
|
|
425
|
+
Object.defineProperty(exports, key, {
|
|
426
|
+
enumerable: true,
|
|
427
|
+
get: function () {
|
|
428
|
+
return _enums[key];
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
});
|
|
432
|
+
|
|
419
433
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
420
434
|
|
|
421
435
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|