flaschengeist-frontend/src/flaschengeist.d.ts

52 lines
841 B
TypeScript
Raw Normal View History

2020-10-21 15:39:04 +00:00
declare namespace FG {
interface Event {
id: number;
begin: Date;
end?: Date;
description: string;
kind: EventKind;
slots: Array<EventSlot>;
}
interface EventKind {
id: number;
name: string;
}
interface EventSlot {
id: number;
start: Date;
end?: any;
slots: Array<any>;
}
interface Job {
userid: string;
value: number;
}
type JobKind = string;
interface JobSlot {
id: number;
needed_persons: number;
kind: JobKind;
jobs: Array<Job>;
}
interface User {
userid: string;
display_name: string;
firstname: string;
lastname: string;
mail: string;
roles: Array<Role>;
}
interface Session {
expires: Date;
token: string;
lifetime: number;
browser: string;
platform: string;
}
type Permission = string;
interface Role {
name: string;
permissions: Array<Permission>;
}
}