@frontegg/rest-api 3.0.11 → 3.0.12
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.
- package/auth/secutiry-poilicy/index.d.ts +23 -1
- package/auth/secutiry-poilicy/index.js +16 -1
- package/auth/secutiry-poilicy/interfaces.d.ts +23 -0
- package/auth/secutiry-poilicy/interfaces.js +6 -1
- package/constants.d.ts +5 -0
- package/constants.js +5 -0
- package/index.js +1 -1
- package/node/auth/secutiry-poilicy/index.js +25 -0
- package/node/auth/secutiry-poilicy/interfaces.js +9 -1
- package/node/constants.js +5 -0
- package/node/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ISaveSecurityPolicyMfa, ISaveSecurityPolicyLockout, ISecurityPolicyMfa, ISecurityPolicyLockout, ISecurityPolicyCaptcha, ISecurityPolicyPasswordHistory, ISaveSecurityPolicyPasswordHistory, ISecurityPolicyPasswordConfig, ISecurityPolicy } from './interfaces';
|
|
1
|
+
import { ISaveSecurityPolicyMfa, ISaveSecurityPolicyLockout, ISecurityPolicyMfa, ISecurityPolicyLockout, ISecurityPolicyCaptcha, ISecurityPolicyPasswordHistory, ISaveSecurityPolicyPasswordHistory, ISecurityPolicyPasswordConfig, ISecurityPolicy, DomainRestriction, DomainRestrictionConfig, CreateDomainRestriction, UpdateDomainRestrictionsConfig } from './interfaces';
|
|
2
2
|
/**
|
|
3
3
|
* Get global secure access configuration
|
|
4
4
|
*/
|
|
@@ -39,3 +39,25 @@ export declare function savePasswordHistoryPolicy(body: ISaveSecurityPolicyPassw
|
|
|
39
39
|
* load vendor password configuration.
|
|
40
40
|
*/
|
|
41
41
|
export declare function getPasswordConfigPolicy(): Promise<ISecurityPolicyPasswordConfig>;
|
|
42
|
+
/**
|
|
43
|
+
* Get domain restrictions for tenant
|
|
44
|
+
*/
|
|
45
|
+
export declare function getDomainRestrictions(): Promise<{
|
|
46
|
+
items: DomainRestriction[];
|
|
47
|
+
}>;
|
|
48
|
+
/**
|
|
49
|
+
* Get domain restrictions config for tenant
|
|
50
|
+
*/
|
|
51
|
+
export declare function getDomainRestrictionsConfig(): Promise<DomainRestrictionConfig>;
|
|
52
|
+
/**
|
|
53
|
+
* Create domain restriction for tenant
|
|
54
|
+
*/
|
|
55
|
+
export declare function createDomainRestriction(body: CreateDomainRestriction): Promise<DomainRestriction>;
|
|
56
|
+
/**
|
|
57
|
+
* Update domain restrictions config for tenant
|
|
58
|
+
*/
|
|
59
|
+
export declare function updateDomainRestrictionConfig(body: UpdateDomainRestrictionsConfig): Promise<DomainRestrictionConfig>;
|
|
60
|
+
/**
|
|
61
|
+
* Delete domain restriction for tenant by id
|
|
62
|
+
*/
|
|
63
|
+
export declare function deleteDomainRestriction(id: string): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Get, Patch, Post } from '../../fetch';
|
|
1
|
+
import { Delete, Get, Patch, Post } from '../../fetch';
|
|
2
2
|
import { urls } from '../../constants';
|
|
3
3
|
export async function getGlobalSecurityPolicy() {
|
|
4
4
|
return Get(urls.identity.configurations.v1);
|
|
@@ -45,4 +45,19 @@ export async function savePasswordHistoryPolicy(body) {
|
|
|
45
45
|
}
|
|
46
46
|
export async function getPasswordConfigPolicy() {
|
|
47
47
|
return Get(`${urls.identity.configurations.v1}/password`);
|
|
48
|
+
}
|
|
49
|
+
export async function getDomainRestrictions() {
|
|
50
|
+
return Get(`${urls.identity.restrictions.emailDomain.v1}`);
|
|
51
|
+
}
|
|
52
|
+
export async function getDomainRestrictionsConfig() {
|
|
53
|
+
return Get(`${urls.identity.restrictions.emailDomain.v1}/config`);
|
|
54
|
+
}
|
|
55
|
+
export async function createDomainRestriction(body) {
|
|
56
|
+
return Post(`${urls.identity.restrictions.emailDomain.v1}`, body);
|
|
57
|
+
}
|
|
58
|
+
export async function updateDomainRestrictionConfig(body) {
|
|
59
|
+
return Post(`${urls.identity.restrictions.emailDomain.v1}/config`, body);
|
|
60
|
+
}
|
|
61
|
+
export async function deleteDomainRestriction(id) {
|
|
62
|
+
return Delete(`${urls.identity.restrictions.emailDomain.v1}/${id}`);
|
|
48
63
|
}
|
|
@@ -68,3 +68,26 @@ export interface TestConfig {
|
|
|
68
68
|
minOptionalTestsToPass: number;
|
|
69
69
|
}
|
|
70
70
|
export declare type ISecurityPolicyPasswordConfig = Partial<TestConfig>;
|
|
71
|
+
export declare enum RestrictionType {
|
|
72
|
+
ALLOW = "ALLOW",
|
|
73
|
+
BLOCK = "BLOCK"
|
|
74
|
+
}
|
|
75
|
+
export interface UpdateDomainRestrictionsConfig {
|
|
76
|
+
active: boolean;
|
|
77
|
+
blockPublicDomains?: boolean;
|
|
78
|
+
type?: RestrictionType;
|
|
79
|
+
}
|
|
80
|
+
export interface CreateDomainRestriction {
|
|
81
|
+
domain: string;
|
|
82
|
+
type: RestrictionType;
|
|
83
|
+
}
|
|
84
|
+
export interface DomainRestriction {
|
|
85
|
+
id: string;
|
|
86
|
+
domain: string;
|
|
87
|
+
type: RestrictionType;
|
|
88
|
+
}
|
|
89
|
+
export interface DomainRestrictionConfig {
|
|
90
|
+
active: boolean;
|
|
91
|
+
listType: RestrictionType;
|
|
92
|
+
blockPublicDomains: boolean;
|
|
93
|
+
}
|
package/constants.d.ts
CHANGED
package/constants.js
CHANGED
|
@@ -32,6 +32,11 @@ export const urls = {
|
|
|
32
32
|
configurations: {
|
|
33
33
|
v1: '/identity/resources/configurations/v1'
|
|
34
34
|
},
|
|
35
|
+
restrictions: {
|
|
36
|
+
emailDomain: {
|
|
37
|
+
v1: "/identity/resources/configurations/restrictions/v1/email-domain"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
35
40
|
sso: {
|
|
36
41
|
v1: '/identity/resources/sso/v1',
|
|
37
42
|
v2: '/identity/resources/sso/v2'
|
package/index.js
CHANGED
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.createDomainRestriction = createDomainRestriction;
|
|
7
|
+
exports.deleteDomainRestriction = deleteDomainRestriction;
|
|
6
8
|
exports.getCaptchaPolicy = getCaptchaPolicy;
|
|
9
|
+
exports.getDomainRestrictions = getDomainRestrictions;
|
|
10
|
+
exports.getDomainRestrictionsConfig = getDomainRestrictionsConfig;
|
|
7
11
|
exports.getGlobalSecurityPolicy = getGlobalSecurityPolicy;
|
|
8
12
|
exports.getLockoutPolicy = getLockoutPolicy;
|
|
9
13
|
exports.getMfaPolicy = getMfaPolicy;
|
|
@@ -13,6 +17,7 @@ exports.getVendorMfaPolicy = getVendorMfaPolicy;
|
|
|
13
17
|
exports.saveLockoutPolicy = saveLockoutPolicy;
|
|
14
18
|
exports.saveMfaPolicy = saveMfaPolicy;
|
|
15
19
|
exports.savePasswordHistoryPolicy = savePasswordHistoryPolicy;
|
|
20
|
+
exports.updateDomainRestrictionConfig = updateDomainRestrictionConfig;
|
|
16
21
|
|
|
17
22
|
var _fetch = require("../../fetch");
|
|
18
23
|
|
|
@@ -72,4 +77,24 @@ async function savePasswordHistoryPolicy(body) {
|
|
|
72
77
|
|
|
73
78
|
async function getPasswordConfigPolicy() {
|
|
74
79
|
return (0, _fetch.Get)(`${_constants.urls.identity.configurations.v1}/password`);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
async function getDomainRestrictions() {
|
|
83
|
+
return (0, _fetch.Get)(`${_constants.urls.identity.restrictions.emailDomain.v1}`);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
async function getDomainRestrictionsConfig() {
|
|
87
|
+
return (0, _fetch.Get)(`${_constants.urls.identity.restrictions.emailDomain.v1}/config`);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
async function createDomainRestriction(body) {
|
|
91
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.restrictions.emailDomain.v1}`, body);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
async function updateDomainRestrictionConfig(body) {
|
|
95
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.restrictions.emailDomain.v1}/config`, body);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
async function deleteDomainRestriction(id) {
|
|
99
|
+
return (0, _fetch.Delete)(`${_constants.urls.identity.restrictions.emailDomain.v1}/${id}`);
|
|
75
100
|
}
|
|
@@ -2,4 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
|
-
});
|
|
5
|
+
});
|
|
6
|
+
exports.RestrictionType = void 0;
|
|
7
|
+
let RestrictionType;
|
|
8
|
+
exports.RestrictionType = RestrictionType;
|
|
9
|
+
|
|
10
|
+
(function (RestrictionType) {
|
|
11
|
+
RestrictionType["ALLOW"] = "ALLOW";
|
|
12
|
+
RestrictionType["BLOCK"] = "BLOCK";
|
|
13
|
+
})(RestrictionType || (exports.RestrictionType = RestrictionType = {}));
|
package/node/constants.js
CHANGED
|
@@ -38,6 +38,11 @@ const urls = {
|
|
|
38
38
|
configurations: {
|
|
39
39
|
v1: '/identity/resources/configurations/v1'
|
|
40
40
|
},
|
|
41
|
+
restrictions: {
|
|
42
|
+
emailDomain: {
|
|
43
|
+
v1: "/identity/resources/configurations/restrictions/v1/email-domain"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
41
46
|
sso: {
|
|
42
47
|
v1: '/identity/resources/sso/v1',
|
|
43
48
|
v2: '/identity/resources/sso/v2'
|
package/node/index.js
CHANGED