1
0

feat: Add relative Reminders (#1427)

Partially resolves #1416

Co-authored-by: ce72 <christoph.ernst72@googlemail.com>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/1427
Reviewed-by: konrad <k@knt.li>
Co-authored-by: cernst <ce72@noreply.kolaente.de>
Co-committed-by: cernst <ce72@noreply.kolaente.de>
This commit is contained in:
cernst
2023-03-27 20:07:06 +00:00
committed by konrad
parent 823c817b1f
commit 3f5252dc24
21 changed files with 724 additions and 207 deletions

View File

@ -1,5 +1,4 @@
// Package swagger GENERATED BY SWAG; DO NOT EDIT
// This file was generated by swaggo/swag
// Code generated by swaggo/swag. DO NOT EDIT
package swagger
import "github.com/swaggo/swag"
@ -7791,12 +7790,19 @@ const docTemplate = `{
]
},
"reminder_dates": {
"description": "An array of datetimes when the user wants to be reminded of the task.",
"description": "An array of datetimes when the user wants to be reminded of the task.\n\nDeprecated: Use Reminders",
"type": "array",
"items": {
"type": "string"
}
},
"reminders": {
"description": "An array of reminders that are associated with this task.",
"type": "array",
"items": {
"$ref": "#/definitions/models.TaskReminder"
}
},
"repeat_after": {
"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"
@ -8303,6 +8309,19 @@ const docTemplate = `{
"RelationKindCopiedTo"
]
},
"models.ReminderRelation": {
"type": "string",
"enum": [
"due_date",
"start_date",
"end_date"
],
"x-enum-varnames": [
"ReminderRelationDueDate",
"ReminderRelationStartDate",
"ReminderRelationEndDate"
]
},
"models.Right": {
"type": "integer",
"enum": [
@ -8518,12 +8537,19 @@ const docTemplate = `{
]
},
"reminder_dates": {
"description": "An array of datetimes when the user wants to be reminded of the task.",
"description": "An array of datetimes when the user wants to be reminded of the task.\n\nDeprecated: Use Reminders",
"type": "array",
"items": {
"type": "string"
}
},
"reminders": {
"description": "An array of reminders that are associated with this task.",
"type": "array",
"items": {
"$ref": "#/definitions/models.TaskReminder"
}
},
"repeat_after": {
"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"
@ -8691,6 +8717,27 @@ const docTemplate = `{
}
}
},
"models.TaskReminder": {
"type": "object",
"properties": {
"relative_period": {
"description": "A period in seconds relative to another date argument. Negative values mean the reminder triggers before the date. Default: 0, tiggers when RelativeTo is due.",
"type": "integer"
},
"relative_to": {
"description": "The name of the date field to which the relative period refers to.",
"allOf": [
{
"$ref": "#/definitions/models.ReminderRelation"
}
]
},
"reminder": {
"description": "The absolute time when the user wants to be reminded of the task.",
"type": "string"
}
}
},
"models.TaskRepeatMode": {
"type": "integer",
"enum": [