diff --git a/pkg/swagger/docs.go b/pkg/swagger/docs.go index a27794f94..2ce644a3b 100644 --- a/pkg/swagger/docs.go +++ b/pkg/swagger/docs.go @@ -1,4 +1,5 @@ -// Package swagger Code generated by swaggo/swag. DO NOT EDIT +// Code generated by swaggo/swag. DO NOT EDIT. + package swagger import "github.com/swaggo/swag" @@ -1891,150 +1892,6 @@ const docTemplate = `{ } } }, - "/projects/{id}/buckets": { - "get": { - "security": [ - { - "JWTKeyAuth": [] - } - ], - "description": "Returns all kanban buckets with belong to a project including their tasks. Buckets are always sorted by their ` + "`" + `position` + "`" + ` in ascending order. Tasks are sorted by their ` + "`" + `kanban_position` + "`" + ` in ascending order.", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "project" - ], - "summary": "Get all kanban buckets of a project", - "parameters": [ - { - "type": "integer", - "description": "Project Id", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "The page number for tasks. Used for pagination. If not provided, the first page of results is returned.", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "The maximum number of tasks per bucket per page. This parameter is limited by the configured maximum of items per page.", - "name": "per_page", - "in": "query" - }, - { - "type": "string", - "description": "Search tasks by task text.", - "name": "s", - "in": "query" - }, - { - "type": "string", - "description": "The filter query to match tasks by. Check out https://vikunja.io/docs/filters for a full explanation of the feature.", - "name": "filter", - "in": "query" - }, - { - "type": "string", - "description": "The time zone which should be used for date match (statements like ", - "name": "filter_timezone", - "in": "query" - }, - { - "type": "string", - "description": "If set to true the result will include filtered fields whose value is set to ` + "`" + `null` + "`" + `. Available values are ` + "`" + `true` + "`" + ` or ` + "`" + `false` + "`" + `. Defaults to ` + "`" + `false` + "`" + `.", - "name": "filter_include_nulls", - "in": "query" - } - ], - "responses": { - "200": { - "description": "The buckets with their tasks", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/models.Bucket" - } - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "#/definitions/models.Message" - } - } - } - }, - "put": { - "security": [ - { - "JWTKeyAuth": [] - } - ], - "description": "Creates a new kanban bucket on a project.", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "project" - ], - "summary": "Create a new bucket", - "parameters": [ - { - "type": "integer", - "description": "Project Id", - "name": "id", - "in": "path", - "required": true - }, - { - "description": "The bucket object", - "name": "bucket", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/models.Bucket" - } - } - ], - "responses": { - "200": { - "description": "The created bucket object.", - "schema": { - "$ref": "#/definitions/models.Bucket" - } - }, - "400": { - "description": "Invalid bucket object provided.", - "schema": { - "$ref": "#/definitions/web.HTTPError" - } - }, - "404": { - "description": "The project does not exist.", - "schema": { - "$ref": "#/definitions/web.HTTPError" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "#/definitions/models.Message" - } - } - } - } - }, "/projects/{id}/projectusers": { "get": { "security": [ @@ -2100,98 +1957,6 @@ const docTemplate = `{ } }, "/projects/{id}/tasks": { - "get": { - "security": [ - { - "JWTKeyAuth": [] - } - ], - "description": "Returns all tasks for the current project.", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "task" - ], - "summary": "Get tasks in a project", - "parameters": [ - { - "type": "integer", - "description": "The project ID.", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "The page number. Used for pagination. If not provided, the first page of results is returned.", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page.", - "name": "per_page", - "in": "query" - }, - { - "type": "string", - "description": "Search tasks by task text.", - "name": "s", - "in": "query" - }, - { - "type": "string", - "description": "The sorting parameter. You can pass this multiple times to get the tasks ordered by multiple different parametes, along with ` + "`" + `order_by` + "`" + `. Possible values to sort by are ` + "`" + `id` + "`" + `, ` + "`" + `title` + "`" + `, ` + "`" + `description` + "`" + `, ` + "`" + `done` + "`" + `, ` + "`" + `done_at` + "`" + `, ` + "`" + `due_date` + "`" + `, ` + "`" + `created_by_id` + "`" + `, ` + "`" + `project_id` + "`" + `, ` + "`" + `repeat_after` + "`" + `, ` + "`" + `priority` + "`" + `, ` + "`" + `start_date` + "`" + `, ` + "`" + `end_date` + "`" + `, ` + "`" + `hex_color` + "`" + `, ` + "`" + `percent_done` + "`" + `, ` + "`" + `uid` + "`" + `, ` + "`" + `created` + "`" + `, ` + "`" + `updated` + "`" + `. Default is ` + "`" + `id` + "`" + `.", - "name": "sort_by", - "in": "query" - }, - { - "type": "string", - "description": "The ordering parameter. Possible values to order by are ` + "`" + `asc` + "`" + ` or ` + "`" + `desc` + "`" + `. Default is ` + "`" + `asc` + "`" + `.", - "name": "order_by", - "in": "query" - }, - { - "type": "string", - "description": "The filter query to match tasks by. Check out https://vikunja.io/docs/filters for a full explanation of the feature.", - "name": "filter", - "in": "query" - }, - { - "type": "string", - "description": "The time zone which should be used for date match (statements like ", - "name": "filter_timezone", - "in": "query" - }, - { - "type": "string", - "description": "If set to true the result will include filtered fields whose value is set to ` + "`" + `null` + "`" + `. Available values are ` + "`" + `true` + "`" + ` or ` + "`" + `false` + "`" + `. Defaults to ` + "`" + `false` + "`" + `.", - "name": "filter_include_nulls", - "in": "query" - } - ], - "responses": { - "200": { - "description": "The tasks", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/models.Task" - } - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "#/definitions/models.Message" - } - } - } - }, "put": { "security": [ { @@ -2531,6 +2296,229 @@ const docTemplate = `{ } } }, + "/projects/{id}/views/{view}/buckets": { + "get": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Returns all kanban buckets which belong to that project. Buckets are always sorted by their ` + "`" + `position` + "`" + ` in ascending order. To get all buckets with their tasks, use the tasks endpoint with a kanban view.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "project" + ], + "summary": "Get all kanban buckets of a project", + "parameters": [ + { + "type": "integer", + "description": "Project ID", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Project view ID", + "name": "view", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "The buckets", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/models.Bucket" + } + } + }, + "500": { + "description": "Internal server error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + }, + "put": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Creates a new kanban bucket on a project.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "project" + ], + "summary": "Create a new bucket", + "parameters": [ + { + "type": "integer", + "description": "Project Id", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Project view ID", + "name": "view", + "in": "path", + "required": true + }, + { + "description": "The bucket object", + "name": "bucket", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/models.Bucket" + } + } + ], + "responses": { + "200": { + "description": "The created bucket object.", + "schema": { + "$ref": "#/definitions/models.Bucket" + } + }, + "400": { + "description": "Invalid bucket object provided.", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "404": { + "description": "The project does not exist.", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "500": { + "description": "Internal error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, + "/projects/{id}/views/{view}/tasks": { + "get": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Returns all tasks for the current project.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "task" + ], + "summary": "Get tasks in a project", + "parameters": [ + { + "type": "integer", + "description": "The project ID.", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "The project view ID.", + "name": "view", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "The page number. Used for pagination. If not provided, the first page of results is returned.", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page.", + "name": "per_page", + "in": "query" + }, + { + "type": "string", + "description": "Search tasks by task text.", + "name": "s", + "in": "query" + }, + { + "type": "string", + "description": "The sorting parameter. You can pass this multiple times to get the tasks ordered by multiple different parametes, along with ` + "`" + `order_by` + "`" + `. Possible values to sort by are ` + "`" + `id` + "`" + `, ` + "`" + `title` + "`" + `, ` + "`" + `description` + "`" + `, ` + "`" + `done` + "`" + `, ` + "`" + `done_at` + "`" + `, ` + "`" + `due_date` + "`" + `, ` + "`" + `created_by_id` + "`" + `, ` + "`" + `project_id` + "`" + `, ` + "`" + `repeat_after` + "`" + `, ` + "`" + `priority` + "`" + `, ` + "`" + `start_date` + "`" + `, ` + "`" + `end_date` + "`" + `, ` + "`" + `hex_color` + "`" + `, ` + "`" + `percent_done` + "`" + `, ` + "`" + `uid` + "`" + `, ` + "`" + `created` + "`" + `, ` + "`" + `updated` + "`" + `. Default is ` + "`" + `id` + "`" + `.", + "name": "sort_by", + "in": "query" + }, + { + "type": "string", + "description": "The ordering parameter. Possible values to order by are ` + "`" + `asc` + "`" + ` or ` + "`" + `desc` + "`" + `. Default is ` + "`" + `asc` + "`" + `.", + "name": "order_by", + "in": "query" + }, + { + "type": "string", + "description": "The filter query to match tasks by. Check out https://vikunja.io/docs/filters for a full explanation of the feature.", + "name": "filter", + "in": "query" + }, + { + "type": "string", + "description": "The time zone which should be used for date match (statements like ", + "name": "filter_timezone", + "in": "query" + }, + { + "type": "string", + "description": "If set to true the result will include filtered fields whose value is set to ` + "`" + `null` + "`" + `. Available values are ` + "`" + `true` + "`" + ` or ` + "`" + `false` + "`" + `. Defaults to ` + "`" + `false` + "`" + `.", + "name": "filter_include_nulls", + "in": "query" + } + ], + "responses": { + "200": { + "description": "The tasks", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/models.Task" + } + } + }, + "500": { + "description": "Internal error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, "/projects/{id}/webhooks": { "get": { "security": [ @@ -2755,131 +2743,6 @@ const docTemplate = `{ } } }, - "/projects/{projectID}/buckets/{bucketID}": { - "post": { - "security": [ - { - "JWTKeyAuth": [] - } - ], - "description": "Updates an existing kanban bucket.", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "project" - ], - "summary": "Update an existing bucket", - "parameters": [ - { - "type": "integer", - "description": "Project Id", - "name": "projectID", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "Bucket Id", - "name": "bucketID", - "in": "path", - "required": true - }, - { - "description": "The bucket object", - "name": "bucket", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/models.Bucket" - } - } - ], - "responses": { - "200": { - "description": "The created bucket object.", - "schema": { - "$ref": "#/definitions/models.Bucket" - } - }, - "400": { - "description": "Invalid bucket object provided.", - "schema": { - "$ref": "#/definitions/web.HTTPError" - } - }, - "404": { - "description": "The bucket does not exist.", - "schema": { - "$ref": "#/definitions/web.HTTPError" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "#/definitions/models.Message" - } - } - } - }, - "delete": { - "security": [ - { - "JWTKeyAuth": [] - } - ], - "description": "Deletes an existing kanban bucket and dissociates all of its task. It does not delete any tasks. You cannot delete the last bucket on a project.", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "project" - ], - "summary": "Deletes an existing bucket", - "parameters": [ - { - "type": "integer", - "description": "Project Id", - "name": "projectID", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "Bucket Id", - "name": "bucketID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "Successfully deleted.", - "schema": { - "$ref": "#/definitions/models.Message" - } - }, - "404": { - "description": "The bucket does not exist.", - "schema": { - "$ref": "#/definitions/web.HTTPError" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "#/definitions/models.Message" - } - } - } - } - }, "/projects/{projectID}/duplicate": { "put": { "security": [ @@ -3200,6 +3063,145 @@ const docTemplate = `{ } } }, + "/projects/{projectID}/views/{view}/buckets/{bucketID}": { + "post": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Updates an existing kanban bucket.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "project" + ], + "summary": "Update an existing bucket", + "parameters": [ + { + "type": "integer", + "description": "Project Id", + "name": "projectID", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Bucket Id", + "name": "bucketID", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Project view ID", + "name": "view", + "in": "path", + "required": true + }, + { + "description": "The bucket object", + "name": "bucket", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/models.Bucket" + } + } + ], + "responses": { + "200": { + "description": "The created bucket object.", + "schema": { + "$ref": "#/definitions/models.Bucket" + } + }, + "400": { + "description": "Invalid bucket object provided.", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "404": { + "description": "The bucket does not exist.", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "500": { + "description": "Internal error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + }, + "delete": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Deletes an existing kanban bucket and dissociates all of its task. It does not delete any tasks. You cannot delete the last bucket on a project.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "project" + ], + "summary": "Deletes an existing bucket", + "parameters": [ + { + "type": "integer", + "description": "Project Id", + "name": "projectID", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Bucket Id", + "name": "bucketID", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Project view ID", + "name": "view", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Successfully deleted.", + "schema": { + "$ref": "#/definitions/models.Message" + } + }, + "404": { + "description": "The bucket does not exist.", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "500": { + "description": "Internal error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, "/projects/{project}/shares": { "get": { "security": [ @@ -3454,6 +3456,281 @@ const docTemplate = `{ } } }, + "/projects/{project}/views": { + "get": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Returns all project views for a sepcific project", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "project" + ], + "summary": "Get all project views for a project", + "parameters": [ + { + "type": "integer", + "description": "Project ID", + "name": "project", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "The project views", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/models.ProjectView" + } + } + }, + "500": { + "description": "Internal error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + }, + "put": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Create a project view in a specific project.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "project" + ], + "summary": "Create a project view", + "parameters": [ + { + "type": "integer", + "description": "Project ID", + "name": "project", + "in": "path", + "required": true + }, + { + "description": "The project view you want to create.", + "name": "view", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/models.ProjectView" + } + } + ], + "responses": { + "200": { + "description": "The created project view", + "schema": { + "$ref": "#/definitions/models.ProjectView" + } + }, + "403": { + "description": "The user does not have access to create a project view", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "500": { + "description": "Internal error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, + "/projects/{project}/views/{id}": { + "get": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Returns a project view by its ID.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "project" + ], + "summary": "Get one project view", + "parameters": [ + { + "type": "integer", + "description": "Project ID", + "name": "project", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Project View ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "The project view", + "schema": { + "$ref": "#/definitions/models.ProjectView" + } + }, + "403": { + "description": "The user does not have access to this project view", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "500": { + "description": "Internal error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + }, + "post": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Updates a project view.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "project" + ], + "summary": "Updates a project view", + "parameters": [ + { + "type": "integer", + "description": "Project ID", + "name": "project", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Project View ID", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "The project view with updated values you want to change.", + "name": "view", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/models.ProjectView" + } + } + ], + "responses": { + "200": { + "description": "The updated project view.", + "schema": { + "$ref": "#/definitions/models.ProjectView" + } + }, + "400": { + "description": "Invalid project view object provided.", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "500": { + "description": "Internal error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + }, + "delete": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Deletes a project view.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "project" + ], + "summary": "Delete a project view", + "parameters": [ + { + "type": "integer", + "description": "Project ID", + "name": "project", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Project View ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "The project view was successfully deleted.", + "schema": { + "$ref": "#/definitions/models.Message" + } + }, + "403": { + "description": "The user does not have access to the project view", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "500": { + "description": "Internal error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, "/register": { "post": { "description": "Creates a new user account.", @@ -4269,6 +4546,64 @@ const docTemplate = `{ } } }, + "/tasks/{id}/position": { + "post": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Updates a task position.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "task" + ], + "summary": "Updates a task position", + "parameters": [ + { + "type": "integer", + "description": "Task ID", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "The task position with updated values you want to change.", + "name": "view", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/models.TaskPosition" + } + } + ], + "responses": { + "200": { + "description": "The updated task position.", + "schema": { + "$ref": "#/definitions/models.TaskPosition" + } + }, + "400": { + "description": "Invalid task position object provided.", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "500": { + "description": "Internal error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, "/tasks/{taskID}/assignees": { "get": { "security": [ @@ -7454,8 +7789,8 @@ const docTemplate = `{ "description": "The position this bucket has when querying all buckets. See the tasks.position property on how to use this.", "type": "number" }, - "project_id": { - "description": "The project this bucket belongs to.", + "project_view_id": { + "description": "The project view this bucket belongs to.", "type": "integer" }, "tasks": { @@ -7476,6 +7811,19 @@ const docTemplate = `{ } } }, + "models.BucketConfigurationModeKind": { + "type": "integer", + "enum": [ + 0, + 1, + 2 + ], + "x-enum-varnames": [ + "BucketConfigurationModeNone", + "BucketConfigurationModeManual", + "BucketConfigurationModeFilter" + ] + }, "models.BulkAssignees": { "type": "object", "properties": { @@ -7506,7 +7854,7 @@ const docTemplate = `{ } }, "bucket_id": { - "description": "BucketID is the ID of the kanban bucket this task belongs to.", + "description": "The bucket id. Will only be populated when the task is accessed via a view with buckets.\nCan be used to move a task between buckets. In that case, the new bucket must be in the same view as the old one.", "type": "integer" }, "cover_image_attachment_id": { @@ -7566,10 +7914,6 @@ 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" }, - "kanban_position": { - "description": "The position of tasks in the kanban board. See the docs for the ` + "`" + `position` + "`" + ` property on how to use this.", - "type": "number" - }, "labels": { "description": "An array of labels which are associated with this task.", "type": "array", @@ -7582,7 +7926,7 @@ const docTemplate = `{ "type": "number" }, "position": { - "description": "The position of the task - any task project can be sorted as usual by this parameter.\nWhen accessing tasks via kanban buckets, this is primarily used to sort them based on a range\nWe're using a float64 here to make it possible to put any task within any two other tasks (by changing the number).\nYou would calculate the new position between two tasks with something like task3.position = (task2.position - task1.position) / 2.\nA 64-Bit float leaves plenty of room to initially give tasks a position with 2^16 difference to the previous task\nwhich also leaves a lot of room for rearranging and sorting later.", + "description": "The position of the task - any task project can be sorted as usual by this parameter.\nWhen accessing tasks via views with buckets, this is primarily used to sort them based on a range.\nPositions are always saved per view. They will automatically be set if you request the tasks through a view\nendpoint, otherwise they will always be 0. To update them, take a look at the Task Position endpoint.", "type": "number" }, "priority": { @@ -7831,16 +8175,12 @@ const docTemplate = `{ "description": "A timestamp when this project was created. You cannot change this value.", "type": "string" }, - "default_bucket_id": { - "description": "The ID of the bucket where new tasks without a bucket are added to. By default, this is the leftmost bucket in a project.", - "type": "integer" - }, "description": { "description": "The description of the project.", "type": "string" }, "done_bucket_id": { - "description": "If tasks are moved to the done bucket, they are marked as done. If they are marked as done individually, they are moved into the done bucket.", + "description": "Deprecated: If tasks are moved to the done bucket, they are marked as done. If they are marked as done individually, they are moved into the done bucket.", "type": "integer" }, "hex_color": { @@ -7898,6 +8238,12 @@ const docTemplate = `{ "updated": { "description": "A timestamp when this project was last updated. You cannot change this value.", "type": "string" + }, + "views": { + "type": "array", + "items": { + "$ref": "#/definitions/models.ProjectView" + } } } }, @@ -7949,6 +8295,96 @@ const docTemplate = `{ } } }, + "models.ProjectView": { + "type": "object", + "properties": { + "bucket_configuration": { + "description": "When the bucket configuration mode is not ` + "`" + `manual` + "`" + `, this field holds the options of that configuration.", + "type": "array", + "items": { + "$ref": "#/definitions/models.ProjectViewBucketConfiguration" + } + }, + "bucket_configuration_mode": { + "description": "The bucket configuration mode. Can be ` + "`" + `none` + "`" + `, ` + "`" + `manual` + "`" + ` or ` + "`" + `filter` + "`" + `. ` + "`" + `manual` + "`" + ` allows to move tasks between buckets as you normally would. ` + "`" + `filter` + "`" + ` creates buckets based on a filter for each bucket.", + "allOf": [ + { + "$ref": "#/definitions/models.BucketConfigurationModeKind" + } + ] + }, + "created": { + "description": "A timestamp when this reaction was created. You cannot change this value.", + "type": "string" + }, + "default_bucket_id": { + "description": "The ID of the bucket where new tasks without a bucket are added to. By default, this is the leftmost bucket in a view.", + "type": "integer" + }, + "done_bucket_id": { + "description": "If tasks are moved to the done bucket, they are marked as done. If they are marked as done individually, they are moved into the done bucket.", + "type": "integer" + }, + "filter": { + "description": "The filter query to match tasks by. Check out https://vikunja.io/docs/filters for a full explanation.", + "type": "string" + }, + "id": { + "description": "The unique numeric id of this view", + "type": "integer" + }, + "position": { + "description": "The position of this view in the list. The list of all views will be sorted by this parameter.", + "type": "number" + }, + "project_id": { + "description": "The project this view belongs to", + "type": "integer" + }, + "title": { + "description": "The title of this view", + "type": "string" + }, + "updated": { + "description": "A timestamp when this view was updated. You cannot change this value.", + "type": "string" + }, + "view_kind": { + "description": "The kind of this view. Can be ` + "`" + `list` + "`" + `, ` + "`" + `gantt` + "`" + `, ` + "`" + `table` + "`" + ` or ` + "`" + `kanban` + "`" + `.", + "allOf": [ + { + "$ref": "#/definitions/models.ProjectViewKind" + } + ] + } + } + }, + "models.ProjectViewBucketConfiguration": { + "type": "object", + "properties": { + "filter": { + "type": "string" + }, + "title": { + "type": "string" + } + } + }, + "models.ProjectViewKind": { + "type": "integer", + "enum": [ + 0, + 1, + 2, + 3 + ], + "x-enum-varnames": [ + "ProjectViewKindList", + "ProjectViewKindGantt", + "ProjectViewKindTable", + "ProjectViewKindKanban" + ] + }, "models.Reaction": { "type": "object", "properties": { @@ -8162,7 +8598,7 @@ const docTemplate = `{ } }, "bucket_id": { - "description": "BucketID is the ID of the kanban bucket this task belongs to.", + "description": "The bucket id. Will only be populated when the task is accessed via a view with buckets.\nCan be used to move a task between buckets. In that case, the new bucket must be in the same view as the old one.", "type": "integer" }, "cover_image_attachment_id": { @@ -8222,10 +8658,6 @@ 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" }, - "kanban_position": { - "description": "The position of tasks in the kanban board. See the docs for the ` + "`" + `position` + "`" + ` property on how to use this.", - "type": "number" - }, "labels": { "description": "An array of labels which are associated with this task.", "type": "array", @@ -8238,7 +8670,7 @@ const docTemplate = `{ "type": "number" }, "position": { - "description": "The position of the task - any task project can be sorted as usual by this parameter.\nWhen accessing tasks via kanban buckets, this is primarily used to sort them based on a range\nWe're using a float64 here to make it possible to put any task within any two other tasks (by changing the number).\nYou would calculate the new position between two tasks with something like task3.position = (task2.position - task1.position) / 2.\nA 64-Bit float leaves plenty of room to initially give tasks a position with 2^16 difference to the previous task\nwhich also leaves a lot of room for rearranging and sorting later.", + "description": "The position of the task - any task project can be sorted as usual by this parameter.\nWhen accessing tasks via views with buckets, this is primarily used to sort them based on a range.\nPositions are always saved per view. They will automatically be set if you request the tasks through a view\nendpoint, otherwise they will always be 0. To update them, take a look at the Task Position endpoint.", "type": "number" }, "priority": { @@ -8342,7 +8774,7 @@ const docTemplate = `{ "type": "object", "properties": { "filter": { - "description": "The filter query to match tasks by. Check out https://vikunja.io/docs/filters for a full explanation of the feature.", + "description": "The filter query to match tasks by. Check out https://vikunja.io/docs/filters for a full explanation.", "type": "string" }, "filter_include_nulls": { @@ -8388,6 +8820,23 @@ const docTemplate = `{ } } }, + "models.TaskPosition": { + "type": "object", + "properties": { + "position": { + "description": "The position of the task - any task project can be sorted as usual by this parameter.\nWhen accessing tasks via kanban buckets, this is primarily used to sort them based on a range\nWe're using a float64 here to make it possible to put any task within any two other tasks (by changing the number).\nYou would calculate the new position between two tasks with something like task3.position = (task2.position - task1.position) / 2.\nA 64-Bit float leaves plenty of room to initially give tasks a position with 2^16 difference to the previous task\nwhich also leaves a lot of room for rearranging and sorting later.\nPositions are always saved per view. They will automatically be set if you request the tasks through a view\nendpoint, otherwise they will always be 0. To update them, take a look at the Task Position endpoint.", + "type": "number" + }, + "project_view_id": { + "description": "The project view this task is related to", + "type": "integer" + }, + "task_id": { + "description": "The ID of the task this position is for", + "type": "integer" + } + } + }, "models.TaskRelation": { "type": "object", "properties": { @@ -9211,8 +9660,6 @@ var SwaggerInfo = &swag.Spec{ Description: "# Pagination\nEvery endpoint capable of pagination will return two headers:\n* `x-pagination-total-pages`: The total number of available pages for this request\n* `x-pagination-result-count`: The number of items returned for this request.\n# Rights\nAll endpoints which return a single item (project, task, etc.) - no array - will also return a `x-max-right` header with the max right the user has on this item as an int where `0` is `Read Only`, `1` is `Read & Write` and `2` is `Admin`.\nThis can be used to show or hide ui elements based on the rights the user has.\n# Errors\nAll errors have an error code and a human-readable error message in addition to the http status code. You should always check for the status code in the response, not only the http status code.\nDue to limitations in the swagger library we're using for this document, only one error per http status code is documented here. Make sure to check the [error docs](https://vikunja.io/docs/errors/) in Vikunja's documentation for a full list of available error codes.\n# Authorization\n**JWT-Auth:** Main authorization method, used for most of the requests. Needs `Authorization: Bearer `-header to authenticate successfully.\n\n**API Token:** You can create scoped API tokens for your user and use the token to make authenticated requests in the context of that user. The token must be provided via an `Authorization: Bearer ` header, similar to jwt auth. See the documentation for the `api` group to manage token creation and revocation.\n\n**BasicAuth:** Only used when requesting tasks via CalDAV.\n", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, - LeftDelim: "{{", - RightDelim: "}}", } func init() { diff --git a/pkg/swagger/swagger.json b/pkg/swagger/swagger.json index d5d89a40b..2d65ab7d1 100644 --- a/pkg/swagger/swagger.json +++ b/pkg/swagger/swagger.json @@ -1883,150 +1883,6 @@ } } }, - "/projects/{id}/buckets": { - "get": { - "security": [ - { - "JWTKeyAuth": [] - } - ], - "description": "Returns all kanban buckets with belong to a project including their tasks. Buckets are always sorted by their `position` in ascending order. Tasks are sorted by their `kanban_position` in ascending order.", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "project" - ], - "summary": "Get all kanban buckets of a project", - "parameters": [ - { - "type": "integer", - "description": "Project Id", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "The page number for tasks. Used for pagination. If not provided, the first page of results is returned.", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "The maximum number of tasks per bucket per page. This parameter is limited by the configured maximum of items per page.", - "name": "per_page", - "in": "query" - }, - { - "type": "string", - "description": "Search tasks by task text.", - "name": "s", - "in": "query" - }, - { - "type": "string", - "description": "The filter query to match tasks by. Check out https://vikunja.io/docs/filters for a full explanation of the feature.", - "name": "filter", - "in": "query" - }, - { - "type": "string", - "description": "The time zone which should be used for date match (statements like ", - "name": "filter_timezone", - "in": "query" - }, - { - "type": "string", - "description": "If set to true the result will include filtered fields whose value is set to `null`. Available values are `true` or `false`. Defaults to `false`.", - "name": "filter_include_nulls", - "in": "query" - } - ], - "responses": { - "200": { - "description": "The buckets with their tasks", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/models.Bucket" - } - } - }, - "500": { - "description": "Internal server error", - "schema": { - "$ref": "#/definitions/models.Message" - } - } - } - }, - "put": { - "security": [ - { - "JWTKeyAuth": [] - } - ], - "description": "Creates a new kanban bucket on a project.", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "project" - ], - "summary": "Create a new bucket", - "parameters": [ - { - "type": "integer", - "description": "Project Id", - "name": "id", - "in": "path", - "required": true - }, - { - "description": "The bucket object", - "name": "bucket", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/models.Bucket" - } - } - ], - "responses": { - "200": { - "description": "The created bucket object.", - "schema": { - "$ref": "#/definitions/models.Bucket" - } - }, - "400": { - "description": "Invalid bucket object provided.", - "schema": { - "$ref": "#/definitions/web.HTTPError" - } - }, - "404": { - "description": "The project does not exist.", - "schema": { - "$ref": "#/definitions/web.HTTPError" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "#/definitions/models.Message" - } - } - } - } - }, "/projects/{id}/projectusers": { "get": { "security": [ @@ -2092,98 +1948,6 @@ } }, "/projects/{id}/tasks": { - "get": { - "security": [ - { - "JWTKeyAuth": [] - } - ], - "description": "Returns all tasks for the current project.", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "task" - ], - "summary": "Get tasks in a project", - "parameters": [ - { - "type": "integer", - "description": "The project ID.", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "The page number. Used for pagination. If not provided, the first page of results is returned.", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "description": "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page.", - "name": "per_page", - "in": "query" - }, - { - "type": "string", - "description": "Search tasks by task text.", - "name": "s", - "in": "query" - }, - { - "type": "string", - "description": "The sorting parameter. You can pass this multiple times to get the tasks ordered by multiple different parametes, along with `order_by`. Possible values to sort by are `id`, `title`, `description`, `done`, `done_at`, `due_date`, `created_by_id`, `project_id`, `repeat_after`, `priority`, `start_date`, `end_date`, `hex_color`, `percent_done`, `uid`, `created`, `updated`. Default is `id`.", - "name": "sort_by", - "in": "query" - }, - { - "type": "string", - "description": "The ordering parameter. Possible values to order by are `asc` or `desc`. Default is `asc`.", - "name": "order_by", - "in": "query" - }, - { - "type": "string", - "description": "The filter query to match tasks by. Check out https://vikunja.io/docs/filters for a full explanation of the feature.", - "name": "filter", - "in": "query" - }, - { - "type": "string", - "description": "The time zone which should be used for date match (statements like ", - "name": "filter_timezone", - "in": "query" - }, - { - "type": "string", - "description": "If set to true the result will include filtered fields whose value is set to `null`. Available values are `true` or `false`. Defaults to `false`.", - "name": "filter_include_nulls", - "in": "query" - } - ], - "responses": { - "200": { - "description": "The tasks", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/models.Task" - } - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "#/definitions/models.Message" - } - } - } - }, "put": { "security": [ { @@ -2523,6 +2287,229 @@ } } }, + "/projects/{id}/views/{view}/buckets": { + "get": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Returns all kanban buckets which belong to that project. Buckets are always sorted by their `position` in ascending order. To get all buckets with their tasks, use the tasks endpoint with a kanban view.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "project" + ], + "summary": "Get all kanban buckets of a project", + "parameters": [ + { + "type": "integer", + "description": "Project ID", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Project view ID", + "name": "view", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "The buckets", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/models.Bucket" + } + } + }, + "500": { + "description": "Internal server error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + }, + "put": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Creates a new kanban bucket on a project.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "project" + ], + "summary": "Create a new bucket", + "parameters": [ + { + "type": "integer", + "description": "Project Id", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Project view ID", + "name": "view", + "in": "path", + "required": true + }, + { + "description": "The bucket object", + "name": "bucket", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/models.Bucket" + } + } + ], + "responses": { + "200": { + "description": "The created bucket object.", + "schema": { + "$ref": "#/definitions/models.Bucket" + } + }, + "400": { + "description": "Invalid bucket object provided.", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "404": { + "description": "The project does not exist.", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "500": { + "description": "Internal error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, + "/projects/{id}/views/{view}/tasks": { + "get": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Returns all tasks for the current project.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "task" + ], + "summary": "Get tasks in a project", + "parameters": [ + { + "type": "integer", + "description": "The project ID.", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "The project view ID.", + "name": "view", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "The page number. Used for pagination. If not provided, the first page of results is returned.", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page.", + "name": "per_page", + "in": "query" + }, + { + "type": "string", + "description": "Search tasks by task text.", + "name": "s", + "in": "query" + }, + { + "type": "string", + "description": "The sorting parameter. You can pass this multiple times to get the tasks ordered by multiple different parametes, along with `order_by`. Possible values to sort by are `id`, `title`, `description`, `done`, `done_at`, `due_date`, `created_by_id`, `project_id`, `repeat_after`, `priority`, `start_date`, `end_date`, `hex_color`, `percent_done`, `uid`, `created`, `updated`. Default is `id`.", + "name": "sort_by", + "in": "query" + }, + { + "type": "string", + "description": "The ordering parameter. Possible values to order by are `asc` or `desc`. Default is `asc`.", + "name": "order_by", + "in": "query" + }, + { + "type": "string", + "description": "The filter query to match tasks by. Check out https://vikunja.io/docs/filters for a full explanation of the feature.", + "name": "filter", + "in": "query" + }, + { + "type": "string", + "description": "The time zone which should be used for date match (statements like ", + "name": "filter_timezone", + "in": "query" + }, + { + "type": "string", + "description": "If set to true the result will include filtered fields whose value is set to `null`. Available values are `true` or `false`. Defaults to `false`.", + "name": "filter_include_nulls", + "in": "query" + } + ], + "responses": { + "200": { + "description": "The tasks", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/models.Task" + } + } + }, + "500": { + "description": "Internal error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, "/projects/{id}/webhooks": { "get": { "security": [ @@ -2747,131 +2734,6 @@ } } }, - "/projects/{projectID}/buckets/{bucketID}": { - "post": { - "security": [ - { - "JWTKeyAuth": [] - } - ], - "description": "Updates an existing kanban bucket.", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "project" - ], - "summary": "Update an existing bucket", - "parameters": [ - { - "type": "integer", - "description": "Project Id", - "name": "projectID", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "Bucket Id", - "name": "bucketID", - "in": "path", - "required": true - }, - { - "description": "The bucket object", - "name": "bucket", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/models.Bucket" - } - } - ], - "responses": { - "200": { - "description": "The created bucket object.", - "schema": { - "$ref": "#/definitions/models.Bucket" - } - }, - "400": { - "description": "Invalid bucket object provided.", - "schema": { - "$ref": "#/definitions/web.HTTPError" - } - }, - "404": { - "description": "The bucket does not exist.", - "schema": { - "$ref": "#/definitions/web.HTTPError" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "#/definitions/models.Message" - } - } - } - }, - "delete": { - "security": [ - { - "JWTKeyAuth": [] - } - ], - "description": "Deletes an existing kanban bucket and dissociates all of its task. It does not delete any tasks. You cannot delete the last bucket on a project.", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "project" - ], - "summary": "Deletes an existing bucket", - "parameters": [ - { - "type": "integer", - "description": "Project Id", - "name": "projectID", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "Bucket Id", - "name": "bucketID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "Successfully deleted.", - "schema": { - "$ref": "#/definitions/models.Message" - } - }, - "404": { - "description": "The bucket does not exist.", - "schema": { - "$ref": "#/definitions/web.HTTPError" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "#/definitions/models.Message" - } - } - } - } - }, "/projects/{projectID}/duplicate": { "put": { "security": [ @@ -3192,6 +3054,145 @@ } } }, + "/projects/{projectID}/views/{view}/buckets/{bucketID}": { + "post": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Updates an existing kanban bucket.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "project" + ], + "summary": "Update an existing bucket", + "parameters": [ + { + "type": "integer", + "description": "Project Id", + "name": "projectID", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Bucket Id", + "name": "bucketID", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Project view ID", + "name": "view", + "in": "path", + "required": true + }, + { + "description": "The bucket object", + "name": "bucket", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/models.Bucket" + } + } + ], + "responses": { + "200": { + "description": "The created bucket object.", + "schema": { + "$ref": "#/definitions/models.Bucket" + } + }, + "400": { + "description": "Invalid bucket object provided.", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "404": { + "description": "The bucket does not exist.", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "500": { + "description": "Internal error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + }, + "delete": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Deletes an existing kanban bucket and dissociates all of its task. It does not delete any tasks. You cannot delete the last bucket on a project.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "project" + ], + "summary": "Deletes an existing bucket", + "parameters": [ + { + "type": "integer", + "description": "Project Id", + "name": "projectID", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Bucket Id", + "name": "bucketID", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Project view ID", + "name": "view", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Successfully deleted.", + "schema": { + "$ref": "#/definitions/models.Message" + } + }, + "404": { + "description": "The bucket does not exist.", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "500": { + "description": "Internal error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, "/projects/{project}/shares": { "get": { "security": [ @@ -3446,6 +3447,281 @@ } } }, + "/projects/{project}/views": { + "get": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Returns all project views for a sepcific project", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "project" + ], + "summary": "Get all project views for a project", + "parameters": [ + { + "type": "integer", + "description": "Project ID", + "name": "project", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "The project views", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/models.ProjectView" + } + } + }, + "500": { + "description": "Internal error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + }, + "put": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Create a project view in a specific project.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "project" + ], + "summary": "Create a project view", + "parameters": [ + { + "type": "integer", + "description": "Project ID", + "name": "project", + "in": "path", + "required": true + }, + { + "description": "The project view you want to create.", + "name": "view", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/models.ProjectView" + } + } + ], + "responses": { + "200": { + "description": "The created project view", + "schema": { + "$ref": "#/definitions/models.ProjectView" + } + }, + "403": { + "description": "The user does not have access to create a project view", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "500": { + "description": "Internal error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, + "/projects/{project}/views/{id}": { + "get": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Returns a project view by its ID.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "project" + ], + "summary": "Get one project view", + "parameters": [ + { + "type": "integer", + "description": "Project ID", + "name": "project", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Project View ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "The project view", + "schema": { + "$ref": "#/definitions/models.ProjectView" + } + }, + "403": { + "description": "The user does not have access to this project view", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "500": { + "description": "Internal error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + }, + "post": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Updates a project view.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "project" + ], + "summary": "Updates a project view", + "parameters": [ + { + "type": "integer", + "description": "Project ID", + "name": "project", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Project View ID", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "The project view with updated values you want to change.", + "name": "view", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/models.ProjectView" + } + } + ], + "responses": { + "200": { + "description": "The updated project view.", + "schema": { + "$ref": "#/definitions/models.ProjectView" + } + }, + "400": { + "description": "Invalid project view object provided.", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "500": { + "description": "Internal error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + }, + "delete": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Deletes a project view.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "project" + ], + "summary": "Delete a project view", + "parameters": [ + { + "type": "integer", + "description": "Project ID", + "name": "project", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Project View ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "The project view was successfully deleted.", + "schema": { + "$ref": "#/definitions/models.Message" + } + }, + "403": { + "description": "The user does not have access to the project view", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "500": { + "description": "Internal error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, "/register": { "post": { "description": "Creates a new user account.", @@ -4261,6 +4537,64 @@ } } }, + "/tasks/{id}/position": { + "post": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Updates a task position.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "task" + ], + "summary": "Updates a task position", + "parameters": [ + { + "type": "integer", + "description": "Task ID", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "The task position with updated values you want to change.", + "name": "view", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/models.TaskPosition" + } + } + ], + "responses": { + "200": { + "description": "The updated task position.", + "schema": { + "$ref": "#/definitions/models.TaskPosition" + } + }, + "400": { + "description": "Invalid task position object provided.", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "500": { + "description": "Internal error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, "/tasks/{taskID}/assignees": { "get": { "security": [ @@ -7446,8 +7780,8 @@ "description": "The position this bucket has when querying all buckets. See the tasks.position property on how to use this.", "type": "number" }, - "project_id": { - "description": "The project this bucket belongs to.", + "project_view_id": { + "description": "The project view this bucket belongs to.", "type": "integer" }, "tasks": { @@ -7468,6 +7802,19 @@ } } }, + "models.BucketConfigurationModeKind": { + "type": "integer", + "enum": [ + 0, + 1, + 2 + ], + "x-enum-varnames": [ + "BucketConfigurationModeNone", + "BucketConfigurationModeManual", + "BucketConfigurationModeFilter" + ] + }, "models.BulkAssignees": { "type": "object", "properties": { @@ -7498,7 +7845,7 @@ } }, "bucket_id": { - "description": "BucketID is the ID of the kanban bucket this task belongs to.", + "description": "The bucket id. Will only be populated when the task is accessed via a view with buckets.\nCan be used to move a task between buckets. In that case, the new bucket must be in the same view as the old one.", "type": "integer" }, "cover_image_attachment_id": { @@ -7558,10 +7905,6 @@ "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" }, - "kanban_position": { - "description": "The position of tasks in the kanban board. See the docs for the `position` property on how to use this.", - "type": "number" - }, "labels": { "description": "An array of labels which are associated with this task.", "type": "array", @@ -7574,7 +7917,7 @@ "type": "number" }, "position": { - "description": "The position of the task - any task project can be sorted as usual by this parameter.\nWhen accessing tasks via kanban buckets, this is primarily used to sort them based on a range\nWe're using a float64 here to make it possible to put any task within any two other tasks (by changing the number).\nYou would calculate the new position between two tasks with something like task3.position = (task2.position - task1.position) / 2.\nA 64-Bit float leaves plenty of room to initially give tasks a position with 2^16 difference to the previous task\nwhich also leaves a lot of room for rearranging and sorting later.", + "description": "The position of the task - any task project can be sorted as usual by this parameter.\nWhen accessing tasks via views with buckets, this is primarily used to sort them based on a range.\nPositions are always saved per view. They will automatically be set if you request the tasks through a view\nendpoint, otherwise they will always be 0. To update them, take a look at the Task Position endpoint.", "type": "number" }, "priority": { @@ -7823,16 +8166,12 @@ "description": "A timestamp when this project was created. You cannot change this value.", "type": "string" }, - "default_bucket_id": { - "description": "The ID of the bucket where new tasks without a bucket are added to. By default, this is the leftmost bucket in a project.", - "type": "integer" - }, "description": { "description": "The description of the project.", "type": "string" }, "done_bucket_id": { - "description": "If tasks are moved to the done bucket, they are marked as done. If they are marked as done individually, they are moved into the done bucket.", + "description": "Deprecated: If tasks are moved to the done bucket, they are marked as done. If they are marked as done individually, they are moved into the done bucket.", "type": "integer" }, "hex_color": { @@ -7890,6 +8229,12 @@ "updated": { "description": "A timestamp when this project was last updated. You cannot change this value.", "type": "string" + }, + "views": { + "type": "array", + "items": { + "$ref": "#/definitions/models.ProjectView" + } } } }, @@ -7941,6 +8286,96 @@ } } }, + "models.ProjectView": { + "type": "object", + "properties": { + "bucket_configuration": { + "description": "When the bucket configuration mode is not `manual`, this field holds the options of that configuration.", + "type": "array", + "items": { + "$ref": "#/definitions/models.ProjectViewBucketConfiguration" + } + }, + "bucket_configuration_mode": { + "description": "The bucket configuration mode. Can be `none`, `manual` or `filter`. `manual` allows to move tasks between buckets as you normally would. `filter` creates buckets based on a filter for each bucket.", + "allOf": [ + { + "$ref": "#/definitions/models.BucketConfigurationModeKind" + } + ] + }, + "created": { + "description": "A timestamp when this reaction was created. You cannot change this value.", + "type": "string" + }, + "default_bucket_id": { + "description": "The ID of the bucket where new tasks without a bucket are added to. By default, this is the leftmost bucket in a view.", + "type": "integer" + }, + "done_bucket_id": { + "description": "If tasks are moved to the done bucket, they are marked as done. If they are marked as done individually, they are moved into the done bucket.", + "type": "integer" + }, + "filter": { + "description": "The filter query to match tasks by. Check out https://vikunja.io/docs/filters for a full explanation.", + "type": "string" + }, + "id": { + "description": "The unique numeric id of this view", + "type": "integer" + }, + "position": { + "description": "The position of this view in the list. The list of all views will be sorted by this parameter.", + "type": "number" + }, + "project_id": { + "description": "The project this view belongs to", + "type": "integer" + }, + "title": { + "description": "The title of this view", + "type": "string" + }, + "updated": { + "description": "A timestamp when this view was updated. You cannot change this value.", + "type": "string" + }, + "view_kind": { + "description": "The kind of this view. Can be `list`, `gantt`, `table` or `kanban`.", + "allOf": [ + { + "$ref": "#/definitions/models.ProjectViewKind" + } + ] + } + } + }, + "models.ProjectViewBucketConfiguration": { + "type": "object", + "properties": { + "filter": { + "type": "string" + }, + "title": { + "type": "string" + } + } + }, + "models.ProjectViewKind": { + "type": "integer", + "enum": [ + 0, + 1, + 2, + 3 + ], + "x-enum-varnames": [ + "ProjectViewKindList", + "ProjectViewKindGantt", + "ProjectViewKindTable", + "ProjectViewKindKanban" + ] + }, "models.Reaction": { "type": "object", "properties": { @@ -8154,7 +8589,7 @@ } }, "bucket_id": { - "description": "BucketID is the ID of the kanban bucket this task belongs to.", + "description": "The bucket id. Will only be populated when the task is accessed via a view with buckets.\nCan be used to move a task between buckets. In that case, the new bucket must be in the same view as the old one.", "type": "integer" }, "cover_image_attachment_id": { @@ -8214,10 +8649,6 @@ "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" }, - "kanban_position": { - "description": "The position of tasks in the kanban board. See the docs for the `position` property on how to use this.", - "type": "number" - }, "labels": { "description": "An array of labels which are associated with this task.", "type": "array", @@ -8230,7 +8661,7 @@ "type": "number" }, "position": { - "description": "The position of the task - any task project can be sorted as usual by this parameter.\nWhen accessing tasks via kanban buckets, this is primarily used to sort them based on a range\nWe're using a float64 here to make it possible to put any task within any two other tasks (by changing the number).\nYou would calculate the new position between two tasks with something like task3.position = (task2.position - task1.position) / 2.\nA 64-Bit float leaves plenty of room to initially give tasks a position with 2^16 difference to the previous task\nwhich also leaves a lot of room for rearranging and sorting later.", + "description": "The position of the task - any task project can be sorted as usual by this parameter.\nWhen accessing tasks via views with buckets, this is primarily used to sort them based on a range.\nPositions are always saved per view. They will automatically be set if you request the tasks through a view\nendpoint, otherwise they will always be 0. To update them, take a look at the Task Position endpoint.", "type": "number" }, "priority": { @@ -8334,7 +8765,7 @@ "type": "object", "properties": { "filter": { - "description": "The filter query to match tasks by. Check out https://vikunja.io/docs/filters for a full explanation of the feature.", + "description": "The filter query to match tasks by. Check out https://vikunja.io/docs/filters for a full explanation.", "type": "string" }, "filter_include_nulls": { @@ -8380,6 +8811,23 @@ } } }, + "models.TaskPosition": { + "type": "object", + "properties": { + "position": { + "description": "The position of the task - any task project can be sorted as usual by this parameter.\nWhen accessing tasks via kanban buckets, this is primarily used to sort them based on a range\nWe're using a float64 here to make it possible to put any task within any two other tasks (by changing the number).\nYou would calculate the new position between two tasks with something like task3.position = (task2.position - task1.position) / 2.\nA 64-Bit float leaves plenty of room to initially give tasks a position with 2^16 difference to the previous task\nwhich also leaves a lot of room for rearranging and sorting later.\nPositions are always saved per view. They will automatically be set if you request the tasks through a view\nendpoint, otherwise they will always be 0. To update them, take a look at the Task Position endpoint.", + "type": "number" + }, + "project_view_id": { + "description": "The project view this task is related to", + "type": "integer" + }, + "task_id": { + "description": "The ID of the task this position is for", + "type": "integer" + } + } + }, "models.TaskRelation": { "type": "object", "properties": { diff --git a/pkg/swagger/swagger.yaml b/pkg/swagger/swagger.yaml index 9a9f34822..a077d6cf7 100644 --- a/pkg/swagger/swagger.yaml +++ b/pkg/swagger/swagger.yaml @@ -123,8 +123,8 @@ definitions: description: The position this bucket has when querying all buckets. See the tasks.position property on how to use this. type: number - project_id: - description: The project this bucket belongs to. + project_view_id: + description: The project view this bucket belongs to. type: integer tasks: description: All tasks which belong to this bucket. @@ -140,6 +140,16 @@ definitions: this value. type: string type: object + models.BucketConfigurationModeKind: + enum: + - 0 + - 1 + - 2 + type: integer + x-enum-varnames: + - BucketConfigurationModeNone + - BucketConfigurationModeManual + - BucketConfigurationModeFilter models.BulkAssignees: properties: assignees: @@ -161,7 +171,9 @@ definitions: $ref: '#/definitions/models.TaskAttachment' type: array bucket_id: - description: BucketID is the ID of the kanban bucket this task belongs to. + description: |- + The bucket id. Will only be populated when the task is accessed via a view with buckets. + Can be used to move a task between buckets. In that case, the new bucket must be in the same view as the old one. type: integer cover_image_attachment_id: description: If this task has a cover image, the field will return the id @@ -209,10 +221,6 @@ definitions: a separate "Important" project. This value depends on the user making the call to the api. type: boolean - kanban_position: - description: The position of tasks in the kanban board. See the docs for the - `position` property on how to use this. - type: number labels: description: An array of labels which are associated with this task. items: @@ -224,11 +232,9 @@ definitions: position: description: |- The position of the task - any task project can be sorted as usual by this parameter. - When accessing tasks via kanban buckets, this is primarily used to sort them based on a range - We're using a float64 here to make it possible to put any task within any two other tasks (by changing the number). - You would calculate the new position between two tasks with something like task3.position = (task2.position - task1.position) / 2. - A 64-Bit float leaves plenty of room to initially give tasks a position with 2^16 difference to the previous task - which also leaves a lot of room for rearranging and sorting later. + When accessing tasks via views with buckets, this is primarily used to sort them based on a range. + Positions are always saved per view. They will automatically be set if you request the tasks through a view + endpoint, otherwise they will always be 0. To update them, take a look at the Task Position endpoint. type: number priority: description: The task priority. Can be anything you want, it is possible to @@ -422,16 +428,13 @@ definitions: description: A timestamp when this project was created. You cannot change this value. type: string - default_bucket_id: - description: The ID of the bucket where new tasks without a bucket are added - to. By default, this is the leftmost bucket in a project. - type: integer description: description: The description of the project. type: string done_bucket_id: - description: If tasks are moved to the done bucket, they are marked as done. - If they are marked as done individually, they are moved into the done bucket. + description: 'Deprecated: If tasks are moved to the done bucket, they are + marked as done. If they are marked as done individually, they are moved + into the done bucket.' type: integer hex_color: description: The hex color of this project @@ -478,6 +481,10 @@ definitions: description: A timestamp when this project was last updated. You cannot change this value. type: string + views: + items: + $ref: '#/definitions/models.ProjectView' + type: array type: object models.ProjectDuplicate: properties: @@ -513,6 +520,77 @@ definitions: description: The username. type: string type: object + models.ProjectView: + properties: + bucket_configuration: + description: When the bucket configuration mode is not `manual`, this field + holds the options of that configuration. + items: + $ref: '#/definitions/models.ProjectViewBucketConfiguration' + type: array + bucket_configuration_mode: + allOf: + - $ref: '#/definitions/models.BucketConfigurationModeKind' + description: The bucket configuration mode. Can be `none`, `manual` or `filter`. + `manual` allows to move tasks between buckets as you normally would. `filter` + creates buckets based on a filter for each bucket. + created: + description: A timestamp when this reaction was created. You cannot change + this value. + type: string + default_bucket_id: + description: The ID of the bucket where new tasks without a bucket are added + to. By default, this is the leftmost bucket in a view. + type: integer + done_bucket_id: + description: If tasks are moved to the done bucket, they are marked as done. + If they are marked as done individually, they are moved into the done bucket. + type: integer + filter: + description: The filter query to match tasks by. Check out https://vikunja.io/docs/filters + for a full explanation. + type: string + id: + description: The unique numeric id of this view + type: integer + position: + description: The position of this view in the list. The list of all views + will be sorted by this parameter. + type: number + project_id: + description: The project this view belongs to + type: integer + title: + description: The title of this view + type: string + updated: + description: A timestamp when this view was updated. You cannot change this + value. + type: string + view_kind: + allOf: + - $ref: '#/definitions/models.ProjectViewKind' + description: The kind of this view. Can be `list`, `gantt`, `table` or `kanban`. + type: object + models.ProjectViewBucketConfiguration: + properties: + filter: + type: string + title: + type: string + type: object + models.ProjectViewKind: + enum: + - 0 + - 1 + - 2 + - 3 + type: integer + x-enum-varnames: + - ProjectViewKindList + - ProjectViewKindGantt + - ProjectViewKindTable + - ProjectViewKindKanban models.Reaction: properties: created: @@ -671,7 +749,9 @@ definitions: $ref: '#/definitions/models.TaskAttachment' type: array bucket_id: - description: BucketID is the ID of the kanban bucket this task belongs to. + description: |- + The bucket id. Will only be populated when the task is accessed via a view with buckets. + Can be used to move a task between buckets. In that case, the new bucket must be in the same view as the old one. type: integer cover_image_attachment_id: description: If this task has a cover image, the field will return the id @@ -719,10 +799,6 @@ definitions: a separate "Important" project. This value depends on the user making the call to the api. type: boolean - kanban_position: - description: The position of tasks in the kanban board. See the docs for the - `position` property on how to use this. - type: number labels: description: An array of labels which are associated with this task. items: @@ -734,11 +810,9 @@ definitions: position: description: |- The position of the task - any task project can be sorted as usual by this parameter. - When accessing tasks via kanban buckets, this is primarily used to sort them based on a range - We're using a float64 here to make it possible to put any task within any two other tasks (by changing the number). - You would calculate the new position between two tasks with something like task3.position = (task2.position - task1.position) / 2. - A 64-Bit float leaves plenty of room to initially give tasks a position with 2^16 difference to the previous task - which also leaves a lot of room for rearranging and sorting later. + When accessing tasks via views with buckets, this is primarily used to sort them based on a range. + Positions are always saved per view. They will automatically be set if you request the tasks through a view + endpoint, otherwise they will always be 0. To update them, take a look at the Task Position endpoint. type: number priority: description: The task priority. Can be anything you want, it is possible to @@ -814,7 +888,7 @@ definitions: properties: filter: description: The filter query to match tasks by. Check out https://vikunja.io/docs/filters - for a full explanation of the feature. + for a full explanation. type: string filter_include_nulls: description: If set to true, the result will also include null values @@ -847,6 +921,26 @@ definitions: updated: type: string type: object + models.TaskPosition: + properties: + position: + description: |- + The position of the task - any task project can be sorted as usual by this parameter. + When accessing tasks via kanban buckets, this is primarily used to sort them based on a range + We're using a float64 here to make it possible to put any task within any two other tasks (by changing the number). + You would calculate the new position between two tasks with something like task3.position = (task2.position - task1.position) / 2. + A 64-Bit float leaves plenty of room to initially give tasks a position with 2^16 difference to the previous task + which also leaves a lot of room for rearranging and sorting later. + Positions are always saved per view. They will automatically be set if you request the tasks through a view + endpoint, otherwise they will always be 0. To update them, take a look at the Task Position endpoint. + type: number + project_view_id: + description: The project view this task is related to + type: integer + task_id: + description: The ID of the task this position is for + type: integer + type: object models.TaskRelation: properties: created: @@ -2850,107 +2944,6 @@ paths: summary: Upload a project background tags: - project - /projects/{id}/buckets: - get: - consumes: - - application/json - description: Returns all kanban buckets with belong to a project including their - tasks. Buckets are always sorted by their `position` in ascending order. Tasks - are sorted by their `kanban_position` in ascending order. - parameters: - - description: Project Id - in: path - name: id - required: true - type: integer - - description: The page number for tasks. Used for pagination. If not provided, - the first page of results is returned. - in: query - name: page - type: integer - - description: The maximum number of tasks per bucket per page. This parameter - is limited by the configured maximum of items per page. - in: query - name: per_page - type: integer - - description: Search tasks by task text. - in: query - name: s - type: string - - description: The filter query to match tasks by. Check out https://vikunja.io/docs/filters - for a full explanation of the feature. - in: query - name: filter - type: string - - description: 'The time zone which should be used for date match (statements - like ' - in: query - name: filter_timezone - type: string - - description: If set to true the result will include filtered fields whose - value is set to `null`. Available values are `true` or `false`. Defaults - to `false`. - in: query - name: filter_include_nulls - type: string - produces: - - application/json - responses: - "200": - description: The buckets with their tasks - schema: - items: - $ref: '#/definitions/models.Bucket' - type: array - "500": - description: Internal server error - schema: - $ref: '#/definitions/models.Message' - security: - - JWTKeyAuth: [] - summary: Get all kanban buckets of a project - tags: - - project - put: - consumes: - - application/json - description: Creates a new kanban bucket on a project. - parameters: - - description: Project Id - in: path - name: id - required: true - type: integer - - description: The bucket object - in: body - name: bucket - required: true - schema: - $ref: '#/definitions/models.Bucket' - produces: - - application/json - responses: - "200": - description: The created bucket object. - schema: - $ref: '#/definitions/models.Bucket' - "400": - description: Invalid bucket object provided. - schema: - $ref: '#/definitions/web.HTTPError' - "404": - description: The project does not exist. - schema: - $ref: '#/definitions/web.HTTPError' - "500": - description: Internal error - schema: - $ref: '#/definitions/models.Message' - security: - - JWTKeyAuth: [] - summary: Create a new bucket - tags: - - project /projects/{id}/projectusers: get: consumes: @@ -2994,78 +2987,6 @@ paths: tags: - project /projects/{id}/tasks: - get: - consumes: - - application/json - description: Returns all tasks for the current project. - parameters: - - description: The project ID. - in: path - name: id - required: true - type: integer - - description: The page number. Used for pagination. If not provided, the first - page of results is returned. - in: query - name: page - type: integer - - description: The maximum number of items per page. Note this parameter is - limited by the configured maximum of items per page. - in: query - name: per_page - type: integer - - description: Search tasks by task text. - in: query - name: s - type: string - - description: The sorting parameter. You can pass this multiple times to get - the tasks ordered by multiple different parametes, along with `order_by`. - Possible values to sort by are `id`, `title`, `description`, `done`, `done_at`, - `due_date`, `created_by_id`, `project_id`, `repeat_after`, `priority`, `start_date`, - `end_date`, `hex_color`, `percent_done`, `uid`, `created`, `updated`. Default - is `id`. - in: query - name: sort_by - type: string - - description: The ordering parameter. Possible values to order by are `asc` - or `desc`. Default is `asc`. - in: query - name: order_by - type: string - - description: The filter query to match tasks by. Check out https://vikunja.io/docs/filters - for a full explanation of the feature. - in: query - name: filter - type: string - - description: 'The time zone which should be used for date match (statements - like ' - in: query - name: filter_timezone - type: string - - description: If set to true the result will include filtered fields whose - value is set to `null`. Available values are `true` or `false`. Defaults - to `false`. - in: query - name: filter_include_nulls - type: string - produces: - - application/json - responses: - "200": - description: The tasks - schema: - items: - $ref: '#/definitions/models.Task' - type: array - "500": - description: Internal error - schema: - $ref: '#/definitions/models.Message' - security: - - JWTKeyAuth: [] - summary: Get tasks in a project - tags: - - task put: consumes: - application/json @@ -3288,6 +3209,165 @@ paths: summary: Add a user to a project tags: - sharing + /projects/{id}/views/{view}/buckets: + get: + consumes: + - application/json + description: Returns all kanban buckets which belong to that project. Buckets + are always sorted by their `position` in ascending order. To get all buckets + with their tasks, use the tasks endpoint with a kanban view. + parameters: + - description: Project ID + in: path + name: id + required: true + type: integer + - description: Project view ID + in: path + name: view + required: true + type: integer + produces: + - application/json + responses: + "200": + description: The buckets + schema: + items: + $ref: '#/definitions/models.Bucket' + type: array + "500": + description: Internal server error + schema: + $ref: '#/definitions/models.Message' + security: + - JWTKeyAuth: [] + summary: Get all kanban buckets of a project + tags: + - project + put: + consumes: + - application/json + description: Creates a new kanban bucket on a project. + parameters: + - description: Project Id + in: path + name: id + required: true + type: integer + - description: Project view ID + in: path + name: view + required: true + type: integer + - description: The bucket object + in: body + name: bucket + required: true + schema: + $ref: '#/definitions/models.Bucket' + produces: + - application/json + responses: + "200": + description: The created bucket object. + schema: + $ref: '#/definitions/models.Bucket' + "400": + description: Invalid bucket object provided. + schema: + $ref: '#/definitions/web.HTTPError' + "404": + description: The project does not exist. + schema: + $ref: '#/definitions/web.HTTPError' + "500": + description: Internal error + schema: + $ref: '#/definitions/models.Message' + security: + - JWTKeyAuth: [] + summary: Create a new bucket + tags: + - project + /projects/{id}/views/{view}/tasks: + get: + consumes: + - application/json + description: Returns all tasks for the current project. + parameters: + - description: The project ID. + in: path + name: id + required: true + type: integer + - description: The project view ID. + in: path + name: view + required: true + type: integer + - description: The page number. Used for pagination. If not provided, the first + page of results is returned. + in: query + name: page + type: integer + - description: The maximum number of items per page. Note this parameter is + limited by the configured maximum of items per page. + in: query + name: per_page + type: integer + - description: Search tasks by task text. + in: query + name: s + type: string + - description: The sorting parameter. You can pass this multiple times to get + the tasks ordered by multiple different parametes, along with `order_by`. + Possible values to sort by are `id`, `title`, `description`, `done`, `done_at`, + `due_date`, `created_by_id`, `project_id`, `repeat_after`, `priority`, `start_date`, + `end_date`, `hex_color`, `percent_done`, `uid`, `created`, `updated`. Default + is `id`. + in: query + name: sort_by + type: string + - description: The ordering parameter. Possible values to order by are `asc` + or `desc`. Default is `asc`. + in: query + name: order_by + type: string + - description: The filter query to match tasks by. Check out https://vikunja.io/docs/filters + for a full explanation of the feature. + in: query + name: filter + type: string + - description: 'The time zone which should be used for date match (statements + like ' + in: query + name: filter_timezone + type: string + - description: If set to true the result will include filtered fields whose + value is set to `null`. Available values are `true` or `false`. Defaults + to `false`. + in: query + name: filter_include_nulls + type: string + produces: + - application/json + responses: + "200": + description: The tasks + schema: + items: + $ref: '#/definitions/models.Task' + type: array + "500": + description: Internal error + schema: + $ref: '#/definitions/models.Message' + security: + - JWTKeyAuth: [] + summary: Get tasks in a project + tags: + - task /projects/{id}/webhooks: get: consumes: @@ -3604,32 +3684,60 @@ paths: summary: Get one link shares for a project tags: - sharing - /projects/{projectID}/buckets/{bucketID}: - delete: + /projects/{project}/views: + get: consumes: - application/json - description: Deletes an existing kanban bucket and dissociates all of its task. - It does not delete any tasks. You cannot delete the last bucket on a project. + description: Returns all project views for a sepcific project parameters: - - description: Project Id + - description: Project ID in: path - name: projectID - required: true - type: integer - - description: Bucket Id - in: path - name: bucketID + name: project required: true type: integer produces: - application/json responses: "200": - description: Successfully deleted. + description: The project views + schema: + items: + $ref: '#/definitions/models.ProjectView' + type: array + "500": + description: Internal error schema: $ref: '#/definitions/models.Message' - "404": - description: The bucket does not exist. + security: + - JWTKeyAuth: [] + summary: Get all project views for a project + tags: + - project + put: + consumes: + - application/json + description: Create a project view in a specific project. + parameters: + - description: Project ID + in: path + name: project + required: true + type: integer + - description: The project view you want to create. + in: body + name: view + required: true + schema: + $ref: '#/definitions/models.ProjectView' + produces: + - application/json + responses: + "200": + description: The created project view + schema: + $ref: '#/definitions/models.ProjectView' + "403": + description: The user does not have access to create a project view schema: $ref: '#/definitions/web.HTTPError' "500": @@ -3638,43 +3746,110 @@ paths: $ref: '#/definitions/models.Message' security: - JWTKeyAuth: [] - summary: Deletes an existing bucket + summary: Create a project view + tags: + - project + /projects/{project}/views/{id}: + delete: + consumes: + - application/json + description: Deletes a project view. + parameters: + - description: Project ID + in: path + name: project + required: true + type: integer + - description: Project View ID + in: path + name: id + required: true + type: integer + produces: + - application/json + responses: + "200": + description: The project view was successfully deleted. + schema: + $ref: '#/definitions/models.Message' + "403": + description: The user does not have access to the project view + schema: + $ref: '#/definitions/web.HTTPError' + "500": + description: Internal error + schema: + $ref: '#/definitions/models.Message' + security: + - JWTKeyAuth: [] + summary: Delete a project view + tags: + - project + get: + consumes: + - application/json + description: Returns a project view by its ID. + parameters: + - description: Project ID + in: path + name: project + required: true + type: integer + - description: Project View ID + in: path + name: id + required: true + type: integer + produces: + - application/json + responses: + "200": + description: The project view + schema: + $ref: '#/definitions/models.ProjectView' + "403": + description: The user does not have access to this project view + schema: + $ref: '#/definitions/web.HTTPError' + "500": + description: Internal error + schema: + $ref: '#/definitions/models.Message' + security: + - JWTKeyAuth: [] + summary: Get one project view tags: - project post: consumes: - application/json - description: Updates an existing kanban bucket. + description: Updates a project view. parameters: - - description: Project Id + - description: Project ID in: path - name: projectID + name: project required: true type: integer - - description: Bucket Id + - description: Project View ID in: path - name: bucketID + name: id required: true type: integer - - description: The bucket object + - description: The project view with updated values you want to change. in: body - name: bucket + name: view required: true schema: - $ref: '#/definitions/models.Bucket' + $ref: '#/definitions/models.ProjectView' produces: - application/json responses: "200": - description: The created bucket object. + description: The updated project view. schema: - $ref: '#/definitions/models.Bucket' + $ref: '#/definitions/models.ProjectView' "400": - description: Invalid bucket object provided. - schema: - $ref: '#/definitions/web.HTTPError' - "404": - description: The bucket does not exist. + description: Invalid project view object provided. schema: $ref: '#/definitions/web.HTTPError' "500": @@ -3683,7 +3858,7 @@ paths: $ref: '#/definitions/models.Message' security: - JWTKeyAuth: [] - summary: Update an existing bucket + summary: Updates a project view tags: - project /projects/{projectID}/duplicate: @@ -3900,6 +4075,98 @@ paths: summary: Update a user <-> project relation tags: - sharing + /projects/{projectID}/views/{view}/buckets/{bucketID}: + delete: + consumes: + - application/json + description: Deletes an existing kanban bucket and dissociates all of its task. + It does not delete any tasks. You cannot delete the last bucket on a project. + parameters: + - description: Project Id + in: path + name: projectID + required: true + type: integer + - description: Bucket Id + in: path + name: bucketID + required: true + type: integer + - description: Project view ID + in: path + name: view + required: true + type: integer + produces: + - application/json + responses: + "200": + description: Successfully deleted. + schema: + $ref: '#/definitions/models.Message' + "404": + description: The bucket does not exist. + schema: + $ref: '#/definitions/web.HTTPError' + "500": + description: Internal error + schema: + $ref: '#/definitions/models.Message' + security: + - JWTKeyAuth: [] + summary: Deletes an existing bucket + tags: + - project + post: + consumes: + - application/json + description: Updates an existing kanban bucket. + parameters: + - description: Project Id + in: path + name: projectID + required: true + type: integer + - description: Bucket Id + in: path + name: bucketID + required: true + type: integer + - description: Project view ID + in: path + name: view + required: true + type: integer + - description: The bucket object + in: body + name: bucket + required: true + schema: + $ref: '#/definitions/models.Bucket' + produces: + - application/json + responses: + "200": + description: The created bucket object. + schema: + $ref: '#/definitions/models.Bucket' + "400": + description: Invalid bucket object provided. + schema: + $ref: '#/definitions/web.HTTPError' + "404": + description: The bucket does not exist. + schema: + $ref: '#/definitions/web.HTTPError' + "500": + description: Internal error + schema: + $ref: '#/definitions/models.Message' + security: + - JWTKeyAuth: [] + summary: Update an existing bucket + tags: + - project /register: post: consumes: @@ -4334,6 +4601,43 @@ paths: summary: Get one attachment. tags: - task + /tasks/{id}/position: + post: + consumes: + - application/json + description: Updates a task position. + parameters: + - description: Task ID + in: path + name: id + required: true + type: integer + - description: The task position with updated values you want to change. + in: body + name: view + required: true + schema: + $ref: '#/definitions/models.TaskPosition' + produces: + - application/json + responses: + "200": + description: The updated task position. + schema: + $ref: '#/definitions/models.TaskPosition' + "400": + description: Invalid task position object provided. + schema: + $ref: '#/definitions/web.HTTPError' + "500": + description: Internal error + schema: + $ref: '#/definitions/models.Message' + security: + - JWTKeyAuth: [] + summary: Updates a task position + tags: + - task /tasks/{task}/labels: get: consumes: