import { QueryParams } from '../types/fetchResponse.type'; import { JSONContent } from '../types/timeline.type'; export interface CommentData { _id: string; replyToId: string; type: CommentType; objectId: string; sender: Sender; reactions: Reaction[]; replies: CommentData[]; content: JSONContent; createdAt: string; editedAt?: string | null; } export interface PostCommentsBody { objectId: string; replyToId?: string; mentions?: string[]; type: CommentType; content: JSONContent | object; } export interface PostCommentsReactionBody { emoji: string; } export interface PostCommentsUploadBody { images: File[]; } export interface GetCommentsResponse { status: number; message: string; data: T[]; } export interface CommentsQueryParams extends QueryParams { search: string; } export type CommentType = 'ticket' | 'task' | 'module' | 'sub-module' | 'pbi'; export interface Reaction { count: number; emoji: string; users: User[]; } export interface User { _id: string; name: string; profilePicture: string; } export interface PostCommentsUploadResponse { status: number; message: string; data: string[]; } export interface PutCommentsByIdBody { content: JSONContent; } export interface Sender { _id: string; name: string; profilePicture: string; } export interface NewCommentResponse extends CommentData { replyToId: string; } export interface UpdatedCommentReponse { _id: string; content: JSONContent; } export interface PostCommentsReactionsByCommentIdBody { emoji: string; } export interface CommentsMentionQueryParams extends QueryParams { objectID: string; type: CommentType; search?: string; } export interface CommentsReactionResponse { _id: string; reactions: Reaction[]; } export type GetMentionSuggestionResponse = { status: number; message: string; data: MentionSuggestion[]; }; export type MentionSuggestion = { _id: string; fullName: string; nickName: string; profilePicture: string; };