@replyke/core
Version:
Replyke: Build interactive apps with social features like comments, votes, feeds, user lists, notifications, and more.
31 lines (30 loc) • 921 B
TypeScript
export interface HandleSpaceCommentReportParams {
spaceId: string;
reportId: string;
commentId: string;
actions: Array<"remove-comment" | "ban-user" | "dismiss">;
summary: string;
userId?: string;
reason?: string;
}
export interface HandleReportResponse {
message: string;
code: string;
}
/**
* Hook to handle comment reports at the space level
* Space moderators can: remove comment, ban user from space, dismiss
*
* @example
* const handleSpaceCommentReport = useHandleSpaceCommentReport();
*
* await handleSpaceCommentReport({
* spaceId: "space-uuid",
* reportId: "report-uuid",
* commentId: "comment-uuid",
* actions: ["remove-comment"],
* summary: "Removed inappropriate comment"
* });
*/
declare function useHandleSpaceCommentReport(): (params: HandleSpaceCommentReportParams) => Promise<HandleReportResponse>;
export default useHandleSpaceCommentReport;