1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-24 07:39:41 +02:00

feat: recipe timeline backend api (#1685)

* added recipe_timeline_events table to db

* added schema and routes for recipe timeline events

* added missing mixin and fixed update schema

* added tests

* adjusted migration revision tree

* updated alembic revision test

* added initial timeline event for new recipes

* added additional tests

* added event bus support

* renamed event_dt to timestamp

* add timeline_events to ignore list

* run code-gen

* use new test routes implementation

* use doc string syntax

* moved event type enum from db to schema

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
This commit is contained in:
Michael Genson 2022-11-01 03:12:26 -05:00 committed by GitHub
parent 714a080ecb
commit 6ee64535df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 639 additions and 6 deletions

View file

@ -8,6 +8,7 @@
export type ExportTypes = "json";
export type RegisteredParser = "nlp" | "brute";
export type OrderDirection = "asc" | "desc";
export type TimelineEventType = "system" | "info" | "comment";
export interface AssignCategories {
recipes: string[];
@ -340,6 +341,40 @@ export interface RecipeTagResponse {
slug: string;
recipes?: RecipeSummary[];
}
export interface RecipeTimelineEventCreate {
userId: string;
subject: string;
eventType: TimelineEventType;
message?: string;
image?: string;
timestamp?: string;
recipeId: string;
}
export interface RecipeTimelineEventIn {
userId?: string;
subject: string;
eventType: TimelineEventType;
message?: string;
image?: string;
timestamp?: string;
}
export interface RecipeTimelineEventOut {
userId: string;
subject: string;
eventType: TimelineEventType;
message?: string;
image?: string;
timestamp?: string;
recipeId: string;
id: string;
createdAt: string;
updateAt: string;
}
export interface RecipeTimelineEventUpdate {
subject: string;
message?: string;
image?: string;
}
export interface RecipeToolCreate {
name: string;
onHand?: boolean;