diff --git a/pkg/swagger/docs.go b/pkg/swagger/docs.go index 90d520e61..02b3327d6 100644 --- a/pkg/swagger/docs.go +++ b/pkg/swagger/docs.go @@ -4704,6 +4704,55 @@ const docTemplate = `{ } } }, + "/tasks/{projecttask}/read": { + "post": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Marks a task as read for the current user by removing the unread status entry.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "task" + ], + "summary": "Mark a task as read", + "parameters": [ + { + "type": "integer", + "description": "Task ID", + "name": "projecttask", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "The task unread status object.", + "schema": { + "$ref": "#/definitions/models.TaskUnreadStatus" + } + }, + "403": { + "description": "The user does not have access to the task", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "500": { + "description": "Internal error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, "/tasks/{taskID}/assignees": { "get": { "security": [ @@ -8655,6 +8704,9 @@ const docTemplate = `{ "description": "True if a task is a favorite task. Favorite tasks show up in a separate \"Important\" project. This value depends on the user making the call to the api.", "type": "boolean" }, + "is_unread": { + "type": "boolean" + }, "labels": { "description": "An array of labels which are associated with this task. This property is read-only, you must use the separate endpoint to add labels to a task.", "type": "array", @@ -8926,6 +8978,17 @@ const docTemplate = `{ "TaskRepeatModeFromCurrentDate" ] }, + "models.TaskUnreadStatus": { + "type": "object", + "properties": { + "taskID": { + "type": "integer" + }, + "userID": { + "type": "integer" + } + } + }, "models.Team": { "type": "object", "properties": { diff --git a/pkg/swagger/swagger.json b/pkg/swagger/swagger.json index 40bc2d342..d54663c5c 100644 --- a/pkg/swagger/swagger.json +++ b/pkg/swagger/swagger.json @@ -4696,6 +4696,55 @@ } } }, + "/tasks/{projecttask}/read": { + "post": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Marks a task as read for the current user by removing the unread status entry.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "task" + ], + "summary": "Mark a task as read", + "parameters": [ + { + "type": "integer", + "description": "Task ID", + "name": "projecttask", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "The task unread status object.", + "schema": { + "$ref": "#/definitions/models.TaskUnreadStatus" + } + }, + "403": { + "description": "The user does not have access to the task", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "500": { + "description": "Internal error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, "/tasks/{taskID}/assignees": { "get": { "security": [ @@ -8647,6 +8696,9 @@ "description": "True if a task is a favorite task. Favorite tasks show up in a separate \"Important\" project. This value depends on the user making the call to the api.", "type": "boolean" }, + "is_unread": { + "type": "boolean" + }, "labels": { "description": "An array of labels which are associated with this task. This property is read-only, you must use the separate endpoint to add labels to a task.", "type": "array", @@ -8918,6 +8970,17 @@ "TaskRepeatModeFromCurrentDate" ] }, + "models.TaskUnreadStatus": { + "type": "object", + "properties": { + "taskID": { + "type": "integer" + }, + "userID": { + "type": "integer" + } + } + }, "models.Team": { "type": "object", "properties": { diff --git a/pkg/swagger/swagger.yaml b/pkg/swagger/swagger.yaml index 32a9bbeee..cfe938ce4 100644 --- a/pkg/swagger/swagger.yaml +++ b/pkg/swagger/swagger.yaml @@ -693,6 +693,8 @@ definitions: a separate "Important" project. This value depends on the user making the call to the api. type: boolean + is_unread: + type: boolean labels: description: An array of labels which are associated with this task. This property is read-only, you must use the separate endpoint to add labels @@ -905,6 +907,13 @@ definitions: - TaskRepeatModeDefault - TaskRepeatModeMonth - TaskRepeatModeFromCurrentDate + models.TaskUnreadStatus: + properties: + taskID: + type: integer + userID: + type: integer + type: object models.Team: properties: created: @@ -4688,6 +4697,38 @@ paths: summary: Updates a task position tags: - task + /tasks/{projecttask}/read: + post: + consumes: + - application/json + description: Marks a task as read for the current user by removing the unread + status entry. + parameters: + - description: Task ID + in: path + name: projecttask + required: true + type: integer + produces: + - application/json + responses: + "200": + description: The task unread status object. + schema: + $ref: '#/definitions/models.TaskUnreadStatus' + "403": + description: The user does not have access to the task + schema: + $ref: '#/definitions/web.HTTPError' + "500": + description: Internal error + schema: + $ref: '#/definitions/models.Message' + security: + - JWTKeyAuth: [] + summary: Mark a task as read + tags: + - task /tasks/{task}/labels: get: consumes: