@frontegg/rest-api
Advanced tools
Comparing version 1.23.1-alpha.587087774 to 1.23.2
@@ -5,3 +5,3 @@ export declare type SortDirectionType = 'asc' | 'desc'; | ||
ip: string; | ||
json: Array<any>; | ||
json: any[]; | ||
action: string; | ||
@@ -8,0 +8,0 @@ resource: string; |
import { IUpdateSamlRoles } from './interfaces'; | ||
export * from './secutiry-poilicy'; | ||
import { IActivateAccount, IDisableMfa, IEnrollMfaResponse, IForgotPassword, ILogin, ILoginResponse, ILoginWithMfa, IPreLogin, IPostLogin, IRecoverMFAToken, IResetPassword, ISamlConfiguration, ISamlVendorConfigResponse, IUpdateSamlConfiguration, IUpdateSamlVendorMetadata, IVerifyMfa, IVerifyMfaResponse, IAcceptInvitation, ISocialLoginProviderConfiguration, ILoginViaSocialLogin, IVendorConfig, ISignUpUser, ISignUpResponse, IUserApiTokensData, ITenantApiTokensData, IUpdateUserApiTokensData, IUpdateTenantApiTokensData, IDeleteApiToken, IGetUserById, IUserIdResponse } from './interfaces'; | ||
@@ -147,3 +148,3 @@ /** | ||
*/ | ||
export declare function getSamlRoles(): Promise<Array<string>>; | ||
export declare function getSamlRoles(): Promise<string[]>; | ||
/** | ||
@@ -178,7 +179,7 @@ * Update Saml roles for authorization | ||
*/ | ||
export declare function getUserApiTokensData(): Promise<Array<IUserApiTokensData>>; | ||
export declare function getUserApiTokensData(): Promise<IUserApiTokensData[]>; | ||
/** | ||
* Get tenant api tokens data | ||
*/ | ||
export declare function getTenantApiTokensData(): Promise<Array<ITenantApiTokensData>>; | ||
export declare function getTenantApiTokensData(): Promise<ITenantApiTokensData[]>; | ||
/** | ||
@@ -185,0 +186,0 @@ * Update User Api Tokens |
import { IUserProfile } from '..'; | ||
export * from './secutiry-poilicy/interfaces'; | ||
export declare type IPreLogin = { | ||
@@ -3,0 +4,0 @@ email: string; |
@@ -16,2 +16,3 @@ export declare const AUTH_SERVICE_URL_V1 = "/identity/resources/auth/v1"; | ||
export declare const TEAMS_ROLES_SERVICE_URL_V1 = "/team/resources/roles/v1"; | ||
export declare const TEAMS_PERMISSIONS_SERVICE_URL_V1 = "/identity/resources/permissions/v1"; | ||
export declare const TEAMS_STATS_SERVICE_URL_V1 = "/team/resources/stats/v1/members"; | ||
@@ -25,1 +26,2 @@ export declare const TEAMS_PROFILE_SERVICE_URL = "/team/resources/profile"; | ||
export declare const IDENTITY_API_TOKENS_TENANTS_SERVICE = "/identity/resources/tenants/api-tokens/v1"; | ||
export declare const SECURITY_POLICY_API_V1 = "/identity/resources/configurations/v1"; |
@@ -333,2 +333,3 @@ import { __awaiter, __generator, __assign, __rest } from 'tslib'; | ||
var TEAMS_ROLES_SERVICE_URL_V1 = '/team/resources/roles/v1'; | ||
var TEAMS_PERMISSIONS_SERVICE_URL_V1 = '/identity/resources/permissions/v1'; | ||
var TEAMS_STATS_SERVICE_URL_V1 = '/team/resources/stats/v1/members'; | ||
@@ -341,3 +342,70 @@ var TEAMS_PROFILE_SERVICE_URL = '/team/resources/profile'; | ||
var IDENTITY_API_TOKENS_TENANTS_SERVICE = '/identity/resources/tenants/api-tokens/v1'; | ||
var SECURITY_POLICY_API_V1 = '/identity/resources/configurations/v1'; | ||
/** | ||
* Get global secure access configuration | ||
*/ | ||
function getGlobalSecurityPolicy() { | ||
return __awaiter(this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
console.debug('getGlobalSecurityPolicy()'); | ||
return [2 /*return*/, Get(SECURITY_POLICY_API_V1)]; | ||
}); | ||
}); | ||
} | ||
/** | ||
* Get Mfa configuration from security policy | ||
*/ | ||
function getMfaPolicy() { | ||
return __awaiter(this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
console.debug('getMfaPolicy()'); | ||
return [2 /*return*/, Get(SECURITY_POLICY_API_V1 + "/mfa-policy")]; | ||
}); | ||
}); | ||
} | ||
/** | ||
* Create/Update Mfa configuration from security policy | ||
*/ | ||
function saveMfaPolicy(body) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
console.debug('saveMfaPolicy()'); | ||
if (body.id) { | ||
return [2 /*return*/, Patch(SECURITY_POLICY_API_V1 + "/mfa-policy", body)]; | ||
} | ||
else { | ||
return [2 /*return*/, Post(SECURITY_POLICY_API_V1 + "/mfa-policy", body)]; | ||
} | ||
}); | ||
}); | ||
} | ||
/** | ||
* Get Lockout configuration from security policy | ||
*/ | ||
function getLockoutPolicy() { | ||
return __awaiter(this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
console.debug('getLockoutPolicy()'); | ||
return [2 /*return*/, Get(SECURITY_POLICY_API_V1 + "/lockout-policy")]; | ||
}); | ||
}); | ||
} | ||
/** | ||
* Create/Update Lockout configuration from security policy | ||
*/ | ||
function saveLockoutPolicy(body) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
console.debug('saveLockoutPolicy()'); | ||
if (body.id) { | ||
return [2 /*return*/, Patch(SECURITY_POLICY_API_V1 + "/lockout-policy", body)]; | ||
} | ||
else { | ||
return [2 /*return*/, Post(SECURITY_POLICY_API_V1 + "/lockout-policy", body)]; | ||
} | ||
}); | ||
}); | ||
} | ||
/***************************************** | ||
@@ -880,3 +948,8 @@ * Authentication | ||
deleteUserApiToken: deleteUserApiToken, | ||
getUserById: getUserById | ||
getUserById: getUserById, | ||
getGlobalSecurityPolicy: getGlobalSecurityPolicy, | ||
getMfaPolicy: getMfaPolicy, | ||
saveMfaPolicy: saveMfaPolicy, | ||
getLockoutPolicy: getLockoutPolicy, | ||
saveLockoutPolicy: saveLockoutPolicy | ||
}); | ||
@@ -1017,2 +1090,10 @@ | ||
} | ||
function loadAvailablePermissions() { | ||
return __awaiter(this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
console.debug('loadAvailablePermissions()'); | ||
return [2 /*return*/, Get(TEAMS_PERMISSIONS_SERVICE_URL_V1)]; | ||
}); | ||
}); | ||
} | ||
/** | ||
@@ -1056,2 +1137,3 @@ * load users stats from team-management-service | ||
loadAvailableRoles: loadAvailableRoles, | ||
loadAvailablePermissions: loadAvailablePermissions, | ||
loadStats: loadStats, | ||
@@ -1058,0 +1140,0 @@ resendActivationLink: resendActivationLink |
@@ -242,2 +242,3 @@ import { __awaiter, __rest } from 'tslib'; | ||
const TEAMS_ROLES_SERVICE_URL_V1 = '/team/resources/roles/v1'; | ||
const TEAMS_PERMISSIONS_SERVICE_URL_V1 = '/identity/resources/permissions/v1'; | ||
const TEAMS_STATS_SERVICE_URL_V1 = '/team/resources/stats/v1/members'; | ||
@@ -250,3 +251,60 @@ const TEAMS_PROFILE_SERVICE_URL = '/team/resources/profile'; | ||
const IDENTITY_API_TOKENS_TENANTS_SERVICE = '/identity/resources/tenants/api-tokens/v1'; | ||
const SECURITY_POLICY_API_V1 = '/identity/resources/configurations/v1'; | ||
/** | ||
* Get global secure access configuration | ||
*/ | ||
function getGlobalSecurityPolicy() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
console.debug('getGlobalSecurityPolicy()'); | ||
return Get(SECURITY_POLICY_API_V1); | ||
}); | ||
} | ||
/** | ||
* Get Mfa configuration from security policy | ||
*/ | ||
function getMfaPolicy() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
console.debug('getMfaPolicy()'); | ||
return Get(`${SECURITY_POLICY_API_V1}/mfa-policy`); | ||
}); | ||
} | ||
/** | ||
* Create/Update Mfa configuration from security policy | ||
*/ | ||
function saveMfaPolicy(body) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
console.debug('saveMfaPolicy()'); | ||
if (body.id) { | ||
return Patch(`${SECURITY_POLICY_API_V1}/mfa-policy`, body); | ||
} | ||
else { | ||
return Post(`${SECURITY_POLICY_API_V1}/mfa-policy`, body); | ||
} | ||
}); | ||
} | ||
/** | ||
* Get Lockout configuration from security policy | ||
*/ | ||
function getLockoutPolicy() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
console.debug('getLockoutPolicy()'); | ||
return Get(`${SECURITY_POLICY_API_V1}/lockout-policy`); | ||
}); | ||
} | ||
/** | ||
* Create/Update Lockout configuration from security policy | ||
*/ | ||
function saveLockoutPolicy(body) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
console.debug('saveLockoutPolicy()'); | ||
if (body.id) { | ||
return Patch(`${SECURITY_POLICY_API_V1}/lockout-policy`, body); | ||
} | ||
else { | ||
return Post(`${SECURITY_POLICY_API_V1}/lockout-policy`, body); | ||
} | ||
}); | ||
} | ||
/***************************************** | ||
@@ -678,3 +736,8 @@ * Authentication | ||
deleteUserApiToken: deleteUserApiToken, | ||
getUserById: getUserById | ||
getUserById: getUserById, | ||
getGlobalSecurityPolicy: getGlobalSecurityPolicy, | ||
getMfaPolicy: getMfaPolicy, | ||
saveMfaPolicy: saveMfaPolicy, | ||
getLockoutPolicy: getLockoutPolicy, | ||
saveLockoutPolicy: saveLockoutPolicy | ||
}); | ||
@@ -793,2 +856,8 @@ | ||
} | ||
function loadAvailablePermissions() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
console.debug('loadAvailablePermissions()'); | ||
return Get(TEAMS_PERMISSIONS_SERVICE_URL_V1); | ||
}); | ||
} | ||
/** | ||
@@ -828,2 +897,3 @@ * load users stats from team-management-service | ||
loadAvailableRoles: loadAvailableRoles, | ||
loadAvailablePermissions: loadAvailablePermissions, | ||
loadStats: loadStats, | ||
@@ -830,0 +900,0 @@ resendActivationLink: resendActivationLink |
84
index.js
@@ -339,2 +339,3 @@ 'use strict'; | ||
var TEAMS_ROLES_SERVICE_URL_V1 = '/team/resources/roles/v1'; | ||
var TEAMS_PERMISSIONS_SERVICE_URL_V1 = '/identity/resources/permissions/v1'; | ||
var TEAMS_STATS_SERVICE_URL_V1 = '/team/resources/stats/v1/members'; | ||
@@ -347,3 +348,70 @@ var TEAMS_PROFILE_SERVICE_URL = '/team/resources/profile'; | ||
var IDENTITY_API_TOKENS_TENANTS_SERVICE = '/identity/resources/tenants/api-tokens/v1'; | ||
var SECURITY_POLICY_API_V1 = '/identity/resources/configurations/v1'; | ||
/** | ||
* Get global secure access configuration | ||
*/ | ||
function getGlobalSecurityPolicy() { | ||
return tslib.__awaiter(this, void 0, void 0, function () { | ||
return tslib.__generator(this, function (_a) { | ||
console.debug('getGlobalSecurityPolicy()'); | ||
return [2 /*return*/, Get(SECURITY_POLICY_API_V1)]; | ||
}); | ||
}); | ||
} | ||
/** | ||
* Get Mfa configuration from security policy | ||
*/ | ||
function getMfaPolicy() { | ||
return tslib.__awaiter(this, void 0, void 0, function () { | ||
return tslib.__generator(this, function (_a) { | ||
console.debug('getMfaPolicy()'); | ||
return [2 /*return*/, Get(SECURITY_POLICY_API_V1 + "/mfa-policy")]; | ||
}); | ||
}); | ||
} | ||
/** | ||
* Create/Update Mfa configuration from security policy | ||
*/ | ||
function saveMfaPolicy(body) { | ||
return tslib.__awaiter(this, void 0, void 0, function () { | ||
return tslib.__generator(this, function (_a) { | ||
console.debug('saveMfaPolicy()'); | ||
if (body.id) { | ||
return [2 /*return*/, Patch(SECURITY_POLICY_API_V1 + "/mfa-policy", body)]; | ||
} | ||
else { | ||
return [2 /*return*/, Post(SECURITY_POLICY_API_V1 + "/mfa-policy", body)]; | ||
} | ||
}); | ||
}); | ||
} | ||
/** | ||
* Get Lockout configuration from security policy | ||
*/ | ||
function getLockoutPolicy() { | ||
return tslib.__awaiter(this, void 0, void 0, function () { | ||
return tslib.__generator(this, function (_a) { | ||
console.debug('getLockoutPolicy()'); | ||
return [2 /*return*/, Get(SECURITY_POLICY_API_V1 + "/lockout-policy")]; | ||
}); | ||
}); | ||
} | ||
/** | ||
* Create/Update Lockout configuration from security policy | ||
*/ | ||
function saveLockoutPolicy(body) { | ||
return tslib.__awaiter(this, void 0, void 0, function () { | ||
return tslib.__generator(this, function (_a) { | ||
console.debug('saveLockoutPolicy()'); | ||
if (body.id) { | ||
return [2 /*return*/, Patch(SECURITY_POLICY_API_V1 + "/lockout-policy", body)]; | ||
} | ||
else { | ||
return [2 /*return*/, Post(SECURITY_POLICY_API_V1 + "/lockout-policy", body)]; | ||
} | ||
}); | ||
}); | ||
} | ||
/***************************************** | ||
@@ -886,3 +954,8 @@ * Authentication | ||
deleteUserApiToken: deleteUserApiToken, | ||
getUserById: getUserById | ||
getUserById: getUserById, | ||
getGlobalSecurityPolicy: getGlobalSecurityPolicy, | ||
getMfaPolicy: getMfaPolicy, | ||
saveMfaPolicy: saveMfaPolicy, | ||
getLockoutPolicy: getLockoutPolicy, | ||
saveLockoutPolicy: saveLockoutPolicy | ||
}); | ||
@@ -1023,2 +1096,10 @@ | ||
} | ||
function loadAvailablePermissions() { | ||
return tslib.__awaiter(this, void 0, void 0, function () { | ||
return tslib.__generator(this, function (_a) { | ||
console.debug('loadAvailablePermissions()'); | ||
return [2 /*return*/, Get(TEAMS_PERMISSIONS_SERVICE_URL_V1)]; | ||
}); | ||
}); | ||
} | ||
/** | ||
@@ -1062,2 +1143,3 @@ * load users stats from team-management-service | ||
loadAvailableRoles: loadAvailableRoles, | ||
loadAvailablePermissions: loadAvailablePermissions, | ||
loadStats: loadStats, | ||
@@ -1064,0 +1146,0 @@ resendActivationLink: resendActivationLink |
{ | ||
"name": "@frontegg/rest-api", | ||
"libName": "FronteggRestApi", | ||
"version": "1.23.1-alpha.587087774", | ||
"version": "1.23.2", | ||
"author": "Frontegg LTD", | ||
"main": "index.js", | ||
"module": "index.esm.js", | ||
"es2015": "index.es.js", | ||
"types": "index.d.ts", | ||
"scripts": { | ||
"build": "rollup -c ../../scripts/rollup.config.js && echo DONE", | ||
"build:watch": "rollup -w -c ../../scripts/rollup.config.js", | ||
"test": "jest --runInBand --passWithNoTests -c ../../scripts/jest.config.json --rootDir . && echo DONE" | ||
}, | ||
"dependencies": { | ||
"jwt-decode": "2.2.0" | ||
}, | ||
"gitHead": "696e8f6fba29fc333f279f9269a34bcbc98c757c", | ||
"main": "index.js", | ||
"peerDependencies": {} | ||
} | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
import { IAddUser, IChangePassword, ILoadUsers, IResendActivationLink, ITeamUserRole, ITeamStats, ITeamUser, IUpdateProfile, IUserProfile, IUpdateUser, IDeleteUser } from './interfaces'; | ||
import { IAddUser, IChangePassword, ILoadUsers, IResendActivationLink, ITeamUserRole, ITeamStats, ITeamUser, IUpdateProfile, IUserProfile, IUpdateUser, IDeleteUser, ITeamUserPermission } from './interfaces'; | ||
import { PaginationResult } from '../interfaces'; | ||
@@ -63,2 +63,3 @@ /***************************************** | ||
export declare function loadAvailableRoles(): Promise<ITeamUserRole[]>; | ||
export declare function loadAvailablePermissions(): Promise<ITeamUserPermission[]>; | ||
/** | ||
@@ -65,0 +66,0 @@ * load users stats from team-management-service |
@@ -39,2 +39,3 @@ import { QueryFilter, QuerySort } from '../interfaces'; | ||
roleIds?: string[]; | ||
verified?: boolean; | ||
}; | ||
@@ -65,2 +66,13 @@ export declare type ITeamUser = { | ||
}; | ||
export declare type ITeamUserPermission = { | ||
description: string; | ||
fePermission: boolean; | ||
id: string; | ||
key: string; | ||
name: string; | ||
roleIds: string[]; | ||
createdAt: Date; | ||
updatedAt: Date; | ||
categoryId: string; | ||
}; | ||
export declare type ITeamStats = { | ||
@@ -67,0 +79,0 @@ totalItems: number; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
410525
30
5363
1