Class

InvestigationController

InvestigationController()

Investigation Controller Handles investigation-related HTTP requests

Constructor

# new InvestigationController()

View Source controllers/investigation.controller.js, line 27

Methods

# async static cloneInvestigation(req, res, _next) → {Promise.<void>}

Clone an investigation.

Parameters:
Name Type Description
req ICloneInvestigationRequest

Express request with the investigation identifier to clone.

res Response

Express response used to return the cloned investigation.

_next NextFunction

Express next function (unused).

View Source controllers/investigation.controller.js, line 415

Resolves when the response has been sent.

Promise.<void>

# async static createInvestigation(req, res) → {Promise.<void>}

Create a new investigation.

Parameters:
Name Type Description
req ICreateInvestigationRequest

Express request with investigation payload and user context.

res Response

Express response used to return the created investigation.

View Source controllers/investigation.controller.js, line 34

Resolves when the response has been sent.

Promise.<void>

# async static deleteInvestigation(req, res, _next) → {Promise.<void>}

Delete an investigation and its related chat history.

Parameters:
Name Type Description
req IAuthenticatedRequest

Express request with the investigation identifier to remove.

res Response

Express response used to confirm the deletion result.

_next NextFunction

Express next function (unused).

View Source controllers/investigation.controller.js, line 349

Resolves when the response has been sent.

Promise.<void>

# async static deleteObjectPhoto(req, res, _next) → {Promise.<void>}

Delete a photo for an object in an investigation. Uses composite key (objectId + objectIndex) to uniquely identify objects.

Parameters:
Name Type Description
req IAuthenticatedRequest

Express request with investigation ID, object ID, and object index.

res Response

Express response used to confirm deletion.

_next NextFunction

Express next function (unused).

View Source controllers/investigation.controller.js, line 949

Resolves when the response has been sent.

Promise.<void>

# async static getFieldHistory(req, res, _next) → {Promise.<void>}

Get history for a specific field.

Parameters:
Name Type Description
req IAuthenticatedRequest

Express request containing investigation ID and field path.

res Response

Express response used to return the field history.

_next NextFunction

Express next function (unused).

View Source controllers/investigation.controller.js, line 484

Resolves when the response has been sent.

Promise.<void>

# async static getFilterMetadata(req, res) → {Promise.<void>}

Get filter metadata for investigations list. Returns available filter options with counts for status, curriculum, grade, authors, and editors.

Parameters:
Name Type Description
req IAuthenticatedRequest

Express request.

res Response

Express response used to return the filter metadata.

View Source controllers/investigation.controller.js, line 158

Resolves when the response has been sent.

Promise.<void>

# async static getInvestigation(req, res, _next) → {Promise.<void>}

Get a single investigation by ID.

Parameters:
Name Type Description
req IAuthenticatedRequest

Express request containing the investigation identifier.

res Response

Express response used to return the investigation.

_next NextFunction

Express next function (unused).

View Source controllers/investigation.controller.js, line 192

Resolves when the response has been sent.

Promise.<void>

# static getInvestigationFormat(req, res, _next) → {void}

Get investigation schema format.

Parameters:
Name Type Description
req IAuthenticatedRequest

Express request.

res Response

Express response used to return the schema format.

_next NextFunction

Express next function (unused).

View Source controllers/investigation.controller.js, line 403

void

# async static getInvestigationVersions(req, res, _next) → {Promise.<void>}

Get investigation versions.

Parameters:
Name Type Description
req IAuthenticatedRequest

Express request with the investigation identifier to get versions.

res Response

Express response used to return the investigation versions.

_next NextFunction

Express next function (unused).

View Source controllers/investigation.controller.js, line 526

Resolves when the response has been sent.

Promise.<void>

# async static getInvestigations(req, res) → {Promise.<void>}

Get investigations with pagination, grouped by curriculum.

Parameters:
Name Type Description
req IAuthenticatedRequest

Express request containing validated query parameters.

res Response

Express response used to return the investigations list and pagination metadata.

View Source controllers/investigation.controller.js, line 111

Resolves when the response has been sent.

Promise.<void>

# async static lockInvestigation(req, res) → {Promise.<void>}

Lock an investigation for editing.

Parameters:
Name Type Description
req IAuthenticatedRequest

Express request with investigation ID and user context.

res Response

Express response.

View Source controllers/investigation.controller.js, line 1045

Resolves when the response has been sent.

Promise.<void>

# async static redoInvestigation(req, res, _next) → {Promise.<void>}

Redo an investigation.

Parameters:
Name Type Description
req IAuthenticatedRequest

Express request with the investigation identifier to redo.

res Response

Express response used to return the redone investigation.

_next NextFunction

Express next function (unused).

View Source controllers/investigation.controller.js, line 596

Resolves when the response has been sent.

Promise.<void>

# async static regenerateOtherFields(req, res, _next) → {Promise.<void>}

Regenerate other fields based on a specific field.

Parameters:
Name Type Description
req IAuthenticatedRequest

Express request containing investigation ID and field name.

res Response

Express response used to return the updated investigation.

_next NextFunction

Express next function (unused).

View Source controllers/investigation.controller.js, line 700

Resolves when the response has been sent.

Promise.<void>

# async static resolveContradiction(req, res, _next) → {Promise.<void>}

Resolve contradiction.

Parameters:
Name Type Description
req IAuthenticatedRequest

Express request with the investigation identifier to redo.

res Response

Express response used to return the investigation with resolved contradiction.

_next NextFunction

Express next function (unused).

View Source controllers/investigation.controller.js, line 632

Resolves when the response has been sent.

Promise.<void>

# async static toggleInvestigationDevelopment(req, res, _next) → {Promise.<void>}

Send/return investigation to/from InDevelopment.

Parameters:
Name Type Description
req IAuthenticatedRequest

Express request containing investigation ID and field path.

res Response

Express response used to return the field history.

_next NextFunction

Express next function (unused).

View Source controllers/investigation.controller.js, line 817

Resolves when the response has been sent.

Promise.<void>

# async static undoInvestigation(req, res, _next) → {Promise.<void>}

Undo an investigation.

Parameters:
Name Type Description
req IAuthenticatedRequest

Express request with the investigation identifier to undo.

res Response

Express response used to return the undone investigation.

_next NextFunction

Express next function (unused).

View Source controllers/investigation.controller.js, line 560

Resolves when the response has been sent.

Promise.<void>

# async static unlockInvestigation(req, res) → {Promise.<void>}

Unlock an investigation.

Parameters:
Name Type Description
req IAuthenticatedRequest

Express request with investigation ID and user context.

res Response

Express response.

View Source controllers/investigation.controller.js, line 1083

Resolves when the response has been sent.

Promise.<void>

# async static updateInvestigation(req, res, _next) → {Promise.<void>}

Update an investigation.

Parameters:
Name Type Description
req IUpdateInvestigationRequest

Express request with update payload and params.

res Response

Express response used to return the updated investigation.

_next NextFunction

Express next function (unused).

View Source controllers/investigation.controller.js, line 234

Resolves when the response has been sent.

Promise.<void>

# async static uploadObjectPhoto(req, res, _next) → {Promise.<void>}

Upload a photo for an object in an investigation. Uses composite key (objectId + objectIndex) to uniquely identify objects.

Parameters:
Name Type Description
req IAuthenticatedRequest

Express request with investigation ID, object ID, object index, and photo data.

res Response

Express response used to return the uploaded photo URL.

_next NextFunction

Express next function (unused).

View Source controllers/investigation.controller.js, line 855

Resolves when the response has been sent.

Promise.<void>