forked from wangziqi/gongxue-base
feat: add platform admin permissions
This commit is contained in:
@@ -24,6 +24,20 @@ export interface PlatformOverview {
|
||||
};
|
||||
}
|
||||
|
||||
export interface PlatformPermissionCatalogItem {
|
||||
key: string;
|
||||
group?: string | null;
|
||||
label?: string | null;
|
||||
}
|
||||
|
||||
export interface PlatformPermissionSummary {
|
||||
userId?: string | null;
|
||||
primaryRole?: string | null;
|
||||
permissions?: Record<string, unknown>;
|
||||
effective?: Record<string, boolean>;
|
||||
catalog?: PlatformPermissionCatalogItem[];
|
||||
}
|
||||
|
||||
export interface PlatformSaasPlan {
|
||||
id: string;
|
||||
code: string;
|
||||
@@ -468,6 +482,10 @@ export async function loadPlatformOverview() {
|
||||
return apiRequest<{ item?: PlatformOverview }>('/api/platform-admin/overview', { tenantId: null });
|
||||
}
|
||||
|
||||
export async function loadPlatformPermissions() {
|
||||
return apiRequest<{ item?: PlatformPermissionSummary }>('/api/platform-admin/permissions', { tenantId: null });
|
||||
}
|
||||
|
||||
export async function loadPlatformPlans(includeArchived = false) {
|
||||
return apiRequest<{ items?: PlatformSaasPlan[] }>('/api/platform-admin/plans', {
|
||||
query: { includeArchived },
|
||||
|
||||
Reference in New Issue
Block a user