@frontegg/rest-api 2.10.75 → 2.10.76
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/CHANGELOG.md +2 -0
- package/dist/es2015/sub-tenants/index.d.ts +1 -1
- package/dist/es2015/sub-tenants/index.js +2 -15
- package/dist/es2015/sub-tenants/index.js.map +1 -1
- package/dist/es2015/sub-tenants/interfaces.d.ts +5 -6
- package/dist/sub-tenants/index.d.ts +1 -1
- package/dist/sub-tenants/index.js +1 -14
- package/dist/sub-tenants/index.js.map +1 -1
- package/dist/sub-tenants/interfaces.d.ts +5 -6
- package/dist/umd/index.js +1 -14
- package/package.json +1 -1
- package/src/sub-tenants/index.ts +6 -18
- package/src/sub-tenants/interfaces.ts +9 -10
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [2.10.76](https://github.com/frontegg/typescript-rest-api/compare/v2.10.75...v2.10.76) (2022-06-20)
|
|
6
|
+
|
|
5
7
|
### [2.10.75](https://github.com/frontegg/typescript-rest-api/compare/v2.10.74...v2.10.75) (2022-06-19)
|
|
6
8
|
|
|
7
9
|
### [2.10.74](https://github.com/frontegg/typescript-rest-api/compare/v2.10.73...v2.10.74) (2022-06-19)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PaginationResult } from "../interfaces";
|
|
2
|
-
import { AddUserToSubTenantsRequest, ILoadAllUsers, ISubTenantUser, RemoveUserFromSubTenantsRequest, UpdateUserRolesForSubTenantsRequestDto } from
|
|
2
|
+
import { AddUserToSubTenantsRequest, ILoadAllUsers, ISubTenantUser, RemoveUserFromSubTenantsRequest, 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): Promise<void>;
|
|
@@ -7,24 +7,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { Delete, Get, Patch, Post } from
|
|
10
|
+
import { Delete, Get, Patch, Post } from "../fetch";
|
|
11
11
|
import { urls } from "../constants";
|
|
12
12
|
export function loadAllUsers(params) {
|
|
13
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
14
13
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15
|
-
|
|
16
|
-
? {
|
|
17
|
-
sortBy: (_d = (_c = (_b = params.sort) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.id) !== null && _d !== void 0 ? _d : "name",
|
|
18
|
-
sortDirection: ((_f = (_e = params.sort) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.desc) ? "desc" : "asc",
|
|
19
|
-
}
|
|
20
|
-
: null;
|
|
21
|
-
return Get(urls.identity.subTenants.v1, {
|
|
22
|
-
_offset: params.pageOffset,
|
|
23
|
-
_limit: params.pageSize,
|
|
24
|
-
_filter: (_g = (params.filter || [])[0]) === null || _g === void 0 ? void 0 : _g.value,
|
|
25
|
-
_sortBy: sorts === null || sorts === void 0 ? void 0 : sorts.sortBy,
|
|
26
|
-
_order: sorts === null || sorts === void 0 ? void 0 : sorts.sortDirection,
|
|
27
|
-
});
|
|
14
|
+
return Get(urls.identity.subTenants.v1, params);
|
|
28
15
|
});
|
|
29
16
|
}
|
|
30
17
|
export function addUserToTenantAndSubTenants(body) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sub-tenants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AAyB,CAC7C,MAAc,EACd,IAA4C;;QAE5C,OAAO,KAAK,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,IAAI,MAAM,QAAQ,EAAE,IAAI,CAAC,CAAC;IACvE,CAAC;CAAA"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { QueryFilter, QuerySort } from "../interfaces";
|
|
2
1
|
export declare type ILoadAllUsers = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
_offset: number;
|
|
3
|
+
_limit: number;
|
|
4
|
+
_filter: string;
|
|
5
|
+
_sortBy: string;
|
|
6
|
+
_order: "ASC" | "DESC";
|
|
8
7
|
};
|
|
9
8
|
export declare type ISubTenantUserRole = {
|
|
10
9
|
id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PaginationResult } from "../interfaces";
|
|
2
|
-
import { AddUserToSubTenantsRequest, ILoadAllUsers, ISubTenantUser, RemoveUserFromSubTenantsRequest, UpdateUserRolesForSubTenantsRequestDto } from
|
|
2
|
+
import { AddUserToSubTenantsRequest, ILoadAllUsers, ISubTenantUser, RemoveUserFromSubTenantsRequest, 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): Promise<void>;
|
|
@@ -13,21 +13,8 @@ exports.setUserRolesForSubTenants = exports.removeUserRolesFromSubTenants = expo
|
|
|
13
13
|
const fetch_1 = require("../fetch");
|
|
14
14
|
const constants_1 = require("../constants");
|
|
15
15
|
function loadAllUsers(params) {
|
|
16
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
17
16
|
return __awaiter(this, void 0, void 0, function* () {
|
|
18
|
-
|
|
19
|
-
? {
|
|
20
|
-
sortBy: (_d = (_c = (_b = params.sort) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.id) !== null && _d !== void 0 ? _d : "name",
|
|
21
|
-
sortDirection: ((_f = (_e = params.sort) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.desc) ? "desc" : "asc",
|
|
22
|
-
}
|
|
23
|
-
: null;
|
|
24
|
-
return fetch_1.Get(constants_1.urls.identity.subTenants.v1, {
|
|
25
|
-
_offset: params.pageOffset,
|
|
26
|
-
_limit: params.pageSize,
|
|
27
|
-
_filter: (_g = (params.filter || [])[0]) === null || _g === void 0 ? void 0 : _g.value,
|
|
28
|
-
_sortBy: sorts === null || sorts === void 0 ? void 0 : sorts.sortBy,
|
|
29
|
-
_order: sorts === null || sorts === void 0 ? void 0 : sorts.sortDirection,
|
|
30
|
-
});
|
|
17
|
+
return fetch_1.Get(constants_1.urls.identity.subTenants.v1, params);
|
|
31
18
|
});
|
|
32
19
|
}
|
|
33
20
|
exports.loadAllUsers = loadAllUsers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sub-tenants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,oCAAoD;AACpD,4CAAoC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sub-tenants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,oCAAoD;AACpD,4CAAoC;AASpC,SAAsB,YAAY,CAChC,MAAqB;;QAErB,OAAO,WAAG,CAAC,gBAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IAClD,CAAC;CAAA;AAJD,oCAIC;AAED,SAAsB,4BAA4B,CAChD,IAAgC;;QAEhC,OAAO,YAAI,CAAC,gBAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IACjD,CAAC;CAAA;AAJD,oEAIC;AAED,SAAsB,iCAAiC,CACrD,IAAqC;;QAErC,OAAO,cAAM,CAAC,gBAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IACnD,CAAC;CAAA;AAJD,8EAIC;AAED,SAAsB,yBAAyB,CAC7C,MAAc,EACd,IAA4C;;QAE5C,OAAO,YAAI,CAAC,GAAG,gBAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,IAAI,MAAM,QAAQ,EAAE,IAAI,CAAC,CAAC;IACtE,CAAC;CAAA;AALD,8DAKC;AAED,SAAsB,6BAA6B,CACjD,MAAc,EACd,IAA4C;;QAE5C,OAAO,cAAM,CAAC,GAAG,gBAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,IAAI,MAAM,QAAQ,EAAE,IAAI,CAAC,CAAC;IACxE,CAAC;CAAA;AALD,sEAKC;AAED,SAAsB,yBAAyB,CAC7C,MAAc,EACd,IAA4C;;QAE5C,OAAO,aAAK,CAAC,GAAG,gBAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,IAAI,MAAM,QAAQ,EAAE,IAAI,CAAC,CAAC;IACvE,CAAC;CAAA;AALD,8DAKC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { QueryFilter, QuerySort } from "../interfaces";
|
|
2
1
|
export declare type ILoadAllUsers = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
_offset: number;
|
|
3
|
+
_limit: number;
|
|
4
|
+
_filter: string;
|
|
5
|
+
_sortBy: string;
|
|
6
|
+
_order: "ASC" | "DESC";
|
|
8
7
|
};
|
|
9
8
|
export declare type ISubTenantUserRole = {
|
|
10
9
|
id: string;
|
package/dist/umd/index.js
CHANGED
|
@@ -2678,21 +2678,8 @@
|
|
|
2678
2678
|
});
|
|
2679
2679
|
|
|
2680
2680
|
function loadAllUsers(params) {
|
|
2681
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
2682
2681
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2683
|
-
|
|
2684
|
-
? {
|
|
2685
|
-
sortBy: (_d = (_c = (_b = params.sort) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.id) !== null && _d !== void 0 ? _d : "name",
|
|
2686
|
-
sortDirection: ((_f = (_e = params.sort) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.desc) ? "desc" : "asc",
|
|
2687
|
-
}
|
|
2688
|
-
: null;
|
|
2689
|
-
return Get(urls.identity.subTenants.v1, {
|
|
2690
|
-
_offset: params.pageOffset,
|
|
2691
|
-
_limit: params.pageSize,
|
|
2692
|
-
_filter: (_g = (params.filter || [])[0]) === null || _g === void 0 ? void 0 : _g.value,
|
|
2693
|
-
_sortBy: sorts === null || sorts === void 0 ? void 0 : sorts.sortBy,
|
|
2694
|
-
_order: sorts === null || sorts === void 0 ? void 0 : sorts.sortDirection,
|
|
2695
|
-
});
|
|
2682
|
+
return Get(urls.identity.subTenants.v1, params);
|
|
2696
2683
|
});
|
|
2697
2684
|
}
|
|
2698
2685
|
function addUserToTenantAndSubTenants(body) {
|
package/package.json
CHANGED
package/src/sub-tenants/index.ts
CHANGED
|
@@ -1,30 +1,18 @@
|
|
|
1
1
|
import { PaginationResult } from "../interfaces";
|
|
2
|
-
import { Delete, Get, Patch, Post } from
|
|
2
|
+
import { Delete, Get, Patch, Post } from "../fetch";
|
|
3
3
|
import { urls } from "../constants";
|
|
4
4
|
import {
|
|
5
5
|
AddUserToSubTenantsRequest,
|
|
6
6
|
ILoadAllUsers,
|
|
7
7
|
ISubTenantUser,
|
|
8
|
-
RemoveUserFromSubTenantsRequest,
|
|
9
|
-
|
|
8
|
+
RemoveUserFromSubTenantsRequest,
|
|
9
|
+
UpdateUserRolesForSubTenantsRequestDto,
|
|
10
|
+
} from "./interfaces";
|
|
10
11
|
|
|
11
12
|
export async function loadAllUsers(
|
|
12
13
|
params: ILoadAllUsers
|
|
13
14
|
): Promise<PaginationResult<ISubTenantUser>> {
|
|
14
|
-
|
|
15
|
-
? {
|
|
16
|
-
sortBy: params.sort?.[0]?.id ?? "name",
|
|
17
|
-
sortDirection: params.sort?.[0]?.desc ? "desc" : "asc",
|
|
18
|
-
}
|
|
19
|
-
: null;
|
|
20
|
-
|
|
21
|
-
return Get(urls.identity.subTenants.v1, {
|
|
22
|
-
_offset: params.pageOffset,
|
|
23
|
-
_limit: params.pageSize,
|
|
24
|
-
_filter: (params.filter || [])[0]?.value,
|
|
25
|
-
_sortBy: sorts?.sortBy,
|
|
26
|
-
_order: sorts?.sortDirection,
|
|
27
|
-
});
|
|
15
|
+
return Get(urls.identity.subTenants.v1, params);
|
|
28
16
|
}
|
|
29
17
|
|
|
30
18
|
export async function addUserToTenantAndSubTenants(
|
|
@@ -58,4 +46,4 @@ export async function setUserRolesForSubTenants(
|
|
|
58
46
|
body: UpdateUserRolesForSubTenantsRequestDto
|
|
59
47
|
): Promise<void> {
|
|
60
48
|
return Patch(`${urls.identity.subTenants.v1}/${userId}/roles`, body);
|
|
61
|
-
}
|
|
49
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { QueryFilter, QuerySort } from "../interfaces";
|
|
2
2
|
|
|
3
3
|
export type ILoadAllUsers = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
_offset: number;
|
|
5
|
+
_limit: number;
|
|
6
|
+
_filter: string;
|
|
7
|
+
_sortBy: string;
|
|
8
|
+
_order: "ASC" | "DESC";
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export type ISubTenantUserRole = {
|
|
@@ -21,7 +21,7 @@ export type ISubTenantUserRole = {
|
|
|
21
21
|
createdAt: Date;
|
|
22
22
|
updatedAt: Date;
|
|
23
23
|
permissions: string[];
|
|
24
|
-
}
|
|
24
|
+
};
|
|
25
25
|
|
|
26
26
|
export type ISubTenantUserPermission = {
|
|
27
27
|
id: string;
|
|
@@ -33,12 +33,12 @@ export type ISubTenantUserPermission = {
|
|
|
33
33
|
roleIds: string[];
|
|
34
34
|
categoryId: string;
|
|
35
35
|
fePermission: boolean;
|
|
36
|
-
}
|
|
36
|
+
};
|
|
37
37
|
|
|
38
38
|
export type ISubTenantUserTenant = {
|
|
39
39
|
tenantId: string;
|
|
40
40
|
roles: ISubTenantUserRole[];
|
|
41
|
-
}
|
|
41
|
+
};
|
|
42
42
|
|
|
43
43
|
export type ISubTenantUser = {
|
|
44
44
|
id: string;
|
|
@@ -63,7 +63,7 @@ export type ISubTenantUser = {
|
|
|
63
63
|
metadata: string;
|
|
64
64
|
createdAt: Date;
|
|
65
65
|
lastLogin: Date;
|
|
66
|
-
}
|
|
66
|
+
};
|
|
67
67
|
|
|
68
68
|
export interface AddUserToSubTenantsRequestUserDto {
|
|
69
69
|
email: string;
|
|
@@ -99,4 +99,3 @@ export interface UpdateUserRolesForSubTenantsRequestDto {
|
|
|
99
99
|
ipAddress?: string;
|
|
100
100
|
userAgent?: string;
|
|
101
101
|
}
|
|
102
|
-
|