diff --git a/website/server/controllers/api-v3/tasks.js b/website/server/controllers/api-v3/tasks.js index f9f48ab5ad..93a9802329 100644 --- a/website/server/controllers/api-v3/tasks.js +++ b/website/server/controllers/api-v3/tasks.js @@ -76,10 +76,12 @@ const requiredGroupFields = '_id leader tasksOrder name'; * include: a UUID, startDate and time. * For example {"id":"ed427623-9a69-4aac-9852-13deb9c190c3", * "startDate":"1/16/17","time":"1/16/17" } - * @apiParam (Body) {String="weekly","daily"} [frequency=weekly] Value "weekly" enables - * "On days of the week", value - * "daily" enables "EveryX Days". - * Only valid for type "daily". + * @apiParam (Body) {String="daily","weekly","monthly","yearly"} [frequency=weekly] Values "weekly" + * and "monthly" enable use of the "repeat" field. + * All frequency values enable use of the "everyX" field. + * Value "monthly" enables use of the "weeksOfMonth" and + * "daysOfMonth" fields. + * Frequency is only valid for type "daily". * @apiParam (Body) {String} [repeat=true] List of objects for days of the week, * Days that are true will be repeated upon. * Only valid for type "daily". Any days not specified @@ -92,6 +94,10 @@ const requiredGroupFields = '_id leader tasksOrder name'; * task is available again. * @apiParam (Body) {Number} [streak=0] Number of days that the task has consecutively * been checked off. Only valid for type "daily" + * @apiParam (Body) {Integer[]} daysOfMonth Array of integers. + * Only valid for type "daily" + * @apiParam (Body) {Integer[]} weeksOfMonth Array of integers. + * Only valid for type "daily" * @apiParam (Body) {Date} [startDate] Date when the task will first become available. * Only valid for type "daily" * @apiParam (Body) {Boolean} [up=true] Only valid for type "habit" @@ -240,10 +246,12 @@ api.createUserTasks = { * include: a UUID, startDate and time. * For example {"id":"ed427623-9a69-4aac-9852-13deb9c190c3", * "startDate":"1/16/17","time":"1/16/17" } - * @apiParam (Body) {String="weekly","daily"} [frequency=weekly] Value "weekly" enables - * "On days of the week", value - * "daily" enables "EveryX Days". - * Only valid for type "daily". + * @apiParam (Body) {String="daily","weekly","monthly","yearly"} [frequency=weekly] Values "weekly" + * and "monthly" enable use of the "repeat" field. + * All frequency values enable use of the "everyX" field. + * Value "monthly" enables use of the "weeksOfMonth" and + * "daysOfMonth" fields. + * Frequency is only valid for type "daily". * @apiParam (Body) {String} [repeat=true] List of objects for days of the week, * Days that are true will be repeated upon. * Only valid for type "daily". Any days not @@ -255,6 +263,10 @@ api.createUserTasks = { * of days until this daily task is available again. * @apiParam (Body) {Number} [streak=0] Number of days that the task has consecutively * been checked off. Only valid for type "daily" + * @apiParam (Body) {Integer[]} daysOfMonth Array of integers. + * Only valid for type "daily" + * @apiParam (Body) {Integer[]} weeksOfMonth Array of integers. + * Only valid for type "daily" * @apiParam (Body) {Date} [startDate] Date when the task will first become available. * Only valid for type "daily" * @apiParam (Body) {Boolean} [up=true] Only valid for type "habit" If true, @@ -544,10 +556,12 @@ api.getTask = { * Easy, Medium, Hard. * @apiParam (Body) {String[]} [reminders] Array of reminders, each an object that must include: * a UUID, startDate and time. - * @apiParam (Body) {String="weekly","daily"} [frequency=weekly] Value "weekly" enables "On days - * of the week", value "daily" - * enables "EveryX Days". - * Only valid for type "daily". + * @apiParam (Body) {String="daily","weekly","monthly","yearly"} [frequency=weekly] Values "weekly" + * and "monthly" enable use of the "repeat" field. + * All frequency values enable use of the "everyX" field. + * Value "monthly" enables use of the "weeksOfMonth" and + * "daysOfMonth" fields. + * Frequency is only valid for type "daily". * @apiParam (Body) {String} [repeat=true] List of objects for days of the week, Days that * are true will be repeated upon. Only valid for type * "daily". Any days not specified will be marked as true. @@ -558,6 +572,10 @@ api.getTask = { * of days until this daily task is available again. * @apiParam (Body) {Number} [streak=0] Number of days that the task has consecutively * been checked off. Only valid for type "daily", + * @apiParam (Body) {Integer[]} daysOfMonth Array of integers. + * Only valid for type "daily" + * @apiParam (Body) {Integer[]} weeksOfMonth Array of integers. + * Only valid for type "daily" * @apiParam (Body) {Date} [startDate] Date when the task will first become available. * Only valid for type "daily". * @apiParam (Body) {Boolean} [up=true] Only valid for type "habit" If true, enables