diff options
author | crupest <crupest@outlook.com> | 2022-04-12 15:18:47 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-04-12 15:18:47 +0800 |
commit | 175223fc3be512db4a939584c989d7e5d7b6832e (patch) | |
tree | 0b07536ba2815bd43da0f14d055dce1a4d8fcedd /FrontEnd/src/http/timeline.ts | |
parent | ca1df3734b825cd0ee5bb1964a544371fb49e7a5 (diff) | |
download | timeline-175223fc3be512db4a939584c989d7e5d7b6832e.tar.gz timeline-175223fc3be512db4a939584c989d7e5d7b6832e.tar.bz2 timeline-175223fc3be512db4a939584c989d7e5d7b6832e.zip |
...
Diffstat (limited to 'FrontEnd/src/http/timeline.ts')
-rw-r--r-- | FrontEnd/src/http/timeline.ts | 24 |
1 files changed, 21 insertions, 3 deletions
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<Page<HttpTimelinePostInfo>>; + ): Promise<Page<HttpTimelineGenericPostInfo>>; generatePostDataUrl( ownerUsername: string, timelineName: string, @@ -218,9 +236,9 @@ export class HttpTimelineClient implements IHttpTimelineClient { listPost( ownerUsername: string, timelineName: string - ): Promise<Page<HttpTimelinePostInfo>> { + ): Promise<Page<HttpTimelineGenericPostInfo>> { return axios - .get<Page<HttpTimelinePostInfo>>( + .get<Page<HttpTimelineGenericPostInfo>>( `${apiBaseUrl}/v2/timelines/${ownerUsername}/${timelineName}/posts` ) .then(extractResponseData); |