Skip to content

web-backend


Class: FmeaController ​

Defined in: packages/web-backend/src/fmea/fmea.controller.ts:15

Controller for FMEA operations. Provides endpoints to create, update, and manage FMEA tables.

Constructors ​

Constructor ​

new FmeaController(fmeaService): FmeaController

Defined in: packages/web-backend/src/fmea/fmea.controller.ts:21

Instantiate the FMEA controller.

Parameters ​

fmeaService ​

FmeaService

Service providing FMEA domain operations.

Returns ​

FmeaController

Methods ​

addColumn() ​

addColumn(id, body): Promise<Fmea>

Defined in: packages/web-backend/src/fmea/fmea.controller.ts:54

Add a column to an FMEA. If the column type is "string" then dropdown options can be empty or omitted.

Parameters ​

id ​

number

FMEA ID

body ​

AddColumnBody

Contains column name, type, and optional dropdown options

Returns ​

Promise<Fmea>

Updated FMEA


addRow() ​

addRow(id): Promise<Fmea>

Defined in: packages/web-backend/src/fmea/fmea.controller.ts:65

Add a new row to an FMEA.

Parameters ​

id ​

number

FMEA ID

Returns ​

Promise<Fmea>

Updated FMEA


createFmea() ​

createFmea(body): Promise<Fmea>

Defined in: packages/web-backend/src/fmea/fmea.controller.ts:30

Create a new FMEA.

Parameters ​

body ​

any

Request body containing initial FMEA fields

Returns ​

Promise<Fmea>

Created FMEA object


deleteColumn() ​

deleteColumn(fmeaId, column): Promise<Fmea>

Defined in: packages/web-backend/src/fmea/fmea.controller.ts:101

Delete a column from an FMEA.

Parameters ​

fmeaId ​

number

FMEA ID

column ​

string

Column to be deleted

Returns ​

Promise<Fmea>

Updated FMEA


deleteFmea() ​

deleteFmea(fmeaId): Promise<boolean>

Defined in: packages/web-backend/src/fmea/fmea.controller.ts:124

Delete an FMEA.

Parameters ​

fmeaId ​

number

FMEA ID

Returns ​

Promise<boolean>

Whether the FMEA was deleted


deleteRow() ​

deleteRow(fmeaId, rowId): Promise<Fmea>

Defined in: packages/web-backend/src/fmea/fmea.controller.ts:113

Delete a row from an FMEA.

Parameters ​

fmeaId ​

number

FMEA ID

rowId ​

string

The row identifier to delete

Returns ​

Promise<Fmea>

Updated FMEA after deletion, or null if not found


getFmea() ​

getFmea(id): Promise<Fmea>

Defined in: packages/web-backend/src/fmea/fmea.controller.ts:42

Get a specific FMEA.

Parameters ​

id ​

number

FMEA ID

Returns ​

Promise<Fmea>

The FMEA object, if found


updateCell() ​

updateCell(id, body): Promise<boolean>

Defined in: packages/web-backend/src/fmea/fmea.controller.ts:77

Update a specific cell value in a row.

Parameters ​

id ​

number

FMEA ID

body ​

UpdateCellBody

Contains row ID, column to be updated, and the new cell value

Returns ​

Promise<boolean>

Whether the cell was updated


updateColumn() ​

updateColumn(fmeaId, prev_column_name, body): Promise<Fmea>

Defined in: packages/web-backend/src/fmea/fmea.controller.ts:161

Update column details.

Parameters ​

fmeaId ​

number

The FMEA id

prev_column_name ​

string

The current column name

body ​

UpdateDropdownBody

New column name, type, and dropdown options

Returns ​

Promise<Fmea>

Updated FMEA


updateColumnName() ​

updateColumnName(id, body): Promise<Fmea>

Defined in: packages/web-backend/src/fmea/fmea.controller.ts:136

Update a column's display name.

Parameters ​

id ​

number

FMEA ID

body ​

UpdateColumnNameBody

Contains current column name and the new column name

Returns ​

Promise<Fmea>

Updated FMEA


updateColumnType() ​

updateColumnType(id, body): Promise<Fmea>

Defined in: packages/web-backend/src/fmea/fmea.controller.ts:148

Update a column's type (and options for dropdown type).

Parameters ​

id ​

number

FMEA ID

body ​

any

Contains old/new column info, dropdown options, and type

Returns ​

Promise<Fmea>

Updated FMEA


updateDropdownOptions() ​

updateDropdownOptions(id, body): Promise<Fmea>

Defined in: packages/web-backend/src/fmea/fmea.controller.ts:89

Update dropdown options for a column.

Parameters ​

id ​

number

FMEA ID

body ​

UpdateDropdownBody

Contains column name and dropdown options

Returns ​

Promise<Fmea>

Updated FMEA object