feat(frontend): add blog editor and interactions
This commit is contained in:
@@ -47,6 +47,9 @@ export interface UserProfileSchema {
|
||||
is_committee?: boolean;
|
||||
is_deleted?: boolean;
|
||||
deleted_at?: string | null;
|
||||
can_access_blog_admin?: boolean;
|
||||
can_write_blog_posts?: boolean;
|
||||
can_review_blog_posts?: boolean;
|
||||
}
|
||||
|
||||
export interface UserListSchema {
|
||||
@@ -246,24 +249,70 @@ export interface PostListSchema {
|
||||
created_at: string;
|
||||
is_featured: boolean;
|
||||
reading_time?: number;
|
||||
updated_at: string;
|
||||
seo_title?: string;
|
||||
seo_description?: string;
|
||||
canonical_url?: string;
|
||||
og_title?: string;
|
||||
og_description?: string;
|
||||
noindex?: boolean;
|
||||
focus_keyword?: string;
|
||||
likes_count?: number;
|
||||
saves_count?: number;
|
||||
comments_count?: number;
|
||||
}
|
||||
|
||||
export interface PostDetailSchema extends PostListSchema {
|
||||
content: string;
|
||||
content_html?: string;
|
||||
updated_at: string;
|
||||
og_image_url?: string | null;
|
||||
views_count?: number;
|
||||
assets?: PostAssetSchema[];
|
||||
}
|
||||
|
||||
export interface PostCreateSchema {
|
||||
title: string;
|
||||
content: string;
|
||||
summary: string;
|
||||
category_id?: number;
|
||||
excerpt?: string;
|
||||
category_id?: number | null;
|
||||
tag_ids?: number[];
|
||||
featured_image?: string;
|
||||
is_featured?: boolean;
|
||||
status?: 'draft' | 'published';
|
||||
status?: 'draft' | 'submitted' | 'changes_requested' | 'published' | 'archived';
|
||||
seo_title?: string;
|
||||
seo_description?: string;
|
||||
canonical_url?: string;
|
||||
og_title?: string;
|
||||
og_description?: string;
|
||||
noindex?: boolean;
|
||||
focus_keyword?: string;
|
||||
}
|
||||
|
||||
export interface PostReviewSchema {
|
||||
action: 'publish' | 'approve' | 'request_changes' | 'changes_requested' | 'archive';
|
||||
note?: string;
|
||||
}
|
||||
|
||||
export interface PostAssetSchema {
|
||||
id: number;
|
||||
file_type: 'image' | 'video' | 'document' | 'archive' | 'other';
|
||||
title: string;
|
||||
alt_text?: string;
|
||||
caption?: string;
|
||||
size: number;
|
||||
mime_type?: string;
|
||||
created_at: string;
|
||||
absolute_file_url?: string | null;
|
||||
absolute_thumbnail_url?: string | null;
|
||||
absolute_preview_url?: string | null;
|
||||
absolute_blur_url?: string | null;
|
||||
markdown_image?: string | null;
|
||||
markdown_link?: string | null;
|
||||
uploaded_by: {
|
||||
id: number;
|
||||
username: string;
|
||||
first_name: string;
|
||||
last_name: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface CommentSchema {
|
||||
@@ -281,6 +330,8 @@ export interface CommentSchema {
|
||||
parent_id?: number;
|
||||
created_at: string;
|
||||
is_approved: boolean;
|
||||
hidden_at?: string | null;
|
||||
replies?: CommentSchema[];
|
||||
}
|
||||
|
||||
export interface CommentCreateSchema {
|
||||
@@ -288,6 +339,21 @@ export interface CommentCreateSchema {
|
||||
parent_id?: number;
|
||||
}
|
||||
|
||||
export interface BlogInteractionSchema {
|
||||
liked: boolean;
|
||||
saved: boolean;
|
||||
likes_count: number;
|
||||
saves_count: number;
|
||||
comments_count: number;
|
||||
}
|
||||
|
||||
export interface BlogProfileActivitySchema {
|
||||
liked_posts: PostListSchema[];
|
||||
saved_posts: PostListSchema[];
|
||||
comments: CommentSchema[];
|
||||
replies: CommentSchema[];
|
||||
}
|
||||
|
||||
export interface CategorySchema {
|
||||
id: number;
|
||||
name: string;
|
||||
|
||||
Reference in New Issue
Block a user