package com.suno.android.common_data.repos.comments import com.suno.android.common_core_utils.Id import com.suno.android.common_data.comments.Comment import com.suno.android.common_data.comments.CommentRepliesResponse import com.suno.android.common_data.comments.CommentType import com.suno.android.common_data.comments.CommentsResponse import com.suno.android.common_data.comments.MediaEntity import com.suno.android.common_data.mentions.UserMention import com.suno.android.common_networking.extensions.ApiResult import com.suno.android.common_networking.remote.entities.CommentDeletionSchema import com.suno.android.common_networking.remote.entities.CommentReactionSchema /** * Repository for managing comments on all content entities. */ interface CommentsRepository { /** * Retrieves paginated comments for an entity. */ suspend fun getComments( mediaEntity: MediaEntity, cursor: String? = null, order: String? = null, ): ApiResult /** * Retrieves paginated replies for a specific comment. */ suspend fun getCommentReplies( commentId: Id, commentType: CommentType, cursor: String? = null, ): ApiResult /** * Posts a new comment or reply to an entity. * Returns the created comment with server-generated metadata. */ suspend fun postComment( mediaEntity: MediaEntity, content: String, parentId: Id? = null, mentions: List? = null, trackTimestamp: Double? = null, ): ApiResult /** * Adds or removes a reaction (like/unlike) on a comment. * Returns updated reaction counts and user's current reaction state. */ suspend fun reactToComment( commentId: Id, commentType: CommentType, reaction: String, ): ApiResult /** * Reports a comment for moderation review. */ suspend fun reportComment( commentId: Id, commentType: CommentType, reason: String, ): ApiResult /** * Permanently deletes a comment. * Only the comment author or authorized users can delete comments. */ suspend fun deleteComment( commentId: Id, commentType: CommentType, ): ApiResult }