@frontegg/rest-api 3.0.22 → 3.0.25
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 +5 -1
- package/auth/secutiry-poilicy/index.js +3 -0
- package/auth/secutiry-poilicy/interfaces.d.ts +4 -1
- package/constants.d.ts +3 -0
- package/constants.js +3 -0
- package/feature-flags/index.d.ts +2 -0
- package/feature-flags/index.js +5 -0
- package/feature-flags/interfaces.d.ts +2 -0
- package/feature-flags/interfaces.js +1 -0
- package/feature-flags/package.json +6 -0
- package/index.d.ts +5 -0
- package/index.js +6 -2
- package/metadata/interfaces.d.ts +1 -0
- package/node/auth/secutiry-poilicy/index.js +5 -0
- package/node/constants.js +3 -0
- package/node/feature-flags/index.js +14 -0
- package/node/feature-flags/interfaces.js +5 -0
- package/node/index.js +31 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ISaveSecurityPolicyMfa, ISaveSecurityPolicyLockout, ISecurityPolicyMfa, ISecurityPolicyLockout, ISecurityPolicyCaptcha, ISecurityPolicyPasswordHistory, ISaveSecurityPolicyPasswordHistory, ISecurityPolicyPasswordConfig, ISecurityPolicy, DomainRestriction, DomainRestrictionConfig, CreateDomainRestriction, UpdateDomainRestrictionsConfig, IpRestriction, IPRestrictionsConfig, BulkCreateIpRestriction, CreateIpRestriction, GetIPRestrictionsParams } from './interfaces';
|
|
1
|
+
import { ISaveSecurityPolicyMfa, ISaveSecurityPolicyLockout, ISecurityPolicyMfa, ISecurityPolicyLockout, ISecurityPolicyCaptcha, ISecurityPolicyPasswordHistory, ISaveSecurityPolicyPasswordHistory, ISecurityPolicyPasswordConfig, ISecurityPolicy, DomainRestriction, DomainRestrictionConfig, CreateDomainRestriction, UpdateDomainRestrictionsConfig, IpRestriction, IPRestrictionsConfig, BulkCreateIpRestriction, CreateIpRestriction, GetIPRestrictionsParams, IPValidResponse } from './interfaces';
|
|
2
2
|
import { FronteggPaginationResult } from '../../interfaces';
|
|
3
3
|
/**
|
|
4
4
|
* Get global secure access configuration
|
|
@@ -86,3 +86,7 @@ export declare function updateIPRestrictionConfig(body: IPRestrictionsConfig): P
|
|
|
86
86
|
* Delete ip restriction for tenant by id
|
|
87
87
|
*/
|
|
88
88
|
export declare function deleteIPRestriction(id: string): Promise<void>;
|
|
89
|
+
/**
|
|
90
|
+
* Test current user ip restriction
|
|
91
|
+
*/
|
|
92
|
+
export declare function testCurrentIp(): Promise<IPValidResponse>;
|
|
@@ -78,4 +78,7 @@ export async function updateIPRestrictionConfig(body) {
|
|
|
78
78
|
}
|
|
79
79
|
export async function deleteIPRestriction(id) {
|
|
80
80
|
return Delete(`${urls.identity.restrictions.ip.v1}/${id}`);
|
|
81
|
+
}
|
|
82
|
+
export async function testCurrentIp() {
|
|
83
|
+
return Post(`${urls.identity.restrictions.ip.v1}/verify`);
|
|
81
84
|
}
|
|
@@ -98,7 +98,10 @@ export interface IPRestrictionsConfig {
|
|
|
98
98
|
export interface GetIPRestrictionsParams {
|
|
99
99
|
_offset: number;
|
|
100
100
|
_limit: number;
|
|
101
|
-
_filter:
|
|
101
|
+
_filter: string;
|
|
102
|
+
}
|
|
103
|
+
export interface IPValidResponse {
|
|
104
|
+
valid: boolean;
|
|
102
105
|
}
|
|
103
106
|
export interface CreateIpRestriction {
|
|
104
107
|
ip: string;
|
package/constants.d.ts
CHANGED
package/constants.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ import * as subscriptions from './subscriptions';
|
|
|
13
13
|
import { FronteggApiError } from './error';
|
|
14
14
|
import * as vendor from './vendor';
|
|
15
15
|
import * as subTenants from './sub-tenants';
|
|
16
|
+
import * as featureFlags from './feature-flags';
|
|
16
17
|
import { ContextHolder, FronteggContext } from './ContextHolder';
|
|
17
18
|
export * from './interfaces';
|
|
18
19
|
export * from './auth/interfaces';
|
|
@@ -29,6 +30,8 @@ export * from './subscriptions/interfaces';
|
|
|
29
30
|
export * from './vendor/interfaces';
|
|
30
31
|
export * from './sub-tenants/interfaces';
|
|
31
32
|
export * from './routers';
|
|
33
|
+
export * from './feature-flags';
|
|
34
|
+
export * from './feature-flags/interfaces';
|
|
32
35
|
import { AuthStrategyEnum, SocialLoginProviders } from './auth';
|
|
33
36
|
import { ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType } from './subscriptions';
|
|
34
37
|
declare const api: {
|
|
@@ -45,6 +48,7 @@ declare const api: {
|
|
|
45
48
|
subscriptions: typeof subscriptions;
|
|
46
49
|
vendor: typeof vendor;
|
|
47
50
|
subTenants: typeof subTenants;
|
|
51
|
+
featureFlags: typeof featureFlags;
|
|
48
52
|
};
|
|
49
53
|
export { fetch, ContextHolder, FronteggContext, api, FronteggApiError, AuthStrategyEnum, SocialLoginProviders, ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType, };
|
|
50
54
|
declare const _default: {
|
|
@@ -71,6 +75,7 @@ declare const _default: {
|
|
|
71
75
|
subscriptions: typeof subscriptions;
|
|
72
76
|
vendor: typeof vendor;
|
|
73
77
|
subTenants: typeof subTenants;
|
|
78
|
+
featureFlags: typeof featureFlags;
|
|
74
79
|
};
|
|
75
80
|
FronteggApiError: typeof FronteggApiError;
|
|
76
81
|
AuthStrategyEnum: typeof auth.AuthStrategyEnum;
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license Frontegg v3.0.
|
|
1
|
+
/** @license Frontegg v3.0.25
|
|
2
2
|
*
|
|
3
3
|
* This source code is licensed under the MIT license found in the
|
|
4
4
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -18,6 +18,7 @@ import * as subscriptions from './subscriptions';
|
|
|
18
18
|
import { FronteggApiError } from './error';
|
|
19
19
|
import * as vendor from './vendor';
|
|
20
20
|
import * as subTenants from './sub-tenants';
|
|
21
|
+
import * as featureFlags from './feature-flags';
|
|
21
22
|
import { ContextHolder, FronteggContext } from './ContextHolder';
|
|
22
23
|
export * from './interfaces';
|
|
23
24
|
export * from './auth/interfaces';
|
|
@@ -34,6 +35,8 @@ export * from './subscriptions/interfaces';
|
|
|
34
35
|
export * from './vendor/interfaces';
|
|
35
36
|
export * from './sub-tenants/interfaces';
|
|
36
37
|
export * from './routers';
|
|
38
|
+
export * from './feature-flags';
|
|
39
|
+
export * from './feature-flags/interfaces';
|
|
37
40
|
import { AuthStrategyEnum, SocialLoginProviders } from './auth';
|
|
38
41
|
import { ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType } from './subscriptions';
|
|
39
42
|
const api = {
|
|
@@ -49,7 +52,8 @@ const api = {
|
|
|
49
52
|
roles,
|
|
50
53
|
subscriptions,
|
|
51
54
|
vendor,
|
|
52
|
-
subTenants
|
|
55
|
+
subTenants,
|
|
56
|
+
featureFlags
|
|
53
57
|
};
|
|
54
58
|
export { fetch, ContextHolder, FronteggContext, api, FronteggApiError, AuthStrategyEnum, SocialLoginProviders, ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType };
|
|
55
59
|
export default {
|
package/metadata/interfaces.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ exports.getVendorMfaPolicy = getVendorMfaPolicy;
|
|
|
22
22
|
exports.saveLockoutPolicy = saveLockoutPolicy;
|
|
23
23
|
exports.saveMfaPolicy = saveMfaPolicy;
|
|
24
24
|
exports.savePasswordHistoryPolicy = savePasswordHistoryPolicy;
|
|
25
|
+
exports.testCurrentIp = testCurrentIp;
|
|
25
26
|
exports.updateDomainRestrictionConfig = updateDomainRestrictionConfig;
|
|
26
27
|
exports.updateIPRestrictionConfig = updateIPRestrictionConfig;
|
|
27
28
|
|
|
@@ -127,4 +128,8 @@ async function updateIPRestrictionConfig(body) {
|
|
|
127
128
|
|
|
128
129
|
async function deleteIPRestriction(id) {
|
|
129
130
|
return (0, _fetch.Delete)(`${_constants.urls.identity.restrictions.ip.v1}/${id}`);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
async function testCurrentIp() {
|
|
134
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.restrictions.ip.v1}/verify`);
|
|
130
135
|
}
|
package/node/constants.js
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.loadFeatureFlags = loadFeatureFlags;
|
|
7
|
+
|
|
8
|
+
var _constants = require("../constants");
|
|
9
|
+
|
|
10
|
+
var _fetch = require("../fetch");
|
|
11
|
+
|
|
12
|
+
async function loadFeatureFlags() {
|
|
13
|
+
return (0, _fetch.Get)(_constants.urls.featureFlags.v1);
|
|
14
|
+
}
|
package/node/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license Frontegg v3.0.
|
|
1
|
+
/** @license Frontegg v3.0.25
|
|
2
2
|
*
|
|
3
3
|
* This source code is licensed under the MIT license found in the
|
|
4
4
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -109,6 +109,20 @@ var vendor = _interopRequireWildcard(require("./vendor"));
|
|
|
109
109
|
|
|
110
110
|
var subTenants = _interopRequireWildcard(require("./sub-tenants"));
|
|
111
111
|
|
|
112
|
+
var featureFlags = _interopRequireWildcard(require("./feature-flags"));
|
|
113
|
+
|
|
114
|
+
Object.keys(featureFlags).forEach(function (key) {
|
|
115
|
+
if (key === "default" || key === "__esModule") return;
|
|
116
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
117
|
+
if (key in exports && exports[key] === featureFlags[key]) return;
|
|
118
|
+
Object.defineProperty(exports, key, {
|
|
119
|
+
enumerable: true,
|
|
120
|
+
get: function () {
|
|
121
|
+
return featureFlags[key];
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
|
|
112
126
|
var _ContextHolder = require("./ContextHolder");
|
|
113
127
|
|
|
114
128
|
var _interfaces = require("./interfaces");
|
|
@@ -321,6 +335,20 @@ Object.keys(_routers).forEach(function (key) {
|
|
|
321
335
|
});
|
|
322
336
|
});
|
|
323
337
|
|
|
338
|
+
var _interfaces15 = require("./feature-flags/interfaces");
|
|
339
|
+
|
|
340
|
+
Object.keys(_interfaces15).forEach(function (key) {
|
|
341
|
+
if (key === "default" || key === "__esModule") return;
|
|
342
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
343
|
+
if (key in exports && exports[key] === _interfaces15[key]) return;
|
|
344
|
+
Object.defineProperty(exports, key, {
|
|
345
|
+
enumerable: true,
|
|
346
|
+
get: function () {
|
|
347
|
+
return _interfaces15[key];
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
});
|
|
351
|
+
|
|
324
352
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
325
353
|
|
|
326
354
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -338,7 +366,8 @@ const api = {
|
|
|
338
366
|
roles,
|
|
339
367
|
subscriptions,
|
|
340
368
|
vendor,
|
|
341
|
-
subTenants
|
|
369
|
+
subTenants,
|
|
370
|
+
featureFlags
|
|
342
371
|
};
|
|
343
372
|
exports.api = api;
|
|
344
373
|
var _default = {
|