@frontegg/rest-api 3.0.12 → 3.0.15
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 +25 -1
- package/auth/secutiry-poilicy/index.js +18 -0
- package/auth/secutiry-poilicy/interfaces.d.ts +29 -0
- package/constants.d.ts +3 -0
- package/constants.js +3 -0
- package/index.js +1 -1
- package/node/auth/secutiry-poilicy/index.js +30 -0
- package/node/constants.js +3 -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, DomainRestriction, DomainRestrictionConfig, CreateDomainRestriction, UpdateDomainRestrictionsConfig } from './interfaces';
|
|
1
|
+
import { ISaveSecurityPolicyMfa, ISaveSecurityPolicyLockout, ISecurityPolicyMfa, ISecurityPolicyLockout, ISecurityPolicyCaptcha, ISecurityPolicyPasswordHistory, ISaveSecurityPolicyPasswordHistory, ISecurityPolicyPasswordConfig, ISecurityPolicy, DomainRestriction, DomainRestrictionConfig, CreateDomainRestriction, UpdateDomainRestrictionsConfig, IpRestriction, IPRestrictionsConfig, BulkCreateIpRestriction, CreateIpRestriction } from './interfaces';
|
|
2
2
|
/**
|
|
3
3
|
* Get global secure access configuration
|
|
4
4
|
*/
|
|
@@ -61,3 +61,27 @@ export declare function updateDomainRestrictionConfig(body: UpdateDomainRestrict
|
|
|
61
61
|
* Delete domain restriction for tenant by id
|
|
62
62
|
*/
|
|
63
63
|
export declare function deleteDomainRestriction(id: string): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Get ip restrictions for tenant
|
|
66
|
+
*/
|
|
67
|
+
export declare function getIPRestrictions(): Promise<IpRestriction[]>;
|
|
68
|
+
/**
|
|
69
|
+
* Get ip restrictions config for tenant
|
|
70
|
+
*/
|
|
71
|
+
export declare function getIPRestrictionsConfig(): Promise<IPRestrictionsConfig>;
|
|
72
|
+
/**
|
|
73
|
+
* Create ip restriction for tenant
|
|
74
|
+
*/
|
|
75
|
+
export declare function createIPRestriction(body: CreateIpRestriction): Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* Create bulk ip restrictions for tenant
|
|
78
|
+
*/
|
|
79
|
+
export declare function bulkCreateIPRestriction(body: BulkCreateIpRestriction): Promise<void>;
|
|
80
|
+
/**
|
|
81
|
+
* Update ip restrictions config for tenant
|
|
82
|
+
*/
|
|
83
|
+
export declare function updateIPRestrictionConfig(body: IPRestrictionsConfig): Promise<void>;
|
|
84
|
+
/**
|
|
85
|
+
* Delete ip restriction for tenant by id
|
|
86
|
+
*/
|
|
87
|
+
export declare function deleteIPRestriction(id: string): Promise<void>;
|
|
@@ -60,4 +60,22 @@ export async function updateDomainRestrictionConfig(body) {
|
|
|
60
60
|
}
|
|
61
61
|
export async function deleteDomainRestriction(id) {
|
|
62
62
|
return Delete(`${urls.identity.restrictions.emailDomain.v1}/${id}`);
|
|
63
|
+
}
|
|
64
|
+
export async function getIPRestrictions() {
|
|
65
|
+
return Get(`${urls.identity.restrictions.ip.v1}`);
|
|
66
|
+
}
|
|
67
|
+
export async function getIPRestrictionsConfig() {
|
|
68
|
+
return Get(`${urls.identity.restrictions.ip.v1}/config`);
|
|
69
|
+
}
|
|
70
|
+
export async function createIPRestriction(body) {
|
|
71
|
+
return Post(`${urls.identity.restrictions.ip.v1}`, body);
|
|
72
|
+
}
|
|
73
|
+
export async function bulkCreateIPRestriction(body) {
|
|
74
|
+
return Post(`${urls.identity.restrictions.ip.v1}/bulk`, body);
|
|
75
|
+
}
|
|
76
|
+
export async function updateIPRestrictionConfig(body) {
|
|
77
|
+
return Post(`${urls.identity.restrictions.ip.v1}/config`, body);
|
|
78
|
+
}
|
|
79
|
+
export async function deleteIPRestriction(id) {
|
|
80
|
+
return Delete(`${urls.identity.restrictions.ip.v1}/${id}`);
|
|
63
81
|
}
|
|
@@ -91,3 +91,32 @@ export interface DomainRestrictionConfig {
|
|
|
91
91
|
listType: RestrictionType;
|
|
92
92
|
blockPublicDomains: boolean;
|
|
93
93
|
}
|
|
94
|
+
export interface IPRestrictionsConfig {
|
|
95
|
+
isActive: boolean;
|
|
96
|
+
strategy?: RestrictionType;
|
|
97
|
+
}
|
|
98
|
+
export interface CreateIpRestriction {
|
|
99
|
+
ip: string;
|
|
100
|
+
strategy: RestrictionType;
|
|
101
|
+
isActive: boolean;
|
|
102
|
+
description?: string;
|
|
103
|
+
}
|
|
104
|
+
export interface UpdateIpRestriction {
|
|
105
|
+
id: string;
|
|
106
|
+
ip: string;
|
|
107
|
+
strategy: RestrictionType;
|
|
108
|
+
isActive?: boolean;
|
|
109
|
+
description?: string;
|
|
110
|
+
}
|
|
111
|
+
export interface BulkCreateIpRestriction {
|
|
112
|
+
ips: CreateIpRestriction[];
|
|
113
|
+
}
|
|
114
|
+
export interface IpRestriction {
|
|
115
|
+
id: string;
|
|
116
|
+
ip: string;
|
|
117
|
+
strategy: RestrictionType;
|
|
118
|
+
isActive: boolean;
|
|
119
|
+
description?: string;
|
|
120
|
+
createdAt: Date;
|
|
121
|
+
updatedAt: Date;
|
|
122
|
+
}
|
package/constants.d.ts
CHANGED
package/constants.js
CHANGED
package/index.js
CHANGED
|
@@ -3,12 +3,17 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.bulkCreateIPRestriction = bulkCreateIPRestriction;
|
|
6
7
|
exports.createDomainRestriction = createDomainRestriction;
|
|
8
|
+
exports.createIPRestriction = createIPRestriction;
|
|
7
9
|
exports.deleteDomainRestriction = deleteDomainRestriction;
|
|
10
|
+
exports.deleteIPRestriction = deleteIPRestriction;
|
|
8
11
|
exports.getCaptchaPolicy = getCaptchaPolicy;
|
|
9
12
|
exports.getDomainRestrictions = getDomainRestrictions;
|
|
10
13
|
exports.getDomainRestrictionsConfig = getDomainRestrictionsConfig;
|
|
11
14
|
exports.getGlobalSecurityPolicy = getGlobalSecurityPolicy;
|
|
15
|
+
exports.getIPRestrictions = getIPRestrictions;
|
|
16
|
+
exports.getIPRestrictionsConfig = getIPRestrictionsConfig;
|
|
12
17
|
exports.getLockoutPolicy = getLockoutPolicy;
|
|
13
18
|
exports.getMfaPolicy = getMfaPolicy;
|
|
14
19
|
exports.getPasswordConfigPolicy = getPasswordConfigPolicy;
|
|
@@ -18,6 +23,7 @@ exports.saveLockoutPolicy = saveLockoutPolicy;
|
|
|
18
23
|
exports.saveMfaPolicy = saveMfaPolicy;
|
|
19
24
|
exports.savePasswordHistoryPolicy = savePasswordHistoryPolicy;
|
|
20
25
|
exports.updateDomainRestrictionConfig = updateDomainRestrictionConfig;
|
|
26
|
+
exports.updateIPRestrictionConfig = updateIPRestrictionConfig;
|
|
21
27
|
|
|
22
28
|
var _fetch = require("../../fetch");
|
|
23
29
|
|
|
@@ -97,4 +103,28 @@ async function updateDomainRestrictionConfig(body) {
|
|
|
97
103
|
|
|
98
104
|
async function deleteDomainRestriction(id) {
|
|
99
105
|
return (0, _fetch.Delete)(`${_constants.urls.identity.restrictions.emailDomain.v1}/${id}`);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
async function getIPRestrictions() {
|
|
109
|
+
return (0, _fetch.Get)(`${_constants.urls.identity.restrictions.ip.v1}`);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
async function getIPRestrictionsConfig() {
|
|
113
|
+
return (0, _fetch.Get)(`${_constants.urls.identity.restrictions.ip.v1}/config`);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
async function createIPRestriction(body) {
|
|
117
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.restrictions.ip.v1}`, body);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
async function bulkCreateIPRestriction(body) {
|
|
121
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.restrictions.ip.v1}/bulk`, body);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
async function updateIPRestrictionConfig(body) {
|
|
125
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.restrictions.ip.v1}/config`, body);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
async function deleteIPRestriction(id) {
|
|
129
|
+
return (0, _fetch.Delete)(`${_constants.urls.identity.restrictions.ip.v1}/${id}`);
|
|
100
130
|
}
|
package/node/constants.js
CHANGED
package/node/index.js
CHANGED