@frontegg/rest-api 3.0.110 → 3.0.111
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 +1 -0
- package/constants.js +2 -1
- package/index.js +1 -1
- package/interfaces.d.ts +4 -0
- package/interfaces.js +8 -1
- package/node/constants.js +2 -1
- package/node/index.js +1 -1
- package/node/interfaces.js +10 -2
- package/node/sub-tenants/index.js +9 -0
- package/node/tenants/index.js +7 -0
- package/node/tenants/interfaces.js +10 -1
- package/node/users/interfaces.js +2 -10
- package/package.json +1 -1
- package/sub-tenants/index.d.ts +2 -1
- package/sub-tenants/index.js +7 -0
- package/sub-tenants/interfaces.d.ts +6 -0
- package/tenants/index.d.ts +3 -2
- package/tenants/index.js +5 -0
- package/tenants/interfaces.d.ts +19 -0
- package/tenants/interfaces.js +8 -0
- package/users/interfaces.d.ts +1 -4
- package/users/interfaces.js +1 -8
package/constants.d.ts
CHANGED
package/constants.js
CHANGED
package/index.js
CHANGED
package/interfaces.d.ts
CHANGED
package/interfaces.js
CHANGED
|
@@ -22,4 +22,11 @@ export let FronteggFrameworks;
|
|
|
22
22
|
FronteggFrameworks["Ios"] = "ios";
|
|
23
23
|
FronteggFrameworks["Android"] = "android";
|
|
24
24
|
FronteggFrameworks["Vanillajs"] = "vanillajs";
|
|
25
|
-
})(FronteggFrameworks || (FronteggFrameworks = {}));
|
|
25
|
+
})(FronteggFrameworks || (FronteggFrameworks = {}));
|
|
26
|
+
|
|
27
|
+
export let PaginationOrderEnum;
|
|
28
|
+
|
|
29
|
+
(function (PaginationOrderEnum) {
|
|
30
|
+
PaginationOrderEnum["ASC"] = "ASC";
|
|
31
|
+
PaginationOrderEnum["DESC"] = "DESC";
|
|
32
|
+
})(PaginationOrderEnum || (PaginationOrderEnum = {}));
|
package/node/constants.js
CHANGED
package/node/index.js
CHANGED
package/node/interfaces.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.fronteggHeaders = exports.RequestSource = exports.FronteggFrameworks = void 0;
|
|
6
|
+
exports.fronteggHeaders = exports.RequestSource = exports.PaginationOrderEnum = exports.FronteggFrameworks = void 0;
|
|
7
7
|
const fronteggHeaders = {
|
|
8
8
|
frameWork: 'x-frontegg-framework',
|
|
9
9
|
fronteggSdkVersion: 'x-frontegg-sdk',
|
|
@@ -31,4 +31,12 @@ exports.FronteggFrameworks = FronteggFrameworks;
|
|
|
31
31
|
FronteggFrameworks["Ios"] = "ios";
|
|
32
32
|
FronteggFrameworks["Android"] = "android";
|
|
33
33
|
FronteggFrameworks["Vanillajs"] = "vanillajs";
|
|
34
|
-
})(FronteggFrameworks || (exports.FronteggFrameworks = FronteggFrameworks = {}));
|
|
34
|
+
})(FronteggFrameworks || (exports.FronteggFrameworks = FronteggFrameworks = {}));
|
|
35
|
+
|
|
36
|
+
let PaginationOrderEnum;
|
|
37
|
+
exports.PaginationOrderEnum = PaginationOrderEnum;
|
|
38
|
+
|
|
39
|
+
(function (PaginationOrderEnum) {
|
|
40
|
+
PaginationOrderEnum["ASC"] = "ASC";
|
|
41
|
+
PaginationOrderEnum["DESC"] = "DESC";
|
|
42
|
+
})(PaginationOrderEnum || (exports.PaginationOrderEnum = PaginationOrderEnum = {}));
|
|
@@ -13,6 +13,7 @@ exports.removeUserFromTenantAndSubTenants = removeUserFromTenantAndSubTenants;
|
|
|
13
13
|
exports.removeUserRolesFromSubTenants = removeUserRolesFromSubTenants;
|
|
14
14
|
exports.setUserRolesForSubTenants = setUserRolesForSubTenants;
|
|
15
15
|
exports.updateSubAccountAccess = updateSubAccountAccess;
|
|
16
|
+
exports.updateSubTenant = updateSubTenant;
|
|
16
17
|
|
|
17
18
|
var _fetch = require("../fetch");
|
|
18
19
|
|
|
@@ -62,6 +63,14 @@ async function deleteSubTenant(tenantId, options) {
|
|
|
62
63
|
});
|
|
63
64
|
}
|
|
64
65
|
|
|
66
|
+
async function updateSubTenant({
|
|
67
|
+
tenantId
|
|
68
|
+
}, body, options) {
|
|
69
|
+
return (0, _fetch.Patch)(`${_constants.urls.tenants.subTenants.v1}/${tenantId}`, body, {
|
|
70
|
+
headers: (0, _fetch.extractHeadersFromOptions)(options)
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
65
74
|
async function updateSubAccountAccess(userId, body, options) {
|
|
66
75
|
return (0, _fetch.Put)(`${_constants.urls.identity.subTenants.v1}/${userId}/access`, body, {
|
|
67
76
|
headers: (0, _fetch.extractHeadersFromOptions)(options)
|
package/node/tenants/index.js
CHANGED
|
@@ -8,6 +8,7 @@ exports.getSubTenants = getSubTenants;
|
|
|
8
8
|
exports.getSubTenantsAsTree = getSubTenantsAsTree;
|
|
9
9
|
exports.getTenants = getTenants;
|
|
10
10
|
exports.getTenantsUsersCount = getTenantsUsersCount;
|
|
11
|
+
exports.searchSubTenants = searchSubTenants;
|
|
11
12
|
exports.switchTenant = switchTenant;
|
|
12
13
|
|
|
13
14
|
var _fetch = require("../fetch");
|
|
@@ -44,4 +45,10 @@ async function getTenantsUsersCount(body, options) {
|
|
|
44
45
|
return (0, _fetch.Post)(`${_constants.urls.identity.tenants.users.v1}/count`, body, {
|
|
45
46
|
headers: (0, _fetch.extractHeadersFromOptions)(options)
|
|
46
47
|
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
async function searchSubTenants(params, options) {
|
|
51
|
+
return (0, _fetch.Get)(_constants.urls.tenants.hierarchy.v2, params, {
|
|
52
|
+
headers: (0, _fetch.extractHeadersFromOptions)(options)
|
|
53
|
+
});
|
|
47
54
|
}
|
|
@@ -3,7 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.TenantType = void 0;
|
|
6
|
+
exports.TenantType = exports.TenantSortByEnum = void 0;
|
|
7
|
+
let TenantSortByEnum;
|
|
8
|
+
exports.TenantSortByEnum = TenantSortByEnum;
|
|
9
|
+
|
|
10
|
+
(function (TenantSortByEnum) {
|
|
11
|
+
TenantSortByEnum["createdAt"] = "createdAt";
|
|
12
|
+
TenantSortByEnum["name"] = "name";
|
|
13
|
+
TenantSortByEnum["tenantId"] = "tenantId";
|
|
14
|
+
})(TenantSortByEnum || (exports.TenantSortByEnum = TenantSortByEnum = {}));
|
|
15
|
+
|
|
7
16
|
let TenantType;
|
|
8
17
|
exports.TenantType = TenantType;
|
|
9
18
|
|
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 =
|
|
6
|
+
exports.SortByEnum = void 0;
|
|
7
7
|
let SortByEnum;
|
|
8
8
|
exports.SortByEnum = SortByEnum;
|
|
9
9
|
|
|
@@ -16,12 +16,4 @@ exports.SortByEnum = SortByEnum;
|
|
|
16
16
|
SortByEnum["isLocked"] = "isLocked";
|
|
17
17
|
SortByEnum["provider"] = "provider";
|
|
18
18
|
SortByEnum["tenantId"] = "tenantId";
|
|
19
|
-
})(SortByEnum || (exports.SortByEnum = SortByEnum = {}));
|
|
20
|
-
|
|
21
|
-
let PaginationOrderEnum;
|
|
22
|
-
exports.PaginationOrderEnum = PaginationOrderEnum;
|
|
23
|
-
|
|
24
|
-
(function (PaginationOrderEnum) {
|
|
25
|
-
PaginationOrderEnum["ASC"] = "ASC";
|
|
26
|
-
PaginationOrderEnum["DESC"] = "DESC";
|
|
27
|
-
})(PaginationOrderEnum || (exports.PaginationOrderEnum = PaginationOrderEnum = {}));
|
|
19
|
+
})(SortByEnum || (exports.SortByEnum = SortByEnum = {}));
|
package/package.json
CHANGED
package/sub-tenants/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PaginationResult, UserJwtOptions } from "../interfaces";
|
|
2
|
-
import { AddUsersToSubTenantRequest, AddUserToSubTenantsRequest, CreateSubTenantRequest, CreateSubTenantResponse, ILoadAllUsers, ISubTenantUser, RemoveUserFromSubTenantsRequest, UpdateSubAccountAccessRequestDto, UpdateUserRolesForSubTenantsRequestDto } from "./interfaces";
|
|
2
|
+
import { AddUsersToSubTenantRequest, AddUserToSubTenantsRequest, CreateSubTenantRequest, CreateSubTenantResponse, ILoadAllUsers, ISubTenantUser, RemoveUserFromSubTenantsRequest, UpdateSubAccountAccessRequestDto, UpdateSubTenantRequest, UpdateSubTenantRequestParams, UpdateUserRolesForSubTenantsRequestDto } from "./interfaces";
|
|
3
3
|
export declare function loadAllUsers(params: ILoadAllUsers): Promise<PaginationResult<ISubTenantUser>>;
|
|
4
4
|
export declare function addUserToTenantAndSubTenants(body: AddUserToSubTenantsRequest): Promise<void>;
|
|
5
5
|
export declare function removeUserFromTenantAndSubTenants(body: RemoveUserFromSubTenantsRequest, options?: UserJwtOptions): Promise<void>;
|
|
@@ -8,5 +8,6 @@ export declare function removeUserRolesFromSubTenants(userId: string, body: Upda
|
|
|
8
8
|
export declare function setUserRolesForSubTenants(userId: string, body: UpdateUserRolesForSubTenantsRequestDto, options?: UserJwtOptions): Promise<void>;
|
|
9
9
|
export declare function createSubTenant(body: CreateSubTenantRequest, options?: UserJwtOptions): Promise<CreateSubTenantResponse>;
|
|
10
10
|
export declare function deleteSubTenant(tenantId: string, options?: UserJwtOptions): Promise<void>;
|
|
11
|
+
export declare function updateSubTenant({ tenantId }: UpdateSubTenantRequestParams, body: UpdateSubTenantRequest, options?: UserJwtOptions): Promise<void>;
|
|
11
12
|
export declare function updateSubAccountAccess(userId: string, body: UpdateSubAccountAccessRequestDto, options?: UserJwtOptions): Promise<void>;
|
|
12
13
|
export declare function addUsersToSubTenant(body: AddUsersToSubTenantRequest, options?: UserJwtOptions): Promise<void>;
|
package/sub-tenants/index.js
CHANGED
|
@@ -36,6 +36,13 @@ export async function deleteSubTenant(tenantId, options) {
|
|
|
36
36
|
headers: extractHeadersFromOptions(options)
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
+
export async function updateSubTenant({
|
|
40
|
+
tenantId
|
|
41
|
+
}, body, options) {
|
|
42
|
+
return Patch(`${urls.tenants.subTenants.v1}/${tenantId}`, body, {
|
|
43
|
+
headers: extractHeadersFromOptions(options)
|
|
44
|
+
});
|
|
45
|
+
}
|
|
39
46
|
export async function updateSubAccountAccess(userId, body, options) {
|
|
40
47
|
return Put(`${urls.identity.subTenants.v1}/${userId}/access`, body, {
|
|
41
48
|
headers: extractHeadersFromOptions(options)
|
|
@@ -127,3 +127,9 @@ export interface AddUsersToSubTenantRequest {
|
|
|
127
127
|
roleIds?: string[];
|
|
128
128
|
allowSubAccountAccess?: boolean;
|
|
129
129
|
}
|
|
130
|
+
export interface UpdateSubTenantRequestParams {
|
|
131
|
+
tenantId: string;
|
|
132
|
+
}
|
|
133
|
+
export interface UpdateSubTenantRequest {
|
|
134
|
+
name: string;
|
|
135
|
+
}
|
package/tenants/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IGetTenantsUserCountRequest, IGetTenantsUserCountResponse, IParentTenant, ISubTenant, ISubTenantTree, ISwitchTenant, ITenantsResponse } from "./interfaces";
|
|
2
|
-
import { UserJwtOptions } from "../interfaces";
|
|
1
|
+
import { IGetTenantsUserCountRequest, IGetTenantsUserCountResponse, IParentTenant, ISubTenant, ISubTenantTree, ISwitchTenant, ITenantsResponse, SearchSubTenantsParams, SearchSubTenantsResponse } from "./interfaces";
|
|
2
|
+
import { FronteggPaginationWrapper, UserJwtOptions } from "../interfaces";
|
|
3
3
|
/**
|
|
4
4
|
* switch logged in user to specific tenant by providing tenantId.
|
|
5
5
|
*
|
|
@@ -32,3 +32,4 @@ export declare function getSubTenantsAsTree(options?: UserJwtOptions): Promise<I
|
|
|
32
32
|
*/
|
|
33
33
|
export declare function getParentTenants(options?: UserJwtOptions): Promise<IParentTenant[]>;
|
|
34
34
|
export declare function getTenantsUsersCount(body: IGetTenantsUserCountRequest, options?: UserJwtOptions): Promise<IGetTenantsUserCountResponse[]>;
|
|
35
|
+
export declare function searchSubTenants(params: SearchSubTenantsParams, options?: UserJwtOptions): Promise<FronteggPaginationWrapper<SearchSubTenantsResponse>>;
|
package/tenants/index.js
CHANGED
|
@@ -25,4 +25,9 @@ export async function getTenantsUsersCount(body, options) {
|
|
|
25
25
|
return Post(`${urls.identity.tenants.users.v1}/count`, body, {
|
|
26
26
|
headers: extractHeadersFromOptions(options)
|
|
27
27
|
});
|
|
28
|
+
}
|
|
29
|
+
export async function searchSubTenants(params, options) {
|
|
30
|
+
return Get(urls.tenants.hierarchy.v2, params, {
|
|
31
|
+
headers: extractHeadersFromOptions(options)
|
|
32
|
+
});
|
|
28
33
|
}
|
package/tenants/interfaces.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import { PaginationOrderEnum } from '../interfaces';
|
|
2
|
+
export declare enum TenantSortByEnum {
|
|
3
|
+
createdAt = "createdAt",
|
|
4
|
+
name = "name",
|
|
5
|
+
tenantId = "tenantId"
|
|
6
|
+
}
|
|
1
7
|
export interface ISwitchTenant {
|
|
2
8
|
tenantId: string;
|
|
3
9
|
}
|
|
@@ -79,3 +85,16 @@ export interface IGetTenantsUserCountResponse {
|
|
|
79
85
|
totalUsers: number;
|
|
80
86
|
totalAccessAllowedUsers: number;
|
|
81
87
|
}
|
|
88
|
+
export interface SearchSubTenantsParams {
|
|
89
|
+
_limit?: number;
|
|
90
|
+
_offset?: number;
|
|
91
|
+
_filter?: string;
|
|
92
|
+
_subTenantId?: string;
|
|
93
|
+
_sortBy?: TenantSortByEnum;
|
|
94
|
+
_order?: PaginationOrderEnum;
|
|
95
|
+
}
|
|
96
|
+
export interface SearchSubTenantsResponse {
|
|
97
|
+
tenantId: string;
|
|
98
|
+
name: string;
|
|
99
|
+
createdAt: Date;
|
|
100
|
+
}
|
package/tenants/interfaces.js
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
export let TenantSortByEnum;
|
|
2
|
+
|
|
3
|
+
(function (TenantSortByEnum) {
|
|
4
|
+
TenantSortByEnum["createdAt"] = "createdAt";
|
|
5
|
+
TenantSortByEnum["name"] = "name";
|
|
6
|
+
TenantSortByEnum["tenantId"] = "tenantId";
|
|
7
|
+
})(TenantSortByEnum || (TenantSortByEnum = {}));
|
|
8
|
+
|
|
1
9
|
export let TenantType;
|
|
2
10
|
|
|
3
11
|
(function (TenantType) {
|
package/users/interfaces.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PaginationOrderEnum } from '../interfaces';
|
|
1
2
|
export declare enum SortByEnum {
|
|
2
3
|
createdAt = "createdAt",
|
|
3
4
|
name = "name",
|
|
@@ -8,10 +9,6 @@ export declare enum SortByEnum {
|
|
|
8
9
|
provider = "provider",
|
|
9
10
|
tenantId = "tenantId"
|
|
10
11
|
}
|
|
11
|
-
export declare enum PaginationOrderEnum {
|
|
12
|
-
ASC = "ASC",
|
|
13
|
-
DESC = "DESC"
|
|
14
|
-
}
|
|
15
12
|
export interface GetUserJwtRequestDto {
|
|
16
13
|
tenantId: string;
|
|
17
14
|
}
|
package/users/interfaces.js
CHANGED
|
@@ -9,11 +9,4 @@ export let SortByEnum;
|
|
|
9
9
|
SortByEnum["isLocked"] = "isLocked";
|
|
10
10
|
SortByEnum["provider"] = "provider";
|
|
11
11
|
SortByEnum["tenantId"] = "tenantId";
|
|
12
|
-
})(SortByEnum || (SortByEnum = {}));
|
|
13
|
-
|
|
14
|
-
export let PaginationOrderEnum;
|
|
15
|
-
|
|
16
|
-
(function (PaginationOrderEnum) {
|
|
17
|
-
PaginationOrderEnum["ASC"] = "ASC";
|
|
18
|
-
PaginationOrderEnum["DESC"] = "DESC";
|
|
19
|
-
})(PaginationOrderEnum || (PaginationOrderEnum = {}));
|
|
12
|
+
})(SortByEnum || (SortByEnum = {}));
|