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