# new InvestigationController()
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). |
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. |
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). |
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). |
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). |
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). |
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). |
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. |
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). |
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). |
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). |
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). |
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). |
Resolves when the response has been sent.
Promise.<void>