flaschengeist-frontend/src/flaschengeist.d.ts

64 lines
1.1 KiB
TypeScript
Raw Normal View History

2020-10-21 15:39:04 +00:00
declare namespace FG {
interface Session {
expires: Date;
token: string;
lifetime: number;
browser: string;
platform: string;
userid: string;
}
interface User {
userid: string;
display_name: string;
firstname: string;
lastname: string;
mail: string;
2020-11-15 18:47:05 +00:00
birthday?: Date;
2020-11-06 00:12:03 +00:00
roles: Array<string>;
2020-11-18 01:49:19 +00:00
avatar_url?: string;
}
type Permission = string;
interface Role {
id: number;
name: string;
permissions: Array<Permission>;
}
interface Transaction {
id: number;
time: Date;
amount: number;
2020-11-16 01:28:03 +00:00
reversal?: this;
sender_id?: string;
receiver_id?: string;
author_id?: string;
}
interface Event {
id: number;
start: Date;
description?: string;
type: EventType;
2020-11-18 01:49:19 +00:00
jobs: Array<Job>;
}
interface EventType {
id: number;
name: string;
}
2020-11-18 01:49:19 +00:00
interface Job {
id: number;
start: Date;
end?: Date;
2020-11-18 01:49:19 +00:00
comment: string;
type: JobType;
2020-11-18 01:49:19 +00:00
services: Array<Service>;
required_services: number;
}
interface JobType {
id: number;
name: string;
}
2020-11-18 01:49:19 +00:00
interface Service {
userid: string;
value: number;
}
}