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-03-19 17:33:04 +00:00
|
|
|
permissions?: Array<string>;
|
2021-02-02 21:32:23 +00:00
|
|
|
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;
|
2021-03-19 23:59:44 +00:00
|
|
|
reversal_id?: number;
|
2021-02-02 21:32:23 +00:00
|
|
|
author_id?: string;
|
2021-03-19 23:59:44 +00:00
|
|
|
sender_id?: string;
|
2021-02-02 21:32:23 +00:00
|
|
|
original_id?: number;
|
2021-03-19 23:59:44 +00:00
|
|
|
receiver_id?: string;
|
2021-03-15 18:57:42 +00:00
|
|
|
}
|
2021-03-20 16:11:51 +00:00
|
|
|
interface Event {
|
|
|
|
id: number;
|
|
|
|
start: Date;
|
|
|
|
end?: Date;
|
|
|
|
description?: string;
|
|
|
|
type: EventType | number;
|
|
|
|
jobs: Array<Job>;
|
|
|
|
recurrence_rule?: RecurrenceRule;
|
|
|
|
template_id?: number;
|
|
|
|
}
|
|
|
|
interface EventType {
|
|
|
|
id: number;
|
|
|
|
name: string;
|
|
|
|
}
|
|
|
|
interface Invite {
|
|
|
|
id: number;
|
|
|
|
job_id: number;
|
|
|
|
invitee_id: string;
|
|
|
|
sender_id: string;
|
|
|
|
}
|
|
|
|
interface Job {
|
|
|
|
id: number;
|
|
|
|
start: Date;
|
|
|
|
end?: Date;
|
|
|
|
type: JobType | number;
|
|
|
|
comment?: string;
|
|
|
|
services: Array<Service>;
|
|
|
|
required_services: number;
|
|
|
|
}
|
|
|
|
interface JobType {
|
|
|
|
id: number;
|
|
|
|
name: string;
|
|
|
|
}
|
|
|
|
interface RecurrenceRule {
|
|
|
|
frequency: string;
|
|
|
|
until?: Date;
|
|
|
|
count?: number;
|
|
|
|
interval: number;
|
|
|
|
}
|
|
|
|
interface Service {
|
|
|
|
userid: string;
|
|
|
|
value: number;
|
|
|
|
}
|
2021-03-19 17:33:04 +00:00
|
|
|
interface Drink {
|
|
|
|
id: number;
|
|
|
|
article_id?: string;
|
|
|
|
package_size?: number;
|
|
|
|
name: string;
|
|
|
|
volume?: number;
|
|
|
|
cost_price_pro_volume?: number;
|
|
|
|
cost_price_package_netto?: number;
|
|
|
|
tags?: Array<Tag>;
|
|
|
|
type?: DrinkType;
|
|
|
|
volumes: Array<DrinkPriceVolume>;
|
|
|
|
}
|
|
|
|
interface DrinkIngredient {
|
|
|
|
id: number;
|
|
|
|
volume: number;
|
|
|
|
drink_ingredient_id: number;
|
|
|
|
}
|
|
|
|
interface DrinkPrice {
|
|
|
|
id: number;
|
|
|
|
price: number;
|
|
|
|
public: boolean;
|
|
|
|
description?: string;
|
|
|
|
}
|
|
|
|
interface DrinkPriceVolume {
|
|
|
|
id: number;
|
|
|
|
volume: number;
|
|
|
|
min_prices: Array<MinPrices>;
|
|
|
|
prices: Array<DrinkPrice>;
|
|
|
|
ingredients: Array<Ingredient>;
|
|
|
|
}
|
|
|
|
interface DrinkType {
|
|
|
|
id: number;
|
|
|
|
name: string;
|
|
|
|
}
|
|
|
|
interface ExtraIngredient {
|
|
|
|
id: number;
|
|
|
|
name: string;
|
|
|
|
price: number;
|
|
|
|
}
|
|
|
|
interface Ingredient {
|
|
|
|
id: number;
|
|
|
|
drink_ingredient?: DrinkIngredient;
|
|
|
|
extra_ingredient?: ExtraIngredient;
|
|
|
|
}
|
|
|
|
interface MinPrices {
|
|
|
|
percentage: number;
|
|
|
|
price: number;
|
|
|
|
}
|
|
|
|
interface Tag {
|
|
|
|
id: number;
|
|
|
|
name: string;
|
|
|
|
}
|
2020-10-18 23:45:06 +00:00
|
|
|
}
|