@frontegg/rest-api 3.1.74-alpha.9437937621 → 3.1.74
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/ContextHolder/index.d.ts +27 -108
- package/ContextHolder/index.js +50 -155
- package/account-settings/index.d.ts +7 -19
- package/account-settings/index.js +13 -23
- package/applications/index.d.ts +44 -49
- package/applications/index.js +37 -51
- package/audits/index.d.ts +15 -27
- package/audits/index.js +17 -27
- package/auth/index.d.ts +768 -817
- package/auth/index.js +721 -902
- package/auth/secutiry-poilicy/index.d.ts +102 -58
- package/auth/secutiry-poilicy/index.js +90 -122
- package/auth/utils.d.ts +2 -2
- package/auth/utils.js +8 -9
- package/connectivity/index.d.ts +26 -125
- package/connectivity/index.js +114 -147
- package/directory/index.d.ts +22 -31
- package/directory/index.js +15 -27
- package/entitlements/index.d.ts +8 -14
- package/entitlements/index.js +4 -12
- package/feature-flags/index.d.ts +2 -8
- package/feature-flags/index.js +8 -16
- package/fetch.d.ts +24 -0
- package/fetch.js +265 -0
- package/groups/index.d.ts +49 -73
- package/groups/index.js +45 -64
- package/impersonate/index.d.ts +6 -15
- package/impersonate/index.js +5 -13
- package/index.d.ts +108 -154
- package/index.js +78 -109
- package/interfaces.d.ts +0 -10
- package/metadata/index.d.ts +7 -67
- package/metadata/index.js +32 -52
- package/node/ContextHolder/index.js +50 -155
- package/node/account-settings/index.js +16 -27
- package/node/applications/index.js +44 -51
- package/node/audits/index.js +20 -31
- package/node/auth/index.js +1035 -768
- package/node/auth/secutiry-poilicy/index.js +136 -125
- package/node/auth/utils.js +7 -9
- package/node/connectivity/index.js +187 -148
- package/node/directory/index.js +20 -29
- package/node/entitlements/index.js +5 -18
- package/node/feature-flags/index.js +9 -21
- package/node/fetch.js +306 -0
- package/node/groups/index.js +63 -65
- package/node/impersonate/index.js +5 -18
- package/node/index.js +71 -116
- package/node/metadata/index.js +52 -61
- package/node/notifications/index.js +27 -37
- package/node/reports/index.js +70 -78
- package/node/roles/index.js +51 -56
- package/node/security-center/index.js +9 -21
- package/node/sub-tenants/index.js +89 -90
- package/node/subscriptions/index.js +107 -79
- package/node/subscriptions/invoices.js +17 -25
- package/node/subscriptions/managedSubscriptions.js +27 -32
- package/node/subscriptions/paymentMethods.js +20 -27
- package/node/subscriptions/paymentProviders.js +6 -15
- package/node/subscriptions/plans.js +9 -17
- package/node/subscriptions/providers/index.js +18 -0
- package/node/subscriptions/providers/stripe/index.js +21 -26
- package/node/subscriptions/subscriptions.js +27 -32
- package/node/subscriptions/summaries.js +6 -15
- package/node/subscriptions/tenantConfiguration.js +9 -17
- package/node/subscriptions/vendorPublicConfigurations.js +6 -15
- package/node/teams/index.js +138 -130
- package/node/tenants/index.js +60 -65
- package/node/user-phone-numbers/index.js +24 -32
- package/node/users/index.js +53 -58
- package/node/vendor/index.js +6 -17
- package/notifications/index.d.ts +16 -22
- package/notifications/index.js +22 -33
- package/package.json +1 -1
- package/reports/index.d.ts +44 -50
- package/reports/index.js +62 -75
- package/roles/index.d.ts +38 -44
- package/roles/index.js +41 -57
- package/security-center/index.d.ts +2 -14
- package/security-center/index.js +6 -15
- package/sub-tenants/index.d.ts +15 -57
- package/sub-tenants/index.js +68 -88
- package/subscriptions/index.d.ts +11 -56
- package/subscriptions/index.js +11 -68
- package/subscriptions/invoices.d.ts +13 -16
- package/subscriptions/invoices.js +14 -24
- package/subscriptions/managedSubscriptions.d.ts +15 -18
- package/subscriptions/managedSubscriptions.js +22 -33
- package/subscriptions/paymentMethods.d.ts +13 -16
- package/subscriptions/paymentMethods.js +17 -26
- package/subscriptions/paymentProviders.d.ts +5 -8
- package/subscriptions/paymentProviders.js +4 -11
- package/subscriptions/plans.d.ts +8 -11
- package/subscriptions/plans.js +6 -14
- package/subscriptions/providers/index.d.ts +1 -0
- package/subscriptions/providers/index.js +1 -0
- package/subscriptions/providers/stripe/index.d.ts +21 -24
- package/subscriptions/providers/stripe/index.js +16 -27
- package/subscriptions/subscriptions.d.ts +21 -24
- package/subscriptions/subscriptions.js +22 -33
- package/subscriptions/summaries.d.ts +4 -7
- package/subscriptions/summaries.js +3 -10
- package/subscriptions/tenantConfiguration.d.ts +3 -6
- package/subscriptions/tenantConfiguration.js +7 -15
- package/subscriptions/vendorPublicConfigurations.d.ts +2 -5
- package/subscriptions/vendorPublicConfigurations.js +4 -11
- package/teams/index.d.ts +131 -35
- package/teams/index.js +93 -122
- package/tenants/index.d.ts +37 -25
- package/tenants/index.js +46 -62
- package/user-phone-numbers/index.d.ts +26 -32
- package/user-phone-numbers/index.js +19 -32
- package/users/index.d.ts +15 -21
- package/users/index.js +44 -60
- package/vendor/index.d.ts +6 -12
- package/vendor/index.js +4 -11
- package/BaseApiClient.d.ts +0 -16
- package/BaseApiClient.js +0 -39
- package/FetchClient.d.ts +0 -42
- package/FetchClient.js +0 -308
- package/node/BaseApiClient.js +0 -49
- package/node/FetchClient.js +0 -326
|
@@ -1,60 +1,104 @@
|
|
|
1
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
export
|
|
3
|
+
/**
|
|
4
|
+
* Get global secure access configuration
|
|
5
|
+
*/
|
|
6
|
+
export declare function getGlobalSecurityPolicy(): Promise<ISecurityPolicy>;
|
|
7
|
+
/**
|
|
8
|
+
* Get Mfa configuration from security policy
|
|
9
|
+
*/
|
|
10
|
+
export declare function getMfaPolicy(): Promise<ISecurityPolicyMfa>;
|
|
11
|
+
/**
|
|
12
|
+
* Get Vendor Mfa configuration from security policy
|
|
13
|
+
*/
|
|
14
|
+
export declare function getVendorMfaPolicy(): Promise<ISecurityPolicyMfa>;
|
|
15
|
+
/**
|
|
16
|
+
* Create/Update Mfa configuration from security policy
|
|
17
|
+
*/
|
|
18
|
+
export declare function saveMfaPolicy(body: ISaveSecurityPolicyMfa): Promise<ISecurityPolicyMfa>;
|
|
19
|
+
/**
|
|
20
|
+
* Get Lockout configuration from security policy
|
|
21
|
+
*/
|
|
22
|
+
export declare function getLockoutPolicy(): Promise<ISecurityPolicyLockout>;
|
|
23
|
+
/**
|
|
24
|
+
* Get Vendor Lockout configuration from security policy
|
|
25
|
+
*/
|
|
26
|
+
export declare function getVendorLockoutPolicy(): Promise<ISecurityPolicyLockout>;
|
|
27
|
+
/**
|
|
28
|
+
* Create/Update Lockout configuration from security policy
|
|
29
|
+
*/
|
|
30
|
+
export declare function saveLockoutPolicy(body: ISaveSecurityPolicyLockout): Promise<ISecurityPolicyLockout>;
|
|
31
|
+
/**
|
|
32
|
+
* Get Captcha configuration from security policy
|
|
33
|
+
*/
|
|
34
|
+
export declare function getCaptchaPolicy(): Promise<ISecurityPolicyCaptcha | null>;
|
|
35
|
+
/**
|
|
36
|
+
* Get Password History configuration from security policy
|
|
37
|
+
*/
|
|
38
|
+
export declare function getPasswordHistoryPolicy(): Promise<ISecurityPolicyPasswordHistory>;
|
|
39
|
+
/**
|
|
40
|
+
* Get Vendor Password History configuration from security policy
|
|
41
|
+
*/
|
|
42
|
+
export declare function getVendorPasswordHistoryPolicy(): Promise<ISecurityPolicyPasswordHistory>;
|
|
43
|
+
/**
|
|
44
|
+
* Create/Update Password History configuration from security policy
|
|
45
|
+
*/
|
|
46
|
+
export declare function savePasswordHistoryPolicy(body: ISaveSecurityPolicyPasswordHistory): Promise<ISecurityPolicyPasswordHistory>;
|
|
47
|
+
/**
|
|
48
|
+
* load vendor password configuration.
|
|
49
|
+
*/
|
|
50
|
+
export declare function getPasswordConfigPolicy(): Promise<ISecurityPolicyPasswordConfig>;
|
|
51
|
+
/**
|
|
52
|
+
* Get domain restrictions for tenant
|
|
53
|
+
*/
|
|
54
|
+
export declare function getDomainRestrictions(): Promise<{
|
|
55
|
+
items: DomainRestriction[];
|
|
56
|
+
}>;
|
|
57
|
+
/**
|
|
58
|
+
* Get domain restrictions config for tenant
|
|
59
|
+
*/
|
|
60
|
+
export declare function getDomainRestrictionsConfig(): Promise<DomainRestrictionConfig>;
|
|
61
|
+
/**
|
|
62
|
+
* Create domain restriction for tenant
|
|
63
|
+
*/
|
|
64
|
+
export declare function createDomainRestriction(body: CreateDomainRestriction): Promise<DomainRestriction>;
|
|
65
|
+
/**
|
|
66
|
+
* Update domain restrictions config for tenant
|
|
67
|
+
*/
|
|
68
|
+
export declare function updateDomainRestrictionConfig(body: UpdateDomainRestrictionsConfig): Promise<DomainRestrictionConfig>;
|
|
69
|
+
/**
|
|
70
|
+
* Delete domain restriction for tenant by id
|
|
71
|
+
*/
|
|
72
|
+
export declare function deleteDomainRestriction(id: string): Promise<void>;
|
|
73
|
+
/**
|
|
74
|
+
* Get ip restrictions for tenant
|
|
75
|
+
*/
|
|
76
|
+
export declare function getIPRestrictions(params: GetIPRestrictionsParams): Promise<FronteggPaginationResult<IpRestriction[]>>;
|
|
77
|
+
/**
|
|
78
|
+
* Get ip restrictions config for tenant
|
|
79
|
+
*/
|
|
80
|
+
export declare function getIPRestrictionsConfig(): Promise<IPRestrictionsConfig>;
|
|
81
|
+
/**
|
|
82
|
+
* Create ip restriction for tenant
|
|
83
|
+
*/
|
|
84
|
+
export declare function createIPRestriction(body: CreateIpRestriction): Promise<void>;
|
|
85
|
+
/**
|
|
86
|
+
* Create bulk ip restrictions for tenant
|
|
87
|
+
*/
|
|
88
|
+
export declare function bulkCreateIPRestriction(body: BulkCreateIpRestriction): Promise<void>;
|
|
89
|
+
/**
|
|
90
|
+
* Update ip restrictions config for tenant
|
|
91
|
+
*/
|
|
92
|
+
export declare function updateIPRestrictionConfig(body: IPRestrictionsConfig): Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* Delete ip restriction for tenant by id
|
|
95
|
+
*/
|
|
96
|
+
export declare function deleteIPRestriction(id: string): Promise<void>;
|
|
97
|
+
/**
|
|
98
|
+
* Test current user ip restriction
|
|
99
|
+
*/
|
|
100
|
+
export declare function testCurrentIp(): Promise<IPValidResponse>;
|
|
101
|
+
/**
|
|
102
|
+
* Test current user ip restriction is in allow list
|
|
103
|
+
*/
|
|
104
|
+
export declare function testCurrentIpInAllowList(): Promise<IPValidResponse>;
|
|
@@ -1,125 +1,93 @@
|
|
|
1
|
+
import { Delete, Get, Patch, Post } from '../../fetch';
|
|
1
2
|
import { urls } from '../../constants';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
this.getPasswordHistoryPolicy = async () => {
|
|
52
|
-
return this.get(`${urls.identity.configurations.v1}/password-history-policy`);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
this.getVendorPasswordHistoryPolicy = async () => {
|
|
56
|
-
return this.get(`${urls.identity.configurations.v1}/password-history-policy/vendor`);
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
this.savePasswordHistoryPolicy = async body => {
|
|
60
|
-
if (body.id) {
|
|
61
|
-
return this.patch(`${urls.identity.configurations.v1}/password-history-policy`, body);
|
|
62
|
-
} else {
|
|
63
|
-
return this.post(`${urls.identity.configurations.v1}/password-history-policy`, body);
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
this.getPasswordConfigPolicy = async () => {
|
|
68
|
-
return this.get(`${urls.identity.configurations.v1}/password`);
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
this.getDomainRestrictions = async () => {
|
|
72
|
-
return this.get(`${urls.identity.restrictions.emailDomain.v1}`);
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
this.getDomainRestrictionsConfig = async () => {
|
|
76
|
-
return this.get(`${urls.identity.restrictions.emailDomain.v1}/config`);
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
this.createDomainRestriction = async body => {
|
|
80
|
-
return this.post(`${urls.identity.restrictions.emailDomain.v1}`, body);
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
this.updateDomainRestrictionConfig = async body => {
|
|
84
|
-
return this.post(`${urls.identity.restrictions.emailDomain.v1}/config`, body);
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
this.deleteDomainRestriction = async id => {
|
|
88
|
-
return this.delete(`${urls.identity.restrictions.emailDomain.v1}/${id}`);
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
this.getIPRestrictions = async params => {
|
|
92
|
-
return this.get(`${urls.identity.restrictions.ip.v1}`, params);
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
this.getIPRestrictionsConfig = async () => {
|
|
96
|
-
return this.get(`${urls.identity.restrictions.ip.v1}/config`);
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
this.createIPRestriction = async body => {
|
|
100
|
-
return this.post(`${urls.identity.restrictions.ip.v1}`, body);
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
this.bulkCreateIPRestriction = async body => {
|
|
104
|
-
return this.post(`${urls.identity.restrictions.ip.v1}/bulk`, body);
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
this.updateIPRestrictionConfig = async body => {
|
|
108
|
-
return this.post(`${urls.identity.restrictions.ip.v1}/config`, body);
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
this.deleteIPRestriction = async id => {
|
|
112
|
-
return this.delete(`${urls.identity.restrictions.ip.v1}/${id}`);
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
this.testCurrentIp = async () => {
|
|
116
|
-
return this.post(`${urls.identity.restrictions.ip.v1}/verify`);
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
this.testCurrentIpInAllowList = async () => {
|
|
120
|
-
return this.post(`${urls.identity.restrictions.ip.v1}/verify/allow`);
|
|
121
|
-
};
|
|
3
|
+
export async function getGlobalSecurityPolicy() {
|
|
4
|
+
return Get(urls.identity.configurations.v1);
|
|
5
|
+
}
|
|
6
|
+
export async function getMfaPolicy() {
|
|
7
|
+
return Get(`${urls.identity.configurations.v1}/mfa-policy`);
|
|
8
|
+
}
|
|
9
|
+
export async function getVendorMfaPolicy() {
|
|
10
|
+
return Get(`${urls.identity.configurations.v1}/mfa-policy/vendor`);
|
|
11
|
+
}
|
|
12
|
+
export async function saveMfaPolicy(body) {
|
|
13
|
+
if (body.id) {
|
|
14
|
+
return Patch(`${urls.identity.configurations.v1}/mfa-policy`, body);
|
|
15
|
+
} else {
|
|
16
|
+
return Post(`${urls.identity.configurations.v1}/mfa-policy`, body);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export async function getLockoutPolicy() {
|
|
20
|
+
return Get(`${urls.identity.configurations.v1}/lockout-policy`);
|
|
21
|
+
}
|
|
22
|
+
export async function getVendorLockoutPolicy() {
|
|
23
|
+
return Get(`${urls.identity.configurations.v1}/lockout-policy/vendor`);
|
|
24
|
+
}
|
|
25
|
+
export async function saveLockoutPolicy(body) {
|
|
26
|
+
if (body.id) {
|
|
27
|
+
return Patch(`${urls.identity.configurations.v1}/lockout-policy`, body);
|
|
28
|
+
} else {
|
|
29
|
+
return Post(`${urls.identity.configurations.v1}/lockout-policy`, body);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export async function getCaptchaPolicy() {
|
|
33
|
+
try {
|
|
34
|
+
return await Get(`${urls.identity.configurations.v1}/captcha-policy/public`);
|
|
35
|
+
} catch {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export async function getPasswordHistoryPolicy() {
|
|
40
|
+
return Get(`${urls.identity.configurations.v1}/password-history-policy`);
|
|
41
|
+
}
|
|
42
|
+
export async function getVendorPasswordHistoryPolicy() {
|
|
43
|
+
return Get(`${urls.identity.configurations.v1}/password-history-policy/vendor`);
|
|
44
|
+
}
|
|
45
|
+
export async function savePasswordHistoryPolicy(body) {
|
|
46
|
+
if (body.id) {
|
|
47
|
+
return Patch(`${urls.identity.configurations.v1}/password-history-policy`, body);
|
|
48
|
+
} else {
|
|
49
|
+
return Post(`${urls.identity.configurations.v1}/password-history-policy`, body);
|
|
122
50
|
}
|
|
123
|
-
|
|
124
51
|
}
|
|
125
|
-
export
|
|
52
|
+
export async function getPasswordConfigPolicy() {
|
|
53
|
+
return Get(`${urls.identity.configurations.v1}/password`);
|
|
54
|
+
}
|
|
55
|
+
export async function getDomainRestrictions() {
|
|
56
|
+
return Get(`${urls.identity.restrictions.emailDomain.v1}`);
|
|
57
|
+
}
|
|
58
|
+
export async function getDomainRestrictionsConfig() {
|
|
59
|
+
return Get(`${urls.identity.restrictions.emailDomain.v1}/config`);
|
|
60
|
+
}
|
|
61
|
+
export async function createDomainRestriction(body) {
|
|
62
|
+
return Post(`${urls.identity.restrictions.emailDomain.v1}`, body);
|
|
63
|
+
}
|
|
64
|
+
export async function updateDomainRestrictionConfig(body) {
|
|
65
|
+
return Post(`${urls.identity.restrictions.emailDomain.v1}/config`, body);
|
|
66
|
+
}
|
|
67
|
+
export async function deleteDomainRestriction(id) {
|
|
68
|
+
return Delete(`${urls.identity.restrictions.emailDomain.v1}/${id}`);
|
|
69
|
+
}
|
|
70
|
+
export async function getIPRestrictions(params) {
|
|
71
|
+
return Get(`${urls.identity.restrictions.ip.v1}`, params);
|
|
72
|
+
}
|
|
73
|
+
export async function getIPRestrictionsConfig() {
|
|
74
|
+
return Get(`${urls.identity.restrictions.ip.v1}/config`);
|
|
75
|
+
}
|
|
76
|
+
export async function createIPRestriction(body) {
|
|
77
|
+
return Post(`${urls.identity.restrictions.ip.v1}`, body);
|
|
78
|
+
}
|
|
79
|
+
export async function bulkCreateIPRestriction(body) {
|
|
80
|
+
return Post(`${urls.identity.restrictions.ip.v1}/bulk`, body);
|
|
81
|
+
}
|
|
82
|
+
export async function updateIPRestrictionConfig(body) {
|
|
83
|
+
return Post(`${urls.identity.restrictions.ip.v1}/config`, body);
|
|
84
|
+
}
|
|
85
|
+
export async function deleteIPRestriction(id) {
|
|
86
|
+
return Delete(`${urls.identity.restrictions.ip.v1}/${id}`);
|
|
87
|
+
}
|
|
88
|
+
export async function testCurrentIp() {
|
|
89
|
+
return Post(`${urls.identity.restrictions.ip.v1}/verify`);
|
|
90
|
+
}
|
|
91
|
+
export async function testCurrentIpInAllowList() {
|
|
92
|
+
return Post(`${urls.identity.restrictions.ip.v1}/verify/allow`);
|
|
93
|
+
}
|
package/auth/utils.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ export interface ConditionalAction<T = any> {
|
|
|
6
6
|
export declare function executeConditionalPromise({ shouldLoad, action }: ConditionalAction): Promise<any>;
|
|
7
7
|
export declare function setTabTenantInSessionStorage(tenantId: string): void;
|
|
8
8
|
export declare function removeTabTenantFromSessionStorage(): void;
|
|
9
|
-
export declare function getTabTenantFromSessionStorage(
|
|
10
|
-
export declare function getCurrentUserTenantsFunction(
|
|
9
|
+
export declare function getTabTenantFromSessionStorage(): string | null;
|
|
10
|
+
export declare function getCurrentUserTenantsFunction(): () => Promise<GetCurrentUserTenantsResponse>;
|
package/auth/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ContextHolder } from '../ContextHolder';
|
|
2
2
|
import { USE_CURRENT_USER_TENANTS_V1_ENDPOINT_FF } from './constants';
|
|
3
3
|
import { FeatureFlags } from '../feature-flags';
|
|
4
|
-
import {
|
|
4
|
+
import { getCurrentUserTenantsV1, getCurrentUserTenantsV3 } from '../users';
|
|
5
5
|
import { FRONTEGG_SEPARATE_TABS_BY_TENANT } from './constants';
|
|
6
6
|
;
|
|
7
7
|
export async function executeConditionalPromise({
|
|
@@ -21,20 +21,19 @@ export function setTabTenantInSessionStorage(tenantId) {
|
|
|
21
21
|
export function removeTabTenantFromSessionStorage() {
|
|
22
22
|
sessionStorage.removeItem(FRONTEGG_SEPARATE_TABS_BY_TENANT);
|
|
23
23
|
}
|
|
24
|
-
export function getTabTenantFromSessionStorage(
|
|
25
|
-
if (!ContextHolder.
|
|
24
|
+
export function getTabTenantFromSessionStorage() {
|
|
25
|
+
if (!ContextHolder.isSessionPerTenantEnabled()) {
|
|
26
26
|
return null;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
return sessionStorage.getItem(FRONTEGG_SEPARATE_TABS_BY_TENANT);
|
|
30
30
|
}
|
|
31
|
-
export function getCurrentUserTenantsFunction(
|
|
32
|
-
const
|
|
33
|
-
const [useCurrentUserTenantsV1] = FeatureFlags.getFeatureFlags([USE_CURRENT_USER_TENANTS_V1_ENDPOINT_FF], appName);
|
|
31
|
+
export function getCurrentUserTenantsFunction() {
|
|
32
|
+
const [useCurrentUserTenantsV1] = FeatureFlags.getFeatureFlags([USE_CURRENT_USER_TENANTS_V1_ENDPOINT_FF], ContextHolder.getAppName() || '');
|
|
34
33
|
|
|
35
|
-
if (ContextHolder.
|
|
36
|
-
return
|
|
34
|
+
if (ContextHolder.isSessionPerTenantEnabled()) {
|
|
35
|
+
return getCurrentUserTenantsV1;
|
|
37
36
|
}
|
|
38
37
|
|
|
39
|
-
return useCurrentUserTenantsV1 ?
|
|
38
|
+
return useCurrentUserTenantsV1 ? getCurrentUserTenantsV1 : getCurrentUserTenantsV3;
|
|
40
39
|
}
|
package/connectivity/index.d.ts
CHANGED
|
@@ -1,126 +1,27 @@
|
|
|
1
1
|
import { IWebhookTest, IWebhooksSaveData, ISlackSubscription, IEmailSMSConfigResponse, IEmailSMSSubscriptionResponse } from './interfaces';
|
|
2
|
-
|
|
3
|
-
export declare
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Post email configuration
|
|
30
|
-
* @param data Email configuration data
|
|
31
|
-
*/
|
|
32
|
-
postEmailConfiguration: ({ eventKey, ...data }: IEmailSMSConfigResponse) => Promise<null>;
|
|
33
|
-
/**
|
|
34
|
-
* Patch email configuration
|
|
35
|
-
* @param enabled Email configuration enabled status
|
|
36
|
-
* @param eventKey Email event key
|
|
37
|
-
*/
|
|
38
|
-
patchEmailConfiguration: ({ eventKey, enabled }: Pick<IEmailSMSConfigResponse, 'eventKey' | 'enabled'>) => Promise<null>;
|
|
39
|
-
/**
|
|
40
|
-
* Delete email subscriptions
|
|
41
|
-
* @param eventKey Email event key
|
|
42
|
-
* @param subscriptionId Email subscription ID
|
|
43
|
-
*/
|
|
44
|
-
deleteEmailSubscriptions: (eventKey: string, subscriptionId: string) => Promise<null>;
|
|
45
|
-
/**
|
|
46
|
-
* Put email subscriptions
|
|
47
|
-
* @param subscriptionId Email subscription ID
|
|
48
|
-
* @param eventKey Email event key
|
|
49
|
-
* @param data Email subscription data
|
|
50
|
-
*/
|
|
51
|
-
putEmailSubscriptions: (subscriptionId: string, eventKey: string, data: IEmailSMSSubscriptionResponse) => Promise<null>;
|
|
52
|
-
/**
|
|
53
|
-
* Delete email configuration
|
|
54
|
-
* @param eventKey Email event key
|
|
55
|
-
*/
|
|
56
|
-
deleteEmailConfiguration: (eventKey: string) => Promise<null>;
|
|
57
|
-
/** Get SMS configuration */
|
|
58
|
-
getSMSConfiguration: () => Promise<IEmailSMSConfigResponse[]>;
|
|
59
|
-
/**
|
|
60
|
-
* Post SMS configuration
|
|
61
|
-
* @param data SMS configuration data
|
|
62
|
-
*/
|
|
63
|
-
postSMSConfiguration: ({ eventKey, ...data }: IEmailSMSConfigResponse) => Promise<unknown>;
|
|
64
|
-
/**
|
|
65
|
-
* Patch SMS configuration
|
|
66
|
-
* @param enabled SMS configuration enabled status
|
|
67
|
-
* @param eventKey SMS event key
|
|
68
|
-
*/
|
|
69
|
-
patchSMSConfiguration: ({ eventKey, enabled }: Pick<IEmailSMSConfigResponse, 'eventKey' | 'enabled'>) => Promise<null>;
|
|
70
|
-
/**
|
|
71
|
-
* Delete SMS subscriptions
|
|
72
|
-
* @param eventKey SMS event key
|
|
73
|
-
* @param subscriptionId SMS subscription ID
|
|
74
|
-
*/
|
|
75
|
-
deleteSMSSubscriptions: (eventKey: string, subscriptionId: string) => Promise<null>;
|
|
76
|
-
/**
|
|
77
|
-
* Put SMS subscriptions
|
|
78
|
-
* @param subscriptionId SMS subscription ID
|
|
79
|
-
* @param eventKey SMS event key
|
|
80
|
-
* @param data SMS subscription data
|
|
81
|
-
*/
|
|
82
|
-
putSMSSubscriptions: (subscriptionId: string, eventKey: string, data: IEmailSMSSubscriptionResponse) => Promise<null>;
|
|
83
|
-
/**
|
|
84
|
-
* Delete SMS configuration
|
|
85
|
-
* @param eventKey SMS event key
|
|
86
|
-
*/
|
|
87
|
-
deleteSMSConfiguration: (eventKey: string) => Promise<null>;
|
|
88
|
-
/** Get webhooks configurations */
|
|
89
|
-
getWebhooksConfigurations: () => Promise<unknown>;
|
|
90
|
-
/**
|
|
91
|
-
* Post webhooks configuration
|
|
92
|
-
* @param data Webhooks save data
|
|
93
|
-
*/
|
|
94
|
-
postWebhooksConfiguration: (data: IWebhooksSaveData) => Promise<unknown>;
|
|
95
|
-
/**
|
|
96
|
-
* Delete webhooks configuration
|
|
97
|
-
* @param id Webhook ID
|
|
98
|
-
*/
|
|
99
|
-
deleteWebhooksConfiguration: (id: string) => Promise<null>;
|
|
100
|
-
/**
|
|
101
|
-
* Get webhook log
|
|
102
|
-
* @param id Webhook ID
|
|
103
|
-
* @param offset Pagination offset
|
|
104
|
-
* @param limit Pagination limit
|
|
105
|
-
*/
|
|
106
|
-
getWebhookLog: (id: string, offset?: number, limit?: number) => Promise<unknown>;
|
|
107
|
-
/**
|
|
108
|
-
* Post webhook test
|
|
109
|
-
* @param data Webhook test data
|
|
110
|
-
*/
|
|
111
|
-
postWebhookTest: (data: IWebhookTest) => Promise<unknown>;
|
|
112
|
-
/**
|
|
113
|
-
* Post webhook retry
|
|
114
|
-
* @param id Webhook log ID
|
|
115
|
-
*/
|
|
116
|
-
postWebhookRetry: (id: string) => Promise<unknown>;
|
|
117
|
-
/** Get event categories */
|
|
118
|
-
getCategories: () => Promise<unknown>;
|
|
119
|
-
/**
|
|
120
|
-
* Get channel maps
|
|
121
|
-
* @param channels Channel names
|
|
122
|
-
*/
|
|
123
|
-
getChannelMaps: (channels: string) => Promise<unknown>;
|
|
124
|
-
}
|
|
125
|
-
declare const _default: ConnectivityApi;
|
|
126
|
-
export default _default;
|
|
2
|
+
export declare const getSlackConfiguration: () => Promise<any>;
|
|
3
|
+
export declare const getSlackScope: () => Promise<any>;
|
|
4
|
+
export declare const getSlackChannels: () => Promise<any>;
|
|
5
|
+
export declare const postSlackConfiguration: (data: ISlackSubscription) => Promise<any>;
|
|
6
|
+
export declare const deleteSlackConfiguration: (data: Required<ISlackSubscription>) => Promise<any>;
|
|
7
|
+
export declare const postSlackCode: (code: string) => Promise<any>;
|
|
8
|
+
export declare const getEmailConfiguration: () => Promise<IEmailSMSConfigResponse[]>;
|
|
9
|
+
export declare const postEmailConfiguration: ({ eventKey, ...data }: IEmailSMSConfigResponse) => Promise<null>;
|
|
10
|
+
export declare const patchEmailConfiguration: ({ eventKey, enabled, }: Pick<IEmailSMSConfigResponse, 'eventKey' | 'enabled'>) => Promise<null>;
|
|
11
|
+
export declare const deleteEmailSubscriptions: (eventKey: string, subscriptionId: string) => Promise<null>;
|
|
12
|
+
export declare const putEmailSubscriptions: (subscriptionId: string, eventKey: string, data: IEmailSMSSubscriptionResponse) => Promise<null>;
|
|
13
|
+
export declare const deleteEmailConfiguration: (eventKey: string) => Promise<null>;
|
|
14
|
+
export declare const getSMSConfiguration: () => Promise<IEmailSMSConfigResponse[]>;
|
|
15
|
+
export declare const postSMSConfiguration: ({ eventKey, ...data }: IEmailSMSConfigResponse) => Promise<any>;
|
|
16
|
+
export declare const patchSMSConfiguration: ({ eventKey, enabled, }: Pick<IEmailSMSConfigResponse, 'eventKey' | 'enabled'>) => Promise<null>;
|
|
17
|
+
export declare const deleteSMSSubscriptions: (eventKey: string, subscriptionId: string) => Promise<null>;
|
|
18
|
+
export declare const putSMSSubscriptions: (subscriptionId: string, eventKey: string, data: IEmailSMSSubscriptionResponse) => Promise<null>;
|
|
19
|
+
export declare const deleteSMSConfiguration: (eventKey: string) => Promise<null>;
|
|
20
|
+
export declare const getWebhooksConfigurations: () => Promise<any>;
|
|
21
|
+
export declare const postWebhooksConfiguration: (data: IWebhooksSaveData) => Promise<any>;
|
|
22
|
+
export declare const deleteWebhooksConfiguration: (id: string) => Promise<null>;
|
|
23
|
+
export declare const getWebhookLog: (id: string, offset?: number, limit?: number) => Promise<any>;
|
|
24
|
+
export declare const postWebhookTest: (data: IWebhookTest) => Promise<any>;
|
|
25
|
+
export declare const postWebhookRetry: (id: string) => Promise<any>;
|
|
26
|
+
export declare const getCategories: () => Promise<any>;
|
|
27
|
+
export declare const getChannelMaps: (channels: string) => Promise<any>;
|