Skip to content

@sourceloop/task-service / Exports / TaskController

Class: TaskController

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new TaskController(taskRepo, userTaskRepository, taskWorkflowMapping)

Parameters

Name Type
taskRepo TaskRepository
userTaskRepository UserTaskRepository
taskWorkflowMapping TaskWorkFlowRepository

Defined in

services/task-service/src/controllers/task.controller.ts:35

Properties

taskRepo

Private Readonly taskRepo: TaskRepository

Defined in

services/task-service/src/controllers/task.controller.ts:37


taskWorkflowMapping

Private Readonly taskWorkflowMapping: TaskWorkFlowRepository

Defined in

services/task-service/src/controllers/task.controller.ts:41


userTaskRepository

Private Readonly userTaskRepository: UserTaskRepository

Defined in

services/task-service/src/controllers/task.controller.ts:39

Methods

count

count(where?): Promise<Count>

Parameters

Name Type
where? Where<Task<TaskStatus>>

Returns

Promise<Count>

Defined in

services/task-service/src/controllers/task.controller.ts:93


delete

delete(where?, cascade?): Promise<void>

Parameters

Name Type Default value
where? Where<Task<TaskStatus>> undefined
cascade boolean true

Returns

Promise<void>

Defined in

services/task-service/src/controllers/task.controller.ts:157


deleteById

deleteById(id, cascade?): Promise<void>

Parameters

Name Type Default value
id string undefined
cascade boolean true

Returns

Promise<void>

Defined in

services/task-service/src/controllers/task.controller.ts:131


find

find(filter?): Promise<Task<TaskStatus>[]>

Parameters

Name Type
filter? Filter<Task<TaskStatus>>

Returns

Promise<Task<TaskStatus>[]>

Defined in

services/task-service/src/controllers/task.controller.ts:44


findById

findById(id, filter?): Promise<Task<TaskStatus>>

Parameters

Name Type
id string
filter? FilterExcludingWhere<Task<TaskStatus>>

Returns

Promise<Task<TaskStatus>>

Defined in

services/task-service/src/controllers/task.controller.ts:68


mapTaskToWorkflow

mapTaskToWorkflow(taskWorkflowMapping): Promise<void>

Parameters

Name Type
taskWorkflowMapping Omit<TaskWorkflow, "id">

Returns

Promise<void>

Defined in

services/task-service/src/controllers/task.controller.ts:110