Initial commit
This commit is contained in:
69
src/types/index.ts
Normal file
69
src/types/index.ts
Normal file
@@ -0,0 +1,69 @@
|
||||
/**
|
||||
* User Manager Types
|
||||
*/
|
||||
|
||||
export interface User {
|
||||
uid: string;
|
||||
tid: string;
|
||||
identity: string;
|
||||
label: string;
|
||||
enabled: boolean;
|
||||
roles: string[];
|
||||
permissions?: string[];
|
||||
provider: string | null;
|
||||
provider_subject: string | null;
|
||||
provider_managed_fields: string[];
|
||||
profile: Record<string, any>;
|
||||
profile_editable?: Record<string, {
|
||||
value: any;
|
||||
editable: boolean;
|
||||
provider: string | null;
|
||||
}>;
|
||||
}
|
||||
|
||||
export interface Role {
|
||||
rid: string;
|
||||
tid: string;
|
||||
label: string;
|
||||
description: string;
|
||||
permissions: string[];
|
||||
system: boolean;
|
||||
user_count?: number;
|
||||
}
|
||||
|
||||
export interface Permission {
|
||||
label: string;
|
||||
description: string;
|
||||
group: string;
|
||||
module: string;
|
||||
deprecated?: boolean;
|
||||
}
|
||||
|
||||
export interface PermissionGroup {
|
||||
[group: string]: {
|
||||
[permission: string]: Permission;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ApiRequest {
|
||||
version: number;
|
||||
transaction: string;
|
||||
operation: string;
|
||||
data?: any;
|
||||
}
|
||||
|
||||
export interface ApiResponse<T = any> {
|
||||
version: number;
|
||||
transaction: string;
|
||||
operation: string;
|
||||
status: 'success' | 'error';
|
||||
data: T;
|
||||
}
|
||||
|
||||
export interface UserDetailPanel {
|
||||
id: string;
|
||||
label: string;
|
||||
icon?: string;
|
||||
priority?: number;
|
||||
component: () => Promise<any>;
|
||||
}
|
||||
Reference in New Issue
Block a user