From 175223fc3be512db4a939584c989d7e5d7b6832e Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 12 Apr 2022 15:18:47 +0800 Subject: ... --- FrontEnd/src/http/timeline.ts | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'FrontEnd/src/http') diff --git a/FrontEnd/src/http/timeline.ts b/FrontEnd/src/http/timeline.ts index 65717a83..0e1ceb81 100644 --- a/FrontEnd/src/http/timeline.ts +++ b/FrontEnd/src/http/timeline.ts @@ -50,6 +50,7 @@ export interface HttpTimelinePostDataDigest { export interface HttpTimelinePostInfo { id: number; + deleted: false; time: string; author: HttpUser; dataList: HttpTimelinePostDataDigest[]; @@ -60,6 +61,23 @@ export interface HttpTimelinePostInfo { editable: boolean; } +export interface HttpTimelineDeletedPostInfo { + id: number; + deleted: true; + time: string; + author?: HttpUser; + dataList: HttpTimelinePostDataDigest[]; + color?: string; + lastUpdated: string; + timelineOwnerV2: string; + timelineNameV2: string; + editable: boolean; +} + +export type HttpTimelineGenericPostInfo = + | HttpTimelinePostInfo + | HttpTimelineDeletedPostInfo; + export interface HttpTimelinePostPostRequestData { contentType: string; data: string; @@ -116,7 +134,7 @@ export interface IHttpTimelineClient { listPost( ownerUsername: string, timelineName: string - ): Promise>; + ): Promise>; generatePostDataUrl( ownerUsername: string, timelineName: string, @@ -218,9 +236,9 @@ export class HttpTimelineClient implements IHttpTimelineClient { listPost( ownerUsername: string, timelineName: string - ): Promise> { + ): Promise> { return axios - .get>( + .get>( `${apiBaseUrl}/v2/timelines/${ownerUsername}/${timelineName}/posts` ) .then(extractResponseData); -- cgit v1.2.3