@frontegg/rest-api 3.0.92 → 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 CHANGED
@@ -83,12 +83,13 @@ export declare const urls: {
83
83
  v1: string;
84
84
  };
85
85
  groups: {
86
+ v1: string;
86
87
  configurations: {
87
88
  v1: string;
88
89
  };
89
- v1: string;
90
- roles: string;
91
- users: string;
90
+ getByIds: {
91
+ v1: string;
92
+ };
92
93
  };
93
94
  };
94
95
  team: {
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
- v1: '/identity/resources/groups/v1',
90
- roles: '/roles',
91
- users: '/users'
90
+ getByIds: {
91
+ v1: '/identity/resources/groups/v1/bulkGet'
92
+ }
92
93
  }
93
94
  },
94
95
  team: {
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}${urls.identity.groups.roles}`, body);
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}${urls.identity.groups.roles}`, body);
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}${urls.identity.groups.users}`, body);
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}${urls.identity.groups.users}`, body);
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}`);
@@ -57,3 +57,6 @@ export declare type IUpdateGroupUsers = {
57
57
  export declare type IGetGroupQueryOptions = {
58
58
  _groupsRelations?: GroupRelations;
59
59
  };
60
+ export declare type IGetGroupsByIds = {
61
+ groupsIds: string[];
62
+ };
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.0.92
1
+ /** @license Frontegg v3.0.93
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.
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
- v1: '/identity/resources/groups/v1',
96
- roles: '/roles',
97
- users: '/users'
96
+ getByIds: {
97
+ v1: '/identity/resources/groups/v1/bulkGet'
98
+ }
98
99
  }
99
100
  },
100
101
  team: {
@@ -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}${_constants.urls.identity.groups.roles}`, body);
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}${_constants.urls.identity.groups.roles}`, body);
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}${_constants.urls.identity.groups.users}`, body);
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}${_constants.urls.identity.groups.users}`, body);
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.92
1
+ /** @license Frontegg v3.0.93
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontegg/rest-api",
3
- "version": "3.0.92",
3
+ "version": "3.0.93",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {