{
  "openapi": "3.1.0",
  "info": {
    "title": "Augmented Operations Management API",
    "version": "1.0.0",
    "description": "\n## Overview\n\nThis API provides backend services for the Augmented Decision Making application, focusing on the efficient scheduling and assignment of tasks **Operations** to a given **Resources**.\n\nThe system models the following key entities:\n*   **Locations:** Representing physical areas\n*   **Resources:** Specific assignable assets within a location.\n*   **Tasks:** Represent individual events, jobs. Tasks include detailed time information (planned, expected, actual) and model uncertainty using statistical parameters (sigma, skew factor, distribution mean/earliest/latest). Tasks also support versioning to track updates.\n*   **Operations:** Represent a complete operation, linking an inbound task to an outbound task. Operations contain relevant metadata.\n*   **Assignments:** Link an Operation to a specific Resource for a given time period.\n*   **Tags:** Can be used to restrict possible assignments as well as indicate preferences or penalties.\n*   **Rules:** Can be used to specify preferences or penalties in conjunction with the tagging mechanism.\n\n## Core Functionality\n\nThe API enables users and automated systems to:\n\n1.  **Manage Data:** Perform CRUD operations on Locations, Resources, Tasks, Operations, and Assignments.\n2.  **Track Operations Times:** Handle various time representations and update task details, including imposing delays. Task updates create new versions, preserving history.\n3.  **Assignments:** Assign or reassign operation to resources.\n4.  **Detect Conflicts:** Identify situations where an assigned conflicting (overlapping) with another based on their expected time windows.\n5.  **Resolve Conflicts:** Offer mechanisms to resolve individual scheduling conflicts through AI.\n6.   **Optimize Globally:** Offer global optimization of the schedule using various solvers to minimize conflicts and reassignments while optimizing for rules.\n7.  **AI Assistance:** Interact with an AI agent (via the `/agent/` endpoint) using natural language to query the schedule, identify conflicts, request moves, or trigger conflict resolution processes. The agent utilizes specialized tools to interact with the system's state.\n8.  **Real-time Updates:** Delivers real-time notifications about changes to Assignments and Operations via WebSockets to subscribed clients.\n9.  **Virtual State Management:** Allows temporary modifications to the schedule (virtual assignments) for \"what-if\" scenarios or agent-driven planning before potentially persisting changes.\n    "
  },
  "paths": {
    "/auth/internal/docs-only/token-claims/": {
      "get": {
        "operationId": "auth_internal_docs_only_token_claims_retrieve",
        "description": "Schema for the custom JWT claims included in access tokens. Docs-only endpoint; not used by the application at runtime.",
        "tags": [
          "Authentication"
        ],
        "security": [
          {
            "tokenAuth": []
          },
          {}
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenClaims"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/auth/login/": {
      "post": {
        "operationId": "auth_login_create",
        "description": "Takes a set of user credentials and returns an access and refresh JSON web\ntoken pair to prove the authentication of those credentials.",
        "tags": [
          "Authentication"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenObtainPair"
              }
            }
          },
          "required": true
        },
        "security": [
          {}
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenPair"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/auth/logout/": {
      "post": {
        "operationId": "auth_logout_create",
        "tags": [
          "Authentication"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenBlacklist"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenBlacklist"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/auth/oidc/exchange": {
      "post": {
        "operationId": "oidc_exchange",
        "description": "Exchanges a one-time LoginGrant `code` produced by the SPA OIDC callback for a pair of JWT access/refresh tokens and the current user payload. The code is single-use and expires after a short time window.",
        "summary": "Exchange OIDC LoginGrant code for JWTs",
        "tags": [
          "Authentication"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OIDCExchangeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OIDCExchangeResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                }
              }
            },
            "description": "Bad Request: OIDC login disabled, missing/invalid code, or expired LoginGrant."
          }
        }
      }
    },
    "/auth/refresh/": {
      "post": {
        "operationId": "auth_refresh_create",
        "description": "Takes a refresh type JSON web token and returns an access type JSON web\ntoken if the refresh token is valid.",
        "tags": [
          "Authentication"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenRefresh"
              }
            }
          },
          "required": true
        },
        "security": [
          {}
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenRefresh"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/v1/{entity_type}/{entity_id}/history/": {
      "get": {
        "operationId": "v1_history_retrieve",
        "description": "\n        Returns the version history for a specific entity instance.\n\n        Shows all historical states with timestamps, change authors, and\n        field-level diffs between versions.\n\n        If X-Workspace-Id header is provided, includes workspace draft\n        changes merged with mainline history. Workspace drafts appear\n        alongside mainline states (not replacing them).\n        ",
        "summary": "Get entity version history",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string"
            },
            "description": "Optional workspace UUID to include draft changes"
          },
          {
            "in": "path",
            "name": "entity_id",
            "schema": {
              "type": "string"
            },
            "description": "UUID of the entity",
            "required": true
          },
          {
            "in": "path",
            "name": "entity_type",
            "schema": {
              "type": "string",
              "enum": [
                "location",
                "operation",
                "resource",
                "rule",
                "tag",
                "task"
              ]
            },
            "description": "Entity type: operation, task, resource, location, rule, tag",
            "required": true
          },
          {
            "in": "query",
            "name": "include_diffs",
            "schema": {
              "type": "boolean"
            },
            "description": "Include field-level diffs (default true)"
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            },
            "description": "Maximum number of versions to return (default 50, max 200)"
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            },
            "description": "Pagination offset"
          }
        ],
        "tags": [
          "Entity History"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityHistory"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/assignments/": {
      "post": {
        "operationId": "v1_assignments_create",
        "description": "Creates a new assignment (with its parts) for an operation. If X-Workspace-Id header is set, creates in workspace (branch-on-first-write). Otherwise creates on mainline and deactivates any existing active assignment.",
        "summary": "Create Assignment",
        "tags": [
          "Assignments"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Assignment"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Assignment"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          }
        }
      }
    },
    "/v1/assignments/{id}/deactivate/": {
      "post": {
        "operationId": "v1_assignments_deactivate_create",
        "description": "Deactivates the active assignment for an operation. If X-Workspace-Id header is set, creates a tombstone in the workspace instead.",
        "summary": "Deactivate an assignment",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Assignments"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Assignment"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          }
        }
      }
    },
    "/v1/assignments/bulk/": {
      "post": {
        "operationId": "v1_assignments_bulk_create",
        "description": "Create multiple assignments in a single request.",
        "summary": "Bulk create assignments",
        "tags": [
          "Assignments"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AssignmentIn"
                }
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkCreateAssignmentsResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInputType": {
                    "value": {
                      "detail": "Invalid input. 'assignments' should be a list of objects."
                    },
                    "summary": "Error when 'assignments' is not a list"
                  },
                  "AssignmentValidationError": {
                    "value": {
                      "detail": {
                        "operation": [
                          "This field is required."
                        ]
                      }
                    },
                    "summary": "Error from AssignmentSerializer validation"
                  },
                  "ForeignKeyNotFound": {
                    "value": {
                      "detail": {
                        "parts": {
                          "0": {
                            "resource": [
                              "Unknown or no permission."
                            ]
                          }
                        }
                      }
                    },
                    "summary": "Invalid operation or part resource reference"
                  }
                }
              }
            },
            "description": "Bad Request: Invalid input format for 'assignments' list, validation error, or missing FK."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/locations/": {
      "post": {
        "operationId": "v1_locations_create",
        "description": "Creates a new location.",
        "summary": "Creates a new location",
        "tags": [
          "Locations"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Location"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Location"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/locations/{id}/": {
      "patch": {
        "operationId": "v1_locations_partial_update",
        "description": "Updates an existing location.",
        "summary": "Updates an existing location",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Locations"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedLocation"
              }
            }
          }
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Location"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/operation-groups/": {
      "post": {
        "operationId": "v1_operation_groups_create",
        "description": "Creates a new operation group associated with a planning.",
        "summary": "Creates a new operation group",
        "tags": [
          "Operation Groups"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OperationGroup"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationGroup"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/operation-groups/{id}/": {
      "get": {
        "operationId": "v1_operation_groups_retrieve",
        "description": "Lists all operations in an operation group.",
        "summary": "Get all operations in an operation group",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Operation Groups"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationGroup"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      },
      "patch": {
        "operationId": "v1_operation_groups_partial_update",
        "description": "Updates specific fields of the operation group.",
        "summary": "Update an operation group",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Operation Groups"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedOperationGroup"
              }
            }
          }
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationGroup"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      },
      "delete": {
        "operationId": "v1_operation_groups_destroy",
        "description": "Removes a grouping of operations. Leaves the operations itself untouched.",
        "summary": "Remove an operation group",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Operation Groups"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/operations/": {
      "post": {
        "operationId": "v1_operations_create",
        "description": "Creates operation.",
        "summary": "Create Operation",
        "tags": [
          "Operations"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WritableOperation"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/operations/{operation_id}/assignments/history/": {
      "get": {
        "operationId": "v1_operations_assignments_history_retrieve",
        "description": "\n        Returns the assignment version history for a specific operation.\n\n        Shows all historical assignment states with timestamps, who made\n        the assignment, and field-level diffs between versions.\n\n        If X-Workspace-Id header is provided, includes workspace draft\n        assignments merged with mainline history. Workspace drafts appear\n        alongside mainline assignments (not replacing them).\n        ",
        "summary": "Get operation assignment history",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "schema": {
              "type": "string"
            },
            "description": "Optional workspace UUID to include draft assignments"
          },
          {
            "in": "query",
            "name": "include_diffs",
            "schema": {
              "type": "boolean"
            },
            "description": "Include field-level diffs (default true)"
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            },
            "description": "Maximum number of versions to return (default 50, max 200)"
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            },
            "description": "Pagination offset"
          },
          {
            "in": "path",
            "name": "operation_id",
            "schema": {
              "type": "string"
            },
            "description": "UUID of the operation",
            "required": true
          }
        ],
        "tags": [
          "Assignment History"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssignmentHistory"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/operations/{id}/": {
      "get": {
        "operationId": "v1_operations_retrieve",
        "description": "Retrieves details of a specific operation by its UUID.",
        "summary": "Retrieve Operation",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Operations"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      },
      "patch": {
        "operationId": "v1_operations_partial_update",
        "description": "Updates specific fields of an operation, such as its metadata or task details (which creates new task versions).",
        "summary": "Partially Update Operation",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Operations"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedWritableOperation"
              }
            }
          }
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      },
      "delete": {
        "operationId": "v1_operations_destroy",
        "description": "Soft-deletes an operation by marking its active state as deleted.",
        "summary": "Delete Operation",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Operations"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/operations/{id}/assignment/": {
      "get": {
        "operationId": "v1_operations_assignment_retrieve",
        "description": "Returns *the* active assignment for the operation identified by `pk`.\n404 if the operation is currently unassigned.",
        "summary": "Get assignment for this operation",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Operations"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Assignment"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/operations/{id}/resolve-conflict-stream/part/{part_pk}/": {
      "post": {
        "operationId": "v1_operations_resolve_conflict_stream_part_create",
        "description": "Analyzes conflicts for a specific operation and streams potential resolution strategies (sets of moves) as NDJSON. Requires virtual state context.",
        "summary": "Resolve Conflict (Streaming)",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "part_pk",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Conflict Resolution"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConflictResolutionSchema"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "description": "A streaming response providing solutions incrementally in NDJSON format."
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidControls": {
                    "value": {
                      "detail": "Invalid controls data"
                    },
                    "summary": "Error validating controls data"
                  }
                }
              }
            },
            "description": "Bad Request: Invalid 'controls' data provided."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "OperationNotFound": {
                    "value": {
                      "detail": "Operation with ID <uuid> not found."
                    },
                    "summary": "Specific operation ID missing"
                  }
                }
              }
            },
            "description": "Not Found: The specified Operation ID does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/operations/{id}/resolve-conflict/part/{part_pk}/": {
      "post": {
        "operationId": "v1_operations_resolve_conflict_part_create",
        "description": "Analyzes conflicts for a specific operation within its time window and returns a list of potential resolution strategies (sets of moves). Requires virtual state context.",
        "summary": "Resolve Conflict (Non-Streaming)",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "part_pk",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Conflict Resolution"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConflictResolutionSchema"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConflictResolutionResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidControls": {
                    "value": {
                      "detail": "Invalid controls data"
                    },
                    "summary": "Error validating controls data"
                  }
                }
              }
            },
            "description": "Bad Request: Invalid 'controls' data provided."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "OperationNotFound": {
                    "value": {
                      "detail": "Operation with ID <uuid> not found."
                    },
                    "summary": "Specific operation ID missing"
                  }
                }
              }
            },
            "description": "Not Found: The specified Operation ID does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/operations/{id}/tasks/": {
      "get": {
        "operationId": "v1_operations_tasks_list",
        "description": "Extends WorkspaceMixin with serializer context for workspace-aware CRUD.",
        "summary": "Get task history for this operation",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Operations"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TaskStateRead"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/operations/bulk/": {
      "post": {
        "operationId": "v1_operations_bulk_create",
        "description": "Creates operations in bulk.",
        "summary": "Create Operations in bulk",
        "tags": [
          "Operations"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/WritableOperation"
                }
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      },
      "patch": {
        "operationId": "v1_operations_bulk_partial_update",
        "description": "Perform a bulk update for multiple operations. This endpoint is atomic; either all updates succeed or none do.",
        "summary": "Bulk partial update Operations",
        "tags": [
          "Operations"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchedWritableOperation"
                }
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Operation"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/organizations/": {
      "get": {
        "operationId": "v1_organizations_list",
        "description": "Get all organizations for the authenticated user.",
        "summary": "Get all organizations for the authenticated user",
        "tags": [
          "Organizations & Planning"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrganizationPlanning"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/organizations/{org_pk}/plannings/": {
      "get": {
        "operationId": "v1_organizations_plannings_list",
        "description": "Get all plannings for an organization.",
        "summary": "Get all plannings for an organization",
        "parameters": [
          {
            "in": "path",
            "name": "org_pk",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Organizations & Planning"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Planning"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      },
      "post": {
        "operationId": "v1_organizations_plannings_create",
        "description": "Creates a new planning associated with an organization.",
        "summary": "Creates a new planning for an organization",
        "parameters": [
          {
            "in": "path",
            "name": "org_pk",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Organizations & Planning"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Planning"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Planning"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/organizations/{org_pk}/plannings/{id}/": {
      "patch": {
        "operationId": "v1_organizations_plannings_partial_update",
        "description": "Updates an existing planning.",
        "summary": "Updates a planning",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "org_pk",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Organizations & Planning"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedPlanning"
              }
            }
          }
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Planning"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      },
      "delete": {
        "operationId": "v1_organizations_plannings_destroy",
        "description": "Deletes a planning and all associated resources.",
        "summary": "Delete a planning",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "org_pk",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Organizations & Planning"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/plannings/{id}/agent/": {
      "post": {
        "operationId": "v1_plannings_agent_create",
        "description": "Accepts chat history input and streams agent-generated responses in NDJSON format.",
        "summary": "Generate responses using an agent",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "AI Agent"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentSchema"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "description": "A streaming response providing agent-generated responses incrementally."
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidJSON": {
                    "value": {
                      "detail": "Invalid JSON"
                    },
                    "summary": "Malformed JSON request body"
                  },
                  "VirtualStateValidation": {
                    "value": {
                      "detail": "Validation Error: virtual_state.some_field - ..."
                    },
                    "summary": "Error validating virtual_state data"
                  }
                }
              }
            },
            "description": "Bad Request: Invalid JSON or structure for chat_history or virtual_state."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/plannings/{id}/assignments/": {
      "get": {
        "operationId": "v1_plannings_assignments_list",
        "description": "Extends WorkspaceMixin with serializer context for workspace-aware CRUD.",
        "parameters": [
          {
            "in": "query",
            "name": "active",
            "schema": {
              "type": "boolean",
              "default": true
            },
            "description": "Filter assignments by active status."
          },
          {
            "in": "query",
            "name": "end_timestamp",
            "schema": {
              "type": "integer"
            },
            "description": "End time for filtering assignments (Unix timestamp).",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "operation",
            "schema": {
              "type": "integer"
            },
            "description": "Filter by operation ID."
          },
          {
            "in": "query",
            "name": "range_field",
            "schema": {
              "enum": [
                "expectedTime95Interval",
                "expectedTime90Interval",
                "expectedTime",
                "scheduledTime"
              ],
              "type": "string",
              "default": "expectedTime95Interval",
              "minLength": 1
            },
            "description": "Which time reference to use for filtering operations. Options: 'expectedTime95Interval' (p05–p95), 'expectedTime90Interval' (p10–p90), 'expectedTime' (point estimate), 'scheduledTime' (planned time).\n\n* `expectedTime95Interval` - expectedTime95Interval\n* `expectedTime90Interval` - expectedTime90Interval\n* `expectedTime` - expectedTime\n* `scheduledTime` - scheduledTime"
          },
          {
            "in": "query",
            "name": "start_timestamp",
            "schema": {
              "type": "integer"
            },
            "description": "Start time for filtering assignments (Unix timestamp).",
            "required": true
          }
        ],
        "tags": [
          "Assignments"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Assignment"
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/v1/plannings/{id}/changesets/": {
      "get": {
        "operationId": "v1_plannings_changesets_retrieve",
        "description": "Returns compact changeset summaries for this planning (timestamp, status, source, and counts). Use the changeset detail endpoint for full per-entity diffs.",
        "summary": "List planning changesets (timeline)",
        "parameters": [
          {
            "in": "query",
            "name": "from_timestamp",
            "schema": {
              "type": "integer"
            },
            "description": "Only include changesets created at or after this Unix timestamp (seconds UTC)"
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            },
            "description": "Maximum number of changesets to return (default 100, max 200)"
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            },
            "description": "Pagination offset"
          },
          {
            "in": "query",
            "name": "scope",
            "schema": {
              "type": "string"
            },
            "description": "Scope of changesets: workspace, mainline, or both"
          },
          {
            "in": "query",
            "name": "to_timestamp",
            "schema": {
              "type": "integer"
            },
            "description": "Only include changesets created at or before this Unix timestamp (seconds UTC)"
          }
        ],
        "tags": [
          "Plannings"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanningChangesetList"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/plannings/{id}/changesets/{change_id}/": {
      "get": {
        "operationId": "v1_plannings_changesets_retrieve_2",
        "description": "Returns one changeset with full per-entity diffs for AuditLog expansion.",
        "summary": "Get planning changeset details",
        "parameters": [
          {
            "in": "path",
            "name": "change_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Plannings"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceChangeset"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/plannings/{id}/locations/": {
      "get": {
        "operationId": "v1_plannings_locations_list",
        "description": "List a nested result of locations and resources for a planning.",
        "summary": "Get all locations and resources for a planing",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Locations"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Location"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/plannings/{id}/meta/": {
      "get": {
        "operationId": "v1_plannings_meta_retrieve",
        "description": "Gets all metadata for a planning like solvers etc.",
        "summary": "Get all metadata for a planning",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Organizations & Planning"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanningMeta"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/plannings/{id}/metrics/": {
      "get": {
        "operationId": "v1_plannings_metrics_retrieve",
        "description": "Get metrics for the planning at a specific point in time. Use change_id to get metrics at a specific changeset (historical state). Use mainline=true to explicitly get mainline metrics (ignores workspace header). Omit both for current metrics (workspace if header provided, mainline otherwise).",
        "summary": "Get planning metrics",
        "parameters": [
          {
            "in": "query",
            "name": "change_id",
            "schema": {
              "type": "string"
            },
            "description": "Changeset UUID to get metrics at that point in time (omit for current state)"
          },
          {
            "in": "query",
            "name": "end_timestamp",
            "schema": {
              "type": "integer"
            },
            "description": "End of time window (Unix timestamp)",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "mainline",
            "schema": {
              "type": "boolean"
            },
            "description": "If true, return mainline metrics (ignores workspace header)"
          },
          {
            "in": "query",
            "name": "start_timestamp",
            "schema": {
              "type": "integer"
            },
            "description": "Start of time window (Unix timestamp)",
            "required": true
          }
        ],
        "tags": [
          "Plannings"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanningMetricsResponse"
                }
              }
            },
            "description": "Planning metrics"
          },
          "400": {
            "description": "Invalid parameters"
          },
          "404": {
            "description": "Changeset not found"
          }
        }
      }
    },
    "/v1/plannings/{id}/operation-groups/": {
      "get": {
        "operationId": "v1_plannings_operation_groups_list",
        "description": "Gets all operations in an operation group for a given planning.",
        "summary": "Get all operation groups for a given planning",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Operation Groups"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OperationGroup"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/plannings/{id}/operations/": {
      "get": {
        "operationId": "v1_plannings_operations_list",
        "description": "List operations, optionally filtering by a time window.\n\nQuery params:\n- `start_timestamp` / `end_timestamp` (Unix seconds, UTC). Both required to apply the window filter.\n- `range_field` (one of):\n    • `expectedTime95Interval` → inbound p05 ≤ end AND outbound p95 ≥ start\n    • `expectedTime90Interval` → inbound p10 ≤ end AND outbound p90 ≥ start\n    • `expectedTime`           → inbound expected ≤ end AND outbound expected ≥ start\n    • `scheduledTime`           → inbound scheduled ≤ end AND outbound scheduled ≥ start\n",
        "summary": "Get all operations for a planning",
        "parameters": [
          {
            "in": "query",
            "name": "end_timestamp",
            "schema": {
              "type": "integer"
            },
            "description": "End time for filtering operations (Unix timestamp, seconds).",
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "range_field",
            "schema": {
              "enum": [
                "expectedTime95Interval",
                "expectedTime90Interval",
                "expectedTime",
                "scheduledTime"
              ],
              "type": "string",
              "default": "expectedTime95Interval",
              "minLength": 1
            },
            "description": "Which time reference to use for filtering operations. \n\n* `expectedTime95Interval` - expectedTime95Interval\n* `expectedTime90Interval` - expectedTime90Interval\n* `expectedTime` - expectedTime\n* `scheduledTime` - scheduledTime"
          },
          {
            "in": "query",
            "name": "start_timestamp",
            "schema": {
              "type": "integer"
            },
            "description": "Start time for filtering operations (Unix timestamp, seconds).",
            "required": true
          }
        ],
        "tags": [
          "Operations"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Operation"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/plannings/{id}/operations/bulk-upload/": {
      "post": {
        "operationId": "v1_plannings_operations_bulk_upload_create",
        "description": "Allows uploading multiple operations to an organization and linking them to one or more plannings via their IDs.",
        "summary": "Bulk upload operations for one or more plannings",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Utility"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationBulkCreate"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Validation error (missing fields, invalid IDs, or duplicate external_ids)."
                }
              }
            },
            "description": ""
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Internal server error."
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/v1/plannings/{id}/operations/search/": {
      "post": {
        "operationId": "v1_plannings_operations_search_create",
        "description": "Search within a planning by external_id.",
        "summary": "Search operations (simple)",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Operations"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OperationSearch"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Operation"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/plannings/{id}/optimization-task-results/": {
      "get": {
        "operationId": "v1_plannings_optimization_task_results_list",
        "description": "Get all tasks for a planning.",
        "summary": "Get all tasks for a planning",
        "parameters": [
          {
            "in": "query",
            "name": "end_timestamp",
            "schema": {
              "type": "integer"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "start_timestamp",
            "schema": {
              "type": "integer"
            },
            "required": true
          }
        ],
        "tags": [
          "Optimization"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OptimizationTaskResultWrapper"
                  }
                }
              }
            },
            "description": "Task status and result (if ready)"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                }
              }
            },
            "description": "Bad Request: Invalid input."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/plannings/{id}/optimization-task-results/{task_id}/": {
      "patch": {
        "operationId": "v1_plannings_optimization_task_results_partial_update",
        "description": "Updates an optimization task. Warning: this cannot be used to change the parameters of already running or starting tasks.",
        "summary": "Update an optimization task.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "task_id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "Optimization"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedOptimizationTaskResult"
              }
            }
          }
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OptimizationTaskResultWrapper"
                }
              }
            },
            "description": "Task status and result (if ready)"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                }
              }
            },
            "description": "Bad Request: Invalid input."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      },
      "delete": {
        "operationId": "v1_plannings_optimization_task_results_destroy",
        "description": "Deletes an optimization task result. Warning: this will not kill your running task in the background.",
        "summary": "Delete an optimization task result",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "task_id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "Optimization"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/plannings/{id}/optimization-task-results/{task_id}/data/": {
      "get": {
        "operationId": "v1_plannings_optimization_task_results_data_retrieve",
        "description": "Get the solver data for a task.",
        "summary": "Get the solver data for a task",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "task_id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "Optimization"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SolverDownloadResponseSchema"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/plannings/{id}/optimization-task-results/{task_id}/result/": {
      "post": {
        "operationId": "v1_plannings_optimization_task_results_result_create",
        "description": "Webhook endpoint for the solver to submit the final result payload. Requires Webhook auth. Body should be the raw solver output JSON.",
        "summary": "Submit final optimization result",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "task_id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "Optimization"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OptimizationTaskResultWrapper"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/v1/plannings/{id}/optimize/": {
      "post": {
        "operationId": "v1_plannings_optimize_create",
        "description": "Start a task to optimize all assignments in a planning.",
        "summary": "Optimize a plan",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Optimization"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VirtualStateInput"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskSubmissionResponse"
                },
                "examples": {
                  "Success": {
                    "value": {
                      "task_id": "abc123"
                    }
                  }
                }
              }
            },
            "description": "Returns task ID for polling"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                }
              }
            },
            "description": "Bad Request: Invalid input."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/plannings/{id}/preferences/": {
      "get": {
        "operationId": "v1_plannings_preferences_retrieve",
        "description": "Returns the current user's preferences for this planning. Auto-creates empty preferences if none exist.",
        "summary": "Get preferences for a planning",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Users"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserPlanningPreference"
                }
              }
            },
            "description": ""
          }
        }
      },
      "put": {
        "operationId": "v1_plannings_preferences_update",
        "description": "Creates or replaces the current user's preferences for this planning.",
        "summary": "Save preferences for a planning",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Users"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserPlanningPreference"
              }
            }
          }
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserPlanningPreference"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/v1/plannings/{id}/resources/": {
      "get": {
        "operationId": "v1_plannings_resources_list",
        "description": "List all resources for a planning.",
        "summary": "Get all resources for a planning",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Resources"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ResourceRead"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/plannings/{id}/rules/": {
      "get": {
        "operationId": "v1_plannings_rules_list",
        "description": "Lists all rules for a planning. Note that while tags are bound to an organization, rules are planning specific. This distinction is there because the same resource can be used in multiple plannings.",
        "summary": "Get all rules for a planning",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Rules"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Rule"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/plannings/{id}/tags/": {
      "get": {
        "operationId": "v1_plannings_tags_list",
        "description": "Lists all tags for a planning.",
        "summary": "Get all tags for a planning",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "planningId",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Optional. When supplied, return **only** the tags that are actually referenced inside the given planning (operations, resources or rules)."
          }
        ],
        "tags": [
          "Tags"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Tag"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/plannings/{id}/tasks/": {
      "get": {
        "operationId": "v1_plannings_tasks_list",
        "description": "List tasks for a planning filtered by external_id. The external_id parameter is required. Supports workspace overlay.",
        "summary": "List tasks by external_id",
        "parameters": [
          {
            "in": "query",
            "name": "external_id",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Tasks"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Task"
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/v1/plannings/{id}/workspaces/": {
      "get": {
        "operationId": "v1_plannings_workspaces_list",
        "description": "Returns all workspaces (draft, merged, archived) for the planning.",
        "summary": "List workspaces for a planning",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Workspaces"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Workspace"
                  }
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      },
      "post": {
        "operationId": "v1_plannings_workspaces_create",
        "description": "Creates a new draft workspace for the planning.",
        "summary": "Create a new workspace",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Workspaces"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceCreate"
              }
            }
          }
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/plannings/{id}/workspaces/{workspace_pk}/": {
      "get": {
        "operationId": "v1_plannings_workspaces_retrieve",
        "description": "Returns details for a specific workspace.",
        "summary": "Get workspace details",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "workspace_pk",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Workspaces"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      },
      "patch": {
        "operationId": "v1_plannings_workspaces_partial_update",
        "description": "Updates workspace name or description.",
        "summary": "Update workspace",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "workspace_pk",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Workspaces"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedWorkspace"
              }
            }
          }
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      },
      "delete": {
        "operationId": "v1_plannings_workspaces_destroy",
        "description": "Archives a workspace (soft delete). Archived workspaces cannot be modified.",
        "summary": "Archive workspace",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "workspace_pk",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Workspaces"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Workspace archived"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/plannings/{id}/workspaces/{workspace_pk}/changesets/{change_id}/undo/": {
      "post": {
        "operationId": "v1_plannings_workspaces_changesets_undo_create",
        "description": "ViewSet for managing workspaces within a planning.\n\nWorkspaces allow users to make draft changes to assignments, operations,\nand other planning data without affecting the mainline state. Changes\ncan be merged to mainline when ready.",
        "summary": "Undo a specific workspace changeset",
        "parameters": [
          {
            "in": "path",
            "name": "change_id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "workspace_pk",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Workspaces"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceUndoResponse"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "409": {
            "description": "Changeset already undone"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/plannings/{id}/workspaces/{workspace_pk}/diff/": {
      "get": {
        "operationId": "v1_plannings_workspaces_diff_retrieve",
        "description": "Returns a summary of changes introduced by this workspace compared to mainline. Primarily used by the frontend AuditLog.",
        "summary": "Get workspace diff (vs mainline)",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "workspace_pk",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Workspaces"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceDiff"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/plannings/{id}/workspaces/{workspace_pk}/discard/": {
      "post": {
        "operationId": "v1_plannings_workspaces_discard_create",
        "description": "\n        Discards all workspace changes without merging.\n        This operation:\n        1. Closes all workspace state rows (marks as deleted)\n        2. Updates workspace status to 'archived'\n        ",
        "summary": "Discard workspace changes",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "workspace_pk",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Workspaces"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/plannings/{id}/workspaces/{workspace_pk}/merge/": {
      "post": {
        "operationId": "v1_plannings_workspaces_merge_create",
        "description": "\n        Merges all workspace changes to mainline.\n        This operation:\n        1. Copies all workspace state rows to mainline (workspace=None)\n        2. Closes the workspace state rows\n        3. Updates workspace status to 'merged'\n        Requires mainline write permission.\n        ",
        "summary": "Merge workspace to mainline",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "workspace_pk",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Workspaces"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/resources/": {
      "post": {
        "operationId": "v1_resources_create",
        "description": "Creates a new resource associated with a location.",
        "summary": "Create Resource",
        "tags": [
          "Resources"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WritableResource"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceRead"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/resources/{id}/": {
      "patch": {
        "operationId": "v1_resources_partial_update",
        "description": "Updates specific fields of a resource (e.g., name, ordering, tags).",
        "summary": "Partially Update Resource",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Resources"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedWritableResource"
              }
            }
          }
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceRead"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      },
      "delete": {
        "operationId": "v1_resources_destroy",
        "description": "Marks a resource as deleted (soft delete). Also deactivates any active assignments associated with this resource.",
        "summary": "Delete Resource",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Resources"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/rules/": {
      "post": {
        "operationId": "v1_rules_create",
        "description": "Creates a new rule.",
        "summary": "Creates a new rule",
        "tags": [
          "Rules"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WritableRule"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Rule"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/rules/{uuid}/": {
      "patch": {
        "operationId": "v1_rules_partial_update",
        "description": "Updates specific fields of a rule.",
        "summary": "Partially update a rule",
        "parameters": [
          {
            "in": "path",
            "name": "uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Rules"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedWritableRule"
              }
            }
          }
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Rule"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      },
      "delete": {
        "operationId": "v1_rules_destroy",
        "description": "Deletes a rule.",
        "summary": "Delete a rule",
        "parameters": [
          {
            "in": "path",
            "name": "uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Rules"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/rules/validate/": {
      "post": {
        "operationId": "v1_rules_validate_create",
        "description": "Validates a rule without creating one.",
        "summary": "Validates a rule without creating one",
        "tags": [
          "Rules"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WritableRule"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "No Content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/tags/": {
      "post": {
        "operationId": "v1_tags_create",
        "description": "Creates a new tag.",
        "summary": "Creates a new tag",
        "tags": [
          "Tags"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WritableTag"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tag"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/tags/{uuid}/": {
      "patch": {
        "operationId": "v1_tags_partial_update",
        "description": "Helpers for workspace-aware StableEntity CRUD writes.\n\nContract:\n- Reads may target any non-archived workspace (middleware validated).\n- Writes must target a DRAFT workspace (enforced via get_workspace_for_write()).",
        "parameters": [
          {
            "in": "path",
            "name": "uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Tags"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedWritableTag"
              }
            }
          }
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WritableTag"
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "v1_tags_destroy",
        "description": "Deletes a tag.",
        "summary": "Delete a tag",
        "parameters": [
          {
            "in": "path",
            "name": "uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Tags"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/tasks/": {
      "post": {
        "operationId": "v1_tasks_create",
        "description": "Create a task without an operation. The task can be linked to an operation later. Supports workspace overlay.",
        "summary": "Create task",
        "tags": [
          "Tasks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskWrite"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/tasks/{id}/": {
      "get": {
        "operationId": "v1_tasks_retrieve",
        "description": "Get a single task by ID.",
        "summary": "Retrieve Task",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Tasks"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      },
      "patch": {
        "operationId": "v1_tasks_partial_update",
        "description": "Update task fields (expected times, tags, etc.). Supports workspace overlay.",
        "summary": "Update Task",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Tasks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedTaskWrite"
              }
            }
          }
        },
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      },
      "delete": {
        "operationId": "v1_tasks_destroy",
        "description": "Soft-delete a task by marking its state as deleted. Supports workspace overlay.",
        "summary": "Delete Task",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Tasks"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "InvalidInput": {
                    "value": {
                      "detail": "Invalid input."
                    },
                    "summary": "Error due to invalid input data"
                  },
                  "ValidationError": {
                    "value": {
                      "field_name": [
                        "This field is required."
                      ]
                    },
                    "summary": "Error due to failed validation"
                  }
                }
              }
            },
            "description": "Bad Request: The request could not be understood or was missing required parameters/data."
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "403": {
            "description": "Forbidden: You do not have permission to perform this action."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ResourceNotFound": {
                    "value": {
                      "detail": "Not found."
                    },
                    "summary": "Generic 404 error"
                  }
                }
              }
            },
            "description": "Not Found: The requested resource could not be found."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    },
    "/v1/user/current/": {
      "get": {
        "operationId": "v1_user_current_retrieve",
        "description": "Retrieves the details of the currently authenticated user.",
        "summary": "Get Current User",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            },
            "description": ""
          },
          "401": {
            "description": "Unauthorized: Authentication credentials were not provided or were invalid."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "examples": {
                  "ServerError": {
                    "value": {
                      "detail": "An internal server error occurred."
                    },
                    "summary": "Generic server error"
                  }
                }
              }
            },
            "description": "Internal Server Error: An unexpected error occurred on the server."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AgentSchema": {
        "properties": {
          "chat_history": {
            "items": {
              "$ref": "#/components/schemas/ChatMessage"
            },
            "title": "Chat History",
            "type": "array"
          },
          "virtual_state": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AviationVirtualStateInput"
              },
              {
                "$ref": "#/components/schemas/MaritimeBerthVirtualStateInput"
              },
              {
                "$ref": "#/components/schemas/VirtualStateInput"
              }
            ],
            "title": "Virtual State"
          }
        },
        "required": [
          "chat_history",
          "virtual_state"
        ],
        "title": "AgentSchema",
        "type": "object"
      },
      "Assignment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "operation": {
            "type": "string",
            "format": "uuid"
          },
          "planning": {
            "type": "string",
            "format": "uuid"
          },
          "parts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AssignmentPart"
            }
          },
          "assignedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true
          },
          "validTo": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true
          },
          "assignedBy": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true
          },
          "workspace": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true
          },
          "tombstone": {
            "type": "boolean",
            "readOnly": true
          }
        },
        "required": [
          "assignedAt",
          "assignedBy",
          "operation",
          "parts",
          "planning",
          "tombstone",
          "validTo",
          "workspace"
        ]
      },
      "AssignmentDiff": {
        "properties": {
          "part": {
            "title": "Part",
            "type": "string"
          },
          "operation": {
            "title": "Operation",
            "type": "string"
          },
          "old_resource": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Old Resource"
          },
          "new_resource": {
            "title": "New Resource",
            "type": "string"
          }
        },
        "required": [
          "part",
          "operation",
          "old_resource",
          "new_resource"
        ],
        "title": "AssignmentDiff",
        "type": "object"
      },
      "AssignmentHistory": {
        "type": "object",
        "description": "Response serializer for assignment history endpoint.",
        "properties": {
          "operationId": {
            "type": "string",
            "format": "uuid"
          },
          "workspace": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "total": {
            "type": "integer"
          },
          "versions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AssignmentHistoryVersion"
            }
          }
        },
        "required": [
          "operationId",
          "total",
          "versions",
          "workspace"
        ]
      },
      "AssignmentHistoryVersion": {
        "type": "object",
        "description": "Single version entry in assignment history.",
        "properties": {
          "assignmentId": {
            "type": "string",
            "format": "uuid"
          },
          "validFrom": {
            "type": "string",
            "format": "date-time"
          },
          "validTo": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "changeId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "closedByChangeId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "changeType": {
            "$ref": "#/components/schemas/ChangeTypeEnum"
          },
          "source": {
            "$ref": "#/components/schemas/SourceEnum"
          },
          "assignedBy": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/User"
              },
              {
                "type": "null"
              }
            ]
          },
          "tombstone": {
            "type": "boolean"
          },
          "before": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ]
          },
          "after": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ]
          },
          "changes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StateDiffChange"
            }
          }
        },
        "required": [
          "after",
          "assignedBy",
          "assignmentId",
          "before",
          "changeId",
          "changeType",
          "changes",
          "source",
          "tombstone",
          "validFrom",
          "validTo"
        ]
      },
      "AssignmentIn": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "planning": {
            "type": "string",
            "format": "uuid"
          },
          "operation": {
            "type": "string",
            "format": "uuid"
          },
          "parts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AssignmentPartWrite"
            }
          }
        },
        "required": [
          "operation",
          "parts",
          "planning"
        ]
      },
      "AssignmentPart": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "startAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "endAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "resource": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "isFixed": {
            "type": "boolean"
          },
          "metadata": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/MaritimeBerthAssignmentMetadataSchema"
              }
            ]
          }
        },
        "required": [
          "id"
        ]
      },
      "AssignmentPartWrite": {
        "type": "object",
        "description": "Serializer for assignment part input (create/update).\n\nUsed by both the API (bulk assignments) and internal paths (solver results).\nHandles camelCase → snake_case mapping and provides defaults for optional fields.",
        "properties": {
          "startAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "endAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "resource": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "metadata": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/MaritimeBerthAssignmentMetadataSchema"
              }
            ]
          },
          "isFixed": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "AviationControlPanelState": {
        "properties": {
          "attach_callback": {
            "default": true,
            "description": "Whether to attach a callback to the solver for live updates",
            "title": "Attach Callback",
            "type": "boolean"
          },
          "resolution_balance": {
            "description": "0 strives for minimal conflicts whereas 1 strives for minimal overlap",
            "title": "Resolution Balance",
            "type": "number"
          },
          "rule_adherence": {
            "description": "0 strives for the goal of the strategy, while 1 strives for optimal rule value",
            "title": "Rule Adherence",
            "type": "number"
          },
          "max_runtime": {
            "default": 60,
            "description": "Maximum runtime in seconds for the solver, default is 90 seconds",
            "title": "Max Runtime",
            "type": "integer"
          },
          "optimality_gap": {
            "default": 0,
            "description": "The acceptable optimality gap for the solver, default is 0",
            "title": "Optimality Gap",
            "type": "number"
          },
          "strategy": {
            "$ref": "#/components/schemas/AviationSolutionStrategy"
          },
          "ignore_freeze_and_past": {
            "default": false,
            "description": "Ignore freeze window and allow edits in the past",
            "title": "Ignore Freeze And Past",
            "type": "boolean"
          },
          "lock_left_edge": {
            "default": true,
            "description": "Lock assignments that cross the left edge of the display window",
            "title": "Lock Left Edge",
            "type": "boolean"
          },
          "lock_right_edge": {
            "default": true,
            "description": "Lock assignments that cross the right edge of the display window",
            "title": "Lock Right Edge",
            "type": "boolean"
          },
          "restrict_moves_to_same_location": {
            "default": true,
            "description": "Restrict candidate resources to the same location as the current assignment",
            "title": "Restrict Moves To Same Location",
            "type": "boolean"
          }
        },
        "required": [
          "resolution_balance",
          "rule_adherence",
          "strategy"
        ],
        "title": "AviationControlPanelState",
        "type": "object"
      },
      "AviationSolutionStrategy": {
        "enum": [
          "default",
          "least_moves",
          "max_resilience"
        ],
        "title": "AviationSolutionStrategy",
        "type": "string"
      },
      "AviationStandDemoOperationMetadataSchema": {
        "additionalProperties": false,
        "properties": {
          "kind": {
            "const": "aviation_stand_demo",
            "title": "Kind",
            "type": "string"
          },
          "airline": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Airline"
          },
          "airline_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Airline Code"
          },
          "aircraft_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Aircraft Type"
          },
          "location_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Location Code"
          },
          "origin_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Origin Code"
          },
          "destination_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Destination Code"
          },
          "wingspan": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Wingspan"
          },
          "ground_handler": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Ground Handler"
          },
          "ac_reg": {
            "title": "Ac Reg",
            "type": "string"
          },
          "etot": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Etot"
          },
          "eldt": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Eldt"
          },
          "tobt": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Tobt"
          },
          "pegt": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Pegt"
          }
        },
        "required": [
          "kind",
          "ac_reg"
        ],
        "title": "AviationStandDemoOperationMetadataSchema",
        "type": "object"
      },
      "AviationStandDemoResourceMetadataSchema": {
        "additionalProperties": false,
        "properties": {
          "kind": {
            "const": "aviation_stand_demo",
            "title": "Kind",
            "type": "string"
          },
          "radius": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Radius"
          }
        },
        "required": [
          "kind"
        ],
        "title": "AviationStandDemoResourceMetadataSchema",
        "type": "object"
      },
      "AviationStandDemoTaskMetadataSchema": {
        "additionalProperties": false,
        "properties": {
          "kind": {
            "const": "aviation_stand_demo",
            "title": "Kind",
            "type": "string"
          },
          "airline": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Airline"
          },
          "airline_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Airline Code"
          },
          "od_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Od Code"
          },
          "ac_reg": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Ac Reg"
          },
          "aircraft_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Aircraft Type"
          },
          "cat": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Cat"
          },
          "ground_handler": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Ground Handler"
          }
        },
        "required": [
          "kind"
        ],
        "title": "AviationStandDemoTaskMetadataSchema",
        "type": "object"
      },
      "AviationStandOperationMetadataSchema": {
        "additionalProperties": false,
        "properties": {
          "kind": {
            "const": "aviation_stand",
            "title": "Kind",
            "type": "string"
          },
          "airline": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Airline"
          },
          "airline_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Airline Code"
          },
          "aircraft_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Aircraft Type"
          },
          "location_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Location Code"
          },
          "origin_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Origin Code"
          },
          "destination_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Destination Code"
          },
          "wingspan": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Wingspan"
          },
          "ground_handler": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Ground Handler"
          },
          "ac_reg": {
            "title": "Ac Reg",
            "type": "string"
          },
          "etot": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Etot"
          },
          "eldt": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Eldt"
          },
          "tobt": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Tobt"
          },
          "pegt": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Pegt"
          }
        },
        "required": [
          "kind",
          "ac_reg"
        ],
        "title": "AviationStandOperationMetadataSchema",
        "type": "object"
      },
      "AviationStandResourceMetadataSchema": {
        "additionalProperties": false,
        "description": "Input schema for stands metadata.",
        "properties": {
          "kind": {
            "const": "aviation_stand",
            "title": "Kind",
            "type": "string"
          },
          "radius": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Radius"
          }
        },
        "required": [
          "kind"
        ],
        "title": "AviationStandResourceMetadataSchema",
        "type": "object"
      },
      "AviationStandTaskMetadataSchema": {
        "additionalProperties": false,
        "description": "Input schema for flights (task) metadata.",
        "properties": {
          "kind": {
            "const": "aviation_stand",
            "title": "Kind",
            "type": "string"
          },
          "airline": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Airline"
          },
          "airline_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Airline Code"
          },
          "od_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Od Code"
          },
          "ac_reg": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Ac Reg"
          },
          "aircraft_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Aircraft Type"
          },
          "cat": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Cat"
          },
          "ground_handler": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Ground Handler"
          }
        },
        "required": [
          "kind"
        ],
        "title": "AviationStandTaskMetadataSchema",
        "type": "object"
      },
      "AviationVirtualStateInput": {
        "description": "This is a placeholder for the AviationStandPlanningAdapter's virtual state input.",
        "properties": {
          "experimental_tools_enabled": {
            "default": false,
            "description": "Whether experimental tools are enabled",
            "title": "Experimental Tools Enabled",
            "type": "boolean"
          },
          "display_window_start": {
            "title": "Display Window Start",
            "type": "integer"
          },
          "display_window_end": {
            "title": "Display Window End",
            "type": "integer"
          },
          "selected_time": {
            "title": "Selected Time",
            "type": "integer"
          },
          "forward_window": {
            "title": "Forward Window",
            "type": "integer"
          },
          "current_time": {
            "title": "Current Time",
            "type": "integer"
          },
          "controls": {
            "$ref": "#/components/schemas/AviationControlPanelState"
          },
          "freeze_window": {
            "default": 0,
            "description": "Duration in seconds after the current_time during which no changes are allowed.",
            "title": "Freeze Window",
            "type": "integer"
          },
          "workspace_id": {
            "anyOf": [
              {
                "format": "uuid4",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Workspace ID for workspace-aware queries. None = mainline only.",
            "title": "Workspace Id"
          }
        },
        "required": [
          "display_window_start",
          "display_window_end",
          "selected_time",
          "forward_window",
          "current_time",
          "controls"
        ],
        "title": "AviationVirtualStateInput",
        "type": "object"
      },
      "BulkCreateAssignmentsResponse": {
        "properties": {
          "created_assignments": {
            "title": "Created Assignments",
            "type": "integer"
          }
        },
        "required": [
          "created_assignments"
        ],
        "title": "BulkCreateAssignmentsResponse",
        "type": "object"
      },
      "ChangeTypeEnum": {
        "enum": [
          "created",
          "updated",
          "deleted"
        ],
        "type": "string",
        "description": "* `created` - created\n* `updated` - updated\n* `deleted` - deleted"
      },
      "ChatMessage": {
        "properties": {
          "type": {
            "title": "Type",
            "type": "string"
          },
          "content": {
            "title": "Content",
            "type": "string"
          }
        },
        "required": [
          "type",
          "content"
        ],
        "title": "ChatMessage",
        "type": "object"
      },
      "ConflictResolutionResponse": {
        "properties": {
          "solutions": {
            "items": {
              "$ref": "#/components/schemas/ConflictResolutionSolution"
            },
            "title": "Solutions",
            "type": "array"
          }
        },
        "required": [
          "solutions"
        ],
        "title": "ConflictResolutionResponse",
        "type": "object"
      },
      "ConflictResolutionSchema": {
        "properties": {
          "virtual_state": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AviationVirtualStateInput"
              },
              {
                "$ref": "#/components/schemas/MaritimeBerthVirtualStateInput"
              },
              {
                "$ref": "#/components/schemas/VirtualStateInput"
              }
            ],
            "title": "Virtual State"
          }
        },
        "required": [
          "virtual_state"
        ],
        "title": "ConflictResolutionSchema",
        "type": "object"
      },
      "ConflictResolutionSolution": {
        "properties": {
          "changes": {
            "items": {
              "$ref": "#/components/schemas/AssignmentDiff"
            },
            "title": "Changes",
            "type": "array"
          },
          "score": {
            "title": "Score",
            "type": "integer"
          },
          "is_resolved": {
            "title": "Is Resolved",
            "type": "boolean"
          }
        },
        "required": [
          "changes",
          "score",
          "is_resolved"
        ],
        "title": "ConflictResolutionSolution",
        "type": "object"
      },
      "ControlPanelState": {
        "properties": {
          "attach_callback": {
            "default": true,
            "description": "Whether to attach a callback to the solver for live updates",
            "title": "Attach Callback",
            "type": "boolean"
          },
          "resolution_balance": {
            "description": "0 strives for minimal conflicts whereas 1 strives for minimal overlap",
            "title": "Resolution Balance",
            "type": "number"
          },
          "rule_adherence": {
            "description": "0 strives for the goal of the strategy, while 1 strives for optimal rule value",
            "title": "Rule Adherence",
            "type": "number"
          },
          "max_runtime": {
            "default": 60,
            "description": "Maximum runtime in seconds for the solver, default is 90 seconds",
            "title": "Max Runtime",
            "type": "integer"
          },
          "optimality_gap": {
            "default": 0,
            "description": "The acceptable optimality gap for the solver, default is 0",
            "title": "Optimality Gap",
            "type": "number"
          },
          "strategy": {
            "$ref": "#/components/schemas/SolutionStrategy"
          },
          "ignore_freeze_and_past": {
            "default": false,
            "description": "Ignore freeze window and allow edits in the past",
            "title": "Ignore Freeze And Past",
            "type": "boolean"
          },
          "lock_left_edge": {
            "default": true,
            "description": "Lock assignments that cross the left edge of the display window",
            "title": "Lock Left Edge",
            "type": "boolean"
          },
          "lock_right_edge": {
            "default": true,
            "description": "Lock assignments that cross the right edge of the display window",
            "title": "Lock Right Edge",
            "type": "boolean"
          }
        },
        "required": [
          "resolution_balance",
          "rule_adherence",
          "strategy"
        ],
        "title": "ControlPanelState",
        "type": "object"
      },
      "EntityHistory": {
        "type": "object",
        "description": "Response serializer for entity history endpoint.",
        "properties": {
          "entityId": {
            "type": "string",
            "format": "uuid"
          },
          "entityType": {
            "type": "string"
          },
          "workspace": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "total": {
            "type": "integer"
          },
          "versions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StateDiffEntry"
            }
          }
        },
        "required": [
          "entityId",
          "entityType",
          "total",
          "versions",
          "workspace"
        ]
      },
      "ErrorDetail": {
        "type": "object",
        "properties": {
          "detail": {
            "type": "string"
          }
        },
        "required": [
          "detail"
        ]
      },
      "ExpectedTimesSourceEnum": {
        "enum": [
          "schedule",
          "actual",
          "manual",
          "predicted",
          "external"
        ],
        "title": "ExpectedTimesSourceEnum",
        "type": "string"
      },
      "FilterPreferences": {
        "additionalProperties": false,
        "properties": {
          "selectedTagIds": {
            "items": {
              "type": "string"
            },
            "title": "Selectedtagids",
            "type": "array"
          },
          "filterTargetMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FilterTargetModeEnum"
              }
            ],
            "default": "resources",
            "title": "Filtertargetmode"
          }
        },
        "title": "FilterPreferences",
        "type": "object"
      },
      "FilterTargetModeEnum": {
        "enum": [
          "resources",
          "operations"
        ],
        "type": "string"
      },
      "GroupsEnum": {
        "enum": [
          "ADM View Only",
          "ADM Planner",
          "ADM Flight Manager",
          "ADM Resource Configurator",
          "ADM Rules & Tags Configurator"
        ],
        "type": "string",
        "description": "* `ADM View Only` - ADM View Only\n* `ADM Planner` - ADM Planner\n* `ADM Flight Manager` - ADM Flight Manager\n* `ADM Resource Configurator` - ADM Resource Configurator\n* `ADM Rules & Tags Configurator` - ADM Rules & Tags Configurator"
      },
      "Location": {
        "type": "object",
        "description": "Base serializer for StableEntity models that splits entity/state fields and\ndelegates persistence to the service layer (create_state/write_state).\n\nState fields use CurrentStateReadMixin for reads (redirects to current_state).\nFor writes, fields use flat names and split_entity_state_data routes them\nbased on model introspection.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "versionId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "workspace": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "ordering": {
            "type": "number",
            "format": "double"
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Resource"
            },
            "readOnly": true
          },
          "planning": {
            "type": "string",
            "format": "uuid"
          },
          "metadata": {
            "type": "object"
          }
        },
        "required": [
          "id",
          "name",
          "planning",
          "resources",
          "versionId",
          "workspace"
        ]
      },
      "MaritimeBerthAssignmentMetadataSchema": {
        "additionalProperties": false,
        "description": "Input schema for maritime berth assignment metadata.",
        "properties": {
          "kind": {
            "const": "maritime_berth",
            "title": "Kind",
            "type": "string"
          },
          "position": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Position"
          }
        },
        "required": [
          "kind"
        ],
        "title": "MaritimeBerthAssignmentMetadataSchema",
        "type": "object"
      },
      "MaritimeBerthControlPanelState": {
        "properties": {
          "attach_callback": {
            "default": true,
            "description": "Whether to attach a callback to the solver for live updates",
            "title": "Attach Callback",
            "type": "boolean"
          },
          "resolution_balance": {
            "description": "0 strives for minimal conflicts whereas 1 strives for minimal overlap",
            "title": "Resolution Balance",
            "type": "number"
          },
          "rule_adherence": {
            "description": "0 strives for the goal of the strategy, while 1 strives for optimal rule value",
            "title": "Rule Adherence",
            "type": "number"
          },
          "max_runtime": {
            "default": 60,
            "description": "Maximum runtime in seconds for the solver, default is 90 seconds",
            "title": "Max Runtime",
            "type": "integer"
          },
          "optimality_gap": {
            "default": 0,
            "description": "The acceptable optimality gap for the solver, default is 0",
            "title": "Optimality Gap",
            "type": "number"
          },
          "strategy": {
            "$ref": "#/components/schemas/MaritimeBerthSolutionStrategy"
          },
          "ignore_freeze_and_past": {
            "default": false,
            "description": "Ignore freeze window and allow edits in the past",
            "title": "Ignore Freeze And Past",
            "type": "boolean"
          },
          "lock_left_edge": {
            "default": true,
            "description": "Lock assignments that cross the left edge of the display window",
            "title": "Lock Left Edge",
            "type": "boolean"
          },
          "lock_right_edge": {
            "default": true,
            "description": "Lock assignments that cross the right edge of the display window",
            "title": "Lock Right Edge",
            "type": "boolean"
          }
        },
        "required": [
          "resolution_balance",
          "rule_adherence",
          "strategy"
        ],
        "title": "MaritimeBerthControlPanelState",
        "type": "object"
      },
      "MaritimeBerthOperationMetadataSchema": {
        "additionalProperties": false,
        "properties": {
          "kind": {
            "const": "maritime_berth",
            "title": "Kind",
            "type": "string"
          },
          "vessel_name": {
            "title": "Vessel Name",
            "type": "string"
          },
          "vessel_length": {
            "title": "Vessel Length",
            "type": "number"
          },
          "vessel_type": {
            "title": "Vessel Type",
            "type": "string"
          },
          "vessel_mmsi": {
            "title": "Vessel Mmsi",
            "type": "string"
          },
          "vessel_imo": {
            "default": null,
            "title": "Vessel Imo",
            "type": "string"
          },
          "load": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Load"
          },
          "discharge": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Discharge"
          },
          "restow": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Restow"
          },
          "mooring": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Mooring"
          },
          "portcall_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portcall Id"
          },
          "carrier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Carrier"
          },
          "last_port": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Last Port"
          },
          "next_port": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Next Port"
          },
          "tugboat_at_arrival": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TugboatServiceSchema"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "boatmen_at_arrival": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TugboatServiceSchema"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "boatmen_at_departure": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TugboatServiceSchema"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "tugboat_at_departure": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TugboatServiceSchema"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "portbase_quay_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portbase Quay Id"
          }
        },
        "required": [
          "kind",
          "vessel_name",
          "vessel_length",
          "vessel_type",
          "vessel_mmsi"
        ],
        "title": "MaritimeBerthOperationMetadataSchema",
        "type": "object"
      },
      "MaritimeBerthResourceMetadataSchema": {
        "additionalProperties": false,
        "description": "Input schema for maritime berth resource metadata.",
        "properties": {
          "kind": {
            "const": "maritime_berth",
            "title": "Kind",
            "type": "string"
          },
          "berth_length": {
            "title": "Berth Length",
            "type": "number"
          },
          "latitude": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Latitude"
          },
          "longitude": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Longitude"
          },
          "is_other": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Is Other"
          }
        },
        "required": [
          "kind",
          "berth_length"
        ],
        "title": "MaritimeBerthResourceMetadataSchema",
        "type": "object"
      },
      "MaritimeBerthSolutionStrategy": {
        "enum": [
          "standard",
          "fixed_start"
        ],
        "title": "MaritimeBerthSolutionStrategy",
        "type": "string"
      },
      "MaritimeBerthVirtualStateInput": {
        "description": "This is a placeholder for the MaritimeStandPlanningAdapter's virtual state input.",
        "properties": {
          "experimental_tools_enabled": {
            "default": false,
            "description": "Whether experimental tools are enabled",
            "title": "Experimental Tools Enabled",
            "type": "boolean"
          },
          "display_window_start": {
            "title": "Display Window Start",
            "type": "integer"
          },
          "display_window_end": {
            "title": "Display Window End",
            "type": "integer"
          },
          "selected_time": {
            "title": "Selected Time",
            "type": "integer"
          },
          "forward_window": {
            "title": "Forward Window",
            "type": "integer"
          },
          "current_time": {
            "title": "Current Time",
            "type": "integer"
          },
          "controls": {
            "$ref": "#/components/schemas/MaritimeBerthControlPanelState"
          },
          "freeze_window": {
            "default": 0,
            "description": "Duration in seconds after the current_time during which no changes are allowed.",
            "title": "Freeze Window",
            "type": "integer"
          },
          "workspace_id": {
            "anyOf": [
              {
                "format": "uuid4",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Workspace ID for workspace-aware queries. None = mainline only.",
            "title": "Workspace Id"
          }
        },
        "required": [
          "display_window_start",
          "display_window_end",
          "selected_time",
          "forward_window",
          "current_time",
          "controls"
        ],
        "title": "MaritimeBerthVirtualStateInput",
        "type": "object"
      },
      "NullEnum": {
        "type": "null"
      },
      "OIDCExchangeRequest": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "One-time login code issued by the OIDC callback."
          }
        },
        "required": [
          "code"
        ]
      },
      "OIDCExchangeResponse": {
        "type": "object",
        "properties": {
          "access": {
            "type": "string",
            "description": "Short-lived JWT access token."
          },
          "refresh": {
            "type": "string",
            "description": "Long-lived JWT refresh token."
          },
          "user": {
            "$ref": "#/components/schemas/User"
          }
        },
        "required": [
          "access",
          "refresh",
          "user"
        ]
      },
      "Operation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "planning": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "metadata": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AviationStandOperationMetadataSchema"
              },
              {
                "$ref": "#/components/schemas/AviationStandDemoOperationMetadataSchema"
              },
              {
                "$ref": "#/components/schemas/MaritimeBerthOperationMetadataSchema"
              }
            ]
          },
          "isBlocker": {
            "type": "boolean"
          },
          "tagsDetails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SimpleTag"
            },
            "readOnly": true
          },
          "operationName": {
            "type": "string",
            "readOnly": true
          },
          "group": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Group to which this operation belongs, e.g., a portcall."
          },
          "inboundTask": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TaskState"
              },
              {
                "type": "null"
              }
            ],
            "readOnly": true
          },
          "outboundTask": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TaskState"
              },
              {
                "type": "null"
              }
            ],
            "readOnly": true
          },
          "workspace": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true
          }
        },
        "required": [
          "inboundTask",
          "isBlocker",
          "operationName",
          "outboundTask",
          "planning",
          "tagsDetails",
          "workspace"
        ]
      },
      "OperationBulkCreate": {
        "type": "object",
        "properties": {
          "createdOperations": {
            "type": "integer"
          },
          "updatedOperations": {
            "type": "integer"
          },
          "unchangedOperations": {
            "type": "integer"
          }
        },
        "required": [
          "createdOperations",
          "unchangedOperations",
          "updatedOperations"
        ]
      },
      "OperationGroup": {
        "type": "object",
        "description": "Serializer for grouping Operations that belong to the same external entity\n(e.g. a Portbase port-call).",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "planning": {
            "type": "string",
            "format": "uuid"
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "operations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Operation"
            },
            "readOnly": true
          },
          "metadata": {
            "type": "object"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "createdAt",
          "id",
          "operations",
          "planning",
          "updatedAt"
        ]
      },
      "OperationSearch": {
        "type": "object",
        "properties": {
          "externalId": {
            "type": "string",
            "description": "Exact value match."
          }
        },
        "required": [
          "externalId"
        ]
      },
      "OptimizationMetrics": {
        "properties": {
          "phase": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SolverPhase"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Logical solver phase."
          },
          "wall_time": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Elapsed solver time (s).",
            "title": "Wall Time"
          },
          "model_build_time": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Model build time (s).",
            "title": "Model Build Time"
          },
          "best_obj": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Current incumbent objective.",
            "title": "Best Obj"
          },
          "best_bound": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Best known bound.",
            "title": "Best Bound"
          },
          "gap": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "|best_obj - best_bound|.",
            "title": "Gap"
          },
          "num_conflicts": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Num Conflicts"
          },
          "num_branches": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Num Branches"
          }
        },
        "title": "OptimizationMetrics",
        "type": "object"
      },
      "OptimizationTaskError": {
        "properties": {
          "error": {
            "title": "Error",
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "title": "OptimizationTaskError",
        "type": "object"
      },
      "OptimizationTaskResultFailedOrRetried": {
        "properties": {
          "taskName": {
            "default": null,
            "title": "Taskname",
            "type": "string"
          },
          "taskId": {
            "title": "Taskid",
            "type": "string"
          },
          "discarded": {
            "title": "Discarded",
            "type": "boolean"
          },
          "dateStarted": {
            "format": "date-time",
            "title": "Datestarted",
            "type": "string"
          },
          "dateDone": {
            "format": "date-time",
            "title": "Datedone",
            "type": "string"
          },
          "virtualState": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AviationVirtualStateInput"
              },
              {
                "$ref": "#/components/schemas/MaritimeBerthVirtualStateInput"
              },
              {
                "$ref": "#/components/schemas/VirtualStateInput"
              }
            ],
            "title": "Virtualstate"
          },
          "metrics": {
            "$ref": "#/components/schemas/OptimizationMetrics",
            "default": null
          },
          "updatedAt": {
            "format": "date-time",
            "title": "Updatedat",
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "title": "Createdat",
            "type": "string"
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OptimizationTaskResultFailedOrRetriedStatusEnum"
              }
            ],
            "title": "Status"
          },
          "optimizationResult": {
            "$ref": "#/components/schemas/OptimizationTaskError"
          },
          "optimizationStatus": {
            "const": "UNKNOWN",
            "title": "Optimizationstatus",
            "type": "string"
          }
        },
        "required": [
          "taskId",
          "discarded",
          "dateStarted",
          "dateDone",
          "virtualState",
          "updatedAt",
          "createdAt",
          "status",
          "optimizationResult",
          "optimizationStatus"
        ],
        "title": "OptimizationTaskResultFailedOrRetried",
        "type": "object"
      },
      "OptimizationTaskResultFailedOrRetriedStatusEnum": {
        "enum": [
          "RETRY",
          "FAILURE"
        ],
        "type": "string"
      },
      "OptimizationTaskResultNotDone": {
        "properties": {
          "taskName": {
            "default": null,
            "title": "Taskname",
            "type": "string"
          },
          "taskId": {
            "title": "Taskid",
            "type": "string"
          },
          "discarded": {
            "title": "Discarded",
            "type": "boolean"
          },
          "dateStarted": {
            "format": "date-time",
            "title": "Datestarted",
            "type": "string"
          },
          "dateDone": {
            "format": "date-time",
            "title": "Datedone",
            "type": "string"
          },
          "virtualState": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AviationVirtualStateInput"
              },
              {
                "$ref": "#/components/schemas/MaritimeBerthVirtualStateInput"
              },
              {
                "$ref": "#/components/schemas/VirtualStateInput"
              }
            ],
            "title": "Virtualstate"
          },
          "metrics": {
            "$ref": "#/components/schemas/OptimizationMetrics",
            "default": null
          },
          "updatedAt": {
            "format": "date-time",
            "title": "Updatedat",
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "title": "Createdat",
            "type": "string"
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OptimizationTaskResultNotDoneStatusEnum"
              }
            ],
            "title": "Status"
          },
          "optimizationResult": {
            "default": null,
            "title": "Optimizationresult",
            "type": "null"
          },
          "optimizationStatus": {
            "const": "UNKNOWN",
            "title": "Optimizationstatus",
            "type": "string"
          }
        },
        "required": [
          "taskId",
          "discarded",
          "dateStarted",
          "dateDone",
          "virtualState",
          "updatedAt",
          "createdAt",
          "status",
          "optimizationStatus"
        ],
        "title": "OptimizationTaskResultNotDone",
        "type": "object"
      },
      "OptimizationTaskResultNotDoneStatusEnum": {
        "enum": [
          "PENDING",
          "STARTED",
          "EXPIRED",
          "RUNNING"
        ],
        "type": "string"
      },
      "OptimizationTaskResultNotOptimalOrFeasible": {
        "properties": {
          "taskName": {
            "default": null,
            "title": "Taskname",
            "type": "string"
          },
          "taskId": {
            "title": "Taskid",
            "type": "string"
          },
          "discarded": {
            "title": "Discarded",
            "type": "boolean"
          },
          "dateStarted": {
            "format": "date-time",
            "title": "Datestarted",
            "type": "string"
          },
          "dateDone": {
            "format": "date-time",
            "title": "Datedone",
            "type": "string"
          },
          "virtualState": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AviationVirtualStateInput"
              },
              {
                "$ref": "#/components/schemas/MaritimeBerthVirtualStateInput"
              },
              {
                "$ref": "#/components/schemas/VirtualStateInput"
              }
            ],
            "title": "Virtualstate"
          },
          "metrics": {
            "$ref": "#/components/schemas/OptimizationMetrics",
            "default": null
          },
          "updatedAt": {
            "format": "date-time",
            "title": "Updatedat",
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "title": "Createdat",
            "type": "string"
          },
          "status": {
            "const": "SUCCESS",
            "title": "Status",
            "type": "string"
          },
          "optimizationResult": {
            "default": null,
            "title": "Optimizationresult",
            "type": "null"
          },
          "optimizationStatus": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OptimizationTaskResultNotOptimalOrFeasibleOptimizationStatusEnum"
              }
            ],
            "title": "Optimizationstatus"
          }
        },
        "required": [
          "taskId",
          "discarded",
          "dateStarted",
          "dateDone",
          "virtualState",
          "updatedAt",
          "createdAt",
          "status",
          "optimizationStatus"
        ],
        "title": "OptimizationTaskResultNotOptimalOrFeasible",
        "type": "object"
      },
      "OptimizationTaskResultNotOptimalOrFeasibleOptimizationStatusEnum": {
        "enum": [
          "INFEASIBLE",
          "MODEL_INVALID",
          "UNKNOWN"
        ],
        "type": "string"
      },
      "OptimizationTaskResultOptimalOrFeasible": {
        "properties": {
          "taskName": {
            "default": null,
            "title": "Taskname",
            "type": "string"
          },
          "taskId": {
            "title": "Taskid",
            "type": "string"
          },
          "discarded": {
            "title": "Discarded",
            "type": "boolean"
          },
          "dateStarted": {
            "format": "date-time",
            "title": "Datestarted",
            "type": "string"
          },
          "dateDone": {
            "format": "date-time",
            "title": "Datedone",
            "type": "string"
          },
          "virtualState": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AviationVirtualStateInput"
              },
              {
                "$ref": "#/components/schemas/MaritimeBerthVirtualStateInput"
              },
              {
                "$ref": "#/components/schemas/VirtualStateInput"
              }
            ],
            "title": "Virtualstate"
          },
          "metrics": {
            "$ref": "#/components/schemas/OptimizationMetrics",
            "default": null
          },
          "updatedAt": {
            "format": "date-time",
            "title": "Updatedat",
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "title": "Createdat",
            "type": "string"
          },
          "status": {
            "const": "SUCCESS",
            "title": "Status",
            "type": "string"
          },
          "optimizationResult": {
            "$ref": "#/components/schemas/SolverResultSchema"
          },
          "optimizationStatus": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OptimizationTaskResultOptimalOrFeasibleOptimizationStatusEnum"
              }
            ],
            "title": "Optimizationstatus"
          }
        },
        "required": [
          "taskId",
          "discarded",
          "dateStarted",
          "dateDone",
          "virtualState",
          "updatedAt",
          "createdAt",
          "status",
          "optimizationResult",
          "optimizationStatus"
        ],
        "title": "OptimizationTaskResultOptimalOrFeasible",
        "type": "object"
      },
      "OptimizationTaskResultOptimalOrFeasibleOptimizationStatusEnum": {
        "enum": [
          "OPTIMAL",
          "FEASIBLE"
        ],
        "type": "string"
      },
      "OptimizationTaskResultOptimizationStatusEnum": {
        "enum": [
          "OPTIMAL",
          "FEASIBLE",
          "INFEASIBLE",
          "MODEL_INVALID",
          "ERROR",
          "MODEL_BUILD_TIMEOUT",
          "UNKNOWN"
        ],
        "type": "string",
        "description": "* `OPTIMAL` - Optimal solution found\n* `FEASIBLE` - Feasible solution found\n* `INFEASIBLE` - Problem is infeasible\n* `MODEL_INVALID` - Model is invalid\n* `ERROR` - Error happened while solving\n* `MODEL_BUILD_TIMEOUT` - Model building took too long\n* `UNKNOWN` - Unknown status"
      },
      "OptimizationTaskResultStatusEnum": {
        "enum": [
          "PENDING",
          "STARTED",
          "RUNNING",
          "SUCCESS",
          "FAILURE",
          "RETRY",
          "EXPIRED"
        ],
        "type": "string"
      },
      "OptimizationTaskResultWrapper": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/OptimizationTaskResultNotDone"
          },
          {
            "$ref": "#/components/schemas/OptimizationTaskResultOptimalOrFeasible"
          },
          {
            "$ref": "#/components/schemas/OptimizationTaskResultNotOptimalOrFeasible"
          },
          {
            "$ref": "#/components/schemas/OptimizationTaskResultFailedOrRetried"
          }
        ],
        "title": "OptimizationTaskResultWrapper"
      },
      "OrganizationPlanning": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "plannings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanningSummery"
            },
            "readOnly": true
          }
        },
        "required": [
          "id",
          "name",
          "plannings"
        ]
      },
      "PartOperationResourceJinjaRuleConfig": {
        "properties": {
          "polarity": {
            "$ref": "#/components/schemas/RulePolarity"
          },
          "objective": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RuleObjective"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The way the rule should affect the solver, if it is a soft rule"
          },
          "value": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The cost value associated with the rule if it is soft. Ignored for hard rules.",
            "title": "Value"
          },
          "expr": {
            "title": "Expr",
            "type": "string"
          }
        },
        "required": [
          "polarity",
          "expr"
        ],
        "title": "PartOperationResourceJinjaRuleConfig",
        "type": "object"
      },
      "PatchedLocation": {
        "type": "object",
        "description": "Base serializer for StableEntity models that splits entity/state fields and\ndelegates persistence to the service layer (create_state/write_state).\n\nState fields use CurrentStateReadMixin for reads (redirects to current_state).\nFor writes, fields use flat names and split_entity_state_data routes them\nbased on model introspection.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "versionId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "workspace": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "ordering": {
            "type": "number",
            "format": "double"
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Resource"
            },
            "readOnly": true
          },
          "planning": {
            "type": "string",
            "format": "uuid"
          },
          "metadata": {
            "type": "object"
          }
        }
      },
      "PatchedOperationGroup": {
        "type": "object",
        "description": "Serializer for grouping Operations that belong to the same external entity\n(e.g. a Portbase port-call).",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "planning": {
            "type": "string",
            "format": "uuid"
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "operations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Operation"
            },
            "readOnly": true
          },
          "metadata": {
            "type": "object"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "PatchedOptimizationTaskResult": {
        "type": "object",
        "properties": {
          "taskId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "taskName": {
            "type": "string"
          },
          "discarded": {
            "type": "boolean",
            "readOnly": true
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OptimizationTaskResultStatusEnum"
              }
            ],
            "readOnly": true
          },
          "_status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/_statusEnum"
              }
            ],
            "writeOnly": true,
            "title": " status"
          },
          "metrics": {},
          "optimizationResult": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ],
            "readOnly": true
          },
          "optimizationLogs": {
            "type": "string"
          },
          "optimizationStatus": {
            "$ref": "#/components/schemas/OptimizationTaskResultOptimizationStatusEnum"
          },
          "dateStarted": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true
          },
          "dateDone": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true
          },
          "virtualState": {
            "readOnly": true
          },
          "displayWindowStart": {
            "type": "string",
            "format": "date-time",
            "description": "Start of the time window for which the optimization was performed.",
            "readOnly": true
          },
          "displayWindowEnd": {
            "type": "string",
            "format": "date-time",
            "description": "End of the time window for which the optimization was performed.",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "PatchedPlanning": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "plugin": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "locations": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "description": {
            "type": "string"
          },
          "solvers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SolverStrategy"
            },
            "readOnly": true
          },
          "timezone": {
            "type": "string"
          },
          "freezeWindow": {
            "type": "integer"
          }
        }
      },
      "PatchedTaskWrite": {
        "type": "object",
        "description": "Write-focused view of Task: includes write-only tags field and validation.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "versionId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "planning": {
            "type": "string",
            "format": "uuid"
          },
          "operation": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "role": {
            "$ref": "#/components/schemas/RoleEnum"
          },
          "taskName": {
            "type": "string"
          },
          "scheduledTime": {
            "type": "string",
            "format": "date-time"
          },
          "expectedTime": {
            "type": "string",
            "format": "date-time"
          },
          "expectedTimeP05": {
            "type": "string",
            "format": "date-time"
          },
          "expectedTimeP10": {
            "type": "string",
            "format": "date-time"
          },
          "expectedTimeP90": {
            "type": "string",
            "format": "date-time"
          },
          "expectedTimeP95": {
            "type": "string",
            "format": "date-time"
          },
          "expectedTimesSource": {
            "$ref": "#/components/schemas/ExpectedTimesSourceEnum"
          },
          "actualTime": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "tagsDetails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SimpleTag"
            },
            "readOnly": true
          },
          "workspace": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true
          },
          "isMock": {
            "type": "boolean",
            "default": false
          },
          "metadata": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AviationStandTaskMetadataSchema"
              },
              {
                "$ref": "#/components/schemas/AviationStandDemoTaskMetadataSchema"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "validFrom": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "validTo": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true
          },
          "persisted": {
            "type": "boolean",
            "readOnly": true
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "writeOnly": true
            },
            "writeOnly": true
          }
        }
      },
      "PatchedWorkspace": {
        "type": "object",
        "description": "Serializer for reading workspace data.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "planning": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WorkspaceStatusEnum"
              }
            ],
            "readOnly": true
          },
          "createdBy": {
            "allOf": [
              {
                "$ref": "#/components/schemas/User"
              }
            ],
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "PatchedWritableOperation": {
        "type": "object",
        "description": "Base serializer for StableEntity models that splits entity/state fields and\ndelegates persistence to the service layer (create_state/write_state).\n\nState fields use CurrentStateReadMixin for reads (redirects to current_state).\nFor writes, fields use flat names and split_entity_state_data routes them\nbased on model introspection.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "planning": {
            "type": "string",
            "format": "uuid"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "metadata": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AviationStandOperationMetadataSchema"
              },
              {
                "$ref": "#/components/schemas/AviationStandDemoOperationMetadataSchema"
              },
              {
                "$ref": "#/components/schemas/MaritimeBerthOperationMetadataSchema"
              }
            ]
          },
          "isBlocker": {
            "type": "boolean"
          },
          "group": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Group to which this operation belongs, e.g., a portcall."
          },
          "inboundTask": {
            "$ref": "#/components/schemas/TaskState"
          },
          "outboundTask": {
            "$ref": "#/components/schemas/TaskState"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "writeOnly": true
            },
            "writeOnly": true
          }
        }
      },
      "PatchedWritableResource": {
        "type": "object",
        "description": "Base serializer for StableEntity models that splits entity/state fields and\ndelegates persistence to the service layer (create_state/write_state).\n\nState fields use CurrentStateReadMixin for reads (redirects to current_state).\nFor writes, fields use flat names and split_entity_state_data routes them\nbased on model introspection.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "versionId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "workspace": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "ordering": {
            "type": "number",
            "format": "double"
          },
          "adjacent": {
            "type": "array",
            "items": {
              "type": [
                "string",
                "null"
              ],
              "format": "uuid"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "writeOnly": true
            },
            "writeOnly": true
          },
          "location": {
            "type": "string",
            "format": "uuid"
          },
          "parent": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "metadata": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AviationStandResourceMetadataSchema"
              },
              {
                "$ref": "#/components/schemas/AviationStandDemoResourceMetadataSchema"
              },
              {
                "$ref": "#/components/schemas/MaritimeBerthResourceMetadataSchema"
              }
            ]
          }
        }
      },
      "PatchedWritableRule": {
        "type": "object",
        "description": "Base serializer for StableEntity models that splits entity/state fields and\ndelegates persistence to the service layer (create_state/write_state).\n\nState fields use CurrentStateReadMixin for reads (redirects to current_state).\nFor writes, fields use flat names and split_entity_state_data routes them\nbased on model introspection.",
        "properties": {
          "planning": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "module": {
            "type": "string"
          },
          "config": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PartOperationResourceJinjaRuleConfig"
              },
              {
                "$ref": "#/components/schemas/TagRuleConfig"
              }
            ]
          },
          "workspace": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true
          }
        }
      },
      "PatchedWritableTag": {
        "type": "object",
        "description": "Base serializer for StableEntity models that splits entity/state fields and\ndelegates persistence to the service layer (create_state/write_state).\n\nState fields use CurrentStateReadMixin for reads (redirects to current_state).\nFor writes, fields use flat names and split_entity_state_data routes them\nbased on model introspection.",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "category": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "required": {
            "type": "boolean",
            "default": false
          },
          "color": {
            "type": [
              "string",
              "null"
            ]
          },
          "planning": {
            "type": "string",
            "format": "uuid"
          },
          "workspace": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true
          }
        }
      },
      "Planning": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "plugin": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "locations": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "description": {
            "type": "string"
          },
          "solvers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SolverStrategy"
            },
            "readOnly": true
          },
          "timezone": {
            "type": "string"
          },
          "freezeWindow": {
            "type": "integer"
          }
        },
        "required": [
          "created_at",
          "id",
          "locations",
          "name",
          "plugin",
          "solvers"
        ]
      },
      "PlanningChangesetList": {
        "type": "object",
        "properties": {
          "planningId": {
            "type": "string",
            "format": "uuid"
          },
          "workspace": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/WorkspaceSummary"
              },
              {
                "type": "null"
              }
            ]
          },
          "total": {
            "type": "integer"
          },
          "changesets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkspaceChangesetSummary"
            }
          }
        },
        "required": [
          "changesets",
          "planningId",
          "total",
          "workspace"
        ]
      },
      "PlanningMeta": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "organization_id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "description": {
            "type": "string",
            "readOnly": true
          },
          "solvers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SolverStrategy"
            },
            "readOnly": true
          },
          "plugin": {
            "type": "string",
            "readOnly": true
          },
          "timezone": {
            "type": "string",
            "readOnly": true
          }
        },
        "required": [
          "created_at",
          "description",
          "id",
          "name",
          "organization_id",
          "plugin",
          "solvers",
          "timezone"
        ]
      },
      "PlanningMetricsData": {
        "type": "object",
        "description": "Metrics computed from a planning snapshot.",
        "properties": {
          "conflictCount": {
            "type": "integer",
            "description": "Number of resource conflicts"
          },
          "overlapMinutes": {
            "type": "integer",
            "description": "Total overlap time in minutes"
          },
          "assignmentCount": {
            "type": "integer",
            "description": "Number of assignments"
          },
          "operationCount": {
            "type": "integer",
            "description": "Number of operations"
          },
          "resourceCount": {
            "type": "integer",
            "description": "Number of resources"
          }
        },
        "required": [
          "assignmentCount",
          "conflictCount",
          "operationCount",
          "overlapMinutes",
          "resourceCount"
        ]
      },
      "PlanningMetricsResponse": {
        "type": "object",
        "description": "Response for the /metrics/ endpoint.",
        "properties": {
          "metrics": {
            "$ref": "#/components/schemas/PlanningMetricsData"
          },
          "changeId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Changeset UUID if metrics were retrieved at a specific changeset"
          },
          "asOf": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Timestamp when the changeset was created (ISO format)"
          }
        },
        "required": [
          "metrics"
        ]
      },
      "PlanningSummery": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "plugin": {
            "type": "string",
            "description": "Name of installed planning plug-in (e.g. 'stand', 'berth').",
            "maxLength": 30
          },
          "timezone": {
            "type": "string",
            "readOnly": true
          },
          "freezeWindow": {
            "type": "integer",
            "readOnly": true
          }
        },
        "required": [
          "createdAt",
          "freezeWindow",
          "id",
          "name",
          "plugin",
          "timezone"
        ]
      },
      "Resource": {
        "type": "object",
        "description": "Base serializer for StableEntity models that splits entity/state fields and\ndelegates persistence to the service layer (create_state/write_state).\n\nState fields use CurrentStateReadMixin for reads (redirects to current_state).\nFor writes, fields use flat names and split_entity_state_data routes them\nbased on model introspection.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "versionId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "workspace": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "ordering": {
            "type": "number",
            "format": "double"
          },
          "adjacent": {
            "type": "array",
            "items": {
              "type": [
                "string",
                "null"
              ],
              "format": "uuid"
            }
          },
          "tagsDetails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SimpleTag"
            },
            "readOnly": true
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "writeOnly": true
            },
            "writeOnly": true
          },
          "location": {
            "type": "string",
            "format": "uuid"
          },
          "parent": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "metadata": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AviationStandResourceMetadataSchema"
              },
              {
                "$ref": "#/components/schemas/AviationStandDemoResourceMetadataSchema"
              },
              {
                "$ref": "#/components/schemas/MaritimeBerthResourceMetadataSchema"
              }
            ]
          }
        },
        "required": [
          "id",
          "location",
          "name",
          "tagsDetails",
          "versionId",
          "workspace"
        ]
      },
      "ResourceRead": {
        "type": "object",
        "description": "Read-only view of Resource: excludes write-only fields like 'tags'.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "versionId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "workspace": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "ordering": {
            "type": "number",
            "format": "double"
          },
          "adjacent": {
            "type": "array",
            "items": {
              "type": [
                "string",
                "null"
              ],
              "format": "uuid"
            }
          },
          "tagsDetails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SimpleTag"
            },
            "readOnly": true
          },
          "location": {
            "type": "string",
            "format": "uuid"
          },
          "parent": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "metadata": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AviationStandResourceMetadataSchema"
              },
              {
                "$ref": "#/components/schemas/AviationStandDemoResourceMetadataSchema"
              },
              {
                "$ref": "#/components/schemas/MaritimeBerthResourceMetadataSchema"
              }
            ]
          }
        },
        "required": [
          "id",
          "location",
          "name",
          "tagsDetails",
          "versionId",
          "workspace"
        ]
      },
      "RoleEnum": {
        "enum": [
          "inbound",
          "outbound"
        ],
        "title": "RoleEnum",
        "type": "string"
      },
      "Rule": {
        "type": "object",
        "description": "Base serializer for StableEntity models that splits entity/state fields and\ndelegates persistence to the service layer (create_state/write_state).\n\nState fields use CurrentStateReadMixin for reads (redirects to current_state).\nFor writes, fields use flat names and split_entity_state_data routes them\nbased on model introspection.",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "versionId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "planning": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "lastModifiedDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true
          },
          "lastModifiedBy": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/User"
              },
              {
                "type": "null"
              }
            ],
            "readOnly": true
          },
          "module": {
            "type": "string"
          },
          "config": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PartOperationResourceJinjaRuleConfig"
              },
              {
                "$ref": "#/components/schemas/TagRuleConfig"
              }
            ]
          },
          "workspace": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true
          }
        },
        "required": [
          "config",
          "lastModifiedBy",
          "lastModifiedDate",
          "module",
          "name",
          "planning",
          "uuid",
          "versionId",
          "workspace"
        ]
      },
      "RuleObjective": {
        "description": "Defines how this rule affects the solver if it's a soft constraint",
        "enum": [
          "STRATEGY",
          "RULES",
          "STABILIZING"
        ],
        "title": "RuleObjective",
        "type": "string"
      },
      "RulePolarity": {
        "description": "Defines how a rule affects assignments.",
        "enum": [
          "DENY",
          "ENFORCE",
          "PENALIZE",
          "REWARD"
        ],
        "title": "RulePolarity",
        "type": "string"
      },
      "SimpleTag": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "category": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "required": {
            "type": "boolean",
            "default": false
          },
          "color": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "category",
          "uuid",
          "value"
        ]
      },
      "SolutionStrategy": {
        "enum": [
          "standard"
        ],
        "title": "SolutionStrategy",
        "type": "string"
      },
      "SolverDownloadResponseSchema": {
        "type": "object",
        "properties": {
          "assignments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Assignment"
            }
          },
          "operations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Operation"
            }
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Resource"
            }
          },
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Rule"
            }
          },
          "virtual_state": {
            "allOf": [
              {
                "$ref": "#/components/schemas/VirtualStateInput"
              }
            ],
            "readOnly": true
          }
        },
        "required": [
          "assignments",
          "operations",
          "resources",
          "rules",
          "virtual_state"
        ]
      },
      "SolverPhase": {
        "enum": [
          "INIT",
          "BUILD_DONE",
          "SEARCH_START",
          "SEARCH_TICK",
          "OPTIMIZING",
          "TIME_LIMIT",
          "FINISH"
        ],
        "title": "SolverPhase",
        "type": "string"
      },
      "SolverResultSchema": {
        "properties": {
          "assignments": {
            "items": {
              "$ref": "#/components/schemas/AssignmentIn"
            },
            "title": "Assignments",
            "type": "array"
          },
          "operations": {
            "items": {
              "$ref": "#/components/schemas/Operation"
            },
            "title": "Operations",
            "type": "array"
          }
        },
        "required": [
          "assignments",
          "operations"
        ],
        "title": "SolverResultSchema",
        "type": "object"
      },
      "SolverStrategy": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "isDefault": {
            "type": "boolean"
          },
          "isAvailable": {
            "type": "boolean"
          },
          "isBeta": {
            "type": "boolean"
          }
        },
        "required": [
          "description",
          "displayName",
          "isAvailable",
          "isBeta",
          "isDefault",
          "name"
        ]
      },
      "SourceEnum": {
        "enum": [
          "mainline",
          "workspace"
        ],
        "type": "string",
        "description": "* `mainline` - mainline\n* `workspace` - workspace"
      },
      "StateDiffChange": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "before": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ]
          },
          "after": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "after",
          "before",
          "field"
        ]
      },
      "StateDiffEntry": {
        "type": "object",
        "properties": {
          "entityId": {
            "type": "string"
          },
          "entityType": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "stateId": {
            "type": "string",
            "format": "uuid"
          },
          "changeId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "changeType": {
            "type": "string"
          },
          "before": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ]
          },
          "after": {
            "oneOf": [
              {},
              {
                "type": "null"
              }
            ]
          },
          "changes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StateDiffChange"
            }
          },
          "source": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SourceEnum"
              },
              {
                "$ref": "#/components/schemas/NullEnum"
              }
            ]
          },
          "validFrom": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "validTo": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "closedByChangeId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "createdBy": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/User"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "after",
          "before",
          "changeType",
          "changes",
          "entityId",
          "entityType",
          "label",
          "stateId"
        ]
      },
      "Tag": {
        "type": "object",
        "description": "Base serializer for StableEntity models that splits entity/state fields and\ndelegates persistence to the service layer (create_state/write_state).\n\nState fields use CurrentStateReadMixin for reads (redirects to current_state).\nFor writes, fields use flat names and split_entity_state_data routes them\nbased on model introspection.",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "category": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "required": {
            "type": "boolean",
            "default": false
          },
          "color": {
            "type": [
              "string",
              "null"
            ]
          },
          "planning": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "workspace": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true
          }
        },
        "required": [
          "category",
          "planning",
          "uuid",
          "value",
          "workspace"
        ]
      },
      "TagRuleConfig": {
        "properties": {
          "polarity": {
            "$ref": "#/components/schemas/RulePolarity"
          },
          "objective": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RuleObjective"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The way the rule should affect the solver, if it is a soft rule"
          },
          "value": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The cost value associated with the rule if it is soft. Ignored for hard rules.",
            "title": "Value"
          },
          "part_tag_uuid": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Part Tag Uuid",
            "type": "array"
          },
          "resource_tag_uuid": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Resource Tag Uuid",
            "type": "array"
          }
        },
        "required": [
          "polarity",
          "part_tag_uuid",
          "resource_tag_uuid"
        ],
        "title": "TagRuleConfig",
        "type": "object"
      },
      "Task": {
        "properties": {
          "actualTime": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Actualtime"
          },
          "createdAt": {
            "format": "date-time",
            "title": "Createdat",
            "type": "string"
          },
          "expectedTime": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Expectedtime"
          },
          "expectedTimeP05": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Expectedtimep05"
          },
          "expectedTimeP10": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Expectedtimep10"
          },
          "expectedTimeP90": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Expectedtimep90"
          },
          "expectedTimeP95": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Expectedtimep95"
          },
          "expectedTimesSource": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExpectedTimesSourceEnum"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "externalId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Externalid"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "isMock": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Ismock"
          },
          "metadata": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AviationStandTaskMetadataSchema"
              },
              {
                "$ref": "#/components/schemas/AviationStandDemoTaskMetadataSchema"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Metadata"
          },
          "operation": {
            "format": "uuid",
            "title": "Operation",
            "type": "string"
          },
          "persisted": {
            "title": "Persisted",
            "type": "boolean"
          },
          "planning": {
            "format": "uuid",
            "title": "Planning",
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/RoleEnum"
          },
          "scheduledTime": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Scheduledtime"
          },
          "tagsDetails": {
            "items": {
              "$ref": "#/components/schemas/SimpleTag"
            },
            "title": "Tagsdetails",
            "type": "array"
          },
          "taskName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Taskname"
          },
          "validFrom": {
            "format": "date-time",
            "title": "Validfrom",
            "type": "string"
          },
          "validTo": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Validto"
          },
          "versionId": {
            "format": "uuid",
            "title": "Versionid",
            "type": "string"
          }
        },
        "required": [
          "createdAt",
          "id",
          "operation",
          "persisted",
          "planning",
          "role",
          "tagsDetails",
          "validFrom",
          "validTo",
          "versionId"
        ],
        "title": "Task",
        "type": "object"
      },
      "TaskState": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "versionId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "operation": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "role": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RoleEnum"
              }
            ],
            "readOnly": true
          },
          "taskName": {
            "type": "string"
          },
          "scheduledTime": {
            "type": "string",
            "format": "date-time"
          },
          "expectedTime": {
            "type": "string",
            "format": "date-time"
          },
          "expectedTimeP05": {
            "type": "string",
            "format": "date-time"
          },
          "expectedTimeP10": {
            "type": "string",
            "format": "date-time"
          },
          "expectedTimeP90": {
            "type": "string",
            "format": "date-time"
          },
          "expectedTimeP95": {
            "type": "string",
            "format": "date-time"
          },
          "expectedTimesSource": {
            "$ref": "#/components/schemas/ExpectedTimesSourceEnum"
          },
          "actualTime": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "writeOnly": true
            },
            "writeOnly": true
          },
          "tagsDetails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SimpleTag"
            },
            "readOnly": true
          },
          "workspace": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true
          },
          "isMock": {
            "type": "boolean",
            "default": false
          },
          "metadata": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AviationStandTaskMetadataSchema"
              },
              {
                "$ref": "#/components/schemas/AviationStandDemoTaskMetadataSchema"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "validFrom": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "validTo": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true
          },
          "planning": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "persisted": {
            "type": "boolean",
            "readOnly": true
          }
        },
        "required": [
          "createdAt",
          "expectedTime",
          "expectedTimesSource",
          "id",
          "operation",
          "persisted",
          "planning",
          "role",
          "scheduledTime",
          "tagsDetails",
          "taskName",
          "validFrom",
          "validTo",
          "versionId",
          "workspace"
        ]
      },
      "TaskStateRead": {
        "type": "object",
        "description": "Read-only view of Task: excludes write-only fields like 'tags'.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "versionId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "operation": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "role": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RoleEnum"
              }
            ],
            "readOnly": true
          },
          "taskName": {
            "type": "string"
          },
          "scheduledTime": {
            "type": "string",
            "format": "date-time"
          },
          "expectedTime": {
            "type": "string",
            "format": "date-time"
          },
          "expectedTimeP05": {
            "type": "string",
            "format": "date-time"
          },
          "expectedTimeP10": {
            "type": "string",
            "format": "date-time"
          },
          "expectedTimeP90": {
            "type": "string",
            "format": "date-time"
          },
          "expectedTimeP95": {
            "type": "string",
            "format": "date-time"
          },
          "expectedTimesSource": {
            "$ref": "#/components/schemas/ExpectedTimesSourceEnum"
          },
          "actualTime": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "tagsDetails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SimpleTag"
            },
            "readOnly": true
          },
          "workspace": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true
          },
          "isMock": {
            "type": "boolean",
            "default": false
          },
          "metadata": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AviationStandTaskMetadataSchema"
              },
              {
                "$ref": "#/components/schemas/AviationStandDemoTaskMetadataSchema"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "validFrom": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "validTo": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true
          },
          "planning": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "persisted": {
            "type": "boolean",
            "readOnly": true
          }
        },
        "required": [
          "createdAt",
          "expectedTime",
          "expectedTimesSource",
          "id",
          "operation",
          "persisted",
          "planning",
          "role",
          "scheduledTime",
          "tagsDetails",
          "taskName",
          "validFrom",
          "validTo",
          "versionId",
          "workspace"
        ]
      },
      "TaskSubmissionResponse": {
        "properties": {
          "task_id": {
            "title": "Task Id",
            "type": "string"
          }
        },
        "required": [
          "task_id"
        ],
        "title": "TaskSubmissionResponse",
        "type": "object"
      },
      "TaskWrite": {
        "type": "object",
        "description": "Write-focused view of Task: includes write-only tags field and validation.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "versionId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "planning": {
            "type": "string",
            "format": "uuid"
          },
          "operation": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "role": {
            "$ref": "#/components/schemas/RoleEnum"
          },
          "taskName": {
            "type": "string"
          },
          "scheduledTime": {
            "type": "string",
            "format": "date-time"
          },
          "expectedTime": {
            "type": "string",
            "format": "date-time"
          },
          "expectedTimeP05": {
            "type": "string",
            "format": "date-time"
          },
          "expectedTimeP10": {
            "type": "string",
            "format": "date-time"
          },
          "expectedTimeP90": {
            "type": "string",
            "format": "date-time"
          },
          "expectedTimeP95": {
            "type": "string",
            "format": "date-time"
          },
          "expectedTimesSource": {
            "$ref": "#/components/schemas/ExpectedTimesSourceEnum"
          },
          "actualTime": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "tagsDetails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SimpleTag"
            },
            "readOnly": true
          },
          "workspace": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true
          },
          "isMock": {
            "type": "boolean",
            "default": false
          },
          "metadata": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AviationStandTaskMetadataSchema"
              },
              {
                "$ref": "#/components/schemas/AviationStandDemoTaskMetadataSchema"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "validFrom": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "validTo": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true
          },
          "persisted": {
            "type": "boolean",
            "readOnly": true
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "writeOnly": true
            },
            "writeOnly": true
          }
        },
        "required": [
          "createdAt",
          "expectedTime",
          "expectedTimesSource",
          "id",
          "operation",
          "persisted",
          "scheduledTime",
          "tagsDetails",
          "taskName",
          "validFrom",
          "validTo",
          "versionId",
          "workspace"
        ]
      },
      "TokenBlacklist": {
        "type": "object",
        "properties": {
          "refresh": {
            "type": "string"
          }
        },
        "required": [
          "refresh"
        ]
      },
      "TokenClaims": {
        "type": "object",
        "description": "Describe the custom JWT claims we add via add_user_claims.\n\nUsed for OpenAPI schema only (e.g. as a reusable component), so\nfrontend clients can have a typed view of the decoded token.",
        "properties": {
          "username": {
            "type": "string"
          },
          "sub": {
            "type": "string"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroupsEnum"
            }
          },
          "organization_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "is_superuser": {
            "type": "boolean"
          }
        },
        "required": [
          "email",
          "groups",
          "is_superuser",
          "organization_ids",
          "sub",
          "username"
        ]
      },
      "TokenObtainPair": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string",
            "writeOnly": true
          },
          "password": {
            "type": "string",
            "writeOnly": true
          },
          "access": {
            "type": "string",
            "readOnly": true
          },
          "refresh": {
            "type": "string",
            "readOnly": true
          }
        },
        "required": [
          "access",
          "password",
          "refresh",
          "username"
        ]
      },
      "TokenPair": {
        "type": "object",
        "properties": {
          "access": {
            "type": "string"
          },
          "refresh": {
            "type": "string"
          }
        },
        "required": [
          "access",
          "refresh"
        ]
      },
      "TokenRefresh": {
        "type": "object",
        "properties": {
          "access": {
            "type": "string",
            "readOnly": true
          },
          "refresh": {
            "type": "string"
          }
        },
        "required": [
          "access",
          "refresh"
        ]
      },
      "TugboatServiceSchema": {
        "description": "Schema for tugboat service metadata.",
        "properties": {
          "required": {
            "title": "Required",
            "type": "boolean"
          },
          "remarks": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Remarks"
          }
        },
        "required": [
          "required"
        ],
        "title": "TugboatServiceSchema",
        "type": "object"
      },
      "User": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "username": {
            "type": "string",
            "description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
            "pattern": "^[\\w.@+-]+$",
            "maxLength": 150
          },
          "password": {
            "type": [
              "string",
              "null"
            ],
            "writeOnly": true
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroupsEnum"
            },
            "readOnly": true
          }
        },
        "required": [
          "firstName",
          "groups",
          "id",
          "lastName",
          "password",
          "username"
        ]
      },
      "UserPlanningPreference": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "preferences": {
            "$ref": "#/components/schemas/UserPlanningPreferencesSchema"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "id",
          "updated_at"
        ]
      },
      "UserPlanningPreferencesSchema": {
        "additionalProperties": false,
        "properties": {
          "filters": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FilterPreferences"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          }
        },
        "title": "UserPlanningPreferencesSchema",
        "type": "object"
      },
      "VirtualStateInput": {
        "description": "Public-facing input model used for validation and schema generation.\n\nNote: virtual_assignments, virtual_operations, virtual_rules have been removed.\nDraft changes are now persisted to workspace state rows in the database.\nUse workspace_id to query the effective state (workspace overlay on mainline).",
        "properties": {
          "experimental_tools_enabled": {
            "default": false,
            "description": "Whether experimental tools are enabled",
            "title": "Experimental Tools Enabled",
            "type": "boolean"
          },
          "display_window_start": {
            "title": "Display Window Start",
            "type": "integer"
          },
          "display_window_end": {
            "title": "Display Window End",
            "type": "integer"
          },
          "selected_time": {
            "title": "Selected Time",
            "type": "integer"
          },
          "forward_window": {
            "title": "Forward Window",
            "type": "integer"
          },
          "current_time": {
            "title": "Current Time",
            "type": "integer"
          },
          "controls": {
            "$ref": "#/components/schemas/ControlPanelState"
          },
          "freeze_window": {
            "default": 0,
            "description": "Duration in seconds after the current_time during which no changes are allowed.",
            "title": "Freeze Window",
            "type": "integer"
          },
          "workspace_id": {
            "anyOf": [
              {
                "format": "uuid4",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Workspace ID for workspace-aware queries. None = mainline only.",
            "title": "Workspace Id"
          }
        },
        "required": [
          "display_window_start",
          "display_window_end",
          "selected_time",
          "forward_window",
          "current_time",
          "controls"
        ],
        "title": "VirtualStateInput",
        "type": "object"
      },
      "Workspace": {
        "type": "object",
        "description": "Serializer for reading workspace data.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "planning": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WorkspaceStatusEnum"
              }
            ],
            "readOnly": true
          },
          "createdBy": {
            "allOf": [
              {
                "$ref": "#/components/schemas/User"
              }
            ],
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "createdAt",
          "createdBy",
          "id",
          "planning",
          "status"
        ]
      },
      "WorkspaceChangeset": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "changeId": {
            "type": "string",
            "format": "uuid"
          },
          "revertsChangeId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "undoneAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "isMainline": {
            "type": "boolean"
          },
          "counts": {
            "$ref": "#/components/schemas/WorkspaceCounts"
          },
          "diffs": {
            "$ref": "#/components/schemas/WorkspaceChangesetDiffs"
          }
        },
        "required": [
          "changeId",
          "counts",
          "createdAt",
          "diffs",
          "id",
          "isMainline",
          "revertsChangeId",
          "source",
          "status",
          "undoneAt"
        ]
      },
      "WorkspaceChangesetAssignment": {
        "type": "object",
        "properties": {
          "operationId": {
            "type": "string",
            "format": "uuid"
          },
          "changeType": {
            "type": "string"
          },
          "before": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Assignment"
              },
              {
                "type": "null"
              }
            ]
          },
          "after": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Assignment"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "after",
          "before",
          "changeType",
          "operationId"
        ]
      },
      "WorkspaceChangesetDiffs": {
        "type": "object",
        "properties": {
          "assignments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkspaceChangesetAssignment"
            }
          },
          "operations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StateDiffEntry"
            }
          },
          "tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StateDiffEntry"
            }
          },
          "locations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StateDiffEntry"
            }
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StateDiffEntry"
            }
          },
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StateDiffEntry"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StateDiffEntry"
            }
          }
        },
        "required": [
          "assignments",
          "locations",
          "operations",
          "resources",
          "rules",
          "tags",
          "tasks"
        ]
      },
      "WorkspaceChangesetSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "changeId": {
            "type": "string",
            "format": "uuid"
          },
          "revertsChangeId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "undoneAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "isMainline": {
            "type": "boolean"
          },
          "counts": {
            "$ref": "#/components/schemas/WorkspaceCounts"
          }
        },
        "required": [
          "changeId",
          "counts",
          "createdAt",
          "id",
          "isMainline",
          "revertsChangeId",
          "source",
          "status",
          "undoneAt"
        ]
      },
      "WorkspaceCounts": {
        "type": "object",
        "properties": {
          "assignments": {
            "type": "integer"
          },
          "operations": {
            "type": "integer"
          },
          "tasks": {
            "type": "integer"
          },
          "locations": {
            "type": "integer"
          },
          "resources": {
            "type": "integer"
          },
          "rules": {
            "type": "integer"
          },
          "tags": {
            "type": "integer"
          }
        },
        "required": [
          "assignments",
          "locations",
          "operations",
          "resources",
          "rules",
          "tags",
          "tasks"
        ]
      },
      "WorkspaceCreate": {
        "type": "object",
        "description": "Serializer for creating a new workspace.",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "WorkspaceDiff": {
        "type": "object",
        "properties": {
          "planningId": {
            "type": "string",
            "format": "uuid"
          },
          "workspace": {
            "$ref": "#/components/schemas/WorkspaceSummary"
          },
          "counts": {
            "$ref": "#/components/schemas/WorkspaceCounts"
          },
          "assignments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkspaceDiffAssignment"
            }
          },
          "operations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StateDiffEntry"
            }
          },
          "tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StateDiffEntry"
            }
          },
          "locations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StateDiffEntry"
            }
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StateDiffEntry"
            }
          },
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StateDiffEntry"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StateDiffEntry"
            }
          }
        },
        "required": [
          "assignments",
          "counts",
          "locations",
          "operations",
          "planningId",
          "resources",
          "rules",
          "tags",
          "tasks",
          "workspace"
        ]
      },
      "WorkspaceDiffAssignment": {
        "type": "object",
        "properties": {
          "operationId": {
            "type": "string",
            "format": "uuid"
          },
          "before": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Assignment"
              },
              {
                "type": "null"
              }
            ]
          },
          "after": {
            "$ref": "#/components/schemas/Assignment"
          }
        },
        "required": [
          "after",
          "before",
          "operationId"
        ]
      },
      "WorkspaceStatusEnum": {
        "enum": [
          "draft",
          "merged",
          "archived"
        ],
        "type": "string",
        "description": "* `draft` - Draft\n* `merged` - Merged\n* `archived` - Archived"
      },
      "WorkspaceSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "status"
        ]
      },
      "WorkspaceUndoResponse": {
        "type": "object",
        "properties": {
          "workspace": {
            "$ref": "#/components/schemas/WorkspaceSummary"
          },
          "appliedChangeId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "appliedChangeId",
          "workspace"
        ]
      },
      "WritableOperation": {
        "type": "object",
        "description": "Base serializer for StableEntity models that splits entity/state fields and\ndelegates persistence to the service layer (create_state/write_state).\n\nState fields use CurrentStateReadMixin for reads (redirects to current_state).\nFor writes, fields use flat names and split_entity_state_data routes them\nbased on model introspection.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "planning": {
            "type": "string",
            "format": "uuid"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "metadata": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AviationStandOperationMetadataSchema"
              },
              {
                "$ref": "#/components/schemas/AviationStandDemoOperationMetadataSchema"
              },
              {
                "$ref": "#/components/schemas/MaritimeBerthOperationMetadataSchema"
              }
            ]
          },
          "isBlocker": {
            "type": "boolean"
          },
          "group": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Group to which this operation belongs, e.g., a portcall."
          },
          "inboundTask": {
            "$ref": "#/components/schemas/TaskState"
          },
          "outboundTask": {
            "$ref": "#/components/schemas/TaskState"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "writeOnly": true
            },
            "writeOnly": true
          }
        },
        "required": [
          "inboundTask",
          "isBlocker",
          "outboundTask",
          "planning"
        ]
      },
      "WritableResource": {
        "type": "object",
        "description": "Base serializer for StableEntity models that splits entity/state fields and\ndelegates persistence to the service layer (create_state/write_state).\n\nState fields use CurrentStateReadMixin for reads (redirects to current_state).\nFor writes, fields use flat names and split_entity_state_data routes them\nbased on model introspection.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "versionId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "workspace": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "ordering": {
            "type": "number",
            "format": "double"
          },
          "adjacent": {
            "type": "array",
            "items": {
              "type": [
                "string",
                "null"
              ],
              "format": "uuid"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "writeOnly": true
            },
            "writeOnly": true
          },
          "location": {
            "type": "string",
            "format": "uuid"
          },
          "parent": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "metadata": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AviationStandResourceMetadataSchema"
              },
              {
                "$ref": "#/components/schemas/AviationStandDemoResourceMetadataSchema"
              },
              {
                "$ref": "#/components/schemas/MaritimeBerthResourceMetadataSchema"
              }
            ]
          }
        },
        "required": [
          "id",
          "location",
          "name",
          "versionId",
          "workspace"
        ]
      },
      "WritableRule": {
        "type": "object",
        "description": "Base serializer for StableEntity models that splits entity/state fields and\ndelegates persistence to the service layer (create_state/write_state).\n\nState fields use CurrentStateReadMixin for reads (redirects to current_state).\nFor writes, fields use flat names and split_entity_state_data routes them\nbased on model introspection.",
        "properties": {
          "planning": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "module": {
            "type": "string"
          },
          "config": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PartOperationResourceJinjaRuleConfig"
              },
              {
                "$ref": "#/components/schemas/TagRuleConfig"
              }
            ]
          },
          "workspace": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true
          }
        },
        "required": [
          "config",
          "module",
          "name",
          "planning",
          "workspace"
        ]
      },
      "WritableTag": {
        "type": "object",
        "description": "Base serializer for StableEntity models that splits entity/state fields and\ndelegates persistence to the service layer (create_state/write_state).\n\nState fields use CurrentStateReadMixin for reads (redirects to current_state).\nFor writes, fields use flat names and split_entity_state_data routes them\nbased on model introspection.",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "category": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "required": {
            "type": "boolean",
            "default": false
          },
          "color": {
            "type": [
              "string",
              "null"
            ]
          },
          "planning": {
            "type": "string",
            "format": "uuid"
          },
          "workspace": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true
          }
        },
        "required": [
          "category",
          "planning",
          "uuid",
          "value",
          "workspace"
        ]
      },
      "_statusEnum": {
        "enum": [
          "PENDING",
          "STARTED",
          "RUNNING",
          "SUCCESS",
          "FAILURE",
          "RETRY",
          "EXPIRED"
        ],
        "type": "string",
        "description": "* `PENDING` - Pending\n* `STARTED` - Started\n* `RUNNING` - Running\n* `SUCCESS` - Success\n* `FAILURE` - Failure\n* `RETRY` - Retry\n* `EXPIRED` - Expired"
      }
    },
    "securitySchemes": {
      "tokenAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Token-based authentication with required prefix \"Token\""
      }
    }
  },
  "servers": [
    {
      "description": "Acceptance Environment",
      "url": "https://api.acc.adm.wearetransformers.nl"
    }
  ],
  "tags": [
    {
      "name": "Users",
      "description": "User management (authentication, current user details)."
    },
    {
      "name": "Locations",
      "description": "Managing locations and viewing their associated resources."
    },
    {
      "name": "Resources",
      "description": "Managing resources (CRUD, listing)."
    },
    {
      "name": "Operations",
      "description": "Managing operations. Includes CRUD and listing with time/version filters."
    },
    {
      "name": "Tasks",
      "description": "Updating details (time, uncertainty) of individual tasks within operations."
    },
    {
      "name": "Assignments",
      "description": "Managing the assignment of operations to resources (CRUD, bulk operations, deactivation, listing per operation)."
    },
    {
      "name": "Conflict Resolution",
      "description": "Resolving specific scheduling conflicts using heuristic search methods (streaming and non-streaming)."
    },
    {
      "name": "Optimization",
      "description": "Globally optimizing the schedule using one of the solvers to minimize conflicts and reassignments while optimizing for rules."
    },
    {
      "name": "Organizations & Planning",
      "description": "Managing the plannings and organizations you have access to."
    },
    {
      "name": "AI Agent",
      "description": "Interacting with the conversational AI assistant for planning and queries."
    },
    {
      "name": "Utility",
      "description": "Utility endpoints, such as generating schedule visualizations."
    },
    {
      "name": "Token",
      "description": "API authentication token management (e.g., obtaining auth tokens)."
    },
    {
      "name": "Tags",
      "description": "Our mechanism for indicating constraints, penalties or preferences."
    },
    {
      "name": "Rules",
      "description": "Can be used together with Tags to specify preferences or penalties."
    }
  ]
}