@frontegg/rest-api 3.1.68 → 3.1.70

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/auth/index.d.ts CHANGED
@@ -641,8 +641,14 @@ export declare function deleteSSODomain(ssoConfigId: string, domainId: string):
641
641
  /**
642
642
  * Validate SSO configuration domain by logged in user (tenantId, vendorId)
643
643
  * * ``authorized user``
644
+ * @deprecated(Use validateSSODomainV2 instead)
644
645
  */
645
646
  export declare function validateSSODomain(ssoConfigId: string, domainId: string): Promise<void>;
647
+ /**
648
+ * Validate SSO configuration domain by logged in user (tenantId, vendorId)
649
+ * * ``authorized user``
650
+ */
651
+ export declare function validateSSODomainV2(ssoConfigId: string, domainId: string): Promise<void>;
646
652
  /**
647
653
  * Get SSO configuration default roles by logged in user (tenantId, vendorId)
648
654
  * * ``authorized user``
package/auth/index.js CHANGED
@@ -617,6 +617,9 @@ export async function deleteSSODomain(ssoConfigId, domainId) {
617
617
  export async function validateSSODomain(ssoConfigId, domainId) {
618
618
  return Put(`${urls.team.sso.v1}/configurations/${ssoConfigId}/domains/${domainId}/validate`);
619
619
  }
620
+ export async function validateSSODomainV2(ssoConfigId, domainId) {
621
+ return Put(`${urls.team.sso.v2}/configurations/${ssoConfigId}/domains/${domainId}/validate`);
622
+ }
620
623
  export async function getSSODefaultRoles(ssoConfigId) {
621
624
  return Get(`${urls.team.sso.v1}/configurations/${ssoConfigId}/roles`);
622
625
  }
@@ -394,6 +394,7 @@ export interface ISSODomain {
394
394
  id: string;
395
395
  domain: string;
396
396
  validated: boolean;
397
+ txtRecord: string;
397
398
  }
398
399
  export interface ISSOConfigurationDefaultRoles {
399
400
  roleIds: string[];
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.1.68
1
+ /** @license Frontegg v3.1.70
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
  }
@@ -124,6 +124,7 @@ var _exportNames = {
124
124
  createSSODomain: true,
125
125
  deleteSSODomain: true,
126
126
  validateSSODomain: true,
127
+ validateSSODomainV2: true,
127
128
  getSSODefaultRoles: true,
128
129
  setSSODefaultRoles: true,
129
130
  createSSOGroup: true,
@@ -316,6 +317,7 @@ exports.updateSamlVendorMetadata = updateSamlVendorMetadata;
316
317
  exports.updateTenantApiTokensData = updateTenantApiTokensData;
317
318
  exports.updateUserApiTokensData = updateUserApiTokensData;
318
319
  exports.validateSSODomain = validateSSODomain;
320
+ exports.validateSSODomainV2 = validateSSODomainV2;
319
321
  exports.validateSamlDomain = validateSamlDomain;
320
322
  exports.verifyChangePhoneNumber = verifyChangePhoneNumber;
321
323
  exports.verifyInviteToken = verifyInviteToken;
@@ -1112,6 +1114,10 @@ async function validateSSODomain(ssoConfigId, domainId) {
1112
1114
  return (0, _fetch.Put)(`${_constants.urls.team.sso.v1}/configurations/${ssoConfigId}/domains/${domainId}/validate`);
1113
1115
  }
1114
1116
 
1117
+ async function validateSSODomainV2(ssoConfigId, domainId) {
1118
+ return (0, _fetch.Put)(`${_constants.urls.team.sso.v2}/configurations/${ssoConfigId}/domains/${domainId}/validate`);
1119
+ }
1120
+
1115
1121
  async function getSSODefaultRoles(ssoConfigId) {
1116
1122
  return (0, _fetch.Get)(`${_constants.urls.team.sso.v1}/configurations/${ssoConfigId}/roles`);
1117
1123
  }
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.1.68
1
+ /** @license Frontegg v3.1.70
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.70",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {