@frontegg/rest-api
Advanced tools
Comparing version 3.0.110 to 3.0.111
@@ -130,2 +130,3 @@ export declare const urls: { | ||
}; | ||
v2: string; | ||
}; | ||
@@ -132,0 +133,0 @@ subTenants: { |
@@ -129,3 +129,4 @@ export const urls = { | ||
v1: '/tenants/resources/hierarchy/v1/parents' | ||
} | ||
}, | ||
v2: '/tenants/resources/hierarchy/v2' | ||
}, | ||
@@ -132,0 +133,0 @@ subTenants: { |
@@ -1,2 +0,2 @@ | ||
/** @license Frontegg v3.0.110 | ||
/** @license Frontegg v3.0.111 | ||
* | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
@@ -93,1 +93,5 @@ export interface IFronteggRecord { | ||
} | ||
export declare enum PaginationOrderEnum { | ||
ASC = "ASC", | ||
DESC = "DESC" | ||
} |
@@ -25,2 +25,9 @@ export const fronteggHeaders = { | ||
FronteggFrameworks["Vanillajs"] = "vanillajs"; | ||
})(FronteggFrameworks || (FronteggFrameworks = {})); | ||
})(FronteggFrameworks || (FronteggFrameworks = {})); | ||
export let PaginationOrderEnum; | ||
(function (PaginationOrderEnum) { | ||
PaginationOrderEnum["ASC"] = "ASC"; | ||
PaginationOrderEnum["DESC"] = "DESC"; | ||
})(PaginationOrderEnum || (PaginationOrderEnum = {})); |
@@ -135,3 +135,4 @@ "use strict"; | ||
v1: '/tenants/resources/hierarchy/v1/parents' | ||
} | ||
}, | ||
v2: '/tenants/resources/hierarchy/v2' | ||
}, | ||
@@ -138,0 +139,0 @@ subTenants: { |
@@ -1,2 +0,2 @@ | ||
/** @license Frontegg v3.0.110 | ||
/** @license Frontegg v3.0.111 | ||
* | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.fronteggHeaders = exports.RequestSource = exports.FronteggFrameworks = void 0; | ||
exports.fronteggHeaders = exports.RequestSource = exports.PaginationOrderEnum = exports.FronteggFrameworks = void 0; | ||
const fronteggHeaders = { | ||
@@ -35,2 +35,10 @@ frameWork: 'x-frontegg-framework', | ||
FronteggFrameworks["Vanillajs"] = "vanillajs"; | ||
})(FronteggFrameworks || (exports.FronteggFrameworks = FronteggFrameworks = {})); | ||
})(FronteggFrameworks || (exports.FronteggFrameworks = FronteggFrameworks = {})); | ||
let PaginationOrderEnum; | ||
exports.PaginationOrderEnum = PaginationOrderEnum; | ||
(function (PaginationOrderEnum) { | ||
PaginationOrderEnum["ASC"] = "ASC"; | ||
PaginationOrderEnum["DESC"] = "DESC"; | ||
})(PaginationOrderEnum || (exports.PaginationOrderEnum = PaginationOrderEnum = {})); |
@@ -16,2 +16,3 @@ "use strict"; | ||
exports.updateSubAccountAccess = updateSubAccountAccess; | ||
exports.updateSubTenant = updateSubTenant; | ||
@@ -66,2 +67,10 @@ var _fetch = require("../fetch"); | ||
async function updateSubTenant({ | ||
tenantId | ||
}, body, options) { | ||
return (0, _fetch.Patch)(`${_constants.urls.tenants.subTenants.v1}/${tenantId}`, body, { | ||
headers: (0, _fetch.extractHeadersFromOptions)(options) | ||
}); | ||
} | ||
async function updateSubAccountAccess(userId, body, options) { | ||
@@ -68,0 +77,0 @@ return (0, _fetch.Put)(`${_constants.urls.identity.subTenants.v1}/${userId}/access`, body, { |
@@ -11,2 +11,3 @@ "use strict"; | ||
exports.getTenantsUsersCount = getTenantsUsersCount; | ||
exports.searchSubTenants = searchSubTenants; | ||
exports.switchTenant = switchTenant; | ||
@@ -48,2 +49,8 @@ | ||
}); | ||
} | ||
async function searchSubTenants(params, options) { | ||
return (0, _fetch.Get)(_constants.urls.tenants.hierarchy.v2, params, { | ||
headers: (0, _fetch.extractHeadersFromOptions)(options) | ||
}); | ||
} |
@@ -6,3 +6,12 @@ "use strict"; | ||
}); | ||
exports.TenantType = void 0; | ||
exports.TenantType = exports.TenantSortByEnum = void 0; | ||
let TenantSortByEnum; | ||
exports.TenantSortByEnum = TenantSortByEnum; | ||
(function (TenantSortByEnum) { | ||
TenantSortByEnum["createdAt"] = "createdAt"; | ||
TenantSortByEnum["name"] = "name"; | ||
TenantSortByEnum["tenantId"] = "tenantId"; | ||
})(TenantSortByEnum || (exports.TenantSortByEnum = TenantSortByEnum = {})); | ||
let TenantType; | ||
@@ -9,0 +18,0 @@ exports.TenantType = TenantType; |
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.SortByEnum = exports.PaginationOrderEnum = void 0; | ||
exports.SortByEnum = void 0; | ||
let SortByEnum; | ||
@@ -20,10 +20,2 @@ exports.SortByEnum = SortByEnum; | ||
SortByEnum["tenantId"] = "tenantId"; | ||
})(SortByEnum || (exports.SortByEnum = SortByEnum = {})); | ||
let PaginationOrderEnum; | ||
exports.PaginationOrderEnum = PaginationOrderEnum; | ||
(function (PaginationOrderEnum) { | ||
PaginationOrderEnum["ASC"] = "ASC"; | ||
PaginationOrderEnum["DESC"] = "DESC"; | ||
})(PaginationOrderEnum || (exports.PaginationOrderEnum = PaginationOrderEnum = {})); | ||
})(SortByEnum || (exports.SortByEnum = SortByEnum = {})); |
{ | ||
"name": "@frontegg/rest-api", | ||
"version": "3.0.110", | ||
"version": "3.0.111", | ||
"main": "./node/index.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
import { PaginationResult, UserJwtOptions } from "../interfaces"; | ||
import { AddUsersToSubTenantRequest, AddUserToSubTenantsRequest, CreateSubTenantRequest, CreateSubTenantResponse, ILoadAllUsers, ISubTenantUser, RemoveUserFromSubTenantsRequest, UpdateSubAccountAccessRequestDto, UpdateUserRolesForSubTenantsRequestDto } from "./interfaces"; | ||
import { AddUsersToSubTenantRequest, AddUserToSubTenantsRequest, CreateSubTenantRequest, CreateSubTenantResponse, ILoadAllUsers, ISubTenantUser, RemoveUserFromSubTenantsRequest, UpdateSubAccountAccessRequestDto, UpdateSubTenantRequest, UpdateSubTenantRequestParams, UpdateUserRolesForSubTenantsRequestDto } from "./interfaces"; | ||
export declare function loadAllUsers(params: ILoadAllUsers): Promise<PaginationResult<ISubTenantUser>>; | ||
@@ -11,3 +11,4 @@ export declare function addUserToTenantAndSubTenants(body: AddUserToSubTenantsRequest): Promise<void>; | ||
export declare function deleteSubTenant(tenantId: string, options?: UserJwtOptions): Promise<void>; | ||
export declare function updateSubTenant({ tenantId }: UpdateSubTenantRequestParams, body: UpdateSubTenantRequest, options?: UserJwtOptions): Promise<void>; | ||
export declare function updateSubAccountAccess(userId: string, body: UpdateSubAccountAccessRequestDto, options?: UserJwtOptions): Promise<void>; | ||
export declare function addUsersToSubTenant(body: AddUsersToSubTenantRequest, options?: UserJwtOptions): Promise<void>; |
@@ -39,2 +39,9 @@ import { Delete, extractHeadersFromOptions, Get, Patch, Post, Put } from "../fetch"; | ||
} | ||
export async function updateSubTenant({ | ||
tenantId | ||
}, body, options) { | ||
return Patch(`${urls.tenants.subTenants.v1}/${tenantId}`, body, { | ||
headers: extractHeadersFromOptions(options) | ||
}); | ||
} | ||
export async function updateSubAccountAccess(userId, body, options) { | ||
@@ -41,0 +48,0 @@ return Put(`${urls.identity.subTenants.v1}/${userId}/access`, body, { |
@@ -130,1 +130,7 @@ export declare type ILoadAllUsers = { | ||
} | ||
export interface UpdateSubTenantRequestParams { | ||
tenantId: string; | ||
} | ||
export interface UpdateSubTenantRequest { | ||
name: string; | ||
} |
@@ -1,3 +0,3 @@ | ||
import { IGetTenantsUserCountRequest, IGetTenantsUserCountResponse, IParentTenant, ISubTenant, ISubTenantTree, ISwitchTenant, ITenantsResponse } from "./interfaces"; | ||
import { UserJwtOptions } from "../interfaces"; | ||
import { IGetTenantsUserCountRequest, IGetTenantsUserCountResponse, IParentTenant, ISubTenant, ISubTenantTree, ISwitchTenant, ITenantsResponse, SearchSubTenantsParams, SearchSubTenantsResponse } from "./interfaces"; | ||
import { FronteggPaginationWrapper, UserJwtOptions } from "../interfaces"; | ||
/** | ||
@@ -35,1 +35,2 @@ * switch logged in user to specific tenant by providing tenantId. | ||
export declare function getTenantsUsersCount(body: IGetTenantsUserCountRequest, options?: UserJwtOptions): Promise<IGetTenantsUserCountResponse[]>; | ||
export declare function searchSubTenants(params: SearchSubTenantsParams, options?: UserJwtOptions): Promise<FronteggPaginationWrapper<SearchSubTenantsResponse>>; |
@@ -28,2 +28,7 @@ import { extractHeadersFromOptions, Get, Post, Put } from "../fetch"; | ||
}); | ||
} | ||
export async function searchSubTenants(params, options) { | ||
return Get(urls.tenants.hierarchy.v2, params, { | ||
headers: extractHeadersFromOptions(options) | ||
}); | ||
} |
@@ -0,1 +1,7 @@ | ||
import { PaginationOrderEnum } from '../interfaces'; | ||
export declare enum TenantSortByEnum { | ||
createdAt = "createdAt", | ||
name = "name", | ||
tenantId = "tenantId" | ||
} | ||
export interface ISwitchTenant { | ||
@@ -82,1 +88,14 @@ tenantId: string; | ||
} | ||
export interface SearchSubTenantsParams { | ||
_limit?: number; | ||
_offset?: number; | ||
_filter?: string; | ||
_subTenantId?: string; | ||
_sortBy?: TenantSortByEnum; | ||
_order?: PaginationOrderEnum; | ||
} | ||
export interface SearchSubTenantsResponse { | ||
tenantId: string; | ||
name: string; | ||
createdAt: Date; | ||
} |
@@ -0,1 +1,9 @@ | ||
export let TenantSortByEnum; | ||
(function (TenantSortByEnum) { | ||
TenantSortByEnum["createdAt"] = "createdAt"; | ||
TenantSortByEnum["name"] = "name"; | ||
TenantSortByEnum["tenantId"] = "tenantId"; | ||
})(TenantSortByEnum || (TenantSortByEnum = {})); | ||
export let TenantType; | ||
@@ -2,0 +10,0 @@ |
@@ -0,1 +1,2 @@ | ||
import { PaginationOrderEnum } from '../interfaces'; | ||
export declare enum SortByEnum { | ||
@@ -11,6 +12,2 @@ createdAt = "createdAt", | ||
} | ||
export declare enum PaginationOrderEnum { | ||
ASC = "ASC", | ||
DESC = "DESC" | ||
} | ||
export interface GetUserJwtRequestDto { | ||
@@ -17,0 +14,0 @@ tenantId: string; |
@@ -12,9 +12,2 @@ export let SortByEnum; | ||
SortByEnum["tenantId"] = "tenantId"; | ||
})(SortByEnum || (SortByEnum = {})); | ||
export let PaginationOrderEnum; | ||
(function (PaginationOrderEnum) { | ||
PaginationOrderEnum["ASC"] = "ASC"; | ||
PaginationOrderEnum["DESC"] = "DESC"; | ||
})(PaginationOrderEnum || (PaginationOrderEnum = {})); | ||
})(SortByEnum || (SortByEnum = {})); |
334449
9342