Skip to content

Commit 64bbd21

Browse files
Merge pull request #53 from sparcs-kaist/feat/PostWrite
Migrate Type (Post)
2 parents de560e7 + 9ae995a commit 64bbd21

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

src/lib/types/post.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/* eslint-disable camelcase */
2+
type WhyHidden = 'ADULT_CONTENT' | 'SOCIAL_CONTENT' | 'REPORTED_CONTENT' | 'BLOCKED_USER_CONTENT'
3+
type Attachment = 'NONE' | 'IMAGE' | 'NON_IMAGE' | 'BOTH'
4+
5+
export type Post = {
6+
attachment_type: Attachment,
7+
can_override_hidden: boolean,
8+
comment_count: number,
9+
commented_at: string,
10+
communication_article_status: 0 | 1 | 2,
11+
content_updated_at: string,
12+
created_at: string,
13+
created_by: {
14+
id: string,
15+
profile: {
16+
nickname: string,
17+
picture: string,
18+
user: string
19+
},
20+
username: string
21+
},
22+
days_left: number,
23+
deleted_at: string,
24+
hidden_at: string,
25+
hit_count: number,
26+
id: number,
27+
name_type: number,
28+
is_content_sexual: boolean,
29+
is_content_social: boolean,
30+
is_hidden: boolean,
31+
negative_vote_count: number
32+
parent_board: any,
33+
parent_topic: any,
34+
positive_vote_count: number,
35+
read_status: string,
36+
report_count: number,
37+
title: string,
38+
updated_at: string,
39+
url: string,
40+
why_hidden: WhyHidden[]
41+
}

0 commit comments

Comments
 (0)