40 lines
667 B
TypeScript
40 lines
667 B
TypeScript
import { Role, Permission } from "@/types/auth";
|
|
|
|
export interface CreateRoleRequest {
|
|
title: string;
|
|
description: string;
|
|
}
|
|
|
|
export interface UpdateRoleRequest {
|
|
id: number;
|
|
title: string;
|
|
description: string;
|
|
}
|
|
|
|
export interface RoleWithPermissions extends Role {
|
|
permissions: Permission[];
|
|
}
|
|
|
|
export interface RolePermissionsResponse {
|
|
permissions: Permission[];
|
|
}
|
|
|
|
export interface AssignPermissionResponse {
|
|
message: string;
|
|
}
|
|
|
|
export interface DeleteRoleResponse {
|
|
message: string;
|
|
}
|
|
|
|
export interface RoleFormData {
|
|
title: string;
|
|
description: string;
|
|
}
|
|
|
|
export type Response<T> = {
|
|
data: T;
|
|
message?: string;
|
|
success?: boolean;
|
|
};
|