flaschengeist-types/types/models.d.ts

36 lines
682 B
TypeScript
Raw Normal View History

/** Models exported from backend */
2021-05-20 21:14:32 +00:00
declare namespace FG {
interface Notification {
id: number;
plugin: string;
text: string;
data?: any;
2021-05-20 21:14:32 +00:00
time: Date;
}
interface User {
userid: string;
deleted: boolean;
2021-05-20 21:14:32 +00:00
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>;
}
}