Skip to main content

Overview

Returns a function to fetch content reports (entities and comments) from spaces where the current user has an admin or moderator role. If spaceId is provided, returns reports for that specific space (the user must moderate it). If omitted, returns reports aggregated from all spaces the user moderates.
Requires an authenticated user with admin or moderator role in at least one space.

Usage Example

Parameters

string
Filter reports to a specific space. If omitted, returns reports from all spaces the user moderates.
"comment" | "entity"
Filter by target type.
"pending" | "on-hold" | "escalated" | "dismissed" | "actioned"
Filter by report status.
"new" | "old"
Sort order. Defaults to "new" (newest first).
number
Page number for pagination. Defaults to 1.
number
Items per page. Defaults to 20.

Returns

Returns Promise<PaginatedResponse<Report>>:

Report object

string
UUID of the report record.
string
Project the report belongs to.
string | null
Space the reported content belongs to.
string
ID of the reported entity or comment.
"comment" | "entity"
Type of the reported content.
number
Total number of users who have reported this target.
array
Individual user report entries. Each includes id, userId, reason, details, and createdAt.
string
Current moderation status: pending, on-hold, escalated, dismissed, or actioned.
string | null
Free-text description of action taken, if any.
Entity | Comment | null
The reported content record (includes the author user object). Populated even if the content was soft-deleted.
Space | null
The space the reported content belongs to.
Date
When the first report for this target was submitted.
Date
When the report record was last updated.
Date | null
Soft-delete timestamp. null if the report has not been deleted.