@frontegg/rest-api 3.1.49 → 3.1.51
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/constants.d.ts +6 -0
- package/constants.js +6 -0
- package/index.js +1 -1
- package/node/constants.js +6 -0
- package/node/index.js +1 -1
- package/node/teams/index.js +21 -0
- package/package.json +1 -1
- package/teams/index.d.ts +15 -1
- package/teams/index.js +15 -0
- package/teams/interfaces.d.ts +15 -0
package/constants.d.ts
CHANGED
package/constants.js
CHANGED
|
@@ -51,6 +51,12 @@ export const urls = {
|
|
|
51
51
|
},
|
|
52
52
|
authorization: {
|
|
53
53
|
v1: '/identity/resources/users/v1/me/authorization'
|
|
54
|
+
},
|
|
55
|
+
temporary: {
|
|
56
|
+
v1: '/identity/resources/users/temporary/v1',
|
|
57
|
+
configuration: {
|
|
58
|
+
v1: '/identity/resources/users/temporary/v1/configuration'
|
|
59
|
+
}
|
|
54
60
|
}
|
|
55
61
|
},
|
|
56
62
|
configurations: {
|
package/index.js
CHANGED
package/node/constants.js
CHANGED
|
@@ -57,6 +57,12 @@ const urls = {
|
|
|
57
57
|
},
|
|
58
58
|
authorization: {
|
|
59
59
|
v1: '/identity/resources/users/v1/me/authorization'
|
|
60
|
+
},
|
|
61
|
+
temporary: {
|
|
62
|
+
v1: '/identity/resources/users/temporary/v1',
|
|
63
|
+
configuration: {
|
|
64
|
+
v1: '/identity/resources/users/temporary/v1/configuration'
|
|
65
|
+
}
|
|
60
66
|
}
|
|
61
67
|
},
|
|
62
68
|
configurations: {
|
package/node/index.js
CHANGED
package/node/teams/index.js
CHANGED
|
@@ -13,6 +13,7 @@ exports.deleteUser = deleteUser;
|
|
|
13
13
|
exports.getInviteLinkConfiguration = getInviteLinkConfiguration;
|
|
14
14
|
exports.getInviteUserLink = getInviteUserLink;
|
|
15
15
|
exports.getProfile = getProfile;
|
|
16
|
+
exports.getTemporaryUserConfiguration = getTemporaryUserConfiguration;
|
|
16
17
|
exports.loadAvailablePermissions = loadAvailablePermissions;
|
|
17
18
|
exports.loadAvailableRoles = loadAvailableRoles;
|
|
18
19
|
exports.loadStats = loadStats;
|
|
@@ -20,10 +21,12 @@ exports.loadUsers = loadUsers;
|
|
|
20
21
|
exports.resendActivationLink = resendActivationLink;
|
|
21
22
|
exports.resendInvitationLink = resendInvitationLink;
|
|
22
23
|
exports.resendInvitationLinkToAllTenants = resendInvitationLinkToAllTenants;
|
|
24
|
+
exports.setPermanentUser = setPermanentUser;
|
|
23
25
|
exports.updateInviteUserLink = updateInviteUserLink;
|
|
24
26
|
exports.updateProfile = updateProfile;
|
|
25
27
|
exports.updateProfileImage = updateProfileImage;
|
|
26
28
|
exports.updateUser = updateUser;
|
|
29
|
+
exports.updateUserExpirationTime = updateUserExpirationTime;
|
|
27
30
|
|
|
28
31
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
29
32
|
|
|
@@ -82,6 +85,24 @@ async function updateUser(body) {
|
|
|
82
85
|
return (0, _fetch.Put)(_constants.urls.team.members.v1, body);
|
|
83
86
|
}
|
|
84
87
|
|
|
88
|
+
async function updateUserExpirationTime(body) {
|
|
89
|
+
const {
|
|
90
|
+
userId,
|
|
91
|
+
expirationInSeconds
|
|
92
|
+
} = body;
|
|
93
|
+
return (0, _fetch.Put)(`${_constants.urls.identity.users.temporary.v1}/${userId}`, {
|
|
94
|
+
expirationInSeconds
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
async function setPermanentUser(userId) {
|
|
99
|
+
return (0, _fetch.Delete)(`${_constants.urls.identity.users.temporary.v1}/${userId}`);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
async function getTemporaryUserConfiguration() {
|
|
103
|
+
return (0, _fetch.Get)(_constants.urls.identity.users.temporary.configuration.v1);
|
|
104
|
+
}
|
|
105
|
+
|
|
85
106
|
async function createInviteUserLink(body) {
|
|
86
107
|
return (0, _fetch.Post)(_constants.urls.identity.tenants.invites.user.v1, (0, _extends2.default)({}, body));
|
|
87
108
|
}
|
package/package.json
CHANGED
package/teams/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IAddUser, IChangePassword, ILoadUsers, IResendActivationLink, ITeamUserRole, ITeamStats, ITeamUser, IUpdateProfile, IUpdateUser, IDeleteUser, ITeamUserPermission, IResendInvitationLink, IInviteUserLinkResponse, ICreateOrUpdateInviteUserLink, IInviteLinkConfiguration } from './interfaces';
|
|
1
|
+
import { IAddUser, IChangePassword, ILoadUsers, IResendActivationLink, ITeamUserRole, ITeamStats, ITeamUser, IUpdateProfile, IUpdateUser, IDeleteUser, ITeamUserPermission, IResendInvitationLink, IInviteUserLinkResponse, ICreateOrUpdateInviteUserLink, IInviteLinkConfiguration, IUpdateUserExpiration, ITemporaryUserConfiguration } from './interfaces';
|
|
2
2
|
import { PaginationResult } from '../interfaces';
|
|
3
3
|
import { IUserProfile } from "../users/interfaces";
|
|
4
4
|
/****************************************s*
|
|
@@ -57,6 +57,20 @@ export declare function deleteUser(body: IDeleteUser): Promise<ITeamUser>;
|
|
|
57
57
|
* ``authorized user``
|
|
58
58
|
*/
|
|
59
59
|
export declare function updateUser(body: IUpdateUser): Promise<ITeamUser>;
|
|
60
|
+
/**
|
|
61
|
+
* update user expiration time
|
|
62
|
+
*
|
|
63
|
+
* ``authorized user``
|
|
64
|
+
*/
|
|
65
|
+
export declare function updateUserExpirationTime(body: IUpdateUserExpiration): Promise<void>;
|
|
66
|
+
/**
|
|
67
|
+
* set user as permanent
|
|
68
|
+
*/
|
|
69
|
+
export declare function setPermanentUser(userId: string): Promise<void>;
|
|
70
|
+
/**
|
|
71
|
+
* get temporary user configuration
|
|
72
|
+
*/
|
|
73
|
+
export declare function getTemporaryUserConfiguration(): Promise<ITemporaryUserConfiguration>;
|
|
60
74
|
/**
|
|
61
75
|
* create link to invite user
|
|
62
76
|
*
|
package/teams/index.js
CHANGED
|
@@ -44,6 +44,21 @@ export async function deleteUser(body) {
|
|
|
44
44
|
export async function updateUser(body) {
|
|
45
45
|
return Put(urls.team.members.v1, body);
|
|
46
46
|
}
|
|
47
|
+
export async function updateUserExpirationTime(body) {
|
|
48
|
+
const {
|
|
49
|
+
userId,
|
|
50
|
+
expirationInSeconds
|
|
51
|
+
} = body;
|
|
52
|
+
return Put(`${urls.identity.users.temporary.v1}/${userId}`, {
|
|
53
|
+
expirationInSeconds
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
export async function setPermanentUser(userId) {
|
|
57
|
+
return Delete(`${urls.identity.users.temporary.v1}/${userId}`);
|
|
58
|
+
}
|
|
59
|
+
export async function getTemporaryUserConfiguration() {
|
|
60
|
+
return Get(urls.identity.users.temporary.configuration.v1);
|
|
61
|
+
}
|
|
47
62
|
export async function createInviteUserLink(body) {
|
|
48
63
|
return Post(urls.identity.tenants.invites.user.v1, _extends({}, body));
|
|
49
64
|
}
|
package/teams/interfaces.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export declare type ITeamUser = {
|
|
|
27
27
|
tenants?: ITeamUserTenant;
|
|
28
28
|
verified?: boolean;
|
|
29
29
|
managedBy?: UserManagedByEnum;
|
|
30
|
+
expirationInSeconds?: number;
|
|
30
31
|
};
|
|
31
32
|
export declare type ITeamUserRole = {
|
|
32
33
|
id: string;
|
|
@@ -84,6 +85,7 @@ export declare type IAddUser = {
|
|
|
84
85
|
email: string;
|
|
85
86
|
phone?: string;
|
|
86
87
|
roleIds: string[];
|
|
88
|
+
expirationInSeconds?: number;
|
|
87
89
|
};
|
|
88
90
|
export declare type IDeleteUser = {
|
|
89
91
|
userId: string;
|
|
@@ -121,3 +123,16 @@ export declare type IInviteLinkConfiguration = {
|
|
|
121
123
|
tenantInvitationsAllowed: boolean;
|
|
122
124
|
emailsEnabled: boolean;
|
|
123
125
|
};
|
|
126
|
+
/**
|
|
127
|
+
* user expiration config
|
|
128
|
+
*/
|
|
129
|
+
export declare type IUpdateUserExpiration = {
|
|
130
|
+
userId: string;
|
|
131
|
+
expirationInSeconds: number;
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* vendor config
|
|
135
|
+
*/
|
|
136
|
+
export declare type ITemporaryUserConfiguration = {
|
|
137
|
+
enabled: boolean;
|
|
138
|
+
};
|