{
  "openapi": "3.0.0",
  "info": {
    "title": "Trickest API",
    "version": "1.0.0",
    "description": "REST API for the Trickest workflow automation platform: build and version workflows, execute and monitor runs, read run and subjob outputs, query Live Tables, manage workspaces and projects, and browse the Trickest Library.\n\n## Authentication\n\nSend an `Authorization` header on every authenticated request. Two token forms are accepted:\n\n- `Authorization: Token <api-token>` — a personal API token created in the dashboard under **Settings > Developer > API Token**. This is the form to use for scripts, CI, and agents. The same token authenticates the `trickest` CLI, the `@trickest/sdk` npm client, and the hosted MCP server at `https://api.trickest.io/mcp`.\n- `Authorization: Bearer <jwt>` — a session JWT, as issued by `POST /auth/login` and refreshed by `POST /auth/token-refresh`.\n\nTokens containing a `.` are JWTs and take the `Bearer` scheme; everything else is an API token and takes the `Token` scheme. There is no OAuth authorization server, no OpenID Connect discovery, and no dynamic client registration: the API token is minted in the dashboard and sent verbatim. Rotate it with `POST /users/me/token/regenerate`.\n\n## Authorization\n\nAccess is role-based, not OAuth-scoped — there are no per-token scopes to request or consent to. A token carries exactly the permissions of the user who created it. Every user holds one vault-level role (`#/components/schemas/VaultRoleEnum`) and, per workspace, one workspace role (`#/components/schemas/SpaceRoleEnum`). Roles may be assigned to teams; effective permissions are the union of team and direct roles, most permissive wins. Read the caller's own assignments with `GET /rbac/vault/roles` and `GET /rbac/spaces/{spaceId}/roles`.\n\nThe role model is mirrored machine-readably in the top-level `x-trickest-roles` extension. Operations that map to exactly one row of the published permission matrix also carry `x-trickest-min-vault-role` or `x-trickest-min-workspace-role`. Operations without such an annotation still enforce a role server-side; it is simply not documented per-operation yet, so treat the absence as unknown rather than unrestricted. Role-based access control is an Enterprise-plan feature; see https://trickest.com/docs/key-concepts/roles-and-permissions.\n\n## Errors\n\nFailures return `{ \"code\": string, \"message\": string }` with the matching HTTP status. The shared `400`, `401`, `403`, `404`, `429`, and `500` responses in `components.responses` carry that schema."
  },
  "servers": [
    {
      "url": "https://trickest.io/api",
      "description": "Production"
    },
    {
      "url": "http://localhost:3000/api",
      "description": "Local development (self-hosted app on the default port)"
    }
  ],
  "components": {
    "schemas": {
      "updateProjectSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "maxLength": 2000,
            "nullable": true
          }
        }
      },
      "createWsWorkflowSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "maxLength": 2000
          },
          "project_info": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ]
      },
      "WorkflowListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowSchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "createProjectSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "maxLength": 2000
          }
        },
        "required": [
          "name"
        ]
      },
      "ProjectListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectSchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "updateWorkspaceSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "maxLength": 2000,
            "nullable": true
          },
          "color": {
            "allOf": [
              {
                "$ref": "#/components/schemas/workspaceColorSchema"
              }
            ]
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "additionalProperties": true
      },
      "workspaceColorSchema": {
        "type": "string"
      },
      "SpaceSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "vault_info": {},
          "color": {
            "type": "string"
          },
          "playground": {
            "type": "boolean"
          },
          "author": {
            "type": "string",
            "nullable": true
          },
          "author_info": {},
          "projects_count": {
            "type": "number"
          },
          "workflows_count": {
            "type": "number"
          },
          "created_date": {
            "type": "string"
          },
          "modified_date": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "created_date",
          "modified_date"
        ],
        "additionalProperties": true
      },
      "createWorkspaceSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "maxLength": 2000
          },
          "color": {
            "allOf": [
              {
                "$ref": "#/components/schemas/workspaceColorSchema"
              }
            ]
          },
          "playground": {
            "type": "boolean"
          }
        },
        "required": [
          "name"
        ]
      },
      "booleanQuerySchema": {
        "type": "string",
        "enum": [
          "true",
          "false",
          "1",
          "0"
        ]
      },
      "saveWorkflowVersionSchema": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/workflowVersionDataSchema"
          },
          "snapshot": {
            "type": "boolean"
          },
          "name": {
            "type": "string",
            "maxLength": 500
          },
          "expected_version_id": {
            "allOf": [
              {
                "$ref": "#/components/schemas/uuidString"
              }
            ]
          },
          "previous_data": {}
        },
        "required": [
          "data"
        ],
        "additionalProperties": true
      },
      "uuidString": {
        "type": "string",
        "minLength": 1,
        "maxLength": 255
      },
      "workflowVersionDataSchema": {
        "type": "object",
        "properties": {
          "nodes": {
            "type": "object",
            "additionalProperties": {}
          },
          "connections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/workflowEdgeSchema"
            }
          },
          "primitiveNodes": {
            "type": "object",
            "additionalProperties": {}
          },
          "outputNodes": {
            "type": "object",
            "additionalProperties": {}
          },
          "annotations": {
            "type": "object",
            "additionalProperties": {}
          },
          "config": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "additionalProperties": true
      },
      "workflowEdgeSchema": {
        "type": "object",
        "properties": {
          "source": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "id"
            ]
          },
          "destination": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "id"
            ]
          }
        },
        "required": [
          "source",
          "destination"
        ]
      },
      "WorkflowValidationResponse": {
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "items": {}
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        },
        "additionalProperties": true
      },
      "WorkflowStatusResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "executing": {
            "type": "boolean"
          },
          "last_execution_status": {
            "type": "string"
          },
          "schedule_info": {}
        },
        "additionalProperties": true
      },
      "WorkflowSnapshotSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "workflow": {
            "type": "string"
          },
          "workflow_version_info": {
            "type": "string"
          },
          "created_date": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": true
      },
      "createSnapshotSchema": {
        "type": "object",
        "properties": {
          "workflow_version_info": {
            "$ref": "#/components/schemas/uuidString"
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "maxLength": 2000
          }
        },
        "required": [
          "workflow_version_info"
        ]
      },
      "WorkflowSnapshotListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowSnapshotSchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "WorkflowRunListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RunSchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "moveWorkflowSchema": {
        "type": "object",
        "properties": {
          "space_info": {
            "$ref": "#/components/schemas/uuidString"
          },
          "project_info": {
            "$ref": "#/components/schemas/optionalUuid"
          }
        },
        "required": [
          "space_info",
          "project_info"
        ]
      },
      "optionalUuid": {
        "type": "string",
        "minLength": 1,
        "maxLength": 255
      },
      "WorkflowCopyResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "copyWorkflowSchema": {
        "type": "object",
        "properties": {
          "space_info": {
            "$ref": "#/components/schemas/uuidString"
          },
          "project_info": {
            "$ref": "#/components/schemas/optionalUuid"
          }
        },
        "required": [
          "space_info",
          "project_info"
        ]
      },
      "importFromUrlResponseSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "spaceId": {
            "type": "string"
          },
          "nodeCount": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "id",
          "name",
          "spaceId",
          "nodeCount"
        ]
      },
      "importFromUrlSchema": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": [
          "url"
        ]
      },
      "updateWorkflowSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "description": {
            "type": "string",
            "maxLength": 5000,
            "nullable": true
          },
          "long_description": {
            "type": "string",
            "maxLength": 50000,
            "nullable": true
          },
          "project_info": {
            "$ref": "#/components/schemas/optionalUuid"
          },
          "space_info": {
            "allOf": [
              {
                "$ref": "#/components/schemas/uuidString"
              }
            ]
          }
        },
        "required": [
          "project_info"
        ],
        "additionalProperties": true
      },
      "VaultWorkflowListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "workspace_id": {
                  "type": "string"
                },
                "workspace_name": {
                  "type": "string"
                },
                "workspace_color": {
                  "type": "string"
                }
              }
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "WorkflowVersionSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "version": {
            "type": "number"
          },
          "version_number": {
            "type": "number"
          },
          "workflow_id": {
            "type": "string"
          },
          "raw": {
            "type": "boolean"
          },
          "public": {
            "type": "boolean"
          },
          "created_date": {
            "type": "string"
          },
          "data": {},
          "run_count": {
            "type": "number"
          },
          "schedule_info": {
            "allOf": [
              {
                "$ref": "#/components/schemas/VersionScheduleSchema"
              }
            ]
          },
          "max_machines": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            }
          }
        },
        "required": [
          "id",
          "created_date"
        ],
        "additionalProperties": true
      },
      "VersionScheduleSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "workflow": {
            "type": "string"
          },
          "user": {
            "type": "string",
            "nullable": true
          },
          "fleet": {
            "type": "string",
            "nullable": true
          },
          "repeat_period": {
            "type": "number",
            "nullable": true
          },
          "machines": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            },
            "nullable": true
          },
          "parallelism": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "date",
          "parallelism"
        ],
        "additionalProperties": true
      },
      "updateVariableSchema": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string"
          }
        },
        "required": [
          "value"
        ]
      },
      "VariableSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "is_secret": {
            "type": "boolean"
          },
          "is_dynamic": {
            "type": "boolean"
          },
          "is_global": {
            "type": "boolean"
          },
          "is_overriden": {
            "type": "boolean"
          },
          "space_id": {
            "type": "string"
          },
          "created_date": {
            "type": "string"
          },
          "modified_date": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "value",
          "is_secret",
          "created_date",
          "modified_date"
        ],
        "additionalProperties": true
      },
      "createVariableSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ]
      },
      "VariableListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VariableSchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "UserListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserSchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "UserSchema": {
        "type": "object",
        "properties": {
          "id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ]
          },
          "email": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "onboarding": {
            "type": "boolean"
          },
          "initial_credit": {
            "type": "number"
          },
          "has_password": {
            "type": "boolean"
          },
          "vault_id": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "profile": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UserProfileSchema"
              }
            ]
          },
          "features": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/FeatureStatusEnum"
            }
          },
          "created_date": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "email"
        ],
        "additionalProperties": true
      },
      "FeatureStatusEnum": {
        "type": "string",
        "enum": [
          "REQUESTED",
          "ENABLED",
          "DISABLED",
          "INITIALIZING",
          "ACTIVE",
          "INACTIVE"
        ]
      },
      "UserProfileSchema": {
        "type": "object",
        "properties": {
          "mfa_enabled": {
            "type": "boolean"
          },
          "type": {
            "type": "number"
          },
          "bio": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "entity_type": {
            "type": "string"
          },
          "statistics_allowed": {
            "type": "boolean"
          },
          "monthly_report_subscription": {
            "type": "boolean"
          },
          "onboarding": {
            "type": "boolean"
          },
          "vault_info": {
            "allOf": [
              {
                "$ref": "#/components/schemas/VaultInfoSchema"
              }
            ]
          }
        },
        "required": [
          "mfa_enabled",
          "type",
          "username"
        ],
        "additionalProperties": true
      },
      "VaultInfoSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "number"
          },
          "created_date": {
            "type": "string"
          },
          "modified_date": {
            "type": "string"
          },
          "user_limit": {
            "type": "number"
          },
          "user_count": {
            "type": "number"
          },
          "active_invites": {
            "type": "number"
          },
          "public_ips_status": {
            "type": "string"
          },
          "allowed_domains": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": true
      },
      "workspaceListResponseSchema": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/workspaceResponseSchema"
            }
          },
          "count": {
            "type": "number"
          }
        },
        "required": [
          "results"
        ],
        "additionalProperties": true
      },
      "workspaceResponseSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": true
      },
      "addTeamMemberSchema": {
        "type": "object",
        "properties": {
          "user": {
            "type": "integer",
            "minimum": 0,
            "exclusiveMinimum": true
          }
        },
        "required": [
          "user"
        ]
      },
      "TeamMemberListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserSchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "updateTeamSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "maxLength": 2000,
            "nullable": true
          }
        },
        "required": [
          "name"
        ]
      },
      "TeamSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "vault_id": {
            "type": "string"
          },
          "vault": {
            "type": "string"
          },
          "members": {
            "type": "array",
            "items": {}
          },
          "created_date": {
            "type": "string"
          },
          "modified_date": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "created_date"
        ],
        "additionalProperties": true
      },
      "createTeamSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "maxLength": 2000
          }
        },
        "required": [
          "name"
        ]
      },
      "TeamListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamSchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "renameFolderSchema": {
        "type": "object",
        "properties": {
          "vaultId": {
            "type": "string"
          },
          "path": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          },
          "newName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          }
        },
        "required": [
          "path",
          "newName"
        ],
        "additionalProperties": false
      },
      "createFolderSchema": {
        "type": "object",
        "properties": {
          "vaultId": {
            "type": "string"
          },
          "path": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "path"
        ],
        "additionalProperties": false
      },
      "FolderListResponse": {
        "type": "object",
        "properties": {
          "folders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FolderSchema"
            }
          },
          "count": {
            "type": "integer"
          }
        },
        "required": [
          "folders"
        ]
      },
      "FolderSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "path": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "path"
        ],
        "additionalProperties": true
      },
      "updateSecretVariableSchema": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "value"
        ]
      },
      "createSecretVariableSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "value": {
            "type": "string",
            "minLength": 1
          },
          "scope_type": {
            "type": "string",
            "enum": [
              "user",
              "space"
            ]
          },
          "space": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "name",
          "value",
          "scope_type"
        ]
      },
      "updateScheduleSchema": {
        "type": "object",
        "properties": {
          "is_active": {
            "type": "boolean"
          },
          "fleet": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "date": {
            "type": "string",
            "minLength": 1
          },
          "repeat_period": {
            "type": "integer",
            "minimum": 0
          },
          "parallelism": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000
          }
        },
        "additionalProperties": true
      },
      "ScheduleSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "workflow": {
            "type": "string"
          },
          "user": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string"
          },
          "repeat_period": {
            "type": "number",
            "nullable": true
          },
          "machines": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            },
            "nullable": true
          },
          "parallelism": {
            "type": "number"
          },
          "fleet": {
            "type": "string",
            "nullable": true
          },
          "workflow_name": {
            "type": "string"
          },
          "fleet_name": {
            "type": "string"
          },
          "created_date": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "createScheduleSchema": {
        "type": "object",
        "properties": {
          "workflow": {
            "$ref": "#/components/schemas/uuidString"
          },
          "fleet": {
            "$ref": "#/components/schemas/uuidString"
          },
          "date": {
            "type": "string",
            "minLength": 1
          },
          "repeat_period": {
            "type": "integer",
            "minimum": 0
          },
          "parallelism": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000
          }
        },
        "required": [
          "workflow",
          "fleet",
          "date"
        ]
      },
      "ScheduleListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleSchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "sessionBodySchema": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "workflowId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "vaultId": {
                "type": "string",
                "maxLength": 200
              }
            },
            "required": [
              "workflowId"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "agentSessionId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "vaultId": {
                "type": "string",
                "maxLength": 200
              }
            },
            "required": [
              "agentSessionId"
            ],
            "additionalProperties": false
          }
        ]
      },
      "heartbeatBodySchema": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "extendMs": {
            "type": "integer",
            "minimum": 60000
          }
        },
        "required": [
          "sessionId"
        ]
      },
      "filesPutSchema": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "path": {
            "$ref": "#/components/schemas/filePathSchema"
          },
          "content": {
            "type": "string"
          }
        },
        "required": [
          "sessionId",
          "path",
          "content"
        ]
      },
      "filePathSchema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 500
      },
      "commandSchema": {
        "type": "object",
        "discriminator": {
          "propertyName": "type"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/stopCommand"
          },
          {
            "$ref": "#/components/schemas/injectCommand"
          }
        ]
      },
      "injectCommand": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "inject"
            ]
          },
          "content": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000
          }
        },
        "required": [
          "type",
          "content"
        ]
      },
      "stopCommand": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "stop"
            ]
          },
          "runId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "assistantSnapshot": {
            "type": "object",
            "properties": {
              "content": {
                "type": "string",
                "maxLength": 20000
              },
              "capturedAt": {
                "type": "integer",
                "exclusiveMinimum": true,
                "maximum": 9007199254740991,
                "minimum": 0
              }
            },
            "required": [
              "content"
            ]
          }
        },
        "required": [
          "type"
        ]
      },
      "RunSignedUrlResponse": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "size": {
            "type": "number"
          },
          "pretty_size": {
            "type": "string"
          }
        },
        "required": [
          "url",
          "size"
        ]
      },
      "RunSubjobOutputsResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubjobOutputArtifactSchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "SubjobOutputArtifactSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "size": {
            "type": "number"
          },
          "path": {
            "type": "string"
          },
          "job_name": {
            "type": "string"
          },
          "task_index": {
            "type": "number"
          },
          "created_date": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "size",
          "path"
        ],
        "additionalProperties": true
      },
      "SubjobConsoleSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string"
          },
          "stream": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "size": {
            "type": "number"
          },
          "offset": {
            "type": "number"
          },
          "truncated": {
            "type": "boolean"
          }
        },
        "required": [
          "content"
        ]
      },
      "RunNodeOutputsResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubjobOutputArtifactSchema"
            }
          },
          "count": {
            "type": "integer"
          }
        },
        "required": [
          "results",
          "count"
        ]
      },
      "RunOutputContentResponse": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string"
          },
          "size": {
            "type": "integer"
          },
          "returned_bytes": {
            "type": "integer"
          },
          "truncated": {
            "type": "boolean"
          }
        },
        "required": [
          "content",
          "size",
          "returned_bytes",
          "truncated"
        ]
      },
      "RunSubjobSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/SubjobStatusEnum"
          },
          "finished": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "output_count": {
            "type": "number"
          },
          "output_size": {
            "type": "number"
          },
          "task_group": {
            "type": "boolean"
          },
          "task_index": {
            "type": "number"
          },
          "module_hierarchy": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "id",
          "name",
          "status"
        ],
        "additionalProperties": true
      },
      "SubjobStatusEnum": {
        "type": "string",
        "enum": [
          "PENDING",
          "RUNNING",
          "SUCCEEDED",
          "COMPLETED",
          "FAILED",
          "STOPPED",
          "ERROR",
          "SKIPPED",
          "CANCELLED"
        ]
      },
      "RunSubjobListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RunSubjobSchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "RunIpsResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "count": {
            "type": "integer"
          }
        },
        "additionalProperties": true
      },
      "VaultRunListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "workspace_id": {
                  "type": "string"
                },
                "workspace_name": {
                  "type": "string"
                },
                "workspace_color": {
                  "type": "string"
                }
              }
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "RunSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "workflow_id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/RunStatusEnum"
          },
          "created_date": {
            "type": "string"
          },
          "finished_date": {
            "type": "string"
          },
          "finished": {
            "type": "boolean"
          },
          "completed_date": {
            "type": "string"
          },
          "fleet": {
            "type": "string"
          },
          "machines": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            }
          }
        },
        "required": [
          "id",
          "workflow_id",
          "status",
          "created_date"
        ],
        "additionalProperties": true
      },
      "RunStatusEnum": {
        "type": "string",
        "enum": [
          "PENDING",
          "RUNNING",
          "COMPLETED",
          "FAILED",
          "CANCELLED",
          "STOPPED",
          "ERROR",
          "PARTIAL_SUCCESS",
          "SCHEDULED",
          "STOPPING"
        ]
      },
      "createRunSchema": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string",
            "minLength": 1
          },
          "prompt": {
            "type": "string"
          },
          "clientTurnId": {
            "type": "string"
          },
          "resume": {
            "type": "boolean"
          },
          "modelId": {
            "type": "string"
          },
          "workflowId": {
            "type": "string"
          },
          "workflowName": {
            "type": "string"
          },
          "versionId": {
            "type": "string"
          },
          "checkpointVersionId": {
            "type": "string"
          },
          "vaultId": {
            "type": "string"
          },
          "spaceId": {
            "type": "string"
          },
          "workflowData": {},
          "workflowDataHash": {
            "type": "string"
          },
          "lastRunId": {
            "type": "string",
            "nullable": true
          },
          "isScheduled": {
            "type": "boolean"
          },
          "lastRunStatus": {
            "allOf": [
              {
                "$ref": "#/components/schemas/lastRunStatusSchema"
              }
            ]
          },
          "editorMode": {
            "type": "string",
            "enum": [
              "workflow",
              "app",
              "agent",
              "database"
            ]
          },
          "moduleContext": {
            "allOf": [
              {
                "$ref": "#/components/schemas/moduleContextSchema"
              }
            ]
          },
          "agentMode": {
            "type": "string",
            "enum": [
              "agent",
              "plan"
            ]
          },
          "focusedNode": {
            "type": "string"
          },
          "focusedNodeContext": {},
          "mentionedNodes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "timezone": {
            "type": "string"
          },
          "appContext": {
            "type": "string"
          },
          "sandboxSessionId": {
            "type": "string"
          },
          "sandboxPreviewUrl": {
            "type": "string"
          },
          "sandboxDatasets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/liveTableInfoSchema"
            }
          },
          "imageAttachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/imageAttachmentSchema"
            }
          },
          "fileAttachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/fileAttachmentSchema"
            }
          }
        },
        "required": [
          "sessionId",
          "agentMode"
        ]
      },
      "fileAttachmentSchema": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "file"
            ]
          },
          "id": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string"
          },
          "size": {
            "type": "number",
            "minimum": 0
          }
        },
        "required": [
          "type",
          "id",
          "name",
          "size"
        ]
      },
      "imageAttachmentSchema": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "image"
            ]
          },
          "data": {
            "type": "string",
            "minLength": 1
          },
          "mimeType": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string"
          },
          "size": {
            "type": "number",
            "minimum": 0
          }
        },
        "required": [
          "type",
          "data",
          "mimeType",
          "name",
          "size"
        ]
      },
      "liveTableInfoSchema": {
        "type": "object",
        "properties": {
          "tableId": {
            "type": "string",
            "minLength": 1
          },
          "tableName": {
            "type": "string",
            "minLength": 1
          },
          "columns": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "name",
                "type"
              ]
            }
          }
        },
        "required": [
          "tableId",
          "tableName",
          "columns"
        ]
      },
      "moduleContextSchema": {
        "type": "object",
        "properties": {
          "isModuleWorkflow": {
            "type": "boolean"
          },
          "moduleWorkflowId": {
            "type": "string"
          },
          "parentWorkflowId": {
            "type": "string"
          },
          "parentWorkflowName": {
            "type": "string"
          },
          "returnToNode": {
            "type": "string"
          }
        },
        "required": [
          "isModuleWorkflow"
        ]
      },
      "lastRunStatusSchema": {
        "type": "object",
        "properties": {
          "runId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "completedAt": {
            "type": "string"
          }
        },
        "required": [
          "runId",
          "status"
        ]
      },
      "RunListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RunSchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "vaultRoleActionSchema": {
        "type": "object",
        "properties": {
          "user": {
            "type": "integer",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "role": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "user",
          "role"
        ]
      },
      "spaceRoleActionSchema": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string",
            "minLength": 1
          },
          "user": {
            "type": "integer",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "team": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "role"
        ],
        "additionalProperties": true
      },
      "ProjectSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "space_id": {
            "type": "string"
          },
          "space_info": {
            "type": "string"
          },
          "space_name": {
            "type": "string"
          },
          "author": {
            "type": "string"
          },
          "workflow_count": {
            "type": "number"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {}
          },
          "created_date": {
            "type": "string"
          },
          "modified_date": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "created_date",
          "modified_date"
        ],
        "additionalProperties": true
      },
      "moveProjectSchema": {
        "type": "object",
        "properties": {
          "space_info": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "space_info"
        ]
      },
      "NotificationSettingsResponse": {
        "type": "object",
        "properties": {},
        "additionalProperties": true
      },
      "bulkReadSchema": {
        "type": "object",
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "minItems": 1
          }
        },
        "required": [
          "ids"
        ]
      },
      "bulkDeleteSchema": {
        "type": "object",
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "minItems": 1
          }
        },
        "required": [
          "ids"
        ]
      },
      "NotificationSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "notification_type": {
            "$ref": "#/components/schemas/NotificationTypeEnum"
          },
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "seen": {
            "type": "boolean"
          },
          "is_read": {
            "type": "boolean"
          },
          "user_id": {
            "type": "string"
          },
          "metadata": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NotificationMetadataSchema"
              }
            ]
          },
          "created_date": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "notification_type",
          "message",
          "created_date"
        ],
        "additionalProperties": true
      },
      "NotificationMetadataSchema": {
        "type": "object",
        "properties": {
          "workflow_id": {
            "type": "string"
          },
          "workflow_name": {
            "type": "string"
          },
          "execution_id": {
            "type": "string"
          },
          "tool_id": {
            "type": "string"
          },
          "tool_name": {
            "type": "string"
          },
          "script_id": {
            "type": "string"
          },
          "script_name": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "NotificationTypeEnum": {
        "type": "string",
        "enum": [
          "MANUAL_RUN_COMPLETED",
          "SCHEDULED_RUN_COMPLETED",
          "RUN_FAILED",
          "WORKFLOW_RELEASED",
          "TOOL_RELEASED",
          "SCRIPT_RELEASED"
        ]
      },
      "updateNotificationSchema": {
        "type": "object",
        "properties": {
          "seen": {
            "type": "boolean"
          }
        },
        "additionalProperties": true
      },
      "NotificationListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotificationSchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "updateNotificationConfigSchema": {
        "type": "object",
        "properties": {
          "config": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/notificationConfigItemSchema"
            }
          }
        },
        "required": [
          "config"
        ]
      },
      "notificationConfigItemSchema": {
        "type": "object",
        "properties": {
          "email": {
            "type": "boolean"
          },
          "in_app": {
            "type": "boolean"
          }
        },
        "required": [
          "in_app"
        ]
      },
      "NotificationConfigResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "modified_date": {
            "type": "string"
          },
          "user_info": {
            "type": "string"
          },
          "config": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/NotificationConfigItem"
            }
          }
        },
        "required": [
          "id",
          "modified_date",
          "user_info",
          "config"
        ],
        "additionalProperties": true
      },
      "NotificationConfigItem": {
        "type": "object",
        "properties": {
          "email": {
            "type": "boolean"
          },
          "in_app": {
            "type": "boolean"
          }
        },
        "required": [
          "in_app"
        ]
      },
      "updateMachineSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          }
        },
        "required": [
          "name"
        ]
      },
      "MachineSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "fleet": {
            "type": "string"
          },
          "fleet_id": {
            "type": "string"
          },
          "machine_type": {
            "type": "number"
          },
          "state": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/MachineStateEnum"
              },
              {
                "type": "number"
              }
            ]
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FleetStatusEnum"
              }
            ]
          },
          "ip": {
            "type": "string"
          },
          "execution": {
            "type": "string",
            "nullable": true
          },
          "auth": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "secret": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "secret"
            ]
          },
          "created_date": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "FleetStatusEnum": {
        "type": "string",
        "enum": [
          "IDLE",
          "RUNNING",
          "STOPPED"
        ]
      },
      "MachineStateEnum": {
        "type": "string",
        "enum": [
          "ACTIVE",
          "DELETING",
          "INACTIVE"
        ]
      },
      "createMachineSchema": {
        "type": "object",
        "properties": {
          "fleet": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "fleet"
        ]
      },
      "MachineListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MachineSchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "LibraryToolLatestResponse": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/LibraryEntrySchema"
        }
      },
      "latestToolVersionsSchema": {
        "type": "object",
        "properties": {
          "tool_names": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "minItems": 1
          }
        },
        "required": [
          "tool_names"
        ]
      },
      "updateToolSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "maxLength": 5000
          },
          "docker_image": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "command": {
            "type": "string",
            "maxLength": 5000
          },
          "category": {
            "type": "string",
            "maxLength": 255
          },
          "output_parameter": {
            "type": "string",
            "maxLength": 255
          },
          "output_type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/outputTypeSchema"
              }
            ]
          },
          "inputs": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/toolInputSchema"
            }
          },
          "source_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri",
                "maxLength": 2000
              },
              {
                "type": "string",
                "enum": [
                  ""
                ]
              }
            ]
          },
          "doc_link": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri",
                "maxLength": 2000
              },
              {
                "type": "string",
                "enum": [
                  ""
                ]
              }
            ]
          },
          "license_info": {
            "$ref": "#/components/schemas/licenseInfoSchema"
          }
        },
        "required": [
          "license_info"
        ]
      },
      "licenseInfoSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri",
                "maxLength": 2000
              },
              {
                "type": "string",
                "enum": [
                  ""
                ]
              }
            ]
          }
        },
        "required": [
          "name"
        ]
      },
      "toolInputSchema": {
        "type": "object",
        "properties": {
          "command": {
            "type": "string",
            "maxLength": 500,
            "nullable": true
          },
          "description": {
            "type": "string",
            "maxLength": 2000,
            "nullable": true
          },
          "type": {
            "type": "string",
            "maxLength": 50,
            "nullable": true
          },
          "order": {
            "type": "integer",
            "minimum": 0,
            "nullable": true
          },
          "visible": {
            "type": "boolean",
            "nullable": true
          }
        }
      },
      "outputTypeSchema": {
        "type": "string",
        "enum": [
          "file",
          "folder"
        ]
      },
      "LibraryResolveToolResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "resolveToolSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "vaultId": {
            "type": "string"
          },
          "toolId": {
            "type": "string"
          },
          "existingNames": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "name"
        ]
      },
      "createToolSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "maxLength": 5000,
            "nullable": true
          },
          "docker_image": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "command": {
            "type": "string",
            "maxLength": 5000,
            "nullable": true
          },
          "category": {
            "type": "string",
            "maxLength": 255,
            "nullable": true
          },
          "output_parameter": {
            "type": "string",
            "maxLength": 255,
            "nullable": true
          },
          "output_type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/outputTypeSchema"
              }
            ]
          },
          "inputs": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/toolInputSchema"
            },
            "nullable": true
          },
          "source_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri",
                "maxLength": 2000,
                "nullable": true
              },
              {
                "type": "string",
                "enum": [
                  ""
                ]
              }
            ]
          },
          "doc_link": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri",
                "maxLength": 2000,
                "nullable": true
              },
              {
                "type": "string",
                "enum": [
                  ""
                ]
              }
            ]
          },
          "license_info": {
            "$ref": "#/components/schemas/licenseInfoSchema"
          }
        },
        "required": [
          "name",
          "docker_image",
          "license_info"
        ]
      },
      "LibraryToolListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LibraryEntrySchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "updateScriptSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "maxLength": 5000
          },
          "script": {
            "type": "string",
            "minLength": 1
          },
          "script_type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/scriptTypeSchema"
              }
            ]
          },
          "source_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri",
                "maxLength": 2000
              },
              {
                "type": "string",
                "enum": [
                  ""
                ]
              }
            ]
          },
          "doc_link": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri",
                "maxLength": 2000
              },
              {
                "type": "string",
                "enum": [
                  ""
                ]
              }
            ]
          }
        }
      },
      "scriptTypeSchema": {
        "type": "string",
        "enum": [
          "bash",
          "python",
          "golang",
          "node"
        ]
      },
      "LibraryScriptListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LibraryEntrySchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "LibraryResolveScriptResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "resolveScriptSchema": {
        "type": "object",
        "properties": {
          "language": {
            "type": "string",
            "minLength": 1
          },
          "vaultId": {
            "type": "string"
          }
        },
        "required": [
          "language"
        ]
      },
      "createScriptSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "maxLength": 5000,
            "nullable": true
          },
          "script": {
            "type": "string",
            "minLength": 1
          },
          "script_type": {
            "$ref": "#/components/schemas/scriptTypeSchema"
          },
          "source_url": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri",
                "maxLength": 2000
              },
              {
                "type": "string",
                "enum": [
                  ""
                ]
              }
            ]
          },
          "doc_link": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri",
                "maxLength": 2000
              },
              {
                "type": "string",
                "enum": [
                  ""
                ]
              }
            ]
          }
        },
        "required": [
          "name",
          "script",
          "script_type"
        ]
      },
      "LibraryModuleLatestResponse": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/LibraryEntrySchema"
        }
      },
      "latestModuleVersionsSchema": {
        "type": "object",
        "properties": {
          "module_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "minItems": 1
          }
        },
        "required": [
          "module_ids"
        ]
      },
      "updateModuleSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "maxLength": 5000
          }
        },
        "additionalProperties": true
      },
      "LibraryResolveModuleResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "resolveModuleSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "vaultId": {
            "type": "string"
          },
          "moduleId": {
            "type": "string"
          },
          "existingNames": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "name"
        ]
      },
      "LibraryEntrySchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/LibraryTypeEnum"
          },
          "category": {
            "type": "string"
          },
          "author": {
            "type": "string"
          },
          "inputs": {
            "type": "array",
            "items": {}
          },
          "outputs": {
            "type": "array",
            "items": {}
          },
          "workflow": {
            "type": "string"
          },
          "vault": {
            "type": "string"
          },
          "vault_info": {}
        },
        "required": [
          "id",
          "name",
          "type"
        ],
        "additionalProperties": true
      },
      "LibraryTypeEnum": {
        "type": "string",
        "enum": [
          "TOOL",
          "SCRIPT",
          "MODULE"
        ]
      },
      "createModuleSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "maxLength": 5000
          }
        },
        "required": [
          "name"
        ]
      },
      "LibraryModuleListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LibraryEntrySchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "copyLibraryWorkflowSchema": {
        "type": "object",
        "properties": {
          "space_info": {
            "type": "string",
            "minLength": 1
          },
          "project_info": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "space_info"
        ]
      },
      "WorkflowSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "space_id": {
            "type": "string"
          },
          "space_info": {
            "type": "string"
          },
          "space_name": {
            "type": "string"
          },
          "project_id": {
            "type": "string"
          },
          "project_info": {
            "type": "string"
          },
          "project_name": {
            "type": "string"
          },
          "vault_id": {
            "type": "string"
          },
          "author": {
            "type": "string"
          },
          "created_date": {
            "type": "string"
          },
          "modified_date": {
            "type": "string"
          },
          "is_copy": {
            "type": "boolean"
          },
          "playground": {
            "type": "boolean"
          },
          "is_template": {
            "type": "boolean"
          },
          "is_module": {
            "type": "boolean"
          },
          "execution_count": {
            "type": "number"
          },
          "run_count": {
            "type": "number"
          },
          "last_execution_date": {
            "type": "string"
          },
          "last_execution_status": {
            "type": "string"
          },
          "latest_version": {
            "type": "string"
          },
          "schedule_info": {
            "allOf": [
              {
                "$ref": "#/components/schemas/VersionScheduleSchema"
              }
            ]
          },
          "executing": {
            "type": "boolean"
          },
          "color": {
            "type": "string"
          },
          "solution_id": {
            "type": "string",
            "nullable": true
          },
          "has_app": {
            "type": "boolean"
          },
          "has_database": {
            "type": "boolean"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "id",
          "name",
          "created_date",
          "modified_date"
        ],
        "additionalProperties": true
      },
      "LibrarySplitterSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": true
      },
      "LibraryWorkflowListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowSchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "LibrarySplitterListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LibrarySplitterSchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "LibrarySolutionListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LibrarySolutionTemplateSchema"
            }
          },
          "count": {
            "type": "integer"
          }
        },
        "required": [
          "results"
        ]
      },
      "LibrarySolutionTemplateSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "enum": [
              "solution"
            ]
          },
          "complexity": {
            "type": "string",
            "nullable": true
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "is_verified": {
            "type": "boolean"
          },
          "is_featured": {
            "type": "boolean"
          },
          "featured_tag": {
            "type": "string",
            "nullable": true
          },
          "copy_behavior": {
            "type": "string",
            "nullable": true
          },
          "version": {
            "type": "string",
            "nullable": true
          },
          "created_date": {
            "type": "string"
          },
          "modified_date": {
            "type": "string"
          },
          "public": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": true
      },
      "LibraryCategoryListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LibraryCategorySchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "LibraryCategorySchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "count": {
            "type": "integer"
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": true
      },
      "LibraryBrowseResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LibraryBrowseItemSchema"
            }
          },
          "count": {
            "type": "integer"
          }
        },
        "required": [
          "results"
        ]
      },
      "LibraryBrowseItemSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "tool",
              "script",
              "module"
            ]
          },
          "description": {
            "type": "string"
          },
          "category": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "type"
        ],
        "additionalProperties": true
      },
      "searchSchema": {
        "type": "string",
        "default": ""
      },
      "InviteSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "vault_id": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/InviteStatusEnum"
          },
          "email_sent_date": {
            "type": "string"
          },
          "created_date": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "email",
          "status"
        ],
        "additionalProperties": true
      },
      "InviteStatusEnum": {
        "type": "string",
        "enum": [
          "CREATED",
          "SENT",
          "USED",
          "EXPIRED"
        ]
      },
      "createInviteSchema": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 320
          }
        },
        "required": [
          "email"
        ]
      },
      "InviteListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InviteSchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "updateIntegrationSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          }
        },
        "required": [
          "name"
        ]
      },
      "DockerRegistrySchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/IntegrationTypeEnum"
          },
          "vault": {
            "type": "string"
          },
          "vault_id": {
            "type": "string"
          },
          "created_date": {
            "type": "string"
          },
          "modified_date": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "type"
        ],
        "additionalProperties": true
      },
      "IntegrationTypeEnum": {
        "type": "string",
        "enum": [
          "basic",
          "dockerhub",
          "github"
        ]
      },
      "createIntegrationSchema": {
        "type": "object",
        "discriminator": {
          "propertyName": "type"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/basicRegistrySchema"
          },
          {
            "$ref": "#/components/schemas/dockerhubRegistrySchema"
          },
          {
            "$ref": "#/components/schemas/githubRegistrySchema"
          }
        ]
      },
      "githubRegistrySchema": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "github"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "username": {
            "type": "string",
            "minLength": 1
          },
          "token": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "type",
          "name",
          "username",
          "token"
        ]
      },
      "dockerhubRegistrySchema": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "dockerhub"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "username": {
            "type": "string",
            "minLength": 1
          },
          "password": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "type",
          "name",
          "username",
          "password"
        ]
      },
      "basicRegistrySchema": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "basic"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "username": {
            "type": "string",
            "minLength": 1
          },
          "password": {
            "type": "string",
            "minLength": 1
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "type",
          "name",
          "username",
          "password",
          "url"
        ]
      },
      "IntegrationListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DockerRegistrySchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "FleetSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "vault_id": {
            "type": "string"
          },
          "vault": {
            "type": "string"
          },
          "cluster": {
            "type": "string"
          },
          "default": {
            "type": "boolean"
          },
          "type": {
            "$ref": "#/components/schemas/FleetTypeEnum"
          },
          "max_machines": {
            "type": "number"
          },
          "active_machines": {
            "type": "number"
          },
          "machines_count": {
            "type": "number"
          },
          "machines": {
            "type": "object",
            "properties": {
              "active": {
                "type": "number"
              },
              "deleting": {
                "type": "number"
              },
              "inactive": {
                "type": "number"
              },
              "max": {
                "type": "number"
              },
              "execution_data": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": {}
                }
              }
            },
            "required": [
              "active",
              "deleting",
              "inactive",
              "max"
            ],
            "additionalProperties": true
          },
          "created_date": {
            "type": "string"
          },
          "modified_date": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "type",
          "machines",
          "created_date"
        ],
        "additionalProperties": true
      },
      "FleetTypeEnum": {
        "type": "string",
        "enum": [
          "HOSTED",
          "MANAGED"
        ]
      },
      "FleetListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FleetSchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "mkdirSchema": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "path"
        ]
      },
      "FileSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "size": {
            "type": "number"
          },
          "content_type": {
            "type": "string"
          },
          "created_date": {
            "type": "string"
          },
          "modified_date": {
            "type": "string"
          },
          "signed_url": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "path",
          "size",
          "created_date",
          "modified_date"
        ],
        "additionalProperties": true
      },
      "FileListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FileSchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "ExportDownloadResponse": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          }
        },
        "required": [
          "url"
        ]
      },
      "ExportResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "vaultId": {
            "type": "string"
          },
          "user": {
            "type": "string",
            "nullable": true
          },
          "queryId": {
            "type": "string",
            "nullable": true
          },
          "viewName": {
            "type": "string",
            "nullable": true
          },
          "solutionId": {
            "type": "string",
            "nullable": true
          },
          "fileName": {
            "type": "string",
            "nullable": true
          },
          "size": {
            "type": "number",
            "nullable": true
          },
          "status": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "createExportSchema": {
        "type": "object",
        "properties": {
          "query_id": {
            "type": "string",
            "minLength": 1
          },
          "file_name": {
            "type": "string"
          }
        },
        "required": [
          "query_id"
        ]
      },
      "ExportListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExportResponse"
            }
          },
          "count": {
            "type": "integer"
          }
        },
        "required": [
          "results"
        ]
      },
      "updateViewSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "maxLength": 2000
          },
          "select": {
            "type": "string"
          },
          "order": {
            "type": "string"
          },
          "q": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "updateSchema": {
        "type": "object",
        "properties": {
          "patch": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "patch"
        ]
      },
      "ReportingViewResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "dataset": {
            "type": "string"
          },
          "solution": {
            "type": "string"
          },
          "select": {
            "type": "string",
            "nullable": true
          },
          "order": {
            "type": "string",
            "nullable": true
          },
          "q": {
            "type": "string",
            "nullable": true
          },
          "created_date": {
            "type": "string"
          },
          "modified_date": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": true
      },
      "createViewSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "maxLength": 2000
          },
          "dataset": {
            "type": "string",
            "minLength": 1
          },
          "select": {
            "type": "string"
          },
          "order": {
            "type": "string"
          },
          "q": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "dataset"
        ],
        "additionalProperties": true
      },
      "ReportingViewListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportingViewResponse"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "ReportingDatasetFieldResponse": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string"
          },
          "icon": {
            "type": "string",
            "nullable": true
          },
          "isKey": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "type"
        ],
        "additionalProperties": true
      },
      "addFieldSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/fieldTypeSchema"
          },
          "dbType": {
            "$ref": "#/components/schemas/fieldDBTypeSchema"
          },
          "icon": {
            "type": "string"
          },
          "default": {}
        },
        "required": [
          "name",
          "type",
          "dbType"
        ],
        "additionalProperties": true
      },
      "fieldDBTypeSchema": {
        "type": "string",
        "enum": [
          "String",
          "LowCardinality(String)",
          "Int32",
          "Int64",
          "Float32",
          "Float64",
          "UUID",
          "Bool",
          "DateTime"
        ]
      },
      "fieldTypeSchema": {
        "type": "string",
        "enum": [
          "int",
          "int64",
          "float",
          "float64",
          "text",
          "data",
          "uuid",
          "bool",
          "datetime"
        ]
      },
      "ReportingDatasetFieldListResponse": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ReportingDatasetFieldResponse"
        }
      },
      "WorkflowDatabaseTableListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowDatabaseTableSchema"
            }
          },
          "count": {
            "type": "integer"
          }
        },
        "required": [
          "results"
        ]
      },
      "WorkflowDatabaseTableSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "vault_id": {
            "type": "string"
          },
          "solution_id": {
            "type": "string",
            "nullable": true
          },
          "dataset_id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "display_name": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string"
          },
          "error_message": {
            "type": "string",
            "nullable": true
          },
          "schema": {
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "nullable": true
          },
          "last_indexed_at": {
            "type": "string",
            "nullable": true
          },
          "source_count": {
            "type": "integer"
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowDatabaseTableSourceSchema"
            }
          }
        },
        "required": [
          "id",
          "vault_id",
          "solution_id",
          "dataset_id",
          "name",
          "display_name",
          "status",
          "error_message",
          "schema",
          "created_at",
          "updated_at",
          "last_indexed_at",
          "source_count",
          "sources"
        ],
        "additionalProperties": true
      },
      "WorkflowDatabaseTableSourceSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "workflow_id": {
            "type": "string"
          },
          "workflow_name": {
            "type": "string"
          },
          "node_name": {
            "type": "string"
          },
          "output_name": {
            "type": "string"
          },
          "reporting_node_id": {
            "type": "string",
            "nullable": true
          },
          "sync_status": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "id",
          "workflow_id",
          "workflow_name",
          "node_name",
          "output_name",
          "reporting_node_id",
          "sync_status"
        ],
        "additionalProperties": true
      },
      "DatasetRowResponse": {
        "type": "object",
        "properties": {
          "row": {
            "$ref": "#/components/schemas/DatasetUserRowSchema"
          }
        },
        "required": [
          "row"
        ]
      },
      "DatasetUserRowSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "vaultId": {
            "type": "string"
          },
          "datasetId": {
            "type": "string"
          },
          "solutionId": {
            "type": "string"
          },
          "payload": {
            "type": "object",
            "additionalProperties": {}
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true
          },
          "createdBy": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "id",
          "vaultId",
          "datasetId",
          "solutionId",
          "payload",
          "createdAt",
          "updatedAt",
          "deletedAt",
          "createdBy"
        ],
        "additionalProperties": true
      },
      "insertSchema": {
        "type": "object",
        "properties": {
          "payload": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "payload"
        ]
      },
      "DatasetRowListResponse": {
        "type": "object",
        "properties": {
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DatasetUserRowSchema"
            }
          }
        },
        "required": [
          "rows"
        ]
      },
      "CreateLiveTableResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "alreadyLive": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "tableId": {
            "type": "string"
          },
          "solutionId": {
            "type": "string",
            "nullable": true
          },
          "datasetId": {
            "type": "string",
            "nullable": true
          },
          "reportingNodeIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "backfill": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CreateLiveBackfillSummary"
              }
            ]
          }
        },
        "required": [
          "success",
          "alreadyLive",
          "message"
        ],
        "additionalProperties": true
      },
      "CreateLiveBackfillSummary": {
        "type": "object",
        "properties": {
          "indexed": {
            "type": "integer"
          },
          "failed": {
            "type": "integer"
          },
          "skippedReason": {
            "type": "string"
          },
          "timedOut": {
            "type": "boolean"
          }
        },
        "required": [
          "indexed",
          "failed"
        ],
        "additionalProperties": true
      },
      "createLiveSchema": {
        "type": "object",
        "properties": {
          "workflowId": {
            "type": "string",
            "minLength": 1
          },
          "workflowName": {
            "type": "string"
          },
          "spaceId": {
            "type": "string",
            "minLength": 1
          },
          "skipBackfill": {
            "type": "boolean"
          }
        },
        "required": [
          "workflowId",
          "spaceId"
        ]
      },
      "QueryResultSchema": {
        "type": "object",
        "properties": {
          "columns": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "rows": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            }
          },
          "row_count": {
            "type": "number"
          }
        },
        "required": [
          "columns",
          "rows",
          "row_count"
        ],
        "additionalProperties": true
      },
      "copySolutionSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "space": {
            "type": "string",
            "minLength": 1
          },
          "project": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "name",
          "space"
        ]
      },
      "updateSolutionSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "maxLength": 2000
          },
          "color": {
            "allOf": [
              {
                "$ref": "#/components/schemas/solutionColorSchema"
              }
            ]
          },
          "icon": {
            "allOf": [
              {
                "$ref": "#/components/schemas/solutionIconSchema"
              }
            ]
          }
        }
      },
      "solutionIconSchema": {
        "type": "string",
        "enum": [
          "alien",
          "aperture",
          "arrows-in",
          "barcode",
          "biohazard",
          "binary",
          "brain",
          "bug-beetle",
          "building",
          "building-office",
          "chart-polar",
          "city",
          "circuitry",
          "cloud",
          "cloud-check",
          "code-block",
          "codesandbox-logo",
          "crosshair",
          "database",
          "dna",
          "drone",
          "drop",
          "factory",
          "fingerprint",
          "fire",
          "gear",
          "ghost",
          "github-logo",
          "globe-hemisphere-west",
          "graph",
          "head-curcuit",
          "identification-badge",
          "newspaper",
          "polygon",
          "strategy",
          "tree-structure",
          "users",
          "wrench"
        ]
      },
      "solutionColorSchema": {
        "type": "string",
        "enum": [
          "base",
          "light-blue",
          "medium-blue",
          "dark-blue",
          "light-green",
          "medium-green",
          "dark-green",
          "light-purple",
          "medium-purple",
          "dark-purple",
          "light-red",
          "medium-red",
          "dark-red",
          "light-orange",
          "medium-orange",
          "dark-orange",
          "light-yellow",
          "medium-yellow",
          "dark-yellow"
        ]
      },
      "ReportingFieldTypeResponse": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ReportingFieldTypeEntry"
        }
      },
      "ReportingFieldTypeEntry": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "db_type": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "aliases": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "type"
        ],
        "additionalProperties": true
      },
      "updateDatasetSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": true
      },
      "DetectedTablesResponse": {
        "type": "object",
        "properties": {
          "tables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DetectedTableSchema"
            }
          },
          "primaryRunId": {
            "type": "string",
            "nullable": true
          },
          "consultedRunIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "runId": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "tables"
        ],
        "additionalProperties": true
      },
      "DetectedTableSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "nodeName": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "columns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DetectedColumnSchema"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "analyzing",
              "ready",
              "error"
            ]
          },
          "error": {
            "type": "string"
          },
          "fromOlderRun": {
            "type": "boolean"
          },
          "runId": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "columns",
          "status"
        ],
        "additionalProperties": true
      },
      "DetectedColumnSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "isLikelyKey": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "type"
        ],
        "additionalProperties": true
      },
      "detectSchema": {
        "type": "object",
        "properties": {
          "workflowId": {
            "type": "string",
            "minLength": 1
          },
          "workflowName": {
            "type": "string"
          }
        },
        "required": [
          "workflowId"
        ],
        "additionalProperties": false
      },
      "DatabaseTableSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "vaultId": {
            "type": "string",
            "format": "uuid"
          },
          "solutionId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "datasetId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "displayName": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "detected",
              "creating",
              "live",
              "error"
            ]
          },
          "errorMessage": {
            "type": "string",
            "nullable": true
          },
          "schema": {
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "nullable": true
          },
          "updatedAt": {
            "type": "string",
            "nullable": true
          },
          "lastIndexedAt": {
            "type": "string",
            "nullable": true
          },
          "row_count": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "vaultId",
          "solutionId",
          "datasetId",
          "name",
          "displayName",
          "status",
          "errorMessage",
          "schema",
          "createdAt",
          "updatedAt",
          "lastIndexedAt"
        ],
        "additionalProperties": true
      },
      "SolutionSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "space": {
            "type": "string"
          },
          "workflow_id": {
            "type": "string"
          },
          "is_public": {
            "type": "boolean"
          },
          "author": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "created_date": {
            "type": "string"
          },
          "modified_date": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": true
      },
      "createSolutionSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "maxLength": 2000,
            "default": ""
          },
          "color": {
            "allOf": [
              {
                "$ref": "#/components/schemas/solutionColorSchema"
              }
            ]
          },
          "icon": {
            "allOf": [
              {
                "$ref": "#/components/schemas/solutionIconSchema"
              }
            ]
          },
          "space": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "name",
          "space"
        ]
      },
      "SolutionListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SolutionSchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "ReportingNodeResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "vault": {
            "type": "string"
          },
          "workflow": {
            "type": "string"
          },
          "node_name": {
            "type": "string"
          },
          "output_name": {
            "type": "string"
          },
          "dataset_id": {
            "type": "string"
          },
          "is_module": {
            "type": "boolean"
          },
          "created_date": {
            "type": "string"
          },
          "modified_date": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "createReportingNodeSchema": {
        "type": "object",
        "properties": {
          "vault": {
            "type": "string"
          },
          "workflow": {
            "type": "string",
            "minLength": 1
          },
          "node_name": {
            "type": "string",
            "minLength": 1
          },
          "output_name": {
            "type": "string",
            "default": "output.txt"
          },
          "dataset_id": {
            "type": "string",
            "minLength": 1
          },
          "is_module": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "workflow",
          "node_name",
          "dataset_id"
        ],
        "additionalProperties": true
      },
      "ReportingNodeListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportingNodeResponse"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "ReportingDatasetResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "solution": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "timeframe_hrs": {
            "type": "integer"
          },
          "schema": {
            "type": "object",
            "properties": {
              "fields": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ReportingDatasetFieldDefinition"
                }
              }
            },
            "required": [
              "fields"
            ],
            "additionalProperties": true
          },
          "created_date": {
            "type": "string"
          },
          "modified_date": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": true
      },
      "ReportingDatasetFieldDefinition": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string"
          },
          "db_type": {
            "type": "string"
          },
          "is_key": {
            "type": "boolean"
          },
          "icon": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "name",
          "type"
        ],
        "additionalProperties": true
      },
      "createDatasetSchema": {
        "type": "object",
        "properties": {
          "solution": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "timeframeHrs": {
            "type": "integer",
            "minimum": 0,
            "exclusiveMinimum": true,
            "default": 336
          },
          "schema": {
            "type": "object",
            "properties": {
              "fields": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/datasetFieldDefinitionSchema"
                },
                "minItems": 1
              }
            },
            "required": [
              "fields"
            ]
          }
        },
        "required": [
          "solution",
          "name",
          "schema"
        ]
      },
      "datasetFieldDefinitionSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/fieldTypeSchema"
          },
          "dbType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/fieldDBTypeSchema"
              }
            ]
          },
          "is_key": {
            "type": "boolean"
          },
          "icon": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "type",
          "is_key"
        ]
      },
      "ReportingDatasetListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportingDatasetResponse"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "uuidSchema": {
        "type": "string",
        "format": "uuid"
      },
      "DatabaseTableListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DatabaseTableSchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "PaymentMethodListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentMethodSchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "PaymentMethodSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "vault_info": {
            "type": "string"
          },
          "card_ending_in": {
            "type": "string"
          },
          "last4": {
            "type": "string"
          },
          "brand": {
            "type": "string"
          },
          "cardholder_name": {
            "type": "string"
          },
          "subscription_amount": {
            "type": "number"
          },
          "active": {
            "type": "boolean"
          },
          "is_default": {
            "type": "boolean"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "CustomerSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "vault_id": {
            "type": "string"
          },
          "vault_info": {
            "type": "string"
          },
          "restricted": {
            "type": "boolean"
          },
          "cloud_usage_limit": {
            "type": "number"
          },
          "execution_units": {
            "type": "number"
          },
          "plan": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "credits_remaining": {
            "type": "number"
          },
          "credits_used": {
            "type": "number"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": true
      },
      "ChargeListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChargeSchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results"
        ]
      },
      "ChargeSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "vault_info": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "description": {
            "type": "string"
          },
          "created_date": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "units_purchased": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "amount",
          "description",
          "created_date"
        ],
        "additionalProperties": true
      },
      "DeviceTokenResponse": {
        "type": "object",
        "properties": {
          "access_token": {
            "type": "string"
          },
          "refresh_token": {
            "type": "string"
          },
          "token_type": {
            "type": "string",
            "enum": [
              "Bearer"
            ]
          },
          "is_google": {
            "type": "boolean"
          }
        },
        "required": [
          "access_token",
          "token_type",
          "is_google"
        ]
      },
      "DeviceTokenRequest": {
        "type": "object",
        "properties": {
          "grant_type": {
            "type": "string",
            "enum": [
              "urn:ietf:params:oauth:grant-type:device_code"
            ]
          },
          "device_code": {
            "type": "string"
          },
          "client_id": {
            "type": "string",
            "enum": [
              "trickest-cli"
            ]
          }
        },
        "required": [
          "grant_type",
          "device_code",
          "client_id"
        ]
      },
      "DeviceCodeResponse": {
        "type": "object",
        "properties": {
          "device_code": {
            "type": "string"
          },
          "user_code": {
            "type": "string"
          },
          "verification_uri": {
            "type": "string",
            "format": "uri"
          },
          "verification_uri_complete": {
            "type": "string",
            "format": "uri"
          },
          "expires_in": {
            "type": "integer",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "interval": {
            "type": "integer",
            "minimum": 0,
            "exclusiveMinimum": true
          }
        },
        "required": [
          "device_code",
          "user_code",
          "verification_uri",
          "verification_uri_complete",
          "expires_in",
          "interval"
        ]
      },
      "DeviceCodeRequest": {
        "type": "object",
        "properties": {
          "client_id": {
            "type": "string",
            "enum": [
              "trickest-cli"
            ]
          }
        },
        "required": [
          "client_id"
        ]
      },
      "TokenRefreshResponse": {
        "type": "object",
        "properties": {
          "access": {
            "type": "string"
          },
          "refresh": {
            "type": "string"
          }
        },
        "required": [
          "access",
          "refresh"
        ]
      },
      "OkResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "additionalProperties": true
      },
      "AuditLogRecordSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "vault_id": {
            "type": "string"
          },
          "actor": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          },
          "event": {
            "type": "string"
          },
          "action": {
            "type": "string"
          },
          "resource_type": {
            "type": "string"
          },
          "resource_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "service": {
            "type": "string"
          },
          "ip_address": {
            "type": "string"
          },
          "details": {
            "type": "object",
            "additionalProperties": {}
          },
          "timestamp": {
            "type": "string"
          },
          "created_date": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "actor",
          "event",
          "timestamp",
          "created_date"
        ],
        "additionalProperties": true
      },
      "ApiError": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "description": "Error envelope every non-2xx response carries. `code` is the HTTP status as a string (the backend mirrors it), `message` is human-readable; `details` carries validation issues when present.",
        "properties": {
          "code": {
            "type": "string",
            "example": "400"
          },
          "message": {
            "type": "string",
            "example": "Validation error"
          },
          "details": {
            "description": "Field-level detail when the error is a validation failure."
          }
        }
      },
      "AuditLogListResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuditLogRecordSchema"
            }
          },
          "count": {
            "type": "integer"
          },
          "next": {
            "type": "string",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "nullable": true
          },
          "last": {
            "type": "integer"
          }
        },
        "required": [
          "results"
        ]
      }
    },
    "responses": {
      "400": {
        "description": "Bad Request – validation error or malformed input",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "401": {
        "description": "Unauthorized – missing or expired token",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "500": {
        "description": "Internal Server Error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Session JWT issued by `POST /auth/login` and refreshed by `POST /auth/token-refresh`, sent as `Authorization: Bearer <jwt>`. Short-lived; prefer `TokenAuth` for scripts and agents."
      },
      "TokenAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Personal API token from **Settings > Developer > API Token**, sent with the `Token` scheme: `Authorization: Token <api-token>`. The token is a static credential minted in the dashboard — there is no authorization-code flow and no scope request. It inherits the creating user's vault and workspace roles. Rotate with `POST /users/me/token/regenerate`."
      }
    }
  },
  "paths": {
    "/audit-logs": {
      "get": {
        "operationId": "get-audit-logs",
        "summary": "List audit log events",
        "description": "Lists audit log events for the caller's vault with pagination, ordering, full-text search, and actor/event filters. Each record is enriched with a display mapping and category.",
        "tags": [
          "Audit-logs"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "required": true,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991,
              "default": 50
            }
          },
          {
            "in": "query",
            "name": "ordering",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 100,
              "default": "-timestamp"
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "actor",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "event",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of audit log records",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditLogListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/audit-logs/{id}": {
      "get": {
        "operationId": "get-audit-logs-{id}",
        "summary": "Get an audit log record",
        "description": "Fetches a single audit log record by its id, scoped to the caller's vault, enriched with a display mapping and category.",
        "tags": [
          "Audit-logs"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "Audit log record details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditLogRecordSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/audit-logs/export": {
      "post": {
        "operationId": "post-audit-logs-export",
        "summary": "Request an audit log export",
        "description": "Requests a CSV export of your vault's audit logs and returns a signed download URL.",
        "tags": [
          "Audit-logs"
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Export accepted; signed download URL payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/auth/token-refresh": {
      "post": {
        "operationId": "post-auth-token-refresh",
        "summary": "Refresh the session tokens",
        "description": "Exchanges a browser refresh-token cookie or CLI body refresh token for a new access/refresh JWT pair. Rate limited.",
        "tags": [
          "Auth"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Refreshed access/refresh tokens",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenRefreshResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/auth/device/code": {
      "post": {
        "operationId": "post-auth-device-code",
        "summary": "Start CLI device authorization",
        "description": "Creates a short-lived device code and user-facing verification code.",
        "tags": [
          "Auth"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceCodeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Device authorization started",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceCodeResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": []
      }
    },
    "/auth/device/token": {
      "post": {
        "operationId": "post-auth-device-token",
        "summary": "Poll or redeem CLI device authorization",
        "description": "Polls a device grant and returns credentials once the browser approves it.",
        "tags": [
          "Auth"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceTokenRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Device authorization credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceTokenResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": []
      }
    },
    "/billing/charges": {
      "get": {
        "operationId": "get-billing-charges",
        "summary": "List charges",
        "description": "Returns the purchase/charge history for the current workspace (vault).",
        "tags": [
          "Billing"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Purchase history",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChargeListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/billing/customer": {
      "get": {
        "operationId": "get-billing-customer",
        "summary": "Get customer",
        "description": "Returns customer billing details for the current workspace (vault).",
        "tags": [
          "Billing"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Customer billing details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/billing/payment-methods": {
      "get": {
        "operationId": "get-billing-payment-methods",
        "summary": "List payment methods",
        "description": "Lists all payment methods for the current workspace (vault).",
        "tags": [
          "Billing"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "List of payment methods",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentMethodListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/billing/traffic": {
      "get": {
        "operationId": "get-billing-traffic",
        "summary": "Get traffic usage",
        "description": "Returns outbound traffic data for the current workspace (vault).",
        "tags": [
          "Billing"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Outbound traffic data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/database-tables": {
      "get": {
        "operationId": "get-database-tables",
        "summary": "List all database tables for the current vault",
        "description": "Lists all database tables belonging to the authenticated user's vault, with limit/offset pagination.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of database tables",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatabaseTableListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/datasets": {
      "get": {
        "operationId": "get-datasets",
        "summary": "List Live Tables.",
        "description": "List datasets for the current vault, optionally filtered by solution.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "solution",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/uuidSchema"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of datasets",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportingDatasetListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "operationId": "post-datasets",
        "summary": "Create a Live Table.",
        "description": "Create a new dataset for a solution.",
        "tags": [
          "Database"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createDatasetSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Dataset created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportingDatasetResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/reporting-nodes": {
      "get": {
        "operationId": "get-reporting-nodes",
        "summary": "List Live Table sources.",
        "description": "List reporting nodes for the current vault, optionally filtered by workflow or dataset.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "workflow",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "dataset_id",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of reporting nodes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportingNodeListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "operationId": "post-reporting-nodes",
        "summary": "Connect a workflow output to a Live Table.",
        "description": "Create a new reporting node binding a workflow output to a dataset.",
        "tags": [
          "Database"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createReportingNodeSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Reporting node created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportingNodeResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/solutions": {
      "get": {
        "operationId": "get-solutions",
        "summary": "List databases.",
        "description": "List databases for the current vault, optionally filtered by space, with search and ordering.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "vault",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "space",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 200,
              "default": ""
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": true,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": true,
            "schema": {
              "default": 200,
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": true,
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "in": "query",
            "name": "ordering",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 50,
              "default": "-modified_date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of solutions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SolutionListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "operationId": "post-solutions",
        "summary": "Create a database.",
        "description": "Creates a database, along with the storage backing its Live Tables.",
        "tags": [
          "Database"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createSolutionSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Solution created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SolutionSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/database-tables/{tableId}": {
      "get": {
        "operationId": "get-database-tables-{tableId}",
        "summary": "Get a database table",
        "description": "Fetches a single database table by ID, including a best-effort live row count.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "name": "tableId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: tableId"
          }
        ],
        "responses": {
          "200": {
            "description": "Database table details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatabaseTableSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "patch": {
        "operationId": "patch-database-tables-{tableId}",
        "summary": "Update a database table",
        "description": "Renames a Live Table and/or updates its column schema.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "name": "tableId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: tableId"
          }
        ],
        "responses": {
          "200": {
            "description": "Updated database table",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatabaseTableSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "operationId": "delete-database-tables-{tableId}",
        "summary": "Delete a database table",
        "description": "Deletes a database table and its associated reporting nodes, dataset, and source records (the shared solution is kept).",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "name": "tableId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: tableId"
          }
        ],
        "responses": {
          "200": {
            "description": "Database table deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/database-tables/detect": {
      "post": {
        "operationId": "post-database-tables-detect",
        "summary": "Detect database tables from a workflow",
        "description": "Scans a workflow's recent runs for JSONL/JSON outputs, analyzes their columns, and persists the detected tables.",
        "tags": [
          "Database"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/detectSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Detected and analyzed tables plus the runs consulted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DetectedTablesResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/datasets/{id}": {
      "get": {
        "operationId": "get-datasets-{id}",
        "summary": "Get a Live Table by ID.",
        "description": "Fetch a single dataset by ID.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "Dataset details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportingDatasetResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "operationId": "put-datasets-{id}",
        "summary": "Update a Live Table.",
        "description": "Update a dataset by ID.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateDatasetSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dataset updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportingDatasetResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "operationId": "delete-datasets-{id}",
        "summary": "Delete a Live Table.",
        "description": "Delete a dataset by ID.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "204": {
            "description": "Dataset deleted successfully"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/reporting/field-types": {
      "get": {
        "operationId": "get-reporting-field-types",
        "summary": "List the field types available for Live Table schemas.",
        "description": "Lists the field types available for Live Table schemas: the supported logical types, their database types, and any aliases.",
        "tags": [
          "Database"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Catalog of supported field types (logical types, db types, optional aliases)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportingFieldTypeResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/reporting-nodes/{id}": {
      "delete": {
        "operationId": "delete-reporting-nodes-{id}",
        "summary": "Disconnect a Live Table source.",
        "description": "Delete a single reporting node identified by its UUID.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "204": {
            "description": "Reporting node deleted successfully"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/solutions/{solutionId}": {
      "get": {
        "operationId": "get-solutions-{solutionId}",
        "summary": "Get a database by ID.",
        "description": "Fetch a single database by ID.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "name": "solutionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: solutionId"
          }
        ],
        "responses": {
          "200": {
            "description": "Solution details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SolutionSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "operationId": "put-solutions-{solutionId}",
        "summary": "Update a database.",
        "description": "Update a database's name, description, color, or icon.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "name": "solutionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: solutionId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateSolutionSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated solution",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SolutionSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "operationId": "delete-solutions-{solutionId}",
        "summary": "Delete a database.",
        "description": "Permanently delete a database by ID.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "name": "solutionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: solutionId"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/solutions/copy": {
      "post": {
        "operationId": "post-solutions-copy",
        "summary": "Copy a database.",
        "description": "Copies a database along with its Live Tables, workflow, and Live Table sources.",
        "tags": [
          "Database"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/copySolutionSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Solution copied successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SolutionSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/database-tables/{tableId}/data": {
      "get": {
        "operationId": "get-database-tables-{tableId}-data",
        "summary": "Query database table data",
        "description": "Reads rows from a live database table via the reporting backend, with a TQL filter, ordering, column selection, and pagination.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "offset",
            "required": true,
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991,
              "default": 24
            }
          },
          {
            "in": "query",
            "name": "order_by",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 100,
              "default": ""
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "in": "query",
            "name": "select",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 500,
              "default": ""
            }
          },
          {
            "in": "query",
            "name": "query_id",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "path",
            "name": "tableId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "Query result rows from the reporting backend",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueryResultSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/database-tables/{tableId}/live": {
      "post": {
        "operationId": "post-database-tables-{tableId}-live",
        "summary": "Promote a database table to live (SDK alias)",
        "description": "Promotes a detected table to a live dataset and solution, then awaits reporting backfill index triggers (with a timeout) and returns a `backfill` summary. Alias of create-live.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "name": "tableId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: tableId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createLiveSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Live-table promotion result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateLiveTableResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/database-tables/{tableId}/rows": {
      "get": {
        "operationId": "get-database-tables-{tableId}-rows",
        "summary": "List rows in a database table",
        "description": "Lists user-written overlay rows for a live database table, with optional since/limit/includeDeleted filters.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 5000
            }
          },
          {
            "in": "query",
            "name": "includeDeleted",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "string",
                  "enum": [
                    "true"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "false"
                  ]
                },
                {
                  "type": "boolean"
                }
              ]
            }
          },
          {
            "in": "path",
            "name": "tableId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "List of overlay rows",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetRowListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "operationId": "post-database-tables-{tableId}-rows",
        "summary": "Insert a row into a database table",
        "description": "Inserts a user-written overlay row into a live database table; supports an Idempotency-Key header.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "name": "tableId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: tableId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/insertSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The inserted row",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetRowResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/database-tables/workflows/{workflowId}": {
      "get": {
        "operationId": "get-database-tables-workflows-{workflowId}",
        "summary": "List database tables for a workflow",
        "description": "Lists the database tables fed by a workflow, each with its aggregated source records.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: workflowId"
          }
        ],
        "responses": {
          "200": {
            "description": "Tables (with sources) for the workflow",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDatabaseTableListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/datasets/{id}/fields": {
      "get": {
        "operationId": "get-datasets-{id}-fields",
        "summary": "List Live Table fields.",
        "description": "Fetch fields for a dataset (field names normalized to camelCase).",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "Dataset fields",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportingDatasetFieldListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "operationId": "post-datasets-{id}-fields",
        "summary": "Add a field to a Live Table.",
        "description": "Add a new field to an existing dataset.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/addFieldSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Field added successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportingDatasetFieldResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/datasets/{id}/truncate": {
      "delete": {
        "operationId": "delete-datasets-{id}-truncate",
        "summary": "Truncate a Live Table.",
        "description": "Delete all rows from a dataset, keeping its schema and definition.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/solutions/{solutionId}/data": {
      "get": {
        "operationId": "get-solutions-{solutionId}-data",
        "summary": "Query a database's Live Table data.",
        "description": "Reads rows from a Live Table, with TQL filter, ordering, column selection, and pagination.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "dataset_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": true,
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "default": 24
            }
          },
          {
            "in": "query",
            "name": "order_by",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 100,
              "default": ""
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "in": "query",
            "name": "select",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 500,
              "default": ""
            }
          },
          {
            "in": "query",
            "name": "query_id",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "path",
            "name": "solutionId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "Query result rows from the reporting backend",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueryResultSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/solutions/{solutionId}/datasets": {
      "get": {
        "operationId": "get-solutions-{solutionId}-datasets",
        "summary": "List a database's Live Tables.",
        "description": "List the Live Tables belonging to a database, with pagination.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "page_size",
            "required": true,
            "schema": {
              "default": 200,
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "in": "path",
            "name": "solutionId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "List of datasets",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportingDatasetListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/solutions/{solutionId}/history": {
      "get": {
        "operationId": "get-solutions-{solutionId}-history",
        "summary": "Query a database's change history.",
        "description": "Reads the change-history rows for a Live Table, with filter, ordering, and pagination.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "dataset_id",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 200,
              "default": ""
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": true,
            "schema": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991,
              "default": 24
            }
          },
          {
            "in": "query",
            "name": "order_by",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 100,
              "default": ""
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "in": "query",
            "name": "select",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 500,
              "default": ""
            }
          },
          {
            "in": "path",
            "name": "solutionId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "History rows from the reporting backend",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/solutions/{solutionId}/views": {
      "get": {
        "operationId": "get-solutions-{solutionId}-views",
        "summary": "List views in a database.",
        "description": "List all views (saved queries) in a database.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "solutionId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "List of views",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportingViewListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "operationId": "post-solutions-{solutionId}-views",
        "summary": "Create a view in a database.",
        "description": "Create a new view (saved query) in a database.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "solutionId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createViewSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "View created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportingViewResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/database-tables/{tableId}/rows/{rowId}": {
      "get": {
        "operationId": "get-database-tables-{tableId}-rows-{rowId}",
        "summary": "Get a database table row",
        "description": "Fetches a single user-written overlay row by ID from a live database table.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "name": "tableId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: tableId"
          },
          {
            "name": "rowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: rowId"
          }
        ],
        "responses": {
          "200": {
            "description": "The requested row",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetRowResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "patch": {
        "operationId": "patch-database-tables-{tableId}-rows-{rowId}",
        "summary": "Update a database table row",
        "description": "Applies a partial patch to a user-written overlay row in a live database table.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "name": "tableId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: tableId"
          },
          {
            "name": "rowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: rowId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated row",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetRowResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "operationId": "delete-database-tables-{tableId}-rows-{rowId}",
        "summary": "Delete a database table row",
        "description": "Soft-deletes a user-written overlay row from a live database table.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "name": "tableId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: tableId"
          },
          {
            "name": "rowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: rowId"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted row",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetRowResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/datasets/{id}/fields/{fieldName}": {
      "delete": {
        "operationId": "delete-datasets-{id}-fields-{fieldName}",
        "summary": "Delete a Live Table field.",
        "description": "Delete a field from a dataset by name.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          },
          {
            "name": "fieldName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "example",
            "description": "Path parameter: fieldName"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/solutions/{solutionId}/views/{viewId}": {
      "get": {
        "operationId": "get-solutions-{solutionId}-views-{viewId}",
        "summary": "Get a view by ID.",
        "description": "Fetch a single view (saved query) by ID.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "solutionId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          },
          {
            "in": "path",
            "name": "viewId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "View details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportingViewResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "operationId": "put-solutions-{solutionId}-views-{viewId}",
        "summary": "Update a view.",
        "description": "Update a view (saved query) by ID.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "solutionId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          },
          {
            "in": "path",
            "name": "viewId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateViewSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "View updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportingViewResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "operationId": "delete-solutions-{solutionId}-views-{viewId}",
        "summary": "Delete a view.",
        "description": "Delete a view (saved query) by ID.",
        "tags": [
          "Database"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "solutionId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          },
          {
            "in": "path",
            "name": "viewId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "204": {
            "description": "View deleted successfully"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/exports": {
      "get": {
        "operationId": "get-exports",
        "summary": "List export requests",
        "description": "Lists reporting export requests for the caller's vault, with optional filters by solution, query, file name, or view, plus limit/offset paging.",
        "tags": [
          "Exports"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "solution_id",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "query_id",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "file_name",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "view_name",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of export requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "operationId": "post-exports",
        "summary": "Create an export request",
        "description": "Queues a new reporting export for a query in the caller's vault and returns the created export request's id.",
        "tags": [
          "Exports"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createExportSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledgement carrying the created export id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/exports/{id}": {
      "get": {
        "operationId": "get-exports-{id}",
        "summary": "Get an export request",
        "description": "Fetches a single reporting export request by its id, scoped to the caller's vault.",
        "tags": [
          "Exports"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "Export request details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "operationId": "delete-exports-{id}",
        "summary": "Delete an export request",
        "description": "Deletes a reporting export request by its id, scoped to the caller's vault.",
        "tags": [
          "Exports"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "Export request deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/exports/{id}/download": {
      "post": {
        "operationId": "post-exports-{id}-download",
        "summary": "Get an export download URL",
        "description": "Generates a short-lived signed URL for downloading the export file, scoped to the caller's vault.",
        "tags": [
          "Exports"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "Signed download URL for the export file",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportDownloadResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/files": {
      "get": {
        "operationId": "get-files",
        "summary": "List files",
        "description": "Lists files from the authenticated user's storage vault, with pagination, search, ordering, and optional virtual-folder filtering.",
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991,
              "default": 100
            }
          },
          {
            "in": "query",
            "name": "ordering",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 100,
              "default": "-modified_date"
            }
          },
          {
            "in": "query",
            "name": "folder",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 500
            }
          },
          {
            "in": "query",
            "name": "unfiled",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of files",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-workspace-role": "reader",
        "x-trickest-permission": "View files and variables"
      },
      "post": {
        "operationId": "post-files",
        "summary": "Upload a file",
        "description": "Uploads a new file (multipart/form-data) to the user's storage vault. Returns the created file record.",
        "tags": [
          "Files"
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Uploaded file",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/files/{id}": {
      "get": {
        "operationId": "get-files-{id}",
        "summary": "Get a file by ID",
        "description": "Fetches a single file record from the user's storage vault by its ID.",
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "File details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "operationId": "delete-files-{id}",
        "summary": "Delete a file",
        "description": "Permanently deletes a file from the user's storage vault.",
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/files/mkdir": {
      "post": {
        "operationId": "post-files-mkdir",
        "summary": "Create a directory",
        "description": "Creates a directory entry in the user's storage vault at the given path.",
        "tags": [
          "Files"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/mkdirSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created directory",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/files/{id}/signed-url": {
      "get": {
        "operationId": "get-files-{id}-signed-url",
        "summary": "GET /api/files/[id]/signed-url - Get a signed URL for file download/preview.",
        "description": "Returns a signed download/preview URL and size for a file in the user's storage vault.",
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "Signed URL and size ({ url, size }); bespoke body, no entity schema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/fleets": {
      "get": {
        "operationId": "get-fleets",
        "summary": "List fleets",
        "description": "Lists the fleets in the authenticated user's vault with aggregate machine usage stats for MANAGED and HOSTED fleets.",
        "tags": [
          "Fleets"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Paginated list of fleets",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FleetListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "operationId": "post-fleets",
        "summary": "Create a self-hosted fleet",
        "description": "Creates a HOSTED fleet in the authenticated user's vault with a default machine limit.",
        "tags": [
          "Fleets"
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Created fleet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FleetSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-vault-role": "owner",
        "x-trickest-permission": "Manage global settings (fleet, Docker registry)"
      }
    },
    "/fleets/{id}": {
      "get": {
        "operationId": "get-fleets-{id}",
        "summary": "Get a fleet by ID",
        "description": "Fetches a single fleet by its ID. Only fleets in your own vault are returned.",
        "tags": [
          "Fleets"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "Fleet details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FleetSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "patch": {
        "operationId": "patch-fleets-{id}",
        "summary": "Update a fleet",
        "description": "Updates fields on a fleet by its ID. Only fleets in your own vault can be updated.",
        "tags": [
          "Fleets"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "Updated fleet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FleetSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "operationId": "delete-fleets-{id}",
        "summary": "Delete a fleet",
        "description": "Deletes a fleet by its ID. Only fleets in your own vault can be deleted.",
        "tags": [
          "Fleets"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "Fleet deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/integrations": {
      "get": {
        "operationId": "get-integrations",
        "summary": "List all Docker registries.",
        "description": "List all Docker registries for the vault, optionally filtered by type.",
        "tags": [
          "Integrations"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "type",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 50,
              "default": ""
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of integrations",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "operationId": "post-integrations",
        "summary": "Create a new Docker registry.",
        "description": "Create a new Docker registry integration.",
        "tags": [
          "Integrations"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createIntegrationSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Integration created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DockerRegistrySchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/integrations/{id}": {
      "get": {
        "operationId": "get-integrations-{id}",
        "summary": "Get a specific Docker registry by ID.",
        "description": "Fetch a single integration by ID.",
        "tags": [
          "Integrations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "Integration details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DockerRegistrySchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "operationId": "put-integrations-{id}",
        "summary": "Update a Docker registry.",
        "description": "Update an integration (currently only name can be updated).",
        "tags": [
          "Integrations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateIntegrationSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Integration updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DockerRegistrySchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "operationId": "delete-integrations-{id}",
        "summary": "Delete a Docker registry.",
        "description": "Delete an integration by ID.",
        "tags": [
          "Integrations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "Integration deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/invites": {
      "get": {
        "operationId": "get-invites",
        "summary": "List all invites in the current vault.",
        "description": "List all invites in the current vault.",
        "tags": [
          "Invites"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "page_size",
            "required": true,
            "schema": {
              "default": 500,
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of invites",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InviteListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "operationId": "post-invites",
        "summary": "Create a new invite.",
        "description": "Create a new vault admin invite.",
        "tags": [
          "Invites"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createInviteSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created invite",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InviteSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-vault-role": "owner",
        "x-trickest-permission": "Invite users to the platform"
      }
    },
    "/invites/{id}": {
      "delete": {
        "operationId": "delete-invites-{id}",
        "summary": "Delete an invite",
        "description": "Delete a pending invite by ID.",
        "tags": [
          "Invites"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "Invite deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/invites/{id}/resend": {
      "post": {
        "operationId": "post-invites-{id}-resend",
        "summary": "Resend an invite",
        "description": "Resend the invite email for a pending invite.",
        "tags": [
          "Invites"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "Invite resent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/ips": {
      "get": {
        "operationId": "get-ips",
        "summary": "List static IPs",
        "description": "Fetches the static IPs allocated to the authenticated user's vault.",
        "tags": [
          "Ips"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Static IPs for the vault",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "operationId": "post-ips",
        "summary": "Generate static IPs",
        "description": "Allocates new static IPs for the authenticated user's vault.",
        "tags": [
          "Ips"
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Generated static IPs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/library/browse": {
      "get": {
        "operationId": "get-library-browse",
        "summary": "Browse library items",
        "description": "Returns a combined, de-duplicated list of tools, scripts, and modules for the tool-binding picker. Filter by `types` (comma-separated), `category`, and `search`.",
        "tags": [
          "Library"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "search",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/searchSchema"
            }
          },
          {
            "in": "query",
            "name": "types",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 100,
              "default": "tool,script,module"
            }
          },
          {
            "in": "query",
            "name": "category",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": true,
            "schema": {
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Combined library items",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryBrowseResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-workspace-role": "reader",
        "x-trickest-permission": "Browse Trickest Library"
      }
    },
    "/library/categories": {
      "get": {
        "operationId": "get-library-categories",
        "summary": "List library categories",
        "description": "Lists the categories used to group library items. Supports pagination, search, and ordering.",
        "tags": [
          "Library"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "required": true,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/searchSchema"
            }
          },
          {
            "in": "query",
            "name": "ordering",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of categories",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryCategoryListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-workspace-role": "reader",
        "x-trickest-permission": "Browse Trickest Library"
      }
    },
    "/library/solution": {
      "get": {
        "operationId": "get-library-solution",
        "summary": "List published solution templates",
        "description": "Returns published, public solution templates in library-compatible format. Public endpoint — no authentication required.",
        "tags": [
          "Library"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "List of published solution templates",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibrarySolutionListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "security": []
      }
    },
    "/library/splitter": {
      "get": {
        "operationId": "get-library-splitter",
        "summary": "List file splitters",
        "description": "Lists file splitter definitions in the library, optionally filtered by vault (`vault=me` resolves to the caller's vault). Supports pagination, search, and ordering.",
        "tags": [
          "Library"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "required": true,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/searchSchema"
            }
          },
          {
            "in": "query",
            "name": "vault",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "ordering",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of splitters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibrarySplitterListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/library/workflow": {
      "get": {
        "operationId": "get-library-workflow",
        "summary": "List workflows in the library",
        "description": "List workflows in the library, optionally filtered by vault (`vault=me` resolves to the caller's vault). Supports pagination, search, and ordering.",
        "tags": [
          "Library"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "required": true,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/searchSchema"
            }
          },
          {
            "in": "query",
            "name": "vault",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "ordering",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 50
            }
          },
          {
            "in": "query",
            "name": "db_mode",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "in": "query",
            "name": "category",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of workflows",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryWorkflowListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-workspace-role": "reader",
        "x-trickest-permission": "Browse Trickest Library"
      }
    },
    "/library/splitter/{id}": {
      "get": {
        "operationId": "get-library-splitter-{id}",
        "summary": "Get a file splitter by id",
        "description": "Fetches a single file splitter definition by its id.",
        "tags": [
          "Library"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "Splitter details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibrarySplitterSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/library/workflow/{id}": {
      "get": {
        "operationId": "get-library-workflow-{id}",
        "summary": "Get a workflow by id",
        "description": "Fetches a single library workflow by its id.",
        "tags": [
          "Library"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "Workflow details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/library/workflow/{id}/copy": {
      "post": {
        "operationId": "post-library-workflow-{id}-copy",
        "summary": "Copy a library workflow",
        "description": "Copies a public library workflow into the user's workspace, optionally targeting a specific space and project.",
        "tags": [
          "Library"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/copyLibraryWorkflowSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Copied workflow",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-workspace-role": "writer",
        "x-trickest-permission": "Copy workflows from Library"
      }
    },
    "/library/module": {
      "get": {
        "operationId": "get-library-module",
        "summary": "List modules in the library",
        "description": "List modules in the library, optionally filtered by vault (`vault=me` resolves to the caller's vault). Supports pagination, search, and ordering.",
        "tags": [
          "Library - Modules"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "required": true,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/searchSchema"
            }
          },
          {
            "in": "query",
            "name": "vault",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "ordering",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of modules",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryModuleListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "operationId": "post-library-module",
        "summary": "Create a new module",
        "description": "Creates a new module workflow that can be edited and later used in other workflows.",
        "tags": [
          "Library - Modules"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createModuleSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created module",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryEntrySchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-vault-role": "owner",
        "x-trickest-permission": "Create and manage custom modules"
      }
    },
    "/library/resolve-module": {
      "post": {
        "operationId": "post-library-resolve-module",
        "summary": "Resolve a module node",
        "description": "Resolves a library module by name into a workflow node definition, optionally scoped to a vault and avoiding existing node-name collisions.",
        "tags": [
          "Library - Modules"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/resolveModuleSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resolved module node",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryResolveModuleResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/library/module/{id}": {
      "get": {
        "operationId": "get-library-module-{id}",
        "summary": "Get a module by id",
        "description": "Fetches a single library module by its id.",
        "tags": [
          "Library - Modules"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "Module details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryEntrySchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "patch": {
        "operationId": "patch-library-module-{id}",
        "summary": "Update an existing module",
        "description": "Updates a library module's name and/or description. Accepts PATCH only (PUT was removed in favor of REST norms; SDK/CLI clients already use PATCH).",
        "tags": [
          "Library - Modules"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateModuleSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated module",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryEntrySchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-vault-role": "owner",
        "x-trickest-permission": "Create and manage custom modules"
      },
      "delete": {
        "operationId": "delete-library-module-{id}",
        "summary": "Delete a module",
        "description": "Deletes a library module by its id.",
        "tags": [
          "Library - Modules"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "204": {
            "description": "Module deleted"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-vault-role": "owner",
        "x-trickest-permission": "Create and manage custom modules"
      }
    },
    "/library/module/latest": {
      "post": {
        "operationId": "post-library-module-latest",
        "summary": "Fetch latest versions of modules by ID.",
        "description": "Fetches the latest versions of modules by their IDs. Used to check if modules in a workflow are outdated.",
        "tags": [
          "Library - Modules"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/latestModuleVersionsSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Array of latest module definitions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryModuleLatestResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/scripts": {
      "post": {
        "operationId": "post-scripts",
        "summary": "Create a new private script in the user's vault.",
        "description": "Create a new private script in the user's vault.",
        "tags": [
          "Library - Scripts"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createScriptSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Script created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryEntrySchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/library/resolve-script": {
      "post": {
        "operationId": "post-library-resolve-script",
        "summary": "Resolve a script node",
        "description": "Resolves a library script for the given language into a workflow node definition, optionally scoped to a vault.",
        "tags": [
          "Library - Scripts"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/resolveScriptSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resolved script node",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryResolveScriptResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/library/script": {
      "get": {
        "operationId": "get-library-script",
        "summary": "List scripts in the library",
        "description": "List scripts in the library, optionally filtered by vault (`vault=me` resolves to the caller's vault) and public/private scope. Supports pagination, search, and ordering.",
        "tags": [
          "Library - Scripts"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "required": true,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/searchSchema"
            }
          },
          {
            "in": "query",
            "name": "vault",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "ordering",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 50
            }
          },
          {
            "in": "query",
            "name": "public",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of scripts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryScriptListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/scripts/{id}": {
      "get": {
        "operationId": "get-scripts-{id}",
        "summary": "Fetch a single script by ID for editing.",
        "description": "Fetch a single script by ID for editing.",
        "tags": [
          "Library - Scripts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "Script details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryEntrySchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "patch": {
        "operationId": "patch-scripts-{id}",
        "summary": "Update an existing script.",
        "description": "Update an existing script.",
        "tags": [
          "Library - Scripts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateScriptSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Script updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryEntrySchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "operationId": "delete-scripts-{id}",
        "summary": "Delete a script.",
        "description": "Delete a script.",
        "tags": [
          "Library - Scripts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "Script deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/library/script/{id}": {
      "get": {
        "operationId": "get-library-script-{id}",
        "summary": "Get a script by id",
        "description": "Fetches a single library script by its id.",
        "tags": [
          "Library - Scripts"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "Script details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryEntrySchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/tools": {
      "get": {
        "operationId": "get-tools",
        "summary": "List private tools for the current vault.",
        "description": "List private tools for the current vault.",
        "tags": [
          "Library - Tools"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "List of tools",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryToolListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "operationId": "post-tools",
        "summary": "Create a new private tool in the user's vault.",
        "description": "Create a new private tool in the user's vault.",
        "tags": [
          "Library - Tools"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createToolSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tool created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryEntrySchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/library/resolve-tool": {
      "post": {
        "operationId": "post-library-resolve-tool",
        "summary": "Resolve a tool node",
        "description": "Resolves a library tool by name into a workflow node definition, optionally scoped to a vault and avoiding existing node-name collisions.",
        "tags": [
          "Library - Tools"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/resolveToolSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resolved tool node",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryResolveToolResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/library/tool": {
      "get": {
        "operationId": "get-library-tool",
        "summary": "List tools in the library",
        "description": "List tools in the library, optionally filtered by category, vault (`vault=me` resolves to the caller's vault), and public/private scope. Supports pagination, search, and ordering.",
        "tags": [
          "Library - Tools"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "required": true,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/searchSchema"
            }
          },
          {
            "in": "query",
            "name": "vault",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "ordering",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 50
            }
          },
          {
            "in": "query",
            "name": "tool_category_name",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "public",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of tools",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryToolListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-workspace-role": "reader",
        "x-trickest-permission": "Browse Trickest Library"
      }
    },
    "/tools/{id}": {
      "get": {
        "operationId": "get-tools-{id}",
        "summary": "Fetch a single tool by ID for editing.",
        "description": "Fetch a single tool by ID for editing.",
        "tags": [
          "Library - Tools"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "Tool details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryEntrySchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "patch": {
        "operationId": "patch-tools-{id}",
        "summary": "Update an existing tool.",
        "description": "Update an existing tool.",
        "tags": [
          "Library - Tools"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateToolSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tool updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryEntrySchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "operationId": "delete-tools-{id}",
        "summary": "Delete a tool.",
        "description": "Delete a tool.",
        "tags": [
          "Library - Tools"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "Tool deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/library/tool/{id}": {
      "get": {
        "operationId": "get-library-tool-{id}",
        "summary": "Get a tool by id",
        "description": "Fetches a single library tool by its id.",
        "tags": [
          "Library - Tools"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "Tool details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryEntrySchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/library/tool/latest": {
      "post": {
        "operationId": "post-library-tool-latest",
        "summary": "Fetch latest versions of tools by name.",
        "description": "Fetches the latest versions of tools by their names. Used to check if tools in a workflow are outdated.",
        "tags": [
          "Library - Tools"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/latestToolVersionsSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Array of latest tool definitions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LibraryToolLatestResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/machines": {
      "get": {
        "operationId": "get-machines",
        "summary": "List machines for a fleet.",
        "description": "Get machines for a fleet. Requires fleet query param.",
        "tags": [
          "Machines"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "fleet",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of machines",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MachineListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "operationId": "post-machines",
        "summary": "Create a new machine in a fleet.",
        "description": "Create a new machine in a fleet.",
        "tags": [
          "Machines"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createMachineSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created machine",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MachineSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/machines/{id}": {
      "put": {
        "operationId": "put-machines-{id}",
        "summary": "Update a machine.",
        "description": "Update machine name.",
        "tags": [
          "Machines"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateMachineSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated machine",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MachineSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "operationId": "delete-machines-{id}",
        "summary": "Delete a machine.",
        "description": "Delete a machine by ID.",
        "tags": [
          "Machines"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "Machine deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/memory/backup": {
      "post": {
        "operationId": "post-memory-backup",
        "summary": "Backup agent memory.",
        "description": "Creates a backup of agent memory for the specified vault.",
        "tags": [
          "Memory"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "vault",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Memory backup data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/memory/export": {
      "post": {
        "operationId": "post-memory-export",
        "summary": "Export agent memory.",
        "description": "Exports agent memory in a portable format for the specified vault.",
        "tags": [
          "Memory"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "vault",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Exported memory data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/memory/import": {
      "post": {
        "operationId": "post-memory-import",
        "summary": "Import agent memory.",
        "description": "Imports agent memory from a portable format for the specified vault.",
        "tags": [
          "Memory"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "vault",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Import result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/memory/restore": {
      "post": {
        "operationId": "post-memory-restore",
        "summary": "Restore agent memory from backup.",
        "description": "Restores agent memory from a backup payload for the specified vault.",
        "tags": [
          "Memory"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "vault",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Restore result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/notification-config": {
      "get": {
        "operationId": "get-notification-config",
        "summary": "Get notification config",
        "description": "Fetches the current user's notification configuration. Returns an empty config when the user has none yet.",
        "tags": [
          "Notifications"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Notification configuration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationConfigResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "operationId": "put-notification-config",
        "summary": "Update notification config",
        "description": "Updates the current user's notification configuration (per-type email / in-app delivery preferences).",
        "tags": [
          "Notifications"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateNotificationConfigSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated notification configuration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationConfigResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/notifications": {
      "get": {
        "operationId": "get-notifications",
        "summary": "List notifications",
        "description": "Fetches the paginated list of notifications for the authenticated user.",
        "tags": [
          "Notifications"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Paginated list of notifications",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/notifications/{id}": {
      "put": {
        "operationId": "put-notifications-{id}",
        "summary": "Update notification",
        "description": "Updates a single notification by id, e.g. to mark it as seen.",
        "tags": [
          "Notifications"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateNotificationSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated notification",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "operationId": "delete-notifications-{id}",
        "summary": "Delete notification",
        "description": "Deletes a single notification by id.",
        "tags": [
          "Notifications"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "Notification deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/notifications/bulk-delete": {
      "post": {
        "operationId": "post-notifications-bulk-delete",
        "summary": "Bulk delete notifications.",
        "description": "Delete multiple notifications by their IDs.",
        "tags": [
          "Notifications"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/bulkDeleteSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Notifications deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/notifications/bulk-read": {
      "post": {
        "operationId": "post-notifications-bulk-read",
        "summary": "Mark multiple notifications as read.",
        "description": "Bulk mark notifications as read by their IDs.",
        "tags": [
          "Notifications"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/bulkReadSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Notifications marked as read",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/notifications/delete": {
      "delete": {
        "operationId": "delete-notifications-delete",
        "summary": "Delete all notifications",
        "description": "Deletes every notification belonging to the authenticated user.",
        "tags": [
          "Notifications"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "All notifications deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/notifications/read": {
      "put": {
        "operationId": "put-notifications-read",
        "summary": "Mark all notifications as read",
        "description": "Marks every notification belonging to the authenticated user as read.",
        "tags": [
          "Notifications"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "All notifications marked as read",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/notifications/settings": {
      "get": {
        "operationId": "get-notifications-settings",
        "summary": "Get notification settings",
        "description": "Returns the current notification settings for the authenticated user.",
        "tags": [
          "Notifications"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Notification settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationSettingsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "operationId": "put-notifications-settings",
        "summary": "Update notification settings",
        "description": "Updates notification settings for the authenticated user.",
        "tags": [
          "Notifications"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Updated notification settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationSettingsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/workspaces/{id}/projects/{projectId}/move": {
      "put": {
        "operationId": "put-workspaces-{id}-projects-{projectId}-move",
        "summary": "Move project to a different workspace",
        "description": "Moves a project and all its workflows to a different workspace.",
        "tags": [
          "Projects"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: projectId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/moveProjectSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project moved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/public/hive-api-base": {
      "get": {
        "operationId": "get-public-hive-api-base",
        "summary": "Get Hive API base for agent registration",
        "description": "Returns the Hive API origin this deployment uses (e.g. staging vs production). No auth — needed by the CLI installer before the agent has credentials.",
        "tags": [
          "Public"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Hive API base ({ apiBase })",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/rbac/vault/roles": {
      "get": {
        "operationId": "get-rbac-vault-roles",
        "summary": "Get current user's vault roles",
        "description": "Returns the authenticated user's role assignments for the current vault.",
        "tags": [
          "Rbac"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Current user's vault roles",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/rbac/spaces/{spaceId}/roles": {
      "get": {
        "operationId": "get-rbac-spaces-{spaceId}-roles",
        "summary": "Get current user's roles for a space",
        "description": "Returns the authenticated user's roles for the specified space (direct and team-inherited).",
        "tags": [
          "Rbac"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: spaceId"
          }
        ],
        "responses": {
          "200": {
            "description": "Current user's space roles",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/space-role/{spaceId}/add": {
      "post": {
        "operationId": "post-space-role-{spaceId}-add",
        "summary": "Add a user or team role to a space.",
        "description": "Add a user or team role to a space.",
        "tags": [
          "Roles"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: spaceId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/spaceRoleActionSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Role added",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-workspace-role": "owner",
        "x-trickest-permission": "Add and remove users and teams"
      }
    },
    "/space-role/{spaceId}/remove": {
      "delete": {
        "operationId": "delete-space-role-{spaceId}-remove",
        "summary": "Remove a user or team role from a space.",
        "description": "Remove a user or team role from a space.",
        "tags": [
          "Roles"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: spaceId"
          }
        ],
        "responses": {
          "200": {
            "description": "Role removed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-workspace-role": "owner",
        "x-trickest-permission": "Add and remove users and teams"
      }
    },
    "/vault-role/{vaultId}/add": {
      "post": {
        "operationId": "post-vault-role-{vaultId}-add",
        "summary": "Add a vault role to a user.",
        "description": "Add a vault role to a user.",
        "tags": [
          "Roles"
        ],
        "parameters": [
          {
            "name": "vaultId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: vaultId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/vaultRoleActionSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Role added",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/vault-role/{vaultId}/remove": {
      "delete": {
        "operationId": "delete-vault-role-{vaultId}-remove",
        "summary": "Remove a vault role from a user.",
        "description": "Remove a vault role from a user.",
        "tags": [
          "Roles"
        ],
        "parameters": [
          {
            "name": "vaultId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: vaultId"
          }
        ],
        "responses": {
          "200": {
            "description": "Role removed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/runs": {
      "get": {
        "operationId": "get-runs",
        "summary": "List runs (executions)",
        "description": "List workflow runs/executions with optional filtering by space, ordering, pagination.",
        "tags": [
          "Runs"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "required": true,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "ordering",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 50
            }
          },
          {
            "in": "query",
            "name": "vault",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "space",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 50
            }
          },
          {
            "in": "query",
            "name": "workflow",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/uuidSchema"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of runs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-workspace-role": "reader",
        "x-trickest-permission": "View workflow runs"
      },
      "post": {
        "operationId": "post-runs",
        "summary": "Create a new run (execute workflow)",
        "description": "Execute a workflow version. Supports input overrides, partial execution, and auto-update of nodes.",
        "tags": [
          "Runs"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createRunSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Run created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-workspace-role": "executor",
        "x-trickest-permission": "Execute workflows"
      }
    },
    "/runs/{id}": {
      "get": {
        "operationId": "get-runs-{id}",
        "summary": "Get run details",
        "description": "Fetch details for a specific run/execution by ID.",
        "tags": [
          "Runs"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "Run details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-workspace-role": "reader",
        "x-trickest-permission": "View workflow runs"
      },
      "delete": {
        "operationId": "delete-runs-{id}",
        "summary": "Delete a run",
        "description": "Delete a run/execution by ID. Returns 204 on success.",
        "tags": [
          "Runs"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "204": {
            "description": "Run deleted"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/vault/runs": {
      "get": {
        "operationId": "get-vault-runs",
        "summary": "List vault-wide runs",
        "description": "Returns all runs (executions) across every workspace in the vault, each enriched with its workspace metadata. Requires vault admin permissions (owner or space_admin).",
        "tags": [
          "Runs"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "required": true,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "ordering",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 50,
              "default": "-created_date"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "in": "query",
            "name": "workflow",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "workflow_name",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "created_date__gte",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 30
            }
          },
          {
            "in": "query",
            "name": "created_date__lte",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of vault-wide runs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaultRunListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-workspace-role": "reader",
        "x-trickest-permission": "View workflow runs"
      }
    },
    "/runs/{id}/ips": {
      "get": {
        "operationId": "get-runs-{id}-ips",
        "summary": "List a run's IP addresses",
        "description": "Get the IP addresses used by a run's execution.",
        "tags": [
          "Runs"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "IP addresses used by the run",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunIpsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/runs/{id}/retry": {
      "post": {
        "operationId": "post-runs-{id}-retry",
        "summary": "Retry a failed run",
        "description": "Retries a failed workflow execution by ID.",
        "tags": [
          "Runs"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "201": {
            "description": "Retried run",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/runs/{id}/stop": {
      "post": {
        "operationId": "post-runs-{id}-stop",
        "summary": "Stop a run",
        "description": "Stop a running execution by ID.",
        "tags": [
          "Runs"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "202": {
            "description": "Run is stopping",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/runs/{id}/subjobs": {
      "get": {
        "operationId": "get-runs-{id}-subjobs",
        "summary": "List a run's subjobs",
        "description": "List the subjobs (per-node executions) for a run. Node names are normalized from the backend's prefixed form.",
        "tags": [
          "Runs"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "page_size",
            "required": true,
            "schema": {
              "default": 500,
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of subjobs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunSubjobListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/runs/{id}/subjobs/{subjobId}": {
      "get": {
        "operationId": "get-runs-{id}-subjobs-{subjobId}",
        "summary": "Get subjob details",
        "description": "Fetch details for a single subjob within a run.",
        "tags": [
          "Runs"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          },
          {
            "name": "subjobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: subjobId"
          }
        ],
        "responses": {
          "200": {
            "description": "Subjob details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunSubjobSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/runs/outputs/{outputId}/content": {
      "get": {
        "operationId": "get-runs-outputs-{outputId}-content",
        "summary": "Get output file content",
        "description": "Returns the (optionally truncated) text content of an output file. Use the `maxBytes` query param to cap the returned slice.",
        "tags": [
          "Runs"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "maxBytes",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "path",
            "name": "outputId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "Inlined output file content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunOutputContentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/runs/{id}/nodes/{nodeName}/outputs": {
      "get": {
        "operationId": "get-runs-{id}-nodes-{nodeName}-outputs",
        "summary": "List a node's outputs",
        "description": "List output artifacts for a workflow node within a run. With `?hierarchy=` it returns module-outputs; otherwise it resolves node → subjob → subjob-output.",
        "tags": [
          "Runs"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "hierarchy",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          },
          {
            "in": "path",
            "name": "nodeName",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "example"
          }
        ],
        "responses": {
          "200": {
            "description": "Output artifacts for the node",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunNodeOutputsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/runs/{id}/subjobs/{subjobId}/children": {
      "get": {
        "operationId": "get-runs-{id}-subjobs-{subjobId}-children",
        "summary": "List a subjob's children",
        "description": "List the child subjobs (task group members) of a subjob within a run.",
        "tags": [
          "Runs"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "required": true,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 50
            }
          },
          {
            "in": "query",
            "name": "ordering",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 50
            }
          },
          {
            "in": "query",
            "name": "task_index",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          },
          {
            "in": "path",
            "name": "subjobId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of child subjobs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunSubjobListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/runs/{id}/subjobs/{subjobId}/console": {
      "get": {
        "operationId": "get-runs-{id}-subjobs-{subjobId}-console",
        "summary": "Get subjob console output",
        "description": "Fetch a subjob's console output for a given stream (stdout|stderr). `mode=live` returns in-progress logs; `mode=final` returns the completed log.",
        "tags": [
          "Runs"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "stream",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "stdout",
                "stderr"
              ]
            }
          },
          {
            "in": "query",
            "name": "mode",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "live",
                "final"
              ]
            }
          },
          {
            "in": "query",
            "name": "format",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "raw"
              ]
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          },
          {
            "in": "path",
            "name": "subjobId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "Console output for the requested stream",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubjobConsoleSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/runs/{id}/subjobs/{subjobId}/outputs": {
      "get": {
        "operationId": "get-runs-{id}-subjobs-{subjobId}-outputs",
        "summary": "List a subjob's outputs",
        "description": "List the output artifacts produced by a subjob within a run.",
        "tags": [
          "Runs"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "required": true,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "ordering",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 50,
              "default": "created_date"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          },
          {
            "in": "path",
            "name": "subjobId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of output artifacts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunSubjobOutputsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/runs/{id}/subjobs/{subjobId}/stop": {
      "post": {
        "operationId": "post-runs-{id}-subjobs-{subjobId}-stop",
        "summary": "Stop a subjob",
        "description": "Stop a running subjob within a run.",
        "tags": [
          "Runs"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          },
          {
            "name": "subjobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: subjobId"
          }
        ],
        "responses": {
          "202": {
            "description": "Subjob is stopping",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/runs/{id}/subjobs/{subjobId}/outputs/{outputId}/signed-url": {
      "get": {
        "operationId": "get-runs-{id}-subjobs-{subjobId}-outputs-{outputId}-signed-url",
        "summary": "Get a signed URL for an output",
        "description": "Returns a signed S3 URL (and size) for the output identified by the path params.",
        "tags": [
          "Runs"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          },
          {
            "name": "subjobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: subjobId"
          },
          {
            "name": "outputId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: outputId"
          }
        ],
        "responses": {
          "200": {
            "description": "Signed URL entry for the output file",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunSignedUrlResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/sandbox/command": {
      "post": {
        "operationId": "post-sandbox-command",
        "summary": "Run a sandbox command",
        "description": "Runs a shell command inside the caller's sandbox session and returns its exit code and output.",
        "tags": [
          "Sandbox"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/commandSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Command execution result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/sandbox/files": {
      "get": {
        "operationId": "get-sandbox-files",
        "summary": "List or read sandbox files",
        "description": "Lists files in a sandbox directory, or returns the content of a single file when a path is provided.",
        "tags": [
          "Sandbox"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "sessionId",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "path",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/filePathSchema"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "raw",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1",
                "true"
              ]
            }
          },
          {
            "in": "query",
            "name": "dir",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File listing or file content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "operationId": "put-sandbox-files",
        "summary": "Write sandbox file(s)",
        "description": "Writes a single file to the sandbox, or a batch of files when a `files` array is supplied, and broadcasts the change to peer tabs.",
        "tags": [
          "Sandbox"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/filesPutSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "File(s) written",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "operationId": "delete-sandbox-files",
        "summary": "Delete a sandbox file",
        "description": "Deletes a file at the given path in the sandbox and broadcasts the change to peer tabs.",
        "tags": [
          "Sandbox"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "sessionId",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/filePathSchema"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/sandbox/heartbeat": {
      "post": {
        "operationId": "post-sandbox-heartbeat",
        "summary": "Send a sandbox keep-alive heartbeat",
        "description": "Confirms the sandbox container is alive, extends its auto-stop timeout, and touches the session's last-heartbeat timestamp.",
        "tags": [
          "Sandbox"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/heartbeatBodySchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Heartbeat acknowledged",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/sandbox/session": {
      "post": {
        "operationId": "post-sandbox-session",
        "summary": "Provision a sandbox session",
        "description": "Returns 200 with a preview URL when the box is already ready or compiling (warm path). Otherwise kicks off the sandbox bring-up (VM + dev server) in the background and returns 202immediately; the client settles `ready`/`degraded` from the `sandbox_status` WS broadcast, with a status-poll fallback. Idempotent: a concurrent call joins the in-flight bring-up.",
        "tags": [
          "Sandbox"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/sessionBodySchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Already ready/compiling with preview URL (warm path)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "operationId": "delete-sandbox-session",
        "summary": "Stop a sandbox session",
        "description": "Stops (disposes) the sandbox session identified by sessionId. Disposable model: no FS snapshot; durable state lives in the workspace store.",
        "tags": [
          "Sandbox"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "sessionId",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "agentSessionId",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "vaultId",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sandbox session stopped",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/sandbox/status": {
      "get": {
        "operationId": "get-sandbox-status",
        "summary": "Get sandbox status",
        "description": "Returns the current lifecycle status for the caller's sandbox (workflow or scratch agent session) for cold-load reattach.",
        "tags": [
          "Sandbox"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "vaultId",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "workflowId",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "agentSessionId",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sandbox status snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/schedule": {
      "get": {
        "operationId": "get-schedule",
        "summary": "List schedules",
        "description": "Lists scheduled workflow runs, optionally filtered by vault.",
        "tags": [
          "Schedule"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "vault",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/uuidSchema"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of schedules",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "operationId": "post-schedule",
        "summary": "Create a schedule",
        "description": "Schedules a workflow run on a fleet at a given date, with optional repeat period and parallelism.",
        "tags": [
          "Schedule"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createScheduleSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created schedule",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/schedule/{id}": {
      "get": {
        "operationId": "get-schedule-{id}",
        "summary": "Get a schedule by ID",
        "description": "Fetches a single scheduled workflow run by its ID.",
        "tags": [
          "Schedule"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "Schedule details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "patch": {
        "operationId": "patch-schedule-{id}",
        "summary": "Update a schedule",
        "description": "Updates a schedule's active state or fields such as fleet, date, repeat period, and parallelism.",
        "tags": [
          "Schedule"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateScheduleSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated schedule",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "operationId": "delete-schedule-{id}",
        "summary": "Cancel a schedule",
        "description": "Cancels and deletes a scheduled workflow run by its ID.",
        "tags": [
          "Schedule"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/secret-variables": {
      "get": {
        "operationId": "get-secret-variables",
        "summary": "List secret variables",
        "description": "Lists secret variables filtered by scope_type (and optional space).",
        "tags": [
          "Secrets"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "List of secret variables",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "operationId": "post-secret-variables",
        "summary": "Create a secret variable",
        "description": "Creates a new secret variable with scope_type user or space.",
        "tags": [
          "Secrets"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createSecretVariableSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created secret variable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/secret-variables/{id}": {
      "patch": {
        "operationId": "patch-secret-variables-{id}",
        "summary": "Update a secret variable value",
        "description": "Updates the value of an existing secret variable.",
        "tags": [
          "Secrets"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateSecretVariableSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated secret variable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "operationId": "delete-secret-variables-{id}",
        "summary": "Delete a secret variable",
        "description": "Permanently deletes a secret variable.",
        "tags": [
          "Secrets"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "Secret variable deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/space-role/{spaceId}/list": {
      "get": {
        "operationId": "get-space-role-{spaceId}-list",
        "summary": "List roles for a space",
        "description": "List all user and team role assignments for the specified space.",
        "tags": [
          "Space-role"
        ],
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: spaceId"
          }
        ],
        "responses": {
          "200": {
            "description": "List of space role assignments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/storage/folders": {
      "get": {
        "operationId": "get-storage-folders",
        "summary": "List storage folders",
        "description": "Lists the authenticated user's virtual storage folders, optionally filtered by parent path, with per-folder file and child counts.",
        "tags": [
          "Storage"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "vaultId",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "parentPath",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of folders",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FolderListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "operationId": "post-storage-folders",
        "summary": "Create a storage folder",
        "description": "Creates a virtual storage folder (and any missing ancestors) at the given path.",
        "tags": [
          "Storage"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createFolderSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created folder; bespoke `{ folder }` / `{ message, path }` body, no entity schema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "patch": {
        "operationId": "patch-storage-folders",
        "summary": "Rename a storage folder",
        "description": "Renames a virtual storage folder and cascades the change to descendant folders and file associations.",
        "tags": [
          "Storage"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/renameFolderSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Renamed folder ({ success, oldPath, newPath }); bespoke body, no entity schema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "operationId": "delete-storage-folders",
        "summary": "Delete a storage folder",
        "description": "Deletes a virtual storage folder along with its descendant subfolders and their file associations.",
        "tags": [
          "Storage"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "vaultId",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Folder deleted; bespoke `{ success }` body, no entity schema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/teams": {
      "get": {
        "operationId": "get-teams",
        "summary": "List all teams in the current vault.",
        "description": "List all teams in the current vault.",
        "tags": [
          "Teams"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "page_size",
            "required": true,
            "schema": {
              "default": 500,
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of teams",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-vault-role": "space_admin",
        "x-trickest-permission": "View all platform users and teams"
      },
      "post": {
        "operationId": "post-teams",
        "summary": "Create a new team.",
        "description": "Create a new team in the current vault.",
        "tags": [
          "Teams"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createTeamSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created team",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-vault-role": "owner",
        "x-trickest-permission": "Create and manage teams"
      }
    },
    "/teams/{id}": {
      "get": {
        "operationId": "get-teams-{id}",
        "summary": "Get a specific team.",
        "description": "Fetch a single team by ID.",
        "tags": [
          "Teams"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "Team details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "operationId": "put-teams-{id}",
        "summary": "Update a team.",
        "description": "Update a team by ID.",
        "tags": [
          "Teams"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateTeamSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated team",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-vault-role": "owner",
        "x-trickest-permission": "Create and manage teams"
      },
      "delete": {
        "operationId": "delete-teams-{id}",
        "summary": "Delete a team.",
        "description": "Delete a team by ID.",
        "tags": [
          "Teams"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "Team deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-vault-role": "owner",
        "x-trickest-permission": "Create and manage teams"
      }
    },
    "/teams/{id}/members": {
      "get": {
        "operationId": "get-teams-{id}-members",
        "summary": "List all members of a team.",
        "description": "List all members of a team.",
        "tags": [
          "Teams"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "List of team members",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamMemberListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "operationId": "post-teams-{id}-members",
        "summary": "Add a member to a team.",
        "description": "Add a user to a team.",
        "tags": [
          "Teams"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/addTeamMemberSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Member added",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/teams/{id}/spaces": {
      "get": {
        "operationId": "get-teams-{id}-spaces",
        "summary": "List spaces associated with a team",
        "description": "List all spaces (workspaces) associated with the specified team.",
        "tags": [
          "Teams"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "List of team spaces",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/workspaceListResponseSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/teams/{id}/members/{userId}": {
      "delete": {
        "operationId": "delete-teams-{id}-members-{userId}",
        "summary": "Remove a member from a team",
        "description": "Remove a user from the specified team.",
        "tags": [
          "Teams"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: userId"
          }
        ],
        "responses": {
          "200": {
            "description": "Team member removed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/users": {
      "get": {
        "operationId": "get-users",
        "summary": "List users",
        "description": "Lists all users in the current vault. Supports pagination and search.",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "page_size",
            "required": true,
            "schema": {
              "default": 500,
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": true,
            "schema": {
              "type": "string",
              "default": ""
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of users",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-vault-role": "space_admin",
        "x-trickest-permission": "View all platform users and teams"
      }
    },
    "/users/{id}/activate": {
      "post": {
        "operationId": "post-users-{id}-activate",
        "summary": "Activate a user",
        "description": "Activates a user in the current vault. Requires vault admin permission.",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "User activated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/users/{id}/deactivate": {
      "post": {
        "operationId": "post-users-{id}-deactivate",
        "summary": "Deactivate a user",
        "description": "Deactivates a user in the current vault. Requires vault admin permission.",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "User deactivated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/users/me/token": {
      "get": {
        "operationId": "get-users-me-token",
        "summary": "Get API token",
        "description": "Returns the current user's API token.",
        "tags": [
          "Users"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "API token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-vault-role": "member",
        "x-trickest-permission": "Generate and manage personal API tokens"
      }
    },
    "/variables": {
      "get": {
        "operationId": "get-variables",
        "summary": "List global variables",
        "description": "Lists vault-scoped (global) variables for the current user.",
        "tags": [
          "Variables"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "List of variables",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VariableListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "operationId": "post-variables",
        "summary": "Create a global variable",
        "description": "Creates a new vault-scoped (global) variable with name and value.",
        "tags": [
          "Variables"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createVariableSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created variable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VariableSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/variables/{id}": {
      "get": {
        "operationId": "get-variables-{id}",
        "summary": "Get a variable by ID",
        "description": "Returns a single variable by its UUID.",
        "tags": [
          "Variables"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "Variable object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VariableSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "operationId": "put-variables-{id}",
        "summary": "Update a variable",
        "description": "Updates the value of an existing variable.",
        "tags": [
          "Variables"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateVariableSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated variable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VariableSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "operationId": "delete-variables-{id}",
        "summary": "Delete a variable",
        "description": "Permanently deletes a variable.",
        "tags": [
          "Variables"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "Variable deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/workspaces/{id}/variables": {
      "get": {
        "operationId": "get-workspaces-{id}-variables",
        "summary": "List workspace variables",
        "description": "Lists variables for the workspace (vault+space scoped). Backend returns both global and workspace variables; UI splits via is_global.",
        "tags": [
          "Variables"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "List of variables",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VariableListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-workspace-role": "reader",
        "x-trickest-permission": "View files and variables"
      },
      "post": {
        "operationId": "post-workspaces-{id}-variables",
        "summary": "Create a workspace variable",
        "description": "Creates a new workspace-scoped variable with name and value.",
        "tags": [
          "Variables"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createVariableSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created variable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VariableSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-workspace-role": "owner",
        "x-trickest-permission": "Manage variables"
      }
    },
    "/vault-role/{vaultId}/list": {
      "get": {
        "operationId": "get-vault-role-{vaultId}-list",
        "summary": "List vault roles",
        "description": "List all user role assignments for the specified vault.",
        "tags": [
          "Vault-role"
        ],
        "parameters": [
          {
            "name": "vaultId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: vaultId"
          }
        ],
        "responses": {
          "200": {
            "description": "List of vault role assignments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/versions/{id}": {
      "get": {
        "operationId": "get-versions-{id}",
        "summary": "Get a workflow version by ID",
        "description": "Fetches a specific workflow version by its ID.",
        "tags": [
          "Versions"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "Workflow version",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowVersionSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/vault/workflows": {
      "get": {
        "operationId": "get-vault-workflows",
        "summary": "List vault-wide workflows",
        "description": "Returns all workflows across every workspace in the vault, each enriched with workspace metadata and app/database flags. Requires vault admin permissions (owner or space_admin).",
        "tags": [
          "Workflows"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "required": true,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": true,
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "in": "query",
            "name": "ordering",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 50,
              "default": "-modified_date"
            }
          },
          {
            "in": "query",
            "name": "has_database",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of vault-wide workflows",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaultWorkflowListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-workspace-role": "reader",
        "x-trickest-permission": "View workflows"
      }
    },
    "/workflows/{id}": {
      "get": {
        "operationId": "get-workflows-{id}",
        "summary": "Get workflow",
        "description": "Fetch a single workflow by ID, enriched with app/database flags.",
        "tags": [
          "Workflows"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "Workflow details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-workspace-role": "reader",
        "x-trickest-permission": "View workflows"
      },
      "patch": {
        "operationId": "patch-workflows-{id}",
        "summary": "Update workflow",
        "description": "Update workflow metadata (name, description, project/space).",
        "tags": [
          "Workflows"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateWorkflowSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated workflow",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-workspace-role": "writer",
        "x-trickest-permission": "Create and update workflows"
      },
      "delete": {
        "operationId": "delete-workflows-{id}",
        "summary": "Delete workflow",
        "description": "Delete a workflow and clean up its solution, agent sessions, and table sources.",
        "tags": [
          "Workflows"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "Workflow deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/workflows/import-from-url": {
      "post": {
        "operationId": "post-workflows-import-from-url",
        "summary": "Import a workflow from a public JSON URL",
        "description": "Fetches a workflow graph from an allowlisted public URL and copies it, by value, into a fresh workflow in the caller's vault. Returns the new workflow id.",
        "tags": [
          "Workflows"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/importFromUrlSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created workflow reference",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/importFromUrlResponseSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/workflows/{id}/copy": {
      "post": {
        "operationId": "post-workflows-{id}-copy",
        "summary": "Copy workflow",
        "description": "Copy a workflow to a target workspace/project.",
        "tags": [
          "Workflows"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/copyWorkflowSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Copied workflow (new id and name)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowCopyResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/workflows/{id}/move": {
      "put": {
        "operationId": "put-workflows-{id}-move",
        "summary": "Move workflow",
        "description": "Move a workflow to a different workspace/project.",
        "tags": [
          "Workflows"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/moveWorkflowSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Moved workflow",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/workflows/{id}/runs": {
      "get": {
        "operationId": "get-workflows-{id}-runs",
        "summary": "List workflow runs",
        "description": "List runs (executions) for a workflow, paginated and ordered.",
        "tags": [
          "Workflows"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "required": true,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "ordering",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 50,
              "default": "-created_date"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of runs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRunListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-workspace-role": "reader",
        "x-trickest-permission": "View workflow runs"
      }
    },
    "/workflows/{id}/snapshots": {
      "get": {
        "operationId": "get-workflows-{id}-snapshots",
        "summary": "List snapshots",
        "description": "List all snapshots for a workflow.",
        "tags": [
          "Workflows"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "List of snapshots",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowSnapshotListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "operationId": "post-workflows-{id}-snapshots",
        "summary": "Create snapshot",
        "description": "Create a new workflow snapshot (a published version stored in the library).",
        "tags": [
          "Workflows"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createSnapshotSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowSnapshotSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/workflows/{id}/status": {
      "get": {
        "operationId": "get-workflows-{id}-status",
        "summary": "Get composite workflow status.",
        "description": "Returns workflow metadata, latest run status, and schedule info.",
        "tags": [
          "Workflows"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "Composite workflow status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowStatusResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/workflows/{id}/validate": {
      "post": {
        "operationId": "post-workflows-{id}-validate",
        "summary": "Validate a workflow for errors.",
        "description": "Triggers server-side validation of workflow nodes, connections, and configuration.",
        "tags": [
          "Workflows"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "Validation result with errors and warnings arrays",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowValidationResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/workflows/{id}/version": {
      "get": {
        "operationId": "get-workflows-{id}-version",
        "summary": "Get workflow version",
        "description": "Fetch the latest workflow version for a workflow.",
        "tags": [
          "Workflows"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "Latest workflow version",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowVersionSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "operationId": "post-workflows-{id}-version",
        "summary": "Save workflow version",
        "description": "Save a new workflow version (full save or snapshot).",
        "tags": [
          "Workflows"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/saveWorkflowVersionSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Saved workflow version",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowVersionSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/workspaces": {
      "get": {
        "operationId": "get-workspaces",
        "summary": "List workspaces for the current user's vault",
        "description": "Fetches all workspaces (spaces) for the authenticated user's vault. Supports pagination and playground filter.",
        "tags": [
          "Workspaces"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "required": true,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": true,
            "schema": {
              "default": 500,
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "in": "query",
            "name": "playground",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/booleanQuerySchema"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of workspaces",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/workspaceListResponseSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "operationId": "post-workspaces",
        "summary": "Create a new workspace",
        "description": "Creates a new workspace (space) in the user's vault with optional name, description, color, and playground flag.",
        "tags": [
          "Workspaces"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createWorkspaceSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-vault-role": "space_admin",
        "x-trickest-permission": "Create workspaces"
      }
    },
    "/workspaces/{id}": {
      "get": {
        "operationId": "get-workspaces-{id}",
        "summary": "Get a workspace by ID",
        "description": "Fetches a single workspace (space) by its ID.",
        "tags": [
          "Workspaces"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "Workspace details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "patch": {
        "operationId": "patch-workspaces-{id}",
        "summary": "Update a workspace",
        "description": "Updates workspace name, description, color, or playground flag.",
        "tags": [
          "Workspaces"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateWorkspaceSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "operationId": "delete-workspaces-{id}",
        "summary": "Delete a workspace",
        "description": "Permanently deletes a workspace (space).",
        "tags": [
          "Workspaces"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "responses": {
          "200": {
            "description": "Workspace deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-vault-role": "space_admin",
        "x-trickest-permission": "Delete workspaces"
      }
    },
    "/workspaces/{id}/projects": {
      "get": {
        "operationId": "get-workspaces-{id}-projects",
        "summary": "List projects in a workspace",
        "description": "Fetches all projects in the specified workspace with pagination, search, and ordering.",
        "tags": [
          "Workspaces"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "required": true,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": true,
            "schema": {
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": true,
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "in": "query",
            "name": "ordering",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 50,
              "default": "-modified_date"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of projects",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-workspace-role": "reader",
        "x-trickest-permission": "View projects"
      },
      "post": {
        "operationId": "post-workspaces-{id}-projects",
        "summary": "Create a project in a workspace",
        "description": "Creates a new project in the specified workspace with name and optional description.",
        "tags": [
          "Workspaces"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createProjectSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-workspace-role": "writer",
        "x-trickest-permission": "Create and edit projects"
      }
    },
    "/workspaces/{id}/solutions": {
      "get": {
        "operationId": "get-workspaces-{id}-solutions",
        "summary": "List solutions in a workspace",
        "description": "Fetches all solutions (reporting databases) in the specified workspace with pagination, search, and ordering.",
        "tags": [
          "Workspaces"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "page_size",
            "required": true,
            "schema": {
              "default": 200,
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": true,
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "in": "query",
            "name": "ordering",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 50,
              "default": "-modified_date"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of solutions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SolutionListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/workspaces/{id}/workflows": {
      "get": {
        "operationId": "get-workspaces-{id}-workflows",
        "summary": "List workflows in a workspace",
        "description": "Fetches all workflows in the workspace with pagination, search, ordering, and optional project filter. Enriches results with has_app and has_database flags.",
        "tags": [
          "Workspaces"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "required": true,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": true,
            "schema": {
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": true,
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "in": "query",
            "name": "ordering",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 50,
              "default": "-modified_date"
            }
          },
          {
            "in": "query",
            "name": "project",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 200,
              "default": ""
            }
          },
          {
            "in": "query",
            "name": "space_only",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/booleanQuerySchema"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/uuidSchema"
            },
            "example": "123"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of workflows with metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-workspace-role": "reader",
        "x-trickest-permission": "View workflows"
      },
      "post": {
        "operationId": "post-workspaces-{id}-workflows",
        "summary": "Create a workflow in a workspace",
        "description": "Creates a new workflow in the specified workspace with name, description, and optional project.",
        "tags": [
          "Workspaces"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createWsWorkflowSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created workflow",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-workspace-role": "writer",
        "x-trickest-permission": "Create and update workflows"
      }
    },
    "/workspaces/{id}/projects/{projectId}": {
      "get": {
        "operationId": "get-workspaces-{id}-projects-{projectId}",
        "summary": "Get a project by ID",
        "description": "Fetches a single project by its ID.",
        "tags": [
          "Workspaces"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: projectId"
          }
        ],
        "responses": {
          "200": {
            "description": "Project details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-workspace-role": "reader",
        "x-trickest-permission": "View projects"
      },
      "patch": {
        "operationId": "patch-workspaces-{id}-projects-{projectId}",
        "summary": "Update a project",
        "description": "Updates project name or description.",
        "tags": [
          "Workspaces"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: projectId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateProjectSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectSchema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        },
        "x-trickest-min-workspace-role": "writer",
        "x-trickest-permission": "Create and edit projects"
      },
      "delete": {
        "operationId": "delete-workspaces-{id}-projects-{projectId}",
        "summary": "Delete a project",
        "description": "Permanently deletes a project.",
        "tags": [
          "Workspaces"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: id"
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123,
            "description": "Path parameter: projectId"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Audit-logs"
    },
    {
      "name": "Auth"
    },
    {
      "name": "Billing"
    },
    {
      "name": "Database"
    },
    {
      "name": "Exports"
    },
    {
      "name": "Files"
    },
    {
      "name": "Fleets"
    },
    {
      "name": "Integrations"
    },
    {
      "name": "Invites"
    },
    {
      "name": "Ips"
    },
    {
      "name": "Library"
    },
    {
      "name": "Library - Modules"
    },
    {
      "name": "Library - Scripts"
    },
    {
      "name": "Library - Tools"
    },
    {
      "name": "Machines"
    },
    {
      "name": "Memory"
    },
    {
      "name": "Notifications"
    },
    {
      "name": "Projects"
    },
    {
      "name": "Public"
    },
    {
      "name": "Rbac"
    },
    {
      "name": "Roles"
    },
    {
      "name": "Runs"
    },
    {
      "name": "Sandbox"
    },
    {
      "name": "Schedule"
    },
    {
      "name": "Secrets"
    },
    {
      "name": "Space-role"
    },
    {
      "name": "Storage"
    },
    {
      "name": "Teams"
    },
    {
      "name": "Users"
    },
    {
      "name": "Variables"
    },
    {
      "name": "Vault-role"
    },
    {
      "name": "Versions"
    },
    {
      "name": "Workflows"
    },
    {
      "name": "Workspaces"
    }
  ],
  "security": [
    {
      "TokenAuth": []
    },
    {
      "BearerAuth": []
    }
  ],
  "x-trickest-roles": {
    "description": "Trickest authorizes with roles, not OAuth scopes. A vault role is global to the organization; a workspace role is scoped to one workspace and a user may hold a different one in each. Values are the wire values accepted by the role endpoints (`POST /vault-role/{vaultId}/add`, `POST /space-role/{spaceId}/add`) and returned by `GET /rbac/vault/roles`.",
    "documentation": "https://trickest.com/docs/key-concepts/roles-and-permissions",
    "enterpriseOnly": true,
    "vaultRoleSchema": "#/components/schemas/VaultRoleEnum",
    "workspaceRoleSchema": "#/components/schemas/SpaceRoleEnum",
    "vaultRoles": [
      {
        "value": "owner",
        "label": "Super Admin",
        "grants": [
          "Invite users to the platform",
          "Manage global settings (fleet, Docker registry)",
          "Create and manage teams",
          "Create and manage custom modules",
          "Access all workspaces",
          "View all platform users and teams",
          "Create workspaces",
          "Delete workspaces",
          "Manage personal account settings",
          "Generate and manage personal API tokens"
        ]
      },
      {
        "value": "space_admin",
        "label": "Workspace Admin",
        "grants": [
          "View all platform users and teams",
          "Create workspaces",
          "Delete workspaces",
          "Manage personal account settings",
          "Generate and manage personal API tokens"
        ]
      },
      {
        "value": "member",
        "label": "Member",
        "grants": [
          "Manage personal account settings",
          "Generate and manage personal API tokens"
        ]
      }
    ],
    "workspaceRoles": [
      {
        "value": "owner",
        "label": "Owner",
        "grants": [
          "Add and remove users and teams",
          "Manage variables",
          "Create and update workflows",
          "Copy workflows from Library",
          "Create and edit projects",
          "Execute workflows",
          "View workflows",
          "View projects",
          "View workflow runs",
          "View files and variables",
          "View solutions and solution data",
          "Browse Trickest Library"
        ]
      },
      {
        "value": "writer",
        "label": "Write",
        "grants": [
          "Create and update workflows",
          "Copy workflows from Library",
          "Create and edit projects",
          "Execute workflows",
          "View workflows",
          "View projects",
          "View workflow runs",
          "View files and variables",
          "View solutions and solution data",
          "Browse Trickest Library"
        ]
      },
      {
        "value": "executor",
        "label": "Execute",
        "grants": [
          "Execute workflows",
          "View workflows",
          "View projects",
          "View workflow runs",
          "View files and variables",
          "View solutions and solution data",
          "Browse Trickest Library"
        ]
      },
      {
        "value": "reader",
        "label": "Read",
        "grants": [
          "View workflows",
          "View projects",
          "View workflow runs",
          "View files and variables",
          "View solutions and solution data",
          "Browse Trickest Library"
        ]
      },
      {
        "value": "insights_reader",
        "label": "Insights Reader",
        "note": "Accepted by the role endpoints but not covered by the published permission matrix; its grant set is not documented here."
      }
    ],
    "inheritance": "A role may be assigned to a user directly or to a team the user belongs to. Effective permissions are the union of all applicable roles; when two roles cover the same resource, the more permissive one wins."
  }
}
