@frontegg/rest-api 3.1.21 → 3.1.23
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/user-phone-numbers/index.js +4 -4
- package/node/users/index.js +1 -12
- package/package.json +1 -1
- package/user-phone-numbers/index.d.ts +3 -3
- package/user-phone-numbers/index.js +3 -3
- package/users/index.js +1 -12
- package/users/interfaces.d.ts +2 -5
package/index.js
CHANGED
package/node/index.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.createPhoneNumber = createPhoneNumber;
|
|
7
7
|
exports.deletePhoneNumber = deletePhoneNumber;
|
|
8
|
-
exports.
|
|
8
|
+
exports.getUserPhoneNumbers = getUserPhoneNumbers;
|
|
9
9
|
exports.updatePhoneNumber = updatePhoneNumber;
|
|
10
10
|
exports.verifyDeletePhoneNumber = verifyDeletePhoneNumber;
|
|
11
11
|
exports.verifyPhoneNumber = verifyPhoneNumber;
|
|
@@ -14,7 +14,7 @@ var _constants = require("../constants");
|
|
|
14
14
|
|
|
15
15
|
var _fetch = require("../fetch");
|
|
16
16
|
|
|
17
|
-
async function
|
|
17
|
+
async function getUserPhoneNumbers(queryParams) {
|
|
18
18
|
return (0, _fetch.Get)(`${_constants.urls.identity.phoneNumbers.v1}`, queryParams);
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -30,8 +30,8 @@ async function deletePhoneNumber(phoneId) {
|
|
|
30
30
|
return (0, _fetch.Delete)(`${_constants.urls.identity.phoneNumbers.v1}/${phoneId}`);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
async function verifyPhoneNumber(body) {
|
|
34
|
-
return (0, _fetch.Post)(`${_constants.urls.identity.phoneNumbers.v1}/verify`, body);
|
|
33
|
+
async function verifyPhoneNumber(phoneId, body) {
|
|
34
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.phoneNumbers.v1}/${phoneId}/verify`, body);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
async function verifyDeletePhoneNumber(phoneId, body) {
|
package/node/users/index.js
CHANGED
|
@@ -16,14 +16,10 @@ exports.updateUserProfileV2 = updateUserProfileV2;
|
|
|
16
16
|
|
|
17
17
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
18
18
|
|
|
19
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
20
|
-
|
|
21
19
|
var _fetch = require("../fetch");
|
|
22
20
|
|
|
23
21
|
var _constants = require("../constants");
|
|
24
22
|
|
|
25
|
-
const _excluded = ["_presetParams"];
|
|
26
|
-
|
|
27
23
|
async function GetUserJwt(body) {
|
|
28
24
|
return (0, _fetch.Post)(`${_constants.urls.identity.users.v3}/me/token`, body);
|
|
29
25
|
}
|
|
@@ -35,14 +31,7 @@ async function getUsersV2(queryParams, options) {
|
|
|
35
31
|
}
|
|
36
32
|
|
|
37
33
|
async function getUsersV3(queryParams, options) {
|
|
38
|
-
|
|
39
|
-
_presetParams
|
|
40
|
-
} = queryParams,
|
|
41
|
-
params = (0, _objectWithoutPropertiesLoose2.default)(queryParams, _excluded);
|
|
42
|
-
const finalQueryParams = (0, _extends2.default)({}, params, {
|
|
43
|
-
_presetParams: _presetParams ? JSON.stringify(_presetParams) : undefined
|
|
44
|
-
});
|
|
45
|
-
return (0, _fetch.Get)(_constants.urls.identity.users.v3, finalQueryParams, {
|
|
34
|
+
return (0, _fetch.Get)(_constants.urls.identity.users.v3, queryParams, {
|
|
46
35
|
headers: (0, _fetch.extractHeadersFromOptions)(options)
|
|
47
36
|
});
|
|
48
37
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { FronteggPaginationWrapper } from "../interfaces";
|
|
2
2
|
import { IGetPhoneNumbersQueryParams, IPhoneNumber, IUpdatePhoneNumber, IUpdatePhoneNumberResponse, IVerifyPhoneNumber } from "./interfaces";
|
|
3
3
|
/**
|
|
4
|
-
* Get
|
|
4
|
+
* Get phone numbers of user
|
|
5
5
|
*/
|
|
6
|
-
export declare function
|
|
6
|
+
export declare function getUserPhoneNumbers(queryParams: IGetPhoneNumbersQueryParams): Promise<FronteggPaginationWrapper<IPhoneNumber>>;
|
|
7
7
|
/**
|
|
8
8
|
* Create new phone number for user
|
|
9
9
|
*/
|
|
@@ -19,7 +19,7 @@ export declare function deletePhoneNumber(phoneId: string): Promise<IUpdatePhone
|
|
|
19
19
|
/**
|
|
20
20
|
* Verify phone number
|
|
21
21
|
*/
|
|
22
|
-
export declare function verifyPhoneNumber(body: IVerifyPhoneNumber): Promise<void>;
|
|
22
|
+
export declare function verifyPhoneNumber(phoneId: string, body: IVerifyPhoneNumber): Promise<void>;
|
|
23
23
|
/**
|
|
24
24
|
* Verify delete phone number
|
|
25
25
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { urls } from "../constants";
|
|
2
2
|
import { Delete, Get, Patch, Post } from "../fetch";
|
|
3
|
-
export async function
|
|
3
|
+
export async function getUserPhoneNumbers(queryParams) {
|
|
4
4
|
return Get(`${urls.identity.phoneNumbers.v1}`, queryParams);
|
|
5
5
|
}
|
|
6
6
|
export async function createPhoneNumber(body) {
|
|
@@ -12,8 +12,8 @@ export async function updatePhoneNumber(phoneId, body) {
|
|
|
12
12
|
export async function deletePhoneNumber(phoneId) {
|
|
13
13
|
return Delete(`${urls.identity.phoneNumbers.v1}/${phoneId}`);
|
|
14
14
|
}
|
|
15
|
-
export async function verifyPhoneNumber(body) {
|
|
16
|
-
return Post(`${urls.identity.phoneNumbers.v1}/verify`, body);
|
|
15
|
+
export async function verifyPhoneNumber(phoneId, body) {
|
|
16
|
+
return Post(`${urls.identity.phoneNumbers.v1}/${phoneId}/verify`, body);
|
|
17
17
|
}
|
|
18
18
|
export async function verifyDeletePhoneNumber(phoneId, body) {
|
|
19
19
|
return Post(`${urls.identity.phoneNumbers.v1}/${phoneId}/delete/verify`, body);
|
package/users/index.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["_presetParams"];
|
|
4
2
|
import { extractHeadersFromOptions, Get, Post, Put } from '../fetch';
|
|
5
3
|
import { urls } from '../constants';
|
|
6
4
|
export async function GetUserJwt(body) {
|
|
@@ -12,16 +10,7 @@ export async function getUsersV2(queryParams, options) {
|
|
|
12
10
|
});
|
|
13
11
|
}
|
|
14
12
|
export async function getUsersV3(queryParams, options) {
|
|
15
|
-
|
|
16
|
-
_presetParams
|
|
17
|
-
} = queryParams,
|
|
18
|
-
params = _objectWithoutPropertiesLoose(queryParams, _excluded);
|
|
19
|
-
|
|
20
|
-
const finalQueryParams = _extends({}, params, {
|
|
21
|
-
_presetParams: _presetParams ? JSON.stringify(_presetParams) : undefined
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
return Get(urls.identity.users.v3, finalQueryParams, {
|
|
13
|
+
return Get(urls.identity.users.v3, queryParams, {
|
|
25
14
|
headers: extractHeadersFromOptions(options)
|
|
26
15
|
});
|
|
27
16
|
}
|
package/users/interfaces.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ITenantsResponse } from '../tenants/interfaces';
|
|
|
3
3
|
import { IRole } from '../roles/interfaces';
|
|
4
4
|
import { ITeamUserPermission, UserManagedByEnum } from '../teams/interfaces';
|
|
5
5
|
import { IGroupResponse } from '../groups/interfaces';
|
|
6
|
-
import { UserEntitlementsResponse } from
|
|
6
|
+
import { UserEntitlementsResponse } from '../entitlements/interfaces';
|
|
7
7
|
export declare enum SortByEnum {
|
|
8
8
|
createdAt = "createdAt",
|
|
9
9
|
name = "name",
|
|
@@ -39,7 +39,7 @@ export interface ISearchUserQueryParamsV3 extends IGetUserQueryParams {
|
|
|
39
39
|
_tenantId?: string;
|
|
40
40
|
_includeSubTenants?: boolean;
|
|
41
41
|
_preset?: GetUsersFilterPreset;
|
|
42
|
-
|
|
42
|
+
_maxInactiveSeconds?: number;
|
|
43
43
|
}
|
|
44
44
|
export interface IUserTenantData {
|
|
45
45
|
tenantId: string;
|
|
@@ -98,9 +98,6 @@ export declare enum GetUsersFilterPreset {
|
|
|
98
98
|
BREACHED_PASSWORDS = "breached-passwords",
|
|
99
99
|
INACTIVE = "inactive"
|
|
100
100
|
}
|
|
101
|
-
export interface GetUsersFilterPresetParams {
|
|
102
|
-
_maxInactiveSeconds?: number;
|
|
103
|
-
}
|
|
104
101
|
export interface GetUsersRolesParams {
|
|
105
102
|
ids: string[];
|
|
106
103
|
}
|