Newer
Older
taehui / taehui-fe / src / wwwAPI.d.ts
@Taehui Taehui on 6 Nov 2 KB 2023-11-06 오후 10:13
export type GetCommentaryAPI = CommentaryAPICommentary[];

export type CommentaryAPICommentary = {
  commentaryID: number;
  avatarName: string;
  text: string;
  date: string;
};

export type GetEssayAPI = {
  forumTitle: string;
  title: string;
  text: string;
  date: string;
  avatarID: string;
  avatarName: string;
  hitCount: number;
  date: string;
  essayBefore: EssayAPIEssay;
  essayLater: EssayAPIEssay;
};

export type EssayAPIEssay = {
  essayID: number;
  avatarID: string;
  avatarName: string;
  date: string;
  title: string;
  commentCount: number;
  hitCount: number;
  essayBefore?: Essay;
  essayLater?: Essay;
};

export type GetCommentAPI = CommentAPIComment[];

export type CommentAPIComment = {
  commentID: number;
  date: string;
  avatarID: string;
  avatarName: string;
  text: string;
  comments: CommentAPIComment[];
};

export type GetForumAPI = {
  title: string;
  text: string;
  essays: EssayAPIEssay[];
  essayCount: number;
  level: number;
};

export type GetAutoEssayAPI = AutoEssayAPIAutoEssay[];

export type AutoEssayAPIAutoEssay = {
  autoEssayID: number;
  date: string;
  title: string;
  text: string;
};

export type GetForumsAPI = {
  forumID: string;
  title: string;
  essays: EssayAPIEssay[];
}[];

export type GetLatestAvatarAPI = {
  avatarID: string;
  avatarName: string;
  date: string;
}[];

export type GetLatestCommentAPI = LatestCommentAPIComment[];

export type LatestCommentAPIComment = {
  commentID: number;
  date: string;
  avatarID: string;
  avatarName: string;
  text: string;
  forumID: string;
  essayID: number;
};

export type GetLatestEssayAPI = {
  essayID: number;
  avatarID: string;
  avatarName: string;
  date: string;
  title: string;
  commentCount: number;
  hitCount: number;
  forumTitle?: string;
  forumID?: string;
}[];

export type GetWantAPI = (GetWantAPIEssay | GetWantAPIComment)[];

export type GetWantAPIEssay = {
  essayID: number;
  avatarID: string;
  avatarName: string;
  date: string;
  title: string;
  commentCount: number;
  hitCount: number;
  forumTitle?: string;
  forumID?: string;
};

export type GetWantAPIComment = {
  commentID: number;
  date: string;
  avatarID: string;
  avatarName: string;
  text: string;
  forumID: string;
  essayID: number;
};