@frontegg/rest-api 3.1.3 → 3.1.4
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/index.js +1 -1
- package/node/index.js +1 -1
- package/node/users/index.js +5 -0
- package/node/users/interfaces.js +5 -2
- package/package.json +1 -1
- package/teams/index.d.ts +2 -0
- package/users/index.d.ts +2 -1
- package/users/index.js +4 -1
- package/users/interfaces.d.ts +17 -0
- package/users/interfaces.js +3 -1
package/index.js
CHANGED
package/node/index.js
CHANGED
package/node/users/index.js
CHANGED
|
@@ -12,6 +12,7 @@ exports.getUsersRoles = getUsersRoles;
|
|
|
12
12
|
exports.getUsersV2 = getUsersV2;
|
|
13
13
|
exports.getUsersV3 = getUsersV3;
|
|
14
14
|
exports.sendResetBreachedPasswordEmails = sendResetBreachedPasswordEmails;
|
|
15
|
+
exports.updateUserProfileV2 = updateUserProfileV2;
|
|
15
16
|
|
|
16
17
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
17
18
|
|
|
@@ -59,4 +60,8 @@ async function getCurrentUserTenantsV3(options) {
|
|
|
59
60
|
|
|
60
61
|
async function sendResetBreachedPasswordEmails() {
|
|
61
62
|
return (0, _fetch.Post)(_constants.urls.identity.users.passwords.resetBreachedPasswords.v1);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
async function updateUserProfileV2(body) {
|
|
66
|
+
return (0, _fetch.Put)(`${_constants.urls.identity.users.v2}/me`, body);
|
|
62
67
|
}
|
package/node/users/interfaces.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.SortByEnum = void 0;
|
|
6
|
+
exports.providersArray = exports.SortByEnum = void 0;
|
|
7
7
|
let SortByEnum;
|
|
8
8
|
exports.SortByEnum = SortByEnum;
|
|
9
9
|
|
|
@@ -16,4 +16,7 @@ exports.SortByEnum = SortByEnum;
|
|
|
16
16
|
SortByEnum["isLocked"] = "isLocked";
|
|
17
17
|
SortByEnum["provider"] = "provider";
|
|
18
18
|
SortByEnum["tenantId"] = "tenantId";
|
|
19
|
-
})(SortByEnum || (exports.SortByEnum = SortByEnum = {}));
|
|
19
|
+
})(SortByEnum || (exports.SortByEnum = SortByEnum = {}));
|
|
20
|
+
|
|
21
|
+
const providersArray = ['local', 'saml', 'google', 'github', 'facebook', 'microsoft', 'scim2', 'slack'];
|
|
22
|
+
exports.providersArray = providersArray;
|
package/package.json
CHANGED
package/teams/index.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ export declare function getProfile(params?: object): Promise<IUserDTO>;
|
|
|
14
14
|
/**
|
|
15
15
|
* update user profile by providing updated fields.
|
|
16
16
|
* ``authorized user``
|
|
17
|
+
* @deprecated
|
|
18
|
+
* use updateUserProfileV2 from users
|
|
17
19
|
*/
|
|
18
20
|
export declare function updateProfile(body: Partial<IUpdateProfile>): Promise<IUserProfile>;
|
|
19
21
|
/**
|
package/users/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GetCurrentUserTenantsResponse, GetUserGroupsParams, GetUserGroupsResponse, GetUserJwtRequestDto, GetUserJwtResponseDto, GetUserRolesResponse, GetUsersRolesParams, IGetUsersV2Response, ISearchUserQueryParamsV2, ISearchUserQueryParamsV3, IUsersV3Data } from './interfaces';
|
|
1
|
+
import { GetCurrentUserTenantsResponse, GetUserGroupsParams, GetUserGroupsResponse, GetUserJwtRequestDto, GetUserJwtResponseDto, GetUserRolesResponse, GetUsersRolesParams, IGetUsersV2Response, ISearchUserQueryParamsV2, ISearchUserQueryParamsV3, IUpdateUserDto, IUserDTO, IUsersV3Data } from './interfaces';
|
|
2
2
|
import { FronteggPaginationWrapper, UserJwtOptions } from '../interfaces';
|
|
3
3
|
export declare function GetUserJwt(body: GetUserJwtRequestDto): Promise<GetUserJwtResponseDto>;
|
|
4
4
|
export declare function getUsersV2(queryParams: ISearchUserQueryParamsV2, options?: UserJwtOptions): Promise<FronteggPaginationWrapper<IGetUsersV2Response>>;
|
|
@@ -7,3 +7,4 @@ export declare function getUsersRoles(queryParams: GetUsersRolesParams, options?
|
|
|
7
7
|
export declare function getUsersGroups(queryParams: GetUserGroupsParams, options?: UserJwtOptions): Promise<GetUserGroupsResponse[]>;
|
|
8
8
|
export declare function getCurrentUserTenantsV3(options?: UserJwtOptions): Promise<GetCurrentUserTenantsResponse>;
|
|
9
9
|
export declare function sendResetBreachedPasswordEmails(): Promise<void>;
|
|
10
|
+
export declare function updateUserProfileV2(body: Partial<IUpdateUserDto>): Promise<IUserDTO>;
|
package/users/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import { extractHeadersFromOptions, Get, Post } from '../fetch';
|
|
2
|
+
import { extractHeadersFromOptions, Get, Post, Put } from '../fetch';
|
|
3
3
|
import { urls } from '../constants';
|
|
4
4
|
export async function GetUserJwt(body) {
|
|
5
5
|
return Post(`${urls.identity.users.v3}/me/token`, body);
|
|
@@ -35,4 +35,7 @@ export async function getCurrentUserTenantsV3(options) {
|
|
|
35
35
|
}
|
|
36
36
|
export async function sendResetBreachedPasswordEmails() {
|
|
37
37
|
return Post(urls.identity.users.passwords.resetBreachedPasswords.v1);
|
|
38
|
+
}
|
|
39
|
+
export async function updateUserProfileV2(body) {
|
|
40
|
+
return Put(`${urls.identity.users.v2}/me`, body);
|
|
38
41
|
}
|
package/users/interfaces.d.ts
CHANGED
|
@@ -97,3 +97,20 @@ export interface GetCurrentUserTenantsResponse {
|
|
|
97
97
|
tenants: ITenantsResponse[];
|
|
98
98
|
activeTenant: ITenantsResponse;
|
|
99
99
|
}
|
|
100
|
+
export interface IUpdateUserDto {
|
|
101
|
+
userAgent: string;
|
|
102
|
+
ipAddress: string;
|
|
103
|
+
name?: string;
|
|
104
|
+
phoneNumber?: string;
|
|
105
|
+
profilePictureUrl?: string | null;
|
|
106
|
+
metadata?: string;
|
|
107
|
+
sourceMetadata?: SourceMetadata;
|
|
108
|
+
provider?: (typeof providersArray)[number];
|
|
109
|
+
managedBy?: UserManagedByEnum;
|
|
110
|
+
}
|
|
111
|
+
export interface SourceMetadata {
|
|
112
|
+
source: 'SCIM';
|
|
113
|
+
sourceVersion: number;
|
|
114
|
+
sourceId: string;
|
|
115
|
+
}
|
|
116
|
+
export declare const providersArray: string[];
|
package/users/interfaces.js
CHANGED
|
@@ -9,4 +9,6 @@ export let SortByEnum;
|
|
|
9
9
|
SortByEnum["isLocked"] = "isLocked";
|
|
10
10
|
SortByEnum["provider"] = "provider";
|
|
11
11
|
SortByEnum["tenantId"] = "tenantId";
|
|
12
|
-
})(SortByEnum || (SortByEnum = {}));
|
|
12
|
+
})(SortByEnum || (SortByEnum = {}));
|
|
13
|
+
|
|
14
|
+
export const providersArray = ['local', 'saml', 'google', 'github', 'facebook', 'microsoft', 'scim2', 'slack'];
|