@frontegg/rest-api 3.1.68 → 3.1.69

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.
@@ -1,4 +1,4 @@
1
- import { IUserApplicationsIdPayload, IUserApplicationsDataPayload, IApplicationsResponse, IAssignUserToApplicationsBody, IUsersApplicationsIdPayload, IUsersOfApplicationsResponse, ITenantApplicationsResponse, IGetUsersOfApplicationsQuery } from "./interfaces";
1
+ import { IUserApplicationsIdPayload, IUserApplicationsDataPayload, IApplicationsResponse, IAssignUserToApplicationsBody, IUsersApplicationsIdPayload, IUsersOfApplicationsResponse, ITenantApplicationsResponse, IGetUsersOfApplicationsQuery, IUsersApplicationsIdsResponse } from "./interfaces";
2
2
  /**
3
3
  * Get applications id array for single user by user id
4
4
  * @param userId - user id to find his applications id array
@@ -10,7 +10,7 @@ export declare function getUserApplicationsId({ userId }: IUserApplicationsIdPay
10
10
  * @param userIds - array of all user id's
11
11
  * @returns object that maps every user id to his applications id array
12
12
  */
13
- export declare function getUsersApplicationsId({ userIds }: IUsersApplicationsIdPayload): Promise<Record<string, string[]>>;
13
+ export declare function getUsersApplicationsId({ userIds }: IUsersApplicationsIdPayload): Promise<IUsersApplicationsIdsResponse[]>;
14
14
  /**
15
15
  * Get applications data array for specific tenant
16
16
  * @returns array of object with tenant id and his applications id array
@@ -43,4 +43,4 @@ export declare function unassignUserFromApplications(body: IAssignUserToApplicat
43
43
  * @param appIds - array of applications
44
44
  * @returns array of objects with application id and his users array
45
45
  */
46
- export declare function getUsersOfApplications(query: IGetUsersOfApplicationsQuery): Promise<IUsersOfApplicationsResponse[]>;
46
+ export declare function getUsersOfApplications({ appIds }: IGetUsersOfApplicationsQuery): Promise<IUsersOfApplicationsResponse[]>;
@@ -30,6 +30,10 @@ export async function assignUserToApplications(body) {
30
30
  export async function unassignUserFromApplications(body) {
31
31
  return Delete(`${urls.identity.applications.v1}/user-apps`, body);
32
32
  }
33
- export async function getUsersOfApplications(query) {
34
- return Get(`${urls.identity.applications.v1}/apps-users`, query);
33
+ export async function getUsersOfApplications({
34
+ appIds
35
+ }) {
36
+ return Get(`${urls.identity.applications.v1}/apps-users`, {
37
+ appIds: appIds.join(',')
38
+ });
35
39
  }
@@ -43,3 +43,7 @@ export declare type ITenantApplicationsResponse = {
43
43
  tenantId: string;
44
44
  appIds?: string[];
45
45
  };
46
+ export declare type IUsersApplicationsIdsResponse = {
47
+ userId: string;
48
+ appIds: string[];
49
+ };
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.1.68
1
+ /** @license Frontegg v3.1.69
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.
@@ -51,6 +51,10 @@ async function unassignUserFromApplications(body) {
51
51
  return (0, _fetch.Delete)(`${_constants.urls.identity.applications.v1}/user-apps`, body);
52
52
  }
53
53
 
54
- async function getUsersOfApplications(query) {
55
- return (0, _fetch.Get)(`${_constants.urls.identity.applications.v1}/apps-users`, query);
54
+ async function getUsersOfApplications({
55
+ appIds
56
+ }) {
57
+ return (0, _fetch.Get)(`${_constants.urls.identity.applications.v1}/apps-users`, {
58
+ appIds: appIds.join(',')
59
+ });
56
60
  }
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.1.68
1
+ /** @license Frontegg v3.1.69
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.1.68",
3
+ "version": "3.1.69",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {