mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
feat(FE-113): add Client, Permission, Role, and RoleWithPermission types
This commit is contained in:
Vendored
+30
@@ -24,6 +24,36 @@ export type LogoutResponse = BaseApiResponse;
|
|||||||
|
|
||||||
export type GetMeResponse = BaseApiResponse<UserWithRoles>;
|
export type GetMeResponse = BaseApiResponse<UserWithRoles>;
|
||||||
|
|
||||||
|
export type Client = {
|
||||||
|
id: number;
|
||||||
|
name: stirng;
|
||||||
|
alias: string;
|
||||||
|
created_at: string;
|
||||||
|
updated_at: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type Permission = {
|
||||||
|
id: number;
|
||||||
|
name: string;
|
||||||
|
action: string;
|
||||||
|
client: Omit<Client, 'created_at' | 'updated_at'>;
|
||||||
|
created_at: string;
|
||||||
|
updated_at: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type Role = {
|
||||||
|
id: number;
|
||||||
|
key: string;
|
||||||
|
name: string;
|
||||||
|
client: Omit<Client, 'created_at' | 'updated_at'>;
|
||||||
|
created_at: string;
|
||||||
|
updated_at: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type RoleWithPermissions = Omit<Role, 'created_at' | 'updated_at'> & {
|
||||||
|
permissions: Omit<Permission, 'created_at' | 'updated_at'>[];
|
||||||
|
};
|
||||||
|
|
||||||
export type User = {
|
export type User = {
|
||||||
id: number;
|
id: number;
|
||||||
email: string;
|
email: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user