2020-10-21 15:39:04 +00:00
|
|
|
declare namespace FG {
|
2020-11-04 22:53:10 +00:00
|
|
|
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-16 01:28:03 +00:00
|
|
|
avatar_url?: string;
|
2020-11-15 18:47:05 +00:00
|
|
|
birthday?: Date;
|
2020-11-06 00:12:03 +00:00
|
|
|
roles: Array<string>;
|
2020-11-04 22:53:10 +00:00
|
|
|
}
|
|
|
|
type Permission = string;
|
|
|
|
interface Role {
|
2020-11-09 02:39:31 +00:00
|
|
|
id: number;
|
2020-11-04 22:53:10 +00:00
|
|
|
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;
|
2020-11-04 22:53:10 +00:00
|
|
|
}
|
|
|
|
interface Event {
|
|
|
|
id: number;
|
|
|
|
start: Date;
|
2020-11-11 22:53:44 +00:00
|
|
|
description?: string;
|
2020-11-04 22:53:10 +00:00
|
|
|
type: EventType;
|
|
|
|
slots: Array<EventSlot>;
|
|
|
|
}
|
|
|
|
interface EventSlot {
|
|
|
|
id: number;
|
|
|
|
start: Date;
|
2020-11-11 22:53:44 +00:00
|
|
|
end?: Date;
|
2020-11-04 22:53:10 +00:00
|
|
|
jobs: Array<JobSlot>;
|
|
|
|
}
|
|
|
|
type EventType = string;
|
|
|
|
interface Job {
|
|
|
|
userid: string;
|
|
|
|
value: number;
|
|
|
|
}
|
|
|
|
interface JobSlot {
|
|
|
|
type: JobType;
|
|
|
|
users: Array<Job>;
|
|
|
|
required_jobs: number;
|
|
|
|
}
|
|
|
|
interface JobType {
|
|
|
|
id: number;
|
|
|
|
name: string;
|
|
|
|
}
|
2020-10-18 23:45:06 +00:00
|
|
|
}
|