new post type

This commit is contained in:
an-lee
2024-01-12 15:47:33 +08:00
parent e05f2c57eb
commit 3dff4330a1
10 changed files with 211 additions and 102 deletions

View File

@@ -1,9 +1,17 @@
type PostType = {
id: string;
content?: string;
metadata: {
type: 'text' | 'prompt' | 'llm_configuration';
content:
| string
| {
[key: string]: any;
};
};
user: UserType;
targetType: string;
target?: MediumType;
createdAt: string;
updatedAt: string;
}
targetType?: string;
targetId?: string;
target?: MediumType | StoryType;
createdAt: Date;
updatedAt: Date;
};

24
enjoy/src/types/story.d.ts vendored Normal file
View File

@@ -0,0 +1,24 @@
type StoryType = {
id: string;
url: string;
title: string;
content: string;
metadata: {
[key: string]: string;
};
vocabulary?: string[];
extracted?: boolean;
starred?: boolean;
createdAt: Date;
updatedAt: Date;
};
type CreateStoryParamsType = {
title: string;
content: string;
url: string;
html: string;
metadata: {
[key: string]: string;
};
};