@frontegg/rest-api
Advanced tools
+8
-0
@@ -885,4 +885,12 @@ export * from './secutiry-poilicy'; | ||
| testCurrentIpInAllowList: () => Promise<import("./interfaces").IPValidResponse>; | ||
| /** @deprecated use api.auth.securityPolicy.getCountryRestrictionsConfig() or api.securityPolicy.getCountryRestrictionsConfig() instead */ | ||
| getCountryRestrictionsConfig: () => Promise<import("./interfaces").CountryRestrictionConfig>; | ||
| /** @deprecated use api.auth.securityPolicy.updateCountryRestrictionsConfig() or api.securityPolicy.updateCountryRestrictionsConfig() instead */ | ||
| updateCountryRestrictionsConfig: (body: import("./interfaces").UpdateCountryRestrictionConfig) => Promise<void>; | ||
| /** @deprecated use api.auth.securityPolicy.getCountryRestrictions() or api.securityPolicy.getCountryRestrictions() instead */ | ||
| getCountryRestrictions: () => Promise<import("./interfaces").CountryRestrictionRule[]>; | ||
| /** @deprecated use api.auth.securityPolicy.updateCountryRestrictions() or api.securityPolicy.updateCountryRestrictions() instead */ | ||
| updateCountryRestrictions: (body: import("./interfaces").UpdateCountryRestrictionRules) => Promise<void>; | ||
| } | ||
| declare const _default: AuthenticationApi; | ||
| export default _default; |
+4
-0
@@ -811,2 +811,6 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
| this.testCurrentIpInAllowList = this.securityPolicy.testCurrentIpInAllowList.bind(this.securityPolicy); | ||
| this.getCountryRestrictionsConfig = this.securityPolicy.getCountryRestrictionsConfig.bind(this.securityPolicy); | ||
| this.updateCountryRestrictionsConfig = this.securityPolicy.updateCountryRestrictionsConfig.bind(this.securityPolicy); | ||
| this.getCountryRestrictions = this.securityPolicy.getCountryRestrictions.bind(this.securityPolicy); | ||
| this.updateCountryRestrictions = this.securityPolicy.updateCountryRestrictions.bind(this.securityPolicy); | ||
| } | ||
@@ -813,0 +817,0 @@ /** |
| import { BaseApiClient } from '../../BaseApiClient'; | ||
| import { FronteggPaginationResult } from '../../interfaces'; | ||
| import { BulkCreateIpRestriction, CreateDomainRestriction, CreateIpRestriction, DomainRestriction, DomainRestrictionConfig, GetIPRestrictionsParams, IpRestriction, IPRestrictionsConfig, IPValidResponse, ISaveSecurityPolicyLockout, ISaveSecurityPolicyMfa, ISaveSecurityPolicyPasswordHistory, ISecurityPolicy, ISecurityPolicyCaptcha, ISecurityPolicyLockout, ISecurityPolicyMfa, ISecurityPolicyPasswordConfig, ISecurityPolicyPasswordHistory, ISecurityPolicyPasswordRotationConfig, UpdateDomainRestrictionsConfig } from './interfaces'; | ||
| import { BulkCreateIpRestriction, CountryRestrictionConfig, CountryRestrictionRule, CreateDomainRestriction, CreateIpRestriction, DomainRestriction, DomainRestrictionConfig, GetIPRestrictionsParams, IpRestriction, IPRestrictionsConfig, IPValidResponse, ISaveSecurityPolicyLockout, ISaveSecurityPolicyMfa, ISaveSecurityPolicyPasswordHistory, ISecurityPolicy, ISecurityPolicyCaptcha, ISecurityPolicyLockout, ISecurityPolicyMfa, ISecurityPolicyPasswordConfig, ISecurityPolicyPasswordHistory, ISecurityPolicyPasswordRotationConfig, UpdateDomainRestrictionsConfig, UpdateCountryRestrictionConfig, UpdateCountryRestrictionRules } from './interfaces'; | ||
| export declare class SecurityPolicyApi extends BaseApiClient { | ||
@@ -64,4 +64,12 @@ constructor(appName: string); | ||
| testCurrentIpInAllowList: () => Promise<IPValidResponse>; | ||
| /** Get country restrictions config for tenant */ | ||
| getCountryRestrictionsConfig: () => Promise<CountryRestrictionConfig>; | ||
| /** Update country restrictions config for tenant */ | ||
| updateCountryRestrictionsConfig: (body: UpdateCountryRestrictionConfig) => Promise<void>; | ||
| /** Get country restriction rules for tenant */ | ||
| getCountryRestrictions: () => Promise<CountryRestrictionRule[]>; | ||
| /** Create or update country restriction rules for tenant */ | ||
| updateCountryRestrictions: (body: UpdateCountryRestrictionRules) => Promise<void>; | ||
| } | ||
| declare const _default: SecurityPolicyApi; | ||
| export default _default; |
@@ -114,2 +114,14 @@ import { BaseApiClient } from '../../BaseApiClient'; | ||
| }; | ||
| this.getCountryRestrictionsConfig = async () => { | ||
| return this.get(urls.securityEngines.countryRestriction.v1); | ||
| }; | ||
| this.updateCountryRestrictionsConfig = async body => { | ||
| return this.post(urls.securityEngines.countryRestriction.v1, body); | ||
| }; | ||
| this.getCountryRestrictions = async () => { | ||
| return this.get(`${urls.securityEngines.countryRestriction.v1}/countries`); | ||
| }; | ||
| this.updateCountryRestrictions = async body => { | ||
| return this.post(`${urls.securityEngines.countryRestriction.v1}/countries`, body); | ||
| }; | ||
| } | ||
@@ -116,0 +128,0 @@ |
@@ -124,2 +124,19 @@ export type EnforceMFAType = 'DontForce' | 'Force' | 'ForceExceptSAML'; | ||
| } | ||
| export interface CountryRestrictionConfig { | ||
| id?: string; | ||
| enabled: boolean; | ||
| action: RestrictionType; | ||
| failStrategy: RestrictionType; | ||
| shouldSendRestrictionEmail: boolean; | ||
| } | ||
| export interface CountryRestrictionRule { | ||
| id: string; | ||
| countryCode: string; | ||
| } | ||
| export type UpdateCountryRestrictionConfig = Omit<CountryRestrictionConfig, 'id'>; | ||
| export interface UpdateCountryRestrictionRules { | ||
| countries: { | ||
| countryCode: string; | ||
| }[]; | ||
| } | ||
| export interface CreateIpRestriction { | ||
@@ -126,0 +143,0 @@ ip: string; |
+5
-0
@@ -291,2 +291,7 @@ export declare const urls: { | ||
| }; | ||
| securityEngines: { | ||
| countryRestriction: { | ||
| v1: string; | ||
| }; | ||
| }; | ||
| applications: { | ||
@@ -293,0 +298,0 @@ v1: string; |
+5
-0
@@ -292,2 +292,7 @@ export const urls = { | ||
| }, | ||
| securityEngines: { | ||
| countryRestriction: { | ||
| v1: '/security-engines/resources/policies/v1/country-restriction' | ||
| } | ||
| }, | ||
| applications: { | ||
@@ -294,0 +299,0 @@ v1: '/applications/resources/applications/v1', |
+1
-1
@@ -1,2 +0,2 @@ | ||
| /** @license Frontegg v7.105.0-alpha.1 | ||
| /** @license Frontegg v7.105.0-alpha.2 | ||
| * | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
@@ -876,2 +876,6 @@ "use strict"; | ||
| this.testCurrentIpInAllowList = this.securityPolicy.testCurrentIpInAllowList.bind(this.securityPolicy); | ||
| this.getCountryRestrictionsConfig = this.securityPolicy.getCountryRestrictionsConfig.bind(this.securityPolicy); | ||
| this.updateCountryRestrictionsConfig = this.securityPolicy.updateCountryRestrictionsConfig.bind(this.securityPolicy); | ||
| this.getCountryRestrictions = this.securityPolicy.getCountryRestrictions.bind(this.securityPolicy); | ||
| this.updateCountryRestrictions = this.securityPolicy.updateCountryRestrictions.bind(this.securityPolicy); | ||
| } | ||
@@ -878,0 +882,0 @@ /** |
@@ -120,2 +120,14 @@ "use strict"; | ||
| }; | ||
| this.getCountryRestrictionsConfig = async () => { | ||
| return this.get(_constants.urls.securityEngines.countryRestriction.v1); | ||
| }; | ||
| this.updateCountryRestrictionsConfig = async body => { | ||
| return this.post(_constants.urls.securityEngines.countryRestriction.v1, body); | ||
| }; | ||
| this.getCountryRestrictions = async () => { | ||
| return this.get(`${_constants.urls.securityEngines.countryRestriction.v1}/countries`); | ||
| }; | ||
| this.updateCountryRestrictions = async body => { | ||
| return this.post(`${_constants.urls.securityEngines.countryRestriction.v1}/countries`, body); | ||
| }; | ||
| } | ||
@@ -122,0 +134,0 @@ |
@@ -298,2 +298,7 @@ "use strict"; | ||
| }, | ||
| securityEngines: { | ||
| countryRestriction: { | ||
| v1: '/security-engines/resources/policies/v1/country-restriction' | ||
| } | ||
| }, | ||
| applications: { | ||
@@ -300,0 +305,0 @@ v1: '/applications/resources/applications/v1', |
+1
-1
@@ -1,2 +0,2 @@ | ||
| /** @license Frontegg v7.105.0-alpha.1 | ||
| /** @license Frontegg v7.105.0-alpha.2 | ||
| * | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
+1
-1
| { | ||
| "name": "@frontegg/rest-api", | ||
| "version": "7.105.0-alpha.1", | ||
| "version": "7.105.0-alpha.2", | ||
| "main": "./node/index.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
553932
0.82%14425
0.56%