23 lines
457 B
TypeScript
23 lines
457 B
TypeScript
import type { PAGE_PERMISSIONS } from '~/lib/page-permission'
|
|
|
|
export interface User {
|
|
id: string
|
|
name: string
|
|
email: string
|
|
}
|
|
|
|
export interface AuthState {
|
|
user: User | null
|
|
roles: string[]
|
|
token: string | null
|
|
}
|
|
|
|
export type Permission = 'C' | 'R' | 'U' | 'D'
|
|
|
|
export interface RoleAccess {
|
|
[role: string]: Permission[]
|
|
}
|
|
|
|
export type PagePath = keyof typeof PAGE_PERMISSIONS
|
|
export type PagePermission = (typeof PAGE_PERMISSIONS)[PagePath]
|