@replyke/core
Version:
Replyke: Build interactive apps with social features like comments, votes, feeds, user lists, notifications, and more.
33 lines (32 loc) • 977 B
TypeScript
export interface HandleSpaceEntityReportParams {
spaceId: string;
reportId: string;
entityId: string;
actions: Array<"remove-entity" | "ban-user" | "dismiss">;
summary: string;
userId?: string;
reason?: string;
}
export interface HandleReportResponse {
message: string;
code: string;
}
/**
* Hook to handle entity reports at the space level
* Space moderators can: remove entity, ban user from space, dismiss
*
* @example
* const handleSpaceEntityReport = useHandleSpaceEntityReport();
*
* await handleSpaceEntityReport({
* spaceId: "space-uuid",
* reportId: "report-uuid",
* entityId: "entity-uuid",
* actions: ["remove-entity", "ban-user"],
* summary: "Removed spam content and banned user",
* userId: "user-uuid",
* reason: "Spamming"
* });
*/
declare function useHandleSpaceEntityReport(): (params: HandleSpaceEntityReportParams) => Promise<HandleReportResponse>;
export default useHandleSpaceEntityReport;