@frontegg/rest-api 3.0.91 → 3.0.93
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/feature-flags/index.d.ts +2 -2
- package/feature-flags/index.js +2 -2
- package/groups/index.d.ts +5 -1
- package/groups/index.js +9 -4
- package/groups/interfaces.d.ts +3 -0
- package/index.js +1 -1
- package/node/constants.js +4 -3
- package/node/feature-flags/index.js +2 -2
- package/node/groups/index.js +11 -4
- package/node/index.js +1 -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/feature-flags/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IFeatureFlagsAttributes } from "./interfaces";
|
|
2
2
|
export declare class FeatureFlags {
|
|
3
3
|
private _flags;
|
|
4
4
|
private static _instances;
|
|
@@ -7,6 +7,6 @@ export declare class FeatureFlags {
|
|
|
7
7
|
static set(featureFlags?: IFeatureFlagsAttributes, name?: string): FeatureFlags;
|
|
8
8
|
static getFeatureFlags(flags: string[], name: string): boolean[];
|
|
9
9
|
get flags(): IFeatureFlagsAttributes;
|
|
10
|
-
set(featureFlags?:
|
|
10
|
+
set(featureFlags?: IFeatureFlagsAttributes): void;
|
|
11
11
|
}
|
|
12
12
|
export declare function loadFeatureFlags(): Promise<IFeatureFlagsAttributes>;
|
package/feature-flags/index.js
CHANGED
|
@@ -35,9 +35,9 @@ export class FeatureFlags {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
set(featureFlags) {
|
|
38
|
-
var _defaultFeatureFlags$2
|
|
38
|
+
var _defaultFeatureFlags$2;
|
|
39
39
|
|
|
40
|
-
this._flags = _extends({}, (_defaultFeatureFlags$2 = defaultFeatureFlags == null ? void 0 : defaultFeatureFlags.flags) != null ? _defaultFeatureFlags$2 : {},
|
|
40
|
+
this._flags = _extends({}, (_defaultFeatureFlags$2 = defaultFeatureFlags == null ? void 0 : defaultFeatureFlags.flags) != null ? _defaultFeatureFlags$2 : {}, featureFlags != null ? featureFlags : {});
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
}
|
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
package/index.js
CHANGED
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: {
|
|
@@ -49,9 +49,9 @@ class FeatureFlags {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
set(featureFlags) {
|
|
52
|
-
var _defaultFeatureFlags$2
|
|
52
|
+
var _defaultFeatureFlags$2;
|
|
53
53
|
|
|
54
|
-
this._flags = (0, _extends2.default)({}, (_defaultFeatureFlags$2 = defaultFeatureFlags == null ? void 0 : defaultFeatureFlags.flags) != null ? _defaultFeatureFlags$2 : {},
|
|
54
|
+
this._flags = (0, _extends2.default)({}, (_defaultFeatureFlags$2 = defaultFeatureFlags == null ? void 0 : defaultFeatureFlags.flags) != null ? _defaultFeatureFlags$2 : {}, featureFlags != null ? featureFlags : {});
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
}
|
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