@frontegg/rest-api 3.0.98 → 3.0.99
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 +7 -0
- package/constants.js +7 -0
- package/index.d.ts +6 -2
- package/index.js +7 -4
- package/node/constants.js +7 -0
- package/node/index.js +20 -3
- package/node/sub-tenants/index.js +15 -0
- package/node/tenants/index.js +5 -0
- package/node/users/index.js +14 -0
- package/node/users/interfaces.js +5 -0
- package/package.json +1 -1
- package/sub-tenants/index.d.ts +4 -1
- package/sub-tenants/index.js +10 -1
- package/sub-tenants/interfaces.d.ts +32 -0
- package/tenants/index.d.ts +7 -1
- package/tenants/index.js +5 -2
- package/tenants/interfaces.d.ts +11 -0
- package/users/index.d.ts +2 -0
- package/users/index.js +5 -0
- package/users/interfaces.d.ts +8 -0
- package/users/interfaces.js +1 -0
- package/users/package.json +6 -0
package/constants.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export declare const urls: {
|
|
|
11
11
|
users: {
|
|
12
12
|
v1: string;
|
|
13
13
|
v2: string;
|
|
14
|
+
v3: string;
|
|
14
15
|
apiTokens: {
|
|
15
16
|
v1: string;
|
|
16
17
|
};
|
|
@@ -119,6 +120,12 @@ export declare const urls: {
|
|
|
119
120
|
tree: {
|
|
120
121
|
v1: string;
|
|
121
122
|
};
|
|
123
|
+
parents: {
|
|
124
|
+
v1: string;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
subTenants: {
|
|
128
|
+
v1: string;
|
|
122
129
|
};
|
|
123
130
|
};
|
|
124
131
|
integrations: {
|
package/constants.js
CHANGED
|
@@ -11,6 +11,7 @@ export const urls = {
|
|
|
11
11
|
users: {
|
|
12
12
|
v1: '/identity/resources/users/v1',
|
|
13
13
|
v2: '/identity/resources/users/v2',
|
|
14
|
+
v3: '/identity/resources/users/v3',
|
|
14
15
|
apiTokens: {
|
|
15
16
|
v1: '/identity/resources/users/api-tokens/v1'
|
|
16
17
|
},
|
|
@@ -118,7 +119,13 @@ export const urls = {
|
|
|
118
119
|
v1: '/tenants/resources/hierarchy/v1',
|
|
119
120
|
tree: {
|
|
120
121
|
v1: '/tenants/resources/hierarchy/v1/tree'
|
|
122
|
+
},
|
|
123
|
+
parents: {
|
|
124
|
+
v1: '/tenants/resources/hierarchy/v1/parents'
|
|
121
125
|
}
|
|
126
|
+
},
|
|
127
|
+
subTenants: {
|
|
128
|
+
v1: '/tenants/resources/sub-tenants/resources/v1'
|
|
122
129
|
}
|
|
123
130
|
},
|
|
124
131
|
integrations: {
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as auth from "./auth";
|
|
2
|
+
import { AuthStrategyEnum, MachineToMachineAuthStrategy, SocialLoginProviders } from "./auth";
|
|
2
3
|
import * as teams from "./teams";
|
|
3
4
|
import * as metadata from "./metadata";
|
|
4
5
|
import * as reports from "./reports";
|
|
@@ -10,6 +11,7 @@ import * as tenants from "./tenants";
|
|
|
10
11
|
import * as accountSettings from "./account-settings";
|
|
11
12
|
import * as roles from "./roles";
|
|
12
13
|
import * as subscriptions from "./subscriptions";
|
|
14
|
+
import { ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType } from "./subscriptions";
|
|
13
15
|
import { FronteggApiError } from "./error";
|
|
14
16
|
import * as vendor from "./vendor";
|
|
15
17
|
import * as subTenants from "./sub-tenants";
|
|
@@ -17,6 +19,7 @@ import * as featureFlags from "./feature-flags";
|
|
|
17
19
|
import * as directory from "./directory";
|
|
18
20
|
import * as impersonate from "./impersonate";
|
|
19
21
|
import * as groups from "./groups";
|
|
22
|
+
import * as users from "./users";
|
|
20
23
|
import { ContextHolder, FronteggContext } from "./ContextHolder";
|
|
21
24
|
export * from "./interfaces";
|
|
22
25
|
export * from "./auth/interfaces";
|
|
@@ -40,8 +43,7 @@ export * from "./directory/interfaces";
|
|
|
40
43
|
export * from "./impersonate/interfaces";
|
|
41
44
|
export * from "./groups/interfaces";
|
|
42
45
|
export * from "./groups/enums";
|
|
43
|
-
|
|
44
|
-
import { ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType } from "./subscriptions";
|
|
46
|
+
export * from "./users/interfaces";
|
|
45
47
|
declare const api: {
|
|
46
48
|
auth: typeof auth;
|
|
47
49
|
teams: typeof teams;
|
|
@@ -60,6 +62,7 @@ declare const api: {
|
|
|
60
62
|
directory: typeof directory;
|
|
61
63
|
impersonate: typeof impersonate;
|
|
62
64
|
groups: typeof groups;
|
|
65
|
+
users: typeof users;
|
|
63
66
|
};
|
|
64
67
|
export { fetch, ContextHolder, FronteggContext, api, FronteggApiError, AuthStrategyEnum, SocialLoginProviders, ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType, MachineToMachineAuthStrategy, };
|
|
65
68
|
declare const _default: {
|
|
@@ -90,6 +93,7 @@ declare const _default: {
|
|
|
90
93
|
directory: typeof directory;
|
|
91
94
|
impersonate: typeof impersonate;
|
|
92
95
|
groups: typeof groups;
|
|
96
|
+
users: typeof users;
|
|
93
97
|
};
|
|
94
98
|
FronteggApiError: typeof FronteggApiError;
|
|
95
99
|
AuthStrategyEnum: typeof auth.AuthStrategyEnum;
|
package/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
/** @license Frontegg v3.0.
|
|
1
|
+
/** @license Frontegg v3.0.99
|
|
2
2
|
*
|
|
3
3
|
* This source code is licensed under the MIT license found in the
|
|
4
4
|
* LICENSE file in the root directory of this source tree.
|
|
5
5
|
*/
|
|
6
6
|
import * as auth from "./auth";
|
|
7
|
+
import { AuthStrategyEnum, MachineToMachineAuthStrategy, SocialLoginProviders } from "./auth";
|
|
7
8
|
import * as teams from "./teams";
|
|
8
9
|
import * as metadata from "./metadata";
|
|
9
10
|
import * as reports from "./reports";
|
|
@@ -15,6 +16,7 @@ import * as tenants from "./tenants";
|
|
|
15
16
|
import * as accountSettings from "./account-settings";
|
|
16
17
|
import * as roles from "./roles";
|
|
17
18
|
import * as subscriptions from "./subscriptions";
|
|
19
|
+
import { ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType } from "./subscriptions";
|
|
18
20
|
import { FronteggApiError } from "./error";
|
|
19
21
|
import * as vendor from "./vendor";
|
|
20
22
|
import * as subTenants from "./sub-tenants";
|
|
@@ -22,6 +24,7 @@ import * as featureFlags from "./feature-flags";
|
|
|
22
24
|
import * as directory from "./directory";
|
|
23
25
|
import * as impersonate from "./impersonate";
|
|
24
26
|
import * as groups from "./groups";
|
|
27
|
+
import * as users from "./users";
|
|
25
28
|
import { ContextHolder, FronteggContext } from "./ContextHolder";
|
|
26
29
|
export * from "./interfaces";
|
|
27
30
|
export * from "./auth/interfaces";
|
|
@@ -45,8 +48,7 @@ export * from "./directory/interfaces";
|
|
|
45
48
|
export * from "./impersonate/interfaces";
|
|
46
49
|
export * from "./groups/interfaces";
|
|
47
50
|
export * from "./groups/enums";
|
|
48
|
-
|
|
49
|
-
import { ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType } from "./subscriptions";
|
|
51
|
+
export * from "./users/interfaces";
|
|
50
52
|
const api = {
|
|
51
53
|
auth,
|
|
52
54
|
teams,
|
|
@@ -64,7 +66,8 @@ const api = {
|
|
|
64
66
|
featureFlags,
|
|
65
67
|
directory,
|
|
66
68
|
impersonate,
|
|
67
|
-
groups
|
|
69
|
+
groups,
|
|
70
|
+
users
|
|
68
71
|
};
|
|
69
72
|
export { fetch, ContextHolder, FronteggContext, api, FronteggApiError, AuthStrategyEnum, SocialLoginProviders, ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType, MachineToMachineAuthStrategy };
|
|
70
73
|
export default {
|
package/node/constants.js
CHANGED
|
@@ -17,6 +17,7 @@ const urls = {
|
|
|
17
17
|
users: {
|
|
18
18
|
v1: '/identity/resources/users/v1',
|
|
19
19
|
v2: '/identity/resources/users/v2',
|
|
20
|
+
v3: '/identity/resources/users/v3',
|
|
20
21
|
apiTokens: {
|
|
21
22
|
v1: '/identity/resources/users/api-tokens/v1'
|
|
22
23
|
},
|
|
@@ -124,7 +125,13 @@ const urls = {
|
|
|
124
125
|
v1: '/tenants/resources/hierarchy/v1',
|
|
125
126
|
tree: {
|
|
126
127
|
v1: '/tenants/resources/hierarchy/v1/tree'
|
|
128
|
+
},
|
|
129
|
+
parents: {
|
|
130
|
+
v1: '/tenants/resources/hierarchy/v1/parents'
|
|
127
131
|
}
|
|
132
|
+
},
|
|
133
|
+
subTenants: {
|
|
134
|
+
v1: '/tenants/resources/sub-tenants/resources/v1'
|
|
128
135
|
}
|
|
129
136
|
},
|
|
130
137
|
integrations: {
|
package/node/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license Frontegg v3.0.
|
|
1
|
+
/** @license Frontegg v3.0.99
|
|
2
2
|
*
|
|
3
3
|
* This source code is licensed under the MIT license found in the
|
|
4
4
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -11,8 +11,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
11
11
|
var _exportNames = {
|
|
12
12
|
api: true,
|
|
13
13
|
AuthStrategyEnum: true,
|
|
14
|
-
SocialLoginProviders: true,
|
|
15
14
|
MachineToMachineAuthStrategy: true,
|
|
15
|
+
SocialLoginProviders: true,
|
|
16
16
|
fetch: true,
|
|
17
17
|
ISubscriptionCancellationPolicy: true,
|
|
18
18
|
ISubscriptionStatus: true,
|
|
@@ -148,6 +148,8 @@ var impersonate = _interopRequireWildcard(require("./impersonate"));
|
|
|
148
148
|
|
|
149
149
|
var groups = _interopRequireWildcard(require("./groups"));
|
|
150
150
|
|
|
151
|
+
var users = _interopRequireWildcard(require("./users"));
|
|
152
|
+
|
|
151
153
|
var _ContextHolder = require("./ContextHolder");
|
|
152
154
|
|
|
153
155
|
var _interfaces = require("./interfaces");
|
|
@@ -430,6 +432,20 @@ Object.keys(_enums).forEach(function (key) {
|
|
|
430
432
|
});
|
|
431
433
|
});
|
|
432
434
|
|
|
435
|
+
var _interfaces19 = require("./users/interfaces");
|
|
436
|
+
|
|
437
|
+
Object.keys(_interfaces19).forEach(function (key) {
|
|
438
|
+
if (key === "default" || key === "__esModule") return;
|
|
439
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
440
|
+
if (key in exports && exports[key] === _interfaces19[key]) return;
|
|
441
|
+
Object.defineProperty(exports, key, {
|
|
442
|
+
enumerable: true,
|
|
443
|
+
get: function () {
|
|
444
|
+
return _interfaces19[key];
|
|
445
|
+
}
|
|
446
|
+
});
|
|
447
|
+
});
|
|
448
|
+
|
|
433
449
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
434
450
|
|
|
435
451
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -451,7 +467,8 @@ const api = {
|
|
|
451
467
|
featureFlags,
|
|
452
468
|
directory,
|
|
453
469
|
impersonate,
|
|
454
|
-
groups
|
|
470
|
+
groups,
|
|
471
|
+
users
|
|
455
472
|
};
|
|
456
473
|
exports.api = api;
|
|
457
474
|
var _default = {
|
|
@@ -5,10 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.addUserRolesForSubTenants = addUserRolesForSubTenants;
|
|
7
7
|
exports.addUserToTenantAndSubTenants = addUserToTenantAndSubTenants;
|
|
8
|
+
exports.createSubTenant = createSubTenant;
|
|
9
|
+
exports.deleteSubTenant = deleteSubTenant;
|
|
8
10
|
exports.loadAllUsers = loadAllUsers;
|
|
9
11
|
exports.removeUserFromTenantAndSubTenants = removeUserFromTenantAndSubTenants;
|
|
10
12
|
exports.removeUserRolesFromSubTenants = removeUserRolesFromSubTenants;
|
|
11
13
|
exports.setUserRolesForSubTenants = setUserRolesForSubTenants;
|
|
14
|
+
exports.updateSubAccountAccess = updateSubAccountAccess;
|
|
12
15
|
|
|
13
16
|
var _fetch = require("../fetch");
|
|
14
17
|
|
|
@@ -36,4 +39,16 @@ async function removeUserRolesFromSubTenants(userId, body) {
|
|
|
36
39
|
|
|
37
40
|
async function setUserRolesForSubTenants(userId, body) {
|
|
38
41
|
return (0, _fetch.Patch)(`${_constants.urls.identity.subTenants.v1}/${userId}/roles`, body);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
async function createSubTenant(body) {
|
|
45
|
+
return (0, _fetch.Post)(_constants.urls.tenants.subTenants.v1, body);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
async function deleteSubTenant(tenantId) {
|
|
49
|
+
return (0, _fetch.Delete)(`${_constants.urls.tenants.subTenants.v1}/${tenantId}`);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
async function updateSubAccountAccess(userId, body) {
|
|
53
|
+
return (0, _fetch.Put)(`${_constants.urls.identity.subTenants.v1}/${userId}/access`, body);
|
|
39
54
|
}
|
package/node/tenants/index.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.getParentTenants = getParentTenants;
|
|
6
7
|
exports.getSubTenants = getSubTenants;
|
|
7
8
|
exports.getSubTenantsAsTree = getSubTenantsAsTree;
|
|
8
9
|
exports.getTenants = getTenants;
|
|
@@ -26,4 +27,8 @@ async function getSubTenants() {
|
|
|
26
27
|
|
|
27
28
|
async function getSubTenantsAsTree() {
|
|
28
29
|
return (0, _fetch.Get)(_constants.urls.tenants.hierarchy.tree.v1);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
async function getParentTenants() {
|
|
33
|
+
return (0, _fetch.Get)(_constants.urls.tenants.hierarchy.parents.v1);
|
|
29
34
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.GetUserJwt = GetUserJwt;
|
|
7
|
+
|
|
8
|
+
var _fetch = require("../fetch");
|
|
9
|
+
|
|
10
|
+
var _constants = require("../constants");
|
|
11
|
+
|
|
12
|
+
async function GetUserJwt(body) {
|
|
13
|
+
return (0, _fetch.Post)(_constants.urls.identity.users.v3, body);
|
|
14
|
+
}
|
package/package.json
CHANGED
package/sub-tenants/index.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { PaginationResult } from "../interfaces";
|
|
2
|
-
import { AddUserToSubTenantsRequest, ILoadAllUsers, ISubTenantUser, RemoveUserFromSubTenantsRequest, UpdateUserRolesForSubTenantsRequestDto } from "./interfaces";
|
|
2
|
+
import { AddUserToSubTenantsRequest, CreateSubTenantRequest, CreateSubTenantResponse, ILoadAllUsers, ISubTenantUser, RemoveUserFromSubTenantsRequest, UpdateSubAccountAccessRequestDto, 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>;
|
|
6
6
|
export declare function addUserRolesForSubTenants(userId: string, body: UpdateUserRolesForSubTenantsRequestDto): Promise<void>;
|
|
7
7
|
export declare function removeUserRolesFromSubTenants(userId: string, body: UpdateUserRolesForSubTenantsRequestDto): Promise<void>;
|
|
8
8
|
export declare function setUserRolesForSubTenants(userId: string, body: UpdateUserRolesForSubTenantsRequestDto): Promise<void>;
|
|
9
|
+
export declare function createSubTenant(body: CreateSubTenantRequest): Promise<CreateSubTenantResponse>;
|
|
10
|
+
export declare function deleteSubTenant(tenantId: string): Promise<void>;
|
|
11
|
+
export declare function updateSubAccountAccess(userId: string, body: UpdateSubAccountAccessRequestDto): Promise<void>;
|
package/sub-tenants/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Delete, Get, Patch, Post } from "../fetch";
|
|
1
|
+
import { Delete, Get, Patch, Post, Put } from "../fetch";
|
|
2
2
|
import { urls } from "../constants";
|
|
3
3
|
export async function loadAllUsers(params) {
|
|
4
4
|
return Get(urls.identity.subTenants.v1, params);
|
|
@@ -17,4 +17,13 @@ export async function removeUserRolesFromSubTenants(userId, body) {
|
|
|
17
17
|
}
|
|
18
18
|
export async function setUserRolesForSubTenants(userId, body) {
|
|
19
19
|
return Patch(`${urls.identity.subTenants.v1}/${userId}/roles`, body);
|
|
20
|
+
}
|
|
21
|
+
export async function createSubTenant(body) {
|
|
22
|
+
return Post(urls.tenants.subTenants.v1, body);
|
|
23
|
+
}
|
|
24
|
+
export async function deleteSubTenant(tenantId) {
|
|
25
|
+
return Delete(`${urls.tenants.subTenants.v1}/${tenantId}`);
|
|
26
|
+
}
|
|
27
|
+
export async function updateSubAccountAccess(userId, body) {
|
|
28
|
+
return Put(`${urls.identity.subTenants.v1}/${userId}/access`, body);
|
|
20
29
|
}
|
|
@@ -85,3 +85,35 @@ export interface UpdateUserRolesForSubTenantsRequestDto {
|
|
|
85
85
|
ipAddress?: string;
|
|
86
86
|
userAgent?: string;
|
|
87
87
|
}
|
|
88
|
+
export interface CreateSubTenantRequest {
|
|
89
|
+
tenantId: string;
|
|
90
|
+
name: string;
|
|
91
|
+
parentTenantId: string;
|
|
92
|
+
status?: string;
|
|
93
|
+
website?: string;
|
|
94
|
+
applicationUrl?: string;
|
|
95
|
+
logo?: string;
|
|
96
|
+
logoUrl?: string;
|
|
97
|
+
address?: string;
|
|
98
|
+
timezone?: string;
|
|
99
|
+
currency?: string;
|
|
100
|
+
creatorName?: string;
|
|
101
|
+
creatorEmail?: string;
|
|
102
|
+
isReseller?: boolean;
|
|
103
|
+
}
|
|
104
|
+
export interface CreateSubTenantResponse {
|
|
105
|
+
tenantId: string;
|
|
106
|
+
name: string;
|
|
107
|
+
status?: string;
|
|
108
|
+
website?: string;
|
|
109
|
+
applicationUrl?: string;
|
|
110
|
+
logo?: string;
|
|
111
|
+
logoUrl?: string;
|
|
112
|
+
address?: string;
|
|
113
|
+
timezone?: string;
|
|
114
|
+
updatedAt?: Date;
|
|
115
|
+
currency?: string;
|
|
116
|
+
}
|
|
117
|
+
export interface UpdateSubAccountAccessRequestDto {
|
|
118
|
+
allowAccess: boolean;
|
|
119
|
+
}
|
package/tenants/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ISubTenant, ISubTenantTree, ISwitchTenant, ITenantsResponse } from
|
|
1
|
+
import { IParentTenant, ISubTenant, ISubTenantTree, ISwitchTenant, ITenantsResponse } from "./interfaces";
|
|
2
2
|
/**
|
|
3
3
|
* switch logged in user to specific tenant by providing tenantId.
|
|
4
4
|
*
|
|
@@ -24,3 +24,9 @@ export declare function getSubTenants(): Promise<ISubTenant>;
|
|
|
24
24
|
* ``authorized user``
|
|
25
25
|
*/
|
|
26
26
|
export declare function getSubTenantsAsTree(): Promise<ISubTenantTree>;
|
|
27
|
+
/**
|
|
28
|
+
* retrieve logged in user's available parent tenants.
|
|
29
|
+
*
|
|
30
|
+
* ``authorized user``
|
|
31
|
+
*/
|
|
32
|
+
export declare function getParentTenants(): Promise<IParentTenant[]>;
|
package/tenants/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Get, Put } from
|
|
2
|
-
import { urls } from
|
|
1
|
+
import { Get, Put } from "../fetch";
|
|
2
|
+
import { urls } from "../constants";
|
|
3
3
|
export async function switchTenant(body) {
|
|
4
4
|
return Put(`${urls.identity.users.v1}/tenant`, body);
|
|
5
5
|
}
|
|
@@ -11,4 +11,7 @@ export async function getSubTenants() {
|
|
|
11
11
|
}
|
|
12
12
|
export async function getSubTenantsAsTree() {
|
|
13
13
|
return Get(urls.tenants.hierarchy.tree.v1);
|
|
14
|
+
}
|
|
15
|
+
export async function getParentTenants() {
|
|
16
|
+
return Get(urls.tenants.hierarchy.parents.v1);
|
|
14
17
|
}
|
package/tenants/interfaces.d.ts
CHANGED
|
@@ -47,11 +47,15 @@ export interface ITenantsResponseV2 extends ITenantsResponse {
|
|
|
47
47
|
export interface ISubTenant {
|
|
48
48
|
tenantId: string;
|
|
49
49
|
tenantName?: string;
|
|
50
|
+
status?: string;
|
|
51
|
+
createdAt?: Date;
|
|
50
52
|
level: number;
|
|
51
53
|
}
|
|
52
54
|
export interface ISubTenantTree {
|
|
53
55
|
tenantId: string;
|
|
54
56
|
tenantName?: string;
|
|
57
|
+
status?: string;
|
|
58
|
+
createdAt?: Date;
|
|
55
59
|
children: ISubTenantTree[];
|
|
56
60
|
}
|
|
57
61
|
export interface ITenantHierarchyNode {
|
|
@@ -60,3 +64,10 @@ export interface ITenantHierarchyNode {
|
|
|
60
64
|
tenantId: string;
|
|
61
65
|
parentId: string;
|
|
62
66
|
}
|
|
67
|
+
export interface IParentTenant {
|
|
68
|
+
tenantId: string;
|
|
69
|
+
level: number;
|
|
70
|
+
tenantName: string;
|
|
71
|
+
status: string;
|
|
72
|
+
createdAt: Date;
|
|
73
|
+
}
|
package/users/index.d.ts
ADDED
package/users/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|