flaschengeist-types/types/models.d.ts

36 lines
682 B
TypeScript

/** Models exported from backend */
declare namespace FG {
interface Notification {
id: number;
plugin: string;
text: string;
data?: any;
time: Date;
}
interface User {
userid: string;
deleted: boolean;
display_name: string;
firstname: string;
lastname: string;
mail: string;
birthday?: Date;
roles: Array<string>;
permissions?: Array<string>;
}
interface Session {
expires: Date;
token: string;
lifetime: number;
browser: string;
platform: string;
userid: string;
}
type Permission = string;
interface Role {
id: number;
name: string;
permissions: Array<Permission>;
}
}