{
    "swagger": "2.0",
    "info": {
        "description": "Public Toggl Focus API.\nNote:\nAuthentication is implemented using a secure cookie stored in __Secure-accounts-session",
        "title": "Toggl Focus API",
        "termsOfService": "https://toggl.com/terms/",
        "contact": {},
        "license": {
            "name": "Toggl Proprietary License"
        },
        "version": "1"
    },
    "host": "localhost:8080",
    "basePath": "/api",
    "paths": {
        "/accounts/me/metadata": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "accounts"
                ],
                "summary": "Retrieve user metadata",
                "operationId": "user-metadata",
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/authentication.UserMetadata"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/agent-ws/workspaces/{workspace_id}/agent": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": [],
                        "queryAuth": []
                    }
                ],
                "description": "Upgrades to a WS connection to Focus Agent.",
                "tags": [
                    "agents"
                ],
                "summary": "Focus Agent Websocket",
                "operationId": "agent-ws",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "chat ID",
                        "name": "chat_id",
                        "in": "query"
                    }
                ],
                "responses": {
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/agent-ws/workspaces/{workspace_id}/scheduler-agent": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": [],
                        "queryAuth": []
                    }
                ],
                "description": "Upgrades to a WS connection to Focus Agent.",
                "tags": [
                    "agents"
                ],
                "summary": "Focus Agent Websocket",
                "operationId": "scheduler-agent-ws",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "chat ID",
                        "name": "chat_id",
                        "in": "query"
                    }
                ],
                "responses": {
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/backoffice/betaflags": {
            "get": {
                "security": [
                    {
                        "cookieAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "backoffice"
                ],
                "summary": "Return all beta flags",
                "operationId": "beta-features-all",
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/betafeatures.BetaFeature"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "cookieAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "backoffice"
                ],
                "summary": "Allows to create a new beta flag",
                "operationId": "beta-features-post",
                "parameters": [
                    {
                        "description": "Beta flag data",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/betafeatures.BetaFeaturePayload"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/betafeatures.BetaFeature"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/backoffice/betaflags/code/{code}": {
            "put": {
                "security": [
                    {
                        "cookieAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "backoffice"
                ],
                "summary": "Allows to change value of enabled for all flag",
                "operationId": "beta-features-update",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Code of beta flag",
                        "name": "code",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Beta flag data",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/backoffice.betaFeaturePayload"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/backoffice/betaflags/{user_id}": {
            "get": {
                "security": [
                    {
                        "cookieAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "backoffice"
                ],
                "summary": "Return all beta flags with vaue for user",
                "operationId": "beta-features-user",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "User ID",
                        "name": "user_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/betafeatures.BetaFeatureUser"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "cookieAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "backoffice"
                ],
                "summary": "Allows to set value of the beta flag",
                "operationId": "beta-features-user-put",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "User ID",
                        "name": "user_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/backoffice/user": {
            "get": {
                "security": [
                    {
                        "cookieAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "backoffice"
                ],
                "summary": "Search user using email",
                "operationId": "user-search",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Search query",
                        "name": "search",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/user.User"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/backoffice/user/{user_id}": {
            "get": {
                "security": [
                    {
                        "cookieAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "backoffice"
                ],
                "summary": "Fetch user using ID",
                "operationId": "user-get",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "User ID",
                        "name": "user_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/user.User"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/dev/organizations/{organization_id}/workspaces/{workspace_id}/roles-with-permissions": {
            "get": {
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "description": "Returns workspace-level roles and their permissions for the given organization and workspace. Permissions are filtered by the current user's plan.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "dev"
                ],
                "summary": "Get roles with permissions for a workspace",
                "operationId": "get-roles-with-permissions",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of roles with permissions",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/types.Role"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request (e.g. invalid IDs)",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "No access to organization",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Organization or roles not found in authorization service",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/importer/{organization_id}/sources": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of workspaces, entities that can be used to import to Focus.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "importer"
                ],
                "summary": "List workspaces, entities available to use as import source.",
                "operationId": "list-sources",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/importer.source"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/importer/{organization_id}/{workspace_id}": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns the current import job for a workspace",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "importer"
                ],
                "summary": "Get current import job for a workspace",
                "operationId": "get-current-import-job",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/importer.ImportJob"
                        }
                    },
                    "204": {
                        "description": "No Content",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Starts the import process from the specified workspace and entity from specified product.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "importer"
                ],
                "summary": "Start import from chosen product, workspace and entitity.",
                "operationId": "start-import",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Import payload",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/importer.importRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The created import job",
                        "schema": {
                            "$ref": "#/definitions/importer.ImportJob"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "409": {
                        "description": "Already have an import in progress",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/importer/{organization_id}/{workspace_id}/jobs": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of import jobs for a workspace with optional filters",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "importer"
                ],
                "summary": "List import jobs for a workspace",
                "operationId": "list-import-jobs",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Filter by source product ID (1 for Track, 4 for Plan)",
                        "name": "source_product_id",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by status, comma-separated (pending, active, completed, failed)",
                        "name": "status",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/importer.ImportJobResponse"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/importer/{organization_id}/{workspace_id}/preview": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Preview for importing data",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "importer"
                ],
                "summary": "Preview for import",
                "operationId": "preview-import",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "target organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "target workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Import payload",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/importer.importRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/importer.importPreview"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/importer/{organization_id}/{workspace_id}/{job_id}": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns the import job for a workspace",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "importer"
                ],
                "summary": "Get import job for a workspace",
                "operationId": "get-import-job",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "import job ID",
                        "name": "job_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/importer.ImportJob"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/groups": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates a group under an organization for the given users and workspaces.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "organization"
                ],
                "summary": "Create organization group",
                "operationId": "create-organization-group",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "group data",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/organization.GroupRequest"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/orgprivate.Group"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "User does not have access",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/groups/me": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Get groups the current user belongs to",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "organization"
                ],
                "summary": "Get current user's groups",
                "operationId": "get-my-groups",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/client.UserGroupInfoResponse"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "User does not have access to the organization",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/groups/{group_id}": {
            "put": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Updates a group under an organization.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "organization"
                ],
                "summary": "Update organization group",
                "operationId": "update-organization-group",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "group ID",
                        "name": "group_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "group data",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/organization.GroupRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/orgprivate.Group"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "User does not have access",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Group not found",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Deletes a group from an organization.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "organization"
                ],
                "summary": "Delete organization group",
                "operationId": "delete-organization-group",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "group ID",
                        "name": "group_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID (required for permission check)",
                        "name": "workspace_id",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "boolean"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "User does not have access",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Group not found",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/public-holidays": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns public holidays of organization users",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "public-holidays"
                ],
                "summary": "Get public holidays of organization users",
                "operationId": "get-public-holidays-by-user-ids",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "User IDs",
                        "name": "user_id",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Start date (YYYY-MM-DD)",
                        "name": "start_date",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "End date (YYYY-MM-DD)",
                        "name": "end_date",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/shareddata.PublicHolidayWithUserAccountID"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameters",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/roles": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Get organization roles",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "organization"
                ],
                "summary": "Get organization roles",
                "operationId": "get-organization-roles",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/types.Role"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "User does not have access to the organization",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/subscriptions/current": {
            "get": {
                "description": "Get current subscription.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "subscriptions"
                ],
                "summary": "Get current subscription",
                "operationId": "get-current-subscription",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/subscription.getCurrentResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/subscriptions/trials/current": {
            "get": {
                "description": "Get the current active trial for the Focus product.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "subscriptions"
                ],
                "summary": "Get current trial",
                "operationId": "get-current-trial",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Current active trial",
                        "schema": {
                            "$ref": "#/definitions/subscription.getCurrentTrialResponse"
                        }
                    },
                    "204": {
                        "description": "No active trial found"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/teams": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Gets groups for a workspace, checking view_user_groups permission. Hydrates with local ghosts if any.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "organization"
                ],
                "summary": "Get organization teams with ghost IDs.",
                "operationId": "get-organization-teams",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID (required for permission check)",
                        "name": "workspace_id",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "results per page",
                        "name": "per_page",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Direction to sort by (asc/desc)",
                        "name": "sort_dir",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by name",
                        "name": "filter",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Filter groups that contain this organization user",
                        "name": "organization_user_id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "Filter by group IDs",
                        "name": "group_ids",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/page.Envelope-organization_GroupWithGhosts"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "User does not have permission to view groups",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/timeoff": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns time offs of organization users",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Time Off"
                ],
                "summary": "Get time offs of organization users",
                "operationId": "get-timeoffs-by-user-ids",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "User IDs",
                        "name": "user_id",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "From date (YYYY-MM-DD)",
                        "name": "start_date",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "To date (YYYY-MM-DD)",
                        "name": "end_date",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/shareddata.TimeOffWithoutPersonalInfo"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameters",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/timeoff/users/{user_id}": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns time off for organization user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Time Off"
                ],
                "summary": "Get time off for organization user",
                "operationId": "get-timeoff-for-user",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "User ID",
                        "name": "user_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "From date (YYYY-MM-DD)",
                        "name": "from",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "To date (YYYY-MM-DD)",
                        "name": "to",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/shareddata.TimeOff"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameters",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Updates time off for the specified user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Time Off"
                ],
                "summary": "Update time off for the specified user",
                "operationId": "update-timeoff-for-user",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "User ID",
                        "name": "user_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Time off payload",
                        "name": "timeoff",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/shareddata.TimeOffUpdateInput"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/shareddata.TimeOff"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameters",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates time off for the specified user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Time Off"
                ],
                "summary": "Create time off for the specified user",
                "operationId": "create-timeoff-for-user",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "User ID",
                        "name": "user_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Time off payload",
                        "name": "timeoff",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/shareddata.TimeOffCreateInput"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/shareddata.TimeOff"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameters",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Deletes time off for the specified user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Time Off"
                ],
                "summary": "Delete time off for the specified user",
                "operationId": "delete-timeoff-for-user",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "User ID",
                        "name": "user_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Time off ids payload",
                        "name": "ids",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid parameters",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/users": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Proxies to accounts organization users endpoint with guest scoping. Guests only see users who share projects with them.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "organization"
                ],
                "summary": "Get organization users",
                "operationId": "get-organization-users",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "Filter by workspace IDs",
                        "name": "workspaces",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "Filter by user account IDs",
                        "name": "user_account_ids",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "Filter by organization user IDs",
                        "name": "org_user_ids",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "Filter by group IDs",
                        "name": "groups",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "Filter by toggl products",
                        "name": "toggl_products",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "Filter by active status",
                        "name": "active_status",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "Filter by roles",
                        "name": "roles",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "Only return admins",
                        "name": "only_admins",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter by name or email",
                        "name": "filter",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Sort direction (asc/desc)",
                        "name": "sort_dir",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Results per page",
                        "name": "per_page",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "Filter by tag IDs",
                        "name": "tag_ids",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "Include working hours in response",
                        "name": "include_working_hours",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "Include user rates data for each user",
                        "name": "include_rates",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "Pin specific users at the top (respects array order)",
                        "name": "pinned_ids",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/organization.OrganizationUserResponse"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "User does not have access to the organization",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workinghours/users/{user_id}": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns working hours for organization user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Working Hours"
                ],
                "summary": "Get working hours for organization user",
                "operationId": "get-working-hours-for-user",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "User ID",
                        "name": "user_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/shareddata.WorkingHours"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid year",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Updates working hours for the specified user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Working Hours"
                ],
                "summary": "Update working hours for the specified user",
                "operationId": "update-working-hours-for-user",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "User ID",
                        "name": "user_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Working hours payload",
                        "name": "working_hours",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/shareddata.WorkingHoursUpdateInput"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/shareddata.WorkingHours"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid year",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates working hours for the specified user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Working Hours"
                ],
                "summary": "Create working hours for the specified user",
                "operationId": "create-working-hours-for-user",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "User ID",
                        "name": "user_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Working hours payload",
                        "name": "working_hours",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/shareddata.WorkingHoursCreateInput"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/shareddata.WorkingHours"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid year",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Deletes working hours for the specified user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Working Hours"
                ],
                "summary": "Delete working hours for the specified user",
                "operationId": "delete-working-hours-for-user",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "User ID",
                        "name": "user_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Working hour ids payload",
                        "name": "ids",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid year",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/capacities/{group}": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "capacities"
                ],
                "operationId": "capacity-get-computations",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "enum": [
                            "users"
                        ],
                        "type": "string",
                        "description": "group of computations",
                        "name": "group",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "get capacity computations for the user given their ID",
                        "name": "user_id",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "get capacity computations for the resource/ghost given their ID",
                        "name": "ghost_id",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "start date of computation",
                        "name": "start_date",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "end date of computation",
                        "name": "end_date",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "boolean",
                        "description": "task privacy used to compute for capacity",
                        "name": "private",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "focus",
                                "google_calendar",
                                "outlook_calendar"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "filter task sources",
                        "name": "task_source",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "day",
                            "week",
                            "month",
                            "quarter"
                        ],
                        "type": "string",
                        "description": "unit of time for computation. default: day",
                        "name": "unit",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Computations grouped",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.ComputationGroup"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/composite/projects": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates the main project, project members, and milestones. Milestones are automatically associated with the project.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "composite"
                ],
                "summary": "Creates the main project, project members, and milestones.",
                "operationId": "composite-create-project",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Project composite creation payload",
                        "name": "composite",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/composite.CreateProjectPayload"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Composite project creation success",
                        "schema": {
                            "$ref": "#/definitions/composite.CreateProjectResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/composite/tasks": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates the main task, subtasks, time blocks and time entries in bulk.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "composite"
                ],
                "summary": "Creates the main task, subtasks, time blocks and time entries in bulk",
                "operationId": "composite-create-task",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Tasks composite creation payload",
                        "name": "composite",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/composite.CreateTasksPayload"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Composite task creation success",
                        "schema": {
                            "$ref": "#/definitions/composite.CreateTasksResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/custom-fields": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of custom fields for the workspace.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "custom-fields"
                ],
                "summary": "List custom fields",
                "operationId": "list-custom-fields",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "enum": [
                            "project"
                        ],
                        "type": "string",
                        "description": "filter by entity type",
                        "name": "entity_type",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "results per page",
                        "name": "per_page",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "position",
                                "-position",
                                "name",
                                "-name",
                                "created_at",
                                "-created_at"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.PageWithTotal-models_CustomFieldWithOptions"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "402": {
                        "description": "Feature not available on current plan",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates a new custom field with the provided details.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "custom-fields"
                ],
                "summary": "Create a new custom field",
                "operationId": "create-custom-field",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Custom field payload",
                        "name": "custom_field",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/customfield.CreatePayload"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Custom field created successfully",
                        "schema": {
                            "$ref": "#/definitions/models.CustomFieldWithOptions"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "402": {
                        "description": "Feature not available on current plan",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "409": {
                        "description": "Duplicate field name",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "422": {
                        "description": "Maximum number of custom fields reached",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/custom-fields/{custom_field_id}": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a custom field with the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "custom-fields"
                ],
                "summary": "Get custom field by ID",
                "operationId": "get-custom-field",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "custom field ID",
                        "name": "custom_field_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.CustomFieldWithOptions"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "402": {
                        "description": "Feature not available on current plan",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Custom field not found",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Update an existing custom field.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "custom-fields"
                ],
                "summary": "Update custom field",
                "operationId": "update-custom-field",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "custom field ID",
                        "name": "custom_field_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Custom field payload",
                        "name": "custom_field",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/customfield.UpdatePayload"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successfully updated custom field",
                        "schema": {
                            "$ref": "#/definitions/models.CustomFieldWithOptions"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "402": {
                        "description": "Feature not available on current plan",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Custom field not found",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "409": {
                        "description": "Duplicate field name",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Soft-deletes a custom field with the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "custom-fields"
                ],
                "summary": "Delete a custom field by ID",
                "operationId": "delete-custom-field",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "custom field ID",
                        "name": "custom_field_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Successfully deleted custom field"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "402": {
                        "description": "Feature not available on current plan",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Custom field not found",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/custom-fields/{custom_field_id}/options": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates a new option for a select or multi_select custom field.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "custom-fields"
                ],
                "summary": "Create a new option for a custom field",
                "operationId": "create-custom-field-option",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "custom field ID",
                        "name": "custom_field_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Option payload",
                        "name": "option",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/customfield.CreateOptionPayload"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Option created successfully",
                        "schema": {
                            "$ref": "#/definitions/models.CustomFieldOption"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "402": {
                        "description": "Feature not available on current plan",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Custom field not found",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "409": {
                        "description": "Duplicate option name",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/custom-fields/{custom_field_id}/options/{option_id}": {
            "put": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Update an existing custom field option.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "custom-fields"
                ],
                "summary": "Update a custom field option",
                "operationId": "update-custom-field-option",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "custom field ID",
                        "name": "custom_field_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "option ID",
                        "name": "option_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Option payload",
                        "name": "option",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/customfield.UpdateOptionPayload"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successfully updated option",
                        "schema": {
                            "$ref": "#/definitions/models.CustomFieldOption"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "402": {
                        "description": "Feature not available on current plan",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Custom field or option not found",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "409": {
                        "description": "Duplicate option name",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Soft-deletes a custom field option with the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "custom-fields"
                ],
                "summary": "Delete a custom field option by ID",
                "operationId": "delete-custom-field-option",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "custom field ID",
                        "name": "custom_field_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "option ID",
                        "name": "option_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Successfully deleted option"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "402": {
                        "description": "Feature not available on current plan",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Custom field or option not found",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/ghosts": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "List all ghosts, paginated, sorted (by name), and searchable (by name).",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "ghosts"
                ],
                "summary": "Get all ghosts",
                "operationId": "list-ghosts",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Number of items per page (default: 50, max: 100).",
                        "name": "rows",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Field and direction to sort by, formatted as 'field,direction'. Fields: 'name' Defaults to 'name,asc' if not given.",
                        "name": "order_by",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Ghost name to search for. Is a contains-anywhere search",
                        "name": "search",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "Filter resp by given project ids that ghosts are assigned to",
                        "name": "project_ids",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "Filter resp by given task ids that ghosts are assigned to",
                        "name": "task_ids",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "Filter resp by given team ids that ghosts are assigned to",
                        "name": "team_ids",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "Filter resp by given ghost ids",
                        "name": "ghost_ids",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "Include ghosts that have been embodied (default: false)",
                        "name": "include_embodied",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/page.Envelope-ghost_GhostAPI"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Create a new ghost.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "ghosts"
                ],
                "summary": "Create ghost",
                "operationId": "create-ghost",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "New ghost Payload",
                        "name": "ghost",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/ghost.newGhost"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "ghost created successfully",
                        "schema": {
                            "$ref": "#/definitions/ghost.GhostAPI"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/ghosts/bulk_create": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Create multiple new ghosts.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "ghosts"
                ],
                "summary": "Bulk create ghosts",
                "operationId": "bulk-create-ghosts",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "New ghosts Payload",
                        "name": "ghosts",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/ghost.newGhost"
                            }
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "ghosts created successfully",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/ghost.GhostAPI"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/ghosts/bulk_update": {
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Update multiple ghosts.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "ghosts"
                ],
                "summary": "Bulk update ghosts",
                "operationId": "bulk-update-ghosts",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Update ghosts payload",
                        "name": "ghosts",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/ghost.UpdateGhost"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ghosts updated successfully",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/ghost.GhostAPI"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/ghosts/{ghost_id}": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Retrieve a single ghost by the ghost id.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "ghosts"
                ],
                "summary": "Get a single ghost",
                "operationId": "get-ghost",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "ghost ID",
                        "name": "ghost_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/ghost.GhostAPI"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Delete an existing new ghost.",
                "tags": [
                    "ghosts"
                ],
                "summary": "Delete ghost",
                "operationId": "delete-ghost",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "ghost ID",
                        "name": "ghost_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Update an existing new ghost. All fields are optional, but at least one must be provided.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "ghosts"
                ],
                "summary": "Update ghost",
                "operationId": "update-ghost",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "ghost ID",
                        "name": "ghost_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Update ghost payload",
                        "name": "ghost",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/ghost.UpdateGhost"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ghost updated successfully",
                        "schema": {
                            "$ref": "#/definitions/ghost.GhostAPI"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Ghost not found",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/ghosts/{ghost_id}/embody": {
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Embody an existing with the given user id.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "ghosts"
                ],
                "summary": "Embody ghost",
                "operationId": "embody-ghost",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "ghost ID",
                        "name": "ghost_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "user ID, retrieved from accounts invite",
                        "name": "user_id",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/ghost.embodyGhost"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ghost embodied successfully",
                        "schema": {
                            "$ref": "#/definitions/ghost.GhostAPI"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Ghost not found",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "409": {
                        "description": "Ghost already embodied",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/integrations/calendar": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "List calendar integrations, i.e. the email accounts connected.",
                "produces": [
                    "text/plain"
                ],
                "tags": [
                    "calendar"
                ],
                "summary": "List calendar integrations",
                "operationId": "calendar-integrations-list",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of integrations, aka connected emails",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.IntegrationWithCalendars"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/integrations/calendar/setup": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Connect a new calendar integration.",
                "produces": [
                    "text/plain"
                ],
                "tags": [
                    "calendar"
                ],
                "summary": "Setup calendar integration",
                "operationId": "calendar-integrations-setup",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Calendar service provider which the calendars will be retrieved",
                        "name": "provider",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Page to which the user will be redirected after authenticating",
                        "name": "return_to",
                        "in": "query"
                    }
                ],
                "responses": {
                    "302": {
                        "description": "Redirect to oAuth URL",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "402": {
                        "description": "status payment required: integration already exists",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/integrations/calendar/{integration_id}": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "List calendars for a particular integration, i.e. the calendars available from the connected account.",
                "produces": [
                    "text/plain"
                ],
                "tags": [
                    "calendar"
                ],
                "summary": "List calendars for a particular integration",
                "operationId": "calendar-integrations-calendars",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "integration ID",
                        "name": "integration_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of calendars",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.Calendar"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Delete a calendar integration.",
                "produces": [
                    "text/plain"
                ],
                "tags": [
                    "calendar"
                ],
                "summary": "Delete a calendar integration",
                "operationId": "calendar-integration-delete",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "integration ID",
                        "name": "integration_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of calendars",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.Calendar"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/integrations/calendar/{integration_id}/calendars/{calendar_id}": {
            "put": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Update calendar integration.",
                "produces": [
                    "text/plain"
                ],
                "tags": [
                    "calendar"
                ],
                "summary": "Update calendar integration",
                "operationId": "calendar-integrations-update-calendar",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "integration ID",
                        "name": "integration_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "calendar ID",
                        "name": "calendar_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Calendar object",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/models.Calendar"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of calendars",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.Calendar"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/integrations/calendar/{integration_id}/reauth": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Increment the user's oauth scope for write capabilities",
                "produces": [
                    "text/plain"
                ],
                "tags": [
                    "calendar"
                ],
                "summary": "Request write scope.",
                "operationId": "calendar-integrations-increment",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "integration ID",
                        "name": "integration_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Page to which the user will be redirected after authenticating",
                        "name": "return_to",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "302": {
                        "description": "Redirect to oAuth URL",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Integration not found",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/integrations/calendar/{integration_id}/update": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Update integration.",
                "produces": [
                    "text/plain"
                ],
                "tags": [
                    "calendar"
                ],
                "summary": "Update integration",
                "operationId": "calendar-integrations-update",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "integration ID",
                        "name": "integration_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of calendars",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.Calendar"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/projects": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of projects based on the provided workspace ID and filter params.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json",
                    "application/json"
                ],
                "tags": [
                    "projects"
                ],
                "summary": "List projects",
                "operationId": "list-projects",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "results per page",
                        "name": "per_page",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "name",
                                "-name",
                                "client_id",
                                "-client_id",
                                "client_name",
                                "-client_name",
                                "parent_project_id",
                                "-parent_project_id",
                                "private",
                                "-private",
                                "active",
                                "-active",
                                "billable",
                                "-billable",
                                "created_at",
                                "-created_at",
                                "updated_at",
                                "-updated_at",
                                "toggl_user_id",
                                "-toggl_user_id",
                                "created_by_user",
                                "pinned",
                                "-pinned",
                                "relevance",
                                "-relevance"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter by only pinned tasks",
                        "name": "pinned",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter by archived state (true = archived only, false = active only, omit = active only, empty = all projects)",
                        "name": "archived",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter by project privacy (true for private, false for public)",
                        "name": "private",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "filter by project name or client name",
                        "name": "name",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter by client IDs",
                        "name": "client_id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "filter by project creator id",
                        "name": "creator_id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter by tag IDs",
                        "name": "tag_id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "filter by project IDs",
                        "name": "project_id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "return only projects accessible by the given users (requires manage workspace users when inspecting another user)",
                        "name": "user_id",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "includes the projects' rate data",
                        "name": "include_rates",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "filter projects overlapping date range (start). Used with end_date to find projects where project.start_date \u003c= end_date AND project.end_date \u003e= start_date",
                        "name": "start_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "filter projects overlapping date range (end). Used with start_date to find projects where project.start_date \u003c= end_date AND project.end_date \u003e= start_date",
                        "name": "end_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "[LEGACY] use start_date instead",
                        "name": "date_overlap_start",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "[LEGACY] use end_date instead",
                        "name": "date_overlap_end",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.PageWithTotal-models_ProjectWithAggregations"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates a new project with the provided name, workspace ID, parent project ID, and client ID.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "projects"
                ],
                "summary": "Create a new project",
                "operationId": "create-project",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Project payload",
                        "name": "project",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/project.Payload"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Project created successfully",
                        "schema": {
                            "$ref": "#/definitions/models.Project"
                        }
                    },
                    "400": {
                        "description": "Invalid project parameters",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/projects/bulk": {
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Deletes multiple projects and their children by the provided IDs. Best-effort: individual failures are logged but do not abort the batch.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "projects"
                ],
                "summary": "Bulk delete projects",
                "operationId": "bulk-delete-projects",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "project IDs to delete",
                        "name": "ids",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Partially updates multiple projects",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "projects"
                ],
                "summary": "Bulk partial update projects",
                "operationId": "bulk-partial-update-projects",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Array of project partial updates",
                        "name": "projects",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/project.PartialUpdatePayloadWithID"
                            }
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/projects/bulk/archive": {
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Archives multiple projects and their children by the provided IDs. Best-effort: individual failures are logged but do not abort the batch.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "projects"
                ],
                "summary": "Bulk archive projects",
                "operationId": "bulk-archive-projects",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Bulk archive payload",
                        "name": "bulkArchivePayload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/project.BulkArchivePayload"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/projects/bulk/restore": {
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Restores multiple projects by the provided IDs. Best-effort: individual failures are logged but do not abort the batch.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "projects"
                ],
                "summary": "Bulk restore projects",
                "operationId": "bulk-restore-projects",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Bulk restore payload",
                        "name": "bulkRestorePayload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/project.BulkRestorePayload"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/projects/bulk/unarchive": {
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Unarchives multiple projects by the provided IDs. Best-effort: individual failures are logged but do not abort the batch.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "projects"
                ],
                "summary": "Bulk unarchive projects",
                "operationId": "bulk-unarchive-projects",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Bulk unarchive payload",
                        "name": "bulkUnarchivePayload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/project.BulkUnarchivePayload"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/projects/rates": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a summary list of rates for a given project.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "rates"
                ],
                "summary": "List project rates summary",
                "operationId": "list-project-rates-summary",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Number of items per page (default: 50, max: 100).",
                        "name": "rows",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Field and direction to sort by, formatted as 'field,direction'. Fields: 'project_name', 'hourly_rate', 'start_at', 'end_at'. Defaults to 'project_name,asc' if not given.",
                        "name": "order_by",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Project name to search for. Is a contains-anywhere search",
                        "name": "search",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/page.Envelope-models_EffectiveProjectRatesSummary"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/projects/{project_id}": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a project by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "projects"
                ],
                "summary": "Get a project by ID",
                "operationId": "get-project",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "project ID",
                        "name": "project_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.ProjectWithAggregations"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Project does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Update an existing project",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "projects"
                ],
                "summary": "Update project",
                "operationId": "update-project",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Project ID",
                        "name": "project_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Project payload",
                        "name": "project",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/project.Payload"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Project updated successfully",
                        "schema": {
                            "$ref": "#/definitions/models.Project"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Project does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Deletes a project by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "projects"
                ],
                "summary": "Delete a project by ID",
                "operationId": "delete-project",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "project ID",
                        "name": "project_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Project does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Partially update an existing project",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "projects"
                ],
                "summary": "Patch project",
                "operationId": "patch-project",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Project ID",
                        "name": "project_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Project payload",
                        "name": "project",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/project.PartialUpdatePayload"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Project updated successfully",
                        "schema": {
                            "$ref": "#/definitions/models.Project"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Project does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/projects/{project_id}/archive": {
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Archives a project by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "projects"
                ],
                "summary": "Archives a project by ID",
                "operationId": "archive-project",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "project ID",
                        "name": "project_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Project does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/projects/{project_id}/attachments": {
            "get": {
                "description": "Returns a list of project-attachments based on the provided workspace ID, project ID and filter params.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "project-attachments"
                ],
                "summary": "List project attachments",
                "operationId": "list-project-attachments",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "project ID",
                        "name": "project_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "created_at",
                                "-created_at",
                                "display_order",
                                "-display_order"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.ProjectAttachment"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            },
            "post": {
                "description": "Creates a new project attachment with the provided name and workspace ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "project-attachments"
                ],
                "summary": "Create a new project attachment",
                "operationId": "create-project-attachment",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "project ID",
                        "name": "project_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Project attachment name",
                        "name": "name",
                        "in": "formData"
                    },
                    {
                        "type": "number",
                        "description": "Project attachment display order",
                        "name": "display_order",
                        "in": "formData",
                        "required": true
                    },
                    {
                        "type": "file",
                        "description": "attachment file",
                        "name": "file",
                        "in": "formData",
                        "required": true
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Project attachment created successfully",
                        "schema": {
                            "$ref": "#/definitions/models.ProjectAttachment"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/projects/{project_id}/attachments/bulk": {
            "post": {
                "description": "Creates up to 10 project attachments in a single request. All-or-nothing: if any file fails, none are created.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "project-attachments"
                ],
                "summary": "Create project attachments in bulk",
                "operationId": "bulk-create-project-attachments",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "project ID",
                        "name": "project_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "file"
                        },
                        "collectionFormat": "csv",
                        "description": "attachment files (max 10)",
                        "name": "files",
                        "in": "formData",
                        "required": true
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "names for each file, indexed as names[0], names[1], etc.",
                        "name": "names",
                        "in": "formData"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "number"
                        },
                        "collectionFormat": "csv",
                        "description": "display orders for each file, indexed as display_orders[0], display_orders[1], etc.",
                        "name": "display_orders",
                        "in": "formData",
                        "required": true
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Project attachments created successfully",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.ProjectAttachment"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/projects/{project_id}/attachments/{attachment_id}": {
            "put": {
                "description": "Update an existing project attachment",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "project-attachments"
                ],
                "summary": "Update project attachment",
                "operationId": "update-project-attachment",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "project ID",
                        "name": "project_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "ProjectAttachment ID",
                        "name": "attachment_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "ProjectAttachment payload",
                        "name": "projectAttachment",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/projectattachment.Payload"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "404": {
                        "description": "Project attachment does not exist",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            },
            "delete": {
                "description": "Deletes a project attachment by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "project-attachments"
                ],
                "summary": "Delete a project attachment by ID",
                "operationId": "delete-project-attachment",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "project ID",
                        "name": "project_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "project attachment ID",
                        "name": "attachment_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "404": {
                        "description": "Project attachment does not exist",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/projects/{project_id}/attachments/{attachment_id}/view": {
            "get": {
                "description": "View a project attachment by the provided ID.",
                "produces": [
                    "application/octet-stream",
                    "image/png",
                    "image/jpeg",
                    "application/pdf"
                ],
                "tags": [
                    "project-attachments"
                ],
                "summary": "View a project attachment",
                "operationId": "view-project-attachment",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "project ID",
                        "name": "project_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "project attachment ID",
                        "name": "attachment_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.ProjectAttachment"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "404": {
                        "description": "ProjectAttachment does not exist",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/projects/{project_id}/children": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a project and its children sub-projects by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "projects"
                ],
                "summary": "Get a project with its children sub-projects by ID",
                "operationId": "get-project-with-children",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "project ID",
                        "name": "project_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "results per page",
                        "name": "per_page",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "name",
                                "-name",
                                "client_id",
                                "-client_id",
                                "parent_project_id",
                                "-parent_project_id",
                                "private",
                                "-private",
                                "active",
                                "-active",
                                "billable",
                                "-billable",
                                "created_at",
                                "-created_at",
                                "updated_at",
                                "-updated_at"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.Page-models_ProjectWithAggregations"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Project does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/projects/{project_id}/duplicate": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Duplicates a project and its tasks. Optionally accepts a new name for the duplicated project.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "projects"
                ],
                "summary": "Duplicate a project",
                "operationId": "duplicate-project",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "project ID",
                        "name": "project_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Optional duplicate payload",
                        "name": "payload",
                        "in": "body",
                        "schema": {
                            "$ref": "#/definitions/project.DuplicatePayload"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Project duplicated successfully",
                        "schema": {
                            "$ref": "#/definitions/models.Project"
                        }
                    },
                    "400": {
                        "description": "Invalid parameters",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Project does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/projects/{project_id}/members": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of userIDs and groupIDs that are part of the given project.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json",
                    "application/json"
                ],
                "tags": [
                    "projects"
                ],
                "summary": "List project memmbers",
                "operationId": "list-projects-members",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "project ID",
                        "name": "project_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of project members",
                        "schema": {
                            "$ref": "#/definitions/projectuser.ProjectMembers"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Project not found",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Updates the role of a project member (user or group).",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "projects"
                ],
                "summary": "Update project member role",
                "operationId": "update-member-role",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "project ID",
                        "name": "project_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Member and new role",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/projectuser.updateMemberRole"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Project not found",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Adds users and groups to the given project.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json",
                    "application/json"
                ],
                "tags": [
                    "projects"
                ],
                "summary": "Add project members",
                "operationId": "add-project-members",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "project ID",
                        "name": "project_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Project members to add",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/projectuser.PostProjectMembers"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Project not found",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Removes a single user or group from the given project.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json",
                    "application/json"
                ],
                "tags": [
                    "projects"
                ],
                "summary": "Remove project member",
                "operationId": "remove-project-member",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "project ID",
                        "name": "project_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Project member to remove",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/projectuser.deleteProjectMember"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Project not found",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/projects/{project_id}/parents": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a project and its parent projects by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "projects"
                ],
                "summary": "Get a project with its parent projects by ID",
                "operationId": "get-project-with-parents",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "project ID",
                        "name": "project_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "results per page",
                        "name": "per_page",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "name",
                                "-name",
                                "client_id",
                                "-client_id",
                                "parent_project_id",
                                "-parent_project_id",
                                "private",
                                "-private",
                                "active",
                                "-active",
                                "billable",
                                "-billable",
                                "created_at",
                                "-created_at",
                                "updated_at",
                                "-updated_at"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.Page-models_Project"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Project does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/projects/{project_id}/pinned": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Pins a project by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "projects"
                ],
                "summary": "Pin a project by ID",
                "operationId": "pin-project",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "project ID",
                        "name": "project_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Project does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Unpins a project by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "projects"
                ],
                "summary": "Unpin a project by ID",
                "operationId": "unpin-project",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "project ID",
                        "name": "project_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Project does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/projects/{project_id}/rates": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a merged timeline of workspace and project rates for a given project. Project rates take precedence over workspace rates for overlapping periods.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "rates"
                ],
                "summary": "List project rates",
                "operationId": "list-project-rates",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "project ID",
                        "name": "project_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Field and direction to sort by, formatted as 'field,direction'. Fields: 'hourly_rate', 'start_at', 'end_at'. Defaults to 'start_at,asc' if not given.",
                        "name": "order_by",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/project.RateAPI"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates a new rate for a given project.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "rates"
                ],
                "summary": "Create a project rate",
                "operationId": "create-project-rate",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "project ID",
                        "name": "project_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Rate payload",
                        "name": "rate",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/project.NewRate"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Rate created successfully",
                        "schema": {
                            "$ref": "#/definitions/models.Rate"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Deletes a project rate within a given time range.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "rates"
                ],
                "summary": "Delete a project rate",
                "operationId": "delete-project-rate",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "project ID",
                        "name": "project_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "format": "date-time",
                        "description": "start of the time range to delete (RFC3339)",
                        "name": "from",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "format": "date-time",
                        "description": "end of the time range to delete (RFC3339)",
                        "name": "to",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/projects/{project_id}/rates/current": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "rates"
                ],
                "summary": "Get the current rate for a project if any.",
                "operationId": "get-current-project-rate",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "project ID",
                        "name": "project_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/project.RateAPI"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/projects/{project_id}/restore": {
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Restores a project by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "projects"
                ],
                "summary": "Restore a project by ID",
                "operationId": "restore-project",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "project ID",
                        "name": "project_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Project does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/projects/{project_id}/unarchive": {
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Unarchives a project by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "projects"
                ],
                "summary": "Unarchive a project by ID",
                "operationId": "unarchive-project",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "project ID",
                        "name": "project_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Project does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/scheduler/confirm": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Applies the proposed schedule changes and creates new tasks that were previously returned by /optimize.\nThe frontend holds the proposal and sends it back for confirmation.\nRequest accepts both changes (time block updates) and new_tasks (task creation) arrays.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "scheduler"
                ],
                "summary": "Confirm and apply schedule changes",
                "operationId": "scheduler-confirm",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Changes to apply",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/scheduler.ConfirmRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Confirmation result",
                        "schema": {
                            "$ref": "#/definitions/scheduler.ConfirmResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Time block not found",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/scheduler/optimize": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Fetches all TODO status tasks for the workspace, sends them to the scheduler service\nfor optimization, and returns proposed changes for tasks without existing time blocks.\nOnly unscheduled tasks (without start times) will be proposed for scheduling.\nResponse includes both proposed_changes (updates to existing blocks) and proposed_new_tasks (new tasks to create).",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "scheduler"
                ],
                "summary": "Get schedule optimization proposal",
                "operationId": "scheduler-optimize",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "natural language instructions for the scheduler",
                        "name": "instructions",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Optimization proposal",
                        "schema": {
                            "$ref": "#/definitions/scheduler.OptimizeResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/scheduler/reject": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Tracks a PostHog event when the user rejects scheduler optimization suggestions.\nThis endpoint exists because the frontend cannot send PostHog events if the user hasn't accepted cookies.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "scheduler"
                ],
                "summary": "Reject scheduler suggestions",
                "operationId": "scheduler-reject",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Reject request",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/scheduler.RejectRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Rejection tracked",
                        "schema": {
                            "$ref": "#/definitions/scheduler.RejectResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/scheduler/user-feedback": {
            "put": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Submits positive or negative feedback for a scheduler optimization request.\nAt least one of kind or feedback must be provided.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "scheduler"
                ],
                "summary": "Submit user feedback for a scheduler request",
                "operationId": "scheduler-user-feedback",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "User feedback",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/scheduler.UserFeedbackHandlerRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Feedback submitted",
                        "schema": {
                            "$ref": "#/definitions/scheduler.UserFeedbackResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/scheduler/validate-instructions": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Validates user-provided scheduling instructions and returns a tier-based classification (A/B/C)\nwith parsed intent fields, inferred values, missing fields, and improvement suggestions.\nReturns a Tier C fallback if the validation service is temporarily unavailable.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "scheduler"
                ],
                "summary": "Validate scheduling instructions",
                "operationId": "scheduler-validate-instructions",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Instructions to validate. Optionally includes task_id/project_id from mentions.",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/scheduler.ValidateInstructionsRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Tier-based validation result",
                        "schema": {
                            "$ref": "#/definitions/scheduler.InstructionValidation"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/search": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Searches time entries by description, tasks by name, and projects by name.\nReturns grouped results for autocomplete use cases. Time entries include results\nwhere the linked task has been soft-deleted (task fields will be null).\nTime entries are always scoped to the authenticated user.\nDeduplication of tasks across the time_entries and tasks groups is best-effort:\nonly task IDs from the returned time entries (limited by per_group) are excluded.\nKeywords longer than 255 characters are truncated. Min 3 characters required.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "search"
                ],
                "summary": "Unified search across time entries, tasks, and projects",
                "operationId": "search",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Search term, min 3 characters",
                        "name": "keyword",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Max results per group (1-10, default 5)",
                        "name": "per_group",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Scope tasks to this assignee",
                        "name": "assignee_user_id",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/search.Result"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/seed": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Generates fake data for the specified workspace",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "data-generator"
                ],
                "summary": "Generates fake data",
                "operationId": "data-generator-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Generator payload",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/datagenerator.Payload"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/subscriptions/upsert-forced-trial": {
            "post": {
                "description": "Creates or updates a trial for the organization based on workspace data and Plan import history.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "subscriptions"
                ],
                "summary": "Upserts a trial",
                "operationId": "upsert-forced-trial",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Optional plan workspace ID",
                        "name": "request",
                        "in": "body",
                        "schema": {
                            "$ref": "#/definitions/subscription.upsertForcedTrialRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Trial was created or updated",
                        "schema": {
                            "$ref": "#/definitions/subscription.upsertForcedTrialResponse"
                        }
                    },
                    "204": {
                        "description": "No trial created or updated (existing unchanged trial, paid subscription, or no eligible trial)"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/task-suggestions": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "task-suggestions"
                ],
                "summary": "Get project suggestion for a task",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Request body",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/tasksuggestion.suggestPayload"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/tasksuggestion.suggestionResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/task-suggestions/bulk": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "task-suggestions"
                ],
                "summary": "Get project suggestions for multiple tasks",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Request body",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/tasksuggestion.suggestBulkPayload"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/tasksuggestion.suggestionResponse"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of tasks based on the workspace ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tasks"
                ],
                "summary": "List tasks",
                "operationId": "list-tasks",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "results per page",
                        "name": "per_page",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "include time entries",
                        "name": "with_entries",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter by pinned state",
                        "name": "pinned",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "user_id",
                                "-user_id",
                                "project_id",
                                "-project_id",
                                "parent_task_id",
                                "-parent_task_id",
                                "name",
                                "-name",
                                "estimated_mins",
                                "-estimated_mins",
                                "priority",
                                "-priority",
                                "priority_at",
                                "-priority_at",
                                "start_date",
                                "-start_date",
                                "end_date",
                                "-end_date",
                                "status_id",
                                "-status_id",
                                "pinned",
                                "-pinned",
                                "created_at",
                                "-created_at",
                                "updated_at",
                                "-updated_at",
                                "last_activity",
                                "-last_activity",
                                "position",
                                "-position",
                                "timeblock_start",
                                "-timeblock_start",
                                "timeblock_now_diff",
                                "-timeblock_now_diff",
                                "billable",
                                "-billable",
                                "relevance",
                                "-relevance"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "filter in tasks by status' IDs",
                        "name": "status_id",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "filter in tasks by user",
                        "name": "toggl_user_id",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "filter tasks by task name, project name, or client name",
                        "name": "name",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter tasks if it has time entries",
                        "name": "has_time_entries",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter tasks if it has time blocks",
                        "name": "has_time_blocks",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter tasks by date presence: true returns tasks with start_date or end_date, false returns tasks with both dates NULL",
                        "name": "has_dates",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter tasks by private state",
                        "name": "private",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter in/out archived tasks",
                        "name": "archived",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter by project ids. `?project_id=` will include tasks with no project.",
                        "name": "project_id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter by parent task ids. `?parent_task_id=` will include tasks with no parent.",
                        "name": "parent_task_id",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "filter tasks overlapping date range (start). Used with end_date to find tasks where task.start_date \u003c= end_date AND task.end_date \u003e= start_date",
                        "name": "start_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "filter tasks overlapping date range (end). Used with start_date to find tasks where task.start_date \u003c= end_date AND task.end_date \u003e= start_date",
                        "name": "end_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "[LEGACY] use start_date instead",
                        "name": "start_date_from",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "[LEGACY] use start_date instead",
                        "name": "start_date_to",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "[LEGACY] use end_date instead",
                        "name": "end_date_from",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "[LEGACY] use end_date instead",
                        "name": "end_date_to",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "[LEGACY] use start_date instead",
                        "name": "dates_overlap_start",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "[LEGACY] use end_date instead",
                        "name": "dates_overlap_end",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "filter by estimated mins min",
                        "name": "estimated_mins_min",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "filter by estimated mins max",
                        "name": "estimated_mins_max",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "focus",
                            "google_calendar",
                            "outlook_calendar"
                        ],
                        "type": "string",
                        "description": "filter by source",
                        "name": "source",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "none",
                            "low",
                            "medium",
                            "high"
                        ],
                        "type": "string",
                        "description": "filter by priority",
                        "name": "priority",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter by whether task is a user priority",
                        "name": "is_priority",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "timeblocked",
                                "not_timeblocked",
                                "tracked",
                                "not_tracked",
                                "active",
                                "done"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "filter by state",
                        "name": "state",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "full-date",
                        "description": "filter by a task's timeblock start date (from)",
                        "name": "timeblock_start_from",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "full-date",
                        "description": "filter by a task's timeblock start date (until)",
                        "name": "timeblock_start_until",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "filter in tasks by timeblock' IDs",
                        "name": "time_block_id",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter in tasks by completed timeblocks",
                        "name": "time_block_completed",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter tasks by team IDs",
                        "name": "team_id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter in tasks by assignee's user IDs",
                        "name": "assignee_user_id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter in tasks by tag IDs",
                        "name": "tag_id",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter by recurring tasks",
                        "name": "recurring",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "filter by recurring task ids",
                        "name": "recurring_task_ids",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter by client ids. `?client_id=` will include tasks with no client.",
                        "name": "client_id",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "includes the parent projects' rate data",
                        "name": "include_rates",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "includes the ghost assignees",
                        "name": "include_ghost_assignees",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter in tasks by assignee's ghost IDs",
                        "name": "assignee_ghost_id",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "when true, skips computing aggregations and parent task hydration for faster response",
                        "name": "disable_aggregations",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.PageWithTotal-task_TaskWithParentAndAggregations"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates a new task with the provided details.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tasks"
                ],
                "summary": "Create a new task",
                "operationId": "create-task",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Task payload",
                        "name": "task",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/task.CreatePayload"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Task created successfully",
                        "schema": {
                            "$ref": "#/definitions/models.Task"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/bulk": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates tasks in bulk with the provided details.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tasks"
                ],
                "summary": "Creates tasks in bulk",
                "operationId": "bulk-create-task",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Tasks payload",
                        "name": "tasks",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/task.BulkCreatePayload"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Tasks created successfully",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.Task"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Deletes tasks by the provided IDs.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tasks"
                ],
                "summary": "Delete tasks by ID",
                "operationId": "bulk-delete-task",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "task IDs",
                        "name": "ids",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "boolean",
                        "description": "Conduct outbound sync or not",
                        "name": "outbound_sync",
                        "in": "query"
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "patch": {
                "description": "Partially update existing tasks in bulk",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tasks"
                ],
                "summary": "Partially update tasks in bulk",
                "operationId": "bulk-patch-task",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Task payload with task ID",
                        "name": "task",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/task.PartialUpdatePayloadWithID"
                            }
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/bulk/archive": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Bulk archives tasks, and their children given their IDs",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tasks"
                ],
                "summary": "Bulk archives tasks given their IDs",
                "operationId": "bulk-archive-task",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Task bulk archive payload",
                        "name": "taskBulkArchive",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/task.BulkArchivePayload"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/bulk/duplicate": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Duplicates one or more tasks. If specified, their children may be duplicated asynchronously.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tasks"
                ],
                "summary": "Bulk duplicates tasks",
                "operationId": "bulk-duplicate-task",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Tasks payload",
                        "name": "task",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/task.BulkDuplicatePayload"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Tasks duplicated successfully",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.Task"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/bulk/restore": {
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Bulk restores tasks, and their children given their IDs",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tasks"
                ],
                "summary": "Bulk restores tasks given their IDs",
                "operationId": "bulk-restore-task",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Task bulk restore payload",
                        "name": "taskBulkRestore",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/task.BulkRestorePayload"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/bulk/unarchive": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Bulk unarchives tasks, and their children given their IDs",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tasks"
                ],
                "summary": "Bulk unarchives tasks given their IDs",
                "operationId": "bulk-unarchive-task",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Task bulk unarchive payload",
                        "name": "taskBulkUnarchive",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/task.BulkUnarchivePayload"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/by-external-id": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a task matching the given integration source and external ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tasks"
                ],
                "summary": "Get a task by external ID",
                "operationId": "get-task-by-external-id",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "integration source",
                        "name": "source",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "external ID from the integration",
                        "name": "ext_id",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.Task"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Task not found",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/calendar": {
            "put": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Sync a list of tasks based on calendar events.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tasks"
                ],
                "summary": "Sync tasks by calendar range",
                "operationId": "put-tasks-calendar-range",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "from timestamp",
                        "name": "date_from",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "to timestamp",
                        "name": "date_to",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "timezone",
                        "name": "timezone",
                        "in": "query"
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/groups/{group}": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Gets tasks in groups depending on name",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "task-groups"
                ],
                "summary": "Gets tasks in groups",
                "operationId": "get-task-groups",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "enum": [
                            "projects",
                            "users",
                            "tags"
                        ],
                        "type": "string",
                        "description": "group name",
                        "name": "group",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "focus",
                                "google_calendar",
                                "outlook_calendar"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "filter by sources",
                        "name": "source",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "none",
                            "low",
                            "medium",
                            "high"
                        ],
                        "type": "string",
                        "description": "filter by priority",
                        "name": "priority",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "filter by statuses",
                        "name": "status_id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter by project IDs",
                        "name": "project_id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter by client IDs",
                        "name": "client_id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter by assignee user IDs",
                        "name": "assignee_user_id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter by tag IDs",
                        "name": "tag_id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter by team IDs (resolves to member user IDs)",
                        "name": "team_id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "filter by group IDs",
                        "name": "group_id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "filter in by creator IDs",
                        "name": "creator_id",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "filter in by task name",
                        "name": "name",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "filter tasks overlapping date range (start). Used with end_date to find tasks where task.start_date \u003c= end_date AND task.end_date \u003e= start_date",
                        "name": "start_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "filter tasks overlapping date range (end). Used with start_date to find tasks where task.start_date \u003c= end_date AND task.end_date \u003e= start_date",
                        "name": "end_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "[LEGACY] use start_date instead",
                        "name": "start_date_from",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "[LEGACY] use start_date instead",
                        "name": "start_date_to",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "[LEGACY] use end_date instead",
                        "name": "end_date_from",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "[LEGACY] use end_date instead",
                        "name": "end_date_to",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter by project privacy (true for private, false for public)",
                        "name": "private",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter groups with no tasks",
                        "name": "exclude_empty",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "include ghost assignees in tasks, available for /users only",
                        "name": "include_ghosts",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "filters tasks with a minimum number of days. based on start_date and end_date",
                        "name": "min_days",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "results per page",
                        "name": "per_page",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "group_name",
                                "-group_name"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Tasks grouped by type",
                        "schema": {
                            "$ref": "#/definitions/models.Page-models_TaskGroup"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Updates task groups and their entries' weights/parent group",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "task-groups"
                ],
                "summary": "Updates task groups and their entries' weights/parent group",
                "operationId": "update-task-groups",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "enum": [
                            "projects",
                            "users",
                            "tags"
                        ],
                        "type": "string",
                        "description": "group type",
                        "name": "group",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "task groups to update with their entries",
                        "name": "taskGroups",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/taskgroup.UpdateTaskGroupEntryParams"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/recurring": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of tasks based on the workspace ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tasks"
                ],
                "summary": "List recurring task instances",
                "operationId": "list-tasks-recurring-instances",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "results per page",
                        "name": "per_page",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter in/out archived tasks",
                        "name": "archived",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "filter tasks overlapping date range (start). Used with end_date to find tasks where task.start_date \u003c= end_date AND task.end_date \u003e= start_date",
                        "name": "start_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "filter tasks overlapping date range (end). Used with start_date to find tasks where task.start_date \u003c= end_date AND task.end_date \u003e= start_date",
                        "name": "end_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "[LEGACY] use start_date instead",
                        "name": "dates_overlap_start",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "[LEGACY] use end_date instead",
                        "name": "dates_overlap_end",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "filter by recurring task ids",
                        "name": "recurring_task_ids",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter recurring task instances by team IDs",
                        "name": "team_id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter recurring task instances by assignee's user IDs",
                        "name": "assignee_user_id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter in tasks by tag IDs",
                        "name": "tag_id",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "includes the ghost assignees",
                        "name": "include_ghost_assignees",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.Page-models_Task"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/stream": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of tasks based on the workspace ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tasks"
                ],
                "summary": "List tasks, streaming the response",
                "operationId": "list-stream-tasks",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "boolean",
                        "description": "include time entries",
                        "name": "with_entries",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter by pinned state",
                        "name": "pinned",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "user_id",
                                "-user_id",
                                "project_id",
                                "-project_id",
                                "parent_task_id",
                                "-parent_task_id",
                                "name",
                                "-name",
                                "estimated_mins",
                                "-estimated_mins",
                                "priority",
                                "-priority",
                                "priority_at",
                                "-priority_at",
                                "start_date",
                                "-start_date",
                                "end_date",
                                "-end_date",
                                "status_id",
                                "-status_id",
                                "pinned",
                                "-pinned",
                                "created_at",
                                "-created_at",
                                "updated_at",
                                "-updated_at",
                                "last_activity",
                                "-last_activity",
                                "position",
                                "-position",
                                "billable",
                                "-billable",
                                "relevance",
                                "-relevance"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "filter in tasks by their status' ID",
                        "name": "status_id",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "filter in tasks by user",
                        "name": "toggl_user_id",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "filter tasks by task name, project name, or client name",
                        "name": "name",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter tasks if it has time entries",
                        "name": "has_time_entries",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter tasks if it has time blocks",
                        "name": "has_time_blocks",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter tasks by date presence: true returns tasks with start_date or end_date, false returns tasks with both dates NULL",
                        "name": "has_dates",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter in/out archived tasks",
                        "name": "archived",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter by project ids. `?project_id=` will include tasks with no project.",
                        "name": "project_id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter by parent task ids. `?parent_task_id=` will include tasks with no parent.",
                        "name": "parent_task_id",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "filter tasks overlapping date range (start). Used with end_date to find tasks where task.start_date \u003c= end_date AND task.end_date \u003e= start_date",
                        "name": "start_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "filter tasks overlapping date range (end). Used with start_date to find tasks where task.start_date \u003c= end_date AND task.end_date \u003e= start_date",
                        "name": "end_date",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "full-date",
                        "description": "[LEGACY] use start_date instead",
                        "name": "start_date_from",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "full-date",
                        "description": "[LEGACY] use start_date instead",
                        "name": "start_date_to",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "full-date",
                        "description": "[LEGACY] use end_date instead",
                        "name": "end_date_from",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "full-date",
                        "description": "[LEGACY] use end_date instead",
                        "name": "end_date_to",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "[LEGACY] use start_date instead",
                        "name": "dates_overlap_start",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "[LEGACY] use end_date instead",
                        "name": "dates_overlap_end",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "filter by estimated mins min",
                        "name": "estimated_mins_min",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "filter by estimated mins max",
                        "name": "estimated_mins_max",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "focus",
                            "google_calendar",
                            "outlook_calendar"
                        ],
                        "type": "string",
                        "description": "filter by source",
                        "name": "source",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "none",
                            "low",
                            "medium",
                            "high"
                        ],
                        "type": "string",
                        "description": "filter by priority",
                        "name": "priority",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter by whether task is a user priority",
                        "name": "is_priority",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "timeblocked",
                                "not_timeblocked",
                                "tracked",
                                "not_tracked",
                                "active",
                                "done"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "filter by state",
                        "name": "state",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "filter in tasks by timeblock' IDs",
                        "name": "time_block_id",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter in/out tasks by completed timeblocks",
                        "name": "time_block_completed",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter tasks by team IDs",
                        "name": "team_id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter in tasks by assignee's user IDs",
                        "name": "assignee_user_id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter in tasks by tag IDs",
                        "name": "tag_id",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter by recurring tasks",
                        "name": "recurring",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "filter by recurring task ids",
                        "name": "recurring_task_ids",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter by client ids. `?client_id=` will include tasks with no client.",
                        "name": "client_id",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "includes the ghost assignees",
                        "name": "include_ghost_assignees",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter in tasks by assignee's ghost IDs",
                        "name": "assignee_ghost_id",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/task.TaskWithParentAndAggregations"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/{task_id}": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a task by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tasks"
                ],
                "summary": "Get a task by ID",
                "operationId": "get-task",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "boolean",
                        "description": "includes the ghost assignees",
                        "name": "include_ghost_assignees",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/task.TaskWithParentAndAggregations"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "put": {
                "description": "Update an existing task",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tasks"
                ],
                "summary": "Update task",
                "operationId": "update-task",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Task payload",
                        "name": "task",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/task.UpdatePayload"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Task updated successfully",
                        "schema": {
                            "$ref": "#/definitions/models.Task"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Deletes a task by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tasks"
                ],
                "summary": "Delete a task by ID",
                "operationId": "delete-task",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "format": "date",
                        "description": "delete recurring tasks starting from this recurring task instance",
                        "name": "from_recurring_task_id",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "Conduct outbound sync or not",
                        "name": "outbound_sync",
                        "in": "query"
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "patch": {
                "description": "Partially update an existing task",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tasks"
                ],
                "summary": "Partially update a task",
                "operationId": "patch-task",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Task payload",
                        "name": "task",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/task.PartialUpdatePayload"
                        }
                    },
                    {
                        "type": "integer",
                        "description": "update recurring tasks starting from this recurring instacne id",
                        "name": "from_recurring_task_id",
                        "in": "query"
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Task updated successfully",
                        "schema": {
                            "$ref": "#/definitions/models.Task"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/{task_id}/archive": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Archives a task, and all its time blocks \u0026 TEs with the provided task ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tasks"
                ],
                "summary": "Archive a task by ID",
                "operationId": "archive-task",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "format": "date",
                        "description": "archive recurring tasks starting from this recurring task instance",
                        "name": "from_recurring_task_id",
                        "in": "query"
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/{task_id}/attachments": {
            "get": {
                "description": "Returns a list of task-attachments based on the provided workspace ID, task ID and filter params.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "task-attachments"
                ],
                "summary": "List task attachments",
                "operationId": "list-task-attachments",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "created_at",
                                "-created_at",
                                "display_order",
                                "-display_order"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.TaskAttachment"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            },
            "post": {
                "description": "Creates a new task attachment with the provided name and workspace ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "task-attachments"
                ],
                "summary": "Create a new task attachment",
                "operationId": "create-task-attachment",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Task attachment name",
                        "name": "name",
                        "in": "formData"
                    },
                    {
                        "type": "number",
                        "description": "Task attachment display order",
                        "name": "display_order",
                        "in": "formData",
                        "required": true
                    },
                    {
                        "type": "file",
                        "description": "attachment file",
                        "name": "file",
                        "in": "formData",
                        "required": true
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Task attachment created successfully",
                        "schema": {
                            "$ref": "#/definitions/models.TaskAttachment"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/{task_id}/attachments/bulk": {
            "post": {
                "description": "Creates up to 10 task attachments in a single request. All-or-nothing: if any file fails, none are created.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "task-attachments"
                ],
                "summary": "Create task attachments in bulk",
                "operationId": "bulk-create-task-attachments",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "file"
                        },
                        "collectionFormat": "csv",
                        "description": "attachment files (max 10)",
                        "name": "files",
                        "in": "formData",
                        "required": true
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "names for each file, indexed as names[0], names[1], etc.",
                        "name": "names",
                        "in": "formData"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "number"
                        },
                        "collectionFormat": "csv",
                        "description": "display orders for each file, indexed as display_orders[0], display_orders[1], etc.",
                        "name": "display_orders",
                        "in": "formData",
                        "required": true
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Task attachments created successfully",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.TaskAttachment"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/{task_id}/attachments/{attachment_id}": {
            "put": {
                "description": "Update an existing task attachment",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "task-attachments"
                ],
                "summary": "Update task attachment",
                "operationId": "update-task-attachment",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "TaskAttachment ID",
                        "name": "attachment_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "TaskAttachment payload",
                        "name": "taskAttachment",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/taskattachment.Payload"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "404": {
                        "description": "Task attachment does not exist",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            },
            "delete": {
                "description": "Deletes a task attachment by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "task-attachments"
                ],
                "summary": "Delete a task attachment by ID",
                "operationId": "delete-task-attachment",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task attachment ID",
                        "name": "attachment_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "404": {
                        "description": "Task attachment does not exist",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/{task_id}/attachments/{attachment_id}/view": {
            "get": {
                "description": "View a task attachment by the provided ID.",
                "produces": [
                    "application/octet-stream",
                    "image/png",
                    "image/jpeg",
                    "application/pdf"
                ],
                "tags": [
                    "task-attachments"
                ],
                "summary": "View a task attachment",
                "operationId": "view-task-attachment",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task attachment ID",
                        "name": "attachment_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.TaskAttachment"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "404": {
                        "description": "TaskAttachment does not exist",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/{task_id}/children": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a task and its children sub-tasks by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tasks"
                ],
                "summary": "Get a task with its children sub-tasks by ID",
                "operationId": "get-task-with-children",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "results per page",
                        "name": "per_page",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "user_id",
                                "-user_id",
                                "project_id",
                                "-project_id",
                                "parent_task_id",
                                "-parent_task_id",
                                "name",
                                "-name",
                                "estimated_mins",
                                "-estimated_mins",
                                "priority",
                                "-priority",
                                "priority_at",
                                "-priority_at",
                                "start_date",
                                "-start_date",
                                "end_date",
                                "-end_date",
                                "status_id",
                                "-status_id",
                                "pinned",
                                "-pinned",
                                "created_at",
                                "-created_at",
                                "updated_at",
                                "-updated_at",
                                "last_activity",
                                "-last_activity"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "filter children tasks by status ID",
                        "name": "status_id",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter in/out archived tasks",
                        "name": "archived",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "focus",
                            "google_calendar",
                            "outlook_calendar"
                        ],
                        "type": "string",
                        "description": "filter by source",
                        "name": "source",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter children tasks by team IDs",
                        "name": "team_id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter in tasks by assignee's user IDs",
                        "name": "assignee_user_id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter in tasks by tag IDs",
                        "name": "tag_id",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "includes the ghost assignees",
                        "name": "include_ghost_assignees",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.Page-task_TaskWithParentAndAggregations"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/{task_id}/parents": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a task and its parent tasks by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tasks"
                ],
                "summary": "Get a task with its parent tasks by ID",
                "operationId": "get-task-with-parents",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "results per page",
                        "name": "per_page",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "user_id",
                                "-user_id",
                                "project_id",
                                "-project_id",
                                "parent_task_id",
                                "-parent_task_id",
                                "name",
                                "-name",
                                "estimated_mins",
                                "-estimated_mins",
                                "priority",
                                "-priority",
                                "priority_at",
                                "-priority_at",
                                "start_date",
                                "-start_date",
                                "end_date",
                                "-end_date",
                                "status_id",
                                "pinned",
                                "-pinned",
                                "-status_id",
                                "created_at",
                                "-created_at",
                                "updated_at",
                                "-updated_at",
                                "last_activity",
                                "-last_activity"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "filter parent tasks by status ID",
                        "name": "status_id",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter in/out archived tasks",
                        "name": "archived",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "focus",
                            "google_calendar",
                            "outlook_calendar"
                        ],
                        "type": "string",
                        "description": "filter by source",
                        "name": "source",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter parent tasks by team IDs",
                        "name": "team_id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter in tasks by assignee's user IDs",
                        "name": "assignee_user_id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter in tasks by tag IDs",
                        "name": "tag_id",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "includes the ghost assignees",
                        "name": "include_ghost_assignees",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.Page-task_TaskWithParentAndAggregations"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/{task_id}/rates": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates a new rate for a given task.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "rates"
                ],
                "summary": "Create a task rate",
                "operationId": "create-task-rate",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Rate payload",
                        "name": "rate",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/task.CreateTaskRatePayload"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/{task_id}/restore": {
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Restores a task by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tasks"
                ],
                "summary": "Restore a task by ID",
                "operationId": "restore-task",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/{task_id}/time-blocks": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of time blocks based on the provided workspace ID, task ID and filter params.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-blocks"
                ],
                "summary": "List task time blocks",
                "operationId": "list-task-time-blocks-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "results per page",
                        "name": "per_page",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "start",
                                "-start",
                                "task_id",
                                "-task_id",
                                "created_at",
                                "-created_at",
                                "updated_at",
                                "-updated_at"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter in/out archived time blocks",
                        "name": "archived",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.Page-timeblock_TimeBlockAggregate"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates a new time block with the provided name and workspace ID.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-blocks"
                ],
                "summary": "Create a new time block",
                "operationId": "create-time-block-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "TimeBlock payload",
                        "name": "timeBlock",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/timeblock.Payload"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Time block created successfully",
                        "schema": {
                            "$ref": "#/definitions/models.TimeBlock"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/{task_id}/time-blocks/{time_block_id}": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a time block by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-blocks"
                ],
                "summary": "Get a time block by ID",
                "operationId": "get-time-block-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "timeBlock ID",
                        "name": "time_block_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.TimeBlock"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "TimeBlock does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Update an existing time block",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-blocks"
                ],
                "summary": "Update time block",
                "operationId": "update-time-block-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "TimeBlock ID",
                        "name": "time_block_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "TimeBlock payload",
                        "name": "timeBlock",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/timeblock.Payload"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Time block does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Deletes a time block by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-blocks"
                ],
                "summary": "Delete a time block by ID",
                "operationId": "delete-time-block-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "time block ID",
                        "name": "time_block_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "boolean",
                        "description": "Conduct outbound sync or not",
                        "name": "outbound_sync",
                        "in": "query"
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Time block does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Update an existing time block",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-blocks"
                ],
                "summary": "Update time block",
                "operationId": "partial-update-time-block-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "TimeBlock ID",
                        "name": "time_block_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "TimeBlock payload",
                        "name": "timeBlock",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/timeblock.PartialUpdatePayload"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Time block does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/{task_id}/time-blocks/{time_block_id}/archive": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Marks the time block with the provided WS, task, and time block IDs as archived",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-blocks"
                ],
                "summary": "Marks a time block as archived",
                "operationId": "archive-time-block-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "time block ID",
                        "name": "time_block_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/{task_id}/time-blocks/{time_block_id}/restore": {
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Restores a time block by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-blocks"
                ],
                "summary": "Restore a time block by ID",
                "operationId": "restore-time-block-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "time block ID",
                        "name": "time_block_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Time block does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/{task_id}/time-blocks/{time_block_id}/unarchive": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Marks the time block with the provided WS, task, and time block IDs as unarchived",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-blocks"
                ],
                "summary": "Marks a time block as unarchived",
                "operationId": "unarchive-time-block-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "time block ID",
                        "name": "time_block_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/{task_id}/time-entries": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of time-entries based on the provided workspace ID, task ID and filter params.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "List task time entries",
                "operationId": "list-task-time-entries-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "results per page",
                        "name": "per_page",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "start",
                                "-start",
                                "task_id",
                                "-task_id",
                                "created_at",
                                "-created_at",
                                "updated_at",
                                "-updated_at"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "activity",
                            "break"
                        ],
                        "type": "string",
                        "description": "time entry type",
                        "name": "type",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter in/out archived TEs",
                        "name": "archived",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "filter by timeblock id",
                        "name": "time_block_id",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.Page-models_TimeEntry"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates a new time entry in the specified workspace.\nAn optional `user_id` field can be provided to create a time entry on behalf of another user.\nWhen `user_id` differs from the authenticated user, the caller must have `manage_time_entries` permission.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "Create a new time entry",
                "operationId": "create-time-entry-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "TimeEntry payload",
                        "name": "timeEntry",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/timeentry.CreatePayload"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Time entry created successfully",
                        "schema": {
                            "$ref": "#/definitions/models.TimeEntry"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/{task_id}/time-entries/{time_entry_id}": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a time entry by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "Get a time entry by ID",
                "operationId": "get-time-entry-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "timeEntry ID",
                        "name": "time_entry_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.TimeEntry"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "TimeEntry does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "put": {
                "description": "Update an existing time entry",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "Update time entry",
                "operationId": "update-time-entry-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "TimeEntry ID",
                        "name": "time_entry_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "TimeEntry payload",
                        "name": "timeEntry",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/timeentry.Payload"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Time entry does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Deletes a time entry by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "Delete a time entry by ID",
                "operationId": "delete-time-entry-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "time entry ID",
                        "name": "time_entry_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Time entry does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "patch": {
                "description": "Partial updates an existing time entry",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "Partial update time entry",
                "operationId": "partial-update-time-entry-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "TimeEntry ID",
                        "name": "time_entry_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "TimeEntry payload",
                        "name": "timeEntry",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/timeentry.PartialUpdatePayload"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Time entry does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/{task_id}/time-entries/{time_entry_id}/archive": {
            "post": {
                "description": "Marks the TE with the provided WS, task, and TE IDs as archived",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "Marks a TE as archived",
                "operationId": "archive-time-entry-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "time entry ID",
                        "name": "time_entry_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/{task_id}/time-entries/{time_entry_id}/restore": {
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Restores a time entry by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "Restore a time entry by ID",
                "operationId": "restore-time-entry-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "time entry ID",
                        "name": "time_entry_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Time entry does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/{task_id}/time-entries/{time_entry_id}/unarchive": {
            "post": {
                "description": "Marks the TE with the provided WS, task, and TE IDs as unarchived",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "Unarchives a time entry",
                "operationId": "unarchive-time-entry-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "time entry ID",
                        "name": "time_entry_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tasks/{task_id}/unarchive": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Unarchives a task, and all its time blocks \u0026 TEs with the provided task ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tasks"
                ],
                "summary": "Unarchive a task by ID",
                "operationId": "unarchive-task",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/time-blocks": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of time-blocks based on the provided workspace ID and filter params.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-blocks"
                ],
                "summary": "List task time blocks within range",
                "operationId": "list-time-blocks-range-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "from timestamp",
                        "name": "date_from",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "to timestamp",
                        "name": "date_to",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task id",
                        "name": "task_id",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "status id",
                        "name": "status_id",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "results per page",
                        "name": "per_page",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter in/out archived time blocks",
                        "name": "archived",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "start",
                                "-start",
                                "task_id",
                                "-task_id",
                                "created_at",
                                "-created_at",
                                "updated_at",
                                "-updated_at"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.Page-timeblock_TimeBlockAggregateWithTask"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/time-blocks/bulk": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates new time blocks",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-blocks"
                ],
                "summary": "Create new time blocks",
                "operationId": "bulk-create-time-block-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "TimeBlock payload",
                        "name": "timeBlocks",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/timeblock.BulkCreatePayload"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Time blocks created successfully",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.TimeBlock"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Deletes time blocks by the provided IDs.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-blocks"
                ],
                "summary": "Bulk deletes time blocks by IDs",
                "operationId": "bulk-delete-time-block-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "time block IDs",
                        "name": "ids",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "boolean",
                        "description": "Conduct outbound sync or not",
                        "name": "outbound_sync",
                        "in": "query"
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Time block does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Update existing time blocks in bulk",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-blocks"
                ],
                "summary": "Update time blocks in bulk",
                "operationId": "bulk-partial-update-time-block-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "TimeBlock payload with ID",
                        "name": "timeBlock",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/timeblock.PartialUpdatePayloadWithID"
                            }
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Time block does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/time-blocks/stream": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of time-blocks based on the provided workspace ID and filter params.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-blocks"
                ],
                "summary": "List task time blocks within range (streamed)",
                "operationId": "list-time-blocks-range-stream-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "from timestamp",
                        "name": "date_from",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "to timestamp",
                        "name": "date_to",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task id",
                        "name": "task_id",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "status id",
                        "name": "status_id",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter in/out archived time blocks",
                        "name": "archived",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "start",
                                "-start",
                                "task_id",
                                "-task_id",
                                "created_at",
                                "-created_at",
                                "updated_at",
                                "-updated_at"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/timeblock.TimeBlockAggregateWithTask"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/time-entries": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of time-entries based on the provided workspace ID and filter params.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "List task time entries",
                "operationId": "list-time-entries-range-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "from timestamp",
                        "name": "date_from",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "from timestamp",
                        "name": "date_to",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task id",
                        "name": "task_id",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "status id",
                        "name": "status_id",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "activity",
                            "break"
                        ],
                        "type": "string",
                        "description": "time entry type",
                        "name": "type",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "results per page",
                        "name": "per_page",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "start",
                                "-start",
                                "task_id",
                                "-task_id",
                                "created_at",
                                "-created_at",
                                "updated_at",
                                "-updated_at"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter in/out archived TEs",
                        "name": "archived",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "filter by timeblock",
                        "name": "time_block_id",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.Page-timeentry_TimeEntryWithTask"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/time-entries/bulk": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates new time entries in bulk for the specified workspace.\nAn optional `user_id` field can be provided per entry to create time entries on behalf of another user.\nWhen `user_id` differs from the authenticated user, the caller must have `manage_time_entries` permission.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "Create new time entries in bulk",
                "operationId": "bulk-create-time-entry-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "TimeEntry payloads with task ID",
                        "name": "timeEntry",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/timeentry.PayloadWithTaskID"
                            }
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Deletes time entries by the provided IDs.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "Delete time entries in bulk",
                "operationId": "bulk-delete-time-entry-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "TimeEntry IDs",
                        "name": "ids",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Time entry does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "patch": {
                "description": "Partial updates an existing time entry",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "Partial bulk update time entry",
                "operationId": "bulk-partial-update-time-entry-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "TimeEntry payloads with TE ID",
                        "name": "timeEntries",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/timeentry.PartialUpdatePayloadWithID"
                            }
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Time entry does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/time-entries/bulk/restore": {
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Restores time entries by the provided IDs.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "Restore time entries in bulk",
                "operationId": "bulk-restore-time-entry-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "TimeEntry IDs",
                        "name": "ids",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Time entry does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/time-entries/day-duration": {
            "put": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Reconciles time entries in a day to match the specified total duration.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "Set day duration",
                "operationId": "set-day-duration-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Day duration payload",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/timeentry.SetDayDurationPayload"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Reconciled time entries for the day",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/timeentry.TimeEntryWithTask"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/time-entries/stream": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of time-entries based on the provided workspace ID and filter params.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "List task time entries, streaming the response",
                "operationId": "list-stream-time-entries-range-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "from timestamp",
                        "name": "date_from",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "from timestamp",
                        "name": "date_to",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task id",
                        "name": "task_id",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "status id",
                        "name": "status_id",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "activity",
                            "break"
                        ],
                        "type": "string",
                        "description": "time entry type",
                        "name": "type",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "start",
                                "-start",
                                "task_id",
                                "-task_id",
                                "created_at",
                                "-created_at",
                                "updated_at",
                                "-updated_at"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter in/out archived TEs",
                        "name": "archived",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/timeentry.TimeEntryWithTask"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/time-entries/time-block-ids/stream": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of time-entries based on the provided workspace ID and filter params.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "List task time entries by time block ids, streaming the response",
                "operationId": "list-stream-time-entries-time-block-ids-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "filter by timeblock ids",
                        "name": "time_block_id",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.TimeEntry"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tracking/current": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Get current tracked time entry.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tracking"
                ],
                "summary": "Get current tracked time entry",
                "operationId": "get-tracked-time-entry-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Time entry",
                        "schema": {
                            "$ref": "#/definitions/models.TimeEntry"
                        }
                    },
                    "204": {
                        "description": "Not tracking a time entry"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tracking/start": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Start tracking time entry.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tracking"
                ],
                "summary": "Start tracking time entry",
                "operationId": "start-tracking-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "payload",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/timeentry.StartTrackingPayload"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Time entry",
                        "schema": {
                            "$ref": "#/definitions/models.TimeEntry"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "User task does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "422": {
                        "description": "Cannot track multiple time entries at the same time",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tracking/start-from-description": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Resolves or creates a task from descriptive metadata (name, project, tags), then starts tracking on it.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tracking"
                ],
                "summary": "Start tracking from description",
                "operationId": "start-tracking-from-description-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "payload",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/extensiontracking.StartFromDescriptionPayload"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Tracking started",
                        "schema": {
                            "$ref": "#/definitions/extensiontracking.StartFromDescriptionResult"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "409": {
                        "description": "Cannot track multiple time entries at the same time",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/tracking/stop": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Stop tracking time entry.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tracking"
                ],
                "summary": "Stop tracking time entry",
                "operationId": "stop-tracking-with-org",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "payload",
                        "name": "payload",
                        "in": "body",
                        "schema": {
                            "$ref": "#/definitions/timeentry.StopTrackingPayload"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Time entry",
                        "schema": {
                            "$ref": "#/definitions/models.TimeEntry"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Not tracking a time entry",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/users/me/onboarding-answers": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns the current onboarding answers for the authenticated user in the workspace. Returns an empty default if no record exists.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "onboarding-answers"
                ],
                "summary": "Get onboarding answers",
                "operationId": "get-onboarding-answers",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Onboarding answers retrieved successfully",
                        "schema": {
                            "$ref": "#/definitions/models.OnboardingAnswers"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates or updates onboarding answers with merge semantics. If no record exists, one is created. On subsequent calls, provided fields are merged into the existing record. Omitted fields are unchanged. Setting an answer to null clears it. Setting completed to true sets completed_at.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "onboarding-answers"
                ],
                "summary": "Upsert onboarding answers",
                "operationId": "partial-update-onboarding-answers",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Partial update payload",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/onboardinganswers.PartialUpdatePayload"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successfully updated",
                        "schema": {
                            "$ref": "#/definitions/models.OnboardingAnswers"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/workflows/tasks/extract": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Parses the provided image and returns a list of tasks.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tasks"
                ],
                "summary": "Parse image and retrieve tasks",
                "operationId": "extract-tasks-form-image",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "file",
                        "description": "attachment file",
                        "name": "file",
                        "in": "formData",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Image parsed successfully",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.Task"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/workflows/tasks/from-list": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Parses the provided text list and returns a list of tasks.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tasks"
                ],
                "summary": "Parse text list and retrieve tasks",
                "operationId": "extract-tasks-from-list",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Prompt payload",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/task.PromptPayload"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List parsed successfully",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.Task"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/workspaces/{workspace_id}/workflows/tasks/prompt": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Generates tasks from prompt",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tasks"
                ],
                "summary": "Generates tasks from prompt",
                "operationId": "generate-tasks-from-prompt",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Prompt payload",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/task.PromptPayload"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Prompt parsed successfully",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.Task"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/{workspace_id}/timeoff": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns time offs of organization ghosts",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Time Off"
                ],
                "summary": "Get time offs of organization ghosts",
                "operationId": "get-timeoffs-by-ghost-ids",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "Ghost IDs",
                        "name": "ghost_ids",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "From date (YYYY-MM-DD)",
                        "name": "start_date",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "To date (YYYY-MM-DD)",
                        "name": "end_date",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/shareddata.TimeOff"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameters",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/{workspace_id}/timeoff/ghosts/{ghost_id}": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns time off for a ghost",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Time Off"
                ],
                "summary": "Get time off for a ghost",
                "operationId": "get-timeoff-for-ghost",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "User ID",
                        "name": "ghost_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "From date (YYYY-MM-DD)",
                        "name": "from",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "To date (YYYY-MM-DD)",
                        "name": "to",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/shareddata.TimeOff"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameters",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Updates time off for the specified ghost",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Time Off"
                ],
                "summary": "Update time off for the specified ghost",
                "operationId": "update-timeoff-for-ghost",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Ghost ID",
                        "name": "ghost_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Time off payload",
                        "name": "timeoff",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/shareddata.TimeOffUpdateInput"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/shareddata.TimeOff"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameters",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates time off for the specified ghost",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Time Off"
                ],
                "summary": "Create time off for the specified ghost",
                "operationId": "create-timeoff-for-ghost",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Ghost ID",
                        "name": "ghost_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Time off payload",
                        "name": "timeoff",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/shareddata.TimeOffCreateInput"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/shareddata.TimeOff"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameters",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Deletes time off for the specified ghost",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Time Off"
                ],
                "summary": "Delete time off for the specified ghost",
                "operationId": "delete-timeoff-for-ghost",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Ghost ID",
                        "name": "ghost_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Time off ids payload",
                        "name": "ids",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid parameters",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/organizations/{organization_id}/{workspace_id}/workinghours/ghosts/{ghost_id}": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns working hours for organization resource/ghost",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Working Hours"
                ],
                "summary": "Get working hours for organization resouce/ghost",
                "operationId": "get-working-hours-for-ghost",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Ghost ID",
                        "name": "ghost_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/shareddata.WorkingHours"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid year",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Updates working hours for the specified ghost",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Working Hours"
                ],
                "summary": "Update working hours for the specified ghost",
                "operationId": "update-working-hours-for-ghost",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Ghost ID",
                        "name": "ghost_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Working hours payload",
                        "name": "working_hours",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/shareddata.WorkingHoursUpdateInput"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/shareddata.WorkingHours"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid year",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates working hours for the specified ghost",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Working Hours"
                ],
                "summary": "Create working hours for the specified ghost",
                "operationId": "create-working-hours-for-ghost",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Ghost ID",
                        "name": "ghost_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Working hours payload",
                        "name": "working_hours",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/shareddata.WorkingHoursCreateInput"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/shareddata.WorkingHours"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid year",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Deletes working hours for the specified ghost",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Working Hours"
                ],
                "summary": "Delete working hours for the specified ghost",
                "operationId": "delete-working-hours-for-ghost",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Ghost ID",
                        "name": "ghost_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Working hour ids payload",
                        "name": "ids",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid year",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/reports/workspaces/{workspace_id}/query": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Executes a flexible query against the analytics database and returns formatted results.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "reports"
                ],
                "summary": "Generate flexible query report",
                "operationId": "get-flexq-data",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "boolean",
                        "default": false,
                        "description": "include dictionary data in response",
                        "name": "include_dicts",
                        "in": "query"
                    },
                    {
                        "description": "Query configuration including filters, aggregations, groupings, etc.",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/dto.QueryRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successfully generated report",
                        "schema": {
                            "$ref": "#/definitions/flexq.EnrichedResult"
                        }
                    },
                    "400": {
                        "description": "Invalid request parameters",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/reports/workspaces/{workspace_id}/query/dictionary": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Generates a dictionary containing task, project, client, and status information based on the provided filters.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "reports"
                ],
                "summary": "Generate dictionary from filters",
                "operationId": "get-flexq-dictionary",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Filter criteria for dictionary generation",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/dto.FilterRequest"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successfully generated dictionary",
                        "schema": {
                            "$ref": "#/definitions/dictionary.Dictionary"
                        }
                    },
                    "400": {
                        "description": "Invalid request parameters",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/reports/workspaces/{workspace_id}/workload": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Generates a workload report based on the given input.\nBreakdown reports (grouped by user_account_id) support optional pagination via 'page' and 'per_page'.\nPaginated response includes 'total_count' with the total number of users matching the filters.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "reports"
                ],
                "summary": "Generate workload report",
                "operationId": "get-workload-report",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Query configuration with optional filters and groupings",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/dto.QueryRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successfully generated workload report",
                        "schema": {
                            "$ref": "#/definitions/flexq.EnrichedResult"
                        }
                    },
                    "400": {
                        "description": "Invalid request parameters",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/users/me/settings": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "user-settings"
                ],
                "summary": "Retrieve user settings",
                "operationId": "get-user-settings",
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.UserSettings"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Partial update user settings.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "user-settings"
                ],
                "summary": "Partial update user settings",
                "operationId": "partial-update-user-settings",
                "parameters": [
                    {
                        "description": "Settings payload",
                        "name": "settings",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/user.PartialUpdatePayload"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successfully updated",
                        "schema": {
                            "$ref": "#/definitions/models.UserSettings"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/chats": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of chats based on the provided workspace ID and filter params.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "chats"
                ],
                "summary": "List chats",
                "operationId": "list-chats",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "results per page",
                        "name": "per_page",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "filter by chat name",
                        "name": "name",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "created_at",
                                "-created_at",
                                "updated_at",
                                "-updated_at"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.Page-chat_ChatWithMessageCount"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates a new chat with the provided name and workspace ID.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "chats"
                ],
                "summary": "Create a new chat",
                "operationId": "create-chat",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "chat payload",
                        "name": "chat",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/chat.Payload"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "chat created successfully",
                        "schema": {
                            "$ref": "#/definitions/models.Chat"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/chats/{chat_id}": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns chat by id",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "chats"
                ],
                "summary": "get chat by id",
                "operationId": "get-chat",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "chat ID",
                        "name": "chat_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/chat.ChatWithMessageCount"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "chat does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "put": {
                "description": "Update an existing chat",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "chats"
                ],
                "summary": "Update chat",
                "operationId": "update-chat",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "chat ID",
                        "name": "chat_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "chat payload",
                        "name": "chat",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/chat.Payload"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "chat does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Deletes a chat by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "chats"
                ],
                "summary": "Delete a chat by ID",
                "operationId": "delete-chat",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "chat ID",
                        "name": "chat_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "chat does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/chats/{chat_id}/messages": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of chat messages based on the provided workspace ID, chat ID and filter params.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "chats"
                ],
                "summary": "List chat messages",
                "operationId": "list-chat-messages",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "chat ID",
                        "name": "chat_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "results per page",
                        "name": "per_page",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "created_at",
                                "-created_at"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.Page-models_ChatMessage"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/chats/{chat_id}/messages/stream": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of chat messages based on the provided workspace ID, chat ID and filter params.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "chats"
                ],
                "summary": "List chat messages (stream)",
                "operationId": "list-chat-messages-stream",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "chat ID",
                        "name": "chat_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "created_at",
                                "-created_at"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.ChatMessage"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/chats/{chat_id}/messages/{chat_message_id}": {
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Partial update chat message",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "chats"
                ],
                "summary": "Partial update chat message",
                "operationId": "partial-update-chat-message",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "chat ID",
                        "name": "chat_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "message ID",
                        "name": "chat_message_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "payload",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/chatmessage.PartialUpdatePayload"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/chats/{chat_id}/restore": {
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Restores a chat by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "chats"
                ],
                "summary": "Restore a chat by ID",
                "operationId": "restore-chat",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "chat ID",
                        "name": "chat_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "chat does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/clients": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of clients based on the provided workspace ID and filter params.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "clients"
                ],
                "summary": "List clients",
                "operationId": "list-clients",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "results per page",
                        "name": "per_page",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "name",
                                "-name",
                                "active",
                                "-active",
                                "created_at",
                                "-created_at",
                                "updated_at",
                                "-updated_at"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "filter clients by their names",
                        "name": "name",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.Page-models_Client"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates a new client with the provided name and workspace ID.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "clients"
                ],
                "summary": "Create a new client",
                "operationId": "create-client",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Client payload",
                        "name": "client",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/client.Payload"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Client created successfully",
                        "schema": {
                            "$ref": "#/definitions/models.Client"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/clients/{client_id}": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a client by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "clients"
                ],
                "summary": "Get a client by ID",
                "operationId": "get-client",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "client ID",
                        "name": "client_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.Client"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Client does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "put": {
                "description": "Update an existing client",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "clients"
                ],
                "summary": "Update client",
                "operationId": "update-client",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Client ID",
                        "name": "client_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Client payload",
                        "name": "client",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/client.Payload"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Client does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Deletes a client by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "clients"
                ],
                "summary": "Delete a client by ID",
                "operationId": "delete-client",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "client ID",
                        "name": "client_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Client does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/clients/{client_id}/restore": {
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Restores a client by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "clients"
                ],
                "summary": "Restore a client by ID",
                "operationId": "restore-client",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "client ID",
                        "name": "client_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Client does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/composite/tasks": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates the main task, subtasks, time blocks and time entries in bulk.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "composite"
                ],
                "summary": "Creates the main task, subtasks, time blocks and time entries in bulk",
                "operationId": "composite-create-task-old",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Tasks composite creation payload",
                        "name": "composite",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/composite.CreateTasksPayload"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Composite task creation success",
                        "schema": {
                            "$ref": "#/definitions/composite.CreateTasksResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/integrations/calendar": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "List calendar integrations, i.e. the email accounts connected.",
                "produces": [
                    "text/plain"
                ],
                "tags": [
                    "calendar"
                ],
                "summary": "List calendar integrations",
                "operationId": "calendar-integrations-list-old",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of integrations, aka connected emails",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.IntegrationWithCalendars"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/integrations/calendar/setup": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Connect a new calendar integration.",
                "produces": [
                    "text/plain"
                ],
                "tags": [
                    "calendar"
                ],
                "summary": "Setup calendar integration",
                "operationId": "calendar-integrations-setup-old",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Calendar service provider which the calendars will be retrieved",
                        "name": "provider",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Page to which the user will be redirected after authenticating",
                        "name": "return_to",
                        "in": "query"
                    }
                ],
                "responses": {
                    "302": {
                        "description": "Redirect to oAuth URL",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "402": {
                        "description": "status payment required: integration already exists",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/integrations/calendar/{integration_id}": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "List calendars for a particular integration, i.e. the calendars available from the connected account.",
                "produces": [
                    "text/plain"
                ],
                "tags": [
                    "calendar"
                ],
                "summary": "List calendars for a particular integration",
                "operationId": "calendar-integrations-calendars-old",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "integration ID",
                        "name": "integration_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of calendars",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.Calendar"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Delete a calendar integration.",
                "produces": [
                    "text/plain"
                ],
                "tags": [
                    "calendar"
                ],
                "summary": "Delete a calendar integration",
                "operationId": "calendar-integration-delete-old",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "integration ID",
                        "name": "integration_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of calendars",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.Calendar"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/integrations/calendar/{integration_id}/calendars/{calendar_id}": {
            "put": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Update calendar integration.",
                "produces": [
                    "text/plain"
                ],
                "tags": [
                    "calendar"
                ],
                "summary": "Update calendar integration",
                "operationId": "calendar-integrations-update-calendar-old",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "integration ID",
                        "name": "integration_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "calendar ID",
                        "name": "calendar_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Calendar object",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/models.Calendar"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of calendars",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.Calendar"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/integrations/calendar/{integration_id}/reauth": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Increment the user's oauth scope for write capabilities",
                "produces": [
                    "text/plain"
                ],
                "tags": [
                    "calendar"
                ],
                "summary": "Request write scope.",
                "operationId": "calendar-integrations-increment-old",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "integration ID",
                        "name": "integration_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Page to which the user will be redirected after authenticating",
                        "name": "return_to",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "302": {
                        "description": "Redirect to oAuth URL",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Integration not found",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/integrations/calendar/{integration_id}/update": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Update integration.",
                "produces": [
                    "text/plain"
                ],
                "tags": [
                    "calendar"
                ],
                "summary": "Update integration",
                "operationId": "calendar-integrations-update-old",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "integration ID",
                        "name": "integration_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of calendars",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.Calendar"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/milestones": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of milestones based on the provided workspace ID and filter params.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json",
                    "application/json"
                ],
                "tags": [
                    "milestones"
                ],
                "summary": "List milestones",
                "operationId": "list-milestones",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "results per page",
                        "name": "per_page",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "name",
                                "-name",
                                "due_date",
                                "-due_date",
                                "completed_at",
                                "-completed_at",
                                "created_at",
                                "-created_at",
                                "updated_at",
                                "-updated_at"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "filter by due date from",
                        "name": "due_date_from",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "filter by due date to",
                        "name": "due_date_to",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter by project id",
                        "name": "project_id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter by team id",
                        "name": "team_id",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.Page-models_Milestone"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates a new milestone.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "milestones"
                ],
                "summary": "Create milestone",
                "operationId": "create-milestone",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "milestone data",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/milestone.Payload"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.Milestone"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/milestones/stream": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of milestones based on the provided workspace ID and filter params.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json",
                    "application/json"
                ],
                "tags": [
                    "milestones"
                ],
                "summary": "List milestones",
                "operationId": "list-milestones-stream",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "name",
                                "-name",
                                "due_date",
                                "-due_date",
                                "completed_at",
                                "-completed_at",
                                "created_at",
                                "-created_at",
                                "updated_at",
                                "-updated_at"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "filter by due date from",
                        "name": "due_date_from",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "format": "date",
                        "description": "filter by due date to",
                        "name": "due_date_to",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter by project id",
                        "name": "project_id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "x-nullable": true,
                        "description": "filter by team id",
                        "name": "team_id",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.Milestone"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/milestones/{milestone_id}": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Get an existing milestone",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "milestones"
                ],
                "summary": "Get milestone",
                "operationId": "get-milestone",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "milestone ID",
                        "name": "milestone_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.Milestone"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Update an existing milestone",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "milestones"
                ],
                "summary": "Update milestone",
                "operationId": "update-milestone",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "milestone ID",
                        "name": "milestone_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "milestone data",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/milestone.Payload"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Delete an existing milestone",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "milestones"
                ],
                "summary": "Delete milestone",
                "operationId": "delete-milestone",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "milestone ID",
                        "name": "milestone_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Partial update an existing milestone",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "milestones"
                ],
                "summary": "Partial update milestone",
                "operationId": "partial-update-milestone",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "milestone ID",
                        "name": "milestone_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "milestone data",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/milestone.PartialUpdatePayload"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/milestones/{milestone_id}/restore": {
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Restore a deleted milestone",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "milestones"
                ],
                "summary": "Restore milestone",
                "operationId": "restore-milestone",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "milestone ID",
                        "name": "milestone_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/permissions": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns the complete list of permissions for the current user in the specified workspace.\nThis combines unconditional permissions from the user's role with conditional permissions based on workspace settings.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "workspace-settings"
                ],
                "summary": "Get current user's permissions in workspace",
                "operationId": "get-user-permissions",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Permissions retrieved successfully",
                        "schema": {
                            "$ref": "#/definitions/workspace.UserPermissionsResponse"
                        }
                    },
                    "403": {
                        "description": "User does not have access to workspace",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/saved-views": {
            "get": {
                "description": "Get all saved views for the authenticated user with optional filtering and ordering",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "SavedViews"
                ],
                "summary": "List saved views",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Filter saved views by name (partial match)",
                        "name": "name",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "inbox",
                            "archive",
                            "board",
                            "timeline",
                            "project",
                            "project.tasks",
                            "project.board",
                            "project.timeline",
                            "projects"
                        ],
                        "type": "string",
                        "description": "Filter saved views by type",
                        "name": "type",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "name",
                            "-name",
                            "type",
                            "-type",
                            "created_at",
                            "-created_at",
                            "updated_at",
                            "-updated_at"
                        ],
                        "type": "string",
                        "description": "Order by field",
                        "name": "order_by",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.SavedView"
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "post": {
                "description": "Create a new saved view for the authenticated user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "SavedViews"
                ],
                "summary": "Create a new saved view",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Saved view data",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/savedview.CreatePayload"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "$ref": "#/definitions/models.SavedView"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/saved-views/{id}": {
            "get": {
                "description": "Retrieve a single saved view by ID for the authenticated user",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "SavedViews"
                ],
                "summary": "Get a saved view",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Saved view ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/models.SavedView"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {}
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {}
                    }
                }
            },
            "delete": {
                "description": "Delete an existing saved view for the authenticated user",
                "tags": [
                    "SavedViews"
                ],
                "summary": "Delete a saved view",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Saved view ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "patch": {
                "description": "Update an existing saved view for the authenticated user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "SavedViews"
                ],
                "summary": "Update a saved view",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Saved view ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Updated saved view data",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/savedview.UpdatePayload"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/models.SavedView"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/settings": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns permission settings for workspace roles. Settings control which roles have access to specific actions on clients, tags, and statuses.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "workspace-settings"
                ],
                "summary": "Get workspace permission settings",
                "operationId": "get-workspace-settings",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Settings retrieved successfully",
                        "schema": {
                            "$ref": "#/definitions/workspace.Settings"
                        }
                    },
                    "403": {
                        "description": "User is not authorized to view workspace settings",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Updates permission settings for workspace roles. Creates settings if they don't exist (upsert operation).\nThe settings object should map role IDs to their permissions.\nNote: Use role IDs as string keys (e.g., \"15\" for ws_admin, \"16\" for ws_manager, \"17\" for ws_user), not role codes.\nAvailable permissions:\n- Clients: create_client, rename_client, archive_client, delete_client\n- Statuses: create_status, update_status, delete_status\n- Tags: create_tags, update_tags, delete_tags\n```json\n{\n\"settings\": {\n\"15\": {\n\"create_client\": true,\n\"rename_client\": true,\n\"archive_client\": true,\n\"delete_client\": true,\n\"create_status\": true,\n\"update_status\": true,\n\"delete_status\": true,\n\"create_tags\": true,\n\"update_tags\": true,\n\"delete_tags\": true\n},\n\"16\": {\n\"create_client\": true,\n\"rename_client\": true,\n\"archive_client\": false,\n\"delete_client\": false,\n\"create_status\": true,\n\"update_status\": true,\n\"delete_status\": false,\n\"create_tags\": true,\n\"update_tags\": true,\n\"delete_tags\": false\n},\n\"17\": {\n\"create_client\": false,\n\"rename_client\": false,\n\"archive_client\": false,\n\"delete_client\": false,\n\"create_status\": false,\n\"update_status\": false,\n\"delete_status\": false,\n\"create_tags\": false,\n\"update_tags\": false,\n\"delete_tags\": false\n}\n}\n}\n```",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "workspace-settings"
                ],
                "summary": "Update workspace permission settings",
                "operationId": "update-workspace-settings",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Settings payload",
                        "name": "settings",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/workspace.UpdatePayload"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Settings updated successfully",
                        "schema": {
                            "$ref": "#/definitions/workspace.Settings"
                        }
                    },
                    "400": {
                        "description": "Invalid request body",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "User is not authorized to update workspace settings",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/statuses": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of statuses based on the workspace ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "statuses"
                ],
                "summary": "List statuses",
                "operationId": "list-statuses",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "filter by status name",
                        "name": "name",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "todo",
                            "in_progress",
                            "done",
                            "blocked"
                        ],
                        "type": "string",
                        "description": "filter by status type",
                        "name": "type",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "results per page",
                        "name": "per_page",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "name",
                                "-name",
                                "workspace_id",
                                "-workspace_id",
                                "created_at",
                                "-created_at",
                                "updated_at",
                                "-updated_at",
                                "position",
                                "-position"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.Page-models_Status"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates a new status with the provided details.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "statuses"
                ],
                "summary": "Create a new status",
                "operationId": "create-status",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Status payload",
                        "name": "status",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/status.Payload"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Status created successfully",
                        "schema": {
                            "$ref": "#/definitions/models.Status"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/statuses/{status_id}": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a status with the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "statuses"
                ],
                "summary": "Get status by ID",
                "operationId": "get-status",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "status ID",
                        "name": "status_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.Status"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "put": {
                "description": "Update an existing statuses",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "statuses"
                ],
                "summary": "Update status",
                "operationId": "update-status",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Status ID",
                        "name": "status_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Status payload",
                        "name": "status",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/status.Payload"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successfully updated status",
                        "schema": {
                            "$ref": "#/definitions/models.Status"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Cannot update default status",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Deletes a status with the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "statuses"
                ],
                "summary": "Delete a status by ID",
                "operationId": "delete-status",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "statuses ID",
                        "name": "status_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Successfully deleted status"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Cannot delete default status",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/statuses/{status_id}/restore": {
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Restores a statuses by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "statuses"
                ],
                "summary": "Restore a statuses by ID",
                "operationId": "restore-statuses",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "statuses ID",
                        "name": "status_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Successfully restored status"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/tags": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of tags based on the workspace ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tags"
                ],
                "summary": "List tags",
                "operationId": "list-tags",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "filter by name",
                        "name": "name",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "results per page",
                        "name": "per_page",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "name",
                                "-name"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "filter by tag IDs",
                        "name": "tag_id",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.PageWithTotal-models_Tag"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates a new tag with the provided details.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tags"
                ],
                "summary": "Create a new tag",
                "operationId": "create-tag",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Tag payload",
                        "name": "tag",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/tag.Payload"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Tag created successfully",
                        "schema": {
                            "$ref": "#/definitions/models.Tag"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/tags/{tag_id}": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a tag with the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tags"
                ],
                "summary": "Get tag by ID",
                "operationId": "get-tag",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "tag ID",
                        "name": "tag_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.Tag"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "put": {
                "description": "Update an existing tag",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tags"
                ],
                "summary": "Update tag",
                "operationId": "update-tag",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Tag ID",
                        "name": "tag_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Tag payload",
                        "name": "tag",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/tag.Payload"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successfully updated tag",
                        "schema": {
                            "$ref": "#/definitions/models.Tag"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Deletes a tag with the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tags"
                ],
                "summary": "Delete a tag by ID",
                "operationId": "delete-tag",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "tag ID",
                        "name": "tag_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Successfully deleted tag"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/tags/{tag_id}/restore": {
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Restores a tag by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tags"
                ],
                "summary": "Restore a tag by ID",
                "operationId": "restore-tag",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "tag ID",
                        "name": "tag_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Successfully restored tag"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/task-constraints": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns required field constraints for tasks in the workspace.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "task-constraints"
                ],
                "summary": "Get task constraints",
                "operationId": "get-task-constraints",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Constraints retrieved successfully",
                        "schema": {
                            "$ref": "#/definitions/taskconstraints.Response"
                        }
                    },
                    "402": {
                        "description": "Feature not available on current plan",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "User is not authorized to view task constraints",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Updates required field constraints for tasks in the workspace. Creates if not present.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "task-constraints"
                ],
                "summary": "Update task constraints",
                "operationId": "upsert-task-constraints",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Constraints payload",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/taskconstraints.UpsertPayload"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Constraints updated successfully",
                        "schema": {
                            "$ref": "#/definitions/taskconstraints.Response"
                        }
                    },
                    "400": {
                        "description": "Invalid request body",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "402": {
                        "description": "Feature not available on current plan",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "User is not authorized to update task constraints",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/tasks/{task_id}/time-blocks": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of time blocks based on the provided workspace ID, task ID and filter params.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-blocks"
                ],
                "summary": "List task time blocks (legacy)",
                "operationId": "list-task-time-blocks",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "results per page",
                        "name": "per_page",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "start",
                                "-start",
                                "task_id",
                                "-task_id",
                                "created_at",
                                "-created_at",
                                "updated_at",
                                "-updated_at"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter in/out archived time blocks",
                        "name": "archived",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.Page-timeblock_TimeBlockAggregate"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates a new time block with the provided name and workspace ID.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-blocks"
                ],
                "summary": "Create a new time block (legacy)",
                "operationId": "create-time-block",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "TimeBlock payload",
                        "name": "timeBlock",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/timeblock.Payload"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Time block created successfully",
                        "schema": {
                            "$ref": "#/definitions/models.TimeBlock"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/tasks/{task_id}/time-blocks/{time_block_id}": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a time block by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-blocks"
                ],
                "summary": "Get a time block by ID (legacy)",
                "operationId": "get-time-block",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "timeBlock ID",
                        "name": "time_block_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.TimeBlock"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "TimeBlock does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Update an existing time block",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-blocks"
                ],
                "summary": "Update time block (legacy)",
                "operationId": "update-time-block",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "TimeBlock ID",
                        "name": "time_block_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "TimeBlock payload",
                        "name": "timeBlock",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/timeblock.Payload"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Time block does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Deletes a time block by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-blocks"
                ],
                "summary": "Delete a time block by ID (legacy)",
                "operationId": "delete-time-block",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "time block ID",
                        "name": "time_block_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "boolean",
                        "description": "Conduct outbound sync or not",
                        "name": "outbound_sync",
                        "in": "query"
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Time block does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Update an existing time block",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-blocks"
                ],
                "summary": "Update time block (legacy)",
                "operationId": "partial-update-time-block",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "TimeBlock ID",
                        "name": "time_block_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "TimeBlock payload",
                        "name": "timeBlock",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/timeblock.PartialUpdatePayload"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Time block does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/tasks/{task_id}/time-blocks/{time_block_id}/archive": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Marks the time block with the provided WS, task, and time block IDs as archived",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-blocks"
                ],
                "summary": "Marks a time block as archived (legacy)",
                "operationId": "archive-time-block",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "time block ID",
                        "name": "time_block_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/tasks/{task_id}/time-blocks/{time_block_id}/restore": {
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Restores a time block by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-blocks"
                ],
                "summary": "Restore a time block by ID (legacy)",
                "operationId": "restore-time-block",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "time block ID",
                        "name": "time_block_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Time block does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/tasks/{task_id}/time-blocks/{time_block_id}/unarchive": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Marks the time block with the provided WS, task, and time block IDs as unarchived",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-blocks"
                ],
                "summary": "Marks a time block as unarchived (legacy)",
                "operationId": "unarchive-time-block",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "time block ID",
                        "name": "time_block_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/tasks/{task_id}/time-entries": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of time-entries based on the provided workspace ID, task ID and filter params.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "List task time entries (legacy)",
                "operationId": "list-task-time-entries",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "results per page",
                        "name": "per_page",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "start",
                                "-start",
                                "task_id",
                                "-task_id",
                                "created_at",
                                "-created_at",
                                "updated_at",
                                "-updated_at"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "activity",
                            "break"
                        ],
                        "type": "string",
                        "description": "time entry type",
                        "name": "type",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter in/out archived TEs",
                        "name": "archived",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "filter by timeblock id",
                        "name": "time_block_id",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.Page-models_TimeEntry"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates a new time entry in the specified workspace.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "Create a new time entry (legacy)",
                "operationId": "create-time-entry",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "TimeEntry payload",
                        "name": "timeEntry",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/timeentry.Payload"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Time entry created successfully",
                        "schema": {
                            "$ref": "#/definitions/models.TimeEntry"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/tasks/{task_id}/time-entries/{time_entry_id}": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a time entry by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "Get a time entry by ID (legacy)",
                "operationId": "get-time-entry",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "timeEntry ID",
                        "name": "time_entry_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.TimeEntry"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "TimeEntry does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Update an existing time entry",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "Update time entry (legacy)",
                "operationId": "update-time-entry",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "TimeEntry ID",
                        "name": "time_entry_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "TimeEntry payload",
                        "name": "timeEntry",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/timeentry.Payload"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Time entry does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Deletes a time entry by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "Delete a time entry by ID (legacy)",
                "operationId": "delete-time-entry",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "time entry ID",
                        "name": "time_entry_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Time entry does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Partial updates an existing time entry",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "Partial update time entry (legacy)",
                "operationId": "partial-update-time-entry",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "TimeEntry ID",
                        "name": "time_entry_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "TimeEntry payload",
                        "name": "timeEntry",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/timeentry.PartialUpdatePayload"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Time entry does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/tasks/{task_id}/time-entries/{time_entry_id}/archive": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Marks the TE with the provided WS, task, and TE IDs as archived",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "Marks a TE as archived (legacy)",
                "operationId": "archive-time-entry",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "time entry ID",
                        "name": "time_entry_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/tasks/{task_id}/time-entries/{time_entry_id}/restore": {
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Restores a time entry by the provided ID.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "Restore a time entry by ID (legacy)",
                "operationId": "restore-time-entry",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "time entry ID",
                        "name": "time_entry_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Time entry does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/tasks/{task_id}/time-entries/{time_entry_id}/unarchive": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Marks the TE with the provided WS, task, and TE IDs as unarchived",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "Unarchives a time entry (legacy)",
                "operationId": "unarchive-time-entry",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task ID",
                        "name": "task_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "time entry ID",
                        "name": "time_entry_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/time-blocks": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of time-blocks based on the provided workspace ID and filter params.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-blocks"
                ],
                "summary": "List task time blocks within range (legacy)",
                "operationId": "list-time-blocks-range",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "from timestamp",
                        "name": "date_from",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "to timestamp",
                        "name": "date_to",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task id",
                        "name": "task_id",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "status id",
                        "name": "status_id",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "results per page",
                        "name": "per_page",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter in/out archived time blocks",
                        "name": "archived",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "start",
                                "-start",
                                "task_id",
                                "-task_id",
                                "created_at",
                                "-created_at",
                                "updated_at",
                                "-updated_at"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.Page-timeblock_TimeBlockAggregateWithTask"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/time-blocks/bulk": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates new time blocks",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-blocks"
                ],
                "summary": "Create new time blocks (legacy)",
                "operationId": "bulk-create-time-block",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "TimeBlock payload",
                        "name": "timeBlocks",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/timeblock.BulkCreatePayload"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Time blocks created successfully",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.TimeBlock"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Deletes time blocks by the provided IDs.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-blocks"
                ],
                "summary": "Bulk deletes time blocks by IDs (legacy)",
                "operationId": "bulk-delete-time-block",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "time block IDs",
                        "name": "ids",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "boolean",
                        "description": "Conduct outbound sync or not",
                        "name": "outbound_sync",
                        "in": "query"
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Time block does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Update existing time blocks in bulk",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-blocks"
                ],
                "summary": "Update time blocks in bulk (legacy)",
                "operationId": "bulk-partial-update-time-block",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "TimeBlock payload with ID",
                        "name": "timeBlock",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/timeblock.PartialUpdatePayloadWithID"
                            }
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Time block does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/time-blocks/stream": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of time-blocks based on the provided workspace ID and filter params.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-blocks"
                ],
                "summary": "List task time blocks within range (streamed) (legacy)",
                "operationId": "list-time-blocks-range-stream",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "from timestamp",
                        "name": "date_from",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "to timestamp",
                        "name": "date_to",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task id",
                        "name": "task_id",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "status id",
                        "name": "status_id",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter in/out archived time blocks",
                        "name": "archived",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "start",
                                "-start",
                                "task_id",
                                "-task_id",
                                "created_at",
                                "-created_at",
                                "updated_at",
                                "-updated_at"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/timeblock.TimeBlockAggregateWithTask"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/time-entries": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of time-entries based on the provided workspace ID and filter params.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "List task time entries (legacy)",
                "operationId": "list-time-entries-range",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "from timestamp",
                        "name": "date_from",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "from timestamp",
                        "name": "date_to",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task id",
                        "name": "task_id",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "status id",
                        "name": "status_id",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "activity",
                            "break"
                        ],
                        "type": "string",
                        "description": "time entry type",
                        "name": "type",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "page number",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "results per page",
                        "name": "per_page",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "start",
                                "-start",
                                "task_id",
                                "-task_id",
                                "created_at",
                                "-created_at",
                                "updated_at",
                                "-updated_at"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter in/out archived TEs",
                        "name": "archived",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "filter by timeblock",
                        "name": "time_block_id",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "$ref": "#/definitions/models.Page-timeentry_TimeEntryWithTask"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/time-entries/bulk": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Creates new time entries in bulk for the specified workspace.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "Create new time entries in bulk (legacy)",
                "operationId": "bulk-create-time-entry",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "TimeEntry payloads with task ID",
                        "name": "timeEntry",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/timeentry.PayloadWithTaskID"
                            }
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Deletes time entries by the provided IDs.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "Delete time entries in bulk (legacy)",
                "operationId": "bulk-delete-time-entry",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "TimeEntry IDs",
                        "name": "ids",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Time entry does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Partial updates an existing time entry",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "Partial bulk update time entry (legacy)",
                "operationId": "bulk-partial-update-time-entry",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "TimeEntry payloads with TE ID",
                        "name": "timeEntries",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/timeentry.PartialUpdatePayloadWithID"
                            }
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Time entry does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/time-entries/bulk/restore": {
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Restores time entries by the provided IDs.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "Restore time entries in bulk (legacy)",
                "operationId": "bulk-restore-time-entry",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "TimeEntry IDs",
                        "name": "ids",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Time entry does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/time-entries/stream": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of time-entries based on the provided workspace ID and filter params.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "List task time entries, streaming the response (legacy)",
                "operationId": "list-stream-time-entries-range",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "from timestamp",
                        "name": "date_from",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "from timestamp",
                        "name": "date_to",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "task id",
                        "name": "task_id",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "status id",
                        "name": "status_id",
                        "in": "query"
                    },
                    {
                        "enum": [
                            "activity",
                            "break"
                        ],
                        "type": "string",
                        "description": "time entry type",
                        "name": "type",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "enum": [
                                "start",
                                "-start",
                                "task_id",
                                "-task_id",
                                "created_at",
                                "-created_at",
                                "updated_at",
                                "-updated_at"
                            ],
                            "type": "string"
                        },
                        "collectionFormat": "csv",
                        "description": "order by",
                        "name": "order_by",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "filter in/out archived TEs",
                        "name": "archived",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/timeentry.TimeEntryWithTask"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/time-entries/time-block-ids/stream": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns a list of time-entries based on the provided workspace ID and filter params.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "time-entries"
                ],
                "summary": "List task time entries by time block ids, streaming the response (legacy)",
                "operationId": "list-stream-time-entries-time-block-ids",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "collectionFormat": "csv",
                        "description": "filter by timeblock ids",
                        "name": "time_block_id",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/models.TimeEntry"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/workspaces/{workspace_id}/users/me/settings": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Returns merged user settings for the workspace (workspace-specific overrides combined with global settings).",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "user-workspace-settings"
                ],
                "summary": "Get user workspace settings",
                "operationId": "get-user-workspace-settings",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Settings retrieved successfully",
                        "schema": {
                            "$ref": "#/definitions/userworkspace.MergedUserWorkspaceSettings"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            },
            "patch": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Updates workspace-specific user settings. Setting a value to null removes the workspace override and reverts to the global setting.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "user-workspace-settings"
                ],
                "summary": "Partial update user workspace settings",
                "operationId": "partial-update-user-workspace-settings",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Settings payload",
                        "name": "settings",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/userworkspace.PartialUpdatePayload"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successfully updated",
                        "schema": {
                            "$ref": "#/definitions/models.UserWorkspaceSettings"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/{organization_id}/workspaces/{workspace_id}/tracking/current": {
            "get": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Get current tracked time entry.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tracking"
                ],
                "summary": "Get current tracked time entry (legacy)",
                "operationId": "get-tracked-time-entry",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Time entry",
                        "schema": {
                            "$ref": "#/definitions/models.TimeEntry"
                        }
                    },
                    "204": {
                        "description": "Not tracking a time entry"
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/{organization_id}/workspaces/{workspace_id}/tracking/start": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Start tracking time entry.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tracking"
                ],
                "summary": "Start tracking time entry (legacy)",
                "operationId": "start-tracking",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "payload",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/timeentry.StartTrackingPayload"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Time entry",
                        "schema": {
                            "$ref": "#/definitions/models.TimeEntry"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "User task does not exist",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "422": {
                        "description": "Cannot track multiple time entries at the same time",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        },
        "/{organization_id}/workspaces/{workspace_id}/tracking/stop": {
            "post": {
                "security": [
                    {
                        "bearerAuth": [],
                        "cookieAuth": []
                    }
                ],
                "description": "Stop tracking time entry.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "tracking"
                ],
                "summary": "Stop tracking time entry (legacy)",
                "operationId": "stop-tracking",
                "deprecated": true,
                "parameters": [
                    {
                        "type": "integer",
                        "description": "organization ID",
                        "name": "organization_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "workspace ID",
                        "name": "workspace_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "payload",
                        "name": "payload",
                        "in": "body",
                        "schema": {
                            "$ref": "#/definitions/timeentry.StopTrackingPayload"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Time entry",
                        "schema": {
                            "$ref": "#/definitions/models.TimeEntry"
                        }
                    },
                    "400": {
                        "description": "Invalid request",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "403": {
                        "description": "Insufficient permissions",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "404": {
                        "description": "Not tracking a time entry",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.Error"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "authentication.UserMetadata": {
            "type": "object",
            "required": [
                "flags",
                "has_tasks"
            ],
            "properties": {
                "flags": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/betafeatures.BetaFeatureUser"
                    }
                },
                "has_tasks": {
                    "type": "boolean"
                }
            }
        },
        "backoffice.betaFeaturePayload": {
            "type": "object",
            "required": [
                "code",
                "comment",
                "value"
            ],
            "properties": {
                "code": {
                    "type": "string"
                },
                "comment": {
                    "type": "string"
                },
                "value": {
                    "type": "boolean"
                }
            }
        },
        "betafeatures.BetaFeature": {
            "type": "object",
            "required": [
                "active_users",
                "beta_feature_id",
                "code",
                "description",
                "enabled"
            ],
            "properties": {
                "active_users": {
                    "description": "ActiveUsers Number of users that have feature activated",
                    "type": "integer"
                },
                "beta_feature_id": {
                    "description": "Feature ID",
                    "type": "integer"
                },
                "code": {
                    "description": "Feature code",
                    "type": "string"
                },
                "description": {
                    "description": "Feature description, omitted if empty",
                    "type": "string"
                },
                "enabled": {
                    "description": "Whether the feature is enabled",
                    "type": "boolean"
                }
            }
        },
        "betafeatures.BetaFeaturePayload": {
            "type": "object",
            "required": [
                "code",
                "description"
            ],
            "properties": {
                "code": {
                    "description": "Feature code",
                    "type": "string"
                },
                "description": {
                    "description": "Feature description, omitted if empty",
                    "type": "string"
                }
            }
        },
        "betafeatures.BetaFeatureUser": {
            "type": "object",
            "required": [
                "beta_feature_id",
                "code",
                "description",
                "enabled_for_all",
                "enabled_for_user"
            ],
            "properties": {
                "beta_feature_id": {
                    "description": "Feature ID",
                    "type": "integer"
                },
                "code": {
                    "description": "Feature code",
                    "type": "string"
                },
                "description": {
                    "description": "Feature description, omitted if empty",
                    "type": "string"
                },
                "enabled_for_all": {
                    "description": "Whether the feature is enabled for all users",
                    "type": "boolean"
                },
                "enabled_for_user": {
                    "description": "Whether the feature is enabled for current user.",
                    "type": "boolean"
                }
            }
        },
        "chat.ChatWithMessageCount": {
            "type": "object",
            "required": [
                "created_at",
                "id",
                "message_count",
                "name",
                "toggl_user_id",
                "workspace_id"
            ],
            "properties": {
                "created_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "deleted_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "id": {
                    "type": "integer"
                },
                "message_count": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "toggl_user_id": {
                    "type": "integer"
                },
                "updated_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "workspace_id": {
                    "type": "integer"
                }
            }
        },
        "chat.Payload": {
            "type": "object",
            "required": [
                "name"
            ],
            "properties": {
                "name": {
                    "type": "string"
                }
            }
        },
        "chatmessage.PartialUpdatePayload": {
            "type": "object",
            "properties": {
                "content": {
                    "type": "object",
                    "x-nullable": true
                },
                "feedback_message": {
                    "type": "string",
                    "minLength": 1,
                    "x-nullable": true
                },
                "feedback_type": {
                    "type": "string",
                    "enum": [
                        "positive",
                        "negative"
                    ],
                    "x-nullable": true
                }
            }
        },
        "client.Payload": {
            "type": "object",
            "required": [
                "name"
            ],
            "properties": {
                "name": {
                    "type": "string"
                }
            }
        },
        "client.UserGroupExtended": {
            "type": "object",
            "required": [
                "created_at",
                "deleted_at",
                "display_name",
                "focus_role_id",
                "organization_user_id",
                "track_role_id",
                "updated_at",
                "user_account_id",
                "user_group_id",
                "work_role_id"
            ],
            "properties": {
                "created_at": {
                    "type": "string",
                    "example": "2021-09-01T00:00:00Z"
                },
                "deleted_at": {
                    "type": "string",
                    "example": "2021-09-01T00:00:00Z"
                },
                "display_name": {
                    "type": "string",
                    "example": "John Doe"
                },
                "focus_role_id": {
                    "type": "integer",
                    "example": 2
                },
                "organization_user_id": {
                    "type": "integer",
                    "example": 20000000
                },
                "track_role_id": {
                    "type": "integer",
                    "example": 1
                },
                "updated_at": {
                    "type": "string",
                    "example": "2021-09-01T00:00:00Z"
                },
                "user_account_id": {
                    "type": "integer",
                    "example": 20000000
                },
                "user_group_id": {
                    "type": "integer",
                    "example": 20000000
                },
                "work_role_id": {
                    "type": "integer",
                    "example": 3
                }
            }
        },
        "client.UserGroupInfoResponse": {
            "type": "object",
            "required": [
                "emoji",
                "id",
                "name"
            ],
            "properties": {
                "emoji": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "client.WorkspaceGroupExtended": {
            "type": "object",
            "required": [
                "created_at",
                "deleted_at",
                "name",
                "updated_at",
                "workspace_group_id",
                "workspace_id"
            ],
            "properties": {
                "created_at": {
                    "type": "string",
                    "example": "2021-09-01T00:00:00Z"
                },
                "deleted_at": {
                    "type": "string",
                    "example": "2021-09-01T00:00:00Z"
                },
                "name": {
                    "type": "string",
                    "example": "Workspace Name"
                },
                "updated_at": {
                    "type": "string",
                    "example": "2021-09-01T00:00:00Z"
                },
                "workspace_group_id": {
                    "type": "integer",
                    "example": 20000000
                },
                "workspace_id": {
                    "type": "integer",
                    "example": 20000000
                }
            }
        },
        "composite.CreatePayload": {
            "type": "object",
            "required": [
                "name"
            ],
            "properties": {
                "assignee_user_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    },
                    "x-nullable": true
                },
                "auto_log_time": {
                    "type": "boolean"
                },
                "billable": {
                    "type": "boolean"
                },
                "color": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "end_date": {
                    "type": "string",
                    "format": "date"
                },
                "estimated_mins": {
                    "type": "integer"
                },
                "ghost_assignee_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    },
                    "x-nullable": true
                },
                "integration_ext_id": {
                    "type": "integer"
                },
                "integration_source": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "notes": {
                    "type": "string"
                },
                "parent_task_id": {
                    "type": "integer"
                },
                "pinned": {
                    "type": "boolean"
                },
                "position": {
                    "type": "integer",
                    "x-nullable": true
                },
                "priority": {
                    "type": "string",
                    "enum": [
                        "none",
                        "low",
                        "medium",
                        "high"
                    ]
                },
                "priority_at": {
                    "type": "string",
                    "format": "date"
                },
                "private": {
                    "type": "boolean"
                },
                "project_id": {
                    "type": "integer"
                },
                "recurring_task_id": {
                    "type": "integer"
                },
                "rrule": {
                    "type": "string",
                    "x-nullable": true
                },
                "start_date": {
                    "type": "string",
                    "format": "date"
                },
                "status_id": {
                    "type": "integer"
                },
                "tag_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    },
                    "x-nullable": true
                }
            }
        },
        "composite.CreateProjectPayload": {
            "type": "object",
            "required": [
                "project"
            ],
            "properties": {
                "members": {
                    "description": "User data, and other membership details for adding members to the project.",
                    "allOf": [
                        {
                            "$ref": "#/definitions/projectuser.PostProjectMembers"
                        }
                    ]
                },
                "milestones": {
                    "description": "The milestones to be created alongside the project.",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/milestone.Payload"
                    }
                },
                "project": {
                    "description": "The project to be created",
                    "allOf": [
                        {
                            "$ref": "#/definitions/project.Payload"
                        }
                    ]
                },
                "rates": {
                    "description": "The rates to be created alongside the project.",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/project.NewRate"
                    }
                },
                "resource_ids": {
                    "description": "The resource IDs/ghost IDs to be associated with the project.",
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                }
            }
        },
        "composite.CreateProjectResponse": {
            "type": "object",
            "required": [
                "milestones",
                "project",
                "project_ghosts",
                "rates"
            ],
            "properties": {
                "milestones": {
                    "description": "Milestones that were created",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.Milestone"
                    }
                },
                "project": {
                    "description": "Project that was created",
                    "allOf": [
                        {
                            "$ref": "#/definitions/models.Project"
                        }
                    ]
                },
                "project_ghosts": {
                    "description": "Resources/ghosts associated with the project",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/ghost.GhostAPI"
                    }
                },
                "rates": {
                    "description": "Project rates that were created",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/project.RateAPI"
                    }
                }
            }
        },
        "composite.CreateTasksPayload": {
            "type": "object",
            "required": [
                "task"
            ],
            "properties": {
                "subtasks": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/task.CreatePayloadWithoutParentID"
                    }
                },
                "task": {
                    "$ref": "#/definitions/composite.CreatePayload"
                },
                "time_blocks": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/timeblock.Payload"
                    }
                },
                "time_entry": {
                    "$ref": "#/definitions/composite.TimeEntryPayloadWithTimeBlock"
                }
            }
        },
        "composite.CreateTasksResponse": {
            "type": "object",
            "required": [
                "subtasks",
                "task",
                "time_blocks",
                "time_entry"
            ],
            "properties": {
                "subtasks": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.Task"
                    }
                },
                "task": {
                    "$ref": "#/definitions/models.Task"
                },
                "time_blocks": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.TimeBlock"
                    }
                },
                "time_entry": {
                    "$ref": "#/definitions/models.TimeEntry"
                }
            }
        },
        "composite.TimeEntryPayloadWithTimeBlock": {
            "type": "object",
            "required": [
                "start",
                "type"
            ],
            "properties": {
                "description": {
                    "type": "string"
                },
                "duration": {
                    "type": "integer",
                    "minimum": 0
                },
                "start": {
                    "type": "string"
                },
                "time_block": {
                    "$ref": "#/definitions/timeblock.Payload"
                },
                "time_block_id": {
                    "type": "integer"
                },
                "type": {
                    "enum": [
                        "activity",
                        "break"
                    ],
                    "allOf": [
                        {
                            "$ref": "#/definitions/models.TimeEntryType"
                        }
                    ]
                }
            }
        },
        "customfield.CreateOptionPayload": {
            "type": "object",
            "required": [
                "name"
            ],
            "properties": {
                "color": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "customfield.CreatePayload": {
            "type": "object",
            "required": [
                "entity_type",
                "field_type",
                "name"
            ],
            "properties": {
                "description": {
                    "type": "string"
                },
                "entity_type": {
                    "type": "string",
                    "enum": [
                        "project"
                    ]
                },
                "field_type": {
                    "type": "string",
                    "enum": [
                        "select",
                        "multi_select",
                        "text",
                        "number",
                        "date",
                        "checkbox",
                        "users"
                    ]
                },
                "name": {
                    "type": "string"
                },
                "options": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                        "$ref": "#/definitions/customfield.CreateOptionPayload"
                    }
                }
            }
        },
        "customfield.UpdateOptionPayload": {
            "type": "object",
            "required": [
                "name"
            ],
            "properties": {
                "color": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "customfield.UpdatePayload": {
            "type": "object",
            "required": [
                "name"
            ],
            "properties": {
                "description": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "datagenerator.Payload": {
            "type": "object",
            "required": [
                "end_date",
                "max_time_blocks_per_task",
                "max_time_entries_per_task",
                "min_time_blocks_per_task",
                "min_time_entries_per_task",
                "number_of_clients",
                "number_of_projects",
                "number_of_tasks",
                "private",
                "start_date"
            ],
            "properties": {
                "end_date": {
                    "type": "string"
                },
                "max_time_blocks_per_task": {
                    "type": "integer"
                },
                "max_time_entries_per_task": {
                    "type": "integer"
                },
                "min_time_blocks_per_task": {
                    "type": "integer"
                },
                "min_time_entries_per_task": {
                    "type": "integer"
                },
                "number_of_clients": {
                    "type": "integer"
                },
                "number_of_projects": {
                    "type": "integer"
                },
                "number_of_tasks": {
                    "type": "integer"
                },
                "private": {
                    "description": "Sets the generated tasks, and projects visibility",
                    "type": "boolean"
                },
                "start_date": {
                    "type": "string"
                }
            }
        },
        "dictionary.BasicDict": {
            "type": "object",
            "required": [
                "id",
                "name"
            ],
            "properties": {
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "dictionary.BasicDictionary": {
            "type": "object",
            "additionalProperties": {
                "$ref": "#/definitions/dictionary.BasicDict"
            }
        },
        "dictionary.ClientDictionary": {
            "type": "object",
            "additionalProperties": {
                "$ref": "#/definitions/dictionary.BasicDict"
            }
        },
        "dictionary.CustomFieldDict": {
            "type": "object",
            "required": [
                "field_type",
                "name"
            ],
            "properties": {
                "field_type": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "dictionary.CustomFieldOptionDict": {
            "type": "object",
            "required": [
                "custom_field_id",
                "is_deleted",
                "name"
            ],
            "properties": {
                "custom_field_id": {
                    "type": "integer"
                },
                "is_deleted": {
                    "type": "boolean"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "dictionary.CustomFieldOptionsDictionary": {
            "type": "object",
            "additionalProperties": {
                "$ref": "#/definitions/dictionary.CustomFieldOptionDict"
            }
        },
        "dictionary.CustomFieldsDictionary": {
            "type": "object",
            "additionalProperties": {
                "$ref": "#/definitions/dictionary.CustomFieldDict"
            }
        },
        "dictionary.Dictionary": {
            "type": "object",
            "properties": {
                "clients": {
                    "$ref": "#/definitions/dictionary.ClientDictionary"
                },
                "custom_field_options": {
                    "$ref": "#/definitions/dictionary.CustomFieldOptionsDictionary"
                },
                "custom_fields": {
                    "$ref": "#/definitions/dictionary.CustomFieldsDictionary"
                },
                "groups": {
                    "$ref": "#/definitions/dictionary.BasicDictionary"
                },
                "projects": {
                    "$ref": "#/definitions/dictionary.ProjectDictionary"
                },
                "status": {
                    "$ref": "#/definitions/dictionary.StatusDictionary"
                },
                "tags": {
                    "$ref": "#/definitions/dictionary.TagDictionary"
                },
                "tasks": {
                    "$ref": "#/definitions/dictionary.TaskDictionary"
                },
                "users": {
                    "$ref": "#/definitions/dictionary.UserDictionary"
                }
            }
        },
        "dictionary.ProjectDict": {
            "type": "object",
            "required": [
                "auto_compute_estimates",
                "billable",
                "children_count",
                "id",
                "name",
                "task_ids"
            ],
            "properties": {
                "auto_compute_estimates": {
                    "type": "boolean"
                },
                "billable": {
                    "type": "boolean"
                },
                "children_count": {
                    "type": "integer"
                },
                "client_id": {
                    "type": "integer"
                },
                "color": {
                    "type": "string"
                },
                "estimated_mins": {
                    "type": "integer"
                },
                "fixed_fee": {
                    "$ref": "#/definitions/dictionary.ProjectFixedFee"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "parent_id": {
                    "type": "integer"
                },
                "task_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                }
            }
        },
        "dictionary.ProjectDictionary": {
            "type": "object",
            "additionalProperties": {
                "$ref": "#/definitions/dictionary.ProjectDict"
            }
        },
        "dictionary.ProjectFixedFee": {
            "type": "object",
            "required": [
                "amount",
                "currency"
            ],
            "properties": {
                "amount": {
                    "type": "number"
                },
                "currency": {
                    "type": "string"
                }
            }
        },
        "dictionary.StatusDict": {
            "type": "object",
            "required": [
                "id",
                "name",
                "position",
                "type"
            ],
            "properties": {
                "emoji": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "position": {
                    "type": "integer"
                },
                "type": {
                    "$ref": "#/definitions/models.StatusType"
                }
            }
        },
        "dictionary.StatusDictionary": {
            "type": "object",
            "additionalProperties": {
                "$ref": "#/definitions/dictionary.StatusDict"
            }
        },
        "dictionary.TagDict": {
            "type": "object",
            "required": [
                "id",
                "name"
            ],
            "properties": {
                "color": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "dictionary.TagDictionary": {
            "type": "object",
            "additionalProperties": {
                "$ref": "#/definitions/dictionary.TagDict"
            }
        },
        "dictionary.TaskDict": {
            "type": "object",
            "required": [
                "children_count",
                "creator_id",
                "id",
                "name",
                "pinned",
                "priority",
                "private",
                "status_id"
            ],
            "properties": {
                "billable": {
                    "type": "boolean"
                },
                "children_count": {
                    "type": "integer"
                },
                "color": {
                    "type": "string"
                },
                "creator_id": {
                    "type": "integer"
                },
                "description": {
                    "type": "string"
                },
                "estimated_mins": {
                    "type": "integer"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "notes": {
                    "type": "string"
                },
                "parent_task_id": {
                    "type": "integer"
                },
                "pinned": {
                    "type": "boolean"
                },
                "priority": {
                    "type": "string"
                },
                "private": {
                    "type": "boolean"
                },
                "project_id": {
                    "type": "integer"
                },
                "status_id": {
                    "type": "integer"
                },
                "status_updated_at": {
                    "type": "string"
                }
            }
        },
        "dictionary.TaskDictionary": {
            "type": "object",
            "additionalProperties": {
                "$ref": "#/definitions/dictionary.TaskDict"
            }
        },
        "dictionary.UserDict": {
            "type": "object",
            "required": [
                "email",
                "id",
                "name"
            ],
            "properties": {
                "email": {
                    "type": "string"
                },
                "group_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "weekly_working_hours": {
                    "type": "number"
                }
            }
        },
        "dictionary.UserDictionary": {
            "type": "object",
            "additionalProperties": {
                "$ref": "#/definitions/dictionary.UserDict"
            }
        },
        "dto.AggregationFilterRequest": {
            "type": "object",
            "required": [
                "aggregation",
                "conditions",
                "operator",
                "property",
                "value"
            ],
            "properties": {
                "aggregation": {
                    "$ref": "#/definitions/dto.AggregationRequest"
                },
                "conditions": {
                    "$ref": "#/definitions/dto.AggregationsFilterRequest"
                },
                "operator": {
                    "type": "string"
                },
                "property": {
                    "type": "string"
                },
                "value": {}
            }
        },
        "dto.AggregationRequest": {
            "type": "object",
            "required": [
                "function",
                "property"
            ],
            "properties": {
                "function": {
                    "type": "string"
                },
                "property": {
                    "type": "string"
                }
            }
        },
        "dto.AggregationsFilterRequest": {
            "type": "array",
            "items": {
                "$ref": "#/definitions/dto.AggregationFilterRequest"
            }
        },
        "dto.AttributeRequest": {
            "type": "object",
            "required": [
                "property"
            ],
            "properties": {
                "property": {
                    "type": "string"
                }
            }
        },
        "dto.FilterRequest": {
            "type": "object",
            "required": [
                "conditions",
                "operator",
                "property",
                "value"
            ],
            "properties": {
                "conditions": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/dto.FilterRequest"
                    }
                },
                "operator": {
                    "type": "string"
                },
                "property": {
                    "type": "string"
                },
                "value": {}
            }
        },
        "dto.GroupingRequest": {
            "type": "object",
            "required": [
                "property",
                "show_empty"
            ],
            "properties": {
                "property": {
                    "type": "string"
                },
                "show_empty": {
                    "type": "boolean"
                }
            }
        },
        "dto.ModifiersRequest": {
            "type": "object",
            "additionalProperties": true
        },
        "dto.OrdinationRequest": {
            "type": "object",
            "required": [
                "direction",
                "nulls",
                "property"
            ],
            "properties": {
                "direction": {
                    "type": "string"
                },
                "nulls": {
                    "type": "string"
                },
                "property": {
                    "type": "string"
                }
            }
        },
        "dto.PaginationRequest": {
            "type": "object",
            "required": [
                "page",
                "per_page"
            ],
            "properties": {
                "page": {
                    "type": "integer"
                },
                "per_page": {
                    "type": "integer"
                }
            }
        },
        "dto.PeriodRequest": {
            "type": "object",
            "required": [
                "from",
                "preset",
                "to"
            ],
            "properties": {
                "from": {
                    "type": "string"
                },
                "preset": {
                    "type": "string"
                },
                "to": {
                    "type": "string"
                }
            }
        },
        "dto.QueryRequest": {
            "type": "object",
            "required": [
                "aggregation_filters",
                "aggregations",
                "attributes",
                "filters",
                "groupings",
                "limit",
                "modifiers",
                "ordinations",
                "pagination",
                "period",
                "transformations"
            ],
            "properties": {
                "aggregation_filters": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/dto.AggregationFilterRequest"
                    }
                },
                "aggregations": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/dto.AggregationRequest"
                    }
                },
                "attributes": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/dto.AttributeRequest"
                    }
                },
                "filters": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/dto.FilterRequest"
                    }
                },
                "groupings": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/dto.GroupingRequest"
                    }
                },
                "limit": {
                    "type": "integer"
                },
                "modifiers": {
                    "$ref": "#/definitions/dto.ModifiersRequest"
                },
                "ordinations": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/dto.OrdinationRequest"
                    }
                },
                "pagination": {
                    "$ref": "#/definitions/dto.PaginationRequest"
                },
                "period": {
                    "$ref": "#/definitions/dto.PeriodRequest"
                },
                "transformations": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/dto.TransformationRequest"
                    }
                }
            }
        },
        "dto.TransformationRequest": {
            "type": "object",
            "required": [
                "name",
                "parameters"
            ],
            "properties": {
                "name": {
                    "type": "string"
                },
                "parameters": {
                    "type": "array",
                    "items": {}
                }
            }
        },
        "extensiontracking.StartFromDescriptionPayload": {
            "type": "object",
            "required": [
                "integration_source",
                "name",
                "type"
            ],
            "properties": {
                "billable": {
                    "type": "boolean"
                },
                "description": {
                    "type": "string"
                },
                "estimated_mins": {
                    "type": "integer",
                    "minimum": 0
                },
                "integration_source": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "notes": {
                    "type": "string"
                },
                "private": {
                    "type": "boolean"
                },
                "project_name": {
                    "type": "string"
                },
                "start": {
                    "type": "string",
                    "format": "full-date"
                },
                "tag_names": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "type": {
                    "$ref": "#/definitions/models.TimeEntryType"
                }
            }
        },
        "extensiontracking.StartFromDescriptionResult": {
            "type": "object",
            "required": [
                "match_reason",
                "project_resolved",
                "tags_not_found",
                "task",
                "task_created",
                "time_entry"
            ],
            "properties": {
                "match_reason": {
                    "type": "string"
                },
                "project_resolved": {
                    "type": "boolean"
                },
                "tags_not_found": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "task": {
                    "$ref": "#/definitions/models.Task"
                },
                "task_created": {
                    "type": "boolean"
                },
                "time_entry": {
                    "$ref": "#/definitions/models.TimeEntry"
                }
            }
        },
        "flexq.EnrichedResult": {
            "type": "object",
            "required": [
                "data_hierarchical",
                "data_json_row",
                "data_table",
                "dictionaries"
            ],
            "properties": {
                "data_hierarchical": {
                    "type": "object",
                    "additionalProperties": {}
                },
                "data_json_row": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.Result"
                    }
                },
                "data_table": {},
                "dictionaries": {
                    "$ref": "#/definitions/dictionary.Dictionary"
                },
                "total_count": {
                    "type": "integer"
                }
            }
        },
        "ghost.Basic": {
            "type": "object",
            "required": [
                "id",
                "name"
            ],
            "properties": {
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "ghost.GhostAPI": {
            "type": "object",
            "required": [
                "created_at",
                "deleted_at",
                "description",
                "embodied_at",
                "id",
                "name",
                "updated_at",
                "user_id"
            ],
            "properties": {
                "assigned": {
                    "$ref": "#/definitions/ghost.assigned"
                },
                "created_at": {
                    "type": "string"
                },
                "deleted_at": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "embodied_at": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "updated_at": {
                    "type": "string"
                },
                "user_id": {
                    "type": "integer"
                }
            }
        },
        "ghost.UpdateGhost": {
            "type": "object",
            "required": [
                "id"
            ],
            "properties": {
                "assign_action": {
                    "type": "string",
                    "enum": [
                        "add",
                        "remove"
                    ]
                },
                "assign_projects": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "assign_tasks": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "assign_teams": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "description": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "ghost.assigned": {
            "type": "object",
            "required": [
                "projects",
                "tasks",
                "team_ids"
            ],
            "properties": {
                "projects": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/ghost.projectAssignment"
                    }
                },
                "tasks": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/ghost.taskAssignment"
                    }
                },
                "team_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                }
            }
        },
        "ghost.embodyGhost": {
            "type": "object",
            "required": [
                "recipient_org_user_id",
                "recipient_user_account_id",
                "role_id"
            ],
            "properties": {
                "recipient_org_user_id": {
                    "description": "should come directly from accounts invite response `recipient_org_user_id` field.",
                    "type": "integer"
                },
                "recipient_user_account_id": {
                    "description": "should come directly from accounts invite response `recipient_user_account_id` field.",
                    "type": "integer"
                },
                "role_id": {
                    "type": "integer"
                }
            }
        },
        "ghost.newGhost": {
            "type": "object",
            "required": [
                "name"
            ],
            "properties": {
                "assign_projects": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "assign_tasks": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "assign_teams": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "description": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "ghost.projectAssignment": {
            "type": "object",
            "required": [
                "color",
                "id",
                "name",
                "private"
            ],
            "properties": {
                "color": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "private": {
                    "type": "boolean"
                }
            }
        },
        "ghost.taskAssignment": {
            "type": "object",
            "required": [
                "color",
                "id",
                "name"
            ],
            "properties": {
                "color": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "importer.ImportJob": {
            "type": "object",
            "required": [
                "created_at",
                "failed_activities",
                "import_scope",
                "job_id",
                "progress",
                "source_product_id",
                "source_workspace_id",
                "updated_at",
                "user_id",
                "workspace_id"
            ],
            "properties": {
                "created_at": {
                    "type": "string"
                },
                "failed_activities": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "import_scope": {
                    "type": "string"
                },
                "job_id": {
                    "type": "string"
                },
                "progress": {
                    "type": "integer"
                },
                "source_product_id": {
                    "type": "integer"
                },
                "source_workspace_id": {
                    "type": "integer"
                },
                "updated_at": {
                    "type": "string"
                },
                "user_id": {
                    "type": "integer"
                },
                "workspace_id": {
                    "type": "integer"
                }
            }
        },
        "importer.ImportJobResponse": {
            "type": "object",
            "required": [
                "created_at",
                "import_scope",
                "job_id",
                "progress",
                "source_product_id",
                "source_workspace_id",
                "status"
            ],
            "properties": {
                "created_at": {
                    "type": "string"
                },
                "import_scope": {
                    "type": "string"
                },
                "job_id": {
                    "type": "string"
                },
                "progress": {
                    "type": "integer"
                },
                "source_product_id": {
                    "type": "integer"
                },
                "source_workspace_id": {
                    "type": "integer"
                },
                "status": {
                    "type": "string"
                }
            }
        },
        "importer.importPreview": {
            "type": "object",
            "required": [
                "members"
            ],
            "properties": {
                "members": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/importer.member"
                    }
                }
            }
        },
        "importer.importRequest": {
            "type": "object",
            "required": [
                "import_scope",
                "source_product_id",
                "source_workspace_id"
            ],
            "properties": {
                "import_scope": {
                    "type": "string",
                    "enum": [
                        "full_workspace",
                        "user_only"
                    ],
                    "example": "user_only"
                },
                "source_product_id": {
                    "type": "integer",
                    "example": 1
                },
                "source_workspace_id": {
                    "type": "integer",
                    "example": 623123
                }
            }
        },
        "importer.member": {
            "type": "object",
            "required": [
                "email",
                "focus_role_id",
                "granted_focus_role_id",
                "name",
                "plan_ghost_user",
                "plan_role",
                "present",
                "track_role"
            ],
            "properties": {
                "email": {
                    "type": "string"
                },
                "focus_role_id": {
                    "type": "integer"
                },
                "granted_focus_role_id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "plan_ghost_user": {
                    "type": "boolean"
                },
                "plan_role": {
                    "type": "string"
                },
                "present": {
                    "type": "boolean"
                },
                "track_role": {
                    "type": "string"
                }
            }
        },
        "importer.source": {
            "type": "object",
            "required": [
                "admin",
                "entities",
                "organization_id",
                "product_id",
                "product_name",
                "workspace_id",
                "workspace_name"
            ],
            "properties": {
                "admin": {
                    "type": "boolean"
                },
                "entities": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "organization_id": {
                    "type": "integer"
                },
                "product_id": {
                    "type": "integer"
                },
                "product_name": {
                    "type": "string"
                },
                "workspace_id": {
                    "type": "integer"
                },
                "workspace_name": {
                    "type": "string"
                }
            }
        },
        "milestone.PartialUpdatePayload": {
            "type": "object",
            "properties": {
                "color": {
                    "description": "nolint:lll",
                    "type": "string",
                    "x-nullable": true
                },
                "completed_at": {
                    "description": "nolint:lll",
                    "type": "string",
                    "format": "full-date",
                    "x-nullable": true
                },
                "due_date": {
                    "description": "nolint:lll",
                    "type": "string",
                    "format": "date"
                },
                "name": {
                    "description": "nolint:lll",
                    "type": "string"
                },
                "project_ids": {
                    "description": "nolint:lll",
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "team_ids": {
                    "description": "nolint:lll",
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                }
            }
        },
        "milestone.Payload": {
            "type": "object",
            "required": [
                "color",
                "due_date",
                "name"
            ],
            "properties": {
                "color": {
                    "type": "string"
                },
                "completed_at": {
                    "description": "nolint:lll",
                    "type": "string",
                    "format": "full-date"
                },
                "due_date": {
                    "description": "nolint:lll",
                    "type": "string",
                    "format": "date"
                },
                "name": {
                    "type": "string"
                },
                "project_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "team_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                }
            }
        },
        "model.Result": {
            "type": "object",
            "additionalProperties": {}
        },
        "models.BillableSource": {
            "type": "string",
            "enum": [
                "manual",
                "task_default"
            ],
            "x-enum-varnames": [
                "BillableSourceManual",
                "BillableSourceTaskDefault"
            ]
        },
        "models.Calendar": {
            "type": "object",
            "required": [
                "auto_track",
                "background_color",
                "calendar_id",
                "calendar_integration_id",
                "created_at",
                "default_planned_task_id",
                "default_project_id",
                "default_workspace_id",
                "deleted_at",
                "external_id",
                "foreground_color",
                "name",
                "remind_tracking",
                "selected",
                "updated_at"
            ],
            "properties": {
                "auto_track": {
                    "type": "boolean"
                },
                "background_color": {
                    "type": "string"
                },
                "calendar_id": {
                    "type": "integer"
                },
                "calendar_integration_id": {
                    "type": "integer"
                },
                "created_at": {
                    "type": "string"
                },
                "default_planned_task_id": {
                    "type": "integer"
                },
                "default_project_id": {
                    "type": "integer"
                },
                "default_workspace_id": {
                    "type": "integer"
                },
                "deleted_at": {
                    "type": "string"
                },
                "external_id": {
                    "type": "string"
                },
                "foreground_color": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "remind_tracking": {
                    "description": "The following fields are deprecated but we need to keep them for backward compatibility with previous versions\nof mobile apps",
                    "type": "boolean"
                },
                "selected": {
                    "type": "boolean"
                },
                "updated_at": {
                    "type": "string"
                }
            }
        },
        "models.Chat": {
            "type": "object",
            "required": [
                "created_at",
                "id",
                "name",
                "toggl_user_id",
                "workspace_id"
            ],
            "properties": {
                "created_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "deleted_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "toggl_user_id": {
                    "type": "integer"
                },
                "updated_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "workspace_id": {
                    "type": "integer"
                }
            }
        },
        "models.ChatMessage": {
            "type": "object",
            "required": [
                "chat_id",
                "content",
                "created_at",
                "id",
                "role",
                "workspace_id"
            ],
            "properties": {
                "chat_id": {
                    "type": "integer"
                },
                "content": {
                    "$ref": "#/definitions/models.ChatMessageContent"
                },
                "created_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "feedback_message": {
                    "type": "string"
                },
                "feedback_type": {
                    "enum": [
                        "positive",
                        "negative"
                    ],
                    "allOf": [
                        {
                            "$ref": "#/definitions/models.ChatMessageFeedbackType"
                        }
                    ]
                },
                "id": {
                    "type": "integer"
                },
                "role": {
                    "enum": [
                        "user",
                        "assistant"
                    ],
                    "allOf": [
                        {
                            "$ref": "#/definitions/models.ChatMessageRole"
                        }
                    ]
                },
                "updated_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "workspace_id": {
                    "type": "integer"
                }
            }
        },
        "models.ChatMessageContent": {
            "type": "object",
            "additionalProperties": {}
        },
        "models.ChatMessageFeedbackType": {
            "type": "string",
            "enum": [
                "positive",
                "negative"
            ],
            "x-enum-varnames": [
                "ChatMessageFeedbackTypePositive",
                "ChatMessageFeedbackTypeNegative"
            ]
        },
        "models.ChatMessageRole": {
            "type": "string",
            "enum": [
                "user",
                "assistant"
            ],
            "x-enum-varnames": [
                "ChatMessageRoleUser",
                "ChatMessageRoleAssistant"
            ]
        },
        "models.Client": {
            "type": "object",
            "required": [
                "active",
                "created_at",
                "id",
                "name",
                "workspace_id"
            ],
            "properties": {
                "active": {
                    "type": "boolean"
                },
                "created_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "deleted_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "toggl_user_id": {
                    "type": "integer"
                },
                "updated_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "workspace_id": {
                    "type": "integer"
                }
            }
        },
        "models.ClientLite": {
            "type": "object",
            "required": [
                "id",
                "name"
            ],
            "properties": {
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "models.Computation": {
            "type": "object",
            "required": [
                "allocated_minutes",
                "assigned_tasks_count",
                "date",
                "estimated_minutes",
                "working_minutes"
            ],
            "properties": {
                "allocated_minutes": {
                    "description": "The summation of a user's time blocked minutes in the day",
                    "type": "number"
                },
                "assigned_tasks_count": {
                    "description": "Number of tasks assigned to the user on the specified `Date`",
                    "type": "integer"
                },
                "date": {
                    "description": "The date of the computation",
                    "type": "string",
                    "format": "date"
                },
                "estimated_minutes": {
                    "description": "The summation of a user's tasks' estimated minutes in the day",
                    "type": "integer"
                },
                "working_minutes": {
                    "description": "The user's per day working minutes set in their user preferences",
                    "type": "integer"
                }
            }
        },
        "models.ComputationGroup": {
            "type": "object",
            "required": [
                "computations",
                "id",
                "type"
            ],
            "properties": {
                "computations": {
                    "description": "The computations that belong to the grouping entity",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.Computation"
                    }
                },
                "id": {
                    "description": "The ID of the entity that groups the computations",
                    "type": "integer"
                },
                "type": {
                    "description": "The type of the entity that groups the computations",
                    "type": "string",
                    "enum": [
                        "user",
                        "resource"
                    ]
                }
            }
        },
        "models.CustomFieldOption": {
            "type": "object",
            "required": [
                "created_at",
                "custom_field_id",
                "id",
                "name",
                "position",
                "updated_at",
                "workspace_id"
            ],
            "properties": {
                "color": {
                    "type": "string"
                },
                "created_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "custom_field_id": {
                    "type": "integer"
                },
                "deleted_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "description": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "position": {
                    "type": "integer"
                },
                "updated_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "workspace_id": {
                    "type": "integer"
                }
            }
        },
        "models.CustomFieldOptionValue": {
            "type": "object",
            "required": [
                "is_deleted",
                "option_id",
                "option_name"
            ],
            "properties": {
                "is_deleted": {
                    "type": "boolean"
                },
                "option_id": {
                    "type": "integer"
                },
                "option_name": {
                    "type": "string"
                }
            }
        },
        "models.CustomFieldValue": {
            "type": "object",
            "required": [
                "custom_field_id",
                "custom_field_name",
                "field_type",
                "selected_options",
                "value"
            ],
            "properties": {
                "custom_field_id": {
                    "type": "integer"
                },
                "custom_field_name": {
                    "type": "string"
                },
                "field_type": {
                    "type": "string"
                },
                "selected_options": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.CustomFieldOptionValue"
                    }
                },
                "value": {}
            }
        },
        "models.CustomFieldWithOptions": {
            "type": "object",
            "required": [
                "created_at",
                "entity_type",
                "field_type",
                "id",
                "name",
                "options",
                "position",
                "status",
                "updated_at",
                "workspace_id"
            ],
            "properties": {
                "created_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "deleted_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "description": {
                    "type": "string"
                },
                "entity_type": {
                    "type": "string"
                },
                "field_type": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "options": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.CustomFieldOption"
                    }
                },
                "position": {
                    "type": "integer"
                },
                "status": {
                    "type": "string"
                },
                "updated_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "workspace_id": {
                    "type": "integer"
                }
            }
        },
        "models.CustomerResponse": {
            "type": "object",
            "required": [
                "id",
                "url"
            ],
            "properties": {
                "id": {
                    "type": "string"
                },
                "url": {
                    "type": "string"
                }
            }
        },
        "models.DateOnly": {
            "type": "object"
        },
        "models.EffectiveProjectRatesSummary": {
            "type": "object",
            "required": [
                "billable",
                "currency",
                "end_at",
                "has_more_rates",
                "hourly_rate",
                "project_color",
                "project_created_at",
                "project_id",
                "project_name",
                "project_rate_id",
                "start_at",
                "workspace_rate_id"
            ],
            "properties": {
                "billable": {
                    "type": "boolean"
                },
                "currency": {
                    "type": "string"
                },
                "end_at": {
                    "type": "string"
                },
                "has_more_rates": {
                    "type": "boolean"
                },
                "hourly_rate": {
                    "type": "number"
                },
                "project_color": {
                    "type": "string"
                },
                "project_created_at": {
                    "type": "string"
                },
                "project_id": {
                    "type": "integer"
                },
                "project_name": {
                    "type": "string"
                },
                "project_rate_id": {
                    "type": "integer"
                },
                "start_at": {
                    "type": "string"
                },
                "workspace_rate_id": {
                    "type": "integer"
                }
            }
        },
        "models.EnrichedTaskGroupEntry": {
            "type": "object",
            "required": [
                "created_at",
                "end_date",
                "id",
                "name",
                "private",
                "source",
                "start_date",
                "status_id"
            ],
            "properties": {
                "assignee_ghost_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "assignee_user_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "client": {
                    "$ref": "#/definitions/models.ClientLite"
                },
                "color": {
                    "type": "string"
                },
                "created_at": {
                    "type": "string"
                },
                "end_date": {
                    "description": "When a task ends",
                    "type": "string"
                },
                "estimated_mins": {
                    "description": "Estimated minutes of the task",
                    "type": "integer"
                },
                "id": {
                    "description": "The task's ID",
                    "type": "integer"
                },
                "masked": {
                    "description": "Masked indicates the task belongs to a private project the user doesn't have access to.\nWhen true, sensitive fields (Name, Client) are nulled.",
                    "type": "boolean"
                },
                "name": {
                    "description": "Name of the task",
                    "type": "string"
                },
                "private": {
                    "type": "boolean"
                },
                "project": {
                    "$ref": "#/definitions/models.ProjectLite"
                },
                "project_id": {
                    "description": "Project ID fo the task",
                    "type": "integer"
                },
                "source": {
                    "type": "string"
                },
                "start_date": {
                    "description": "When a task starts",
                    "type": "string"
                },
                "status_id": {
                    "description": "Status ID of the task",
                    "type": "integer"
                },
                "weight": {
                    "description": "The weight of a task in the timeline. This is not unique, and one or more\ntasks may have the same weight as long as their dates do not conflict.",
                    "type": "integer"
                }
            }
        },
        "models.IntegrationWithCalendars": {
            "type": "object",
            "required": [
                "auto_track",
                "calendar_integration_id",
                "calendars",
                "created_at",
                "email",
                "error_status",
                "has_write_scope",
                "origin_product_id",
                "provider",
                "scopes"
            ],
            "properties": {
                "auto_track": {
                    "type": "boolean"
                },
                "calendar_integration_id": {
                    "type": "integer"
                },
                "calendars": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.Calendar"
                    }
                },
                "created_at": {
                    "type": "string"
                },
                "email": {
                    "type": "string"
                },
                "error_status": {
                    "type": "string"
                },
                "has_write_scope": {
                    "type": "boolean"
                },
                "origin_product_id": {
                    "description": "The product that initially integrated the calendar.",
                    "type": "integer"
                },
                "provider": {
                    "type": "string"
                },
                "scopes": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            }
        },
        "models.Milestone": {
            "type": "object",
            "required": [
                "color",
                "created_at",
                "due_date",
                "id",
                "name",
                "project_ids",
                "team_ids",
                "workspace_id"
            ],
            "properties": {
                "color": {
                    "type": "string"
                },
                "completed_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "created_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "deleted_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "due_date": {
                    "type": "string",
                    "format": "date"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "project_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "team_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "updated_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "workspace_id": {
                    "type": "integer"
                }
            }
        },
        "models.OnboardingAnswers": {
            "type": "object",
            "required": [
                "answers",
                "created_at",
                "flow_key",
                "schema_version",
                "toggl_user_id",
                "updated_at",
                "workspace_id"
            ],
            "properties": {
                "answers": {
                    "type": "object"
                },
                "completed_at": {
                    "type": "string",
                    "format": "date-time"
                },
                "created_at": {
                    "type": "string",
                    "format": "date-time"
                },
                "flow_key": {
                    "type": "string"
                },
                "last_step": {
                    "type": "string"
                },
                "schema_version": {
                    "type": "integer"
                },
                "toggl_user_id": {
                    "type": "integer"
                },
                "updated_at": {
                    "type": "string",
                    "format": "date-time"
                },
                "variant_key": {
                    "type": "string"
                },
                "workspace_id": {
                    "type": "integer"
                }
            }
        },
        "models.Page-chat_ChatWithMessageCount": {
            "type": "object",
            "required": [
                "data",
                "page",
                "per_page"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/chat.ChatWithMessageCount"
                    }
                },
                "page": {
                    "type": "integer"
                },
                "per_page": {
                    "type": "integer"
                }
            }
        },
        "models.Page-models_ChatMessage": {
            "type": "object",
            "required": [
                "data",
                "page",
                "per_page"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.ChatMessage"
                    }
                },
                "page": {
                    "type": "integer"
                },
                "per_page": {
                    "type": "integer"
                }
            }
        },
        "models.Page-models_Client": {
            "type": "object",
            "required": [
                "data",
                "page",
                "per_page"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.Client"
                    }
                },
                "page": {
                    "type": "integer"
                },
                "per_page": {
                    "type": "integer"
                }
            }
        },
        "models.Page-models_Milestone": {
            "type": "object",
            "required": [
                "data",
                "page",
                "per_page"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.Milestone"
                    }
                },
                "page": {
                    "type": "integer"
                },
                "per_page": {
                    "type": "integer"
                }
            }
        },
        "models.Page-models_Project": {
            "type": "object",
            "required": [
                "data",
                "page",
                "per_page"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.Project"
                    }
                },
                "page": {
                    "type": "integer"
                },
                "per_page": {
                    "type": "integer"
                }
            }
        },
        "models.Page-models_ProjectWithAggregations": {
            "type": "object",
            "required": [
                "data",
                "page",
                "per_page"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.ProjectWithAggregations"
                    }
                },
                "page": {
                    "type": "integer"
                },
                "per_page": {
                    "type": "integer"
                }
            }
        },
        "models.Page-models_Status": {
            "type": "object",
            "required": [
                "data",
                "page",
                "per_page"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.Status"
                    }
                },
                "page": {
                    "type": "integer"
                },
                "per_page": {
                    "type": "integer"
                }
            }
        },
        "models.Page-models_Task": {
            "type": "object",
            "required": [
                "data",
                "page",
                "per_page"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.Task"
                    }
                },
                "page": {
                    "type": "integer"
                },
                "per_page": {
                    "type": "integer"
                }
            }
        },
        "models.Page-models_TaskGroup": {
            "type": "object",
            "required": [
                "data",
                "page",
                "per_page"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.TaskGroup"
                    }
                },
                "page": {
                    "type": "integer"
                },
                "per_page": {
                    "type": "integer"
                }
            }
        },
        "models.Page-models_TimeEntry": {
            "type": "object",
            "required": [
                "data",
                "page",
                "per_page"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.TimeEntry"
                    }
                },
                "page": {
                    "type": "integer"
                },
                "per_page": {
                    "type": "integer"
                }
            }
        },
        "models.Page-task_TaskWithParentAndAggregations": {
            "type": "object",
            "required": [
                "data",
                "page",
                "per_page"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/task.TaskWithParentAndAggregations"
                    }
                },
                "page": {
                    "type": "integer"
                },
                "per_page": {
                    "type": "integer"
                }
            }
        },
        "models.Page-timeblock_TimeBlockAggregate": {
            "type": "object",
            "required": [
                "data",
                "page",
                "per_page"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/timeblock.TimeBlockAggregate"
                    }
                },
                "page": {
                    "type": "integer"
                },
                "per_page": {
                    "type": "integer"
                }
            }
        },
        "models.Page-timeblock_TimeBlockAggregateWithTask": {
            "type": "object",
            "required": [
                "data",
                "page",
                "per_page"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/timeblock.TimeBlockAggregateWithTask"
                    }
                },
                "page": {
                    "type": "integer"
                },
                "per_page": {
                    "type": "integer"
                }
            }
        },
        "models.Page-timeentry_TimeEntryWithTask": {
            "type": "object",
            "required": [
                "data",
                "page",
                "per_page"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/timeentry.TimeEntryWithTask"
                    }
                },
                "page": {
                    "type": "integer"
                },
                "per_page": {
                    "type": "integer"
                }
            }
        },
        "models.PageWithTotal-models_CustomFieldWithOptions": {
            "type": "object",
            "required": [
                "data",
                "page",
                "per_page",
                "total"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.CustomFieldWithOptions"
                    }
                },
                "page": {
                    "type": "integer"
                },
                "per_page": {
                    "type": "integer"
                },
                "total": {
                    "type": "integer"
                }
            }
        },
        "models.PageWithTotal-models_ProjectWithAggregations": {
            "type": "object",
            "required": [
                "data",
                "page",
                "per_page",
                "total"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.ProjectWithAggregations"
                    }
                },
                "page": {
                    "type": "integer"
                },
                "per_page": {
                    "type": "integer"
                },
                "total": {
                    "type": "integer"
                }
            }
        },
        "models.PageWithTotal-models_Tag": {
            "type": "object",
            "required": [
                "data",
                "page",
                "per_page",
                "total"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.Tag"
                    }
                },
                "page": {
                    "type": "integer"
                },
                "per_page": {
                    "type": "integer"
                },
                "total": {
                    "type": "integer"
                }
            }
        },
        "models.PageWithTotal-task_TaskWithParentAndAggregations": {
            "type": "object",
            "required": [
                "data",
                "page",
                "per_page",
                "total"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/task.TaskWithParentAndAggregations"
                    }
                },
                "page": {
                    "type": "integer"
                },
                "per_page": {
                    "type": "integer"
                },
                "total": {
                    "type": "integer"
                }
            }
        },
        "models.PriceResponse": {
            "type": "object",
            "required": [
                "billing_period_in_months",
                "cost_in_cents",
                "currency",
                "tag",
                "track_pricing_plan_id"
            ],
            "properties": {
                "billing_period_in_months": {
                    "type": "integer"
                },
                "cost_in_cents": {
                    "type": "integer"
                },
                "currency": {
                    "type": "string"
                },
                "tag": {
                    "type": "string"
                },
                "track_pricing_plan_id": {
                    "type": "integer"
                }
            }
        },
        "models.ProductResponse": {
            "type": "object",
            "required": [
                "handle",
                "name",
                "site",
                "toggl_product_id",
                "track_enterprise",
                "track_plan_id"
            ],
            "properties": {
                "handle": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "site": {
                    "type": "string"
                },
                "toggl_product_id": {
                    "type": "string"
                },
                "track_enterprise": {
                    "type": "boolean"
                },
                "track_plan_id": {
                    "type": "integer"
                }
            }
        },
        "models.Project": {
            "type": "object",
            "required": [
                "active",
                "auto_compute_estimates",
                "billable",
                "created_at",
                "id",
                "name",
                "permissions",
                "pinned",
                "private",
                "tag_ids",
                "tags",
                "toggl_user_id",
                "workspace_id"
            ],
            "properties": {
                "active": {
                    "type": "boolean"
                },
                "archived_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "auto_compute_estimates": {
                    "type": "boolean"
                },
                "billable": {
                    "type": "boolean"
                },
                "client": {
                    "$ref": "#/definitions/models.ClientLite"
                },
                "client_id": {
                    "type": "integer"
                },
                "color": {
                    "type": "string"
                },
                "created_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "custom_field_values": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.CustomFieldValue"
                    }
                },
                "deleted_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "description": {
                    "type": "string"
                },
                "end_date": {
                    "type": "string",
                    "format": "date"
                },
                "estimated_mins": {
                    "type": "integer"
                },
                "fixed_fee": {
                    "$ref": "#/definitions/models.ProjectFixedFee"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "parent_project_id": {
                    "type": "integer"
                },
                "permissions": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "pinned": {
                    "type": "boolean"
                },
                "private": {
                    "type": "boolean"
                },
                "rate": {
                    "$ref": "#/definitions/models.EffectiveProjectRatesSummary"
                },
                "start_date": {
                    "type": "string",
                    "format": "date"
                },
                "tag_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "tags": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.TagLite"
                    }
                },
                "toggl_user_id": {
                    "type": "integer"
                },
                "updated_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "workspace_id": {
                    "type": "integer"
                }
            }
        },
        "models.ProjectAssignmentMatchTier": {
            "type": "string",
            "enum": [
                "exact_name",
                "similar_name"
            ],
            "x-enum-varnames": [
                "ProjectAssignmentMatchTierExactName",
                "ProjectAssignmentMatchTierSimilarName"
            ]
        },
        "models.ProjectAssignmentOrigin": {
            "type": "string",
            "enum": [
                "manual",
                "auto_suggestion",
                "confirmed_suggestion",
                "integration",
                "legacy"
            ],
            "x-enum-varnames": [
                "ProjectAssignmentOriginManual",
                "ProjectAssignmentOriginAutoSuggestion",
                "ProjectAssignmentOriginConfirmedSuggestion",
                "ProjectAssignmentOriginIntegration",
                "ProjectAssignmentOriginLegacy"
            ]
        },
        "models.ProjectAttachment": {
            "type": "object",
            "required": [
                "created_at",
                "display_order",
                "id",
                "mime_type",
                "project_id",
                "size"
            ],
            "properties": {
                "created_at": {
                    "type": "string"
                },
                "deleted_at": {
                    "type": "string"
                },
                "display_order": {
                    "type": "integer"
                },
                "id": {
                    "type": "integer"
                },
                "mime_type": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "project_id": {
                    "type": "integer"
                },
                "size": {
                    "type": "integer"
                },
                "updated_at": {
                    "type": "string"
                }
            }
        },
        "models.ProjectFixedFee": {
            "type": "object",
            "required": [
                "amount",
                "currency"
            ],
            "properties": {
                "amount": {
                    "type": "number"
                },
                "currency": {
                    "type": "string"
                }
            }
        },
        "models.ProjectLite": {
            "type": "object",
            "required": [
                "id",
                "name",
                "permissions"
            ],
            "properties": {
                "archived_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "color": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "permissions": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "private": {
                    "type": "boolean"
                },
                "rate": {
                    "$ref": "#/definitions/models.EffectiveProjectRatesSummary"
                }
            }
        },
        "models.ProjectWithAggregations": {
            "type": "object",
            "required": [
                "active",
                "auto_compute_estimates",
                "billable",
                "created_at",
                "id",
                "name",
                "permissions",
                "pinned",
                "private",
                "tag_ids",
                "tags",
                "task_estimated_mins",
                "toggl_user_id",
                "total_tracked_secs",
                "workspace_id"
            ],
            "properties": {
                "active": {
                    "type": "boolean"
                },
                "archived_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "auto_compute_estimates": {
                    "type": "boolean"
                },
                "billable": {
                    "type": "boolean"
                },
                "client": {
                    "$ref": "#/definitions/models.ClientLite"
                },
                "client_id": {
                    "type": "integer"
                },
                "color": {
                    "type": "string"
                },
                "created_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "custom_field_values": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.CustomFieldValue"
                    }
                },
                "deleted_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "description": {
                    "type": "string"
                },
                "end_date": {
                    "type": "string",
                    "format": "date"
                },
                "estimated_mins": {
                    "type": "integer"
                },
                "fixed_fee": {
                    "$ref": "#/definitions/models.ProjectFixedFee"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "parent_project_id": {
                    "type": "integer"
                },
                "permissions": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "pinned": {
                    "type": "boolean"
                },
                "private": {
                    "type": "boolean"
                },
                "rate": {
                    "$ref": "#/definitions/models.EffectiveProjectRatesSummary"
                },
                "start_date": {
                    "type": "string",
                    "format": "date"
                },
                "tag_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "tags": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.TagLite"
                    }
                },
                "task_estimated_mins": {
                    "type": "integer"
                },
                "toggl_user_id": {
                    "type": "integer"
                },
                "total_tracked_secs": {
                    "type": "integer"
                },
                "updated_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "workspace_id": {
                    "type": "integer"
                }
            }
        },
        "models.Rate": {
            "type": "object",
            "required": [
                "currency",
                "end_date",
                "hourly_rate",
                "start_date"
            ],
            "properties": {
                "currency": {
                    "type": "string"
                },
                "end_date": {
                    "type": "string"
                },
                "hourly_rate": {
                    "type": "number"
                },
                "start_date": {
                    "type": "string"
                }
            }
        },
        "models.SavedView": {
            "type": "object",
            "required": [
                "created_at",
                "id",
                "name",
                "params",
                "pinned",
                "toggl_user_id",
                "type",
                "workspace_id"
            ],
            "properties": {
                "created_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "deleted_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "icon_name": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "params": {
                    "type": "object"
                },
                "pinned": {
                    "type": "boolean"
                },
                "toggl_user_id": {
                    "type": "integer"
                },
                "type": {
                    "type": "string",
                    "enum": [
                        "inbox",
                        "archive",
                        "board",
                        "timeline",
                        "project",
                        "project.tasks",
                        "project.board",
                        "project.timeline",
                        "projects"
                    ]
                },
                "updated_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "workspace_id": {
                    "type": "integer"
                }
            }
        },
        "models.Status": {
            "type": "object",
            "required": [
                "created_at",
                "id",
                "name",
                "position",
                "type",
                "updated_at",
                "workspace_id"
            ],
            "properties": {
                "created_at": {
                    "type": "string"
                },
                "deleted_at": {
                    "type": "string"
                },
                "emoji": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "position": {
                    "type": "integer"
                },
                "type": {
                    "$ref": "#/definitions/models.StatusType"
                },
                "updated_at": {
                    "type": "string"
                },
                "workspace_id": {
                    "type": "integer"
                }
            }
        },
        "models.StatusLite": {
            "type": "object",
            "required": [
                "id",
                "name",
                "type"
            ],
            "properties": {
                "emoji": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "type": {
                    "$ref": "#/definitions/models.StatusType"
                }
            }
        },
        "models.StatusType": {
            "type": "string",
            "enum": [
                "todo",
                "done",
                "in_progress",
                "blocked"
            ],
            "x-enum-varnames": [
                "StatusTypeTodo",
                "StatusTypeDone",
                "StatusTypeInProgress",
                "StatusTypeBlocked"
            ]
        },
        "models.SubscriptionItemResponse": {
            "type": "object",
            "required": [
                "quantity",
                "updated_at"
            ],
            "properties": {
                "quantity": {
                    "type": "integer"
                },
                "updated_at": {
                    "type": "string"
                }
            }
        },
        "models.SubscriptionResponse": {
            "type": "object",
            "required": [
                "customer",
                "id",
                "payment_failed",
                "state",
                "url"
            ],
            "properties": {
                "customer": {
                    "$ref": "#/definitions/models.CustomerResponse"
                },
                "id": {
                    "type": "string"
                },
                "payment_failed": {
                    "type": "boolean"
                },
                "state": {
                    "type": "string"
                },
                "url": {
                    "type": "string"
                }
            }
        },
        "models.Tag": {
            "type": "object",
            "required": [
                "created_at",
                "id",
                "name",
                "workspace_id"
            ],
            "properties": {
                "color": {
                    "type": "string"
                },
                "created_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "deleted_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "updated_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "workspace_id": {
                    "type": "integer"
                }
            }
        },
        "models.TagLite": {
            "type": "object",
            "required": [
                "id",
                "name"
            ],
            "properties": {
                "color": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "models.Task": {
            "type": "object",
            "required": [
                "created_at",
                "id",
                "name",
                "pinned",
                "position",
                "priority",
                "private",
                "source",
                "status_id",
                "tag_ids",
                "tags",
                "toggl_user_id",
                "workspace_id"
            ],
            "properties": {
                "archived_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "assignee_user_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "auto_log_time": {
                    "type": "boolean"
                },
                "billable": {
                    "type": "boolean"
                },
                "client": {
                    "$ref": "#/definitions/models.ClientLite"
                },
                "color": {
                    "type": "string"
                },
                "created_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "deleted_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "description": {
                    "type": "string"
                },
                "end_date": {
                    "type": "string",
                    "format": "date"
                },
                "estimated_mins": {
                    "type": "integer"
                },
                "ghost_assignee_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "id": {
                    "type": "integer"
                },
                "metadata": {
                    "$ref": "#/definitions/models.TaskMetadata"
                },
                "name": {
                    "type": "string"
                },
                "notes": {
                    "type": "string"
                },
                "parent_task_id": {
                    "type": "integer"
                },
                "parent_task_name": {
                    "type": "string"
                },
                "pinned": {
                    "type": "boolean"
                },
                "position": {
                    "type": "integer"
                },
                "priority": {
                    "type": "string",
                    "enum": [
                        "none",
                        "low",
                        "medium",
                        "high"
                    ]
                },
                "priority_at": {
                    "type": "string",
                    "format": "date"
                },
                "private": {
                    "type": "boolean"
                },
                "project": {
                    "$ref": "#/definitions/models.ProjectLite"
                },
                "project_id": {
                    "type": "integer"
                },
                "recurring_task_id": {
                    "type": "integer"
                },
                "reucrrence_date": {
                    "$ref": "#/definitions/models.DateOnly"
                },
                "rrule": {
                    "type": "string"
                },
                "source": {
                    "type": "string"
                },
                "start_date": {
                    "type": "string",
                    "format": "date"
                },
                "status": {
                    "$ref": "#/definitions/models.StatusLite"
                },
                "status_id": {
                    "type": "integer"
                },
                "status_updated_at": {
                    "type": "string"
                },
                "tag_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "tags": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.TagLite"
                    }
                },
                "toggl_user_id": {
                    "type": "integer"
                },
                "updated_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "workspace_id": {
                    "type": "integer"
                }
            }
        },
        "models.TaskAttachment": {
            "type": "object",
            "required": [
                "created_at",
                "display_order",
                "id",
                "mime_type",
                "size",
                "task_id"
            ],
            "properties": {
                "created_at": {
                    "type": "string"
                },
                "deleted_at": {
                    "type": "string"
                },
                "display_order": {
                    "type": "integer"
                },
                "id": {
                    "type": "integer"
                },
                "mime_type": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "size": {
                    "type": "integer"
                },
                "task_id": {
                    "type": "integer"
                },
                "updated_at": {
                    "type": "string"
                }
            }
        },
        "models.TaskGroup": {
            "type": "object",
            "required": [
                "id",
                "tasks",
                "type"
            ],
            "properties": {
                "id": {
                    "description": "The ID of one of the entities: projects/users determined by `Type`.",
                    "type": "integer"
                },
                "tasks": {
                    "description": "The tasks that belong to the group.",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.EnrichedTaskGroupEntry"
                    }
                },
                "type": {
                    "description": "`Type` determines what kind of group this is, and what table to look for\nbased on `ID`.",
                    "type": "string",
                    "enum": [
                        "projects",
                        "users",
                        "ghosts"
                    ]
                }
            }
        },
        "models.TaskMetadata": {
            "type": "object",
            "properties": {
                "all_day": {
                    "type": "boolean"
                },
                "calendar_event_id": {
                    "type": "integer"
                },
                "calendar_id": {
                    "type": "integer"
                },
                "external_id": {
                    "type": "string"
                },
                "ical_uid": {
                    "type": "string"
                },
                "meeting_link": {
                    "type": "string"
                },
                "project_assignment": {
                    "$ref": "#/definitions/models.TaskProjectAssignmentMetadata"
                },
                "updated_at": {
                    "type": "string",
                    "format": "full-date"
                }
            }
        },
        "models.TaskProjectAssignmentMetadata": {
            "type": "object",
            "required": [
                "origin"
            ],
            "properties": {
                "accuracy": {
                    "type": "number"
                },
                "confirmed_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "match_tier": {
                    "$ref": "#/definitions/models.ProjectAssignmentMatchTier"
                },
                "matched_name": {
                    "type": "string"
                },
                "normalized_name": {
                    "type": "string"
                },
                "origin": {
                    "$ref": "#/definitions/models.ProjectAssignmentOrigin"
                },
                "suggested_at": {
                    "type": "string",
                    "format": "full-date"
                }
            }
        },
        "models.TimeBlock": {
            "type": "object",
            "required": [
                "created_at",
                "id",
                "start",
                "task_id",
                "toggl_user_id",
                "workspace_id"
            ],
            "properties": {
                "archived_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "calendar_event_id": {
                    "type": "integer"
                },
                "completed_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "created_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "deleted_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "duration": {
                    "type": "integer"
                },
                "id": {
                    "type": "integer"
                },
                "start": {
                    "type": "string",
                    "format": "full-date"
                },
                "task_id": {
                    "type": "integer"
                },
                "toggl_user_id": {
                    "type": "integer"
                },
                "updated_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "workspace_id": {
                    "type": "integer"
                }
            }
        },
        "models.TimeEntry": {
            "type": "object",
            "required": [
                "created_at",
                "id",
                "start",
                "task_id",
                "toggl_user_id",
                "type",
                "workspace_id"
            ],
            "properties": {
                "archived_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "billable": {
                    "type": "boolean"
                },
                "billable_source": {
                    "enum": [
                        "manual",
                        "task_default"
                    ],
                    "allOf": [
                        {
                            "$ref": "#/definitions/models.BillableSource"
                        }
                    ]
                },
                "created_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "deleted_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "description": {
                    "type": "string"
                },
                "duration": {
                    "type": "integer"
                },
                "id": {
                    "type": "integer"
                },
                "project_id": {
                    "type": "integer"
                },
                "start": {
                    "type": "string",
                    "format": "full-date"
                },
                "task_id": {
                    "type": "integer"
                },
                "time_block_id": {
                    "type": "integer"
                },
                "toggl_user_id": {
                    "type": "integer"
                },
                "type": {
                    "enum": [
                        "activity",
                        "break"
                    ],
                    "allOf": [
                        {
                            "$ref": "#/definitions/models.TimeEntryType"
                        }
                    ]
                },
                "updated_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "workspace_id": {
                    "type": "integer"
                }
            }
        },
        "models.TimeEntryType": {
            "type": "string",
            "enum": [
                "activity",
                "break"
            ],
            "x-enum-varnames": [
                "TimeEntryTypeActivity",
                "TimeEntryTypeBreak"
            ]
        },
        "models.TrackSubscriptionResponse": {
            "type": "object",
            "required": [
                "cancel_date",
                "current_period_ends_at",
                "current_period_starts_at",
                "end_date",
                "payment_failed",
                "start_date",
                "subscription_created_at",
                "subscription_updated_at",
                "trial"
            ],
            "properties": {
                "cancel_date": {
                    "type": "string"
                },
                "current_period_ends_at": {
                    "type": "string"
                },
                "current_period_starts_at": {
                    "type": "string"
                },
                "end_date": {
                    "type": "string"
                },
                "payment_failed": {
                    "type": "boolean"
                },
                "start_date": {
                    "type": "string"
                },
                "subscription_created_at": {
                    "type": "string"
                },
                "subscription_updated_at": {
                    "type": "string"
                },
                "trial": {
                    "$ref": "#/definitions/models.TrialResponse"
                }
            }
        },
        "models.TrialResponse": {
            "type": "object",
            "required": [
                "available",
                "end_date",
                "start_date",
                "trial_plan_id"
            ],
            "properties": {
                "available": {
                    "type": "boolean"
                },
                "end_date": {
                    "type": "string"
                },
                "start_date": {
                    "type": "string"
                },
                "trial_plan_id": {
                    "type": "integer"
                }
            }
        },
        "models.UserSettings": {
            "type": "object",
            "required": [
                "theme"
            ],
            "properties": {
                "attachments_display_mode": {
                    "type": "string",
                    "enum": [
                        "list",
                        "grid"
                    ]
                },
                "autocomplete_task_with_time_block": {
                    "type": "boolean"
                },
                "autolog_time": {
                    "type": "boolean"
                },
                "calendar_range_type": {
                    "type": "string"
                },
                "calendar_show_calendar_events": {
                    "type": "boolean"
                },
                "calendar_show_completed_tasks": {
                    "type": "boolean"
                },
                "calendar_show_tasks_list": {
                    "type": "boolean"
                },
                "calendar_split_view_columns": {
                    "type": "string"
                },
                "current_workspace_id": {
                    "type": "integer"
                },
                "date_format": {
                    "type": "string",
                    "enum": [
                        "US",
                        "EU",
                        "ISO"
                    ]
                },
                "default_page": {
                    "type": "string",
                    "enum": [
                        "last-opened",
                        "calendar",
                        "inbox",
                        "board",
                        "timeline",
                        "reports"
                    ]
                },
                "duration_format": {
                    "type": "string",
                    "enum": [
                        "classic",
                        "improved",
                        "decimal"
                    ]
                },
                "first_interaction": {
                    "description": "FirstInteraction determines the settings update was the first user interaction\ndone. This is what is used to dispatch the Focus product sign-up event. This\nis not a setting that can be managed by FE. This is purely an internal BE\nsetting.",
                    "type": "boolean"
                },
                "first_interaction_date": {
                    "description": "FirstInteractionDate records when the user first interacted with Focus.\nSet automatically by the BE alongside first_interaction.",
                    "type": "string"
                },
                "focus_mode_count_up": {
                    "type": "boolean"
                },
                "has_reached_task_threshold": {
                    "description": "HasReachedTaskThreshold indicates the user has created 5+ tasks at some point.",
                    "type": "boolean"
                },
                "import_data_banner_dismissed": {
                    "type": "boolean"
                },
                "language_code": {
                    "type": "string"
                },
                "new_users_trial_dismissed": {
                    "type": "boolean"
                },
                "onboarding_checklist_dismissed": {
                    "type": "boolean"
                },
                "onboarding_flow_dismissed": {
                    "type": "boolean"
                },
                "onboarding_multi_day_task_created": {
                    "type": "boolean"
                },
                "onboarding_task_dragged": {
                    "type": "boolean"
                },
                "onboarding_variant_selected": {
                    "type": "string"
                },
                "plan_tour_dismissed": {
                    "description": "PlanTourDismissed indicates whether the user has dismissed the plan onboarding tour",
                    "type": "boolean"
                },
                "pomodoro_mode_auto_start_break": {
                    "type": "boolean"
                },
                "pomodoro_mode_break_duration_mins": {
                    "type": "integer"
                },
                "pomodoro_mode_session_duration_mins": {
                    "type": "integer"
                },
                "pomodoro_mode_sound_enabled": {
                    "type": "boolean"
                },
                "shortcuts_enabled": {
                    "type": "boolean"
                },
                "show_google_calendar_events": {
                    "type": "boolean"
                },
                "start_week_on": {
                    "description": "StartWeekOn determines which day the week starts on: 0 for Sunday, 1 for Monday",
                    "type": "integer",
                    "enum": [
                        0,
                        1
                    ]
                },
                "switch_to_focus_dismissed": {
                    "type": "boolean"
                },
                "sync_external_calendar": {
                    "description": "SyncExternalCalendar can either be 'never', 'always' or 'ask'",
                    "type": "string"
                },
                "theme": {
                    "type": "string",
                    "enum": [
                        "auto",
                        "light",
                        "dark"
                    ]
                },
                "time_block_color": {
                    "type": "string"
                },
                "time_format": {
                    "type": "string",
                    "enum": [
                        "12h",
                        "24h"
                    ]
                },
                "time_tracking_mode": {
                    "type": "string",
                    "enum": [
                        "focus",
                        "pomodoro"
                    ]
                },
                "time_tracking_mode_duration_mins": {
                    "type": "integer"
                },
                "time_tracking_mode_enabled": {
                    "type": "boolean"
                },
                "time_tracking_mode_fullscreen": {
                    "type": "boolean"
                },
                "tooltip_onboarding_dismissed": {
                    "description": "TooltipOnboardingDismissed indicates whether the user has dismissed the tooltip onboarding tour",
                    "type": "boolean"
                },
                "welcome_modal_dismissed": {
                    "description": "WelcomeModalDismissed indicates whether the user has dismissed the welcome modal",
                    "type": "boolean"
                }
            }
        },
        "models.UserWorkspaceSettings": {
            "type": "object",
            "properties": {
                "autolog_time": {
                    "type": "boolean"
                }
            }
        },
        "onboardinganswers.AnswersPayload": {
            "type": "object",
            "properties": {
                "integrations": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "x-nullable": true
                },
                "primary_goal": {
                    "type": "string",
                    "x-nullable": true
                },
                "role": {
                    "type": "string",
                    "x-nullable": true
                },
                "team_size": {
                    "type": "string",
                    "x-nullable": true
                },
                "uses_calendar": {
                    "type": "boolean",
                    "x-nullable": true
                }
            }
        },
        "onboardinganswers.PartialUpdatePayload": {
            "type": "object",
            "properties": {
                "answers": {
                    "$ref": "#/definitions/onboardinganswers.AnswersPayload"
                },
                "completed": {
                    "type": "boolean"
                },
                "flow_key": {
                    "type": "string"
                },
                "last_step": {
                    "type": "string"
                },
                "schema_version": {
                    "type": "integer"
                },
                "variant_key": {
                    "type": "string"
                }
            }
        },
        "organization.GroupRequest": {
            "type": "object",
            "required": [
                "emoji",
                "name",
                "organization_users",
                "workspaces"
            ],
            "properties": {
                "emoji": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "organization_users": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "workspaces": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                }
            }
        },
        "organization.GroupWithGhosts": {
            "type": "object",
            "required": [
                "created_at",
                "deleted_at",
                "emoji",
                "ghosts",
                "id",
                "name",
                "organization_id",
                "updated_at",
                "users",
                "workspaces"
            ],
            "properties": {
                "created_at": {
                    "type": "string",
                    "example": "2021-09-01T00:00:00Z"
                },
                "deleted_at": {
                    "type": "string",
                    "example": "2021-09-01T00:00:00Z"
                },
                "emoji": {
                    "type": "string",
                    "example": "😀"
                },
                "ghosts": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/ghost.Basic"
                    }
                },
                "id": {
                    "type": "integer",
                    "example": 20000000
                },
                "name": {
                    "type": "string",
                    "example": "Group Name"
                },
                "organization_id": {
                    "type": "integer",
                    "example": 20000000
                },
                "updated_at": {
                    "type": "string",
                    "example": "2021-09-01T00:00:00Z"
                },
                "users": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/client.UserGroupExtended"
                    }
                },
                "workspaces": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/client.WorkspaceGroupExtended"
                    }
                }
            }
        },
        "organization.OrgUserEffectiveRate": {
            "type": "object",
            "required": [
                "currency",
                "end_at",
                "hourly_rate",
                "start_at",
                "workspace_id",
                "workspace_rate_id",
                "workspace_user_rate_id"
            ],
            "properties": {
                "currency": {
                    "type": "string"
                },
                "end_at": {
                    "type": "string"
                },
                "hourly_rate": {
                    "type": "number"
                },
                "start_at": {
                    "type": "string"
                },
                "workspace_id": {
                    "type": "integer"
                },
                "workspace_rate_id": {
                    "type": "integer"
                },
                "workspace_user_rate_id": {
                    "type": "integer"
                }
            }
        },
        "organization.OrganizationUserGroupExtendedResponse": {
            "type": "object",
            "required": [
                "emoji",
                "id",
                "name",
                "workspace_ids"
            ],
            "properties": {
                "emoji": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "workspace_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                }
            }
        },
        "organization.OrganizationUserGroupResponse": {
            "type": "object",
            "required": [
                "emoji",
                "id",
                "name"
            ],
            "properties": {
                "emoji": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "organization.OrganizationUserResponse": {
            "type": "object",
            "required": [
                "2fa_enabled",
                "account_locked_at",
                "active",
                "admin",
                "can_edit_personal_details",
                "created_at",
                "deleted_at",
                "email",
                "groups",
                "id",
                "invite_sent",
                "joined",
                "name",
                "organization_id",
                "owner",
                "permissions",
                "rate",
                "tags",
                "updated_at",
                "user_account_id",
                "user_id",
                "working_hours",
                "workspaces"
            ],
            "properties": {
                "2fa_enabled": {
                    "type": "boolean"
                },
                "account_locked_at": {
                    "type": "string"
                },
                "active": {
                    "type": "boolean"
                },
                "admin": {
                    "type": "boolean"
                },
                "can_edit_personal_details": {
                    "type": "boolean"
                },
                "created_at": {
                    "type": "string"
                },
                "deleted_at": {
                    "type": "string"
                },
                "email": {
                    "type": "string"
                },
                "groups": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/organization.OrganizationUserGroupExtendedResponse"
                    }
                },
                "id": {
                    "type": "integer"
                },
                "invite_sent": {
                    "type": "boolean"
                },
                "joined": {
                    "type": "boolean"
                },
                "name": {
                    "type": "string"
                },
                "organization_id": {
                    "type": "integer"
                },
                "owner": {
                    "type": "boolean"
                },
                "permissions": {
                    "type": "object",
                    "additionalProperties": true
                },
                "rate": {
                    "$ref": "#/definitions/organization.OrgUserEffectiveRate"
                },
                "tags": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/organization.OrganizationUserTagResponse"
                    }
                },
                "updated_at": {
                    "type": "string"
                },
                "user_account_id": {
                    "type": "integer"
                },
                "user_id": {
                    "type": "string"
                },
                "working_hours": {
                    "type": "number"
                },
                "workspaces": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/organization.OrganizationUserWorkspaceResponse"
                    }
                }
            }
        },
        "organization.OrganizationUserTagResponse": {
            "type": "object",
            "required": [
                "color",
                "id",
                "label"
            ],
            "properties": {
                "color": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "label": {
                    "type": "string"
                }
            }
        },
        "organization.OrganizationUserWorkspaceResponse": {
            "type": "object",
            "required": [
                "focus_role_id",
                "groups",
                "id",
                "name",
                "toggl_products",
                "track_role_id",
                "work_role_id",
                "workspace_user_id"
            ],
            "properties": {
                "focus_role_id": {
                    "type": "integer"
                },
                "groups": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/organization.OrganizationUserGroupResponse"
                    }
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "toggl_products": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "track_role_id": {
                    "type": "integer"
                },
                "work_role_id": {
                    "type": "integer"
                },
                "workspace_user_id": {
                    "type": "integer"
                }
            }
        },
        "orgprivate.Group": {
            "type": "object",
            "required": [
                "created_at",
                "deleted_at",
                "emoji",
                "id",
                "name",
                "organization_id",
                "updated_at",
                "users",
                "workspaces"
            ],
            "properties": {
                "created_at": {
                    "type": "string",
                    "example": "2021-09-01T00:00:00Z"
                },
                "deleted_at": {
                    "type": "string",
                    "example": "2021-09-01T00:00:00Z"
                },
                "emoji": {
                    "type": "string",
                    "example": "😀"
                },
                "id": {
                    "type": "integer",
                    "example": 20000000
                },
                "name": {
                    "type": "string",
                    "example": "Group Name"
                },
                "organization_id": {
                    "type": "integer",
                    "example": 20000000
                },
                "updated_at": {
                    "type": "string",
                    "example": "2021-09-01T00:00:00Z"
                },
                "users": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/client.UserGroupExtended"
                    }
                },
                "workspaces": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/client.WorkspaceGroupExtended"
                    }
                }
            }
        },
        "page.Envelope-ghost_GhostAPI": {
            "type": "object",
            "required": [
                "data",
                "page",
                "rows",
                "total"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/ghost.GhostAPI"
                    }
                },
                "page": {
                    "type": "integer"
                },
                "rows": {
                    "type": "integer"
                },
                "total": {
                    "type": "integer"
                }
            }
        },
        "page.Envelope-models_EffectiveProjectRatesSummary": {
            "type": "object",
            "required": [
                "data",
                "page",
                "rows",
                "total"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.EffectiveProjectRatesSummary"
                    }
                },
                "page": {
                    "type": "integer"
                },
                "rows": {
                    "type": "integer"
                },
                "total": {
                    "type": "integer"
                }
            }
        },
        "page.Envelope-organization_GroupWithGhosts": {
            "type": "object",
            "required": [
                "data",
                "page",
                "rows",
                "total"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/organization.GroupWithGhosts"
                    }
                },
                "page": {
                    "type": "integer"
                },
                "rows": {
                    "type": "integer"
                },
                "total": {
                    "type": "integer"
                }
            }
        },
        "project.BulkArchivePayload": {
            "type": "object",
            "required": [
                "project_ids"
            ],
            "properties": {
                "project_ids": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                        "type": "integer"
                    }
                }
            }
        },
        "project.BulkRestorePayload": {
            "type": "object",
            "required": [
                "project_ids"
            ],
            "properties": {
                "project_ids": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                        "type": "integer"
                    }
                }
            }
        },
        "project.BulkUnarchivePayload": {
            "type": "object",
            "required": [
                "project_ids"
            ],
            "properties": {
                "project_ids": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                        "type": "integer"
                    }
                }
            }
        },
        "project.BulkUserEntry": {
            "type": "object",
            "required": [
                "role_id",
                "user_id"
            ],
            "properties": {
                "role_id": {
                    "type": "integer"
                },
                "user_id": {
                    "type": "integer"
                }
            }
        },
        "project.DuplicatePayload": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string"
                }
            }
        },
        "project.FixedFeePayload": {
            "type": "object",
            "required": [
                "amount",
                "currency"
            ],
            "properties": {
                "amount": {
                    "type": "number"
                },
                "currency": {
                    "type": "string"
                }
            }
        },
        "project.NewRate": {
            "type": "object",
            "required": [
                "currency",
                "hourly_rate",
                "start_at"
            ],
            "properties": {
                "currency": {
                    "type": "string"
                },
                "end_at": {
                    "type": "string"
                },
                "hourly_rate": {
                    "type": "number"
                },
                "start_at": {
                    "type": "string"
                }
            }
        },
        "project.PartialUpdatePayload": {
            "type": "object",
            "properties": {
                "auto_compute_estimates": {
                    "type": "boolean"
                },
                "billable": {
                    "type": "boolean"
                },
                "client_id": {
                    "type": "integer",
                    "x-nullable": true
                },
                "color": {
                    "type": "string",
                    "x-nullable": true
                },
                "custom_fields": {
                    "type": "object",
                    "x-nullable": true
                },
                "description": {
                    "type": "string",
                    "x-nullable": true
                },
                "end_date": {
                    "type": "string",
                    "format": "date",
                    "x-nullable": true
                },
                "estimated_mins": {
                    "type": "integer",
                    "minimum": 0,
                    "x-nullable": true
                },
                "fixed_fee": {
                    "allOf": [
                        {
                            "$ref": "#/definitions/project.FixedFeePayload"
                        }
                    ],
                    "x-nullable": true
                },
                "name": {
                    "type": "string"
                },
                "parent_project_id": {
                    "type": "integer",
                    "x-nullable": true
                },
                "pinned": {
                    "type": "boolean"
                },
                "private": {
                    "type": "boolean"
                },
                "start_date": {
                    "type": "string",
                    "format": "date",
                    "x-nullable": true
                },
                "tag_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    },
                    "x-nullable": true
                }
            }
        },
        "project.PartialUpdatePayloadWithID": {
            "type": "object",
            "required": [
                "id"
            ],
            "properties": {
                "auto_compute_estimates": {
                    "type": "boolean"
                },
                "billable": {
                    "type": "boolean"
                },
                "client_id": {
                    "type": "integer",
                    "x-nullable": true
                },
                "color": {
                    "type": "string",
                    "x-nullable": true
                },
                "custom_fields": {
                    "type": "object",
                    "x-nullable": true
                },
                "description": {
                    "type": "string",
                    "x-nullable": true
                },
                "end_date": {
                    "type": "string",
                    "format": "date",
                    "x-nullable": true
                },
                "estimated_mins": {
                    "type": "integer",
                    "minimum": 0,
                    "x-nullable": true
                },
                "fixed_fee": {
                    "allOf": [
                        {
                            "$ref": "#/definitions/project.FixedFeePayload"
                        }
                    ],
                    "x-nullable": true
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "parent_project_id": {
                    "type": "integer",
                    "x-nullable": true
                },
                "pinned": {
                    "type": "boolean"
                },
                "private": {
                    "type": "boolean"
                },
                "start_date": {
                    "type": "string",
                    "format": "date",
                    "x-nullable": true
                },
                "tag_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    },
                    "x-nullable": true
                },
                "users": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/project.BulkUserEntry"
                    },
                    "x-nullable": true
                }
            }
        },
        "project.Payload": {
            "type": "object",
            "required": [
                "name"
            ],
            "properties": {
                "auto_compute_estimates": {
                    "type": "boolean"
                },
                "billable": {
                    "type": "boolean"
                },
                "client_id": {
                    "type": "integer"
                },
                "color": {
                    "type": "string"
                },
                "custom_fields": {
                    "type": "object",
                    "additionalProperties": {}
                },
                "description": {
                    "type": "string"
                },
                "end_date": {
                    "type": "string",
                    "format": "date"
                },
                "estimated_mins": {
                    "type": "integer",
                    "minimum": 0
                },
                "fixed_fee": {
                    "$ref": "#/definitions/project.FixedFeePayload"
                },
                "name": {
                    "type": "string"
                },
                "parent_project_id": {
                    "type": "integer"
                },
                "pinned": {
                    "type": "boolean"
                },
                "private": {
                    "type": "boolean"
                },
                "start_date": {
                    "type": "string",
                    "format": "date"
                },
                "tag_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    },
                    "x-nullable": true
                }
            }
        },
        "project.RateAPI": {
            "type": "object",
            "required": [
                "currency",
                "hourly_rate",
                "start_at"
            ],
            "properties": {
                "currency": {
                    "type": "string"
                },
                "end_at": {
                    "type": "string"
                },
                "hourly_rate": {
                    "type": "number"
                },
                "project_rate_id": {
                    "type": "integer"
                },
                "start_at": {
                    "type": "string"
                },
                "workspace_rate_id": {
                    "type": "integer"
                }
            }
        },
        "projectattachment.Payload": {
            "type": "object",
            "required": [
                "display_order",
                "name"
            ],
            "properties": {
                "display_order": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "projectuser.PostProjectMembers": {
            "type": "object",
            "required": [
                "role_id"
            ],
            "properties": {
                "group_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "role_id": {
                    "type": "integer"
                },
                "user_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                }
            }
        },
        "projectuser.ProjectMembers": {
            "type": "object",
            "required": [
                "group_ids",
                "project_id",
                "user_ids"
            ],
            "properties": {
                "group_ids": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/projectuser.projectGroup"
                    }
                },
                "project_id": {
                    "type": "integer"
                },
                "user_ids": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/projectuser.projectUser"
                    }
                }
            }
        },
        "projectuser.deleteProjectMember": {
            "type": "object",
            "properties": {
                "group_id": {
                    "type": "integer"
                },
                "user_id": {
                    "type": "integer"
                }
            }
        },
        "projectuser.projectGroup": {
            "type": "object",
            "required": [
                "group_id"
            ],
            "properties": {
                "group_id": {
                    "type": "integer"
                },
                "manager": {
                    "type": "boolean",
                    "x-nullable": true
                }
            }
        },
        "projectuser.projectUser": {
            "type": "object",
            "required": [
                "manager",
                "user_id"
            ],
            "properties": {
                "manager": {
                    "type": "boolean"
                },
                "user_id": {
                    "type": "integer"
                }
            }
        },
        "projectuser.updateMemberRole": {
            "type": "object",
            "required": [
                "role_id"
            ],
            "properties": {
                "group_id": {
                    "type": "integer"
                },
                "role_id": {
                    "type": "integer"
                },
                "user_id": {
                    "type": "integer"
                }
            }
        },
        "response.Error": {
            "type": "object",
            "required": [
                "error",
                "error_description"
            ],
            "properties": {
                "error": {
                    "type": "string"
                },
                "error_description": {
                    "type": "string"
                },
                "error_values": {
                    "type": "object",
                    "additionalProperties": true
                },
                "trace_id": {
                    "type": "string"
                }
            }
        },
        "savedview.CreatePayload": {
            "type": "object",
            "required": [
                "name",
                "params",
                "pinned",
                "type"
            ],
            "properties": {
                "icon_name": {
                    "type": "string",
                    "maxLength": 255
                },
                "name": {
                    "type": "string"
                },
                "params": {
                    "type": "object"
                },
                "pinned": {
                    "type": "boolean"
                },
                "type": {
                    "type": "string",
                    "enum": [
                        "inbox",
                        "archive",
                        "board",
                        "timeline",
                        "project",
                        "project.tasks",
                        "project.board",
                        "project.timeline",
                        "projects"
                    ]
                }
            }
        },
        "savedview.UpdatePayload": {
            "type": "object",
            "required": [
                "name",
                "params",
                "pinned",
                "type"
            ],
            "properties": {
                "icon_name": {
                    "type": "string",
                    "maxLength": 255
                },
                "name": {
                    "type": "string"
                },
                "params": {
                    "type": "object"
                },
                "pinned": {
                    "type": "boolean"
                },
                "type": {
                    "type": "string",
                    "enum": [
                        "inbox",
                        "archive",
                        "board",
                        "timeline",
                        "project",
                        "project.tasks",
                        "project.board",
                        "project.timeline",
                        "projects"
                    ]
                }
            }
        },
        "scheduler.ConfirmChange": {
            "type": "object",
            "required": [
                "proposed",
                "time_block_id"
            ],
            "properties": {
                "proposed": {
                    "$ref": "#/definitions/scheduler.TimeBlockSnapshot"
                },
                "time_block_id": {
                    "type": "integer"
                }
            }
        },
        "scheduler.ConfirmNewTask": {
            "type": "object",
            "required": [
                "priority",
                "project",
                "project_id",
                "proposed",
                "task_name"
            ],
            "properties": {
                "priority": {
                    "type": "integer",
                    "maximum": 3,
                    "minimum": 1
                },
                "project": {
                    "type": "string"
                },
                "project_id": {
                    "type": "integer"
                },
                "proposed": {
                    "$ref": "#/definitions/scheduler.TimeBlockSnapshot"
                },
                "task_name": {
                    "type": "string",
                    "maxLength": 255,
                    "minLength": 1
                }
            }
        },
        "scheduler.ConfirmRequest": {
            "type": "object",
            "required": [
                "changes",
                "new_tasks",
                "scheduled_tasks"
            ],
            "properties": {
                "changes": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/scheduler.ConfirmChange"
                    }
                },
                "new_tasks": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/scheduler.ConfirmNewTask"
                    }
                },
                "scheduled_tasks": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/scheduler.ConfirmScheduledTask"
                    }
                }
            }
        },
        "scheduler.ConfirmResponse": {
            "type": "object",
            "required": [
                "applied_changes",
                "calendar_sync_triggered",
                "failed_changes",
                "success"
            ],
            "properties": {
                "applied_changes": {
                    "type": "integer"
                },
                "calendar_sync_triggered": {
                    "type": "boolean"
                },
                "failed_changes": {
                    "type": "integer"
                },
                "success": {
                    "type": "boolean"
                }
            }
        },
        "scheduler.ConfirmScheduledTask": {
            "type": "object",
            "required": [
                "proposed",
                "task_id"
            ],
            "properties": {
                "proposed": {
                    "$ref": "#/definitions/scheduler.TimeBlockSnapshot"
                },
                "task_id": {
                    "type": "integer"
                }
            }
        },
        "scheduler.InstructionQuality": {
            "type": "object",
            "required": [
                "breakdown",
                "confidence",
                "issues",
                "score",
                "suggestions"
            ],
            "properties": {
                "breakdown": {
                    "description": "Per-dimension clarity scores",
                    "allOf": [
                        {
                            "$ref": "#/definitions/scheduler.InstructionQualityBreakdown"
                        }
                    ]
                },
                "confidence": {
                    "description": "high, medium, low",
                    "type": "string"
                },
                "issues": {
                    "description": "Specific problem messages",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "score": {
                    "description": "0-100 (higher = clearer)",
                    "type": "integer"
                },
                "suggestions": {
                    "description": "How to improve instructions",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            }
        },
        "scheduler.InstructionQualityBreakdown": {
            "type": "object",
            "required": [
                "action",
                "constraints",
                "intent",
                "target",
                "temporal"
            ],
            "properties": {
                "action": {
                    "description": "Action clarity (0-100, higher = clearer)",
                    "type": "integer"
                },
                "constraints": {
                    "description": "Constraints clarity (0-100, higher = clearer)",
                    "type": "integer"
                },
                "intent": {
                    "description": "Intent clarity (0-100, higher = clearer)",
                    "type": "integer"
                },
                "target": {
                    "description": "Task target clarity (0-100, higher = clearer)",
                    "type": "integer"
                },
                "temporal": {
                    "description": "Time/date clarity (0-100, higher = clearer)",
                    "type": "integer"
                }
            }
        },
        "scheduler.InstructionValidation": {
            "type": "object",
            "required": [
                "action",
                "degraded",
                "inferred",
                "missing",
                "nudge",
                "rewrite"
            ],
            "properties": {
                "action": {
                    "description": "move, add, delete, clear, etc.",
                    "type": "string"
                },
                "degraded": {
                    "description": "true when fallback",
                    "type": "boolean"
                },
                "degraded_reason": {
                    "description": "DegradedReason: timeout, unavailable, invalid_response, disabled, nil_result",
                    "type": "string"
                },
                "duration": {
                    "type": "integer"
                },
                "inferred": {
                    "description": "field -\u003e assumed value",
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "missing": {
                    "description": "field keys",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "nudge": {
                    "type": "string"
                },
                "priority": {
                    "description": "1=high, 2=med, 3=low",
                    "type": "integer"
                },
                "rewrite": {
                    "type": "string"
                },
                "target": {
                    "type": "string"
                },
                "target_day": {
                    "type": "string"
                },
                "target_time": {
                    "type": "string"
                }
            }
        },
        "scheduler.OptimizeResponse": {
            "type": "object",
            "required": [
                "proposed_changes",
                "proposed_new_tasks",
                "proposed_scheduled_tasks",
                "validation"
            ],
            "properties": {
                "instruction_quality": {
                    "$ref": "#/definitions/scheduler.InstructionQuality"
                },
                "proposed_changes": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/scheduler.ProposedChange"
                    }
                },
                "proposed_new_tasks": {
                    "description": "NEW: Tasks to be created",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/scheduler.ProposedNewTask"
                    }
                },
                "proposed_scheduled_tasks": {
                    "description": "NEW: Existing tasks to schedule",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/scheduler.ProposedScheduledTask"
                    }
                },
                "validation": {
                    "$ref": "#/definitions/scheduler.ValidationResult"
                }
            }
        },
        "scheduler.ProposedChange": {
            "type": "object",
            "required": [
                "current",
                "proposed",
                "task_name",
                "time_block_id"
            ],
            "properties": {
                "current": {
                    "$ref": "#/definitions/scheduler.TimeBlockSnapshot"
                },
                "proposed": {
                    "$ref": "#/definitions/scheduler.TimeBlockSnapshot"
                },
                "task_name": {
                    "type": "string"
                },
                "time_block_id": {
                    "type": "integer"
                }
            }
        },
        "scheduler.ProposedNewTask": {
            "type": "object",
            "required": [
                "priority",
                "project",
                "project_id",
                "proposed",
                "task_name"
            ],
            "properties": {
                "priority": {
                    "type": "integer"
                },
                "project": {
                    "type": "string"
                },
                "project_id": {
                    "description": "Resolved project ID (avoids name-based lookup)",
                    "type": "integer"
                },
                "proposed": {
                    "description": "When to schedule it",
                    "allOf": [
                        {
                            "$ref": "#/definitions/scheduler.TimeBlockSnapshot"
                        }
                    ]
                },
                "task_name": {
                    "type": "string"
                }
            }
        },
        "scheduler.ProposedScheduledTask": {
            "type": "object",
            "required": [
                "priority",
                "project",
                "project_id",
                "proposed",
                "task_id",
                "task_name"
            ],
            "properties": {
                "priority": {
                    "type": "integer"
                },
                "project": {
                    "type": "string"
                },
                "project_id": {
                    "description": "Resolved project ID",
                    "type": "integer"
                },
                "proposed": {
                    "description": "When to schedule it",
                    "allOf": [
                        {
                            "$ref": "#/definitions/scheduler.TimeBlockSnapshot"
                        }
                    ]
                },
                "task_id": {
                    "description": "Existing task ID",
                    "type": "integer"
                },
                "task_name": {
                    "type": "string"
                }
            }
        },
        "scheduler.RejectRequest": {
            "type": "object",
            "required": [
                "request_id"
            ],
            "properties": {
                "request_id": {
                    "type": "string"
                }
            }
        },
        "scheduler.RejectResponse": {
            "type": "object",
            "required": [
                "success"
            ],
            "properties": {
                "success": {
                    "type": "boolean"
                }
            }
        },
        "scheduler.TimeBlockSnapshot": {
            "type": "object",
            "required": [
                "duration",
                "start"
            ],
            "properties": {
                "duration": {
                    "description": "minutes",
                    "type": "integer"
                },
                "start": {
                    "type": "string"
                }
            }
        },
        "scheduler.UserFeedback": {
            "type": "object",
            "required": [
                "createdAt",
                "feedback",
                "kind",
                "updatedAt"
            ],
            "properties": {
                "createdAt": {
                    "type": "string"
                },
                "feedback": {
                    "type": "string"
                },
                "kind": {
                    "type": "string"
                },
                "updatedAt": {
                    "type": "string"
                }
            }
        },
        "scheduler.UserFeedbackHandlerRequest": {
            "type": "object",
            "required": [
                "feedback",
                "kind",
                "request_id"
            ],
            "properties": {
                "feedback": {
                    "type": "string",
                    "maxLength": 1000
                },
                "kind": {
                    "type": "string",
                    "enum": [
                        "positive",
                        "negative"
                    ]
                },
                "request_id": {
                    "type": "string"
                }
            }
        },
        "scheduler.UserFeedbackResponse": {
            "type": "object",
            "required": [
                "success",
                "userFeedback"
            ],
            "properties": {
                "success": {
                    "type": "boolean"
                },
                "userFeedback": {
                    "$ref": "#/definitions/scheduler.UserFeedback"
                }
            }
        },
        "scheduler.ValidateInstructionsRequest": {
            "type": "object",
            "required": [
                "instructions"
            ],
            "properties": {
                "instructions": {
                    "type": "string",
                    "maxLength": 10000,
                    "minLength": 1
                },
                "project_id": {
                    "type": "integer"
                },
                "task_id": {
                    "type": "integer"
                }
            }
        },
        "scheduler.ValidationResult": {
            "type": "object",
            "required": [
                "is_valid",
                "warnings"
            ],
            "properties": {
                "is_valid": {
                    "type": "boolean"
                },
                "warnings": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            }
        },
        "search.ProjectResult": {
            "type": "object",
            "required": [
                "id",
                "name"
            ],
            "properties": {
                "client_name": {
                    "type": "string"
                },
                "color": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "search.Result": {
            "type": "object",
            "required": [
                "projects",
                "tasks",
                "time_entries"
            ],
            "properties": {
                "projects": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/search.ProjectResult"
                    }
                },
                "tasks": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/search.TaskResult"
                    }
                },
                "time_entries": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/search.TimeEntryResult"
                    }
                }
            }
        },
        "search.TaskResult": {
            "type": "object",
            "required": [
                "id",
                "name"
            ],
            "properties": {
                "client_name": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "project_color": {
                    "type": "string"
                },
                "project_id": {
                    "type": "integer"
                },
                "project_name": {
                    "type": "string"
                }
            }
        },
        "search.TimeEntryResult": {
            "type": "object",
            "required": [
                "description",
                "last_tracked_at"
            ],
            "properties": {
                "description": {
                    "type": "string"
                },
                "last_tracked_at": {
                    "type": "string",
                    "format": "date-time"
                },
                "project_color": {
                    "type": "string"
                },
                "project_id": {
                    "type": "integer"
                },
                "project_name": {
                    "type": "string"
                },
                "task_id": {
                    "type": "integer"
                },
                "task_name": {
                    "type": "string"
                }
            }
        },
        "shareddata.PublicHolidayWithUserAccountID": {
            "type": "object",
            "required": [
                "country",
                "date",
                "name",
                "user_account_id"
            ],
            "properties": {
                "country": {
                    "type": "string"
                },
                "date": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "user_account_id": {
                    "type": "integer"
                }
            }
        },
        "shareddata.TimeOff": {
            "type": "object",
            "required": [
                "created_at",
                "end_time",
                "organization_id",
                "start_time",
                "timeoff_id",
                "updated_at",
                "user_id"
            ],
            "properties": {
                "created_at": {
                    "type": "string"
                },
                "end_time": {
                    "type": "string"
                },
                "organization_id": {
                    "type": "integer"
                },
                "start_time": {
                    "type": "string"
                },
                "timeoff_id": {
                    "type": "integer"
                },
                "type": {
                    "type": "string"
                },
                "updated_at": {
                    "type": "string"
                },
                "user_id": {
                    "type": "integer"
                }
            }
        },
        "shareddata.TimeOffCreateInput": {
            "type": "object",
            "required": [
                "end_time",
                "start_time"
            ],
            "properties": {
                "end_time": {
                    "type": "string"
                },
                "start_time": {
                    "type": "string"
                },
                "type": {
                    "type": "string",
                    "enum": [
                        "vacation",
                        "sick",
                        "parental",
                        "other"
                    ]
                }
            }
        },
        "shareddata.TimeOffUpdateInput": {
            "type": "object",
            "required": [
                "end_time",
                "start_time",
                "timeoff_id"
            ],
            "properties": {
                "end_time": {
                    "type": "string"
                },
                "start_time": {
                    "type": "string"
                },
                "timeoff_id": {
                    "type": "integer"
                },
                "type": {
                    "type": "string",
                    "enum": [
                        "vacation",
                        "sick",
                        "parental",
                        "other"
                    ]
                }
            }
        },
        "shareddata.TimeOffWithoutPersonalInfo": {
            "type": "object",
            "required": [
                "end_time",
                "ghost_id",
                "start_time",
                "timeoff_id",
                "user_id"
            ],
            "properties": {
                "end_time": {
                    "type": "string"
                },
                "ghost_id": {
                    "type": "integer"
                },
                "start_time": {
                    "type": "string"
                },
                "timeoff_id": {
                    "type": "integer"
                },
                "user_id": {
                    "type": "integer"
                }
            }
        },
        "shareddata.WorkingHours": {
            "type": "object",
            "required": [
                "created_at",
                "organization_id",
                "updated_at",
                "working_hour_id",
                "working_hours"
            ],
            "properties": {
                "created_at": {
                    "type": "string"
                },
                "external_entity_id": {
                    "type": "integer"
                },
                "external_entity_type": {
                    "type": "string"
                },
                "organization_id": {
                    "type": "integer"
                },
                "starting_hours": {
                    "type": "number"
                },
                "updated_at": {
                    "type": "string"
                },
                "user_id": {
                    "type": "integer"
                },
                "weekday": {
                    "type": "integer"
                },
                "working_hour_id": {
                    "type": "integer"
                },
                "working_hours": {
                    "type": "number"
                }
            }
        },
        "shareddata.WorkingHoursCreateInput": {
            "type": "object",
            "required": [
                "working_hours"
            ],
            "properties": {
                "weekday": {
                    "type": "integer",
                    "maximum": 6,
                    "minimum": 0
                },
                "working_hours": {
                    "type": "number",
                    "maximum": 168
                }
            }
        },
        "shareddata.WorkingHoursUpdateInput": {
            "type": "object",
            "required": [
                "working_hour_id",
                "working_hours"
            ],
            "properties": {
                "weekday": {
                    "type": "integer",
                    "maximum": 6,
                    "minimum": 0
                },
                "working_hour_id": {
                    "type": "integer"
                },
                "working_hours": {
                    "type": "number",
                    "maximum": 168
                }
            }
        },
        "status.Payload": {
            "type": "object",
            "required": [
                "emoji",
                "name",
                "position"
            ],
            "properties": {
                "emoji": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "position": {
                    "type": "integer",
                    "minimum": 1
                }
            }
        },
        "subscription.getCurrentResponse": {
            "type": "object",
            "required": [
                "organization_id",
                "price",
                "product",
                "subscription",
                "subscription_item",
                "track_subscription"
            ],
            "properties": {
                "organization_id": {
                    "type": "integer"
                },
                "price": {
                    "$ref": "#/definitions/models.PriceResponse"
                },
                "product": {
                    "$ref": "#/definitions/models.ProductResponse"
                },
                "subscription": {
                    "$ref": "#/definitions/models.SubscriptionResponse"
                },
                "subscription_item": {
                    "$ref": "#/definitions/models.SubscriptionItemResponse"
                },
                "track_subscription": {
                    "$ref": "#/definitions/models.TrackSubscriptionResponse"
                }
            }
        },
        "subscription.getCurrentTrialResponse": {
            "type": "object",
            "required": [
                "id",
                "organization_id",
                "plan_id",
                "plan_name",
                "product_handle",
                "toggl_product_name",
                "trial_cancels_at",
                "trial_created_at",
                "trial_deleted_at",
                "trial_ended_at",
                "trial_started_at",
                "trial_type"
            ],
            "properties": {
                "id": {
                    "type": "integer"
                },
                "organization_id": {
                    "type": "integer"
                },
                "plan_id": {
                    "type": "integer"
                },
                "plan_name": {
                    "type": "string"
                },
                "product_handle": {
                    "type": "string"
                },
                "toggl_product_name": {
                    "type": "string"
                },
                "trial_cancels_at": {
                    "type": "string"
                },
                "trial_created_at": {
                    "type": "string"
                },
                "trial_deleted_at": {
                    "type": "string"
                },
                "trial_ended_at": {
                    "type": "string"
                },
                "trial_started_at": {
                    "type": "string"
                },
                "trial_type": {
                    "type": "string"
                }
            }
        },
        "subscription.upsertForcedTrialRequest": {
            "type": "object",
            "properties": {
                "plan_workspace_id": {
                    "type": "integer"
                }
            }
        },
        "subscription.upsertForcedTrialResponse": {
            "type": "object",
            "required": [
                "id",
                "organization_id",
                "plan_id",
                "plan_name",
                "product_handle",
                "toggl_product_name",
                "trial_cancels_at",
                "trial_created_at",
                "trial_deleted_at",
                "trial_ended_at",
                "trial_started_at",
                "trial_type"
            ],
            "properties": {
                "id": {
                    "type": "integer"
                },
                "organization_id": {
                    "type": "integer"
                },
                "plan_id": {
                    "type": "integer"
                },
                "plan_name": {
                    "type": "string"
                },
                "product_handle": {
                    "type": "string"
                },
                "toggl_product_name": {
                    "type": "string"
                },
                "trial_cancels_at": {
                    "type": "string"
                },
                "trial_created_at": {
                    "type": "string"
                },
                "trial_deleted_at": {
                    "type": "string"
                },
                "trial_ended_at": {
                    "type": "string"
                },
                "trial_started_at": {
                    "type": "string"
                },
                "trial_type": {
                    "type": "string"
                }
            }
        },
        "tag.Payload": {
            "type": "object",
            "required": [
                "color",
                "name"
            ],
            "properties": {
                "color": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "task.BulkArchivePayload": {
            "type": "object",
            "required": [
                "task_ids"
            ],
            "properties": {
                "task_ids": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                        "type": "integer"
                    }
                }
            }
        },
        "task.BulkCreatePayload": {
            "type": "object",
            "required": [
                "tasks"
            ],
            "properties": {
                "tasks": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/task.CreatePayload"
                    }
                }
            }
        },
        "task.BulkDuplicatePayload": {
            "type": "object",
            "required": [
                "cascade_duplicate_children",
                "task_ids"
            ],
            "properties": {
                "cascade_duplicate_children": {
                    "type": "boolean"
                },
                "task_ids": {
                    "type": "array",
                    "maxItems": 100,
                    "minItems": 1,
                    "items": {
                        "type": "integer"
                    }
                }
            }
        },
        "task.BulkRestorePayload": {
            "type": "object",
            "required": [
                "task_ids"
            ],
            "properties": {
                "task_ids": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                        "type": "integer"
                    }
                }
            }
        },
        "task.BulkUnarchivePayload": {
            "type": "object",
            "required": [
                "task_ids"
            ],
            "properties": {
                "task_ids": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                        "type": "integer"
                    }
                }
            }
        },
        "task.CreatePayload": {
            "type": "object",
            "required": [
                "name"
            ],
            "properties": {
                "assignee_user_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    },
                    "x-nullable": true
                },
                "auto_log_time": {
                    "type": "boolean"
                },
                "billable": {
                    "type": "boolean"
                },
                "color": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "end_date": {
                    "type": "string",
                    "format": "date"
                },
                "estimated_mins": {
                    "type": "integer"
                },
                "ghost_assignee_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    },
                    "x-nullable": true
                },
                "integration_ext_id": {
                    "type": "integer"
                },
                "integration_source": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "notes": {
                    "type": "string"
                },
                "parent_task_id": {
                    "type": "integer"
                },
                "pinned": {
                    "type": "boolean"
                },
                "position": {
                    "type": "integer",
                    "x-nullable": true
                },
                "priority": {
                    "type": "string",
                    "enum": [
                        "none",
                        "low",
                        "medium",
                        "high"
                    ]
                },
                "priority_at": {
                    "type": "string",
                    "format": "date"
                },
                "private": {
                    "type": "boolean"
                },
                "project_id": {
                    "type": "integer"
                },
                "rrule": {
                    "type": "string",
                    "x-nullable": true
                },
                "start_date": {
                    "type": "string",
                    "format": "date"
                },
                "status_id": {
                    "type": "integer"
                },
                "tag_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    },
                    "x-nullable": true
                }
            }
        },
        "task.CreatePayloadWithoutParentID": {
            "type": "object",
            "required": [
                "name"
            ],
            "properties": {
                "assignee_user_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    },
                    "x-nullable": true
                },
                "auto_log_time": {
                    "type": "boolean"
                },
                "billable": {
                    "type": "boolean"
                },
                "color": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "end_date": {
                    "type": "string",
                    "format": "date"
                },
                "estimated_mins": {
                    "type": "integer"
                },
                "ghost_assignee_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    },
                    "x-nullable": true
                },
                "integration_ext_id": {
                    "type": "integer"
                },
                "integration_source": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "notes": {
                    "type": "string"
                },
                "pinned": {
                    "type": "boolean"
                },
                "position": {
                    "type": "integer",
                    "x-nullable": true
                },
                "priority": {
                    "type": "string",
                    "enum": [
                        "none",
                        "low",
                        "medium",
                        "high"
                    ]
                },
                "priority_at": {
                    "type": "string",
                    "format": "date"
                },
                "private": {
                    "type": "boolean"
                },
                "project_id": {
                    "type": "integer"
                },
                "rrule": {
                    "type": "string",
                    "x-nullable": true
                },
                "start_date": {
                    "type": "string",
                    "format": "date"
                },
                "status_id": {
                    "type": "integer"
                },
                "tag_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    },
                    "x-nullable": true
                }
            }
        },
        "task.CreateTaskRatePayload": {
            "type": "object",
            "required": [
                "billable"
            ],
            "properties": {
                "billable": {
                    "type": "boolean"
                }
            }
        },
        "task.PartialUpdatePayload": {
            "type": "object",
            "properties": {
                "assignee_user_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    },
                    "x-nullable": true
                },
                "auto_log_time": {
                    "type": "boolean",
                    "x-nullable": true
                },
                "billable": {
                    "type": "boolean"
                },
                "color": {
                    "type": "string",
                    "x-nullable": true
                },
                "description": {
                    "type": "string",
                    "x-nullable": true
                },
                "end_date": {
                    "type": "string",
                    "format": "date",
                    "x-nullable": true
                },
                "estimated_mins": {
                    "type": "integer",
                    "x-nullable": true
                },
                "ghost_assignee_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    },
                    "x-nullable": true
                },
                "name": {
                    "type": "string"
                },
                "notes": {
                    "type": "string",
                    "x-nullable": true
                },
                "outbound_sync": {
                    "type": "boolean"
                },
                "parent_task_id": {
                    "type": "integer",
                    "x-nullable": true
                },
                "pinned": {
                    "type": "boolean"
                },
                "position": {
                    "type": "integer",
                    "minimum": 1,
                    "x-nullable": true
                },
                "priority": {
                    "type": "string",
                    "enum": [
                        "none",
                        "low",
                        "medium",
                        "high"
                    ]
                },
                "priority_at": {
                    "type": "string",
                    "format": "date",
                    "x-nullable": true
                },
                "private": {
                    "type": "boolean"
                },
                "project_id": {
                    "type": "integer",
                    "x-nullable": true
                },
                "recurring_task_id": {
                    "type": "integer",
                    "x-nullable": true
                },
                "rrule": {
                    "type": "string",
                    "x-nullable": true
                },
                "start_date": {
                    "type": "string",
                    "format": "date",
                    "x-nullable": true
                },
                "status_id": {
                    "type": "integer"
                },
                "tag_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    },
                    "x-nullable": true
                }
            }
        },
        "task.PartialUpdatePayloadWithID": {
            "type": "object",
            "required": [
                "id"
            ],
            "properties": {
                "assignee_user_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    },
                    "x-nullable": true
                },
                "auto_log_time": {
                    "type": "boolean",
                    "x-nullable": true
                },
                "billable": {
                    "type": "boolean"
                },
                "color": {
                    "type": "string",
                    "x-nullable": true
                },
                "description": {
                    "type": "string",
                    "x-nullable": true
                },
                "end_date": {
                    "type": "string",
                    "format": "date",
                    "x-nullable": true
                },
                "estimated_mins": {
                    "type": "integer",
                    "x-nullable": true
                },
                "ghost_assignee_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    },
                    "x-nullable": true
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "notes": {
                    "type": "string",
                    "x-nullable": true
                },
                "outbound_sync": {
                    "type": "boolean"
                },
                "parent_task_id": {
                    "type": "integer",
                    "x-nullable": true
                },
                "pinned": {
                    "type": "boolean"
                },
                "position": {
                    "type": "integer",
                    "minimum": 1,
                    "x-nullable": true
                },
                "priority": {
                    "type": "string",
                    "enum": [
                        "none",
                        "low",
                        "medium",
                        "high"
                    ]
                },
                "priority_at": {
                    "type": "string",
                    "format": "date",
                    "x-nullable": true
                },
                "private": {
                    "type": "boolean"
                },
                "project_id": {
                    "type": "integer",
                    "x-nullable": true
                },
                "recurring_task_id": {
                    "type": "integer",
                    "x-nullable": true
                },
                "rrule": {
                    "type": "string",
                    "x-nullable": true
                },
                "start_date": {
                    "type": "string",
                    "format": "date",
                    "x-nullable": true
                },
                "status_id": {
                    "type": "integer"
                },
                "tag_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    },
                    "x-nullable": true
                }
            }
        },
        "task.PromptPayload": {
            "type": "object",
            "required": [
                "prompt"
            ],
            "properties": {
                "prompt": {
                    "type": "string"
                }
            }
        },
        "task.TaskWithParentAndAggregations": {
            "type": "object",
            "required": [
                "created_at",
                "id",
                "name",
                "pinned",
                "position",
                "priority",
                "private",
                "source",
                "status_id",
                "tag_ids",
                "tags",
                "toggl_user_id",
                "workspace_id"
            ],
            "properties": {
                "archived_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "assignee_user_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "auto_log_time": {
                    "type": "boolean"
                },
                "billable": {
                    "type": "boolean"
                },
                "client": {
                    "$ref": "#/definitions/models.ClientLite"
                },
                "color": {
                    "type": "string"
                },
                "created_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "deleted_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "description": {
                    "type": "string"
                },
                "end_date": {
                    "type": "string",
                    "format": "date"
                },
                "estimated_mins": {
                    "type": "integer"
                },
                "ghost_assignee_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "id": {
                    "type": "integer"
                },
                "metadata": {
                    "$ref": "#/definitions/models.TaskMetadata"
                },
                "name": {
                    "type": "string"
                },
                "notes": {
                    "type": "string"
                },
                "parent": {
                    "$ref": "#/definitions/models.Task"
                },
                "parent_task_id": {
                    "type": "integer"
                },
                "parent_task_name": {
                    "type": "string"
                },
                "pinned": {
                    "type": "boolean"
                },
                "position": {
                    "type": "integer"
                },
                "priority": {
                    "type": "string",
                    "enum": [
                        "none",
                        "low",
                        "medium",
                        "high"
                    ]
                },
                "priority_at": {
                    "type": "string",
                    "format": "date"
                },
                "private": {
                    "type": "boolean"
                },
                "project": {
                    "$ref": "#/definitions/models.ProjectLite"
                },
                "project_id": {
                    "type": "integer"
                },
                "recurring_task_id": {
                    "type": "integer"
                },
                "reucrrence_date": {
                    "$ref": "#/definitions/models.DateOnly"
                },
                "rrule": {
                    "type": "string"
                },
                "source": {
                    "type": "string"
                },
                "start_date": {
                    "type": "string",
                    "format": "date"
                },
                "status": {
                    "$ref": "#/definitions/models.StatusLite"
                },
                "status_id": {
                    "type": "integer"
                },
                "status_updated_at": {
                    "type": "string"
                },
                "sub_task_done_count": {
                    "type": "integer"
                },
                "sub_task_total_count": {
                    "type": "integer"
                },
                "tag_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "tags": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.TagLite"
                    }
                },
                "time_block_completed_count": {
                    "type": "integer"
                },
                "time_block_scheduled_completed_count": {
                    "type": "integer"
                },
                "time_block_scheduled_total_count": {
                    "type": "integer"
                },
                "time_block_total_count": {
                    "description": "TODO: Set as `required` after FE adjusts things on their end",
                    "type": "integer"
                },
                "time_entry_total_count": {
                    "type": "integer"
                },
                "toggl_user_id": {
                    "type": "integer"
                },
                "total_blocked_time": {
                    "type": "integer"
                },
                "total_scheduled_blocked_time": {
                    "type": "integer"
                },
                "total_tracked_time": {
                    "type": "integer"
                },
                "updated_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "workspace_id": {
                    "type": "integer"
                }
            }
        },
        "task.UpdatePayload": {
            "type": "object",
            "required": [
                "name",
                "status_id"
            ],
            "properties": {
                "assignee_user_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    },
                    "x-nullable": true
                },
                "auto_log_time": {
                    "type": "boolean"
                },
                "billable": {
                    "type": "boolean"
                },
                "color": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "end_date": {
                    "type": "string",
                    "format": "date"
                },
                "estimated_mins": {
                    "type": "integer"
                },
                "ghost_assignee_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    },
                    "x-nullable": true
                },
                "name": {
                    "type": "string"
                },
                "notes": {
                    "type": "string"
                },
                "outbound_sync": {
                    "type": "boolean"
                },
                "parent_task_id": {
                    "type": "integer"
                },
                "pinned": {
                    "type": "boolean"
                },
                "position": {
                    "type": "integer",
                    "minimum": 1,
                    "x-nullable": true
                },
                "priority": {
                    "type": "string",
                    "enum": [
                        "none",
                        "low",
                        "medium",
                        "high"
                    ]
                },
                "private": {
                    "type": "boolean"
                },
                "project_id": {
                    "type": "integer"
                },
                "recurring_task_id": {
                    "type": "integer"
                },
                "rrule": {
                    "type": "string",
                    "x-nullable": true
                },
                "start_date": {
                    "type": "string",
                    "format": "date"
                },
                "status_id": {
                    "type": "integer"
                },
                "tag_ids": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    },
                    "x-nullable": true
                }
            }
        },
        "taskattachment.Payload": {
            "type": "object",
            "required": [
                "display_order",
                "name"
            ],
            "properties": {
                "display_order": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "taskconstraints.RequiredField": {
            "type": "object",
            "required": [
                "kind"
            ],
            "properties": {
                "kind": {
                    "$ref": "#/definitions/taskconstraints.RequiredFieldKind"
                }
            }
        },
        "taskconstraints.RequiredFieldKind": {
            "type": "string",
            "enum": [
                "project",
                "description",
                "tags"
            ],
            "x-enum-varnames": [
                "RequiredFieldKindProject",
                "RequiredFieldKindDescription",
                "RequiredFieldKindTags"
            ]
        },
        "taskconstraints.Response": {
            "type": "object",
            "required": [
                "created_at",
                "enabled",
                "enabled_at",
                "required_fields",
                "updated_at",
                "workspace_id"
            ],
            "properties": {
                "created_at": {
                    "type": "string"
                },
                "enabled": {
                    "type": "boolean"
                },
                "enabled_at": {
                    "type": "string"
                },
                "required_fields": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/taskconstraints.RequiredField"
                    }
                },
                "updated_at": {
                    "type": "string"
                },
                "workspace_id": {
                    "type": "integer"
                }
            }
        },
        "taskconstraints.UpsertPayload": {
            "type": "object",
            "required": [
                "enabled",
                "required_fields"
            ],
            "properties": {
                "enabled": {
                    "type": "boolean"
                },
                "required_fields": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/taskconstraints.RequiredField"
                    }
                }
            }
        },
        "taskgroup.UpdateTaskGroupEntryParams": {
            "type": "object",
            "required": [
                "id",
                "op",
                "target_group_id",
                "weight"
            ],
            "properties": {
                "end_date": {
                    "type": "string",
                    "format": "date"
                },
                "id": {
                    "type": "integer"
                },
                "op": {
                    "type": "string",
                    "enum": [
                        "move",
                        "remove"
                    ]
                },
                "source_group_id": {
                    "type": "integer"
                },
                "start_date": {
                    "type": "string",
                    "format": "date"
                },
                "target_group_id": {
                    "type": "integer"
                },
                "weight": {
                    "type": "integer",
                    "minimum": 0
                }
            }
        },
        "tasksuggestion.suggestBulkPayload": {
            "type": "object",
            "required": [
                "task_ids"
            ],
            "properties": {
                "task_ids": {
                    "type": "array",
                    "maxItems": 100,
                    "minItems": 1,
                    "items": {
                        "type": "integer"
                    }
                }
            }
        },
        "tasksuggestion.suggestPayload": {
            "type": "object",
            "required": [
                "task_id"
            ],
            "properties": {
                "task_id": {
                    "type": "integer"
                }
            }
        },
        "tasksuggestion.suggestionDetail": {
            "type": "object",
            "required": [
                "accuracy",
                "match_tier",
                "matched_name",
                "normalized_name",
                "project_id"
            ],
            "properties": {
                "accuracy": {
                    "type": "number"
                },
                "match_tier": {
                    "type": "string"
                },
                "matched_name": {
                    "type": "string"
                },
                "normalized_name": {
                    "type": "string"
                },
                "project_id": {
                    "type": "integer"
                }
            }
        },
        "tasksuggestion.suggestionResponse": {
            "type": "object",
            "required": [
                "reason",
                "suggestion",
                "task_id"
            ],
            "properties": {
                "reason": {
                    "type": "string"
                },
                "suggestion": {
                    "$ref": "#/definitions/tasksuggestion.suggestionDetail"
                },
                "task_id": {
                    "type": "integer"
                }
            }
        },
        "timeblock.BulkCreatePayload": {
            "type": "object",
            "required": [
                "time_blocks"
            ],
            "properties": {
                "time_blocks": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                        "$ref": "#/definitions/timeblock.PayloadWithTaskID"
                    }
                }
            }
        },
        "timeblock.PartialUpdatePayload": {
            "type": "object",
            "properties": {
                "completed": {
                    "type": "boolean"
                },
                "duration": {
                    "type": "integer",
                    "minimum": 0
                },
                "outbound_sync": {
                    "type": "boolean"
                },
                "start": {
                    "type": "string",
                    "format": "full-date"
                },
                "task_id": {
                    "type": "integer"
                }
            }
        },
        "timeblock.PartialUpdatePayloadWithID": {
            "type": "object",
            "required": [
                "id"
            ],
            "properties": {
                "completed": {
                    "type": "boolean"
                },
                "duration": {
                    "type": "integer",
                    "minimum": 0
                },
                "id": {
                    "type": "integer"
                },
                "outbound_sync": {
                    "type": "boolean"
                },
                "start": {
                    "type": "string",
                    "format": "full-date"
                },
                "task_id": {
                    "type": "integer"
                }
            }
        },
        "timeblock.Payload": {
            "type": "object",
            "required": [
                "start"
            ],
            "properties": {
                "completed": {
                    "type": "boolean"
                },
                "duration": {
                    "type": "integer",
                    "minimum": 0
                },
                "outbound_sync": {
                    "type": "boolean"
                },
                "start": {
                    "type": "string"
                }
            }
        },
        "timeblock.PayloadWithTaskID": {
            "type": "object",
            "required": [
                "start",
                "task_id"
            ],
            "properties": {
                "completed": {
                    "type": "boolean"
                },
                "duration": {
                    "type": "integer",
                    "minimum": 0
                },
                "outbound_sync": {
                    "type": "boolean"
                },
                "start": {
                    "type": "string"
                },
                "task_id": {
                    "type": "integer"
                }
            }
        },
        "timeblock.TimeBlockAggregate": {
            "type": "object",
            "required": [
                "created_at",
                "id",
                "start",
                "task_id",
                "toggl_user_id",
                "workspace_id"
            ],
            "properties": {
                "archived_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "calendar_event_id": {
                    "type": "integer"
                },
                "completed_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "created_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "deleted_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "duration": {
                    "type": "integer"
                },
                "has_time_entry": {
                    "type": "boolean"
                },
                "id": {
                    "type": "integer"
                },
                "start": {
                    "type": "string",
                    "format": "full-date"
                },
                "task_id": {
                    "type": "integer"
                },
                "toggl_user_id": {
                    "type": "integer"
                },
                "updated_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "workspace_id": {
                    "type": "integer"
                }
            }
        },
        "timeblock.TimeBlockAggregateWithTask": {
            "type": "object",
            "required": [
                "created_at",
                "id",
                "start",
                "task_id",
                "toggl_user_id",
                "workspace_id"
            ],
            "properties": {
                "archived_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "calendar_event_id": {
                    "type": "integer"
                },
                "completed_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "created_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "deleted_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "duration": {
                    "type": "integer"
                },
                "has_time_entry": {
                    "type": "boolean"
                },
                "id": {
                    "type": "integer"
                },
                "start": {
                    "type": "string",
                    "format": "full-date"
                },
                "task": {
                    "$ref": "#/definitions/models.Task"
                },
                "task_id": {
                    "type": "integer"
                },
                "toggl_user_id": {
                    "type": "integer"
                },
                "updated_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "workspace_id": {
                    "type": "integer"
                }
            }
        },
        "timeentry.CreatePayload": {
            "type": "object",
            "required": [
                "duration",
                "start",
                "type"
            ],
            "properties": {
                "billable": {
                    "type": "boolean"
                },
                "description": {
                    "type": "string"
                },
                "duration": {
                    "type": "integer",
                    "minimum": 0
                },
                "start": {
                    "type": "string"
                },
                "time_block_id": {
                    "type": "integer"
                },
                "type": {
                    "enum": [
                        "activity",
                        "break"
                    ],
                    "allOf": [
                        {
                            "$ref": "#/definitions/models.TimeEntryType"
                        }
                    ]
                },
                "user_id": {
                    "type": "integer"
                }
            }
        },
        "timeentry.PartialUpdatePayload": {
            "type": "object",
            "properties": {
                "billable": {
                    "type": "boolean"
                },
                "description": {
                    "type": "string",
                    "x-nullable": true
                },
                "duration": {
                    "type": "integer",
                    "minimum": 0
                },
                "reset_billable_to_default": {
                    "type": "boolean"
                },
                "start": {
                    "type": "string",
                    "format": "full-date",
                    "x-nullable": true
                },
                "task_id": {
                    "type": "integer"
                },
                "time_block_id": {
                    "type": "integer"
                },
                "type": {
                    "type": "string",
                    "enum": [
                        "activity",
                        "break"
                    ]
                }
            }
        },
        "timeentry.PartialUpdatePayloadWithID": {
            "type": "object",
            "required": [
                "id"
            ],
            "properties": {
                "billable": {
                    "type": "boolean"
                },
                "description": {
                    "type": "string",
                    "x-nullable": true
                },
                "duration": {
                    "type": "integer",
                    "minimum": 0
                },
                "id": {
                    "type": "integer"
                },
                "reset_billable_to_default": {
                    "type": "boolean"
                },
                "start": {
                    "type": "string",
                    "format": "full-date",
                    "x-nullable": true
                },
                "task_id": {
                    "type": "integer"
                },
                "time_block_id": {
                    "type": "integer"
                },
                "type": {
                    "type": "string",
                    "enum": [
                        "activity",
                        "break"
                    ]
                }
            }
        },
        "timeentry.Payload": {
            "type": "object",
            "required": [
                "duration",
                "start",
                "type"
            ],
            "properties": {
                "description": {
                    "type": "string"
                },
                "duration": {
                    "type": "integer",
                    "minimum": 0
                },
                "start": {
                    "type": "string"
                },
                "time_block_id": {
                    "type": "integer"
                },
                "type": {
                    "enum": [
                        "activity",
                        "break"
                    ],
                    "allOf": [
                        {
                            "$ref": "#/definitions/models.TimeEntryType"
                        }
                    ]
                }
            }
        },
        "timeentry.PayloadWithTaskID": {
            "type": "object",
            "required": [
                "duration",
                "start",
                "task_id",
                "type"
            ],
            "properties": {
                "billable": {
                    "type": "boolean"
                },
                "description": {
                    "type": "string"
                },
                "duration": {
                    "type": "integer",
                    "minimum": 0
                },
                "start": {
                    "type": "string"
                },
                "task_id": {
                    "type": "integer"
                },
                "time_block_id": {
                    "type": "integer"
                },
                "type": {
                    "enum": [
                        "activity",
                        "break"
                    ],
                    "allOf": [
                        {
                            "$ref": "#/definitions/models.TimeEntryType"
                        }
                    ]
                },
                "user_id": {
                    "type": "integer"
                }
            }
        },
        "timeentry.SetDayDurationPayload": {
            "type": "object",
            "required": [
                "date_from",
                "date_to",
                "duration"
            ],
            "properties": {
                "date_from": {
                    "type": "string",
                    "format": "date-time"
                },
                "date_to": {
                    "type": "string",
                    "format": "date-time"
                },
                "duration": {
                    "type": "integer"
                },
                "task_id": {
                    "type": "integer"
                }
            }
        },
        "timeentry.StartTrackingPayload": {
            "type": "object",
            "required": [
                "task_id",
                "type"
            ],
            "properties": {
                "description": {
                    "type": "string"
                },
                "start": {
                    "type": "string",
                    "format": "full-date"
                },
                "task_id": {
                    "type": "integer"
                },
                "time_block_id": {
                    "type": "integer"
                },
                "type": {
                    "$ref": "#/definitions/models.TimeEntryType"
                }
            }
        },
        "timeentry.StopTrackingPayload": {
            "type": "object",
            "required": [
                "end"
            ],
            "properties": {
                "end": {
                    "type": "string",
                    "format": "full-date"
                }
            }
        },
        "timeentry.TimeEntryWithTask": {
            "type": "object",
            "required": [
                "created_at",
                "id",
                "start",
                "task_id",
                "toggl_user_id",
                "type",
                "workspace_id"
            ],
            "properties": {
                "archived_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "billable": {
                    "type": "boolean"
                },
                "billable_source": {
                    "enum": [
                        "manual",
                        "task_default"
                    ],
                    "allOf": [
                        {
                            "$ref": "#/definitions/models.BillableSource"
                        }
                    ]
                },
                "created_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "deleted_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "description": {
                    "type": "string"
                },
                "duration": {
                    "type": "integer"
                },
                "id": {
                    "type": "integer"
                },
                "project_id": {
                    "type": "integer"
                },
                "start": {
                    "type": "string",
                    "format": "full-date"
                },
                "task": {
                    "$ref": "#/definitions/models.Task"
                },
                "task_id": {
                    "type": "integer"
                },
                "time_block_id": {
                    "type": "integer"
                },
                "toggl_user_id": {
                    "type": "integer"
                },
                "type": {
                    "enum": [
                        "activity",
                        "break"
                    ],
                    "allOf": [
                        {
                            "$ref": "#/definitions/models.TimeEntryType"
                        }
                    ]
                },
                "updated_at": {
                    "type": "string",
                    "format": "full-date"
                },
                "workspace_id": {
                    "type": "integer"
                }
            }
        },
        "types.Permission": {
            "type": "object",
            "required": [
                "condition",
                "description",
                "entity",
                "name",
                "permission_id"
            ],
            "properties": {
                "condition": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "entity": {
                    "type": "string",
                    "enum": [
                        "organization",
                        "workspace",
                        "project",
                        "group"
                    ]
                },
                "name": {
                    "type": "string"
                },
                "permission_id": {
                    "type": "integer"
                }
            }
        },
        "types.Role": {
            "type": "object",
            "required": [
                "code",
                "description",
                "entity",
                "name",
                "organization_id",
                "permissions",
                "privilege_level",
                "role_id",
                "type"
            ],
            "properties": {
                "code": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "entity": {
                    "type": "string",
                    "enum": [
                        "organization",
                        "workspace",
                        "project",
                        "group"
                    ]
                },
                "name": {
                    "type": "string"
                },
                "organization_id": {
                    "type": "integer"
                },
                "permissions": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/types.Permission"
                    }
                },
                "privilege_level": {
                    "type": "integer"
                },
                "role_id": {
                    "type": "integer"
                },
                "type": {
                    "type": "string",
                    "enum": [
                        "owner",
                        "admin",
                        "manager",
                        "guest"
                    ]
                }
            }
        },
        "user.PartialUpdatePayload": {
            "type": "object",
            "properties": {
                "attachments_display_mode": {
                    "type": "string",
                    "enum": [
                        "list",
                        "grid"
                    ],
                    "x-nullable": true
                },
                "autocomplete_task_with_time_block": {
                    "type": "boolean"
                },
                "autolog_time": {
                    "type": "boolean"
                },
                "calendar_range_type": {
                    "type": "string",
                    "x-nullable": true
                },
                "calendar_show_calendar_events": {
                    "type": "boolean"
                },
                "calendar_show_completed_tasks": {
                    "type": "boolean"
                },
                "calendar_show_tasks_list": {
                    "type": "boolean"
                },
                "calendar_split_view_columns": {
                    "type": "string",
                    "x-nullable": true
                },
                "current_workspace_id": {
                    "type": "integer",
                    "x-nullable": true
                },
                "date_format": {
                    "type": "string",
                    "enum": [
                        "US",
                        "EU",
                        "ISO"
                    ]
                },
                "default_page": {
                    "type": "string",
                    "enum": [
                        "last-opened",
                        "calendar",
                        "inbox",
                        "board",
                        "timeline",
                        "reports"
                    ],
                    "x-nullable": true
                },
                "duration_format": {
                    "type": "string",
                    "enum": [
                        "classic",
                        "improved",
                        "decimal"
                    ]
                },
                "focus_mode_count_up": {
                    "type": "boolean"
                },
                "has_reached_task_threshold": {
                    "type": "boolean"
                },
                "import_data_banner_dismissed": {
                    "type": "boolean"
                },
                "language_code": {
                    "type": "string",
                    "x-nullable": true
                },
                "new_users_trial_dismissed": {
                    "type": "boolean"
                },
                "onboarding_checklist_dismissed": {
                    "type": "boolean"
                },
                "onboarding_flow_dismissed": {
                    "type": "boolean"
                },
                "onboarding_multi_day_task_created": {
                    "type": "boolean"
                },
                "onboarding_task_dragged": {
                    "type": "boolean"
                },
                "onboarding_variant_selected": {
                    "type": "string",
                    "x-nullable": true
                },
                "plan_tour_dismissed": {
                    "type": "boolean"
                },
                "pomodoro_mode_auto_start_break": {
                    "type": "boolean"
                },
                "pomodoro_mode_break_duration_mins": {
                    "type": "integer",
                    "minimum": 1
                },
                "pomodoro_mode_session_duration_mins": {
                    "type": "integer",
                    "minimum": 1
                },
                "pomodoro_mode_sound_enabled": {
                    "type": "boolean"
                },
                "shortcuts_enabled": {
                    "type": "boolean"
                },
                "show_google_calendar_events": {
                    "type": "boolean"
                },
                "start_week_on": {
                    "type": "integer",
                    "enum": [
                        0,
                        1
                    ]
                },
                "switch_to_focus_dismissed": {
                    "type": "boolean"
                },
                "sync_external_calendar": {
                    "type": "string",
                    "enum": [
                        "never",
                        "always",
                        "ask"
                    ]
                },
                "theme": {
                    "type": "string",
                    "enum": [
                        "light",
                        "dark",
                        "auto"
                    ]
                },
                "time_block_color": {
                    "type": "string",
                    "x-nullable": true
                },
                "time_format": {
                    "type": "string",
                    "enum": [
                        "12h",
                        "24h"
                    ]
                },
                "time_tracking_mode": {
                    "type": "string",
                    "enum": [
                        "focus",
                        "pomodoro"
                    ],
                    "x-nullable": true
                },
                "time_tracking_mode_duration_mins": {
                    "type": "integer",
                    "minimum": 1,
                    "x-nullable": true
                },
                "time_tracking_mode_enabled": {
                    "type": "boolean"
                },
                "time_tracking_mode_fullscreen": {
                    "type": "boolean"
                },
                "tooltip_onboarding_dismissed": {
                    "type": "boolean"
                },
                "welcome_modal_dismissed": {
                    "type": "boolean"
                }
            }
        },
        "user.User": {
            "type": "object",
            "required": [
                "created_at",
                "deleted_at",
                "email",
                "fullname",
                "id",
                "updated_at"
            ],
            "properties": {
                "created_at": {
                    "type": "string"
                },
                "deleted_at": {
                    "type": "string"
                },
                "email": {
                    "type": "string",
                    "format": "email"
                },
                "fullname": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "updated_at": {
                    "type": "string"
                }
            }
        },
        "userworkspace.MergedUserWorkspaceSettings": {
            "type": "object",
            "required": [
                "autolog_time"
            ],
            "properties": {
                "autolog_time": {
                    "type": "boolean"
                }
            }
        },
        "userworkspace.PartialUpdatePayload": {
            "type": "object",
            "properties": {
                "autolog_time": {
                    "type": "boolean",
                    "x-nullable": true
                }
            }
        },
        "workspace.JSONSettings": {
            "type": "object",
            "additionalProperties": {
                "type": "object",
                "additionalProperties": {
                    "type": "boolean"
                }
            }
        },
        "workspace.Settings": {
            "type": "object",
            "required": [
                "created_at",
                "settings",
                "updated_at",
                "workspace_id"
            ],
            "properties": {
                "created_at": {
                    "type": "string"
                },
                "settings": {
                    "$ref": "#/definitions/workspace.JSONSettings"
                },
                "updated_at": {
                    "type": "string"
                },
                "workspace_id": {
                    "type": "integer"
                }
            }
        },
        "workspace.UpdatePayload": {
            "type": "object",
            "required": [
                "settings"
            ],
            "properties": {
                "settings": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "boolean"
                        }
                    }
                }
            }
        },
        "workspace.UserPermissionsResponse": {
            "type": "object",
            "required": [
                "permissions"
            ],
            "properties": {
                "permissions": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            }
        }
    },
    "securityDefinitions": {
        "bearerAuth": {
            "type": "apiKey",
            "name": "Authorization",
            "in": "header"
        },
        "cookieAuth": {
            "type": "apiKey",
            "name": "Cookie",
            "in": "header"
        },
        "queryAuth": {
            "type": "apiKey",
            "name": "token",
            "in": "query"
        }
    }
}