@frontegg/rest-api 3.0.19 → 3.0.22
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 +2 -2
- package/auth/secutiry-poilicy/interfaces.d.ts +2 -2
- package/index.js +1 -1
- package/interfaces.d.ts +7 -0
- package/metadata/index.d.ts +1 -0
- package/metadata/index.js +5 -0
- package/node/index.js +1 -1
- package/node/metadata/index.js +9 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ISaveSecurityPolicyMfa, ISaveSecurityPolicyLockout, ISecurityPolicyMfa, ISecurityPolicyLockout, ISecurityPolicyCaptcha, ISecurityPolicyPasswordHistory, ISaveSecurityPolicyPasswordHistory, ISecurityPolicyPasswordConfig, ISecurityPolicy, DomainRestriction, DomainRestrictionConfig, CreateDomainRestriction, UpdateDomainRestrictionsConfig, IpRestriction, IPRestrictionsConfig, BulkCreateIpRestriction, CreateIpRestriction, GetIPRestrictionsParams } from './interfaces';
|
|
2
|
-
import {
|
|
2
|
+
import { FronteggPaginationResult } from '../../interfaces';
|
|
3
3
|
/**
|
|
4
4
|
* Get global secure access configuration
|
|
5
5
|
*/
|
|
@@ -65,7 +65,7 @@ export declare function deleteDomainRestriction(id: string): Promise<void>;
|
|
|
65
65
|
/**
|
|
66
66
|
* Get ip restrictions for tenant
|
|
67
67
|
*/
|
|
68
|
-
export declare function getIPRestrictions(params: GetIPRestrictionsParams): Promise<
|
|
68
|
+
export declare function getIPRestrictions(params: GetIPRestrictionsParams): Promise<FronteggPaginationResult<IpRestriction[]>>;
|
|
69
69
|
/**
|
|
70
70
|
* Get ip restrictions config for tenant
|
|
71
71
|
*/
|
|
@@ -102,8 +102,8 @@ export interface GetIPRestrictionsParams {
|
|
|
102
102
|
}
|
|
103
103
|
export interface CreateIpRestriction {
|
|
104
104
|
ip: string;
|
|
105
|
-
strategy
|
|
106
|
-
isActive
|
|
105
|
+
strategy?: RestrictionType;
|
|
106
|
+
isActive?: boolean;
|
|
107
107
|
description?: string;
|
|
108
108
|
}
|
|
109
109
|
export interface UpdateIpRestriction {
|
package/index.js
CHANGED
package/interfaces.d.ts
CHANGED
|
@@ -6,6 +6,13 @@ export interface PaginationResult<T> {
|
|
|
6
6
|
totalPages: number;
|
|
7
7
|
items: T[];
|
|
8
8
|
}
|
|
9
|
+
export interface FronteggPaginationResult<T> {
|
|
10
|
+
_metadata: {
|
|
11
|
+
totalPages: number;
|
|
12
|
+
totalItems: number;
|
|
13
|
+
};
|
|
14
|
+
items: T[];
|
|
15
|
+
}
|
|
9
16
|
export interface KeyValuePair {
|
|
10
17
|
key: string;
|
|
11
18
|
value: string;
|
package/metadata/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IAuditsMetadata, IMetadataIp, INotificationMetadata, ISamlMetadata } from './interfaces';
|
|
2
|
+
export declare function getCurrentUserIpMetadata(): Promise<IMetadataIp>;
|
|
2
3
|
export declare const getNotificationsMetadata: () => Promise<INotificationMetadata>;
|
|
3
4
|
export declare const getSamlMetadata: () => Promise<ISamlMetadata>;
|
|
4
5
|
export declare const getAuditsMetadata: () => Promise<IAuditsMetadata>;
|
package/metadata/index.js
CHANGED
|
@@ -14,6 +14,11 @@ async function getIpMetadata(ip) {
|
|
|
14
14
|
throw new Error(`ip metadata not found`);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
export async function getCurrentUserIpMetadata() {
|
|
18
|
+
const data = await Get(`/metadata/ipme`);
|
|
19
|
+
if (data) return data;
|
|
20
|
+
throw new Error(`ip metadata not found`);
|
|
21
|
+
}
|
|
17
22
|
export const getNotificationsMetadata = async () => getMetadata({
|
|
18
23
|
entityName: 'notifications'
|
|
19
24
|
});
|
package/node/index.js
CHANGED
package/node/metadata/index.js
CHANGED
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.getAuditsMetadata = void 0;
|
|
7
|
+
exports.getCurrentUserIpMetadata = getCurrentUserIpMetadata;
|
|
8
|
+
exports.getSamlMetadata = exports.getNotificationsMetadata = exports.getIpAdressMetadata = void 0;
|
|
7
9
|
|
|
8
10
|
var _fetch = require("../fetch");
|
|
9
11
|
|
|
@@ -21,6 +23,12 @@ async function getIpMetadata(ip) {
|
|
|
21
23
|
throw new Error(`ip metadata not found`);
|
|
22
24
|
}
|
|
23
25
|
|
|
26
|
+
async function getCurrentUserIpMetadata() {
|
|
27
|
+
const data = await (0, _fetch.Get)(`/metadata/ipme`);
|
|
28
|
+
if (data) return data;
|
|
29
|
+
throw new Error(`ip metadata not found`);
|
|
30
|
+
}
|
|
31
|
+
|
|
24
32
|
const getNotificationsMetadata = async () => getMetadata({
|
|
25
33
|
entityName: 'notifications'
|
|
26
34
|
});
|