Added current declaration file

This commit is contained in:
Ferdinand Thiessen 2020-11-02 04:42:19 +01:00
parent 5d1409b735
commit 7b710f0bf4
1 changed files with 40 additions and 35 deletions

View File

@ -1,32 +1,10 @@
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 Session {
expires: Date;
token: string;
lifetime: number;
browser: string;
platform: string;
}
interface User {
userid: string;
@ -36,16 +14,43 @@ declare namespace FG {
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>;
}
interface Transaction {
id: number;
time: Date;
amount: number;
sender_id: string;
receiver_id: string;
author_id: string;
}
interface Event {
id: number;
begin: Date;
end: Date;
description: string;
type: EventType;
slots: Array<EventSlot>;
}
interface EventSlot {
id: number;
start: Date;
end?: any;
jobs: Array<JobSlot>;
}
type EventType = string;
interface Job {
userid: string;
value: number;
}
interface JobSlot {
id: number;
type: JobType;
users: Array<Job>;
required_jobs: number;
}
type JobType = string;
}