2020-10-21 15:39:04 +00:00
|
|
|
declare namespace FG {
|
2021-03-15 18:57:42 +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;
|
2021-02-02 21:32:23 +00:00
|
|
|
birthday?: Date;
|
2021-03-15 18:57:42 +00:00
|
|
|
roles: Array<string>;
|
2021-02-02 21:32:23 +00:00
|
|
|
permissions?: Array<Permission>;
|
|
|
|
avatar_url?: string;
|
2021-03-15 18:57:42 +00:00
|
|
|
}
|
|
|
|
type Permission = string;
|
|
|
|
interface Role {
|
|
|
|
id: number;
|
|
|
|
name: string;
|
|
|
|
permissions: Array<Permission>;
|
|
|
|
}
|
|
|
|
interface Transaction {
|
|
|
|
id: number;
|
|
|
|
time: Date;
|
|
|
|
amount: number;
|
|
|
|
reversal_id: number;
|
2021-02-02 21:32:23 +00:00
|
|
|
sender_id?: string;
|
|
|
|
receiver_id?: string;
|
|
|
|
author_id?: string;
|
|
|
|
original_id?: number;
|
2021-03-15 18:57:42 +00:00
|
|
|
}
|
|
|
|
interface Event {
|
|
|
|
id: number;
|
|
|
|
start: Date;
|
|
|
|
end: Date;
|
2021-02-02 21:32:23 +00:00
|
|
|
description?: string;
|
2021-03-15 18:57:42 +00:00
|
|
|
type: EventType;
|
|
|
|
jobs: Array<Job>;
|
|
|
|
}
|
|
|
|
interface EventType {
|
|
|
|
id: number;
|
|
|
|
name: string;
|
|
|
|
}
|
|
|
|
interface Job {
|
|
|
|
id: number;
|
|
|
|
start: Date;
|
2021-02-02 21:32:23 +00:00
|
|
|
end?: Date;
|
2021-03-15 18:57:42 +00:00
|
|
|
comment: string;
|
|
|
|
type: JobType;
|
|
|
|
services: Array<Service>;
|
|
|
|
required_services: number;
|
|
|
|
}
|
|
|
|
interface JobType {
|
|
|
|
id: number;
|
|
|
|
name: string;
|
|
|
|
}
|
|
|
|
interface Service {
|
|
|
|
userid: string;
|
|
|
|
value: number;
|
|
|
|
}
|
2021-03-14 14:12:41 +00:00
|
|
|
interface Drink {
|
|
|
|
id: number;
|
|
|
|
name: string;
|
|
|
|
volume: number;
|
|
|
|
cost_price: number;
|
|
|
|
discount: number;
|
|
|
|
extra_charge?: any;
|
|
|
|
prices: Array<DrinkPrice>;
|
|
|
|
ingredients: Array<Ingredient>;
|
|
|
|
}
|
|
|
|
interface DrinkPrice {
|
|
|
|
id: number;
|
|
|
|
volume: number;
|
|
|
|
price: number;
|
|
|
|
description?: any;
|
|
|
|
round_step: number;
|
|
|
|
}
|
|
|
|
interface DrinkType {
|
|
|
|
id: number;
|
|
|
|
name: string;
|
|
|
|
}
|
|
|
|
interface Ingredient {
|
|
|
|
id: number;
|
|
|
|
volume: number;
|
|
|
|
parent_id: number;
|
|
|
|
ingredient_id: number;
|
|
|
|
}
|
|
|
|
interface Tag {
|
|
|
|
id: number;
|
|
|
|
name: string;
|
|
|
|
}
|
2020-10-18 23:45:06 +00:00
|
|
|
}
|