-
Notifications
You must be signed in to change notification settings - Fork 1
/
i-tasks.ts
67 lines (62 loc) · 1.95 KB
/
i-tasks.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import {ITaskQuery} from '../query/i-task';
import {ITask} from '../model/i-task';
/**
* @export
* @interface ITasks
*/
export interface ITasks {
/**
* @public
* @description Lists all tasks in the project.
* @param {string} projectId
* @param {ITaskQuery} [query]
* @returns {Promise<{project_id: string, tasks: ITask[]}>}
* @memberof ITasks
*/
list(projectId: string, query?: ITaskQuery):
Promise<{project_id: string, tasks: ITask[]}>;
/**
* @public
* @description Retrieves a Task object.
* @param {string} projectId
* @param {number} taskId
* @returns {Promise<{project_id: string, task: ITask}>}
* @memberof ITasks
*/
get(projectId: string, taskId: number):
Promise<{project_id: string, task: ITask}>;
/**
* @public
* @description Creates a task in the project.
* Requires Manage tasks admin right.
* @param {string} projectId
* @param {object} body
* @returns {Promise<{project_id: string, task: ITask}>}
* @memberof ITasks
*/
create(projectId: string, body: object):
Promise<{project_id: string, task: ITask}>;
/**
* @public
* @description Updates the properties of a task.
* Requires Manage tasks admin right.
* @param {string} projectId
* @param {number} taskId
* @param {object} body
* @returns {Promise<{project_id: string, task: ITask}>}
* @memberof ITasks
*/
update(projectId: string, taskId: number, body: object):
Promise<{project_id: string, task: ITask}>;
/**
* @public
* @description Deletes a task from the project.
* Requires Manage tasks admin right.
* @param {string} projectId
* @param {number} taskId
* @returns {Promise<{project_id: string, task_deleted: boolean}>}
* @memberof ITasks
*/
delete(projectId: string, taskId: number):
Promise<{project_id: string, task_deleted: boolean}>;
}