chore: add some routes and descriptions

Signed-off-by: IAmTomahawkx <iamtomahawkx@gmail.com>
This commit is contained in:
IAmTomahawkx
2026-06-28 19:38:16 -07:00
parent db6cd1a014
commit 7cebf6e35b
19 changed files with 67 additions and 3 deletions

View File

@@ -0,0 +1,2 @@
// this one is sort of just an idea. hold off on it for now.
// Allow the mod to add an action to a case (same as the audit log actions), in case it got missed by the automated system.

View File

@@ -0,0 +1,4 @@
// add a collaborator (this concept does not replace case ownership,
// but will allow it to show up in both the owner and any collaborators personalized open case list)
// users without sensitive permissions may only be added as collaborators to sensitive cases by administrators/moderation leads
// users who do not have administrator/moderation lead perms may only add a collaborator to a case they own or are also a collaborator on.

View File

@@ -0,0 +1,5 @@
// assign reports or other cases to the specified case by ULID
// this should take an array of {type: report | case, id: ULID}
// recursion of cases should be allowed
// reports are allowed to be assigned to multiple cases
// if a report comes from a queue that is marked as sensitive, this case should also be marked sensitive.

View File

@@ -0,0 +1,3 @@
// Assign a new owner to a case.
// Only administrators/moderation leads should be allowed to assign a case that does not belong to them.
// only administrators/moderation leads may assign someone a sensitive case if the assignee does not have sensitive permissions.

View File

@@ -0,0 +1,3 @@
// see add_collaborator
// The same rules apply, but collaborators may not remove other collaborators unless they are an admin/moderation lead.
// Owners may assign whoever (observing sensitive case rules).

View File

@@ -0,0 +1,2 @@
// mark a case as sensitive or not.
// cases with reports that contain

View File

@@ -1 +1 @@
// Should return the case model, but not all the models associated with evidence linked to the case.

View File

@@ -0,0 +1,16 @@
// This should return all cases (paginated similar to case_get_open) with the following filters:
// ```js
// {
// state: OPEN | CLOSED,
// owner: ULID,
// collaborator: ULID, // cases this user collaborated on
// before: Timestamp,
// after: Timestamp,
// tags: [tags],
// sensitive: bool // cases that involve children (eg cp, underage, etc),
// ... whatever else you can think of.
// }
// ```
// specifying owners/collaborators should be limited to admins/moderation leads
// the sensitive tag should be limited to some sort of "sensitive topics" permission
// users without the sensitive permission should still have sensitive cases returned, but the evidence ids should be removed.

View File

@@ -0,0 +1,2 @@
// get data associated with the evidence of a case (other case|server|user/members|etc)
// This should return nested case models, but not sub-nested models as that could lead to recursion problems.

View File

@@ -0,0 +1,6 @@
// get open cases. This should be paginated, and the pagination offset is determined by the last received case ID from the previous request.
// Eg. GET /cases?after=OTHER_CASE_ULID&count=50
// It should also have a flag to filter by only the users cases & collaborated cases
// EG. GET /cases?owned=true&collaborated=true
// There should also be a flag to disallow sensitive cases, which should default to allowed if not specified.
// users without the sensitive permission should still have sensitive cases returned, but the evidence ids should be removed unless they are the owner/collaborator (assignable by admins/moderation leads)

View File

@@ -1,2 +1,4 @@
mod case_get;
mod case_get_all_open;
mod case_get_all;
mod case_get_evidence_models;
mod case_get_open;

View File

@@ -1 +1,2 @@
mod reports_unassigned;
mod reports_search;
mod reports_unhandled;

View File

@@ -0,0 +1,11 @@
// reports that the user is able to view.
// This route should be paginaged , and the pagination offset is determined by the last received case ID from the previous request.
// Eg. GET /reports?after=OTHER_REPORT_ULID&count=50
// There should be a way to specify whether oldest or newest reports are returned first
// Eg. GET /reports?first=new | GET /reports?first=old
// You should be able to filter by sensitive cases, with the default being combined (sensitive reports and not are both returned) (when permitted by the users permissions, otherwise false)
// Eg. GET /reports?sensitive=only | GET /reports?sensitive=none | GET /reports?sensitive=combined
// You should be able to specify the reporter.
// You should be able to specify the reported type (eg server, user)
// You should be able to specify the reported ID (must be used with the reported type)
// You should be able to specify a time frame (before & after timestamps, not necessarily both required).

View File

@@ -0,0 +1,7 @@
// unhandled reports that the user is able to view.
// This route should be paginaged , and the pagination offset is determined by the last received case ID from the previous request.
// Eg. GET /reports?after=OTHER_REPORT_ULID&count=50
// There should be a way to specify whether oldest or newest reports are returned first
// Eg. GET /reports?first=new | GET /reports?first=old
// You should be able to filter by sensitive cases, with the default being combined (sensitive reports and not are both returned) (when permitted by the users permissions, otherwise false)
// Eg. GET /reports?sensitive=only | GET /reports?sensitive=none | GET /reports?sensitive=combined