flaschengeist-pricelist/src/api.d.ts

62 lines
1.2 KiB
TypeScript
Raw Normal View History

2021-05-26 19:29:08 +00:00
declare namespace FG {
interface Drink {
id: number;
article_id?: string;
package_size?: number;
name: string;
volume?: number;
cost_per_volume?: number;
cost_per_package?: number;
2021-11-15 15:35:54 +00:00
has_image: boolean;
2021-05-26 19:29:08 +00:00
receipt?: Array<string>;
tags?: Array<Tag>;
type?: DrinkType;
volumes: Array<DrinkPriceVolume>;
}
interface DrinkIngredient {
id: number;
volume: number;
ingredient_id: number;
cost_per_volume: number;
name: string;
2021-05-26 19:29:08 +00:00
}
interface DrinkPrice {
id: number;
price: number;
volume: Array<DrinkPriceVolume>;
2021-05-26 19:29:08 +00:00
public: boolean;
description?: string;
}
interface DrinkPriceVolume {
id: number;
drink: Array<Drink>;
2021-05-26 19:29:08 +00:00
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;
color: string;
}
}