flaschengeist-types/types/flaschengeist.d.ts

35 lines
649 B
TypeScript

declare namespace FG {
interface Notification {
id: number;
plugin: string;
text: string;
data?: any;
time: Date;
}
interface User {
userid: string;
display_name: string;
firstname: string;
lastname: string;
mail: string;
birthday?: Date;
roles: Array<string>;
permissions?: Array<string>;
avatar_url?: 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>;
}
}