Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@frontegg/rest-api

Package Overview
Dependencies
Maintainers
2
Versions
608
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@frontegg/rest-api - npm Package Compare versions

Comparing version 3.1.67 to 3.1.68

4

auth/constants.d.ts

@@ -6,5 +6,1 @@ export declare const FRONTEGG_SEPARATE_TABS_BY_TENANT = "FRONTEGG_SEPARATE_TABS_BY_TENANT";

export declare const USE_CURRENT_USER_TENANTS_V1_ENDPOINT_FF = "admin_portal_use_current_user_tenants_v1_endpoint";
/**
* use entitlements v2 feature flag
*/
export declare const USE_ENTITLEMENTS_V2_ENDPOINT_FF = "admin_portal_use_entitlements_v2_endpoint";

3

auth/constants.js
export const FRONTEGG_SEPARATE_TABS_BY_TENANT = 'FRONTEGG_SEPARATE_TABS_BY_TENANT';
export const USE_CURRENT_USER_TENANTS_V1_ENDPOINT_FF = 'admin_portal_use_current_user_tenants_v1_endpoint';
export const USE_ENTITLEMENTS_V2_ENDPOINT_FF = 'admin_portal_use_entitlements_v2_endpoint';
export const USE_CURRENT_USER_TENANTS_V1_ENDPOINT_FF = 'admin_portal_use_current_user_tenants_v1_endpoint';

@@ -15,7 +15,6 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";

import { LOAD_AUTHORIZATION_FF } from './interfaces';
import { loadEntitlements, loadEntitlementsV2 } from '../entitlements';
import { loadEntitlementsV2 } from '../entitlements';
import { ADMIN_PORTAL_ENTITLEMENTS_FF } from '../entitlements/interfaces';
import { FeatureFlags } from "../feature-flags";
import { executeConditionalPromise, getCurrentUserTenantsFunction, getTabTenantFromSessionStorage, setTabTenantInSessionStorage } from "./utils";
import { USE_ENTITLEMENTS_V2_ENDPOINT_FF } from "./constants";
export async function generateLoginResponse(loginResponse) {

@@ -736,3 +735,2 @@ if (!loginResponse.accessToken) {

export async function getMeAndEntitlements() {
const [useEntitlementsV2] = FeatureFlags.getFeatureFlags([USE_ENTITLEMENTS_V2_ENDPOINT_FF], ContextHolder.getAppName() || '');
const actions = [{

@@ -742,3 +740,3 @@ action: getMeV2,

}, {
action: useEntitlementsV2 ? noThrowLoadEntitlements : loadEntitlements,
action: noThrowLoadEntitlements,
shouldLoad: shouldLoadEntitlements()

@@ -745,0 +743,0 @@ }, {

import { UserEntitlementsContext as UserEntitlementsResponseV2 } from "@frontegg/entitlements-javascript-commons";
import { ITenantsResponse, IUserProfile, UserEntitlementsResponse } from "..";
import { ITenantsResponse, IUserProfile } from "..";
import { AuthStrategyEnum, MachineToMachineAuthStrategy, SocialLoginProviders } from "./enums";
import { ISamlRolesGroup } from "../teams/interfaces";
export * from "./secutiry-poilicy/interfaces";
export { USE_ENTITLEMENTS_V2_ENDPOINT_FF } from './constants';
export declare type IPreLogin = {

@@ -54,3 +53,3 @@ email: string;

isBreachedPassword?: boolean;
entitlements?: UserEntitlementsResponse | UserEntitlementsResponseV2;
entitlements?: UserEntitlementsResponseV2;
amr?: string[];

@@ -57,0 +56,0 @@ acr?: string;

export * from "./secutiry-poilicy/interfaces";
export { USE_ENTITLEMENTS_V2_ENDPOINT_FF } from './constants';
export let SecondaryAuthStrategy;

@@ -4,0 +3,0 @@

@@ -1,12 +0,3 @@

import { UserEntitlementsResponse } from './interfaces';
import { UserEntitlementsContext as UserEntitlementsResponseV2 } from "@frontegg/entitlements-javascript-commons";
/**
* Load user entitlements data.
* Including all user permissions, features and bundles data.
* Including also isGranted and isEntitled for permissions and features.
*
* ``authorized user``
*/
export declare function loadEntitlements(): Promise<UserEntitlementsResponse>;
/**
* Load user entitlements data v2.

@@ -13,0 +4,0 @@ * Including all user permissions and features data.

import { urls } from '../constants';
import { Get } from '../fetch';
export async function loadEntitlements() {
return Get(urls.entitlements.v1);
}
export async function loadEntitlementsV2() {
return Get(urls.entitlements.v2);
}

@@ -1,13 +0,1 @@

/**
* API response for user entitlements data.
* Including all user granted permissions and features data.
*/
export interface UserEntitlementsResponse {
permissions: {
[permissionKey: string]: Entitlement;
};
features: {
[featureKey: string]: Entitlement;
};
}
export interface Entitlement {

@@ -14,0 +2,0 @@ isEntitled: boolean;

@@ -1,2 +0,2 @@

/** @license Frontegg v3.1.67
/** @license Frontegg v3.1.68
*

@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the

@@ -6,8 +6,6 @@ "use strict";

});
exports.USE_ENTITLEMENTS_V2_ENDPOINT_FF = exports.USE_CURRENT_USER_TENANTS_V1_ENDPOINT_FF = exports.FRONTEGG_SEPARATE_TABS_BY_TENANT = void 0;
exports.USE_CURRENT_USER_TENANTS_V1_ENDPOINT_FF = exports.FRONTEGG_SEPARATE_TABS_BY_TENANT = void 0;
const FRONTEGG_SEPARATE_TABS_BY_TENANT = 'FRONTEGG_SEPARATE_TABS_BY_TENANT';
exports.FRONTEGG_SEPARATE_TABS_BY_TENANT = FRONTEGG_SEPARATE_TABS_BY_TENANT;
const USE_CURRENT_USER_TENANTS_V1_ENDPOINT_FF = 'admin_portal_use_current_user_tenants_v1_endpoint';
exports.USE_CURRENT_USER_TENANTS_V1_ENDPOINT_FF = USE_CURRENT_USER_TENANTS_V1_ENDPOINT_FF;
const USE_ENTITLEMENTS_V2_ENDPOINT_FF = 'admin_portal_use_entitlements_v2_endpoint';
exports.USE_ENTITLEMENTS_V2_ENDPOINT_FF = USE_ENTITLEMENTS_V2_ENDPOINT_FF;
exports.USE_CURRENT_USER_TENANTS_V1_ENDPOINT_FF = USE_CURRENT_USER_TENANTS_V1_ENDPOINT_FF;

@@ -389,4 +389,2 @@ "use strict";

var _constants2 = require("./constants");
const _excluded = ["type"],

@@ -1260,4 +1258,2 @@ _excluded2 = ["type"],

async function getMeAndEntitlements() {
const [useEntitlementsV2] = _featureFlags.FeatureFlags.getFeatureFlags([_constants2.USE_ENTITLEMENTS_V2_ENDPOINT_FF], _ContextHolder.ContextHolder.getAppName() || '');
const actions = [{

@@ -1267,3 +1263,3 @@ action: getMeV2,

}, {
action: useEntitlementsV2 ? noThrowLoadEntitlements : _entitlements.loadEntitlements,
action: noThrowLoadEntitlements,
shouldLoad: shouldLoadEntitlements()

@@ -1270,0 +1266,0 @@ }, {

@@ -10,13 +10,5 @@ "use strict";

MFAStrategyEnum: true,
LOAD_AUTHORIZATION_FF: true,
USE_ENTITLEMENTS_V2_ENDPOINT_FF: true
LOAD_AUTHORIZATION_FF: true
};
exports.SecondaryAuthStrategy = exports.MFAStrategyEnum = exports.LOAD_AUTHORIZATION_FF = void 0;
Object.defineProperty(exports, "USE_ENTITLEMENTS_V2_ENDPOINT_FF", {
enumerable: true,
get: function () {
return _constants.USE_ENTITLEMENTS_V2_ENDPOINT_FF;
}
});
exports.WebAuthnDeviceType = void 0;
exports.WebAuthnDeviceType = exports.SecondaryAuthStrategy = exports.MFAStrategyEnum = exports.LOAD_AUTHORIZATION_FF = void 0;

@@ -36,5 +28,2 @@ var _interfaces = require("./secutiry-poilicy/interfaces");

});
var _constants = require("./constants");
let SecondaryAuthStrategy;

@@ -41,0 +30,0 @@ exports.SecondaryAuthStrategy = SecondaryAuthStrategy;

@@ -6,3 +6,2 @@ "use strict";

});
exports.loadEntitlements = loadEntitlements;
exports.loadEntitlementsV2 = loadEntitlementsV2;

@@ -14,8 +13,4 @@

async function loadEntitlements() {
return (0, _fetch.Get)(_constants.urls.entitlements.v1);
}
async function loadEntitlementsV2() {
return (0, _fetch.Get)(_constants.urls.entitlements.v2);
}

@@ -1,2 +0,2 @@

/** @license Frontegg v3.1.67
/** @license Frontegg v3.1.68
*

@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the

@@ -6,3 +6,3 @@ "use strict";

});
exports.fronteggUsersUrl = exports.fronteggTenantsV3Url = exports.fronteggTenantsUrl = exports.fronteggSilentRefreshTokenUrl = exports.fronteggRefreshTokenUrl = exports.fronteggAuthApiRoutesRegex = void 0;
exports.fronteggUsersUrl = exports.fronteggTenantsV3Url = exports.fronteggTenantsUrl = exports.fronteggSilentRefreshTokenUrl = exports.fronteggRefreshTokenUrl = exports.fronteggEntitlementsV2Url = exports.fronteggAuthApiRoutesRegex = void 0;

@@ -22,2 +22,4 @@ var _constants = require("./constants");

const fronteggTenantsV3Url = `${_constants.urls.identity.users.v3}/me/tenants`;
exports.fronteggTenantsV3Url = fronteggTenantsV3Url;
exports.fronteggTenantsV3Url = fronteggTenantsV3Url;
const fronteggEntitlementsV2Url = _constants.urls.entitlements.v2;
exports.fronteggEntitlementsV2Url = fronteggEntitlementsV2Url;
{
"name": "@frontegg/rest-api",
"version": "3.1.67",
"version": "3.1.68",
"main": "./node/index.js",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -7,1 +7,2 @@ export declare const fronteggAuthApiRoutesRegex: (string | RegExp)[];

export declare const fronteggTenantsV3Url: string;
export declare const fronteggEntitlementsV2Url: string;

@@ -7,2 +7,3 @@ import { urls } from './constants';

export const fronteggTenantsUrl = `${urls.identity.users.v2}/me/tenants`;
export const fronteggTenantsV3Url = `${urls.identity.users.v3}/me/tenants`;
export const fronteggTenantsV3Url = `${urls.identity.users.v3}/me/tenants`;
export const fronteggEntitlementsV2Url = urls.entitlements.v2;

@@ -7,3 +7,2 @@ import { PaginationOrderEnum } from '../interfaces';

import { UserEntitlementsContext as UserEntitlementsResponseV2 } from "@frontegg/entitlements-javascript-commons";
import { UserEntitlementsResponse } from '../entitlements/interfaces';
export declare enum SortByEnum {

@@ -81,3 +80,3 @@ createdAt = "createdAt",

temporaryExpirationDate?: Date;
entitlements?: UserEntitlementsResponse | UserEntitlementsResponseV2;
entitlements?: UserEntitlementsResponseV2;
}

@@ -84,0 +83,0 @@ export declare type IUserProfile = IGetUsersV2Response;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc