Task Relations (#103)
This commit is contained in:
@ -74,9 +74,6 @@ definitions:
|
||||
listID:
|
||||
description: The list this task belongs to.
|
||||
type: integer
|
||||
parentTaskID:
|
||||
description: If the task is a subtask, this is the id of its parent.
|
||||
type: integer
|
||||
percentDone:
|
||||
description: Determines how far a task is left from being done
|
||||
type: number
|
||||
@ -84,6 +81,10 @@ definitions:
|
||||
description: The task priority. Can be anything you want, it is possible to
|
||||
sort by this later.
|
||||
type: integer
|
||||
related_tasks:
|
||||
$ref: '#/definitions/models.RelatedTaskMap'
|
||||
description: All related tasks, grouped by their relation kind
|
||||
type: object
|
||||
reminderDates:
|
||||
description: An array of unix timestamps when the user wants to be reminded
|
||||
of the task.
|
||||
@ -98,11 +99,6 @@ definitions:
|
||||
startDate:
|
||||
description: When this task starts.
|
||||
type: integer
|
||||
subtasks:
|
||||
description: An array of subtasks.
|
||||
items:
|
||||
$ref: '#/definitions/models.Task'
|
||||
type: array
|
||||
task_ids:
|
||||
description: A list of task ids to update
|
||||
items:
|
||||
@ -360,6 +356,90 @@ definitions:
|
||||
maxLength: 250
|
||||
type: string
|
||||
type: object
|
||||
models.RelatedTaskMap:
|
||||
additionalProperties:
|
||||
items:
|
||||
properties:
|
||||
assignees:
|
||||
description: An array of users who are assigned to this task
|
||||
items:
|
||||
$ref: '#/definitions/models.User'
|
||||
type: array
|
||||
created:
|
||||
description: A unix timestamp when this task was created. You cannot change
|
||||
this value.
|
||||
type: integer
|
||||
createdBy:
|
||||
$ref: '#/definitions/models.User'
|
||||
description: The user who initially created the task.
|
||||
type: object
|
||||
description:
|
||||
description: The task description.
|
||||
type: string
|
||||
done:
|
||||
description: Whether a task is done or not.
|
||||
type: boolean
|
||||
doneAt:
|
||||
description: The unix timestamp when a task was marked as done.
|
||||
type: integer
|
||||
dueDate:
|
||||
description: A unix timestamp when the task is due.
|
||||
type: integer
|
||||
endDate:
|
||||
description: When this task ends.
|
||||
type: integer
|
||||
hexColor:
|
||||
description: The task color in hex
|
||||
maxLength: 6
|
||||
type: string
|
||||
id:
|
||||
description: The unique, numeric id of this task.
|
||||
type: integer
|
||||
labels:
|
||||
description: An array of labels which are associated with this task.
|
||||
items:
|
||||
$ref: '#/definitions/models.Label'
|
||||
type: array
|
||||
listID:
|
||||
description: The list this task belongs to.
|
||||
type: integer
|
||||
percentDone:
|
||||
description: Determines how far a task is left from being done
|
||||
type: number
|
||||
priority:
|
||||
description: The task priority. Can be anything you want, it is possible
|
||||
to sort by this later.
|
||||
type: integer
|
||||
related_tasks:
|
||||
$ref: '#/definitions/models.RelatedTaskMap'
|
||||
description: All related tasks, grouped by their relation kind
|
||||
type: object
|
||||
reminderDates:
|
||||
description: An array of unix timestamps when the user wants to be reminded
|
||||
of the task.
|
||||
items:
|
||||
type: integer
|
||||
type: array
|
||||
repeatAfter:
|
||||
description: An amount in seconds this task repeats itself. If this is
|
||||
set, when marking the task as done, it will mark itself as "undone"
|
||||
and then increase all remindes and the due date by its amount.
|
||||
type: integer
|
||||
startDate:
|
||||
description: When this task starts.
|
||||
type: integer
|
||||
text:
|
||||
description: The task text. This is what you'll see in the list.
|
||||
maxLength: 250
|
||||
minLength: 3
|
||||
type: string
|
||||
updated:
|
||||
description: A unix timestamp when this task was last updated. You cannot
|
||||
change this value.
|
||||
type: integer
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
models.Task:
|
||||
properties:
|
||||
assignees:
|
||||
@ -405,9 +485,6 @@ definitions:
|
||||
listID:
|
||||
description: The list this task belongs to.
|
||||
type: integer
|
||||
parentTaskID:
|
||||
description: If the task is a subtask, this is the id of its parent.
|
||||
type: integer
|
||||
percentDone:
|
||||
description: Determines how far a task is left from being done
|
||||
type: number
|
||||
@ -415,6 +492,10 @@ definitions:
|
||||
description: The task priority. Can be anything you want, it is possible to
|
||||
sort by this later.
|
||||
type: integer
|
||||
related_tasks:
|
||||
$ref: '#/definitions/models.RelatedTaskMap'
|
||||
description: All related tasks, grouped by their relation kind
|
||||
type: object
|
||||
reminderDates:
|
||||
description: An array of unix timestamps when the user wants to be reminded
|
||||
of the task.
|
||||
@ -429,11 +510,6 @@ definitions:
|
||||
startDate:
|
||||
description: When this task starts.
|
||||
type: integer
|
||||
subtasks:
|
||||
description: An array of subtasks.
|
||||
items:
|
||||
$ref: '#/definitions/models.Task'
|
||||
type: array
|
||||
text:
|
||||
description: The task text. This is what you'll see in the list.
|
||||
maxLength: 250
|
||||
@ -451,6 +527,26 @@ definitions:
|
||||
user_id:
|
||||
type: integer
|
||||
type: object
|
||||
models.TaskRelation:
|
||||
properties:
|
||||
created:
|
||||
description: A unix timestamp when this label was created. You cannot change
|
||||
this value.
|
||||
type: integer
|
||||
created_by:
|
||||
$ref: '#/definitions/models.User'
|
||||
description: The user who created this relation
|
||||
type: object
|
||||
other_task_id:
|
||||
description: The ID of the other task, the task which is being related.
|
||||
type: integer
|
||||
relation_kind:
|
||||
description: The kind of the relation.
|
||||
type: string
|
||||
task_id:
|
||||
description: The ID of the "base" task, the task which has a relation to another.
|
||||
type: integer
|
||||
type: object
|
||||
models.Team:
|
||||
properties:
|
||||
created:
|
||||
@ -1010,9 +1106,9 @@ paths:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Returns a team by its ID.
|
||||
description: Returns a list by its ID.
|
||||
parameters:
|
||||
- description: Team ID
|
||||
- description: List ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
@ -1021,12 +1117,12 @@ paths:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: The team
|
||||
description: The list
|
||||
schema:
|
||||
$ref: '#/definitions/models.Team'
|
||||
$ref: '#/definitions/models.List'
|
||||
type: object
|
||||
"403":
|
||||
description: The user does not have access to the team
|
||||
description: The user does not have access to the list
|
||||
schema:
|
||||
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
|
||||
type: object
|
||||
@ -1037,9 +1133,9 @@ paths:
|
||||
type: object
|
||||
security:
|
||||
- JWTKeyAuth: []
|
||||
summary: Gets one team
|
||||
summary: Gets one list
|
||||
tags:
|
||||
- team
|
||||
- list
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
@ -2911,6 +3007,93 @@ paths:
|
||||
summary: Update all labels on a task.
|
||||
tags:
|
||||
- labels
|
||||
/tasks/{taskID}/relations:
|
||||
delete:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: The relation object
|
||||
in: body
|
||||
name: relation
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/models.TaskRelation'
|
||||
type: object
|
||||
- description: Task ID
|
||||
in: path
|
||||
name: taskID
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: The task relation was successfully deleted.
|
||||
schema:
|
||||
$ref: '#/definitions/models.Message'
|
||||
type: object
|
||||
"400":
|
||||
description: Invalid task relation object provided.
|
||||
schema:
|
||||
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
|
||||
type: object
|
||||
"404":
|
||||
description: The task relation was not found.
|
||||
schema:
|
||||
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal error
|
||||
schema:
|
||||
$ref: '#/definitions/models.Message'
|
||||
type: object
|
||||
security:
|
||||
- JWTKeyAuth: []
|
||||
summary: Remove a task relation
|
||||
tags:
|
||||
- task
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Creates a new relation between two tasks. The user needs to have
|
||||
update rights on the base task and at least read rights on the other task.
|
||||
Both tasks do not need to be on the same list.
|
||||
parameters:
|
||||
- description: The relation object
|
||||
in: body
|
||||
name: relation
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/models.TaskRelation'
|
||||
type: object
|
||||
- description: Task ID
|
||||
in: path
|
||||
name: taskID
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: The created task relation object.
|
||||
schema:
|
||||
$ref: '#/definitions/models.TaskRelation'
|
||||
type: object
|
||||
"400":
|
||||
description: Invalid task relation object provided.
|
||||
schema:
|
||||
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal error
|
||||
schema:
|
||||
$ref: '#/definitions/models.Message'
|
||||
type: object
|
||||
security:
|
||||
- JWTKeyAuth: []
|
||||
summary: Create a new relation between two tasks
|
||||
tags:
|
||||
- task
|
||||
/tasks/all:
|
||||
get:
|
||||
consumes:
|
||||
|
Reference in New Issue
Block a user