@frontegg/rest-api 3.0.73 → 3.0.75
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/interfaces.d.ts +2 -1
- package/auth/interfaces.js +1 -0
- package/constants.d.ts +12 -0
- package/constants.js +12 -0
- package/groups/index.d.ts +45 -0
- package/groups/index.js +44 -0
- package/groups/interfaces.d.ts +59 -0
- package/groups/interfaces.js +1 -0
- package/groups/package.json +6 -0
- package/index.d.ts +43 -42
- package/index.js +44 -43
- package/node/auth/interfaces.js +1 -0
- package/node/constants.js +12 -0
- package/node/groups/index.js +76 -0
- package/node/groups/interfaces.js +5 -0
- package/node/index.js +9 -1
- package/package.json +1 -1
package/auth/interfaces.d.ts
CHANGED
|
@@ -482,7 +482,8 @@ export interface IVerifyNewWebAuthnDevice {
|
|
|
482
482
|
export declare enum SecondaryAuthStrategy {
|
|
483
483
|
WebAuthnPlatform = "WebAuthnPlatform",
|
|
484
484
|
WebAuthnCrossPlatform = "WebAuthnCrossPlatform",
|
|
485
|
-
SmsCode = "SmsCode"
|
|
485
|
+
SmsCode = "SmsCode",
|
|
486
|
+
Passkeys = "Passkeys"
|
|
486
487
|
}
|
|
487
488
|
export interface IAuthStrategyConfig {
|
|
488
489
|
strategy: SecondaryAuthStrategy;
|
package/auth/interfaces.js
CHANGED
|
@@ -5,6 +5,7 @@ export let SecondaryAuthStrategy;
|
|
|
5
5
|
SecondaryAuthStrategy["WebAuthnPlatform"] = "WebAuthnPlatform";
|
|
6
6
|
SecondaryAuthStrategy["WebAuthnCrossPlatform"] = "WebAuthnCrossPlatform";
|
|
7
7
|
SecondaryAuthStrategy["SmsCode"] = "SmsCode";
|
|
8
|
+
SecondaryAuthStrategy["Passkeys"] = "Passkeys";
|
|
8
9
|
})(SecondaryAuthStrategy || (SecondaryAuthStrategy = {}));
|
|
9
10
|
|
|
10
11
|
export let WebAuthnDeviceType;
|
package/constants.d.ts
CHANGED
package/constants.js
CHANGED
|
@@ -78,6 +78,18 @@ export const urls = {
|
|
|
78
78
|
},
|
|
79
79
|
impersonate: {
|
|
80
80
|
v1: '/identity/resources/impersonation/v1'
|
|
81
|
+
},
|
|
82
|
+
groups: {
|
|
83
|
+
configurations: {
|
|
84
|
+
v1: '/identity/resources/groups/v1/config'
|
|
85
|
+
},
|
|
86
|
+
v1: '/identity/resources/groups/v1',
|
|
87
|
+
roles: {
|
|
88
|
+
v1: '/identity/resources/groups/v1/roles'
|
|
89
|
+
},
|
|
90
|
+
users: {
|
|
91
|
+
v1: '/identity/resources/groups/v1/users'
|
|
92
|
+
}
|
|
81
93
|
}
|
|
82
94
|
},
|
|
83
95
|
team: {
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ICreateGroup, ICreateGroupResponse, IGetGroup, IGroupConfigResponse, IGroupResponse, IUpdateGroup, IUpdateGroupConfig, IUpdateGroupRoles, IUpdateGroupUsers } from "./interfaces";
|
|
2
|
+
/**
|
|
3
|
+
* Get group by given id
|
|
4
|
+
*/
|
|
5
|
+
export declare function getGroupById({ groupId, }: IGetGroup): Promise<IGroupResponse>;
|
|
6
|
+
/**
|
|
7
|
+
* Get all tenant groups
|
|
8
|
+
*/
|
|
9
|
+
export declare function getGroups(): Promise<IGroupResponse[]>;
|
|
10
|
+
/**
|
|
11
|
+
* Create new group
|
|
12
|
+
*/
|
|
13
|
+
export declare function createGroup(body: ICreateGroup): Promise<ICreateGroupResponse>;
|
|
14
|
+
/**
|
|
15
|
+
* Update existing group by Id
|
|
16
|
+
*/
|
|
17
|
+
export declare function updateGroup({ groupId, ...body }: IUpdateGroup): Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* Delete existing group by Id
|
|
20
|
+
*/
|
|
21
|
+
export declare function deleteGroup(groupId: string): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* Add roles to existing group
|
|
24
|
+
*/
|
|
25
|
+
export declare function addRolesToGroup(body: IUpdateGroupRoles): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Delete roles from existing group
|
|
28
|
+
*/
|
|
29
|
+
export declare function deleteRolesFromGroup(body: IUpdateGroupRoles): Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Add users to existing group
|
|
32
|
+
*/
|
|
33
|
+
export declare function addUsersToGroup(body: IUpdateGroupUsers): Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* Delete users from existing group
|
|
36
|
+
*/
|
|
37
|
+
export declare function deleteUsersFromGroup(body: IUpdateGroupUsers): Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* Get or create default groups configuration
|
|
40
|
+
*/
|
|
41
|
+
export declare function getGroupConfiguration(): Promise<IGroupConfigResponse>;
|
|
42
|
+
/**
|
|
43
|
+
* Create or update groups configuration
|
|
44
|
+
*/
|
|
45
|
+
export declare function updateGroupConfiguration(body: IUpdateGroupConfig): Promise<IGroupConfigResponse>;
|
package/groups/index.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
+
const _excluded = ["groupId"];
|
|
3
|
+
import { urls } from "../constants";
|
|
4
|
+
import { Delete, Get, Patch, Post } from "../fetch";
|
|
5
|
+
export async function getGroupById({
|
|
6
|
+
groupId
|
|
7
|
+
}) {
|
|
8
|
+
return Get(`${urls.identity.groups.v1}/${groupId}`);
|
|
9
|
+
}
|
|
10
|
+
export async function getGroups() {
|
|
11
|
+
return Get(`${urls.identity.groups.v1}`);
|
|
12
|
+
}
|
|
13
|
+
export async function createGroup(body) {
|
|
14
|
+
return Post(`${urls.identity.groups.v1}`, body);
|
|
15
|
+
}
|
|
16
|
+
export async function updateGroup(_ref) {
|
|
17
|
+
let {
|
|
18
|
+
groupId
|
|
19
|
+
} = _ref,
|
|
20
|
+
body = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
21
|
+
|
|
22
|
+
return Patch(`${urls.identity.groups.v1}/${groupId}`, body);
|
|
23
|
+
}
|
|
24
|
+
export async function deleteGroup(groupId) {
|
|
25
|
+
return Delete(`${urls.identity.groups.v1}/${groupId}`);
|
|
26
|
+
}
|
|
27
|
+
export async function addRolesToGroup(body) {
|
|
28
|
+
return Post(`${urls.identity.groups.roles.v1}`, body);
|
|
29
|
+
}
|
|
30
|
+
export async function deleteRolesFromGroup(body) {
|
|
31
|
+
return Delete(`${urls.identity.groups.roles.v1}`, body);
|
|
32
|
+
}
|
|
33
|
+
export async function addUsersToGroup(body) {
|
|
34
|
+
return Post(`${urls.identity.groups.users.v1}`, body);
|
|
35
|
+
}
|
|
36
|
+
export async function deleteUsersFromGroup(body) {
|
|
37
|
+
return Delete(`${urls.identity.groups.users.v1}`, body);
|
|
38
|
+
}
|
|
39
|
+
export async function getGroupConfiguration() {
|
|
40
|
+
return Get(`${urls.identity.groups.configurations.v1}`);
|
|
41
|
+
}
|
|
42
|
+
export async function updateGroupConfiguration(body) {
|
|
43
|
+
return Post(`${urls.identity.groups.configurations.v1}`, body);
|
|
44
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { IRole } from "../roles/interfaces";
|
|
2
|
+
export declare type IGetGroup = {
|
|
3
|
+
groupId: string;
|
|
4
|
+
};
|
|
5
|
+
export declare type IGroupUser = {
|
|
6
|
+
id: string;
|
|
7
|
+
email: string;
|
|
8
|
+
name: string;
|
|
9
|
+
phoneNumber?: string;
|
|
10
|
+
profileImage?: string;
|
|
11
|
+
profilePictureUrl: string | null;
|
|
12
|
+
tenantId: string;
|
|
13
|
+
tenantIds: string[];
|
|
14
|
+
activatedForTenant?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export declare type IGroupResponse = {
|
|
17
|
+
name: string;
|
|
18
|
+
color?: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
metadata?: string;
|
|
21
|
+
roles?: IRole[];
|
|
22
|
+
users?: IGroupUser[];
|
|
23
|
+
};
|
|
24
|
+
export declare type ICreateGroup = {
|
|
25
|
+
name: string;
|
|
26
|
+
color?: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
metadata?: string;
|
|
29
|
+
};
|
|
30
|
+
export declare type ICreateGroupResponse = {
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
color?: string;
|
|
34
|
+
description?: string;
|
|
35
|
+
metadata?: string;
|
|
36
|
+
};
|
|
37
|
+
export declare type IUpdateGroup = {
|
|
38
|
+
groupId: string;
|
|
39
|
+
name?: string;
|
|
40
|
+
color?: string;
|
|
41
|
+
description?: string;
|
|
42
|
+
metadata?: string;
|
|
43
|
+
};
|
|
44
|
+
export declare type IUpdateGroupConfig = {
|
|
45
|
+
enabled?: boolean;
|
|
46
|
+
rolesEnabled?: boolean;
|
|
47
|
+
};
|
|
48
|
+
export declare type IGroupConfigResponse = {
|
|
49
|
+
enabled: boolean;
|
|
50
|
+
rolesEnabled: boolean;
|
|
51
|
+
};
|
|
52
|
+
export declare type IUpdateGroupRoles = {
|
|
53
|
+
groupId: string;
|
|
54
|
+
roleIds: string[];
|
|
55
|
+
};
|
|
56
|
+
export declare type IUpdateGroupUsers = {
|
|
57
|
+
groupId: string;
|
|
58
|
+
userIds: string[];
|
|
59
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/index.d.ts
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import * as auth from
|
|
2
|
-
import * as teams from
|
|
3
|
-
import * as metadata from
|
|
4
|
-
import * as reports from
|
|
5
|
-
import * as notifications from
|
|
6
|
-
import * as audits from
|
|
7
|
-
import * as fetch from
|
|
8
|
-
import * as connectivity from
|
|
9
|
-
import * as tenants from
|
|
10
|
-
import * as accountSettings from
|
|
11
|
-
import * as roles from
|
|
12
|
-
import * as subscriptions from
|
|
13
|
-
import { FronteggApiError } from
|
|
14
|
-
import * as vendor from
|
|
15
|
-
import * as subTenants from
|
|
16
|
-
import * as featureFlags from
|
|
17
|
-
import * as directory from
|
|
18
|
-
import * as impersonate from
|
|
19
|
-
import { ContextHolder, FronteggContext } from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
23
|
-
export * from
|
|
24
|
-
export * from
|
|
25
|
-
export * from
|
|
26
|
-
export * from
|
|
27
|
-
export * from
|
|
28
|
-
export * from
|
|
29
|
-
export * from
|
|
30
|
-
export * from
|
|
31
|
-
export * from
|
|
32
|
-
export * from
|
|
33
|
-
export * from
|
|
34
|
-
export * from
|
|
35
|
-
export * from
|
|
36
|
-
export * from
|
|
37
|
-
export * from
|
|
38
|
-
export * from
|
|
39
|
-
export * from
|
|
40
|
-
import { AuthStrategyEnum, SocialLoginProviders } from
|
|
41
|
-
import { ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType } from
|
|
1
|
+
import * as auth from "./auth";
|
|
2
|
+
import * as teams from "./teams";
|
|
3
|
+
import * as metadata from "./metadata";
|
|
4
|
+
import * as reports from "./reports";
|
|
5
|
+
import * as notifications from "./notifications";
|
|
6
|
+
import * as audits from "./audits";
|
|
7
|
+
import * as fetch from "./fetch";
|
|
8
|
+
import * as connectivity from "./connectivity";
|
|
9
|
+
import * as tenants from "./tenants";
|
|
10
|
+
import * as accountSettings from "./account-settings";
|
|
11
|
+
import * as roles from "./roles";
|
|
12
|
+
import * as subscriptions from "./subscriptions";
|
|
13
|
+
import { FronteggApiError } from "./error";
|
|
14
|
+
import * as vendor from "./vendor";
|
|
15
|
+
import * as subTenants from "./sub-tenants";
|
|
16
|
+
import * as featureFlags from "./feature-flags";
|
|
17
|
+
import * as directory from "./directory";
|
|
18
|
+
import * as impersonate from "./impersonate";
|
|
19
|
+
import { ContextHolder, FronteggContext } from "./ContextHolder";
|
|
20
|
+
export * from "./interfaces";
|
|
21
|
+
export * from "./auth/interfaces";
|
|
22
|
+
export * from "./teams/interfaces";
|
|
23
|
+
export * from "./metadata/interfaces";
|
|
24
|
+
export * from "./reports/interfaces";
|
|
25
|
+
export * from "./connectivity/interfaces";
|
|
26
|
+
export * from "./notifications/interfaces";
|
|
27
|
+
export * from "./audits/interfaces";
|
|
28
|
+
export * from "./tenants/interfaces";
|
|
29
|
+
export * from "./account-settings/interfaces";
|
|
30
|
+
export * from "./roles/interfaces";
|
|
31
|
+
export * from "./subscriptions/interfaces";
|
|
32
|
+
export * from "./vendor/interfaces";
|
|
33
|
+
export * from "./sub-tenants/interfaces";
|
|
34
|
+
export * from "./routers";
|
|
35
|
+
export * from "./feature-flags";
|
|
36
|
+
export * from "./feature-flags/interfaces";
|
|
37
|
+
export * from "./directory";
|
|
38
|
+
export * from "./directory/interfaces";
|
|
39
|
+
export * from "./impersonate/interfaces";
|
|
40
|
+
import { AuthStrategyEnum, SocialLoginProviders, MachineToMachineAuthStrategy } from "./auth";
|
|
41
|
+
import { ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType } from "./subscriptions";
|
|
42
42
|
declare const api: {
|
|
43
43
|
auth: typeof auth;
|
|
44
44
|
teams: typeof teams;
|
|
@@ -57,7 +57,7 @@ declare const api: {
|
|
|
57
57
|
directory: typeof directory;
|
|
58
58
|
impersonate: typeof impersonate;
|
|
59
59
|
};
|
|
60
|
-
export { fetch, ContextHolder, FronteggContext, api, FronteggApiError, AuthStrategyEnum, SocialLoginProviders, ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType, };
|
|
60
|
+
export { fetch, ContextHolder, FronteggContext, api, FronteggApiError, AuthStrategyEnum, SocialLoginProviders, ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType, MachineToMachineAuthStrategy, };
|
|
61
61
|
declare const _default: {
|
|
62
62
|
fetch: typeof fetch;
|
|
63
63
|
ContextHolder: typeof ContextHolder;
|
|
@@ -88,6 +88,7 @@ declare const _default: {
|
|
|
88
88
|
};
|
|
89
89
|
FronteggApiError: typeof FronteggApiError;
|
|
90
90
|
AuthStrategyEnum: typeof auth.AuthStrategyEnum;
|
|
91
|
+
MachineToMachineAuthStrategy: typeof auth.MachineToMachineAuthStrategy;
|
|
91
92
|
SocialLoginProviders: typeof auth.SocialLoginProviders;
|
|
92
93
|
ISubscriptionCancellationPolicy: typeof subscriptions.ISubscriptionCancellationPolicy;
|
|
93
94
|
ISubscriptionStatus: typeof subscriptions.ISubscriptionStatus;
|
package/index.js
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
/** @license Frontegg v3.0.
|
|
1
|
+
/** @license Frontegg v3.0.75
|
|
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.
|
|
5
5
|
*/
|
|
6
|
-
import * as auth from
|
|
7
|
-
import * as teams from
|
|
8
|
-
import * as metadata from
|
|
9
|
-
import * as reports from
|
|
10
|
-
import * as notifications from
|
|
11
|
-
import * as audits from
|
|
12
|
-
import * as fetch from
|
|
13
|
-
import * as connectivity from
|
|
14
|
-
import * as tenants from
|
|
15
|
-
import * as accountSettings from
|
|
16
|
-
import * as roles from
|
|
17
|
-
import * as subscriptions from
|
|
18
|
-
import { FronteggApiError } from
|
|
19
|
-
import * as vendor from
|
|
20
|
-
import * as subTenants from
|
|
21
|
-
import * as featureFlags from
|
|
22
|
-
import * as directory from
|
|
23
|
-
import * as impersonate from
|
|
24
|
-
import { ContextHolder, FronteggContext } from
|
|
25
|
-
export * from
|
|
26
|
-
export * from
|
|
27
|
-
export * from
|
|
28
|
-
export * from
|
|
29
|
-
export * from
|
|
30
|
-
export * from
|
|
31
|
-
export * from
|
|
32
|
-
export * from
|
|
33
|
-
export * from
|
|
34
|
-
export * from
|
|
35
|
-
export * from
|
|
36
|
-
export * from
|
|
37
|
-
export * from
|
|
38
|
-
export * from
|
|
39
|
-
export * from
|
|
40
|
-
export * from
|
|
41
|
-
export * from
|
|
42
|
-
export * from
|
|
43
|
-
export * from
|
|
44
|
-
export * from
|
|
45
|
-
import { AuthStrategyEnum, SocialLoginProviders } from
|
|
46
|
-
import { ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType } from
|
|
6
|
+
import * as auth from "./auth";
|
|
7
|
+
import * as teams from "./teams";
|
|
8
|
+
import * as metadata from "./metadata";
|
|
9
|
+
import * as reports from "./reports";
|
|
10
|
+
import * as notifications from "./notifications";
|
|
11
|
+
import * as audits from "./audits";
|
|
12
|
+
import * as fetch from "./fetch";
|
|
13
|
+
import * as connectivity from "./connectivity";
|
|
14
|
+
import * as tenants from "./tenants";
|
|
15
|
+
import * as accountSettings from "./account-settings";
|
|
16
|
+
import * as roles from "./roles";
|
|
17
|
+
import * as subscriptions from "./subscriptions";
|
|
18
|
+
import { FronteggApiError } from "./error";
|
|
19
|
+
import * as vendor from "./vendor";
|
|
20
|
+
import * as subTenants from "./sub-tenants";
|
|
21
|
+
import * as featureFlags from "./feature-flags";
|
|
22
|
+
import * as directory from "./directory";
|
|
23
|
+
import * as impersonate from "./impersonate";
|
|
24
|
+
import { ContextHolder, FronteggContext } from "./ContextHolder";
|
|
25
|
+
export * from "./interfaces";
|
|
26
|
+
export * from "./auth/interfaces";
|
|
27
|
+
export * from "./teams/interfaces";
|
|
28
|
+
export * from "./metadata/interfaces";
|
|
29
|
+
export * from "./reports/interfaces";
|
|
30
|
+
export * from "./connectivity/interfaces";
|
|
31
|
+
export * from "./notifications/interfaces";
|
|
32
|
+
export * from "./audits/interfaces";
|
|
33
|
+
export * from "./tenants/interfaces";
|
|
34
|
+
export * from "./account-settings/interfaces";
|
|
35
|
+
export * from "./roles/interfaces";
|
|
36
|
+
export * from "./subscriptions/interfaces";
|
|
37
|
+
export * from "./vendor/interfaces";
|
|
38
|
+
export * from "./sub-tenants/interfaces";
|
|
39
|
+
export * from "./routers";
|
|
40
|
+
export * from "./feature-flags";
|
|
41
|
+
export * from "./feature-flags/interfaces";
|
|
42
|
+
export * from "./directory";
|
|
43
|
+
export * from "./directory/interfaces";
|
|
44
|
+
export * from "./impersonate/interfaces";
|
|
45
|
+
import { AuthStrategyEnum, SocialLoginProviders, MachineToMachineAuthStrategy } from "./auth";
|
|
46
|
+
import { ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType } from "./subscriptions";
|
|
47
47
|
const api = {
|
|
48
48
|
auth,
|
|
49
49
|
teams,
|
|
@@ -62,7 +62,7 @@ const api = {
|
|
|
62
62
|
directory,
|
|
63
63
|
impersonate
|
|
64
64
|
};
|
|
65
|
-
export { fetch, ContextHolder, FronteggContext, api, FronteggApiError, AuthStrategyEnum, SocialLoginProviders, ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType };
|
|
65
|
+
export { fetch, ContextHolder, FronteggContext, api, FronteggApiError, AuthStrategyEnum, SocialLoginProviders, ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType, MachineToMachineAuthStrategy };
|
|
66
66
|
export default {
|
|
67
67
|
fetch,
|
|
68
68
|
ContextHolder,
|
|
@@ -70,6 +70,7 @@ export default {
|
|
|
70
70
|
api,
|
|
71
71
|
FronteggApiError,
|
|
72
72
|
AuthStrategyEnum,
|
|
73
|
+
MachineToMachineAuthStrategy,
|
|
73
74
|
SocialLoginProviders,
|
|
74
75
|
ISubscriptionCancellationPolicy,
|
|
75
76
|
ISubscriptionStatus,
|
package/node/auth/interfaces.js
CHANGED
|
@@ -30,6 +30,7 @@ exports.SecondaryAuthStrategy = SecondaryAuthStrategy;
|
|
|
30
30
|
SecondaryAuthStrategy["WebAuthnPlatform"] = "WebAuthnPlatform";
|
|
31
31
|
SecondaryAuthStrategy["WebAuthnCrossPlatform"] = "WebAuthnCrossPlatform";
|
|
32
32
|
SecondaryAuthStrategy["SmsCode"] = "SmsCode";
|
|
33
|
+
SecondaryAuthStrategy["Passkeys"] = "Passkeys";
|
|
33
34
|
})(SecondaryAuthStrategy || (exports.SecondaryAuthStrategy = SecondaryAuthStrategy = {}));
|
|
34
35
|
|
|
35
36
|
let WebAuthnDeviceType;
|
package/node/constants.js
CHANGED
|
@@ -84,6 +84,18 @@ const urls = {
|
|
|
84
84
|
},
|
|
85
85
|
impersonate: {
|
|
86
86
|
v1: '/identity/resources/impersonation/v1'
|
|
87
|
+
},
|
|
88
|
+
groups: {
|
|
89
|
+
configurations: {
|
|
90
|
+
v1: '/identity/resources/groups/v1/config'
|
|
91
|
+
},
|
|
92
|
+
v1: '/identity/resources/groups/v1',
|
|
93
|
+
roles: {
|
|
94
|
+
v1: '/identity/resources/groups/v1/roles'
|
|
95
|
+
},
|
|
96
|
+
users: {
|
|
97
|
+
v1: '/identity/resources/groups/v1/users'
|
|
98
|
+
}
|
|
87
99
|
}
|
|
88
100
|
},
|
|
89
101
|
team: {
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.addRolesToGroup = addRolesToGroup;
|
|
9
|
+
exports.addUsersToGroup = addUsersToGroup;
|
|
10
|
+
exports.createGroup = createGroup;
|
|
11
|
+
exports.deleteGroup = deleteGroup;
|
|
12
|
+
exports.deleteRolesFromGroup = deleteRolesFromGroup;
|
|
13
|
+
exports.deleteUsersFromGroup = deleteUsersFromGroup;
|
|
14
|
+
exports.getGroupById = getGroupById;
|
|
15
|
+
exports.getGroupConfiguration = getGroupConfiguration;
|
|
16
|
+
exports.getGroups = getGroups;
|
|
17
|
+
exports.updateGroup = updateGroup;
|
|
18
|
+
exports.updateGroupConfiguration = updateGroupConfiguration;
|
|
19
|
+
|
|
20
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
21
|
+
|
|
22
|
+
var _constants = require("../constants");
|
|
23
|
+
|
|
24
|
+
var _fetch = require("../fetch");
|
|
25
|
+
|
|
26
|
+
const _excluded = ["groupId"];
|
|
27
|
+
|
|
28
|
+
async function getGroupById({
|
|
29
|
+
groupId
|
|
30
|
+
}) {
|
|
31
|
+
return (0, _fetch.Get)(`${_constants.urls.identity.groups.v1}/${groupId}`);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
async function getGroups() {
|
|
35
|
+
return (0, _fetch.Get)(`${_constants.urls.identity.groups.v1}`);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
async function createGroup(body) {
|
|
39
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.groups.v1}`, body);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
async function updateGroup(_ref) {
|
|
43
|
+
let {
|
|
44
|
+
groupId
|
|
45
|
+
} = _ref,
|
|
46
|
+
body = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
|
|
47
|
+
return (0, _fetch.Patch)(`${_constants.urls.identity.groups.v1}/${groupId}`, body);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
async function deleteGroup(groupId) {
|
|
51
|
+
return (0, _fetch.Delete)(`${_constants.urls.identity.groups.v1}/${groupId}`);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
async function addRolesToGroup(body) {
|
|
55
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.groups.roles.v1}`, body);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async function deleteRolesFromGroup(body) {
|
|
59
|
+
return (0, _fetch.Delete)(`${_constants.urls.identity.groups.roles.v1}`, body);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
async function addUsersToGroup(body) {
|
|
63
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.groups.users.v1}`, body);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
async function deleteUsersFromGroup(body) {
|
|
67
|
+
return (0, _fetch.Delete)(`${_constants.urls.identity.groups.users.v1}`, body);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
async function getGroupConfiguration() {
|
|
71
|
+
return (0, _fetch.Get)(`${_constants.urls.identity.groups.configurations.v1}`);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
async function updateGroupConfiguration(body) {
|
|
75
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.groups.configurations.v1}`, body);
|
|
76
|
+
}
|
package/node/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license Frontegg v3.0.
|
|
1
|
+
/** @license Frontegg v3.0.75
|
|
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.
|
|
@@ -12,6 +12,7 @@ var _exportNames = {
|
|
|
12
12
|
api: true,
|
|
13
13
|
AuthStrategyEnum: true,
|
|
14
14
|
SocialLoginProviders: true,
|
|
15
|
+
MachineToMachineAuthStrategy: true,
|
|
15
16
|
fetch: true,
|
|
16
17
|
ISubscriptionCancellationPolicy: true,
|
|
17
18
|
ISubscriptionStatus: true,
|
|
@@ -57,6 +58,12 @@ Object.defineProperty(exports, "ISubscriptionStatus", {
|
|
|
57
58
|
return subscriptions.ISubscriptionStatus;
|
|
58
59
|
}
|
|
59
60
|
});
|
|
61
|
+
Object.defineProperty(exports, "MachineToMachineAuthStrategy", {
|
|
62
|
+
enumerable: true,
|
|
63
|
+
get: function () {
|
|
64
|
+
return auth.MachineToMachineAuthStrategy;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
60
67
|
Object.defineProperty(exports, "PaymentMethodType", {
|
|
61
68
|
enumerable: true,
|
|
62
69
|
get: function () {
|
|
@@ -423,6 +430,7 @@ var _default = {
|
|
|
423
430
|
api,
|
|
424
431
|
FronteggApiError: _error.FronteggApiError,
|
|
425
432
|
AuthStrategyEnum: auth.AuthStrategyEnum,
|
|
433
|
+
MachineToMachineAuthStrategy: auth.MachineToMachineAuthStrategy,
|
|
426
434
|
SocialLoginProviders: auth.SocialLoginProviders,
|
|
427
435
|
ISubscriptionCancellationPolicy: subscriptions.ISubscriptionCancellationPolicy,
|
|
428
436
|
ISubscriptionStatus: subscriptions.ISubscriptionStatus,
|