forked from baron/baron-sso
Implement tenant import and RP auto login policies
This commit is contained in:
@@ -42,6 +42,7 @@ export type TenantCreateRequest = {
|
||||
description?: string;
|
||||
status?: string;
|
||||
domains?: string[];
|
||||
forceDomainConflicts?: string[];
|
||||
config?: Record<string, unknown>;
|
||||
};
|
||||
|
||||
@@ -60,6 +61,7 @@ export type TenantUpdateRequest = {
|
||||
description?: string;
|
||||
status?: string;
|
||||
domains?: string[];
|
||||
forceDomainConflicts?: string[];
|
||||
config?: Record<string, unknown>;
|
||||
};
|
||||
|
||||
@@ -152,8 +154,9 @@ export async function deleteTenantsBulk(ids: string[]) {
|
||||
});
|
||||
}
|
||||
|
||||
export async function exportTenantsCSV() {
|
||||
export async function exportTenantsCSV(includeIds = false) {
|
||||
const response = await apiClient.get<Blob>("/v1/admin/tenants/export", {
|
||||
params: { includeIds },
|
||||
responseType: "blob",
|
||||
});
|
||||
const dispositionHeader = response.headers["content-disposition"];
|
||||
@@ -459,11 +462,26 @@ export type BulkUserItem = {
|
||||
department?: string;
|
||||
position?: string;
|
||||
jobTitle?: string;
|
||||
tenantImport?: {
|
||||
sourceTenantId?: string;
|
||||
slug?: string;
|
||||
name?: string;
|
||||
type?: string;
|
||||
parentTenantId?: string;
|
||||
parentTenantSlug?: string;
|
||||
parentTenantName?: string;
|
||||
memo?: string;
|
||||
emailDomain?: string;
|
||||
};
|
||||
metadata: Record<string, string>;
|
||||
};
|
||||
|
||||
export type BulkUserResult = {
|
||||
email: string;
|
||||
originalEmail?: string;
|
||||
suggestedEmail?: string;
|
||||
status?: string;
|
||||
warnings?: string[];
|
||||
success: boolean;
|
||||
message?: string;
|
||||
userId?: string;
|
||||
@@ -508,9 +526,13 @@ export async function createUser(payload: UserCreateRequest) {
|
||||
return data;
|
||||
}
|
||||
|
||||
export async function exportUsersCSV(search?: string, tenantSlug?: string) {
|
||||
export async function exportUsersCSV(
|
||||
search?: string,
|
||||
tenantSlug?: string,
|
||||
includeIds = false,
|
||||
) {
|
||||
const response = await apiClient.get<Blob>("/v1/admin/users/export", {
|
||||
params: { search, tenantSlug },
|
||||
params: { search, tenantSlug, includeIds },
|
||||
responseType: "blob",
|
||||
});
|
||||
const dispositionHeader = response.headers["content-disposition"];
|
||||
|
||||
Reference in New Issue
Block a user