{
  "openapi": "3.1.1",
  "info": {
    "title": "Nitsor public API",
    "version": "v1",
    "description": "Generated from the Nitsor API contract; never edit by hand.",
    "x-nitsor-product-version": "0.1.0"
  },
  "tags": [
    {
      "name": "auth",
      "description": "Authentication: the session a bearer credential reaches."
    },
    {
      "name": "blind-checks",
      "description": "Blind checks: scans labelled without seeing the model, scored against it under a readiness plan fixed before checking starts. Plan writes need a person's own token, and these routes do not accept one yet; an Agent token is refused, so change plans on the Pipeline tab meanwhile."
    },
    {
      "name": "capabilities",
      "description": "Capability discovery: versions, limits and formats."
    },
    {
      "name": "datasets",
      "description": "Datasets: named selections over a project's version graph."
    },
    {
      "name": "decisions",
      "description": "Audit decisions behind authorization refusals."
    },
    {
      "name": "executions",
      "description": "Pipeline executions and their work items."
    },
    {
      "name": "ledger",
      "description": "Account ledger entries."
    },
    {
      "name": "model-label-outcomes",
      "description": "Model label outcomes: what people did with each label a model proposed, per Task and per Proposal."
    },
    {
      "name": "model-runs",
      "description": "Model runs a person starts on Tasks: the estimate to confirm, and the start that runs one scan at a time."
    },
    {
      "name": "openapi",
      "description": "The OpenAPI description this deployment serves."
    },
    {
      "name": "project-groups",
      "description": "Project groups: the account's shared folders on the project shelf."
    },
    {
      "name": "projects",
      "description": "Projects: creation and listing."
    },
    {
      "name": "requests",
      "description": "Async Requests: status, listing, cancel and the per-item report."
    },
    {
      "name": "service-accounts",
      "description": "Service accounts and their tokens: the machine identities jobs run as, managed by a person holding service-accounts:manage on their own token. A secret is shown once, on the answer that created it. A service account's access to a project is given, changed and removed by that project's admins, with a personal token holding admin there."
    },
    {
      "name": "sources",
      "description": "Sources and mask-read presigning."
    },
    {
      "name": "storage-connections",
      "description": "Storage connections to customer object storage, and the operator-provisioned credential handles they name."
    },
    {
      "name": "task-comments",
      "description": "Task comments, replies and attention."
    },
    {
      "name": "taxonomy",
      "description": "Taxonomy definitions, display groups and binding."
    },
    {
      "name": "version-graph",
      "description": "Version-graph commits, branches, landmarks and merges."
    },
    {
      "name": "workflow",
      "description": "Workflow definition and binding."
    }
  ],
  "servers": [
    {
      "url": "https://api.nitsor.com",
      "description": "Nitsor API"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/api/v1/requests/{id}/cancel": {
      "post": {
        "operationId": "asyncRequestsCancel",
        "summary": "Cancel an async Request",
        "tags": ["requests"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "operation-write"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The Request's operationId."
            },
            "required": true,
            "description": "The Request's operationId."
          }
        ],
        "responses": {
          "200": {
            "description": "Cancel an async Request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AsyncRequest"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/requests/{id}": {
      "get": {
        "operationId": "asyncRequestsGet",
        "summary": "Read an async Request",
        "tags": ["requests"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "account:read"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The Request's operationId."
            },
            "required": true,
            "description": "The Request's operationId."
          }
        ],
        "responses": {
          "200": {
            "description": "Read an async Request",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AsyncRequest"
                }
              }
            }
          },
          "304": {
            "description": "The caller's `If-None-Match` still describes the representation, so no body is sent.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/requests/{id}/items": {
      "get": {
        "operationId": "asyncRequestsItems",
        "summary": "List an async Request's per-item report",
        "tags": ["requests"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "account:read"
        },
        "x-nitsor-cursor-kind": "requestItems",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The Request's operationId."
            },
            "required": true,
            "description": "The Request's operationId."
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "$ref": "#/components/schemas/Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "$ref": "#/components/schemas/PageLimit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List an async Request's per-item report",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AsyncRequestsItemsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/requests": {
      "get": {
        "operationId": "asyncRequestsList",
        "summary": "List async Requests",
        "tags": ["requests"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "account:read"
        },
        "x-nitsor-cursor-kind": "requests",
        "parameters": [
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "$ref": "#/components/schemas/Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "$ref": "#/components/schemas/PageLimit"
            }
          },
          {
            "in": "query",
            "name": "operation",
            "schema": {
              "$ref": "#/components/schemas/AsyncRequestOperation"
            }
          },
          {
            "in": "query",
            "name": "state",
            "schema": {
              "$ref": "#/components/schemas/AsyncRequestState"
            }
          },
          {
            "in": "query",
            "name": "principalId",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "targetId",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List async Requests",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AsyncRequestsListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/blind-checks/plan": {
      "get": {
        "operationId": "blindCheckPlanGet",
        "summary": "Read one blind-check plan and where it stands",
        "tags": ["blind-checks"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "read"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "query",
            "name": "projectId",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            },
            "required": true
          },
          {
            "in": "query",
            "name": "planId",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Read one blind-check plan and where it stands",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlindCheckPlan"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/blind-checks/plan/rate": {
      "post": {
        "operationId": "blindCheckPlanRate",
        "summary": "Change the share of scans a running blind-check plan samples. Needs a person's own token; an Agent token is refused",
        "tags": ["blind-checks"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "operate"
        },
        "x-nitsor-cursor-kind": null,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BlindCheckPlanRateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Change the share of scans a running blind-check plan samples. Needs a person's own token; an Agent token is refused",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlindCheckPlan"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/blind-checks/plans/start": {
      "post": {
        "operationId": "blindCheckPlanStart",
        "summary": "Turn blind checks on for an auto-label stage and fix the plan. Needs a person's own token; an Agent token is refused",
        "tags": ["blind-checks"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "operate"
        },
        "x-nitsor-cursor-kind": null,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BlindCheckPlanStartRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Turn blind checks on for an auto-label stage and fix the plan. Needs a person's own token; an Agent token is refused",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlindCheckPlan"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/blind-checks/plan/stop": {
      "post": {
        "operationId": "blindCheckPlanStop",
        "summary": "Stop a running blind-check plan before its verdict. Needs a person's own token; an Agent token is refused",
        "tags": ["blind-checks"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "operate"
        },
        "x-nitsor-cursor-kind": null,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BlindCheckPlanStopRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stop a running blind-check plan before its verdict. Needs a person's own token; an Agent token is refused",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlindCheckPlan"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/blind-checks/plans": {
      "get": {
        "operationId": "blindCheckPlansList",
        "summary": "List a project's blind-check plans",
        "tags": ["blind-checks"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "read"
        },
        "x-nitsor-cursor-kind": "blind-check-plans",
        "parameters": [
          {
            "in": "query",
            "name": "projectId",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            },
            "required": true
          },
          {
            "in": "query",
            "name": "branchId",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            }
          },
          {
            "in": "query",
            "name": "stageId",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "$ref": "#/components/schemas/Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "$ref": "#/components/schemas/PageLimit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List a project's blind-check plans",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlindCheckPlanListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/blind-checks/checks": {
      "get": {
        "operationId": "blindChecksList",
        "summary": "List a plan's submitted blind checks and their scores",
        "tags": ["blind-checks"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "read"
        },
        "x-nitsor-cursor-kind": "blind-checks",
        "parameters": [
          {
            "in": "query",
            "name": "projectId",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            },
            "required": true
          },
          {
            "in": "query",
            "name": "planId",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            },
            "required": true
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "$ref": "#/components/schemas/Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "$ref": "#/components/schemas/PageLimit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List a plan's submitted blind checks and their scores",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlindCheckListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/capabilities": {
      "get": {
        "operationId": "capabilitiesGet",
        "summary": "Discover server capabilities and version floors",
        "tags": ["capabilities"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": null,
        "x-nitsor-cursor-kind": null,
        "security": [],
        "responses": {
          "200": {
            "description": "Discover server capabilities and version floors",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CapabilitiesResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorError"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorError"
          },
          "404": {
            "$ref": "#/components/responses/NitsorError"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorError"
          },
          "413": {
            "$ref": "#/components/responses/NitsorError"
          },
          "422": {
            "$ref": "#/components/responses/NitsorError"
          },
          "429": {
            "$ref": "#/components/responses/NitsorError"
          }
        }
      }
    },
    "/api/v1/dataset-versions/{id}/access": {
      "post": {
        "operationId": "datasetVersionsAccess",
        "summary": "Open, renew or close a scoped read session on a Dataset Version",
        "tags": ["datasets"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "read"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The Dataset Version's versionId."
            },
            "required": true,
            "description": "The Dataset Version's versionId."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DatasetVersionsAccessRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Open, renew or close a scoped read session on a Dataset Version",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetVersionsAccessResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/datasets/{id}/versions": {
      "post": {
        "operationId": "datasetVersionsCreate",
        "summary": "Create an immutable Dataset Version",
        "tags": ["datasets"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "operate"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The dataset's datasetId."
            },
            "required": true,
            "description": "The dataset's datasetId."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DatasetVersionsCreateRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Create an immutable Dataset Version",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              },
              "Location": {
                "description": "The Request resource to poll for Dataset Version preparation.",
                "schema": {
                  "type": "string",
                  "format": "uri-reference"
                }
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetVersionsCreateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      },
      "get": {
        "operationId": "datasetVersionsList",
        "summary": "List a Dataset's versions",
        "tags": ["datasets"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "read"
        },
        "x-nitsor-cursor-kind": "datasetVersions",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The dataset's datasetId."
            },
            "required": true,
            "description": "The dataset's datasetId."
          },
          {
            "in": "query",
            "name": "includeDeleted",
            "schema": {
              "type": "string",
              "enum": ["true", "false"]
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "$ref": "#/components/schemas/Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "$ref": "#/components/schemas/PageLimit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List a Dataset's versions",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetVersionsListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/dataset-versions/{id}": {
      "delete": {
        "operationId": "datasetVersionsDelete",
        "summary": "Tombstone a Dataset Version (a service account a project admin allowed to delete)",
        "tags": ["datasets"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "admin"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The Dataset Version's versionId."
            },
            "required": true,
            "description": "The Dataset Version's versionId."
          }
        ],
        "responses": {
          "200": {
            "description": "Tombstone a Dataset Version (a service account a project admin allowed to delete)",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetVersion"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      },
      "get": {
        "operationId": "datasetVersionsGet",
        "summary": "Read a Dataset Version",
        "tags": ["datasets"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "read"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The Dataset Version's versionId."
            },
            "required": true,
            "description": "The Dataset Version's versionId."
          }
        ],
        "responses": {
          "200": {
            "description": "Read a Dataset Version",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetVersion"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/dataset-versions/{id}/exclusions": {
      "get": {
        "operationId": "datasetVersionsExclusions",
        "summary": "List a Dataset Version's excluded members",
        "tags": ["datasets"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "read"
        },
        "x-nitsor-cursor-kind": "datasetExclusions",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The Dataset Version's versionId."
            },
            "required": true,
            "description": "The Dataset Version's versionId."
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "$ref": "#/components/schemas/Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "$ref": "#/components/schemas/PageLimit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List a Dataset Version's excluded members",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetVersionsExclusionsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/dataset-versions/{id}/labels": {
      "get": {
        "operationId": "datasetVersionsLabels",
        "summary": "Read frozen labels with an opt-in layer filter and per-layer counts",
        "tags": ["datasets"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "read"
        },
        "x-nitsor-cursor-kind": "datasetLabels",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The Dataset Version's versionId."
            },
            "required": true,
            "description": "The Dataset Version's versionId."
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "$ref": "#/components/schemas/Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "$ref": "#/components/schemas/PageLimit"
            }
          },
          {
            "in": "query",
            "name": "labels",
            "schema": {
              "$ref": "#/components/schemas/DatasetLabelsParameter"
            }
          },
          {
            "in": "query",
            "name": "includeClassificationAnswers",
            "schema": {
              "type": "string",
              "enum": ["true", "false"]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Read frozen labels with an opt-in layer filter and per-layer counts",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetVersionsLabelsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/dataset-versions/{id}/pin": {
      "post": {
        "operationId": "datasetVersionsPin",
        "summary": "Record this principal's consumption of a Dataset Version",
        "tags": ["datasets"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "read"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The Dataset Version's versionId."
            },
            "required": true,
            "description": "The Dataset Version's versionId."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DatasetVersionsPinRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Record this principal's consumption of a Dataset Version",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetVersionsPinResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/dataset-versions/{id}/stats": {
      "get": {
        "operationId": "datasetVersionsStats",
        "summary": "Read a Dataset Version's Stats Block reference",
        "tags": ["datasets"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "read"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The Dataset Version's versionId."
            },
            "required": true,
            "description": "The Dataset Version's versionId."
          }
        ],
        "responses": {
          "200": {
            "description": "Read a Dataset Version's Stats Block reference",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetVersionsStatsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/datasets": {
      "post": {
        "operationId": "datasetsCreate",
        "summary": "Define a dataset",
        "tags": ["datasets"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "operate"
        },
        "x-nitsor-cursor-kind": null,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DatasetsCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Define a dataset",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetDetail"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      },
      "get": {
        "operationId": "datasetsList",
        "summary": "List a project's datasets",
        "tags": ["datasets"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "read"
        },
        "x-nitsor-cursor-kind": "datasets",
        "parameters": [
          {
            "in": "query",
            "name": "projectId",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "required": true
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "$ref": "#/components/schemas/Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "$ref": "#/components/schemas/PageLimit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List a project's datasets",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetsListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/datasets/{id}": {
      "get": {
        "operationId": "datasetsGet",
        "summary": "Read a dataset",
        "tags": ["datasets"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "read"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The dataset's datasetId."
            },
            "required": true,
            "description": "The dataset's datasetId."
          }
        ],
        "responses": {
          "200": {
            "description": "Read a dataset",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetDetail"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      },
      "post": {
        "operationId": "datasetsRevise",
        "summary": "Revise a dataset",
        "tags": ["datasets"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "operate"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The dataset's datasetId."
            },
            "required": true,
            "description": "The dataset's datasetId."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DatasetsReviseRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Revise a dataset",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatasetDetail"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/decisions": {
      "get": {
        "operationId": "decisionsList",
        "summary": "List audit decisions",
        "tags": ["decisions"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "account:read"
        },
        "x-nitsor-cursor-kind": "decisions",
        "parameters": [
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "$ref": "#/components/schemas/Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "$ref": "#/components/schemas/PageLimit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List audit decisions",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DecisionsListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/executions/detail": {
      "get": {
        "operationId": "executionDetail",
        "summary": "Describe an execution",
        "tags": ["executions"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "read"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "query",
            "name": "executionId",
            "schema": {
              "type": "string",
              "description": "An opaque persisted identifier; a blank string is refused."
            },
            "required": true
          },
          {
            "in": "query",
            "name": "kind",
            "schema": {
              "type": "string",
              "enum": ["runs", "jobs", "tasks"]
            },
            "required": true
          },
          {
            "in": "query",
            "name": "include",
            "schema": {
              "type": "string",
              "const": "stopReason"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Describe an execution",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecutionDetailResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/executions/work-items": {
      "get": {
        "operationId": "executionWorkItems",
        "summary": "List an execution's work items",
        "tags": ["executions"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "read"
        },
        "x-nitsor-cursor-kind": "execution-work-items",
        "parameters": [
          {
            "in": "query",
            "name": "runId",
            "schema": {
              "type": "string",
              "description": "An opaque persisted identifier; a blank string is refused."
            },
            "required": true
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "$ref": "#/components/schemas/Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "$ref": "#/components/schemas/PageLimit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List an execution's work items",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecutionWorkItemsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/executions": {
      "get": {
        "operationId": "executionsList",
        "summary": "List executions",
        "tags": ["executions"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "read"
        },
        "x-nitsor-cursor-kind": "executions",
        "parameters": [
          {
            "in": "query",
            "name": "kind",
            "schema": {
              "type": "string",
              "enum": ["runs", "jobs"]
            },
            "required": true
          },
          {
            "in": "query",
            "name": "from",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Milliseconds since the Unix epoch as a digit string, within the range a Date can represent."
            }
          },
          {
            "in": "query",
            "name": "to",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Milliseconds since the Unix epoch as a digit string, within the range a Date can represent."
            }
          },
          {
            "in": "query",
            "name": "projectId",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string",
              "enum": [
                "queued",
                "pilot",
                "quoting",
                "awaiting-confirmation",
                "running",
                "draining",
                "completed",
                "completed-partial",
                "failed",
                "capped",
                "submitted",
                "succeeded",
                "refused"
              ]
            }
          },
          {
            "in": "query",
            "name": "modelId",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            }
          },
          {
            "in": "query",
            "name": "modelVersion",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            }
          },
          {
            "in": "query",
            "name": "agentId",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            }
          },
          {
            "in": "query",
            "name": "executionId",
            "schema": {
              "type": "string",
              "description": "An opaque persisted identifier; a blank string is refused."
            }
          },
          {
            "in": "query",
            "name": "cancellationRequested",
            "schema": {
              "type": "string",
              "enum": ["true", "false"]
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "$ref": "#/components/schemas/Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "$ref": "#/components/schemas/PageLimit"
            }
          },
          {
            "in": "query",
            "name": "include",
            "schema": {
              "type": "string",
              "const": "stopReason"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List executions",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecutionsListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/ledger": {
      "get": {
        "operationId": "ledgerList",
        "summary": "List ledger entries",
        "tags": ["ledger"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "account:read"
        },
        "x-nitsor-cursor-kind": "ledger",
        "parameters": [
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "$ref": "#/components/schemas/Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "$ref": "#/components/schemas/PageLimit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List ledger entries",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LedgerListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/model-label-outcomes/proposal": {
      "get": {
        "operationId": "modelLabelOutcomesProposal",
        "summary": "Read what happened to one Proposal's model labels",
        "tags": ["model-label-outcomes"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "read"
        },
        "x-nitsor-cursor-kind": "model-label-outcomes-proposal",
        "parameters": [
          {
            "in": "query",
            "name": "projectId",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            },
            "required": true
          },
          {
            "in": "query",
            "name": "proposalId",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            },
            "required": true
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "$ref": "#/components/schemas/Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "$ref": "#/components/schemas/PageLimit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Read what happened to one Proposal's model labels",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelLabelOutcomeProposalResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/model-label-outcomes/task": {
      "get": {
        "operationId": "modelLabelOutcomesTask",
        "summary": "Read the model label outcomes one Task recorded",
        "tags": ["model-label-outcomes"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "read"
        },
        "x-nitsor-cursor-kind": "model-label-outcomes-task",
        "parameters": [
          {
            "in": "query",
            "name": "projectId",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            },
            "required": true
          },
          {
            "in": "query",
            "name": "taskId",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            },
            "required": true
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "$ref": "#/components/schemas/Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "$ref": "#/components/schemas/PageLimit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Read the model label outcomes one Task recorded",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelLabelOutcomeTaskResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/model-runs": {
      "post": {
        "operationId": "modelRunsCreate",
        "summary": "Run a model on Tasks, within the allowance a person confirmed",
        "tags": ["model-runs"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "projects:write"
        },
        "x-nitsor-cursor-kind": null,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModelRunsCreateRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Run a model on Tasks, within the allowance a person confirmed",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              },
              "Location": {
                "description": "The Request resource to poll for the model run's scans.",
                "schema": {
                  "type": "string",
                  "format": "uri-reference"
                }
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelRunsCreateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/model-runs/estimate": {
      "post": {
        "operationId": "modelRunsEstimate",
        "summary": "Estimate the time and GPU-seconds a model run on Tasks would take",
        "tags": ["model-runs"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "operate"
        },
        "x-nitsor-cursor-kind": null,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModelRunsEstimateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Estimate the time and GPU-seconds a model run on Tasks would take",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelRunsEstimateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/openapi.json": {
      "get": {
        "operationId": "openapiDocument",
        "summary": "Read the OpenAPI description of this API",
        "tags": ["openapi"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": null,
        "x-nitsor-cursor-kind": null,
        "security": [],
        "responses": {
          "200": {
            "description": "Read the OpenAPI description of this API",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpenApiDocument"
                }
              }
            }
          },
          "304": {
            "description": "The caller's `If-None-Match` still describes the representation, so no body is sent.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorError"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorError"
          },
          "404": {
            "$ref": "#/components/responses/NitsorError"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorError"
          },
          "413": {
            "$ref": "#/components/responses/NitsorError"
          },
          "422": {
            "$ref": "#/components/responses/NitsorError"
          },
          "429": {
            "$ref": "#/components/responses/NitsorError"
          }
        }
      }
    },
    "/api/v1/projects/{id}/assets": {
      "post": {
        "operationId": "projectAssetsAttach",
        "summary": "Bind a Source Version into a Project as a Project Asset",
        "tags": ["projects"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "operate"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The Project's projectId."
            },
            "required": true,
            "description": "The Project's projectId."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectAssetsAttachRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Bind a Source Version into a Project as a Project Asset",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectAssetsAttachResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/project-groups": {
      "post": {
        "operationId": "projectGroupsCreate",
        "summary": "Create a project group",
        "tags": ["project-groups"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "account:update"
        },
        "x-nitsor-cursor-kind": null,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectGroupsCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Create a project group",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectGroup"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      },
      "get": {
        "operationId": "projectGroupsList",
        "summary": "List the account's project groups",
        "tags": ["project-groups"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "projects:read"
        },
        "x-nitsor-cursor-kind": null,
        "responses": {
          "200": {
            "description": "List the account's project groups",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectGroupsListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/project-groups/{id}/delete": {
      "post": {
        "operationId": "projectGroupsDelete",
        "summary": "Delete a project group, keeping its projects",
        "tags": ["project-groups"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "account:update"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The group's groupId."
            },
            "required": true,
            "description": "The group's groupId."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectGroupsDeleteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Delete a project group, keeping its projects",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectGroupsDeleteResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/project-groups/{id}/move": {
      "post": {
        "operationId": "projectGroupsMove",
        "summary": "Move a project group",
        "tags": ["project-groups"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "account:update"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The group's groupId."
            },
            "required": true,
            "description": "The group's groupId."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectGroupsMoveRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Move a project group",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectGroup"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/project-groups/{id}": {
      "post": {
        "operationId": "projectGroupsRename",
        "summary": "Rename a project group",
        "tags": ["project-groups"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "account:update"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The group's groupId."
            },
            "required": true,
            "description": "The group's groupId."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectGroupsRenameRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Rename a project group",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectGroup"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/projects/{id}/service-accounts": {
      "post": {
        "operationId": "projectServiceAccountsGrant",
        "summary": "Grant a service account access to a project, or change its rung",
        "tags": ["service-accounts"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "admin"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The Project's projectId."
            },
            "required": true,
            "description": "The Project's projectId."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectServiceAccountsGrantRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Grant a service account access to a project, or change its rung",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectServiceAccountsGrantResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      },
      "get": {
        "operationId": "projectServiceAccountsList",
        "summary": "List the service accounts with access to a project",
        "tags": ["service-accounts"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "admin"
        },
        "x-nitsor-cursor-kind": "project-service-accounts",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The Project's projectId."
            },
            "required": true,
            "description": "The Project's projectId."
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "$ref": "#/components/schemas/Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "$ref": "#/components/schemas/PageLimit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List the service accounts with access to a project",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectServiceAccountsListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/projects/{id}/service-accounts/remove": {
      "post": {
        "operationId": "projectServiceAccountsRemove",
        "summary": "Remove a service account's access to a project",
        "tags": ["service-accounts"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "admin"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The Project's projectId."
            },
            "required": true,
            "description": "The Project's projectId."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectServiceAccountsRemoveRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Remove a service account's access to a project",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectServiceAccountsRemoveResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/project-shelf": {
      "get": {
        "operationId": "projectShelfList",
        "summary": "Page the project shelf: groups and readable projects",
        "tags": ["project-groups"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "projects:read"
        },
        "x-nitsor-cursor-kind": "project-shelf",
        "parameters": [
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "$ref": "#/components/schemas/Cursor"
            }
          },
          {
            "in": "query",
            "name": "folded",
            "schema": {
              "type": "string",
              "maxLength": 4000
            }
          },
          {
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Page the project shelf: groups and readable projects",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectShelfListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/projects": {
      "post": {
        "operationId": "projectsCreate",
        "summary": "Create a project",
        "tags": ["projects"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "projects:write"
        },
        "x-nitsor-cursor-kind": null,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectsCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Create a project",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      },
      "get": {
        "operationId": "projectsList",
        "summary": "List accessible projects",
        "tags": ["projects"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "read"
        },
        "x-nitsor-cursor-kind": "projects",
        "parameters": [
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "$ref": "#/components/schemas/Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "$ref": "#/components/schemas/PageLimit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List accessible projects",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectsListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/projects/{id}/group": {
      "post": {
        "operationId": "projectsSetGroup",
        "summary": "File a project into a group, or into none",
        "tags": ["project-groups"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "account:update"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The Project's projectId."
            },
            "required": true,
            "description": "The Project's projectId."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectsSetGroupRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "File a project into a group, or into none",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectsSetGroupResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/service-accounts/{id}/tokens": {
      "post": {
        "operationId": "serviceAccountTokensCreate",
        "summary": "Add a token to a service account; its secret is shown once",
        "tags": ["service-accounts"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "service-accounts:manage"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The service account's id."
            },
            "required": true,
            "description": "The service account's id."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceAccountTokensCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Add a token to a service account; its secret is shown once",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceAccountTokensCreateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/service-account-tokens/{id}/replace": {
      "post": {
        "operationId": "serviceAccountTokensReplace",
        "summary": "Replace a token with a successor under the same restriction; the secret is shown once",
        "tags": ["service-accounts"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "service-accounts:manage"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The token's id."
            },
            "required": true,
            "description": "The token's id."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceAccountTokensReplaceRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Replace a token with a successor under the same restriction; the secret is shown once",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceAccountTokensReplaceResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/service-account-tokens/{id}/revoke": {
      "post": {
        "operationId": "serviceAccountTokensRevoke",
        "summary": "Revoke a service account token now",
        "tags": ["service-accounts"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "service-accounts:manage"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The token's id."
            },
            "required": true,
            "description": "The token's id."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceAccountTokensRevokeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Revoke a service account token now",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceAccountTokensChangedResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/service-account-tokens/{id}/shorten": {
      "post": {
        "operationId": "serviceAccountTokensShorten",
        "summary": "Move a service account token's expiry earlier",
        "tags": ["service-accounts"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "service-accounts:manage"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The token's id."
            },
            "required": true,
            "description": "The token's id."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceAccountTokensShortenRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Move a service account token's expiry earlier",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceAccountTokensShortenResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/service-accounts": {
      "post": {
        "operationId": "serviceAccountsCreate",
        "summary": "Create a service account, with or without a first token whose secret is shown once",
        "tags": ["service-accounts"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "service-accounts:manage"
        },
        "x-nitsor-cursor-kind": null,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceAccountsCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Create a service account, with or without a first token whose secret is shown once",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceAccountsCreateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      },
      "get": {
        "operationId": "serviceAccountsList",
        "summary": "List the account's service accounts",
        "tags": ["service-accounts"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "service-accounts:manage"
        },
        "x-nitsor-cursor-kind": "service-accounts",
        "parameters": [
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "$ref": "#/components/schemas/Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "$ref": "#/components/schemas/ServiceAccountsPageLimit"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "$ref": "#/components/schemas/ServiceAccountStatus"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List the account's service accounts",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceAccountsListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/service-accounts/{id}/disable": {
      "post": {
        "operationId": "serviceAccountsDisable",
        "summary": "Disable a service account: every token stops until it is enabled",
        "tags": ["service-accounts"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "service-accounts:manage"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The service account's id."
            },
            "required": true,
            "description": "The service account's id."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceAccountsLifecycleRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Disable a service account: every token stops until it is enabled",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceAccountsChangedResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/service-accounts/{id}/enable": {
      "post": {
        "operationId": "serviceAccountsEnable",
        "summary": "Enable a disabled service account: its unexpired, unrevoked tokens work again",
        "tags": ["service-accounts"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "service-accounts:manage"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The service account's id."
            },
            "required": true,
            "description": "The service account's id."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceAccountsLifecycleRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Enable a disabled service account: its unexpired, unrevoked tokens work again",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceAccountsChangedResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/service-accounts/{id}": {
      "get": {
        "operationId": "serviceAccountsGet",
        "summary": "Read a service account with its tokens and project grants",
        "tags": ["service-accounts"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "service-accounts:manage"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The service account's id."
            },
            "required": true,
            "description": "The service account's id."
          }
        ],
        "responses": {
          "200": {
            "description": "Read a service account with its tokens and project grants",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceAccountDetail"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      },
      "post": {
        "operationId": "serviceAccountsUpdate",
        "summary": "Rename or describe a service account",
        "tags": ["service-accounts"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "service-accounts:manage"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The service account's id."
            },
            "required": true,
            "description": "The service account's id."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceAccountsUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Rename or describe a service account",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceAccountsChangedResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/service-accounts/{id}/retire": {
      "post": {
        "operationId": "serviceAccountsRetire",
        "summary": "Retire a service account for good: every token is revoked and its project access ends",
        "tags": ["service-accounts"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "service-accounts:manage"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The service account's id."
            },
            "required": true,
            "description": "The service account's id."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceAccountsLifecycleRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Retire a service account for good: every token is revoked and its project access ends",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceAccountsRetireResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/service-accounts/{id}/owner": {
      "post": {
        "operationId": "serviceAccountsSetOwner",
        "summary": "Name the member who answers for a service account",
        "tags": ["service-accounts"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "service-accounts:manage"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The service account's id."
            },
            "required": true,
            "description": "The service account's id."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceAccountsSetOwnerRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Name the member who answers for a service account",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceAccountsChangedResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/service-accounts/{id}/permissions": {
      "post": {
        "operationId": "serviceAccountsSetPermissions",
        "summary": "Replace the permissions a service account holds",
        "tags": ["service-accounts"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "service-accounts:manage"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The service account's id."
            },
            "required": true,
            "description": "The service account's id."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceAccountsSetPermissionsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Replace the permissions a service account holds",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceAccountsSetPermissionsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/session": {
      "get": {
        "operationId": "session",
        "summary": "Describe the current authenticated session",
        "tags": ["auth"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": null,
        "x-nitsor-cursor-kind": "session-projects",
        "parameters": [
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "$ref": "#/components/schemas/Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "$ref": "#/components/schemas/PageLimit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Describe the current authenticated session",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/sources/mask-read-presign": {
      "post": {
        "operationId": "sourceMaskReadPresign",
        "summary": "Presign mask reads for a source",
        "tags": ["sources"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "read"
        },
        "x-nitsor-cursor-kind": null,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SourceMaskReadPresignRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Presign mask reads for a source",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceMaskReadPresignResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/sources/representation/presign": {
      "post": {
        "operationId": "sourceRepresentationPresign",
        "summary": "Presign a Source or Task preview with exact integrity pins",
        "tags": ["sources"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": null,
        "x-nitsor-cursor-kind": null,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SourceRepresentationPresignRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Presign a Source or Task preview with exact integrity pins",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceRepresentationPresignResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/sources/representation": {
      "get": {
        "operationId": "sourceRepresentationStatus",
        "summary": "Read preview status under Source access or Task authority",
        "tags": ["sources"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": null,
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "query",
            "name": "sourceVersionId",
            "schema": {
              "$ref": "#/components/schemas/Sha256Digest"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "taskId",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            }
          },
          {
            "in": "query",
            "name": "variantKey",
            "schema": {
              "$ref": "#/components/schemas/Sha256Digest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Read preview status under Source access or Task authority",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceRepresentationStatus"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/sources": {
      "get": {
        "operationId": "sourcesList",
        "summary": "List registered sources",
        "tags": ["sources"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "sources:browse"
        },
        "x-nitsor-cursor-kind": "sources",
        "parameters": [
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "$ref": "#/components/schemas/Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "$ref": "#/components/schemas/PageLimit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List registered sources",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourcesListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      },
      "post": {
        "operationId": "sourcesRegister",
        "summary": "Register source objects from a storage connection",
        "tags": ["sources"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "sources:register"
        },
        "x-nitsor-cursor-kind": null,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SourceRegisterRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Register source objects from a storage connection",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Source"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/storage-connections": {
      "post": {
        "operationId": "storageConnectionsCreate",
        "summary": "Register a storage connection",
        "tags": ["storage-connections"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "storage:write"
        },
        "x-nitsor-cursor-kind": null,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StorageConnectionsCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Register a storage connection",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageConnection"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/storage-connections/{id}": {
      "get": {
        "operationId": "storageConnectionsGet",
        "summary": "Read a storage connection and the preview bytes Nitsor wrote into it",
        "tags": ["storage-connections"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "storage:read"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The storage connection's connectionId."
            },
            "required": true,
            "description": "The storage connection's connectionId."
          }
        ],
        "responses": {
          "200": {
            "description": "Read a storage connection and the preview bytes Nitsor wrote into it",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageConnectionsGetResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/storage-credential-handles": {
      "get": {
        "operationId": "storageCredentialHandlesList",
        "summary": "List the account's provisioned storage credential handles",
        "tags": ["storage-connections"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "storage:write"
        },
        "x-nitsor-cursor-kind": "storageCredentialHandles",
        "parameters": [
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "$ref": "#/components/schemas/Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "$ref": "#/components/schemas/PageLimit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List the account's provisioned storage credential handles",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageCredentialHandlesListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/storage-credentials": {
      "post": {
        "operationId": "storageCredentialsAdd",
        "summary": "Connect a bucket with your own key: test it, then seal it and create a read-only connection",
        "tags": ["storage-connections"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "account",
          "permission": "storage:write"
        },
        "x-nitsor-cursor-kind": null,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StorageCredentialsAddRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Connect a bucket with your own key: test it, then seal it and create a read-only connection",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageCredentialsAddResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/tasks/comments/attention": {
      "post": {
        "operationId": "taskCommentsAttention",
        "summary": "List task comments needing attention",
        "tags": ["task-comments"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "read"
        },
        "x-nitsor-cursor-kind": null,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskCommentAttentionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "List task comments needing attention",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskCommentPublicPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/tasks/comments/list": {
      "post": {
        "operationId": "taskCommentsList",
        "summary": "List task comments",
        "tags": ["task-comments"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "read"
        },
        "x-nitsor-cursor-kind": null,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskCommentListRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "List task comments",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskCommentPublicPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/tasks/comments/replies": {
      "post": {
        "operationId": "taskCommentsReplies",
        "summary": "List task comment replies",
        "tags": ["task-comments"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "read"
        },
        "x-nitsor-cursor-kind": null,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskCommentRepliesRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "List task comment replies",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskCommentPublicRepliesPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/tasks/comments/write": {
      "post": {
        "operationId": "taskCommentsWrite",
        "summary": "Write a task comment",
        "tags": ["task-comments"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "contribute"
        },
        "x-nitsor-cursor-kind": null,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskCommentWriteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Write a task comment",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskCommentWriteResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/taxonomy": {
      "get": {
        "operationId": "taxonomy",
        "summary": "Read the taxonomy",
        "tags": ["taxonomy"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "read"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "query",
            "name": "projectId",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "required": true
          },
          {
            "in": "query",
            "name": "branchId",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Read the taxonomy",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxonomyResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/taxonomy/bind": {
      "post": {
        "operationId": "taxonomyBind",
        "summary": "Bind the taxonomy",
        "tags": ["taxonomy"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "operate"
        },
        "x-nitsor-cursor-kind": null,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaxonomyBindRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bind the taxonomy",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaxonomyBindResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/version-graph/annotations/commit": {
      "post": {
        "operationId": "versionGraphAnnotationCommit",
        "summary": "Commit annotations",
        "tags": ["version-graph"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "contribute"
        },
        "x-nitsor-cursor-kind": null,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicVersionGraphAnnotationCommitRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Commit annotations",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionGraphAnnotationCommitResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/version-graph/branches": {
      "post": {
        "operationId": "versionGraphBranchCreate",
        "summary": "Create a version-graph branch",
        "tags": ["version-graph"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "operate"
        },
        "x-nitsor-cursor-kind": null,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VersionGraphBranchCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Create a version-graph branch",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionGraphBranchCreateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      },
      "get": {
        "operationId": "versionGraphBranchesList",
        "summary": "List version-graph branches",
        "tags": ["version-graph"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "read"
        },
        "x-nitsor-cursor-kind": "branches",
        "parameters": [
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "$ref": "#/components/schemas/Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "$ref": "#/components/schemas/PageLimit"
            }
          },
          {
            "in": "query",
            "name": "projectId",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "List version-graph branches",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionGraphBranchesListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/version-graph/commits": {
      "post": {
        "operationId": "versionGraphCommitCreate",
        "summary": "Append a version-graph commit",
        "tags": ["version-graph"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "operate"
        },
        "x-nitsor-cursor-kind": null,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VersionGraphCommitCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Append a version-graph commit",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionGraphCommit"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/version-graph/landmarks/delete": {
      "post": {
        "operationId": "versionGraphLandmarkDelete",
        "summary": "Delete a version-graph landmark",
        "tags": ["version-graph"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "operate"
        },
        "x-nitsor-cursor-kind": null,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VersionGraphLandmarkDeleteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Delete a version-graph landmark",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionGraphEventAppendResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/version-graph/landmarks": {
      "post": {
        "operationId": "versionGraphLandmarkUpsert",
        "summary": "Upsert a version-graph landmark",
        "tags": ["version-graph"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "operate"
        },
        "x-nitsor-cursor-kind": null,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VersionGraphLandmarkUpsertRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Upsert a version-graph landmark",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionGraphEventAppendResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/version-graph/merges": {
      "post": {
        "operationId": "versionGraphMerge",
        "summary": "Merge version-graph branches",
        "tags": ["version-graph"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "operate"
        },
        "x-nitsor-cursor-kind": null,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VersionGraphMergeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Merge version-graph branches",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionGraphMergeResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/version-graph/position": {
      "get": {
        "operationId": "versionGraphPosition",
        "summary": "Read the version-graph position",
        "tags": ["version-graph"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "read"
        },
        "x-nitsor-cursor-kind": "annotations",
        "parameters": [
          {
            "in": "query",
            "name": "taskId",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            }
          },
          {
            "in": "query",
            "name": "branchId",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            },
            "required": true
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "$ref": "#/components/schemas/Cursor"
            }
          },
          {
            "in": "query",
            "name": "eventSeq",
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0
            },
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "$ref": "#/components/schemas/PageLimit"
            }
          },
          {
            "in": "query",
            "name": "projectId",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Read the version-graph position",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionGraphPositionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/version-graph/project-metadata": {
      "post": {
        "operationId": "versionGraphProjectMetadataUpdate",
        "summary": "Update version-graph project metadata",
        "tags": ["version-graph"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "operate"
        },
        "x-nitsor-cursor-kind": null,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VersionGraphProjectMetadataUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update version-graph project metadata",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionGraphEventAppendResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/workflow/definition": {
      "get": {
        "operationId": "workflowDefinition",
        "summary": "Read the workflow definition",
        "tags": ["workflow"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "read"
        },
        "x-nitsor-cursor-kind": null,
        "parameters": [
          {
            "in": "query",
            "name": "branchId",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            },
            "required": true
          },
          {
            "in": "query",
            "name": "projectId",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Read the workflow definition",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDefinitionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    },
    "/api/v1/workflow/definition/bind": {
      "post": {
        "operationId": "workflowDefinitionBind",
        "summary": "Bind the workflow definition",
        "tags": ["workflow"],
        "x-nitsor-minimum-version": "0.1.0",
        "x-nitsor-scope": {
          "kind": "rung",
          "rung": "operate"
        },
        "x-nitsor-cursor-kind": null,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowDefinitionBindRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bind the workflow definition",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Nitsor-Token-Expires": {
                "$ref": "#/components/headers/TokenExpires"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowDefinitionBindResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "401": {
            "$ref": "#/components/responses/NitsorError"
          },
          "403": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "404": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "405": {
            "$ref": "#/components/responses/NitsorError"
          },
          "409": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "413": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "422": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          },
          "429": {
            "$ref": "#/components/responses/NitsorErrorAuthenticated"
          }
        }
      }
    }
  },
  "webhooks": {
    "dev.nitsor.request.completed.v1": {
      "post": {
        "operationId": "webhookRequestCompleted",
        "summary": "A Request reached a terminal state",
        "description": "Delivered to a subscribed endpoint with the `X-Signature-256`, `X-Nitsor-Signature-Timestamp` and `X-Nitsor-Key-Id` headers. The webhook management routes are ratified targets and are not served yet.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEventEnvelope"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "The endpoint accepted the delivery."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Cursor": {
        "type": "string",
        "minLength": 1
      },
      "PageLimit": {
        "type": "integer",
        "minimum": 1,
        "maximum": 100
      },
      "AsyncRequestOperation": {
        "type": "string",
        "enum": [
          "import",
          "export",
          "model-run",
          "report",
          "prediction-import",
          "dataset-version",
          "source-representation"
        ]
      },
      "AsyncRequestState": {
        "type": "string",
        "enum": ["queued", "running", "succeeded", "failed", "cancelled"]
      },
      "BlindCheckPlanRateRequest": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "planId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "samplingRateBasisPoints": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10000
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": ["projectId", "planId", "samplingRateBasisPoints", "idempotencyKey"],
        "additionalProperties": false
      },
      "BlindCheckPlanStartRequest": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "branchId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "stageId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "targetRateBasisPoints": {
            "type": "integer",
            "minimum": 100,
            "maximum": 5000
          },
          "allowedFailures": {
            "anyOf": [
              {
                "type": "number",
                "const": 0
              },
              {
                "type": "number",
                "const": 1
              },
              {
                "type": "number",
                "const": 2
              }
            ]
          },
          "samplingRateBasisPoints": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10000
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": ["projectId", "branchId", "stageId", "targetRateBasisPoints", "idempotencyKey"],
        "additionalProperties": false
      },
      "BlindCheckPlanStopRequest": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "planId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": ["projectId", "planId", "idempotencyKey"],
        "additionalProperties": false
      },
      "DatasetVersionsAccessRequest": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "assignment": {
                "$ref": "#/components/schemas/DatasetAccessAssignment"
              },
              "expectedManifestHash": {
                "$ref": "#/components/schemas/Sha256Digest"
              },
              "installationId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              }
            },
            "required": ["assignment", "installationId"],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "assignment": {
                "$ref": "#/components/schemas/DatasetAccessAssignment"
              },
              "expectedManifestHash": {
                "$ref": "#/components/schemas/Sha256Digest"
              },
              "installationId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "sessionId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              }
            },
            "required": ["assignment", "installationId", "sessionId"],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "assignment": {
                "$ref": "#/components/schemas/DatasetAccessAssignment"
              },
              "expectedManifestHash": {
                "$ref": "#/components/schemas/Sha256Digest"
              },
              "installationId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "sessionId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "verification": {
                "$ref": "#/components/schemas/DatasetAccessVerification"
              }
            },
            "required": ["assignment", "installationId", "sessionId", "verification"],
            "additionalProperties": false
          }
        ]
      },
      "DatasetAccessAssignment": {
        "type": "object",
        "properties": {
          "numWorkers": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1024
          },
          "onUneven": {
            "type": "string",
            "enum": ["strict", "pad"]
          },
          "rank": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1023
          },
          "worker": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1023
          },
          "worldSize": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1024
          }
        },
        "required": ["numWorkers", "onUneven", "rank", "worker", "worldSize"],
        "additionalProperties": false
      },
      "Sha256Digest": {
        "type": "string",
        "pattern": "^sha256:([0-9a-f]{64})$"
      },
      "DatasetAccessVerification": {
        "type": "string",
        "const": "chunk"
      },
      "DatasetVersionsCreateRequest": {
        "type": "object",
        "properties": {
          "idempotencyKey": {
            "$ref": "#/components/schemas/IdempotencyKey"
          },
          "name": {
            "$ref": "#/components/schemas/DatasetName"
          },
          "layout": {
            "$ref": "#/components/schemas/DatasetLayoutInput"
          }
        },
        "required": ["idempotencyKey"],
        "additionalProperties": false
      },
      "IdempotencyKey": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200
      },
      "DatasetName": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200,
        "x-nitsor-trim": true
      },
      "DatasetLayoutInput": {
        "type": "object",
        "properties": {
          "shardCount": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1024,
            "description": "A positive integer no greater than the Dataset Version's member count; the number of physical shards."
          }
        },
        "additionalProperties": false
      },
      "DatasetLabelsParameter": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "pattern": "^(all|(accepted|corrected|draft|model-drafts|rejected)(,(accepted|corrected|draft|model-drafts|rejected)){0,4})$"
      },
      "DatasetVersionsPinRequest": {
        "type": "object",
        "properties": {
          "manifestHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          }
        },
        "required": ["manifestHash"],
        "additionalProperties": false
      },
      "DatasetsCreateRequest": {
        "type": "object",
        "properties": {
          "holdout": {
            "$ref": "#/components/schemas/DatasetHoldout"
          },
          "layout": {
            "$ref": "#/components/schemas/DatasetLayoutInput"
          },
          "selection": {
            "$ref": "#/components/schemas/DatasetSelection"
          },
          "idempotencyKey": {
            "$ref": "#/components/schemas/IdempotencyKey"
          },
          "name": {
            "$ref": "#/components/schemas/DatasetName"
          },
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": ["idempotencyKey", "name", "projectId"],
        "additionalProperties": false
      },
      "DatasetHoldout": {
        "type": "object",
        "properties": {
          "assetIds": {
            "maxItems": 1024,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        },
        "required": ["assetIds"],
        "additionalProperties": false
      },
      "DatasetSelection": {
        "type": "object",
        "properties": {
          "all": {
            "maxItems": 7,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DatasetClause"
            },
            "description": "Each clause kind appears at most once (up to 7 clauses)."
          }
        },
        "required": ["all"],
        "additionalProperties": false
      },
      "DatasetClause": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/DatasetClauseAssetIds"
          },
          {
            "$ref": "#/components/schemas/DatasetClauseHoldout"
          },
          {
            "$ref": "#/components/schemas/DatasetClauseLabelPrefix"
          },
          {
            "$ref": "#/components/schemas/DatasetClauseSeriesRoles"
          },
          {
            "$ref": "#/components/schemas/DatasetClauseSourceIds"
          },
          {
            "$ref": "#/components/schemas/DatasetClauseProvenance"
          },
          {
            "$ref": "#/components/schemas/DatasetClauseReviewState"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "assetIds": "#/components/schemas/DatasetClauseAssetIds",
            "holdout": "#/components/schemas/DatasetClauseHoldout",
            "labelPrefix": "#/components/schemas/DatasetClauseLabelPrefix",
            "seriesRoles": "#/components/schemas/DatasetClauseSeriesRoles",
            "sourceIds": "#/components/schemas/DatasetClauseSourceIds",
            "provenance": "#/components/schemas/DatasetClauseProvenance",
            "reviewState": "#/components/schemas/DatasetClauseReviewState"
          }
        }
      },
      "DatasetClauseAssetIds": {
        "type": "object",
        "properties": {
          "assetIds": {
            "minItems": 1,
            "maxItems": 1024,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "kind": {
            "type": "string",
            "const": "assetIds"
          }
        },
        "required": ["assetIds", "kind"],
        "additionalProperties": false
      },
      "DatasetClauseHoldout": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "holdout"
          },
          "policy": {
            "type": "string",
            "enum": ["exclude", "include", "only"]
          }
        },
        "required": ["kind", "policy"],
        "additionalProperties": false
      },
      "DatasetClauseLabelPrefix": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "labelPrefix"
          },
          "prefix": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": ["kind", "prefix"],
        "additionalProperties": false
      },
      "DatasetClauseSeriesRoles": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "seriesRoles"
          },
          "seriesRoles": {
            "minItems": 1,
            "maxItems": 1024,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        },
        "required": ["kind", "seriesRoles"],
        "additionalProperties": false
      },
      "DatasetClauseSourceIds": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "sourceIds"
          },
          "sourceIds": {
            "minItems": 1,
            "maxItems": 1024,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        },
        "required": ["kind", "sourceIds"],
        "additionalProperties": false
      },
      "DatasetClauseProvenance": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "provenance"
          },
          "provenance": {
            "type": "string",
            "enum": ["any", "human-only"]
          }
        },
        "required": ["kind", "provenance"],
        "additionalProperties": false
      },
      "DatasetClauseReviewState": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "reviewState"
          },
          "state": {
            "type": "string",
            "enum": ["accepted", "any"]
          }
        },
        "required": ["kind", "state"],
        "additionalProperties": false
      },
      "DatasetsReviseRequest": {
        "type": "object",
        "properties": {
          "holdout": {
            "$ref": "#/components/schemas/DatasetHoldout"
          },
          "layout": {
            "$ref": "#/components/schemas/DatasetLayoutInput"
          },
          "selection": {
            "$ref": "#/components/schemas/DatasetSelection"
          },
          "idempotencyKey": {
            "$ref": "#/components/schemas/IdempotencyKey"
          },
          "ifRevision": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "$ref": "#/components/schemas/DatasetName"
          }
        },
        "required": ["idempotencyKey", "ifRevision"],
        "additionalProperties": false
      },
      "ModelRunsCreateRequest": {
        "type": "object",
        "properties": {
          "agentSubject": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "classMap": {
            "$ref": "#/components/schemas/ModelRunClassMap"
          },
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "taskIds": {
            "minItems": 1,
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            }
          },
          "allowanceGpuSeconds": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "idempotencyKey": {
            "$ref": "#/components/schemas/IdempotencyKey"
          },
          "rateVersion": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "replacing": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "jobId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "taskId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200,
                  "x-nitsor-trim": true
                }
              },
              "required": ["jobId", "taskId"],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "agentSubject",
          "classMap",
          "projectId",
          "taskIds",
          "allowanceGpuSeconds",
          "idempotencyKey",
          "rateVersion",
          "replacing"
        ],
        "additionalProperties": false
      },
      "ModelRunClassMap": {
        "type": "object",
        "properties": {
          "categories": {
            "minItems": 1,
            "maxItems": 16,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "classId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200,
                  "x-nitsor-trim": true
                },
                "modelClassIds": {
                  "minItems": 1,
                  "maxItems": 256,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "x-nitsor-trim": true
                  }
                }
              },
              "required": ["classId", "modelClassIds"],
              "additionalProperties": false
            }
          },
          "notProduced": {
            "maxItems": 512,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            }
          }
        },
        "required": ["categories", "notProduced"],
        "additionalProperties": false
      },
      "ModelRunsEstimateRequest": {
        "type": "object",
        "properties": {
          "agentSubject": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "classMap": {
            "$ref": "#/components/schemas/ModelRunClassMap"
          },
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "taskIds": {
            "minItems": 1,
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            }
          }
        },
        "required": ["agentSubject", "classMap", "projectId", "taskIds"],
        "additionalProperties": false
      },
      "ProjectAssetsAttachRequest": {
        "type": "object",
        "properties": {
          "bindings": {
            "minItems": 1,
            "maxItems": 8,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectAssetBindingInput"
            }
          },
          "branchId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "idempotencyKey": {
            "$ref": "#/components/schemas/IdempotencyKey"
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "The raw label must contain 1 to 200 characters. Leading and trailing whitespace is trimmed; a whitespace-only label is refused."
          }
        },
        "required": ["bindings", "branchId", "idempotencyKey", "label"],
        "additionalProperties": false
      },
      "ProjectAssetBindingInput": {
        "type": "object",
        "properties": {
          "seriesRole": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
          },
          "sourceId": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "sourceVersionId": {
            "$ref": "#/components/schemas/Sha256Digest"
          }
        },
        "required": ["seriesRole"],
        "additionalProperties": false,
        "description": "Exactly one of `sourceId` and `sourceVersionId` is present. `sourceVersionId` names one registered version; `sourceId` is a content identity shared by every registration of the same bytes, so it is accepted only while the Source has one version and refused as `SOURCE_VERSION_AMBIGUOUS` otherwise. A version is never chosen for the caller."
      },
      "ProjectGroupsCreateRequest": {
        "type": "object",
        "properties": {
          "idempotencyKey": {
            "$ref": "#/components/schemas/IdempotencyKey"
          },
          "name": {
            "type": "string",
            "maxLength": 200
          }
        },
        "required": ["idempotencyKey", "name"],
        "additionalProperties": false
      },
      "ProjectGroupsDeleteRequest": {
        "type": "object",
        "properties": {
          "idempotencyKey": {
            "$ref": "#/components/schemas/IdempotencyKey"
          }
        },
        "required": ["idempotencyKey"],
        "additionalProperties": false
      },
      "ProjectGroupsMoveRequest": {
        "type": "object",
        "properties": {
          "beforeGroupId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "idempotencyKey": {
            "$ref": "#/components/schemas/IdempotencyKey"
          }
        },
        "required": ["beforeGroupId", "idempotencyKey"],
        "additionalProperties": false
      },
      "ProjectGroupsRenameRequest": {
        "type": "object",
        "properties": {
          "idempotencyKey": {
            "$ref": "#/components/schemas/IdempotencyKey"
          },
          "name": {
            "type": "string",
            "maxLength": 200
          }
        },
        "required": ["idempotencyKey", "name"],
        "additionalProperties": false
      },
      "ProjectServiceAccountsGrantRequest": {
        "type": "object",
        "properties": {
          "idempotencyKey": {
            "$ref": "#/components/schemas/IdempotencyKey"
          },
          "rung": {
            "type": "string",
            "enum": ["read", "contribute", "operate", "admin"]
          },
          "serviceAccountId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": ["idempotencyKey", "rung", "serviceAccountId"],
        "additionalProperties": false
      },
      "ProjectServiceAccountsRemoveRequest": {
        "type": "object",
        "properties": {
          "idempotencyKey": {
            "$ref": "#/components/schemas/IdempotencyKey"
          },
          "serviceAccountId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": ["idempotencyKey", "serviceAccountId"],
        "additionalProperties": false
      },
      "ProjectsCreateRequest": {
        "type": "object",
        "properties": {
          "idempotencyKey": {
            "$ref": "#/components/schemas/IdempotencyKey"
          },
          "name": {
            "type": "string",
            "maxLength": 200
          }
        },
        "required": ["idempotencyKey", "name"]
      },
      "ProjectsSetGroupRequest": {
        "type": "object",
        "properties": {
          "groupId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "idempotencyKey": {
            "$ref": "#/components/schemas/IdempotencyKey"
          }
        },
        "required": ["groupId", "idempotencyKey"],
        "additionalProperties": false
      },
      "ServiceAccountTokensCreateRequest": {
        "type": "object",
        "properties": {
          "expiresAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "expiresInDays": {
            "$ref": "#/components/schemas/ServiceAccountTokenExpiryPreset"
          },
          "accountPermissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountPermission"
            }
          },
          "projects": {
            "description": "The projects the token is narrowed to, each one the service account is granted. A project of the account it is not granted is refused with `token_restriction_ungranted` (409). Absent or empty means every project the service account is granted, except when the caller's own personal token is restricted to projects: then absent means that token's projects, and an empty list, or one naming a project outside them, is refused with `token_restriction_beyond_issuer` (403).",
            "maxItems": 32,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "storageNote": {
            "type": "string",
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "idempotencyKey": {
            "$ref": "#/components/schemas/IdempotencyKey"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "x-nitsor-trim": true
          }
        },
        "required": ["idempotencyKey", "name"],
        "additionalProperties": false
      },
      "UtcTimestamp": {
        "type": "string",
        "format": "date-time",
        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|[+-]00:00))$",
        "description": "RFC 3339 timestamp in UTC: the offset is `Z` or `+00:00`; any other offset is refused."
      },
      "ServiceAccountTokenExpiryPreset": {
        "anyOf": [
          {
            "type": "number",
            "const": 7
          },
          {
            "type": "number",
            "const": 30
          },
          {
            "type": "number",
            "const": 90
          },
          {
            "type": "number",
            "const": 365
          }
        ]
      },
      "AccountPermission": {
        "type": "string",
        "enum": [
          "account:read",
          "account:update",
          "members:read",
          "members:write",
          "billing:read",
          "billing:write",
          "storage:read",
          "storage:write",
          "sources:register",
          "sources:browse",
          "notifications:read",
          "notifications:write",
          "projects:read",
          "projects:write",
          "work:contribute",
          "clearance:write",
          "service-accounts:manage"
        ]
      },
      "ServiceAccountTokensReplaceRequest": {
        "type": "object",
        "properties": {
          "expiresAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "expiresInDays": {
            "$ref": "#/components/schemas/ServiceAccountTokenExpiryPreset"
          },
          "idempotencyKey": {
            "$ref": "#/components/schemas/IdempotencyKey"
          },
          "overlapMs": {
            "type": "integer",
            "minimum": 0,
            "maximum": 86400000
          }
        },
        "required": ["idempotencyKey"],
        "additionalProperties": false
      },
      "ServiceAccountTokensRevokeRequest": {
        "type": "object",
        "properties": {
          "idempotencyKey": {
            "$ref": "#/components/schemas/IdempotencyKey"
          },
          "reason": {
            "type": "string",
            "maxLength": 500,
            "x-nitsor-trim": true
          }
        },
        "required": ["idempotencyKey"],
        "additionalProperties": false
      },
      "ServiceAccountTokensShortenRequest": {
        "type": "object",
        "properties": {
          "expiresAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "idempotencyKey": {
            "$ref": "#/components/schemas/IdempotencyKey"
          }
        },
        "required": ["expiresAt", "idempotencyKey"],
        "additionalProperties": false
      },
      "ServiceAccountsCreateRequest": {
        "type": "object",
        "properties": {
          "accountPermissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountPermission"
            }
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "x-nitsor-trim": true
          },
          "firstToken": {
            "description": "A token minted with the service account. It can name no project: the service account is granted none until a project admin grants it, so `projects` is refused with `token_restriction_ungranted`. A caller whose own personal token is restricted to projects is refused the same way, since its first token would default to those projects. To give such a token, omit `firstToken`, create the service account, have a project admin grant it each project with `POST /api/v1/projects/{id}/service-accounts`, then add a token with `POST /api/v1/service-accounts/{id}/tokens`.",
            "type": "object",
            "properties": {
              "expiresAt": {
                "$ref": "#/components/schemas/UtcTimestamp"
              },
              "expiresInDays": {
                "$ref": "#/components/schemas/ServiceAccountTokenExpiryPreset"
              },
              "accountPermissions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AccountPermission"
                }
              },
              "projects": {
                "description": "The projects the token is narrowed to, each one the service account is granted. A project of the account it is not granted is refused with `token_restriction_ungranted` (409). Absent or empty means every project the service account is granted, except when the caller's own personal token is restricted to projects: then absent means that token's projects, and an empty list, or one naming a project outside them, is refused with `token_restriction_beyond_issuer` (403).",
                "maxItems": 32,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                }
              },
              "storageNote": {
                "type": "string",
                "maxLength": 200,
                "x-nitsor-trim": true
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "x-nitsor-trim": true
              }
            },
            "additionalProperties": false
          },
          "idempotencyKey": {
            "$ref": "#/components/schemas/IdempotencyKey"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "x-nitsor-trim": true
          },
          "ownerEmail": {
            "description": "The address the owner signs in with, matched without regard to case against the account's active members. A request names its owner by this or by ownerMembershipId, never both.",
            "type": "string",
            "minLength": 3,
            "maxLength": 320
          },
          "ownerMembershipId": {
            "description": "The owner's membership on the account. A request names its owner by this or by ownerEmail, never both.",
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": ["accountPermissions", "idempotencyKey", "name"],
        "additionalProperties": false,
        "x-nitsor-named-fields": {
          "fields": ["ownerEmail", "ownerMembershipId"],
          "min": 0,
          "max": 1
        }
      },
      "ServiceAccountsPageLimit": {
        "type": "integer",
        "minimum": 1,
        "maximum": 25,
        "description": "Service accounts per page, 1 to 25; 25 when omitted."
      },
      "ServiceAccountStatus": {
        "type": "string",
        "enum": ["active", "disabled", "retired"]
      },
      "ServiceAccountsLifecycleRequest": {
        "type": "object",
        "properties": {
          "idempotencyKey": {
            "$ref": "#/components/schemas/IdempotencyKey"
          },
          "reason": {
            "type": "string",
            "maxLength": 500,
            "x-nitsor-trim": true
          }
        },
        "required": ["idempotencyKey"],
        "additionalProperties": false
      },
      "ServiceAccountsUpdateRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "maxLength": 500,
            "x-nitsor-trim": true
          },
          "idempotencyKey": {
            "$ref": "#/components/schemas/IdempotencyKey"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "x-nitsor-trim": true
          }
        },
        "required": ["idempotencyKey"],
        "additionalProperties": false
      },
      "ServiceAccountsSetOwnerRequest": {
        "type": "object",
        "properties": {
          "idempotencyKey": {
            "$ref": "#/components/schemas/IdempotencyKey"
          },
          "ownerEmail": {
            "description": "The address the owner signs in with, matched without regard to case against the account's active members. A request names its owner by this or by ownerMembershipId, never both.",
            "type": "string",
            "minLength": 3,
            "maxLength": 320
          },
          "ownerMembershipId": {
            "description": "The owner's membership on the account. A request names its owner by this or by ownerEmail, never both.",
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": ["idempotencyKey"],
        "additionalProperties": false,
        "x-nitsor-named-fields": {
          "fields": ["ownerEmail", "ownerMembershipId"],
          "min": 1,
          "max": 1
        }
      },
      "ServiceAccountsSetPermissionsRequest": {
        "type": "object",
        "properties": {
          "accountPermissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountPermission"
            }
          },
          "idempotencyKey": {
            "$ref": "#/components/schemas/IdempotencyKey"
          }
        },
        "required": ["accountPermissions", "idempotencyKey"],
        "additionalProperties": false
      },
      "SourceMaskReadPresignRequest": {
        "type": "object",
        "properties": {
          "branchId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "chunkHashes": {
            "maxItems": 63,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Sha256Digest"
            }
          },
          "eventSeq": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "manifestHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "sourceId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": ["branchId", "chunkHashes", "manifestHash", "projectId", "sourceId"]
      },
      "SourceRepresentationPresignRequest": {
        "type": "object",
        "properties": {
          "sourceVersionId": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "taskId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "variantKey": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "representationId": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "outputChecksum": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "plane": {
            "type": "string",
            "enum": ["axial", "coronal", "sagittal"]
          }
        },
        "required": ["sourceVersionId", "representationId", "outputChecksum"],
        "additionalProperties": false
      },
      "SourceRegisterRequest": {
        "type": "object",
        "properties": {
          "idempotencyKey": {
            "$ref": "#/components/schemas/IdempotencyKey"
          },
          "objectKeys": {
            "minItems": 1,
            "maxItems": 512,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1024
            }
          },
          "storageConnectionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": ["idempotencyKey", "objectKeys", "storageConnectionId"]
      },
      "StorageConnectionsCreateRequest": {
        "type": "object",
        "properties": {
          "bucket": {
            "type": "string",
            "minLength": 1,
            "maxLength": 63
          },
          "credentialHandle": {
            "$ref": "#/components/schemas/StorageCredentialHandleId"
          },
          "endpoint": {
            "type": "string",
            "maxLength": 2048,
            "description": "Omit for Amazon S3, Cloudflare R2 or Google Cloud Storage HMAC to use the selected provider's fixed template. A supplied endpoint must match that template exactly. Required for custom and S3-compatible connections and requests without a provider. Approved custom hosts, including arbitrary endpoints paired with sealed customer credential handles, require the exact endpoint hostname to be approved for the requesting account and `pathStyle: true`. Custom approval, creation, credential-handle rebinding and worker credential binding remain disabled until worker connect-time address checks ship. `NITSOR_STORAGE_CUSTOM_HOSTS` must remain unset or `off`; any other value, including `resolver-verified`, is refused. After that guard is removed, admission requires approval and `pathStyle: true`. Legacy requests using operator-provisioned handles retain S3-compatible behavior. An absolute `https` URL with no embedded username or password; the credentials come from the provisioned credential handle `credentialHandle` names (an id starting `sch_`). `localhost`, names ending `.localhost`, private, loopback or link-local IP address literals, and IPv6 literals that carry an IPv4 address (mapped, NAT64, 6to4) are refused on the literal hostname given; connection and signing-time requests validate that literal and its policy, not the address a later DNS resolution or worker connects to, and follow no redirect. Custom worker traffic remains disabled pending its own connect-time address checks. A deployment accepts `http` only when its operator sets `NITSOR_STORAGE_HTTP_ENDPOINTS=local-development`."
          },
          "idempotencyKey": {
            "$ref": "#/components/schemas/IdempotencyKey"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "pathStyle": {
            "type": "boolean"
          },
          "prefix": {
            "type": "string",
            "maxLength": 1024
          },
          "provider": {
            "$ref": "#/components/schemas/StorageConnectionsCreateRequestProvider"
          },
          "region": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        },
        "required": [
          "bucket",
          "credentialHandle",
          "idempotencyKey",
          "name",
          "pathStyle",
          "prefix",
          "region"
        ],
        "additionalProperties": false
      },
      "StorageCredentialHandleId": {
        "type": "string",
        "pattern": "^sch_[a-z0-9][a-z0-9_-]{0,59}$"
      },
      "StorageConnectionsCreateRequestProvider": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/StorageConnectionsCreateRequestProviderAmazonS3"
          },
          {
            "$ref": "#/components/schemas/StorageConnectionsCreateRequestProviderCloudflareR2"
          },
          {
            "$ref": "#/components/schemas/StorageConnectionsCreateRequestProviderGoogleCloudStorageHmac"
          },
          {
            "$ref": "#/components/schemas/StorageConnectionsCreateRequestProviderS3Compatible"
          },
          {
            "$ref": "#/components/schemas/StorageConnectionsCreateRequestProviderCustom"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "amazon-s3": "#/components/schemas/StorageConnectionsCreateRequestProviderAmazonS3",
            "cloudflare-r2": "#/components/schemas/StorageConnectionsCreateRequestProviderCloudflareR2",
            "google-cloud-storage-hmac": "#/components/schemas/StorageConnectionsCreateRequestProviderGoogleCloudStorageHmac",
            "s3-compatible": "#/components/schemas/StorageConnectionsCreateRequestProviderS3Compatible",
            "custom": "#/components/schemas/StorageConnectionsCreateRequestProviderCustom"
          }
        }
      },
      "StorageConnectionsCreateRequestProviderAmazonS3": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "amazon-s3"
          }
        },
        "required": ["kind"],
        "additionalProperties": false
      },
      "StorageConnectionsCreateRequestProviderCloudflareR2": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          },
          "jurisdiction": {
            "type": "string",
            "enum": ["default", "eu", "us", "fedramp"]
          },
          "kind": {
            "type": "string",
            "const": "cloudflare-r2"
          }
        },
        "required": ["accountId", "jurisdiction", "kind"],
        "additionalProperties": false
      },
      "StorageConnectionsCreateRequestProviderGoogleCloudStorageHmac": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "google-cloud-storage-hmac"
          }
        },
        "required": ["kind"],
        "additionalProperties": false
      },
      "StorageConnectionsCreateRequestProviderS3Compatible": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "s3-compatible"
          }
        },
        "required": ["kind"],
        "additionalProperties": false
      },
      "StorageConnectionsCreateRequestProviderCustom": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "custom"
          }
        },
        "required": ["kind"],
        "additionalProperties": false
      },
      "StorageCredentialsAddRequest": {
        "type": "object",
        "properties": {
          "bucket": {
            "type": "string",
            "minLength": 1,
            "maxLength": 63
          },
          "credentials": {
            "type": "object",
            "properties": {
              "accessKeyId": {
                "type": "string",
                "minLength": 16,
                "maxLength": 256,
                "format": "password"
              },
              "secretAccessKey": {
                "type": "string",
                "minLength": 16,
                "maxLength": 256,
                "format": "password"
              }
            },
            "required": ["accessKeyId", "secretAccessKey"],
            "additionalProperties": false,
            "description": "The key pair, sent once. The server tests it against the bucket, and only when the read-only check passes stores it sealed. No response, event, log or error returns it."
          },
          "endpoint": {
            "type": "string",
            "maxLength": 2048
          },
          "idempotencyKey": {
            "$ref": "#/components/schemas/IdempotencyKey"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "pathStyle": {
            "type": "boolean"
          },
          "prefix": {
            "type": "string",
            "maxLength": 1024
          },
          "provider": {
            "$ref": "#/components/schemas/StorageConnectionsCreateRequestProvider"
          },
          "region": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        },
        "required": [
          "bucket",
          "credentials",
          "idempotencyKey",
          "name",
          "pathStyle",
          "prefix",
          "region"
        ],
        "additionalProperties": false
      },
      "TaskCommentAttentionRequest": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "before": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": ["projectId"],
        "additionalProperties": false
      },
      "TaskCommentListRequest": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "taskId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "seriesId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "before": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": ["projectId", "taskId", "seriesId"],
        "additionalProperties": false
      },
      "TaskCommentRepliesRequest": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "taskId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "seriesId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "before": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "threadId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          }
        },
        "required": ["projectId", "taskId", "seriesId", "threadId"],
        "additionalProperties": false
      },
      "TaskCommentWriteRequest": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "taskId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "seriesId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "operation": {
            "$ref": "#/components/schemas/TaskCommentWriteRequestOperation"
          }
        },
        "required": ["projectId", "taskId", "seriesId", "idempotencyKey", "operation"],
        "additionalProperties": false
      },
      "TaskCommentWriteRequestOperation": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/TaskCommentWriteRequestOperationCreate"
          },
          {
            "$ref": "#/components/schemas/TaskCommentWriteRequestOperationReply"
          },
          {
            "$ref": "#/components/schemas/TaskCommentWriteRequestOperationResolve"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "create": "#/components/schemas/TaskCommentWriteRequestOperationCreate",
            "reply": "#/components/schemas/TaskCommentWriteRequestOperationReply",
            "resolve": "#/components/schemas/TaskCommentWriteRequestOperationResolve"
          }
        }
      },
      "TaskCommentWriteRequestOperationCreate": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "create"
          },
          "body": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000,
            "x-nitsor-trim": true
          },
          "issue": {
            "type": "boolean"
          },
          "anchor": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaskCommentAnchor"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": ["kind", "body", "issue", "anchor"],
        "additionalProperties": false
      },
      "TaskCommentAnchor": {
        "type": "object",
        "properties": {
          "seriesId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "slice": {
            "type": "integer",
            "minimum": 0
          },
          "x": {
            "type": "integer",
            "minimum": 0
          },
          "y": {
            "type": "integer",
            "minimum": 0
          },
          "annotationId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "annotationHash": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          }
        },
        "required": ["seriesId", "slice", "x", "y"],
        "additionalProperties": false
      },
      "TaskCommentWriteRequestOperationReply": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "reply"
          },
          "threadId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "body": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000,
            "x-nitsor-trim": true
          }
        },
        "required": ["kind", "threadId", "body"],
        "additionalProperties": false
      },
      "TaskCommentWriteRequestOperationResolve": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "resolve"
          },
          "threadId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "resolved": {
            "type": "boolean"
          }
        },
        "required": ["kind", "threadId", "resolved"],
        "additionalProperties": false
      },
      "TaxonomyBindRequest": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "branchId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "definition": {
            "$ref": "#/components/schemas/TaxonomyDefinition"
          },
          "expectedTaxonomyVersion": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "guaranteeOverrides": {
            "type": "array",
            "items": {
              "type": "boolean"
            }
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": [
          "projectId",
          "branchId",
          "definition",
          "expectedTaxonomyVersion",
          "idempotencyKey"
        ],
        "description": "Invalid definitions answer INVALID_ARGUMENT with a field path inside the request body, such as `definition.categories.1.groupId` for an unknown group on the second category. An override vector whose length differs from the category count answers INVALID_ARGUMENT with the field path `guaranteeOverrides`. A category `icon` accepts only the first sixteen `MarkIcon` names (`grid`, `folder`, `layers`, `scan`, `heart`, `lungs`, `brain`, `bone`, `cell`, `flask`, `camera`, `document`, `tag`, `star`, `bolt`, `target`); the rest are for project marks, and a category carrying one answers INVALID_ARGUMENT at `definition.categories.N.icon`. A definition stored before this rule may still return one of the others from `GET /api/v1/taxonomy`; remove it before binding that definition again."
      },
      "TaxonomyDefinition": {
        "type": "object",
        "properties": {
          "groups": {
            "minItems": 1,
            "maxItems": 64,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaxonomyGroup"
            }
          },
          "categories": {
            "minItems": 1,
            "maxItems": 512,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "archived": {
                  "type": "boolean"
                },
                "geometryKind": {
                  "type": "string",
                  "enum": ["box2d", "box3d", "landmark", "mask", "polygon"]
                },
                "guaranteeUnit": {
                  "type": "string",
                  "enum": ["component", "instance", "classSet", "interval"]
                },
                "hint": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000,
                  "x-nitsor-line-breaks": true
                },
                "icon": {
                  "$ref": "#/components/schemas/MarkIcon"
                },
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200,
                  "x-nitsor-trim": true
                },
                "fieldIds": {
                  "maxItems": 128,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "parentId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "groupId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "position": {
                  "type": "integer",
                  "minimum": 0
                },
                "color": {
                  "$ref": "#/components/schemas/TaxonomyColor"
                }
              },
              "required": ["geometryKind", "guaranteeUnit", "id", "label", "fieldIds"],
              "additionalProperties": false
            }
          },
          "fields": {
            "maxItems": 128,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "archived": {
                  "type": "boolean"
                },
                "defaultValue": {
                  "anyOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "string"
                    },
                    {
                      "maxItems": 128,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      }
                    }
                  ]
                },
                "hint": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000,
                  "x-nitsor-line-breaks": true
                },
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200,
                  "x-nitsor-trim": true
                },
                "options": {
                  "maxItems": 128,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "archived": {
                        "type": "boolean"
                      },
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "label": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200,
                        "x-nitsor-trim": true
                      }
                    },
                    "required": ["id", "label"],
                    "additionalProperties": false
                  }
                },
                "scope": {
                  "type": "string",
                  "enum": ["image", "object", "study", "volume"]
                },
                "type": {
                  "type": "string",
                  "enum": ["boolean", "multi-select", "numeric", "select", "text"]
                }
              },
              "required": ["id", "label", "scope", "type"],
              "additionalProperties": false,
              "description": "`select` and `multi-select` fields declare at least one option and no other type declares any; a `defaultValue` is a value the field's type can hold and, for selects, a declared option id."
            }
          }
        },
        "required": ["categories", "fields"],
        "additionalProperties": false,
        "description": "Category, field and group ids are unique; a category's `parentId` names another declared category and parent chains do not cycle; every `fieldIds` entry names a declared field; a category's `groupId` names a declared group, a `position` needs a `groupId`, and positions are unique within a group. `groups` is absent rather than empty."
      },
      "TaxonomyGroup": {
        "type": "object",
        "properties": {
          "color": {
            "$ref": "#/components/schemas/TaxonomyColor"
          },
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          }
        },
        "required": ["id", "label"],
        "additionalProperties": false
      },
      "TaxonomyColor": {
        "type": "string",
        "pattern": "^#[0-9a-f]{6}$"
      },
      "MarkIcon": {
        "type": "string",
        "enum": [
          "grid",
          "folder",
          "layers",
          "scan",
          "heart",
          "lungs",
          "brain",
          "bone",
          "cell",
          "flask",
          "camera",
          "document",
          "tag",
          "star",
          "bolt",
          "target",
          "eye",
          "ear",
          "hand",
          "baby",
          "stethoscope",
          "syringe",
          "pill",
          "pulse",
          "thermometer",
          "bandage",
          "droplet",
          "ribbon",
          "skull",
          "image",
          "film",
          "video",
          "aperture",
          "crosshair",
          "microscope",
          "telescope",
          "satellite",
          "radar",
          "radiation",
          "waves",
          "magnet",
          "atom",
          "test-tube",
          "chip",
          "robot",
          "binary",
          "factory",
          "wrench",
          "hammer",
          "gear",
          "pickaxe",
          "gem",
          "mountain",
          "fuel",
          "flame",
          "plane",
          "car",
          "truck",
          "ship",
          "battery",
          "plug",
          "wind",
          "sun",
          "house",
          "ruler",
          "scale",
          "cart",
          "store",
          "utensils",
          "apple",
          "book",
          "clipboard",
          "table",
          "database",
          "bar-chart",
          "line-chart",
          "pie-chart",
          "code",
          "terminal",
          "mail",
          "message",
          "languages",
          "text",
          "mic",
          "music",
          "barcode",
          "card",
          "bank",
          "calendar",
          "person",
          "people",
          "face",
          "education",
          "leaf",
          "tree",
          "sprout",
          "bird",
          "paw",
          "cloud",
          "shell",
          "globe",
          "map",
          "pin",
          "compass",
          "box",
          "archive",
          "bookmark",
          "flag",
          "key",
          "lock",
          "shield",
          "rocket",
          "lightbulb"
        ]
      },
      "PublicVersionGraphAnnotationCommitRequest": {
        "type": "object",
        "properties": {
          "answerDeletes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VersionGraphAnswerKey"
            }
          },
          "answerUpserts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VersionGraphClassificationAnswer"
            }
          },
          "branchId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "checkpoint": {
            "type": "boolean",
            "const": true
          },
          "deletes": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            }
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500,
            "x-nitsor-trim": true
          },
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "taxonomyVersion": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Sha256Digest"
              },
              {
                "type": "null"
              }
            ]
          },
          "upserts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "annotationId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200,
                  "x-nitsor-trim": true
                },
                "answers": {
                  "minItems": 1,
                  "maxItems": 128,
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VersionGraphAnnotationAnswer"
                  },
                  "description": "Sorted by `fieldId`, each field at most once."
                },
                "assetId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200,
                  "x-nitsor-trim": true
                },
                "classId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200,
                  "x-nitsor-trim": true
                },
                "geometry": {
                  "$ref": "#/components/schemas/VersionGraphGeometry"
                },
                "note": {
                  "type": "string",
                  "maxLength": 1000
                },
                "provenance": {
                  "not": {}
                },
                "reviewState": {
                  "$ref": "#/components/schemas/VersionGraphReviewState"
                }
              },
              "required": ["annotationId", "assetId", "classId", "geometry", "note", "reviewState"]
            }
          }
        },
        "required": ["branchId", "deletes", "idempotencyKey", "message", "projectId", "upserts"],
        "additionalProperties": false,
        "description": "At most 256 changes across `upserts`, `deletes`, `answerUpserts` and `answerDeletes`; an events-only batch (`checkpoint: false`) carries at least one change; an annotation id appears at most once in `upserts` and never in both `upserts` and `deletes`; a batch that writes a commit and names no `taskId` carries a `message`."
      },
      "VersionGraphAnswerKey": {
        "type": "object",
        "properties": {
          "fieldId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "scope": {
            "$ref": "#/components/schemas/VersionGraphAnswerScope"
          },
          "scopeKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          }
        },
        "required": ["fieldId", "scope", "scopeKey"],
        "additionalProperties": false
      },
      "VersionGraphAnswerScope": {
        "type": "string",
        "enum": ["image", "study", "volume"]
      },
      "VersionGraphClassificationAnswer": {
        "type": "object",
        "properties": {
          "assetId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "fieldId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "scope": {
            "$ref": "#/components/schemas/VersionGraphAnswerScope"
          },
          "scopeKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "value": {
            "$ref": "#/components/schemas/VersionGraphAnswerValue"
          }
        },
        "required": ["assetId", "fieldId", "scope", "scopeKey", "value"],
        "additionalProperties": false
      },
      "VersionGraphAnswerValue": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/VersionGraphAnswerValueBoolean"
          },
          {
            "$ref": "#/components/schemas/VersionGraphAnswerValueMultiSelect"
          },
          {
            "$ref": "#/components/schemas/VersionGraphAnswerValueNumeric"
          },
          {
            "$ref": "#/components/schemas/VersionGraphAnswerValueSelect"
          },
          {
            "$ref": "#/components/schemas/VersionGraphAnswerValueText"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "boolean": "#/components/schemas/VersionGraphAnswerValueBoolean",
            "multi-select": "#/components/schemas/VersionGraphAnswerValueMultiSelect",
            "numeric": "#/components/schemas/VersionGraphAnswerValueNumeric",
            "select": "#/components/schemas/VersionGraphAnswerValueSelect",
            "text": "#/components/schemas/VersionGraphAnswerValueText"
          }
        }
      },
      "VersionGraphAnswerValueBoolean": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "boolean"
          },
          "value": {
            "type": "boolean"
          }
        },
        "required": ["kind", "value"],
        "additionalProperties": false
      },
      "VersionGraphAnswerValueMultiSelect": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "multi-select"
          },
          "optionIds": {
            "minItems": 1,
            "maxItems": 128,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            }
          }
        },
        "required": ["kind", "optionIds"],
        "additionalProperties": false,
        "description": "`optionIds` is sorted and unique."
      },
      "VersionGraphAnswerValueNumeric": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "numeric"
          },
          "value": {
            "type": "number"
          }
        },
        "required": ["kind", "value"],
        "additionalProperties": false
      },
      "VersionGraphAnswerValueSelect": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "select"
          },
          "optionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          }
        },
        "required": ["kind", "optionId"],
        "additionalProperties": false
      },
      "VersionGraphAnswerValueText": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "text"
          },
          "value": {
            "type": "string",
            "maxLength": 1000
          }
        },
        "required": ["kind", "value"],
        "additionalProperties": false
      },
      "VersionGraphAnnotationAnswer": {
        "type": "object",
        "properties": {
          "fieldId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "value": {
            "$ref": "#/components/schemas/VersionGraphAnswerValue"
          }
        },
        "required": ["fieldId", "value"],
        "additionalProperties": false
      },
      "VersionGraphGeometry": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/VersionGraphGeometryLandmark"
          },
          {
            "$ref": "#/components/schemas/VersionGraphGeometryBox2d"
          },
          {
            "$ref": "#/components/schemas/VersionGraphGeometryBox3d"
          },
          {
            "$ref": "#/components/schemas/VersionGraphGeometryMask"
          },
          {
            "$ref": "#/components/schemas/VersionGraphGeometryStroke"
          },
          {
            "$ref": "#/components/schemas/VersionGraphGeometryPolygon"
          },
          {
            "$ref": "#/components/schemas/VersionGraphGeometryPolyline"
          },
          {
            "$ref": "#/components/schemas/VersionGraphGeometryLength"
          },
          {
            "$ref": "#/components/schemas/VersionGraphGeometryAngle"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "landmark": "#/components/schemas/VersionGraphGeometryLandmark",
            "box2d": "#/components/schemas/VersionGraphGeometryBox2d",
            "box3d": "#/components/schemas/VersionGraphGeometryBox3d",
            "mask": "#/components/schemas/VersionGraphGeometryMask",
            "stroke": "#/components/schemas/VersionGraphGeometryStroke",
            "polygon": "#/components/schemas/VersionGraphGeometryPolygon",
            "polyline": "#/components/schemas/VersionGraphGeometryPolyline",
            "length": "#/components/schemas/VersionGraphGeometryLength",
            "angle": "#/components/schemas/VersionGraphGeometryAngle"
          }
        },
        "description": "`box2d` and `box3d` have `min` strictly below `max` on every axis; `stroke` and `polygon` carry flat finite `u,v` pairs, at least 2 points for a stroke and 3 for a polygon, and at most 2048 points. `polyline`, `length` and `angle` live in volume coordinates, like a landmark: each vertex is `x,y` as fractions of the volume's extent and `z` as the storage slice index. A polyline carries flat finite `x,y,z` triples, 2 to 2048 vertices, open and never closed, with no vertex repeating the one before it. A length's `start` and `end` differ, and each of an angle's `from` and `to` differs from its `vertex`. A length or an angle is stored with its two ends or arms in position order (by `z`, then `y`, then `x`), so one drawn the other way round reads back swapped. No measured value is stored."
      },
      "VersionGraphGeometryLandmark": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "landmark"
          },
          "position": {
            "$ref": "#/components/schemas/VersionGraphLandmarkPosition"
          }
        },
        "required": ["kind", "position"]
      },
      "VersionGraphLandmarkPosition": {
        "type": "object",
        "properties": {
          "x": {
            "type": "number"
          },
          "y": {
            "type": "number"
          },
          "z": {
            "type": "number"
          }
        },
        "required": ["x", "y", "z"]
      },
      "VersionGraphGeometryBox2d": {
        "type": "object",
        "properties": {
          "axis": {
            "type": "string",
            "enum": ["x", "y", "z"]
          },
          "kind": {
            "type": "string",
            "const": "box2d"
          },
          "max": {
            "type": "object",
            "properties": {
              "u": {
                "type": "number"
              },
              "v": {
                "type": "number"
              }
            },
            "required": ["u", "v"]
          },
          "min": {
            "type": "object",
            "properties": {
              "u": {
                "type": "number"
              },
              "v": {
                "type": "number"
              }
            },
            "required": ["u", "v"]
          },
          "sliceIndex": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": ["axis", "kind", "max", "min", "sliceIndex"]
      },
      "VersionGraphGeometryBox3d": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "box3d"
          },
          "max": {
            "$ref": "#/components/schemas/VersionGraphLandmarkPosition"
          },
          "min": {
            "$ref": "#/components/schemas/VersionGraphLandmarkPosition"
          }
        },
        "required": ["kind", "max", "min"]
      },
      "VersionGraphGeometryMask": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "mask"
          },
          "manifest": {
            "type": "object",
            "properties": {
              "chunkCount": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "manifestHash": {
                "$ref": "#/components/schemas/Sha256Digest"
              }
            },
            "required": ["chunkCount", "manifestHash"]
          }
        },
        "required": ["kind", "manifest"]
      },
      "VersionGraphGeometryStroke": {
        "type": "object",
        "properties": {
          "axis": {
            "type": "string",
            "enum": ["x", "y", "z"]
          },
          "kind": {
            "type": "string",
            "const": "stroke"
          },
          "points": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "radius": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "sliceIndex": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": ["axis", "kind", "points", "radius", "sliceIndex"]
      },
      "VersionGraphGeometryPolygon": {
        "type": "object",
        "properties": {
          "axis": {
            "type": "string",
            "enum": ["x", "y", "z"]
          },
          "kind": {
            "type": "string",
            "const": "polygon"
          },
          "points": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "sliceIndex": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": ["axis", "kind", "points", "sliceIndex"]
      },
      "VersionGraphGeometryPolyline": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "polyline"
          },
          "points": {
            "type": "array",
            "items": {
              "type": "number"
            }
          }
        },
        "required": ["kind", "points"]
      },
      "VersionGraphGeometryLength": {
        "type": "object",
        "properties": {
          "end": {
            "$ref": "#/components/schemas/VersionGraphLandmarkPosition"
          },
          "kind": {
            "type": "string",
            "const": "length"
          },
          "start": {
            "$ref": "#/components/schemas/VersionGraphLandmarkPosition"
          }
        },
        "required": ["end", "kind", "start"]
      },
      "VersionGraphGeometryAngle": {
        "type": "object",
        "properties": {
          "from": {
            "$ref": "#/components/schemas/VersionGraphLandmarkPosition"
          },
          "kind": {
            "type": "string",
            "const": "angle"
          },
          "to": {
            "$ref": "#/components/schemas/VersionGraphLandmarkPosition"
          },
          "vertex": {
            "$ref": "#/components/schemas/VersionGraphLandmarkPosition"
          }
        },
        "required": ["from", "kind", "to", "vertex"]
      },
      "VersionGraphReviewState": {
        "type": "string",
        "enum": ["accepted", "corrected", "draft", "rejected"]
      },
      "VersionGraphBranchCreateRequest": {
        "type": "object",
        "properties": {
          "fromBranchId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "fromCommitId": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "x-nitsor-trim": true
          },
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          }
        },
        "required": ["fromBranchId", "idempotencyKey", "name", "projectId"]
      },
      "VersionGraphCommitCreateRequest": {
        "type": "object",
        "properties": {
          "branchId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500,
            "x-nitsor-trim": true
          }
        },
        "required": ["branchId", "idempotencyKey", "projectId", "message"]
      },
      "VersionGraphLandmarkDeleteRequest": {
        "type": "object",
        "properties": {
          "branchId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "annotationId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          }
        },
        "required": ["branchId", "idempotencyKey", "projectId", "annotationId"]
      },
      "VersionGraphLandmarkUpsertRequest": {
        "type": "object",
        "properties": {
          "branchId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "landmark": {
            "$ref": "#/components/schemas/VersionGraphLandmark"
          }
        },
        "required": ["branchId", "idempotencyKey", "projectId", "landmark"]
      },
      "VersionGraphLandmark": {
        "type": "object",
        "properties": {
          "annotationId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "assetId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "classId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "note": {
            "type": "string",
            "maxLength": 1000
          },
          "position": {
            "$ref": "#/components/schemas/VersionGraphLandmarkPosition"
          },
          "reviewState": {
            "$ref": "#/components/schemas/VersionGraphReviewState"
          }
        },
        "required": ["annotationId", "assetId", "classId", "note", "position", "reviewState"]
      },
      "VersionGraphMergeRequest": {
        "type": "object",
        "properties": {
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500,
            "x-nitsor-trim": true
          },
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "sourceBranchId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "targetBranchId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          }
        },
        "required": ["idempotencyKey", "message", "projectId", "sourceBranchId", "targetBranchId"]
      },
      "VersionGraphProjectMetadataUpdateRequest": {
        "type": "object",
        "properties": {
          "branchId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          }
        },
        "required": ["branchId", "idempotencyKey", "projectId", "name"]
      },
      "WorkflowDefinitionBindRequest": {
        "type": "object",
        "properties": {
          "branchId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "definition": {
            "$ref": "#/components/schemas/WorkflowDefinition"
          },
          "expectedWorkflowVersion": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          }
        },
        "required": ["branchId", "definition", "idempotencyKey", "projectId"]
      },
      "WorkflowDefinition": {
        "type": "object",
        "properties": {
          "gates": {
            "maxItems": 32,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "predicate": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                }
              },
              "required": ["id", "predicate"],
              "additionalProperties": false
            }
          },
          "maxTasks": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4096
          },
          "roles": {
            "minItems": 1,
            "maxItems": 32,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                }
              },
              "required": ["id", "label"],
              "additionalProperties": false
            }
          },
          "stages": {
            "minItems": 1,
            "maxItems": 32,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowStage"
            }
          },
          "transitions": {
            "maxItems": 64,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "from": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "router": {
                  "$ref": "#/components/schemas/WorkflowRouter"
                },
                "to": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "when": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                }
              },
              "required": ["from", "id", "router", "to", "when"],
              "additionalProperties": false
            }
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "version": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": ["gates", "maxTasks", "roles", "stages", "transitions"],
        "additionalProperties": false,
        "description": "Ids are unique within `roles`, `stages`, `transitions` and `gates`; a stage's `requiredRole` names a declared role; only `consensus-read` stages declare `readers`, and they must; only `auto-label` stages run by a runner declare `runner`; every transition names declared stages; a sampling gate below the full rate only enters a stage that judges work (`adjudicate`, `consensus-read` or `review`)."
      },
      "WorkflowStage": {
        "type": "object",
        "properties": {
          "earlierLabelVisibility": {
            "$ref": "#/components/schemas/EarlierLabelPolicy"
          },
          "earlierLabelEditing": {
            "$ref": "#/components/schemas/EarlierLabelPolicy"
          },
          "execution": {
            "type": "string",
            "enum": ["human", "runner"]
          },
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "readers": {
            "type": "integer",
            "minimum": 2,
            "maximum": 16
          },
          "requiredQualifications": {
            "maxItems": 16,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "requiredRole": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "runner": {
            "$ref": "#/components/schemas/WorkflowRunnerSettings"
          },
          "type": {
            "type": "string",
            "enum": ["adjudicate", "annotate", "auto-label", "consensus-read", "review"]
          }
        },
        "required": ["execution", "id", "requiredQualifications", "type"],
        "additionalProperties": false
      },
      "EarlierLabelPolicy": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/EarlierLabelPolicyNoOne"
          },
          {
            "$ref": "#/components/schemas/EarlierLabelPolicyThisStage"
          },
          {
            "$ref": "#/components/schemas/EarlierLabelPolicyNamedRoles"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "no-one": "#/components/schemas/EarlierLabelPolicyNoOne",
            "this-stage": "#/components/schemas/EarlierLabelPolicyThisStage",
            "named-roles": "#/components/schemas/EarlierLabelPolicyNamedRoles"
          }
        }
      },
      "EarlierLabelPolicyNoOne": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "no-one"
          }
        },
        "required": ["kind"],
        "additionalProperties": false
      },
      "EarlierLabelPolicyThisStage": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "this-stage"
          }
        },
        "required": ["kind"],
        "additionalProperties": false
      },
      "EarlierLabelPolicyNamedRoles": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "named-roles"
          },
          "roleIds": {
            "minItems": 1,
            "maxItems": 32,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        },
        "required": ["kind", "roleIds"],
        "additionalProperties": false
      },
      "WorkflowRunnerSettings": {
        "type": "object",
        "properties": {
          "agentSubject": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "categories": {
            "minItems": 1,
            "maxItems": 16,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "boxCategoryId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                }
              },
              "required": ["id"],
              "additionalProperties": false
            },
            "description": "Each category `id` appears once, and no two entries name the same `boxCategoryId`."
          },
          "promptSource": {
            "type": "string",
            "enum": ["points", "human-box", "taxonomy-text"]
          }
        },
        "required": ["agentSubject", "categories", "promptSource"],
        "additionalProperties": false
      },
      "WorkflowRouter": {
        "type": "object",
        "properties": {
          "assign": {
            "$ref": "#/components/schemas/WorkflowRouterAssign"
          },
          "capacity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4096
          },
          "gate": {
            "$ref": "#/components/schemas/WorkflowRouterGate"
          },
          "handPicking": {
            "type": "string",
            "enum": ["allowed", "in-order-only"]
          },
          "inject": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "goldRateBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  "poolRef": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": ["goldRateBps", "poolRef"],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "leaseDurationMs": {
            "type": "integer",
            "minimum": 60000,
            "maximum": 86400000
          },
          "order": {
            "type": "string",
            "enum": ["fifo", "oldest-first", "priority", "uncertainty-desc"]
          },
          "wipLimit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4096
          }
        },
        "required": [
          "assign",
          "capacity",
          "gate",
          "inject",
          "leaseDurationMs",
          "order",
          "wipLimit"
        ],
        "additionalProperties": false,
        "description": "`wipLimit` never exceeds `capacity`."
      },
      "WorkflowRouterAssign": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/WorkflowRouterAssignManual"
          },
          {
            "$ref": "#/components/schemas/WorkflowRouterAssignRule"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "manual": "#/components/schemas/WorkflowRouterAssignManual",
            "rule": "#/components/schemas/WorkflowRouterAssignRule"
          }
        }
      },
      "WorkflowRouterAssignManual": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "manual"
          }
        },
        "required": ["kind"],
        "additionalProperties": false
      },
      "WorkflowRouterAssignRule": {
        "type": "object",
        "properties": {
          "geography": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "kind": {
            "type": "string",
            "const": "rule"
          },
          "maxLoad": {
            "type": "integer",
            "minimum": 0,
            "maximum": 4096
          },
          "strategy": {
            "type": "string",
            "const": "least-loaded"
          }
        },
        "required": ["kind", "maxLoad", "strategy"],
        "additionalProperties": false
      },
      "WorkflowRouterGate": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/WorkflowRouterGateAlways"
          },
          {
            "$ref": "#/components/schemas/WorkflowRouterGateUncertaintyAbove"
          },
          {
            "$ref": "#/components/schemas/WorkflowRouterGateSample"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "always": "#/components/schemas/WorkflowRouterGateAlways",
            "uncertainty-above": "#/components/schemas/WorkflowRouterGateUncertaintyAbove",
            "sample": "#/components/schemas/WorkflowRouterGateSample"
          }
        }
      },
      "WorkflowRouterGateAlways": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "always"
          }
        },
        "required": ["kind"],
        "additionalProperties": false
      },
      "WorkflowRouterGateUncertaintyAbove": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "uncertainty-above"
          },
          "threshold": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          }
        },
        "required": ["kind", "threshold"],
        "additionalProperties": false
      },
      "WorkflowRouterGateSample": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "sample"
          },
          "rateBasisPoints": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000
          }
        },
        "required": ["kind", "rateBasisPoints"],
        "additionalProperties": false
      },
      "WebhookEventEnvelope": {
        "type": "object",
        "properties": {
          "specversion": {
            "type": "string",
            "const": "1.0"
          },
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "type": {
            "$ref": "#/components/schemas/WebhookSubscriptionEventType"
          },
          "source": {
            "type": "string",
            "minLength": 1
          },
          "time": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "attempt": {
            "type": "integer",
            "minimum": 1
          },
          "data": {
            "$ref": "#/components/schemas/WebhookRequestCompletedEventData"
          }
        },
        "required": ["specversion", "id", "type", "source", "time", "attempt", "data"],
        "additionalProperties": false
      },
      "WebhookSubscriptionEventType": {
        "type": "string",
        "const": "dev.nitsor.request.completed.v1"
      },
      "WebhookRequestCompletedEventData": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/AsyncRequestSucceeded"
          },
          {
            "$ref": "#/components/schemas/AsyncRequestFailed"
          },
          {
            "$ref": "#/components/schemas/AsyncRequestCancelled"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "state",
          "mapping": {
            "succeeded": "#/components/schemas/AsyncRequestSucceeded",
            "failed": "#/components/schemas/AsyncRequestFailed",
            "cancelled": "#/components/schemas/AsyncRequestCancelled"
          }
        }
      },
      "AsyncRequestSucceeded": {
        "type": "object",
        "properties": {
          "operationId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "operation": {
            "$ref": "#/components/schemas/AsyncRequestOperation"
          },
          "progress": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "startedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "principalId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "target": {
            "$ref": "#/components/schemas/AsyncRequestResultRef"
          },
          "actualCost": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "number",
                "minimum": 0
              },
              "currency": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": ["amount", "currency"],
            "additionalProperties": false
          },
          "retry": {
            "type": "object",
            "properties": {
              "attempt": {
                "type": "integer",
                "minimum": 0
              },
              "maxAttempts": {
                "type": "integer",
                "minimum": 1
              }
            },
            "required": ["attempt"],
            "additionalProperties": false,
            "description": "`attempt` never exceeds `maxAttempts` when a bound is declared."
          },
          "cancellable": {
            "type": "boolean"
          },
          "counts": {
            "$ref": "#/components/schemas/AsyncRequestCounts"
          },
          "reportRef": {
            "$ref": "#/components/schemas/AsyncRequestReportRef"
          },
          "revision": {
            "type": "integer",
            "minimum": 1
          },
          "cancelRequestedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "finishedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "reportExpiresAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "state": {
            "type": "string",
            "const": "succeeded"
          },
          "outcome": {
            "type": "string",
            "enum": ["succeeded", "partial_failure"]
          },
          "resultRefs": {
            "maxItems": 64,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AsyncRequestResultRef"
            }
          }
        },
        "required": [
          "operationId",
          "operation",
          "createdAt",
          "principalId",
          "cancellable",
          "counts",
          "reportRef",
          "revision",
          "finishedAt",
          "state",
          "outcome",
          "resultRefs"
        ],
        "additionalProperties": false
      },
      "AsyncRequestResultRef": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": ["kind", "id"],
        "additionalProperties": false
      },
      "AsyncRequestCounts": {
        "type": "object",
        "properties": {
          "submitted": {
            "type": "integer",
            "minimum": 0
          },
          "pending": {
            "type": "integer",
            "minimum": 0
          },
          "succeeded": {
            "type": "integer",
            "minimum": 0
          },
          "failed": {
            "type": "integer",
            "minimum": 0
          },
          "rejected": {
            "type": "integer",
            "minimum": 0
          },
          "cancelled": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": ["submitted", "pending", "succeeded", "failed", "rejected", "cancelled"],
        "additionalProperties": false,
        "description": "`submitted` equals the sum of `pending`, `succeeded`, `failed`, `rejected` and `cancelled`."
      },
      "AsyncRequestReportRef": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/AsyncRequestReportRefRetained"
          },
          {
            "$ref": "#/components/schemas/AsyncRequestReportRefExpired"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "retained": "#/components/schemas/AsyncRequestReportRefRetained",
            "expired": "#/components/schemas/AsyncRequestReportRefExpired"
          }
        }
      },
      "AsyncRequestReportRefRetained": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "retained"
          }
        },
        "required": ["kind"],
        "additionalProperties": false
      },
      "AsyncRequestReportRefExpired": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "expired"
          },
          "expiredAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          }
        },
        "required": ["kind", "expiredAt"],
        "additionalProperties": false
      },
      "AsyncRequestFailed": {
        "type": "object",
        "properties": {
          "operationId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "operation": {
            "$ref": "#/components/schemas/AsyncRequestOperation"
          },
          "progress": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "startedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "principalId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "target": {
            "$ref": "#/components/schemas/AsyncRequestResultRef"
          },
          "actualCost": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "number",
                "minimum": 0
              },
              "currency": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": ["amount", "currency"],
            "additionalProperties": false
          },
          "retry": {
            "type": "object",
            "properties": {
              "attempt": {
                "type": "integer",
                "minimum": 0
              },
              "maxAttempts": {
                "type": "integer",
                "minimum": 1
              }
            },
            "required": ["attempt"],
            "additionalProperties": false,
            "description": "`attempt` never exceeds `maxAttempts` when a bound is declared."
          },
          "cancellable": {
            "type": "boolean"
          },
          "counts": {
            "$ref": "#/components/schemas/AsyncRequestCounts"
          },
          "reportRef": {
            "$ref": "#/components/schemas/AsyncRequestReportRef"
          },
          "revision": {
            "type": "integer",
            "minimum": 1
          },
          "cancelRequestedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "finishedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "reportExpiresAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "state": {
            "type": "string",
            "const": "failed"
          },
          "outcome": {
            "type": "string",
            "const": "failed"
          },
          "resultRefs": {
            "maxItems": 0,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AsyncRequestResultRef"
            }
          },
          "error": {
            "$ref": "#/components/schemas/AsyncRequestError"
          }
        },
        "required": [
          "operationId",
          "operation",
          "createdAt",
          "principalId",
          "cancellable",
          "counts",
          "reportRef",
          "revision",
          "finishedAt",
          "state",
          "outcome",
          "error"
        ],
        "additionalProperties": false
      },
      "AsyncRequestError": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/IssueCode"
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 250
          },
          "remediation": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          }
        },
        "required": ["code", "message"],
        "additionalProperties": false
      },
      "IssueCode": {
        "type": "string",
        "enum": [
          "ACCOUNT_NOT_FOUND",
          "API_ERROR",
          "API_UNREACHABLE",
          "AUTHORIZATION_DENIED",
          "AUTH_INVALID_TOKEN",
          "AUTH_REQUIRED",
          "CHECKPOINT_REQUIRED",
          "CORRUPT_VGI",
          "CORRUPT_DICOM",
          "CORRUPT_TIFF_STACK",
          "DATASET_NAME_CONFLICT",
          "DATASET_NOT_FOUND",
          "DATASET_REVISION_CONFLICT",
          "DATASET_VERSION_NOT_FOUND",
          "DATASET_VERSION_RESOLVING",
          "DATASET_VERSION_NAME_CONFLICT",
          "DATASET_HEAD_UNCOMMITTED",
          "DATASET_NO_QUALIFYING_COMMIT",
          "DATASET_MEMBERSHIP_UNDECLARED",
          "DATASET_HARD_MEMBER_MISSING",
          "DATASET_HARD_MEMBER_EXCLUDED",
          "DATASET_SELECTION_EMPTY",
          "DATASET_OBJECT_MISSING",
          "DATASET_OBJECT_CHANGED",
          "DATASET_MEMBER_TOO_LARGE",
          "DATASET_LAYOUT_UNSATISFIABLE",
          "DATASET_BUILD_UNAVAILABLE",
          "DATASET_BUILD_INVALID",
          "DATASET_FREEZE_TIMEOUT",
          "DATASET_VERSION_CANCELLED",
          "DATASET_MANIFEST_HASH_MISMATCH",
          "DATASET_READ_SESSION_NOT_FOUND",
          "DATASET_READ_SESSION_CLOSED",
          "DATASET_VERSION_REVOKED",
          "DATASET_VERSION_TOMBSTONED",
          "DUPLICATE_SOP_INSTANCE_UID",
          "GEOMETRY_INCONSISTENT",
          "GEOMETRY_OUT_OF_RANGE",
          "IDEMPOTENCY_CONFLICT",
          "INVALID_ARGUMENT",
          "INVALID_JSON",
          "METHOD_NOT_ALLOWED",
          "MISSING_SLICE",
          "MIXED_FORMAT_FAMILIES",
          "MODEL_RUN_BUDGET_EXHAUSTED",
          "MODEL_RUN_ESTIMATE_CHANGED",
          "MODEL_RUN_ITEM_LANDS_FROM_JOB",
          "MODEL_RUN_ITEM_SETTLED",
          "MODEL_RUN_LANDED_LATE",
          "MODEL_RUN_MODEL_FAILED",
          "MODEL_RUN_MULTI_ITEM_UNSUPPORTED",
          "MODEL_RUN_NOT_OFFERED",
          "MODEL_RUN_PIN_CHANGED",
          "MODEL_RUN_REPLACEMENT_CHANGED",
          "MODEL_RUN_REPORT_EXPIRED",
          "MODEL_RUN_REQUEST_STOPPING",
          "MODEL_RUN_SCAN_TOO_LARGE",
          "MODEL_RUN_SOURCE_CHANGED",
          "MODEL_RUN_SUPERSEDED",
          "MODEL_RUN_TASK_BINDING_LOST",
          "MODEL_RUN_TASK_NOT_ELIGIBLE",
          "MODEL_RUN_TIME_LIMIT",
          "NO_VALID_DICOM_SLICES",
          "PROJECT_CREATE_FAILED",
          "RATE_LIMITED",
          "REQUEST_LANDING_TOO_LARGE",
          "REQUEST_NOT_CANCELLABLE",
          "REQUEST_NOT_FOUND",
          "REQUEST_REPORT_EXPIRED",
          "REQUEST_WORKER_EXHAUSTED",
          "SERIES_IDENTITY_MISMATCH",
          "SERVER_VERSION_INCOMPATIBLE",
          "SLICE_ORDER_INCONSISTENT",
          "SOURCE_LIST_FAILED",
          "SOURCE_REGISTER_FAILED",
          "SOURCE_VERSION_AMBIGUOUS",
          "STORAGE_CONNECTION_REGISTER_FAILED",
          "STORAGE_CREDENTIAL_ENVIRONMENT_FORBIDDEN",
          "STORAGE_CREDENTIAL_HANDLE_CONFLICT",
          "STORAGE_CREDENTIAL_HANDLE_INVALID",
          "STORAGE_CREDENTIAL_HANDLE_NOT_FOUND",
          "STORAGE_CREDENTIAL_HANDLE_REQUIRED",
          "STORAGE_CREDENTIAL_PRESIGN_UNSUPPORTED",
          "STORAGE_CREDENTIAL_ROLE_MISMATCH",
          "STORAGE_CREDENTIAL_TARGET_MISMATCH",
          "STORAGE_CREDENTIAL_UNAVAILABLE",
          "STORAGE_CUSTOM_HOSTS_NOT_READY",
          "STORAGE_OBJECT_CHANGED_DURING_READ",
          "STORAGE_OBJECT_NOT_FOUND",
          "STORAGE_OBJECT_TOO_LARGE",
          "STORAGE_READ_FAILED",
          "UNEXPECTED_ERROR",
          "UNKNOWN_COMMAND",
          "UNSUPPORTED_VGI_SCENE",
          "UNSUPPORTED_PIXEL_FORMAT",
          "UNSUPPORTED_TRANSFER_SYNTAX",
          "UNRECOGNIZED_FORMAT",
          "VERSION_GRAPH_OPERATION_FAILED",
          "VGI_VOL_MISMATCH",
          "TAXONOMY_OPERATION_FAILED",
          "WORKFLOW_OPERATION_FAILED"
        ]
      },
      "AsyncRequestCancelled": {
        "type": "object",
        "properties": {
          "operationId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "operation": {
            "$ref": "#/components/schemas/AsyncRequestOperation"
          },
          "progress": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "startedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "principalId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "target": {
            "$ref": "#/components/schemas/AsyncRequestResultRef"
          },
          "actualCost": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "number",
                "minimum": 0
              },
              "currency": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": ["amount", "currency"],
            "additionalProperties": false
          },
          "retry": {
            "type": "object",
            "properties": {
              "attempt": {
                "type": "integer",
                "minimum": 0
              },
              "maxAttempts": {
                "type": "integer",
                "minimum": 1
              }
            },
            "required": ["attempt"],
            "additionalProperties": false,
            "description": "`attempt` never exceeds `maxAttempts` when a bound is declared."
          },
          "cancellable": {
            "type": "boolean"
          },
          "counts": {
            "$ref": "#/components/schemas/AsyncRequestCounts"
          },
          "reportRef": {
            "$ref": "#/components/schemas/AsyncRequestReportRef"
          },
          "revision": {
            "type": "integer",
            "minimum": 1
          },
          "cancelRequestedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "finishedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "reportExpiresAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "state": {
            "type": "string",
            "const": "cancelled"
          },
          "outcome": {
            "type": "string",
            "const": "cancelled"
          },
          "resultRefs": {
            "maxItems": 0,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AsyncRequestResultRef"
            }
          }
        },
        "required": [
          "operationId",
          "operation",
          "createdAt",
          "principalId",
          "cancellable",
          "counts",
          "reportRef",
          "revision",
          "finishedAt",
          "state",
          "outcome"
        ],
        "additionalProperties": false
      },
      "NitsorError": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/ErrorAuthorizationDenied"
          },
          {
            "$ref": "#/components/schemas/ErrorValidation"
          },
          {
            "$ref": "#/components/schemas/ErrorNotFound"
          },
          {
            "$ref": "#/components/schemas/ErrorAuth"
          },
          {
            "$ref": "#/components/schemas/ErrorMethodNotAllowed"
          },
          {
            "$ref": "#/components/schemas/ErrorCheckpointRequired"
          },
          {
            "$ref": "#/components/schemas/ErrorManifest"
          },
          {
            "$ref": "#/components/schemas/ErrorDomain"
          }
        ]
      },
      "ErrorAuthorizationDenied": {
        "type": "object",
        "properties": {
          "requestId": {
            "$ref": "#/components/schemas/RequestId"
          },
          "retryable": {
            "type": "boolean"
          },
          "reason": {
            "type": "string",
            "minLength": 1
          },
          "code": {
            "type": "string",
            "const": "AUTHORIZATION_DENIED"
          },
          "decisionId": {
            "type": "string",
            "minLength": 1
          },
          "message": {
            "type": "string",
            "minLength": 1
          },
          "missingScope": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": ["requestId", "retryable", "code", "message", "missingScope"]
      },
      "RequestId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 128,
        "pattern": "^[\\x21-\\x7e]+$"
      },
      "ErrorValidation": {
        "type": "object",
        "properties": {
          "requestId": {
            "$ref": "#/components/schemas/RequestId"
          },
          "retryable": {
            "type": "boolean"
          },
          "reason": {
            "type": "string",
            "minLength": 1
          },
          "code": {
            "type": "string",
            "const": "INVALID_ARGUMENT"
          },
          "fieldPath": {
            "type": "string",
            "minLength": 1
          },
          "message": {
            "type": "string",
            "minLength": 1
          },
          "remediation": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": ["requestId", "retryable", "code", "message"]
      },
      "ErrorNotFound": {
        "type": "object",
        "properties": {
          "requestId": {
            "$ref": "#/components/schemas/RequestId"
          },
          "retryable": {
            "type": "boolean"
          },
          "reason": {
            "type": "string",
            "minLength": 1
          },
          "code": {
            "type": "string",
            "const": "ACCOUNT_NOT_FOUND"
          },
          "message": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": ["requestId", "retryable", "code", "message"]
      },
      "ErrorAuth": {
        "type": "object",
        "properties": {
          "requestId": {
            "$ref": "#/components/schemas/RequestId"
          },
          "retryable": {
            "type": "boolean"
          },
          "reason": {
            "type": "string",
            "minLength": 1
          },
          "code": {
            "type": "string",
            "enum": ["AUTH_REQUIRED", "AUTH_INVALID_TOKEN"]
          },
          "expiredAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "message": {
            "type": "string",
            "minLength": 1
          },
          "remediation": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": ["requestId", "retryable", "code", "message", "remediation"]
      },
      "ErrorMethodNotAllowed": {
        "type": "object",
        "properties": {
          "requestId": {
            "$ref": "#/components/schemas/RequestId"
          },
          "retryable": {
            "type": "boolean"
          },
          "reason": {
            "type": "string",
            "minLength": 1
          },
          "code": {
            "type": "string",
            "const": "METHOD_NOT_ALLOWED"
          },
          "message": {
            "type": "string",
            "minLength": 1
          },
          "remediation": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": ["requestId", "retryable", "code", "message", "remediation"]
      },
      "ErrorCheckpointRequired": {
        "type": "object",
        "properties": {
          "branchId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "headEventSeq": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "lastEventSeq": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "maxUncommittedEvents": {
            "type": "number",
            "const": 256
          },
          "requestId": {
            "$ref": "#/components/schemas/RequestId"
          },
          "retryable": {
            "type": "boolean"
          },
          "reason": {
            "type": "string",
            "minLength": 1
          },
          "code": {
            "type": "string",
            "const": "CHECKPOINT_REQUIRED"
          },
          "message": {
            "type": "string",
            "minLength": 1
          },
          "remediation": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "branchId",
          "headEventSeq",
          "lastEventSeq",
          "maxUncommittedEvents",
          "requestId",
          "retryable",
          "code",
          "message",
          "remediation"
        ]
      },
      "ErrorManifest": {
        "type": "object",
        "properties": {
          "requestId": {
            "$ref": "#/components/schemas/RequestId"
          },
          "retryable": {
            "type": "boolean"
          },
          "reason": {
            "type": "string",
            "minLength": 1
          },
          "code": {
            "type": "string",
            "const": "NO_VALID_DICOM_SLICES"
          },
          "manifest": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceManifestEntry"
            }
          },
          "message": {
            "type": "string",
            "minLength": 1
          },
          "remediation": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": ["requestId", "retryable", "code", "manifest", "message", "remediation"]
      },
      "SourceManifestEntry": {
        "type": "object",
        "properties": {
          "byteSize": {
            "type": "integer",
            "minimum": 0
          },
          "checksum": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "contentFingerprint": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "errors": {
            "maxItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IngestIssue"
            }
          },
          "etag": {
            "type": "string",
            "minLength": 1
          },
          "etagWeak": {
            "type": "boolean"
          },
          "instanceNumber": {
            "type": "integer"
          },
          "objectKey": {
            "type": "string",
            "minLength": 1
          },
          "pixelDataByteOffset": {
            "type": "integer",
            "minimum": 0
          },
          "positionMm": {
            "type": "number"
          },
          "role": {
            "type": "string",
            "enum": ["descriptor", "voxel-data"]
          },
          "sopInstanceUid": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string",
            "enum": ["registered", "rejected"]
          }
        },
        "required": ["errors", "objectKey", "status"]
      },
      "IngestIssue": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/IssueCode"
          },
          "fieldPath": {
            "type": "string"
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 250
          },
          "remediation": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          }
        },
        "required": ["code", "message", "remediation"]
      },
      "ErrorDomain": {
        "type": "object",
        "properties": {
          "requestId": {
            "$ref": "#/components/schemas/RequestId"
          },
          "retryable": {
            "type": "boolean"
          },
          "reason": {
            "type": "string",
            "minLength": 1
          },
          "code": {
            "type": "string",
            "enum": [
              "API_ERROR",
              "API_UNREACHABLE",
              "CORRUPT_DICOM",
              "CORRUPT_TIFF_STACK",
              "CORRUPT_VGI",
              "DATASET_NAME_CONFLICT",
              "DATASET_NOT_FOUND",
              "DATASET_REVISION_CONFLICT",
              "DATASET_VERSION_NOT_FOUND",
              "DATASET_VERSION_RESOLVING",
              "DATASET_VERSION_NAME_CONFLICT",
              "DATASET_HEAD_UNCOMMITTED",
              "DATASET_NO_QUALIFYING_COMMIT",
              "DATASET_MEMBERSHIP_UNDECLARED",
              "DATASET_HARD_MEMBER_MISSING",
              "DATASET_HARD_MEMBER_EXCLUDED",
              "DATASET_SELECTION_EMPTY",
              "DATASET_OBJECT_MISSING",
              "DATASET_OBJECT_CHANGED",
              "DATASET_MEMBER_TOO_LARGE",
              "DATASET_LAYOUT_UNSATISFIABLE",
              "DATASET_BUILD_UNAVAILABLE",
              "DATASET_BUILD_INVALID",
              "DATASET_FREEZE_TIMEOUT",
              "DATASET_MANIFEST_HASH_MISMATCH",
              "DATASET_READ_SESSION_NOT_FOUND",
              "DATASET_READ_SESSION_CLOSED",
              "DATASET_VERSION_REVOKED",
              "DATASET_VERSION_TOMBSTONED",
              "DATASET_VERSION_CANCELLED",
              "DUPLICATE_SOP_INSTANCE_UID",
              "GEOMETRY_INCONSISTENT",
              "GEOMETRY_OUT_OF_RANGE",
              "IDEMPOTENCY_CONFLICT",
              "INVALID_JSON",
              "MISSING_SLICE",
              "MIXED_FORMAT_FAMILIES",
              "MODEL_RUN_ESTIMATE_CHANGED",
              "MODEL_RUN_MULTI_ITEM_UNSUPPORTED",
              "MODEL_RUN_SCAN_TOO_LARGE",
              "MODEL_RUN_NOT_OFFERED",
              "PROJECT_CREATE_FAILED",
              "RATE_LIMITED",
              "REQUEST_NOT_CANCELLABLE",
              "REQUEST_NOT_FOUND",
              "REQUEST_REPORT_EXPIRED",
              "SERIES_IDENTITY_MISMATCH",
              "SLICE_ORDER_INCONSISTENT",
              "SOURCE_LIST_FAILED",
              "SOURCE_REGISTER_FAILED",
              "SOURCE_VERSION_AMBIGUOUS",
              "STORAGE_CONNECTION_REGISTER_FAILED",
              "STORAGE_CREDENTIAL_ENVIRONMENT_FORBIDDEN",
              "STORAGE_CREDENTIAL_HANDLE_CONFLICT",
              "STORAGE_CREDENTIAL_HANDLE_INVALID",
              "STORAGE_CREDENTIAL_HANDLE_NOT_FOUND",
              "STORAGE_CREDENTIAL_HANDLE_REQUIRED",
              "STORAGE_CREDENTIAL_PRESIGN_UNSUPPORTED",
              "STORAGE_CREDENTIAL_ROLE_MISMATCH",
              "STORAGE_CREDENTIAL_TARGET_MISMATCH",
              "STORAGE_CREDENTIAL_UNAVAILABLE",
              "STORAGE_CUSTOM_HOSTS_NOT_READY",
              "STORAGE_OBJECT_CHANGED_DURING_READ",
              "STORAGE_OBJECT_NOT_FOUND",
              "STORAGE_OBJECT_TOO_LARGE",
              "STORAGE_READ_FAILED",
              "UNEXPECTED_ERROR",
              "UNKNOWN_COMMAND",
              "UNSUPPORTED_PIXEL_FORMAT",
              "UNSUPPORTED_TRANSFER_SYNTAX",
              "UNSUPPORTED_VGI_SCENE",
              "UNRECOGNIZED_FORMAT",
              "VERSION_GRAPH_OPERATION_FAILED",
              "VGI_VOL_MISMATCH",
              "TAXONOMY_OPERATION_FAILED",
              "WORKFLOW_OPERATION_FAILED"
            ]
          },
          "message": {
            "type": "string",
            "minLength": 1
          },
          "remediation": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": ["requestId", "retryable", "code", "message", "remediation"]
      },
      "AsyncRequest": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/AsyncRequestQueued"
          },
          {
            "$ref": "#/components/schemas/AsyncRequestRunning"
          },
          {
            "$ref": "#/components/schemas/AsyncRequestSucceededOutput"
          },
          {
            "$ref": "#/components/schemas/AsyncRequestFailedOutput"
          },
          {
            "$ref": "#/components/schemas/AsyncRequestCancelledOutput"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "state",
          "mapping": {
            "queued": "#/components/schemas/AsyncRequestQueued",
            "running": "#/components/schemas/AsyncRequestRunning",
            "succeeded": "#/components/schemas/AsyncRequestSucceededOutput",
            "failed": "#/components/schemas/AsyncRequestFailedOutput",
            "cancelled": "#/components/schemas/AsyncRequestCancelledOutput"
          }
        }
      },
      "AsyncRequestQueued": {
        "type": "object",
        "properties": {
          "operationId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "operation": {
            "$ref": "#/components/schemas/AsyncRequestOperation"
          },
          "progress": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "startedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "principalId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "target": {
            "$ref": "#/components/schemas/AsyncRequestResultRefOutput"
          },
          "actualCost": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "number",
                "minimum": 0
              },
              "currency": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": ["amount", "currency"]
          },
          "retry": {
            "type": "object",
            "properties": {
              "attempt": {
                "type": "integer",
                "minimum": 0
              },
              "maxAttempts": {
                "type": "integer",
                "minimum": 1
              }
            },
            "required": ["attempt"],
            "description": "`attempt` never exceeds `maxAttempts` when a bound is declared."
          },
          "cancellable": {
            "type": "boolean"
          },
          "counts": {
            "$ref": "#/components/schemas/AsyncRequestCountsOutput"
          },
          "reportRef": {
            "$ref": "#/components/schemas/AsyncRequestReportRefOutput"
          },
          "revision": {
            "type": "integer",
            "minimum": 1
          },
          "cancelRequestedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "state": {
            "type": "string",
            "const": "queued"
          },
          "resultRefs": {
            "maxItems": 0,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AsyncRequestResultRefOutput"
            }
          }
        },
        "required": [
          "operationId",
          "operation",
          "createdAt",
          "principalId",
          "cancellable",
          "counts",
          "reportRef",
          "revision",
          "state"
        ]
      },
      "AsyncRequestRunning": {
        "type": "object",
        "properties": {
          "operationId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "operation": {
            "$ref": "#/components/schemas/AsyncRequestOperation"
          },
          "progress": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "startedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "principalId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "target": {
            "$ref": "#/components/schemas/AsyncRequestResultRefOutput"
          },
          "actualCost": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "number",
                "minimum": 0
              },
              "currency": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": ["amount", "currency"]
          },
          "retry": {
            "type": "object",
            "properties": {
              "attempt": {
                "type": "integer",
                "minimum": 0
              },
              "maxAttempts": {
                "type": "integer",
                "minimum": 1
              }
            },
            "required": ["attempt"],
            "description": "`attempt` never exceeds `maxAttempts` when a bound is declared."
          },
          "cancellable": {
            "type": "boolean"
          },
          "counts": {
            "$ref": "#/components/schemas/AsyncRequestCountsOutput"
          },
          "reportRef": {
            "$ref": "#/components/schemas/AsyncRequestReportRefOutput"
          },
          "revision": {
            "type": "integer",
            "minimum": 1
          },
          "cancelRequestedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "state": {
            "type": "string",
            "const": "running"
          },
          "resultRefs": {
            "maxItems": 0,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AsyncRequestResultRefOutput"
            }
          }
        },
        "required": [
          "operationId",
          "operation",
          "createdAt",
          "principalId",
          "cancellable",
          "counts",
          "reportRef",
          "revision",
          "state"
        ]
      },
      "AsyncRequestsItemsResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AsyncRequestItem"
            }
          },
          "nextCursor": {
            "$ref": "#/components/schemas/NextCursor"
          }
        },
        "required": ["items", "nextCursor"]
      },
      "AsyncRequestItem": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/AsyncRequestItemPending"
          },
          {
            "$ref": "#/components/schemas/AsyncRequestItemSucceeded"
          },
          {
            "$ref": "#/components/schemas/AsyncRequestItemFailed"
          },
          {
            "$ref": "#/components/schemas/AsyncRequestItemRejected"
          },
          {
            "$ref": "#/components/schemas/AsyncRequestItemCancelled"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "status",
          "mapping": {
            "pending": "#/components/schemas/AsyncRequestItemPending",
            "succeeded": "#/components/schemas/AsyncRequestItemSucceeded",
            "failed": "#/components/schemas/AsyncRequestItemFailed",
            "rejected": "#/components/schemas/AsyncRequestItemRejected",
            "cancelled": "#/components/schemas/AsyncRequestItemCancelled"
          }
        }
      },
      "AsyncRequestItemPending": {
        "type": "object",
        "properties": {
          "itemKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "index": {
            "type": "integer",
            "minimum": 0
          },
          "status": {
            "type": "string",
            "const": "pending"
          }
        },
        "required": ["itemKey", "index", "status"]
      },
      "AsyncRequestItemSucceeded": {
        "type": "object",
        "properties": {
          "itemKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "index": {
            "type": "integer",
            "minimum": 0
          },
          "status": {
            "type": "string",
            "const": "succeeded"
          },
          "resultRef": {
            "$ref": "#/components/schemas/AsyncRequestResultRefOutput"
          },
          "reused": {
            "type": "boolean",
            "const": true
          }
        },
        "required": ["itemKey", "index", "status"],
        "description": "`reused: true` says the item's inputs had already produced the record `resultRef` names, so the Request did no work of its own; a reused item always carries `resultRef`."
      },
      "AsyncRequestItemFailed": {
        "type": "object",
        "properties": {
          "itemKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "index": {
            "type": "integer",
            "minimum": 0
          },
          "code": {
            "$ref": "#/components/schemas/IssueCode"
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 250
          },
          "remediation": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "status": {
            "type": "string",
            "const": "failed"
          }
        },
        "required": ["itemKey", "index", "code", "message", "status"]
      },
      "AsyncRequestItemRejected": {
        "type": "object",
        "properties": {
          "itemKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "index": {
            "type": "integer",
            "minimum": 0
          },
          "code": {
            "$ref": "#/components/schemas/IssueCode"
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 250
          },
          "remediation": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "status": {
            "type": "string",
            "const": "rejected"
          },
          "origin": {
            "$ref": "#/components/schemas/AsyncRequestItemOrigin"
          }
        },
        "required": ["itemKey", "index", "code", "message", "status", "origin"]
      },
      "AsyncRequestItemOrigin": {
        "type": "string",
        "enum": ["client", "server"]
      },
      "AsyncRequestItemCancelled": {
        "type": "object",
        "properties": {
          "itemKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "index": {
            "type": "integer",
            "minimum": 0
          },
          "status": {
            "type": "string",
            "const": "cancelled"
          }
        },
        "required": ["itemKey", "index", "status"]
      },
      "NextCursor": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "AsyncRequestsListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AsyncRequest"
            }
          },
          "nextCursor": {
            "$ref": "#/components/schemas/NextCursor"
          }
        },
        "required": ["items", "nextCursor"]
      },
      "BlindCheckPlan": {
        "type": "object",
        "properties": {
          "planId": {
            "type": "string",
            "minLength": 1
          },
          "projectId": {
            "type": "string",
            "minLength": 1
          },
          "branchId": {
            "type": "string",
            "minLength": 1
          },
          "stageId": {
            "type": "string",
            "minLength": 1
          },
          "agentSubject": {
            "type": "string",
            "minLength": 1
          },
          "setupVersion": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^setup_[0-9a-f]{40}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "blockedSetupVersion": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^setup_[0-9a-f]{40}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "targetRateBasisPoints": {
            "type": "integer"
          },
          "allowedFailures": {
            "type": "integer",
            "minimum": 0
          },
          "plannedChecks": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "confidence": {
            "type": "number",
            "exclusiveMinimum": 0,
            "exclusiveMaximum": 1
          },
          "samplingRateBasisPoints": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10000
          },
          "scanGrouping": {
            "type": "string",
            "const": "source_and_dicom_study"
          },
          "patientGrouping": {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "const": "not_enforced"
              },
              "reason": {
                "type": "string",
                "const": "Sources carry no patient or part key, so two scans of one patient or part in different studies can both be sampled."
              }
            },
            "required": ["state", "reason"]
          },
          "status": {
            "type": "string",
            "enum": ["running", "passed", "failed", "stopped"]
          },
          "stopReason": {
            "anyOf": [
              {
                "type": "string",
                "enum": ["stopped_by_person", "too_many_not_scored"]
              },
              {
                "type": "null"
              }
            ]
          },
          "progress": {
            "type": "object",
            "properties": {
              "sampled": {
                "type": "integer",
                "minimum": 0
              },
              "sampledOtherSetup": {
                "type": "integer",
                "minimum": 0
              },
              "skippedContaminated": {
                "type": "integer",
                "minimum": 0
              },
              "withdrawn": {
                "type": "integer",
                "minimum": 0
              },
              "voided": {
                "type": "integer",
                "minimum": 0
              },
              "awaitingSubmit": {
                "type": "integer",
                "minimum": 0
              },
              "awaitingScore": {
                "type": "integer",
                "minimum": 0
              },
              "notScored": {
                "type": "object",
                "properties": {
                  "total": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "pendingRunPlane": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "noMeasure": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": ["total", "pendingRunPlane", "noMeasure"]
              },
              "decided": {
                "type": "integer",
                "minimum": 0
              },
              "failures": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "sampled",
              "sampledOtherSetup",
              "skippedContaminated",
              "withdrawn",
              "voided",
              "awaitingSubmit",
              "awaitingScore",
              "notScored",
              "decided",
              "failures"
            ]
          },
          "statement": {
            "type": "object",
            "properties": {
              "unit": {
                "type": "string",
                "const": "scans"
              },
              "checks": {
                "type": "integer",
                "minimum": 0
              },
              "failures": {
                "type": "integer",
                "minimum": 0
              },
              "confidence": {
                "type": "number"
              },
              "upperBound": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "upperBoundPercent": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              }
            },
            "required": [
              "unit",
              "checks",
              "failures",
              "confidence",
              "upperBound",
              "upperBoundPercent"
            ]
          },
          "chanceOfPassing": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "trueRate": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "exclusiveMaximum": 1
                },
                "probability": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                }
              },
              "required": ["trueRate", "probability"]
            }
          },
          "scansToComplete": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "capacity": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": ["none_needed", "queued_expected_to_cover", "more_scans_needed"]
                  },
                  "queuedAtStage": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "queuedUpstream": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "checksNeeded": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "scansNeededAtRate": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "message": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "state",
                  "queuedAtStage",
                  "queuedUpstream",
                  "checksNeeded",
                  "scansNeededAtRate",
                  "message"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "startedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "startedBy": {
            "$ref": "#/components/schemas/Principal"
          },
          "finishedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          }
        },
        "required": [
          "planId",
          "projectId",
          "branchId",
          "stageId",
          "agentSubject",
          "setupVersion",
          "blockedSetupVersion",
          "targetRateBasisPoints",
          "allowedFailures",
          "plannedChecks",
          "confidence",
          "samplingRateBasisPoints",
          "scanGrouping",
          "patientGrouping",
          "status",
          "stopReason",
          "progress",
          "statement",
          "chanceOfPassing",
          "scansToComplete",
          "capacity",
          "startedAt",
          "startedBy"
        ]
      },
      "Principal": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/PrincipalUser"
          },
          {
            "$ref": "#/components/schemas/PrincipalAgent"
          },
          {
            "$ref": "#/components/schemas/PrincipalSystem"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "user": "#/components/schemas/PrincipalUser",
            "agent": "#/components/schemas/PrincipalAgent",
            "system": "#/components/schemas/PrincipalSystem"
          }
        }
      },
      "PrincipalUser": {
        "type": "object",
        "properties": {
          "issuer": {
            "type": "string",
            "minLength": 1
          },
          "subject": {
            "type": "string",
            "minLength": 1
          },
          "type": {
            "type": "string",
            "const": "user"
          }
        },
        "required": ["issuer", "subject", "type"]
      },
      "PrincipalAgent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "type": {
            "type": "string",
            "const": "agent"
          }
        },
        "required": ["id", "type"]
      },
      "PrincipalSystem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "type": {
            "type": "string",
            "const": "system"
          }
        },
        "required": ["id", "type"]
      },
      "BlindCheckPlanListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BlindCheckPlan"
            }
          },
          "nextCursor": {
            "$ref": "#/components/schemas/NextCursor"
          }
        },
        "required": ["items", "nextCursor"]
      },
      "BlindCheckListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BlindCheck"
            }
          },
          "nextCursor": {
            "$ref": "#/components/schemas/NextCursor"
          }
        },
        "required": ["items", "nextCursor"]
      },
      "BlindCheck": {
        "type": "object",
        "properties": {
          "checkId": {
            "type": "string",
            "minLength": 1
          },
          "planId": {
            "type": "string",
            "minLength": 1
          },
          "blindTaskId": {
            "type": "string",
            "minLength": 1
          },
          "submittedTaskId": {
            "type": "string",
            "minLength": 1
          },
          "sendBacks": {
            "type": "integer",
            "minimum": 0
          },
          "revealTaskId": {
            "type": "string",
            "minLength": 1
          },
          "revealStanding": {
            "anyOf": [
              {
                "type": "string",
                "enum": ["final", "provisional", "superseded"]
              },
              {
                "type": "null"
              }
            ]
          },
          "assetId": {
            "type": "string",
            "minLength": 1
          },
          "jobId": {
            "type": "string",
            "minLength": 1
          },
          "setupVersion": {
            "type": "string",
            "pattern": "^setup_[0-9a-f]{40}$"
          },
          "counted": {
            "type": "boolean"
          },
          "state": {
            "type": "string",
            "enum": ["submitted", "scored"]
          },
          "labelsRoot": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "labelCount": {
            "type": "integer",
            "minimum": 0
          },
          "position": {
            "type": "object",
            "properties": {
              "branchId": {
                "type": "string",
                "minLength": 1
              },
              "eventSeq": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": ["branchId", "eventSeq"]
          },
          "submittedBy": {
            "$ref": "#/components/schemas/Principal"
          },
          "scanFailed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "counts": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "keptAsIs": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "styleFix": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "smallFix": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "bigFix": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "deleted": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "wrongClass": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "missed": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "notRecorded": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "pendingRunPlane": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "notComparable": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "keptAsIs",
                  "styleFix",
                  "smallFix",
                  "bigFix",
                  "deleted",
                  "wrongClass",
                  "missed",
                  "notRecorded",
                  "pendingRunPlane",
                  "notComparable"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "rulesVersion": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "outcomeRulesVersion": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "toleranceMm": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "activeTime": {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "const": "not_recorded"
              },
              "reason": {
                "type": "string",
                "const": "editor_events_untimed"
              }
            },
            "required": ["state", "reason"]
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "submittedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "scoredAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          }
        },
        "required": [
          "checkId",
          "planId",
          "blindTaskId",
          "submittedTaskId",
          "sendBacks",
          "revealTaskId",
          "revealStanding",
          "assetId",
          "jobId",
          "setupVersion",
          "counted",
          "state",
          "labelsRoot",
          "labelCount",
          "position",
          "submittedBy",
          "scanFailed",
          "counts",
          "rulesVersion",
          "outcomeRulesVersion",
          "toleranceMm",
          "activeTime",
          "createdAt",
          "submittedAt"
        ]
      },
      "CapabilitiesResponse": {
        "type": "object",
        "properties": {
          "productVersion": {
            "type": "string",
            "minLength": 1
          },
          "apiVersion": {
            "type": "string",
            "minLength": 1
          },
          "deployment": {
            "$ref": "#/components/schemas/DeploymentTopology"
          },
          "formats": {
            "$ref": "#/components/schemas/CapabilityFormats"
          },
          "limits": {
            "$ref": "#/components/schemas/CapabilityLimits"
          },
          "minimumVersions": {
            "$ref": "#/components/schemas/RouteMinimumVersions"
          }
        },
        "required": [
          "productVersion",
          "apiVersion",
          "deployment",
          "formats",
          "limits",
          "minimumVersions"
        ]
      },
      "DeploymentTopology": {
        "type": "object",
        "properties": {
          "bulkData": {
            "type": "string",
            "enum": ["customer-object-storage"]
          },
          "controlPlane": {
            "type": "string",
            "enum": ["convex"]
          },
          "transfer": {
            "type": "string",
            "enum": ["presigned-url"]
          }
        },
        "required": ["bulkData", "controlPlane", "transfer"]
      },
      "CapabilityFormats": {
        "type": "object",
        "properties": {
          "rawSliceEncodings": {
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RawSliceEncoding"
            }
          },
          "sourceFormats": {
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceFormat"
            }
          }
        },
        "required": ["rawSliceEncodings", "sourceFormats"]
      },
      "RawSliceEncoding": {
        "type": "string",
        "enum": ["raw-uint8", "raw-int8", "raw-uint16-le", "raw-int16-le", "raw-float32-le"]
      },
      "SourceFormat": {
        "type": "string",
        "enum": [
          "dicom",
          "mrd",
          "projection-stack",
          "tiff-stack",
          "vgi-vol",
          "nsi-legacy",
          "nsi-hrvol",
          "rek",
          "flt",
          "cb",
          "sbm"
        ]
      },
      "CapabilityLimits": {
        "type": "object",
        "properties": {
          "datasetMaxMembers": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "datasetChunkBytes": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "datasetShardArtifactBytes": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "datasetLeaseSeconds": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "datasetPresignKeysPerBatch": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "idempotencyKeyRetentionHours": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "maxDisplayNameLength": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "maxIdempotencyKeyLength": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "maxIdentifierLength": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "maxPageSize": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "maxPresignObjectKeysPerRequest": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "maxRequestBodyBytes": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "maxRequestIdLength": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "maxRequestItemInputBytes": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "maxRequestItemWorkMinutes": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "maxRequestItems": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "maxRequestLandingWrites": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "maxRequestResultRefKindLength": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "maxRequestResultRefs": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "maxSourceObjectBytes": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "maxSourceObjectKeyLength": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "maxSourceObjectKeys": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "datasetMaxMembers",
          "datasetChunkBytes",
          "datasetShardArtifactBytes",
          "datasetLeaseSeconds",
          "datasetPresignKeysPerBatch",
          "idempotencyKeyRetentionHours",
          "maxDisplayNameLength",
          "maxIdempotencyKeyLength",
          "maxIdentifierLength",
          "maxPageSize",
          "maxPresignObjectKeysPerRequest",
          "maxRequestBodyBytes",
          "maxRequestIdLength",
          "maxRequestItemInputBytes",
          "maxRequestItemWorkMinutes",
          "maxRequestItems",
          "maxRequestLandingWrites",
          "maxRequestResultRefKindLength",
          "maxRequestResultRefs",
          "maxSourceObjectBytes",
          "maxSourceObjectKeyLength",
          "maxSourceObjectKeys"
        ]
      },
      "RouteMinimumVersions": {
        "type": "object",
        "propertyNames": {
          "type": "string",
          "enum": [
            "capabilitiesGet",
            "openapiDocument",
            "decisionsList",
            "ledgerList",
            "projectAssetsAttach",
            "projectsCreate",
            "projectsList",
            "session",
            "sourceMaskReadPresign",
            "sourceRepresentationStatus",
            "sourceRepresentationPresign",
            "sourcesList",
            "sourcesRegister",
            "storageConnectionsCreate",
            "storageConnectionsGet",
            "storageCredentialHandlesList",
            "storageCredentialsAdd",
            "versionGraphAnnotationCommit",
            "versionGraphBranchCreate",
            "versionGraphBranchesList",
            "versionGraphCommitCreate",
            "versionGraphLandmarkDelete",
            "versionGraphLandmarkUpsert",
            "versionGraphMerge",
            "versionGraphPosition",
            "versionGraphProjectMetadataUpdate",
            "taskCommentsList",
            "taskCommentsWrite",
            "taskCommentsReplies",
            "taskCommentsAttention",
            "executionsList",
            "executionDetail",
            "executionWorkItems",
            "modelLabelOutcomesProposal",
            "modelLabelOutcomesTask",
            "blindCheckPlanGet",
            "blindCheckPlanRate",
            "blindCheckPlanStart",
            "blindCheckPlanStop",
            "blindCheckPlansList",
            "blindChecksList",
            "taxonomy",
            "taxonomyBind",
            "workflowDefinition",
            "workflowDefinitionBind",
            "asyncRequestsGet",
            "asyncRequestsList",
            "asyncRequestsCancel",
            "asyncRequestsItems",
            "datasetsCreate",
            "datasetsList",
            "datasetsGet",
            "datasetsRevise",
            "projectGroupsCreate",
            "projectGroupsDelete",
            "projectGroupsList",
            "projectGroupsMove",
            "projectGroupsRename",
            "projectShelfList",
            "projectsSetGroup",
            "datasetVersionsCreate",
            "datasetVersionsGet",
            "datasetVersionsList",
            "datasetVersionsExclusions",
            "datasetVersionsStats",
            "datasetVersionsLabels",
            "datasetVersionsAccess",
            "datasetVersionsPin",
            "datasetVersionsDelete",
            "modelRunsCreate",
            "modelRunsEstimate",
            "serviceAccountsList",
            "serviceAccountsCreate",
            "serviceAccountsGet",
            "serviceAccountsUpdate",
            "serviceAccountsDisable",
            "serviceAccountsEnable",
            "serviceAccountsRetire",
            "serviceAccountsSetPermissions",
            "serviceAccountsSetOwner",
            "serviceAccountTokensCreate",
            "serviceAccountTokensRevoke",
            "serviceAccountTokensReplace",
            "serviceAccountTokensShorten",
            "projectServiceAccountsList",
            "projectServiceAccountsGrant",
            "projectServiceAccountsRemove"
          ]
        },
        "additionalProperties": {
          "$ref": "#/components/schemas/ProductVersion"
        },
        "required": [
          "capabilitiesGet",
          "openapiDocument",
          "decisionsList",
          "ledgerList",
          "projectAssetsAttach",
          "projectsCreate",
          "projectsList",
          "session",
          "sourceMaskReadPresign",
          "sourceRepresentationStatus",
          "sourceRepresentationPresign",
          "sourcesList",
          "sourcesRegister",
          "storageConnectionsCreate",
          "storageConnectionsGet",
          "storageCredentialHandlesList",
          "storageCredentialsAdd",
          "versionGraphAnnotationCommit",
          "versionGraphBranchCreate",
          "versionGraphBranchesList",
          "versionGraphCommitCreate",
          "versionGraphLandmarkDelete",
          "versionGraphLandmarkUpsert",
          "versionGraphMerge",
          "versionGraphPosition",
          "versionGraphProjectMetadataUpdate",
          "taskCommentsList",
          "taskCommentsWrite",
          "taskCommentsReplies",
          "taskCommentsAttention",
          "executionsList",
          "executionDetail",
          "executionWorkItems",
          "modelLabelOutcomesProposal",
          "modelLabelOutcomesTask",
          "blindCheckPlanGet",
          "blindCheckPlanRate",
          "blindCheckPlanStart",
          "blindCheckPlanStop",
          "blindCheckPlansList",
          "blindChecksList",
          "taxonomy",
          "taxonomyBind",
          "workflowDefinition",
          "workflowDefinitionBind",
          "asyncRequestsGet",
          "asyncRequestsList",
          "asyncRequestsCancel",
          "asyncRequestsItems",
          "datasetsCreate",
          "datasetsList",
          "datasetsGet",
          "datasetsRevise",
          "projectGroupsCreate",
          "projectGroupsDelete",
          "projectGroupsList",
          "projectGroupsMove",
          "projectGroupsRename",
          "projectShelfList",
          "projectsSetGroup",
          "datasetVersionsCreate",
          "datasetVersionsGet",
          "datasetVersionsList",
          "datasetVersionsExclusions",
          "datasetVersionsStats",
          "datasetVersionsLabels",
          "datasetVersionsAccess",
          "datasetVersionsPin",
          "datasetVersionsDelete",
          "modelRunsCreate",
          "modelRunsEstimate",
          "serviceAccountsList",
          "serviceAccountsCreate",
          "serviceAccountsGet",
          "serviceAccountsUpdate",
          "serviceAccountsDisable",
          "serviceAccountsEnable",
          "serviceAccountsRetire",
          "serviceAccountsSetPermissions",
          "serviceAccountsSetOwner",
          "serviceAccountTokensCreate",
          "serviceAccountTokensRevoke",
          "serviceAccountTokensReplace",
          "serviceAccountTokensShorten",
          "projectServiceAccountsList",
          "projectServiceAccountsGrant",
          "projectServiceAccountsRemove"
        ],
        "properties": {
          "capabilitiesGet": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "openapiDocument": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "decisionsList": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "ledgerList": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "projectAssetsAttach": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "projectsCreate": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "projectsList": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "session": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "sourceMaskReadPresign": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "sourceRepresentationStatus": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "sourceRepresentationPresign": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "sourcesList": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "sourcesRegister": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "storageConnectionsCreate": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "storageConnectionsGet": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "storageCredentialHandlesList": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "storageCredentialsAdd": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "versionGraphAnnotationCommit": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "versionGraphBranchCreate": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "versionGraphBranchesList": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "versionGraphCommitCreate": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "versionGraphLandmarkDelete": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "versionGraphLandmarkUpsert": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "versionGraphMerge": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "versionGraphPosition": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "versionGraphProjectMetadataUpdate": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "taskCommentsList": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "taskCommentsWrite": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "taskCommentsReplies": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "taskCommentsAttention": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "executionsList": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "executionDetail": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "executionWorkItems": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "modelLabelOutcomesProposal": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "modelLabelOutcomesTask": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "blindCheckPlanGet": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "blindCheckPlanRate": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "blindCheckPlanStart": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "blindCheckPlanStop": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "blindCheckPlansList": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "blindChecksList": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "taxonomy": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "taxonomyBind": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "workflowDefinition": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "workflowDefinitionBind": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "asyncRequestsGet": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "asyncRequestsList": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "asyncRequestsCancel": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "asyncRequestsItems": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "datasetsCreate": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "datasetsList": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "datasetsGet": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "datasetsRevise": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "projectGroupsCreate": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "projectGroupsDelete": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "projectGroupsList": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "projectGroupsMove": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "projectGroupsRename": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "projectShelfList": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "projectsSetGroup": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "datasetVersionsCreate": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "datasetVersionsGet": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "datasetVersionsList": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "datasetVersionsExclusions": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "datasetVersionsStats": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "datasetVersionsLabels": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "datasetVersionsAccess": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "datasetVersionsPin": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "datasetVersionsDelete": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "modelRunsCreate": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "modelRunsEstimate": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "serviceAccountsList": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "serviceAccountsCreate": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "serviceAccountsGet": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "serviceAccountsUpdate": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "serviceAccountsDisable": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "serviceAccountsEnable": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "serviceAccountsRetire": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "serviceAccountsSetPermissions": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "serviceAccountsSetOwner": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "serviceAccountTokensCreate": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "serviceAccountTokensRevoke": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "serviceAccountTokensReplace": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "serviceAccountTokensShorten": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "projectServiceAccountsList": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "projectServiceAccountsGrant": {
            "$ref": "#/components/schemas/ProductVersion"
          },
          "projectServiceAccountsRemove": {
            "$ref": "#/components/schemas/ProductVersion"
          }
        }
      },
      "ProductVersion": {
        "type": "string",
        "pattern": "^(?<release>\\d+(?:\\.\\d+)*)(?:-(?<prerelease>(?:0|[1-9]\\d*|\\d*[A-Za-z-][0-9A-Za-z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$"
      },
      "DatasetVersionsAccessResponse": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/DatasetVersionsAccessResponseStarted"
          },
          {
            "$ref": "#/components/schemas/DatasetVersionsAccessResponseRenewed"
          },
          {
            "$ref": "#/components/schemas/DatasetVersionsAccessResponseReceipt"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "outcome",
          "mapping": {
            "started": "#/components/schemas/DatasetVersionsAccessResponseStarted",
            "renewed": "#/components/schemas/DatasetVersionsAccessResponseRenewed",
            "receipt": "#/components/schemas/DatasetVersionsAccessResponseReceipt"
          }
        }
      },
      "DatasetVersionsAccessResponseStarted": {
        "type": "object",
        "properties": {
          "allowedShards": {
            "maxItems": 1024,
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1023
            }
          },
          "assignedMembers": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1024
          },
          "manifestHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "paddedMembers": {
            "maxItems": 1024,
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1023
            }
          },
          "sessionExpiresAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "sessionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "versionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "brokers": {
            "minItems": 1,
            "maxItems": 1024,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DatasetAccessBroker"
            }
          },
          "expiresAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "lease": {
            "type": "string",
            "minLength": 1,
            "maxLength": 16384
          },
          "outcome": {
            "type": "string",
            "const": "started"
          }
        },
        "required": [
          "allowedShards",
          "assignedMembers",
          "manifestHash",
          "paddedMembers",
          "sessionExpiresAt",
          "sessionId",
          "versionId",
          "brokers",
          "expiresAt",
          "lease",
          "outcome"
        ]
      },
      "DatasetAccessBroker": {
        "type": "object",
        "properties": {
          "connectionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "kind": {
            "type": "string",
            "enum": ["nitsor-worker", "nitsor-signer"]
          },
          "url": {
            "type": "string",
            "maxLength": 2048,
            "format": "uri"
          }
        },
        "required": ["kind", "url"]
      },
      "DatasetVersionsAccessResponseRenewed": {
        "type": "object",
        "properties": {
          "allowedShards": {
            "maxItems": 1024,
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1023
            }
          },
          "assignedMembers": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1024
          },
          "manifestHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "paddedMembers": {
            "maxItems": 1024,
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1023
            }
          },
          "sessionExpiresAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "sessionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "versionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "brokers": {
            "minItems": 1,
            "maxItems": 1024,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DatasetAccessBroker"
            }
          },
          "expiresAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "lease": {
            "type": "string",
            "minLength": 1,
            "maxLength": 16384
          },
          "outcome": {
            "type": "string",
            "const": "renewed"
          }
        },
        "required": [
          "allowedShards",
          "assignedMembers",
          "manifestHash",
          "paddedMembers",
          "sessionExpiresAt",
          "sessionId",
          "versionId",
          "brokers",
          "expiresAt",
          "lease",
          "outcome"
        ]
      },
      "DatasetVersionsAccessResponseReceipt": {
        "type": "object",
        "properties": {
          "allowedShards": {
            "maxItems": 1024,
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1023
            }
          },
          "assignedMembers": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1024
          },
          "manifestHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "paddedMembers": {
            "maxItems": 1024,
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1023
            }
          },
          "sessionExpiresAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "sessionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "versionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "confirmedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "outcome": {
            "type": "string",
            "const": "receipt"
          },
          "verification": {
            "$ref": "#/components/schemas/DatasetAccessVerification"
          }
        },
        "required": [
          "allowedShards",
          "assignedMembers",
          "manifestHash",
          "paddedMembers",
          "sessionExpiresAt",
          "sessionId",
          "versionId",
          "confirmedAt",
          "outcome",
          "verification"
        ]
      },
      "DatasetVersionsCreateResponse": {
        "type": "object",
        "properties": {
          "operationId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": ["operationId"]
      },
      "DatasetVersionsListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DatasetVersionSummary"
            }
          },
          "nextCursor": {
            "$ref": "#/components/schemas/NextCursor"
          }
        },
        "required": ["items", "nextCursor"]
      },
      "DatasetVersionSummary": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/DatasetVersionSummaryResolving"
          },
          {
            "$ref": "#/components/schemas/DatasetVersionSummaryResolved"
          },
          {
            "$ref": "#/components/schemas/DatasetVersionSummaryRefused"
          },
          {
            "$ref": "#/components/schemas/DatasetVersionSummaryTombstoned"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "state",
          "mapping": {
            "resolving": "#/components/schemas/DatasetVersionSummaryResolving",
            "resolved": "#/components/schemas/DatasetVersionSummaryResolved",
            "refused": "#/components/schemas/DatasetVersionSummaryRefused",
            "tombstoned": "#/components/schemas/DatasetVersionSummaryTombstoned"
          }
        }
      },
      "DatasetVersionSummaryResolving": {
        "type": "object",
        "properties": {
          "versionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "datasetId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "name": {
            "$ref": "#/components/schemas/DatasetName"
          },
          "commitId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "commitRule": {
            "type": "string",
            "const": "head-stopgap"
          },
          "selectionHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "holdoutHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "layoutHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "manifestHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "partial": {
            "type": "boolean",
            "const": true
          },
          "state": {
            "type": "string",
            "const": "resolving"
          }
        },
        "required": [
          "versionId",
          "datasetId",
          "projectId",
          "createdAt",
          "commitId",
          "commitRule",
          "selectionHash",
          "holdoutHash",
          "state"
        ],
        "x-nitsor-whole-version-fields": ["layoutHash", "manifestHash"],
        "description": "A Dataset Version on a list. A reader without `sources:browse` gets `partial: true` and none of layoutHash, manifestHash."
      },
      "DatasetVersionSummaryResolved": {
        "type": "object",
        "properties": {
          "versionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "datasetId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "name": {
            "$ref": "#/components/schemas/DatasetName"
          },
          "commitId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "commitRule": {
            "type": "string",
            "const": "head-stopgap"
          },
          "selectionHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "holdoutHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "layoutHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "manifestHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "partial": {
            "type": "boolean",
            "const": true
          },
          "state": {
            "type": "string",
            "const": "resolved"
          }
        },
        "required": [
          "versionId",
          "datasetId",
          "projectId",
          "createdAt",
          "commitId",
          "commitRule",
          "selectionHash",
          "holdoutHash",
          "state"
        ],
        "x-nitsor-whole-version-fields": ["layoutHash", "manifestHash"],
        "description": "A Dataset Version on a list. A reader without `sources:browse` gets `partial: true` and none of layoutHash, manifestHash."
      },
      "DatasetVersionSummaryRefused": {
        "type": "object",
        "properties": {
          "versionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "datasetId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "name": {
            "$ref": "#/components/schemas/DatasetName"
          },
          "commitId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "commitRule": {
            "type": "string",
            "const": "head-stopgap"
          },
          "selectionHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "holdoutHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "layoutHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "manifestHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "partial": {
            "type": "boolean",
            "const": true
          },
          "state": {
            "type": "string",
            "const": "refused"
          }
        },
        "required": [
          "versionId",
          "datasetId",
          "projectId",
          "createdAt",
          "commitId",
          "commitRule",
          "selectionHash",
          "holdoutHash",
          "state"
        ],
        "x-nitsor-whole-version-fields": ["layoutHash", "manifestHash"],
        "description": "A Dataset Version on a list. A reader without `sources:browse` gets `partial: true` and none of layoutHash, manifestHash."
      },
      "DatasetVersionSummaryTombstoned": {
        "type": "object",
        "properties": {
          "versionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "datasetId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "name": {
            "$ref": "#/components/schemas/DatasetName"
          },
          "commitId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "commitRule": {
            "type": "string",
            "const": "head-stopgap"
          },
          "selectionHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "holdoutHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "layoutHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "manifestHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "partial": {
            "type": "boolean",
            "const": true
          },
          "state": {
            "type": "string",
            "const": "tombstoned"
          },
          "tombstone": {
            "$ref": "#/components/schemas/DatasetVersionListTombstone"
          }
        },
        "required": [
          "versionId",
          "datasetId",
          "projectId",
          "createdAt",
          "commitId",
          "commitRule",
          "selectionHash",
          "holdoutHash",
          "state",
          "tombstone"
        ],
        "x-nitsor-whole-version-fields": ["layoutHash", "manifestHash"],
        "description": "A Dataset Version on a list. A reader without `sources:browse` gets `partial: true` and none of layoutHash, manifestHash."
      },
      "DatasetVersionListTombstone": {
        "type": "object",
        "properties": {
          "cleanup": {
            "type": "string",
            "enum": ["pending", "running", "done", "retained"]
          },
          "deletedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "graceUntil": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "previousState": {
            "type": "string",
            "enum": ["resolved", "refused"]
          }
        },
        "required": ["cleanup", "deletedAt", "graceUntil", "previousState"]
      },
      "DatasetVersion": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/DatasetVersionResolving"
          },
          {
            "$ref": "#/components/schemas/DatasetVersionResolved"
          },
          {
            "$ref": "#/components/schemas/DatasetVersionRefused"
          },
          {
            "$ref": "#/components/schemas/DatasetVersionTombstoned"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "state",
          "mapping": {
            "resolving": "#/components/schemas/DatasetVersionResolving",
            "resolved": "#/components/schemas/DatasetVersionResolved",
            "refused": "#/components/schemas/DatasetVersionRefused",
            "tombstoned": "#/components/schemas/DatasetVersionTombstoned"
          }
        }
      },
      "DatasetVersionResolving": {
        "type": "object",
        "properties": {
          "versionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "datasetId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "datasetRevision": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "$ref": "#/components/schemas/DatasetName"
          },
          "commitId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "commitRule": {
            "type": "string",
            "const": "head-stopgap"
          },
          "contentRoot": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "selectionHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "holdoutHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "taxonomyVersion": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "operationId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "exclusionCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1024
          },
          "partial": {
            "type": "boolean",
            "const": true
          },
          "state": {
            "type": "string",
            "const": "resolving"
          }
        },
        "required": [
          "versionId",
          "datasetId",
          "projectId",
          "datasetRevision",
          "commitId",
          "commitRule",
          "contentRoot",
          "selectionHash",
          "holdoutHash",
          "operationId",
          "createdAt",
          "state"
        ]
      },
      "DatasetVersionResolved": {
        "type": "object",
        "properties": {
          "versionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "datasetId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "datasetRevision": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "$ref": "#/components/schemas/DatasetName"
          },
          "commitId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "commitRule": {
            "type": "string",
            "const": "head-stopgap"
          },
          "contentRoot": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "selectionHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "holdoutHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "taxonomyVersion": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "operationId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "exclusionCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1024
          },
          "partial": {
            "type": "boolean",
            "const": true
          },
          "state": {
            "type": "string",
            "const": "resolved"
          },
          "layoutHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "memberCount": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1024
          },
          "holdoutCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1024
          },
          "shardCount": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1024
          },
          "membersPerShard": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1024
          },
          "manifest": {
            "$ref": "#/components/schemas/DatasetVersionArtifactReference"
          },
          "stats": {
            "$ref": "#/components/schemas/DatasetVersionArtifactReference"
          },
          "classIndex": {
            "$ref": "#/components/schemas/DatasetVersionArtifactReference"
          },
          "resolvedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          }
        },
        "required": [
          "versionId",
          "datasetId",
          "projectId",
          "datasetRevision",
          "commitId",
          "commitRule",
          "contentRoot",
          "selectionHash",
          "holdoutHash",
          "operationId",
          "createdAt",
          "state",
          "resolvedAt"
        ],
        "description": "A resolved Dataset Version. A reader without `sources:browse` gets `partial: true` and none of exclusionCount, layoutHash, memberCount, holdoutCount, shardCount, membersPerShard, manifest, stats, classIndex; any other reader gets them all."
      },
      "DatasetVersionArtifactReference": {
        "type": "object",
        "properties": {
          "hash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "objectKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024
          },
          "sizeBytes": {
            "type": "integer",
            "minimum": 1,
            "maximum": 67108864
          }
        },
        "required": ["hash", "objectKey", "sizeBytes"]
      },
      "DatasetVersionRefused": {
        "type": "object",
        "properties": {
          "versionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "datasetId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "datasetRevision": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "$ref": "#/components/schemas/DatasetName"
          },
          "commitId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "commitRule": {
            "type": "string",
            "const": "head-stopgap"
          },
          "contentRoot": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "selectionHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "holdoutHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "taxonomyVersion": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "operationId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "exclusionCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1024
          },
          "partial": {
            "type": "boolean",
            "const": true
          },
          "state": {
            "type": "string",
            "const": "refused"
          },
          "refusal": {
            "$ref": "#/components/schemas/DatasetVersionRefusal"
          }
        },
        "required": [
          "versionId",
          "datasetId",
          "projectId",
          "datasetRevision",
          "commitId",
          "commitRule",
          "contentRoot",
          "selectionHash",
          "holdoutHash",
          "operationId",
          "createdAt",
          "state",
          "refusal"
        ],
        "description": "A refused Dataset Version. A reader without `sources:browse` gets `partial: true`, no exclusionCount, and a refusal of its code and message only; any other reader gets the exclusionCount and the refusal's faultCount."
      },
      "DatasetVersionRefusal": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "DATASET_HEAD_UNCOMMITTED",
              "DATASET_NO_QUALIFYING_COMMIT",
              "DATASET_MEMBERSHIP_UNDECLARED",
              "DATASET_HARD_MEMBER_MISSING",
              "DATASET_HARD_MEMBER_EXCLUDED",
              "DATASET_SELECTION_EMPTY",
              "DATASET_OBJECT_MISSING",
              "DATASET_OBJECT_CHANGED",
              "DATASET_MEMBER_TOO_LARGE",
              "DATASET_LAYOUT_UNSATISFIABLE",
              "DATASET_BUILD_UNAVAILABLE",
              "STORAGE_CUSTOM_HOSTS_NOT_READY",
              "DATASET_BUILD_INVALID",
              "DATASET_FREEZE_TIMEOUT",
              "DATASET_VERSION_CANCELLED"
            ]
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024
          },
          "faultCount": {
            "type": "integer",
            "minimum": 0
          },
          "faults": {
            "maxItems": 64,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DatasetVersionFault"
            }
          },
          "faultsRef": {
            "$ref": "#/components/schemas/DatasetVersionArtifactReference"
          }
        },
        "required": ["code", "message"],
        "description": "`faults` lists at most `faultCount` faults, and a `faultCount` past the inline limit carries `faultsRef`. A refusal without `faultCount` lists no faults and carries no `faultsRef`."
      },
      "DatasetVersionFault": {
        "type": "object",
        "properties": {
          "assetId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "bindingIndex": {
            "type": "integer",
            "minimum": 0
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024
          },
          "code": {
            "type": "string",
            "enum": [
              "DATASET_HEAD_UNCOMMITTED",
              "DATASET_NO_QUALIFYING_COMMIT",
              "DATASET_MEMBERSHIP_UNDECLARED",
              "DATASET_HARD_MEMBER_MISSING",
              "DATASET_HARD_MEMBER_EXCLUDED",
              "DATASET_SELECTION_EMPTY",
              "DATASET_OBJECT_MISSING",
              "DATASET_OBJECT_CHANGED",
              "DATASET_MEMBER_TOO_LARGE",
              "DATASET_LAYOUT_UNSATISFIABLE",
              "DATASET_BUILD_UNAVAILABLE",
              "STORAGE_CUSTOM_HOSTS_NOT_READY",
              "DATASET_BUILD_INVALID",
              "DATASET_FREEZE_TIMEOUT",
              "DATASET_VERSION_CANCELLED"
            ]
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024
          }
        },
        "required": ["assetId", "code"]
      },
      "DatasetVersionTombstoned": {
        "type": "object",
        "properties": {
          "versionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "datasetId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "datasetRevision": {
            "type": "integer",
            "minimum": 1
          },
          "name": {
            "$ref": "#/components/schemas/DatasetName"
          },
          "commitId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "commitRule": {
            "type": "string",
            "const": "head-stopgap"
          },
          "contentRoot": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "selectionHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "holdoutHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "taxonomyVersion": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "operationId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "exclusionCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1024
          },
          "partial": {
            "type": "boolean",
            "const": true
          },
          "state": {
            "type": "string",
            "const": "tombstoned"
          },
          "tombstone": {
            "$ref": "#/components/schemas/DatasetVersionTombstone"
          },
          "layoutHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "memberCount": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1024
          },
          "holdoutCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1024
          },
          "shardCount": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1024
          },
          "membersPerShard": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1024
          },
          "manifest": {
            "$ref": "#/components/schemas/DatasetVersionArtifactReference"
          },
          "stats": {
            "$ref": "#/components/schemas/DatasetVersionArtifactReference"
          },
          "classIndex": {
            "$ref": "#/components/schemas/DatasetVersionArtifactReference"
          },
          "resolvedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "refusal": {
            "$ref": "#/components/schemas/DatasetVersionRefusal"
          }
        },
        "required": [
          "versionId",
          "datasetId",
          "projectId",
          "datasetRevision",
          "commitId",
          "commitRule",
          "contentRoot",
          "selectionHash",
          "holdoutHash",
          "operationId",
          "createdAt",
          "state",
          "tombstone"
        ],
        "x-nitsor-resolved-payload-fields": [
          "layoutHash",
          "memberCount",
          "holdoutCount",
          "shardCount",
          "membersPerShard",
          "manifest",
          "stats",
          "classIndex",
          "resolvedAt"
        ],
        "x-nitsor-whole-version-fields": [
          "exclusionCount",
          "layoutHash",
          "memberCount",
          "holdoutCount",
          "shardCount",
          "membersPerShard",
          "manifest",
          "stats",
          "classIndex"
        ],
        "description": "A deleted Dataset Version. `tombstone.previousState` decides the payload: `resolved` carries the whole resolved payload (layoutHash, memberCount, holdoutCount, shardCount, membersPerShard, manifest, stats, classIndex, resolvedAt) and no refusal; `refused` carries the refusal and none of the resolved payload. Neither, or both, is refused. A `partial: true` copy carries none of exclusionCount, layoutHash, memberCount, holdoutCount, shardCount, membersPerShard, manifest, stats, classIndex."
      },
      "DatasetVersionTombstone": {
        "type": "object",
        "properties": {
          "cleanup": {
            "type": "string",
            "enum": ["pending", "running", "done", "retained"]
          },
          "cleanupDetail": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "cleanupFault": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "deletedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "deletedByPrincipalIssuer": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "deletedByPrincipalSubject": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "graceUntil": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "previousState": {
            "type": "string",
            "enum": ["resolved", "refused"]
          }
        },
        "required": [
          "cleanup",
          "deletedAt",
          "deletedByPrincipalSubject",
          "graceUntil",
          "previousState"
        ]
      },
      "DatasetVersionsExclusionsResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DatasetVersionExclusion"
            }
          },
          "nextCursor": {
            "$ref": "#/components/schemas/NextCursor"
          }
        },
        "required": ["items", "nextCursor"]
      },
      "DatasetVersionExclusion": {
        "type": "object",
        "properties": {
          "assetId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "code": {
            "type": "string",
            "enum": [
              "assetIds",
              "hard_member_missing",
              "holdout",
              "labelPrefix",
              "seriesRoles",
              "sourceIds",
              "reviewState",
              "provenance"
            ]
          },
          "detail": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": ["assetId", "code"]
      },
      "DatasetVersionsLabelsResponse": {
        "type": "object",
        "properties": {
          "versionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "manifestHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "partial": {
            "type": "boolean"
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DatasetLabelReadMember"
            }
          },
          "nextCursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "labelCounts": {
            "$ref": "#/components/schemas/DatasetLabelCounts"
          },
          "answerReviewState": {
            "type": "string",
            "const": "not-recorded"
          }
        },
        "required": [
          "versionId",
          "partial",
          "total",
          "items",
          "nextCursor",
          "labelCounts",
          "answerReviewState"
        ],
        "description": "A reader with `sources:browse` gets `partial: false` and `manifestHash`; any other reader gets `partial: true`, scoped counts only, and no `manifestHash`."
      },
      "DatasetLabelReadMember": {
        "type": "object",
        "properties": {
          "assetId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "holdout": {
            "type": "boolean"
          },
          "labels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DatasetLabelWireRow"
            }
          },
          "answers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DatasetFrozenAnswerRow"
            }
          },
          "labelCounts": {
            "$ref": "#/components/schemas/DatasetLabelCounts"
          },
          "noAcceptedLabels": {
            "type": "boolean"
          }
        },
        "required": ["assetId", "holdout", "labels", "answers", "labelCounts", "noAcceptedLabels"]
      },
      "DatasetLabelWireRow": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "assetId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024
              },
              "annotationId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024
              },
              "sourceId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024
              },
              "classId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024
              },
              "reviewState": {
                "type": "string",
                "enum": ["accepted", "corrected", "draft", "rejected"]
              },
              "provenance": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": ["human", "agent"]
                  },
                  "agentVersionId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1024
                  },
                  "modelFamily": {
                    "type": "string"
                  },
                  "modelVersion": {
                    "type": "string"
                  }
                },
                "required": ["kind"]
              },
              "label": {
                "type": "string"
              }
            },
            "required": [
              "assetId",
              "annotationId",
              "sourceId",
              "classId",
              "reviewState",
              "provenance",
              "label"
            ]
          },
          {
            "$ref": "#/components/schemas/DatasetFrozenAnswerRow"
          }
        ]
      },
      "DatasetFrozenAnswerRow": {
        "type": "object",
        "properties": {
          "assetId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024
          },
          "answer": {
            "$ref": "#/components/schemas/VersionGraphClassificationAnswerOutput"
          }
        },
        "required": ["assetId", "answer"]
      },
      "DatasetLabelCounts": {
        "type": "object",
        "properties": {
          "frozen": {
            "$ref": "#/components/schemas/DatasetLabelLayerCounts"
          },
          "effective": {
            "$ref": "#/components/schemas/DatasetLabelLayerCounts"
          },
          "excluded": {
            "$ref": "#/components/schemas/DatasetLabelLayerCounts"
          }
        },
        "required": ["frozen", "effective", "excluded"]
      },
      "DatasetLabelLayerCounts": {
        "type": "object",
        "properties": {
          "accepted": {
            "type": "integer",
            "minimum": 0
          },
          "corrected": {
            "type": "integer",
            "minimum": 0
          },
          "draft": {
            "type": "integer",
            "minimum": 0
          },
          "model-drafts": {
            "type": "integer",
            "minimum": 0
          },
          "rejected": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": ["accepted", "corrected", "draft", "model-drafts", "rejected"]
      },
      "DatasetVersionsPinResponse": {
        "type": "object",
        "properties": {
          "versionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "manifestHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "pinnedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "firstPin": {
            "type": "boolean"
          }
        },
        "required": ["versionId", "manifestHash", "pinnedAt", "firstPin"]
      },
      "DatasetVersionsStatsResponse": {
        "type": "object",
        "properties": {
          "versionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "engineVersion": {
            "type": "string",
            "const": "stats-engine/1"
          },
          "artifact": {
            "$ref": "#/components/schemas/DatasetVersionArtifactReference"
          },
          "partial": {
            "type": "boolean",
            "const": true
          },
          "counts": {
            "$ref": "#/components/schemas/DatasetVersionStatsCounts"
          }
        },
        "required": ["versionId", "engineVersion"],
        "description": "A reader with `sources:browse` gets `artifact` and no `counts`; any other reader gets `partial: true`, `counts` over the scans their own work opens, and no `artifact`."
      },
      "DatasetVersionStatsCounts": {
        "type": "object",
        "properties": {
          "memberCount": {
            "type": "integer",
            "minimum": 0
          },
          "holdoutCount": {
            "type": "integer",
            "minimum": 0
          },
          "annotationCount": {
            "type": "integer",
            "minimum": 0
          },
          "distinctAnnotationCount": {
            "type": "integer",
            "minimum": 0
          },
          "perClass": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "classId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "annotationCount": {
                  "type": "integer",
                  "minimum": 0
                },
                "name": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": ["classId", "annotationCount", "name"]
            }
          },
          "provenance": {
            "type": "object",
            "properties": {
              "human": {
                "type": "integer",
                "minimum": 0
              },
              "agent": {
                "type": "integer",
                "minimum": 0
              },
              "unrecordedAgentVersionCount": {
                "type": "integer",
                "minimum": 0
              },
              "agentVersions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "agentVersionId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "annotationCount": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": ["agentVersionId", "annotationCount"]
                }
              }
            },
            "required": ["human", "agent", "agentVersions"]
          },
          "reviewStates": {
            "type": "object",
            "properties": {
              "draft": {
                "type": "integer",
                "minimum": 0
              },
              "accepted": {
                "type": "integer",
                "minimum": 0
              },
              "rejected": {
                "type": "integer",
                "minimum": 0
              },
              "corrected": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": ["draft", "accepted", "rejected", "corrected"]
          },
          "sourcesByRole": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "role": {
                  "type": "string",
                  "minLength": 1
                },
                "sourceCount": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": ["role", "sourceCount"]
            }
          }
        },
        "required": [
          "memberCount",
          "holdoutCount",
          "annotationCount",
          "distinctAnnotationCount",
          "perClass",
          "provenance",
          "reviewStates",
          "sourcesByRole"
        ]
      },
      "DatasetDetail": {
        "type": "object",
        "properties": {
          "branchId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "datasetId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "holdoutCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1024
          },
          "holdoutHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "layoutHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "name": {
            "$ref": "#/components/schemas/DatasetName"
          },
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "revision": {
            "type": "integer",
            "minimum": 1
          },
          "selectionHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "holdout": {
            "$ref": "#/components/schemas/DatasetHoldoutOutput"
          },
          "layout": {
            "$ref": "#/components/schemas/DatasetLayout"
          },
          "selection": {
            "$ref": "#/components/schemas/DatasetSelectionOutput"
          }
        },
        "required": [
          "branchId",
          "createdAt",
          "datasetId",
          "holdoutCount",
          "holdoutHash",
          "layoutHash",
          "name",
          "projectId",
          "revision",
          "selectionHash",
          "updatedAt",
          "holdout",
          "layout",
          "selection"
        ]
      },
      "DatasetLayout": {
        "type": "object",
        "properties": {
          "chunkBytes": {
            "type": "number",
            "const": 16777216
          },
          "membersPerShard": {
            "type": "number",
            "const": 8
          },
          "shardCount": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1024,
            "description": "A positive integer no greater than the Dataset Version's member count; the number of physical shards."
          }
        },
        "required": ["chunkBytes", "membersPerShard"]
      },
      "DatasetsListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Dataset"
            }
          },
          "nextCursor": {
            "$ref": "#/components/schemas/NextCursor"
          }
        },
        "required": ["items", "nextCursor"]
      },
      "Dataset": {
        "type": "object",
        "properties": {
          "branchId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "datasetId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "holdoutCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1024
          },
          "holdoutHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "layoutHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "name": {
            "$ref": "#/components/schemas/DatasetName"
          },
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "revision": {
            "type": "integer",
            "minimum": 1
          },
          "selectionHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          }
        },
        "required": [
          "branchId",
          "createdAt",
          "datasetId",
          "holdoutCount",
          "holdoutHash",
          "layoutHash",
          "name",
          "projectId",
          "revision",
          "selectionHash",
          "updatedAt"
        ]
      },
      "DecisionsListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Decision"
            }
          },
          "nextCursor": {
            "$ref": "#/components/schemas/NextCursor"
          }
        },
        "required": ["items", "nextCursor"]
      },
      "Decision": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "minLength": 1
          },
          "action": {
            "type": "string",
            "minLength": 1
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "decisionId": {
            "type": "string",
            "minLength": 1
          },
          "policy": {
            "type": "string",
            "minLength": 1
          },
          "principalIssuer": {
            "type": "string",
            "minLength": 1
          },
          "principalSubject": {
            "type": "string",
            "minLength": 1
          },
          "principalType": {
            "type": "string",
            "enum": ["user", "agent", "system"]
          },
          "reason": {
            "type": "string",
            "minLength": 1
          },
          "reasonCode": {
            "type": "string",
            "minLength": 1
          },
          "resource": {
            "type": "string",
            "minLength": 1
          },
          "scope": {
            "type": "string",
            "minLength": 1
          },
          "verdict": {
            "type": "string",
            "enum": ["allow", "deny"]
          }
        },
        "required": [
          "accountId",
          "action",
          "createdAt",
          "decisionId",
          "policy",
          "principalSubject",
          "principalType",
          "reason",
          "reasonCode",
          "resource",
          "scope",
          "verdict"
        ]
      },
      "ExecutionDetailResponse": {
        "type": "object",
        "properties": {
          "item": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "project": {
                    "type": "object",
                    "properties": {
                      "projectId": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": ["projectId", "name"]
                  },
                  "context": {
                    "type": "object",
                    "properties": {
                      "jobId": {
                        "type": "string"
                      },
                      "taskId": {
                        "type": "string"
                      },
                      "branchId": {
                        "type": "string"
                      },
                      "modelId": {
                        "type": "string"
                      },
                      "modelVersion": {
                        "type": "string"
                      },
                      "agentId": {
                        "type": "string"
                      },
                      "linkage": {
                        "type": "string",
                        "enum": ["verified", "none", "unavailable"]
                      }
                    },
                    "required": ["linkage"]
                  },
                  "createdAt": {
                    "$ref": "#/components/schemas/UtcTimestamp"
                  },
                  "finishedAt": {
                    "$ref": "#/components/schemas/UtcTimestamp"
                  },
                  "logs": {
                    "type": "string",
                    "const": "unavailable"
                  },
                  "providerUsage": {
                    "type": "string",
                    "const": "unavailable"
                  },
                  "invoice": {
                    "type": "string",
                    "const": "unavailable"
                  },
                  "kind": {
                    "type": "string",
                    "const": "runs"
                  },
                  "runId": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "queued",
                      "pilot",
                      "quoting",
                      "awaiting-confirmation",
                      "running",
                      "draining",
                      "completed",
                      "completed-partial",
                      "failed",
                      "capped"
                    ]
                  },
                  "cancellationRequested": {
                    "type": "string",
                    "enum": ["drain", "kill"]
                  },
                  "gpuClass": {
                    "type": "string"
                  },
                  "billableDuration": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "number",
                        "minimum": 0
                      },
                      "unit": {
                        "type": "string",
                        "const": "seconds"
                      }
                    },
                    "required": ["value", "unit"]
                  },
                  "settlement": {
                    "type": "string",
                    "enum": ["settled", "active-unsettled"]
                  },
                  "cap": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "number",
                        "minimum": 0
                      },
                      "unit": {
                        "type": "string",
                        "const": "seconds"
                      }
                    },
                    "required": ["value", "unit"]
                  },
                  "confirmationCeiling": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "number",
                        "minimum": 0
                      },
                      "unit": {
                        "type": "string",
                        "const": "seconds"
                      }
                    },
                    "required": ["value", "unit"]
                  },
                  "quote": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "number",
                        "minimum": 0
                      },
                      "unit": {
                        "type": "string",
                        "const": "seconds"
                      }
                    },
                    "required": ["value", "unit"]
                  },
                  "pilot": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "number",
                        "minimum": 0
                      },
                      "unit": {
                        "type": "string",
                        "const": "seconds"
                      }
                    },
                    "required": ["value", "unit"]
                  },
                  "confirmedAt": {
                    "$ref": "#/components/schemas/UtcTimestamp"
                  },
                  "harvestedAt": {
                    "$ref": "#/components/schemas/UtcTimestamp"
                  },
                  "harvestFailedAt": {
                    "$ref": "#/components/schemas/UtcTimestamp"
                  },
                  "harvestManifestCount": {
                    "type": "number",
                    "minimum": 0
                  },
                  "stopReason": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "confirmation-expired"
                          },
                          "parkedAt": {
                            "$ref": "#/components/schemas/UtcTimestamp"
                          },
                          "stoppedAt": {
                            "$ref": "#/components/schemas/UtcTimestamp"
                          }
                        },
                        "required": ["kind", "parkedAt", "stoppedAt"]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "cancelled"
                          },
                          "stoppedAt": {
                            "$ref": "#/components/schemas/UtcTimestamp"
                          }
                        },
                        "required": ["kind", "stoppedAt"]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "time-limit"
                          },
                          "stoppedAt": {
                            "$ref": "#/components/schemas/UtcTimestamp"
                          }
                        },
                        "required": ["kind", "stoppedAt"]
                      }
                    ]
                  }
                },
                "required": [
                  "project",
                  "context",
                  "createdAt",
                  "logs",
                  "providerUsage",
                  "invoice",
                  "kind",
                  "runId",
                  "status",
                  "gpuClass",
                  "billableDuration",
                  "settlement",
                  "cap",
                  "confirmationCeiling"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "project": {
                    "type": "object",
                    "properties": {
                      "projectId": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": ["projectId", "name"]
                  },
                  "context": {
                    "type": "object",
                    "properties": {
                      "jobId": {
                        "type": "string"
                      },
                      "taskId": {
                        "type": "string"
                      },
                      "branchId": {
                        "type": "string"
                      },
                      "modelId": {
                        "type": "string"
                      },
                      "modelVersion": {
                        "type": "string"
                      },
                      "agentId": {
                        "type": "string"
                      },
                      "linkage": {
                        "type": "string",
                        "enum": ["verified", "none", "unavailable"]
                      }
                    },
                    "required": ["linkage"]
                  },
                  "createdAt": {
                    "$ref": "#/components/schemas/UtcTimestamp"
                  },
                  "finishedAt": {
                    "$ref": "#/components/schemas/UtcTimestamp"
                  },
                  "logs": {
                    "type": "string",
                    "const": "unavailable"
                  },
                  "providerUsage": {
                    "type": "string",
                    "const": "unavailable"
                  },
                  "invoice": {
                    "type": "string",
                    "const": "unavailable"
                  },
                  "kind": {
                    "type": "string",
                    "const": "jobs"
                  },
                  "jobId": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": ["submitted", "running", "succeeded", "failed", "refused"]
                  },
                  "executionMode": {
                    "type": "string",
                    "enum": ["stub", "runner", "replay", "unavailable"]
                  },
                  "replayOf": {
                    "type": "object",
                    "properties": {
                      "deployment": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200,
                        "x-nitsor-trim": true
                      },
                      "jobId": {
                        "type": "string",
                        "description": "An opaque persisted identifier; a blank string is refused."
                      },
                      "runId": {
                        "type": "string",
                        "description": "An opaque persisted identifier; a blank string is refused."
                      },
                      "ranAt": {
                        "$ref": "#/components/schemas/UtcTimestamp"
                      }
                    },
                    "required": ["deployment", "jobId", "runId", "ranAt"]
                  },
                  "run": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "const": "verified"
                          },
                          "runId": {
                            "type": "string"
                          }
                        },
                        "required": ["state", "runId"]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "enum": ["none", "unavailable"]
                          }
                        },
                        "required": ["state"]
                      }
                    ]
                  },
                  "startedAt": {
                    "$ref": "#/components/schemas/UtcTimestamp"
                  },
                  "proposalCount": {
                    "type": "number",
                    "minimum": 0
                  },
                  "failureCode": {
                    "type": "string",
                    "enum": ["model_execution_failed", "insufficient_calibration_cases"]
                  }
                },
                "required": [
                  "project",
                  "context",
                  "createdAt",
                  "logs",
                  "providerUsage",
                  "invoice",
                  "kind",
                  "jobId",
                  "status",
                  "executionMode",
                  "run",
                  "proposalCount"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "project": {
                    "type": "object",
                    "properties": {
                      "projectId": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": ["projectId", "name"]
                  },
                  "context": {
                    "type": "object",
                    "properties": {
                      "jobId": {
                        "type": "string"
                      },
                      "taskId": {
                        "type": "string"
                      },
                      "branchId": {
                        "type": "string"
                      },
                      "modelId": {
                        "type": "string"
                      },
                      "modelVersion": {
                        "type": "string"
                      },
                      "agentId": {
                        "type": "string"
                      },
                      "linkage": {
                        "type": "string",
                        "enum": ["verified", "none", "unavailable"]
                      }
                    },
                    "required": ["linkage"]
                  },
                  "createdAt": {
                    "$ref": "#/components/schemas/UtcTimestamp"
                  },
                  "finishedAt": {
                    "$ref": "#/components/schemas/UtcTimestamp"
                  },
                  "logs": {
                    "type": "string",
                    "const": "unavailable"
                  },
                  "providerUsage": {
                    "type": "string",
                    "const": "unavailable"
                  },
                  "invoice": {
                    "type": "string",
                    "const": "unavailable"
                  },
                  "kind": {
                    "type": "string",
                    "const": "tasks"
                  },
                  "taskId": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": ["assigned", "completed", "queued"]
                  },
                  "outcome": {
                    "type": "string",
                    "enum": ["no-prompts", "completed", "model-failed", "runner-abandoned"]
                  },
                  "runId": {
                    "type": "string"
                  }
                },
                "required": [
                  "project",
                  "context",
                  "createdAt",
                  "logs",
                  "providerUsage",
                  "invoice",
                  "kind",
                  "taskId",
                  "status"
                ]
              }
            ]
          }
        },
        "required": ["item"]
      },
      "ExecutionWorkItemsResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "workItemId": {
                  "type": "string"
                },
                "runId": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "dispatched",
                    "running",
                    "succeeded",
                    "failed",
                    "skipped-capped"
                  ]
                },
                "attempt": {
                  "type": "number",
                  "minimum": 0
                },
                "absorbedDuration": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "number",
                      "minimum": 0
                    },
                    "unit": {
                      "type": "string",
                      "const": "seconds"
                    }
                  },
                  "required": ["value", "unit"]
                },
                "billableDuration": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "number",
                      "minimum": 0
                    },
                    "unit": {
                      "type": "string",
                      "const": "seconds"
                    }
                  },
                  "required": ["value", "unit"]
                },
                "fault": {
                  "type": "string",
                  "enum": ["platform", "container", "preempted"]
                },
                "createdAt": {
                  "$ref": "#/components/schemas/UtcTimestamp"
                },
                "updatedAt": {
                  "$ref": "#/components/schemas/UtcTimestamp"
                },
                "dispatchedAt": {
                  "$ref": "#/components/schemas/UtcTimestamp"
                },
                "harvestedAt": {
                  "$ref": "#/components/schemas/UtcTimestamp"
                }
              },
              "required": ["workItemId", "runId", "status", "attempt", "createdAt", "updatedAt"]
            }
          },
          "nextCursor": {
            "$ref": "#/components/schemas/NextCursor"
          }
        },
        "required": ["items", "nextCursor"]
      },
      "ExecutionsListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "project": {
                      "type": "object",
                      "properties": {
                        "projectId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": ["projectId", "name"]
                    },
                    "context": {
                      "type": "object",
                      "properties": {
                        "jobId": {
                          "type": "string"
                        },
                        "taskId": {
                          "type": "string"
                        },
                        "branchId": {
                          "type": "string"
                        },
                        "modelId": {
                          "type": "string"
                        },
                        "modelVersion": {
                          "type": "string"
                        },
                        "agentId": {
                          "type": "string"
                        },
                        "linkage": {
                          "type": "string",
                          "enum": ["verified", "none", "unavailable"]
                        }
                      },
                      "required": ["linkage"]
                    },
                    "createdAt": {
                      "$ref": "#/components/schemas/UtcTimestamp"
                    },
                    "finishedAt": {
                      "$ref": "#/components/schemas/UtcTimestamp"
                    },
                    "logs": {
                      "type": "string",
                      "const": "unavailable"
                    },
                    "providerUsage": {
                      "type": "string",
                      "const": "unavailable"
                    },
                    "invoice": {
                      "type": "string",
                      "const": "unavailable"
                    },
                    "kind": {
                      "type": "string",
                      "const": "runs"
                    },
                    "runId": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "queued",
                        "pilot",
                        "quoting",
                        "awaiting-confirmation",
                        "running",
                        "draining",
                        "completed",
                        "completed-partial",
                        "failed",
                        "capped"
                      ]
                    },
                    "cancellationRequested": {
                      "type": "string",
                      "enum": ["drain", "kill"]
                    },
                    "gpuClass": {
                      "type": "string"
                    },
                    "billableDuration": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "const": "seconds"
                        }
                      },
                      "required": ["value", "unit"]
                    },
                    "settlement": {
                      "type": "string",
                      "enum": ["settled", "active-unsettled"]
                    },
                    "cap": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "const": "seconds"
                        }
                      },
                      "required": ["value", "unit"]
                    },
                    "confirmationCeiling": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "const": "seconds"
                        }
                      },
                      "required": ["value", "unit"]
                    },
                    "quote": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "const": "seconds"
                        }
                      },
                      "required": ["value", "unit"]
                    },
                    "pilot": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "const": "seconds"
                        }
                      },
                      "required": ["value", "unit"]
                    },
                    "confirmedAt": {
                      "$ref": "#/components/schemas/UtcTimestamp"
                    },
                    "harvestedAt": {
                      "$ref": "#/components/schemas/UtcTimestamp"
                    },
                    "harvestFailedAt": {
                      "$ref": "#/components/schemas/UtcTimestamp"
                    },
                    "harvestManifestCount": {
                      "type": "number",
                      "minimum": 0
                    },
                    "stopReason": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "confirmation-expired"
                            },
                            "parkedAt": {
                              "$ref": "#/components/schemas/UtcTimestamp"
                            },
                            "stoppedAt": {
                              "$ref": "#/components/schemas/UtcTimestamp"
                            }
                          },
                          "required": ["kind", "parkedAt", "stoppedAt"]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "cancelled"
                            },
                            "stoppedAt": {
                              "$ref": "#/components/schemas/UtcTimestamp"
                            }
                          },
                          "required": ["kind", "stoppedAt"]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "time-limit"
                            },
                            "stoppedAt": {
                              "$ref": "#/components/schemas/UtcTimestamp"
                            }
                          },
                          "required": ["kind", "stoppedAt"]
                        }
                      ]
                    }
                  },
                  "required": [
                    "project",
                    "context",
                    "createdAt",
                    "logs",
                    "providerUsage",
                    "invoice",
                    "kind",
                    "runId",
                    "status",
                    "gpuClass",
                    "billableDuration",
                    "settlement",
                    "cap",
                    "confirmationCeiling"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "project": {
                      "type": "object",
                      "properties": {
                        "projectId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": ["projectId", "name"]
                    },
                    "context": {
                      "type": "object",
                      "properties": {
                        "jobId": {
                          "type": "string"
                        },
                        "taskId": {
                          "type": "string"
                        },
                        "branchId": {
                          "type": "string"
                        },
                        "modelId": {
                          "type": "string"
                        },
                        "modelVersion": {
                          "type": "string"
                        },
                        "agentId": {
                          "type": "string"
                        },
                        "linkage": {
                          "type": "string",
                          "enum": ["verified", "none", "unavailable"]
                        }
                      },
                      "required": ["linkage"]
                    },
                    "createdAt": {
                      "$ref": "#/components/schemas/UtcTimestamp"
                    },
                    "finishedAt": {
                      "$ref": "#/components/schemas/UtcTimestamp"
                    },
                    "logs": {
                      "type": "string",
                      "const": "unavailable"
                    },
                    "providerUsage": {
                      "type": "string",
                      "const": "unavailable"
                    },
                    "invoice": {
                      "type": "string",
                      "const": "unavailable"
                    },
                    "kind": {
                      "type": "string",
                      "const": "jobs"
                    },
                    "jobId": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": ["submitted", "running", "succeeded", "failed", "refused"]
                    },
                    "executionMode": {
                      "type": "string",
                      "enum": ["stub", "runner", "replay", "unavailable"]
                    },
                    "replayOf": {
                      "type": "object",
                      "properties": {
                        "deployment": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200,
                          "x-nitsor-trim": true
                        },
                        "jobId": {
                          "type": "string",
                          "description": "An opaque persisted identifier; a blank string is refused."
                        },
                        "runId": {
                          "type": "string",
                          "description": "An opaque persisted identifier; a blank string is refused."
                        },
                        "ranAt": {
                          "$ref": "#/components/schemas/UtcTimestamp"
                        }
                      },
                      "required": ["deployment", "jobId", "runId", "ranAt"]
                    },
                    "run": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "state": {
                              "type": "string",
                              "const": "verified"
                            },
                            "runId": {
                              "type": "string"
                            }
                          },
                          "required": ["state", "runId"]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "state": {
                              "type": "string",
                              "enum": ["none", "unavailable"]
                            }
                          },
                          "required": ["state"]
                        }
                      ]
                    },
                    "startedAt": {
                      "$ref": "#/components/schemas/UtcTimestamp"
                    },
                    "proposalCount": {
                      "type": "number",
                      "minimum": 0
                    },
                    "failureCode": {
                      "type": "string",
                      "enum": ["model_execution_failed", "insufficient_calibration_cases"]
                    }
                  },
                  "required": [
                    "project",
                    "context",
                    "createdAt",
                    "logs",
                    "providerUsage",
                    "invoice",
                    "kind",
                    "jobId",
                    "status",
                    "executionMode",
                    "run",
                    "proposalCount"
                  ]
                }
              ]
            }
          },
          "nextCursor": {
            "$ref": "#/components/schemas/NextCursor"
          }
        },
        "required": ["items", "nextCursor"]
      },
      "LedgerListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LedgerEntry"
            }
          },
          "nextCursor": {
            "$ref": "#/components/schemas/NextCursor"
          }
        },
        "required": ["items", "nextCursor"]
      },
      "LedgerEntry": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "minLength": 1
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "decisionId": {
            "type": "string",
            "minLength": 1
          },
          "eventId": {
            "type": "string",
            "minLength": 1
          },
          "ledgerEntryId": {
            "type": "string",
            "minLength": 1
          },
          "principalIssuer": {
            "type": "string",
            "minLength": 1
          },
          "principalSubject": {
            "type": "string",
            "minLength": 1
          },
          "principalType": {
            "type": "string",
            "enum": ["user", "agent", "system"]
          }
        },
        "required": [
          "accountId",
          "createdAt",
          "decisionId",
          "eventId",
          "ledgerEntryId",
          "principalSubject",
          "principalType"
        ]
      },
      "ModelLabelOutcomeProposalResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModelLabelOutcomeRecord"
            }
          },
          "nextCursor": {
            "$ref": "#/components/schemas/NextCursor"
          },
          "state": {
            "type": "string",
            "enum": ["recorded", "not_recorded"]
          }
        },
        "required": ["items", "nextCursor", "state"]
      },
      "ModelLabelOutcomeRecord": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "model_label"
          },
          "taskId": {
            "type": "string",
            "minLength": 1
          },
          "jobId": {
            "type": "string",
            "minLength": 1
          },
          "proposalId": {
            "type": "string",
            "minLength": 1
          },
          "componentId": {
            "type": "string",
            "minLength": 1
          },
          "annotationId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "modelFamily": {
            "type": "string",
            "minLength": 1
          },
          "modelVersion": {
            "type": "string",
            "minLength": 1
          },
          "modelSetupVersion": {
            "$ref": "#/components/schemas/ModelSetupVersion"
          },
          "modelClassId": {
            "type": "string",
            "minLength": 1
          },
          "finalClassId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "outcome": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "kept_as_is",
                  "style_fix",
                  "small_fix",
                  "big_fix",
                  "deleted",
                  "wrong_class",
                  "missed"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "scoring": {
            "type": "string",
            "enum": ["scored", "not_recorded", "pending_run_plane", "not_comparable"]
          },
          "scoringGap": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "mask_scorer_not_built",
                  "admission_budget_exceeded",
                  "measure_budget_exceeded",
                  "mask_baseline_unsealed"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "deletedVia": {
            "anyOf": [
              {
                "type": "string",
                "enum": ["discarded", "deleted_after_import", "not_imported"]
              },
              {
                "type": "null"
              }
            ]
          },
          "deletionReason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "disposition": {
            "anyOf": [
              {
                "type": "string",
                "enum": ["accepted", "corrected"]
              },
              {
                "type": "null"
              }
            ]
          },
          "opened": {
            "type": "string",
            "enum": ["opened", "never_opened", "not_recorded"]
          },
          "editSize": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelLabelEditSize"
              },
              {
                "type": "null"
              }
            ]
          },
          "helperSources": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MaskHelperSource"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "helperSourcesGap": {
            "anyOf": [
              {
                "type": "string",
                "enum": ["event_window_exceeds_scan", "no_reprompt_event"]
              },
              {
                "type": "null"
              }
            ]
          },
          "measure": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelLabelMeasure"
              },
              {
                "type": "null"
              }
            ]
          },
          "beforeGeometryHash": {
            "type": "string",
            "minLength": 1
          },
          "afterGeometryHash": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "approval": {
            "type": "string",
            "enum": ["approved", "submitted"]
          },
          "standing": {
            "type": "string",
            "enum": ["final", "provisional", "superseded"]
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          }
        },
        "required": [
          "kind",
          "taskId",
          "jobId",
          "proposalId",
          "componentId",
          "annotationId",
          "modelFamily",
          "modelVersion",
          "modelSetupVersion",
          "modelClassId",
          "finalClassId",
          "outcome",
          "scoring",
          "deletedVia",
          "deletionReason",
          "disposition",
          "opened",
          "editSize",
          "beforeGeometryHash",
          "afterGeometryHash",
          "approval",
          "standing",
          "createdAt"
        ]
      },
      "ModelSetupVersion": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ModelSetupVersionRecorded"
          },
          {
            "$ref": "#/components/schemas/ModelSetupVersionNotRecorded"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "state",
          "mapping": {
            "recorded": "#/components/schemas/ModelSetupVersionRecorded",
            "not_recorded": "#/components/schemas/ModelSetupVersionNotRecorded"
          }
        }
      },
      "ModelSetupVersionRecorded": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "const": "recorded"
          },
          "version": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": ["state", "version"]
      },
      "ModelSetupVersionNotRecorded": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "const": "not_recorded"
          },
          "reason": {
            "type": "string",
            "const": "run_records_no_setup_version"
          }
        },
        "required": ["state", "reason"]
      },
      "ModelLabelEditSize": {
        "type": "object",
        "properties": {
          "addedPathLengthMm": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "addedVolumeMl": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "removedPathLengthMm": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "removedVolumeMl": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "shiftMm": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "surfaceDice": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "toleranceMm": {
            "type": "number",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "addedPathLengthMm",
          "addedVolumeMl",
          "removedPathLengthMm",
          "removedVolumeMl",
          "shiftMm",
          "surfaceDice",
          "toleranceMm"
        ]
      },
      "MaskHelperSource": {
        "type": "string",
        "enum": ["interpolation", "threshold-grow", "fill-holes", "remove-islands"]
      },
      "ModelLabelMeasure": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ModelLabelMeasureBox"
          },
          {
            "$ref": "#/components/schemas/ModelLabelMeasureKeypoint"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "box": "#/components/schemas/ModelLabelMeasureBox",
            "keypoint": "#/components/schemas/ModelLabelMeasureKeypoint"
          }
        }
      },
      "ModelLabelMeasureBox": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "box"
          },
          "iou": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "cornerShiftMm": {
            "type": "number",
            "minimum": 0
          },
          "toleranceMm": {
            "type": "number",
            "exclusiveMinimum": 0
          }
        },
        "required": ["kind", "iou", "cornerShiftMm", "toleranceMm"]
      },
      "ModelLabelMeasureKeypoint": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "keypoint"
          },
          "distanceMm": {
            "type": "number",
            "minimum": 0
          },
          "smallFixRadiusMm": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "toleranceMm": {
            "type": "number",
            "exclusiveMinimum": 0
          }
        },
        "required": ["kind", "distanceMm", "smallFixRadiusMm", "toleranceMm"]
      },
      "ModelLabelOutcomeTaskResponse": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "recorded",
              "task_open",
              "pending",
              "failed",
              "sent_back",
              "not_recorded",
              "no_model_labels"
            ]
          },
          "standing": {
            "anyOf": [
              {
                "type": "string",
                "enum": ["final", "provisional", "superseded"]
              },
              {
                "type": "null"
              }
            ]
          },
          "supersededByTaskId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "failure": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string"
                  },
                  "attempts": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  }
                },
                "required": ["message", "attempts"]
              },
              {
                "type": "null"
              }
            ]
          },
          "task": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelLabelOutcomeTask"
              },
              {
                "type": "null"
              }
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModelLabelOutcomeTaskResponseItems"
            }
          },
          "nextCursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "state",
          "standing",
          "supersededByTaskId",
          "failure",
          "task",
          "items",
          "nextCursor"
        ]
      },
      "ModelLabelOutcomeTask": {
        "type": "object",
        "properties": {
          "taskId": {
            "type": "string",
            "minLength": 1
          },
          "projectId": {
            "type": "string",
            "minLength": 1
          },
          "assetId": {
            "type": "string",
            "minLength": 1
          },
          "approval": {
            "type": "string",
            "enum": ["approved", "submitted"]
          },
          "finalApproval": {
            "type": "boolean"
          },
          "lineageRootTaskId": {
            "type": "string",
            "minLength": 1
          },
          "jobs": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "jobId": {
                  "type": "string",
                  "minLength": 1
                },
                "jobStatus": {
                  "type": "string",
                  "enum": ["submitted", "running", "succeeded", "failed", "refused"]
                },
                "runId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "modelSetupVersion": {
                  "$ref": "#/components/schemas/ModelSetupVersion"
                }
              },
              "required": ["jobId", "jobStatus", "runId", "modelSetupVersion"]
            }
          },
          "position": {
            "type": "object",
            "properties": {
              "branchId": {
                "type": "string",
                "minLength": 1
              },
              "eventSeq": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": ["branchId", "eventSeq"]
          },
          "grid": {
            "$ref": "#/components/schemas/ModelLabelOutcomeTaskGrid"
          },
          "counts": {
            "type": "object",
            "properties": {
              "keptAsIs": {
                "type": "integer",
                "minimum": 0
              },
              "styleFix": {
                "type": "integer",
                "minimum": 0
              },
              "smallFix": {
                "type": "integer",
                "minimum": 0
              },
              "bigFix": {
                "type": "integer",
                "minimum": 0
              },
              "deleted": {
                "type": "integer",
                "minimum": 0
              },
              "wrongClass": {
                "type": "integer",
                "minimum": 0
              },
              "missed": {
                "type": "integer",
                "minimum": 0
              },
              "notRecorded": {
                "type": "integer",
                "minimum": 0
              },
              "pendingRunPlane": {
                "type": "integer",
                "minimum": 0
              },
              "notComparable": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "keptAsIs",
              "styleFix",
              "smallFix",
              "bigFix",
              "deleted",
              "wrongClass",
              "missed",
              "pendingRunPlane",
              "notComparable"
            ]
          },
          "interventions": {
            "type": "object",
            "properties": {
              "edits": {
                "$ref": "#/components/schemas/ModelLabelInterventionCount"
              },
              "deletions": {
                "$ref": "#/components/schemas/ModelLabelInterventionCount"
              },
              "additions": {
                "$ref": "#/components/schemas/ModelLabelInterventionCount"
              },
              "reprompts": {
                "$ref": "#/components/schemas/ModelLabelInterventionCount"
              },
              "sendBacks": {
                "$ref": "#/components/schemas/ModelLabelInterventionCount"
              }
            },
            "required": ["edits", "deletions", "additions", "reprompts", "sendBacks"]
          },
          "scanFailed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "unattributedMisses": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "jobId": {
                  "type": "string",
                  "minLength": 1
                },
                "classId": {
                  "type": "string",
                  "minLength": 1
                },
                "count": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "annotationIds": {
                  "maxItems": 32,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              },
              "required": ["jobId", "classId", "count", "annotationIds"]
            }
          },
          "activeTime": {
            "$ref": "#/components/schemas/ModelLabelActiveTime"
          },
          "rulesVersion": {
            "type": "string",
            "minLength": 1
          },
          "thresholds": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelLabelOutcomeThresholds"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          }
        },
        "required": [
          "taskId",
          "projectId",
          "assetId",
          "approval",
          "finalApproval",
          "lineageRootTaskId",
          "jobs",
          "position",
          "grid",
          "counts",
          "interventions",
          "scanFailed",
          "activeTime",
          "rulesVersion",
          "createdAt"
        ]
      },
      "ModelLabelOutcomeTaskGrid": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ModelLabelOutcomeTaskGridResolved"
          },
          {
            "$ref": "#/components/schemas/ModelLabelOutcomeTaskGridUnavailable"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "state",
          "mapping": {
            "resolved": "#/components/schemas/ModelLabelOutcomeTaskGridResolved",
            "unavailable": "#/components/schemas/ModelLabelOutcomeTaskGridUnavailable"
          }
        }
      },
      "ModelLabelOutcomeTaskGridResolved": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "const": "resolved"
          },
          "sourceVersionId": {
            "type": "string",
            "minLength": 1
          },
          "toleranceMm": {
            "type": "number",
            "exclusiveMinimum": 0
          }
        },
        "required": ["state", "sourceVersionId", "toleranceMm"]
      },
      "ModelLabelOutcomeTaskGridUnavailable": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "const": "unavailable"
          },
          "reason": {
            "type": "string",
            "enum": [
              "source_not_registered",
              "source_not_viewable",
              "no_pixel_spacing",
              "slice_positions_missing",
              "source_version_ambiguous"
            ]
          },
          "sourceVersionIds": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "required": ["state", "reason", "sourceVersionIds"]
      },
      "ModelLabelInterventionCount": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ModelLabelInterventionCountRecorded"
          },
          {
            "$ref": "#/components/schemas/ModelLabelInterventionCountNotRecorded"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "state",
          "mapping": {
            "recorded": "#/components/schemas/ModelLabelInterventionCountRecorded",
            "not_recorded": "#/components/schemas/ModelLabelInterventionCountNotRecorded"
          }
        }
      },
      "ModelLabelInterventionCountRecorded": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "const": "recorded"
          },
          "count": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": ["state", "count"]
      },
      "ModelLabelInterventionCountNotRecorded": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "const": "not_recorded"
          },
          "reason": {
            "type": "string",
            "enum": ["event_window_exceeds_scan", "no_reprompt_event"]
          }
        },
        "required": ["state", "reason"]
      },
      "ModelLabelActiveTime": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ModelLabelActiveTimeRecorded"
          },
          {
            "$ref": "#/components/schemas/ModelLabelActiveTimeNotRecorded"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "state",
          "mapping": {
            "recorded": "#/components/schemas/ModelLabelActiveTimeRecorded",
            "not_recorded": "#/components/schemas/ModelLabelActiveTimeNotRecorded"
          }
        }
      },
      "ModelLabelActiveTimeRecorded": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "const": "recorded"
          },
          "durationMs": {
            "type": "integer",
            "minimum": 0
          },
          "reason": {
            "type": "string",
            "const": "editor_activity"
          }
        },
        "required": ["state", "durationMs", "reason"]
      },
      "ModelLabelActiveTimeNotRecorded": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "const": "not_recorded"
          },
          "reason": {
            "type": "string",
            "enum": [
              "no_editor_activity",
              "editor_events_untimed",
              "activity_over_limit",
              "activity_incomplete"
            ]
          }
        },
        "required": ["state", "reason"]
      },
      "ModelLabelOutcomeThresholds": {
        "type": "object",
        "properties": {
          "defaults": {
            "type": "object",
            "properties": {
              "boxSmallFixMinIou": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "contourStyleFixMinSurfaceDice": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "contourSmallFixMinSurfaceDice": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "keypointSmallFixRadiusMm": {
                "anyOf": [
                  {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "boxSmallFixMinIou",
              "contourStyleFixMinSurfaceDice",
              "contourSmallFixMinSurfaceDice",
              "keypointSmallFixRadiusMm"
            ]
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "classId": {
                  "type": "string",
                  "minLength": 1
                },
                "boxSmallFixMinIou": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                "contourStyleFixMinSurfaceDice": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                "contourSmallFixMinSurfaceDice": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                "keypointSmallFixRadiusMm": {
                  "anyOf": [
                    {
                      "type": "number",
                      "exclusiveMinimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "classId",
                "boxSmallFixMinIou",
                "contourStyleFixMinSurfaceDice",
                "contourSmallFixMinSurfaceDice",
                "keypointSmallFixRadiusMm"
              ]
            }
          }
        },
        "required": ["defaults", "categories"]
      },
      "ModelLabelOutcomeTaskResponseItems": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ModelLabelOutcomeRecord"
          },
          {
            "$ref": "#/components/schemas/FinalLabelOutcomeRecord"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "model_label": "#/components/schemas/ModelLabelOutcomeRecord",
            "final_label": "#/components/schemas/FinalLabelOutcomeRecord"
          }
        }
      },
      "FinalLabelOutcomeRecord": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "final_label"
          },
          "taskId": {
            "type": "string",
            "minLength": 1
          },
          "jobId": {
            "type": "string",
            "minLength": 1
          },
          "annotationId": {
            "type": "string",
            "minLength": 1
          },
          "finalClassId": {
            "type": "string",
            "minLength": 1
          },
          "outcome": {
            "anyOf": [
              {
                "type": "string",
                "const": "missed"
              },
              {
                "type": "null"
              }
            ]
          },
          "scoring": {
            "type": "string",
            "enum": ["scored", "not_recorded", "pending_run_plane", "not_comparable"]
          },
          "scoringGap": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "mask_scorer_not_built",
                  "admission_budget_exceeded",
                  "measure_budget_exceeded",
                  "mask_baseline_unsealed"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "afterGeometryHash": {
            "type": "string",
            "minLength": 1
          },
          "approval": {
            "type": "string",
            "enum": ["approved", "submitted"]
          },
          "standing": {
            "type": "string",
            "enum": ["final", "provisional", "superseded"]
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          }
        },
        "required": [
          "kind",
          "taskId",
          "jobId",
          "annotationId",
          "finalClassId",
          "outcome",
          "scoring",
          "afterGeometryHash",
          "approval",
          "standing",
          "createdAt"
        ]
      },
      "ModelRunsCreateResponse": {
        "type": "object",
        "properties": {
          "operationId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": ["operationId"]
      },
      "ModelRunsEstimateResponse": {
        "type": "object",
        "properties": {
          "agentSubject": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "allowanceGpuSeconds": {
            "type": "integer",
            "minimum": 0
          },
          "expectedGpuSeconds": {
            "type": "number",
            "minimum": 0
          },
          "imageDigest": {
            "type": "string",
            "pattern": "^sha256:[0-9a-f]{64}$"
          },
          "modelFamily": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "modelVersion": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "notProduced": {
            "maxItems": 512,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            }
          },
          "perScanReservationSeconds": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "price": {
            "type": "null"
          },
          "rateVersion": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "scans": {
            "minItems": 1,
            "maxItems": 50,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModelRunScanEstimate"
            }
          },
          "targets": {
            "minItems": 1,
            "maxItems": 16,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            }
          }
        },
        "required": [
          "agentSubject",
          "allowanceGpuSeconds",
          "expectedGpuSeconds",
          "imageDigest",
          "modelFamily",
          "modelVersion",
          "notProduced",
          "perScanReservationSeconds",
          "price",
          "rateVersion",
          "scans",
          "targets"
        ]
      },
      "ModelRunScanEstimate": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ModelRunScanEstimateCounted"
          },
          {
            "$ref": "#/components/schemas/ModelRunScanEstimateNotEligible"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "status",
          "mapping": {
            "counted": "#/components/schemas/ModelRunScanEstimateCounted",
            "not_eligible": "#/components/schemas/ModelRunScanEstimateNotEligible"
          }
        }
      },
      "ModelRunScanEstimateCounted": {
        "type": "object",
        "properties": {
          "replaces": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelRunReplacedJob"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "const": "counted"
          },
          "taskId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": ["replaces", "status", "taskId"]
      },
      "ModelRunReplacedJob": {
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "state": {
            "type": "string",
            "enum": ["result", "running"]
          }
        },
        "required": ["jobId", "state"]
      },
      "ModelRunScanEstimateNotEligible": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/IssueCode"
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 250
          },
          "status": {
            "type": "string",
            "const": "not_eligible"
          },
          "taskId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": ["code", "message", "status", "taskId"]
      },
      "OpenApiDocument": {
        "type": "object",
        "properties": {
          "openapi": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": ["openapi"],
        "additionalProperties": {}
      },
      "ProjectAssetsAttachResponse": {
        "type": "object",
        "properties": {
          "asset": {
            "$ref": "#/components/schemas/ProjectAsset"
          },
          "commit": {
            "$ref": "#/components/schemas/ProjectAssetCommit"
          }
        },
        "required": ["asset", "commit"]
      },
      "ProjectAsset": {
        "type": "object",
        "properties": {
          "assetId": {
            "type": "string",
            "pattern": "^asset_[0-9a-f]{40}$"
          },
          "bindings": {
            "minItems": 1,
            "maxItems": 8,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectAssetBinding"
            }
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": ["assetId", "bindings", "label"]
      },
      "ProjectAssetBinding": {
        "type": "object",
        "properties": {
          "integrity": {
            "$ref": "#/components/schemas/ProjectAssetIntegrity"
          },
          "manifestHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "seriesRole": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
          },
          "sourceId": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "sourceVersionId": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "storageConnectionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": [
          "integrity",
          "manifestHash",
          "seriesRole",
          "sourceId",
          "sourceVersionId",
          "storageConnectionId"
        ]
      },
      "ProjectAssetIntegrity": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ProjectAssetIntegrityFullChecksum"
          },
          {
            "$ref": "#/components/schemas/ProjectAssetIntegrityBoundedFingerprint"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "guarantee",
          "mapping": {
            "full-checksum": "#/components/schemas/ProjectAssetIntegrityFullChecksum",
            "bounded-fingerprint": "#/components/schemas/ProjectAssetIntegrityBoundedFingerprint"
          }
        }
      },
      "ProjectAssetIntegrityFullChecksum": {
        "type": "object",
        "properties": {
          "guarantee": {
            "type": "string",
            "const": "full-checksum"
          }
        },
        "required": ["guarantee"]
      },
      "ProjectAssetIntegrityBoundedFingerprint": {
        "type": "object",
        "properties": {
          "guarantee": {
            "type": "string",
            "const": "bounded-fingerprint"
          },
          "scheme": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": ["guarantee", "scheme"]
      },
      "ProjectAssetCommit": {
        "type": "object",
        "properties": {
          "commitId": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "required": ["commitId", "message"]
      },
      "ProjectGroup": {
        "type": "object",
        "properties": {
          "groupId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "position": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": ["groupId", "name", "position"]
      },
      "ProjectGroupsListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "maxItems": 200,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectGroup"
            }
          }
        },
        "required": ["items"]
      },
      "ProjectGroupsDeleteResponse": {
        "type": "object",
        "properties": {
          "groupId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": ["groupId"]
      },
      "ProjectServiceAccountsGrantResponse": {
        "type": "object",
        "properties": {
          "changed": {
            "type": "boolean"
          },
          "endedDelegatedActions": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": ["dataset-version:delete"]
            }
          },
          "previousRung": {
            "anyOf": [
              {
                "type": "string",
                "enum": ["read", "contribute", "operate", "admin"]
              },
              {
                "type": "null"
              }
            ]
          },
          "projectId": {
            "type": "string",
            "minLength": 1
          },
          "releasedAllHeldTasks": {
            "type": "boolean"
          },
          "releasedHeldTasks": {
            "type": "integer",
            "minimum": 0
          },
          "rung": {
            "type": "string",
            "enum": ["read", "contribute", "operate", "admin"]
          },
          "serviceAccountId": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "changed",
          "endedDelegatedActions",
          "previousRung",
          "projectId",
          "releasedAllHeldTasks",
          "releasedHeldTasks",
          "rung",
          "serviceAccountId"
        ]
      },
      "ProjectServiceAccountsListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectServiceAccount"
            }
          },
          "nextCursor": {
            "$ref": "#/components/schemas/NextCursor"
          }
        },
        "required": ["items", "nextCursor"]
      },
      "ProjectServiceAccount": {
        "type": "object",
        "properties": {
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "rung": {
            "type": "string",
            "enum": ["read", "contribute", "operate", "admin"]
          },
          "serviceAccount": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "name": {
                "type": "string",
                "minLength": 1
              },
              "status": {
                "$ref": "#/components/schemas/ServiceAccountStatus"
              }
            },
            "required": ["id", "name", "status"]
          }
        },
        "required": ["createdAt", "rung", "serviceAccount"]
      },
      "ProjectServiceAccountsRemoveResponse": {
        "type": "object",
        "properties": {
          "changed": {
            "type": "boolean"
          },
          "projectId": {
            "type": "string",
            "minLength": 1
          },
          "releasedAllHeldTasks": {
            "type": "boolean"
          },
          "releasedHeldTasks": {
            "type": "integer",
            "minimum": 0
          },
          "serviceAccountId": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "changed",
          "projectId",
          "releasedAllHeldTasks",
          "releasedHeldTasks",
          "serviceAccountId"
        ]
      },
      "ProjectShelfListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectShelfEntry"
            }
          },
          "nextCursor": {
            "$ref": "#/components/schemas/NextCursor"
          },
          "restart": {
            "type": "boolean"
          },
          "unprovable": {
            "type": "boolean"
          }
        },
        "required": ["items", "nextCursor", "restart", "unprovable"]
      },
      "ProjectShelfEntry": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ProjectShelfEntryGroup"
          },
          {
            "$ref": "#/components/schemas/ProjectShelfEntryProject"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "group": "#/components/schemas/ProjectShelfEntryGroup",
            "project": "#/components/schemas/ProjectShelfEntryProject"
          }
        }
      },
      "ProjectShelfEntryGroup": {
        "type": "object",
        "properties": {
          "folded": {
            "type": "boolean"
          },
          "groupId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "kind": {
            "type": "string",
            "const": "group"
          },
          "name": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": ["folded", "groupId", "kind", "name"]
      },
      "ProjectShelfEntryProject": {
        "type": "object",
        "properties": {
          "groupId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "kind": {
            "type": "string",
            "const": "project"
          },
          "project": {
            "$ref": "#/components/schemas/Project"
          }
        },
        "required": ["groupId", "kind", "project"]
      },
      "Project": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "minLength": 1
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "projectId": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": ["accountId", "createdAt", "name", "projectId"]
      },
      "ProjectsListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Project"
            }
          },
          "nextCursor": {
            "$ref": "#/components/schemas/NextCursor"
          }
        },
        "required": ["items", "nextCursor"]
      },
      "ProjectsSetGroupResponse": {
        "type": "object",
        "properties": {
          "groupId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "projectId": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": ["groupId", "projectId"]
      },
      "ServiceAccountTokensCreateResponse": {
        "type": "object",
        "properties": {
          "outcome": {
            "type": "string",
            "enum": ["issued", "replayed"]
          },
          "serviceAccountId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "token": {
            "$ref": "#/components/schemas/ServiceAccountIssuedToken"
          }
        },
        "required": ["outcome", "serviceAccountId", "token"]
      },
      "ServiceAccountIssuedToken": {
        "type": "object",
        "properties": {
          "expiresAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "hint": {
            "description": "The last characters of the token's text; absent on a token minted before hints.",
            "type": "string",
            "minLength": 1
          },
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "secret": {
            "description": "The token's text, shown once: present only on the answer that created the token. A replayed answer carries none; the secret cannot be shown again.",
            "type": "string",
            "minLength": 1,
            "format": "password"
          },
          "status": {
            "$ref": "#/components/schemas/ServiceAccountTokenStatus"
          }
        },
        "required": ["expiresAt", "id", "name", "status"]
      },
      "ServiceAccountTokenStatus": {
        "type": "string",
        "enum": ["active", "disabled", "expired", "revoked"]
      },
      "ServiceAccountTokensReplaceResponse": {
        "type": "object",
        "properties": {
          "outcome": {
            "type": "string",
            "enum": ["issued", "replayed"]
          },
          "previous": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "name": {
                "type": "string",
                "minLength": 1
              },
              "status": {
                "$ref": "#/components/schemas/ServiceAccountTokenStatus"
              },
              "stopsAt": {
                "$ref": "#/components/schemas/UtcTimestamp"
              }
            },
            "required": ["id", "name", "status", "stopsAt"]
          },
          "serviceAccountId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "token": {
            "$ref": "#/components/schemas/ServiceAccountIssuedToken"
          }
        },
        "required": ["outcome", "previous", "serviceAccountId", "token"]
      },
      "ServiceAccountTokensChangedResponse": {
        "type": "object",
        "properties": {
          "changed": {
            "type": "boolean"
          },
          "token": {
            "$ref": "#/components/schemas/ServiceAccountToken"
          }
        },
        "required": ["changed", "token"]
      },
      "ServiceAccountToken": {
        "type": "object",
        "properties": {
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "createdBy": {
            "$ref": "#/components/schemas/ServiceAccountActor"
          },
          "effectivePermissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountPermission"
            }
          },
          "expiresAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "hint": {
            "type": "string",
            "minLength": 1
          },
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "lastUsedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "replacedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "replacedByTokenId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "replacesTokenId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "restriction": {
            "type": "object",
            "properties": {
              "accountPermissions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AccountPermission"
                }
              },
              "projects": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              }
            },
            "required": ["projects"]
          },
          "revokedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "revokedBy": {
            "$ref": "#/components/schemas/ServiceAccountActor"
          },
          "revokedReason": {
            "type": "string",
            "minLength": 1
          },
          "serviceAccountId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "status": {
            "$ref": "#/components/schemas/ServiceAccountTokenStatus"
          },
          "storageNote": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "createdAt",
          "createdBy",
          "effectivePermissions",
          "id",
          "name",
          "restriction",
          "serviceAccountId",
          "status"
        ]
      },
      "ServiceAccountActor": {
        "type": "object",
        "properties": {
          "issuer": {
            "type": "string",
            "minLength": 1
          },
          "subject": {
            "type": "string",
            "minLength": 1
          },
          "type": {
            "type": "string",
            "enum": ["system", "user"]
          }
        },
        "required": ["issuer", "subject", "type"]
      },
      "ServiceAccountTokensShortenResponse": {
        "type": "object",
        "properties": {
          "changed": {
            "type": "boolean"
          },
          "previousExpiresAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "token": {
            "$ref": "#/components/schemas/ServiceAccountToken"
          }
        },
        "required": ["changed", "previousExpiresAt", "token"]
      },
      "ServiceAccountsCreateResponse": {
        "type": "object",
        "properties": {
          "outcome": {
            "type": "string",
            "enum": ["created", "replayed"]
          },
          "serviceAccount": {
            "$ref": "#/components/schemas/ServiceAccount"
          },
          "token": {
            "$ref": "#/components/schemas/ServiceAccountIssuedToken"
          }
        },
        "required": ["outcome", "serviceAccount"]
      },
      "ServiceAccount": {
        "type": "object",
        "properties": {
          "accountPermissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountPermission"
            }
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "createdBy": {
            "$ref": "#/components/schemas/ServiceAccountActor"
          },
          "description": {
            "type": "string",
            "minLength": 1
          },
          "disabledAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "disabledBy": {
            "$ref": "#/components/schemas/ServiceAccountActor"
          },
          "disabledReason": {
            "type": "string",
            "minLength": 1
          },
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "liveTokens": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "minimum": 0
              },
              "lastUsedAt": {
                "$ref": "#/components/schemas/UtcTimestamp"
              },
              "soonestExpiresAt": {
                "$ref": "#/components/schemas/UtcTimestamp"
              },
              "truncated": {
                "type": "boolean"
              }
            },
            "required": ["count", "truncated"]
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "owner": {
            "$ref": "#/components/schemas/ServiceAccountOwner"
          },
          "projectGrants": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "minimum": 0
              },
              "truncated": {
                "type": "boolean"
              }
            },
            "required": ["count", "truncated"]
          },
          "retiredAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "retiredBy": {
            "$ref": "#/components/schemas/ServiceAccountActor"
          },
          "retiredReason": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "$ref": "#/components/schemas/ServiceAccountStatus"
          },
          "subject": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "accountPermissions",
          "createdAt",
          "createdBy",
          "id",
          "liveTokens",
          "name",
          "projectGrants",
          "status",
          "subject"
        ]
      },
      "ServiceAccountOwner": {
        "type": "object",
        "properties": {
          "active": {
            "type": "boolean"
          },
          "email": {
            "type": "string",
            "minLength": 1
          },
          "leftAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "membershipId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "name": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": ["active", "membershipId"]
      },
      "ServiceAccountsListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServiceAccount"
            }
          },
          "nextCursor": {
            "$ref": "#/components/schemas/NextCursor"
          }
        },
        "required": ["items", "nextCursor"]
      },
      "ServiceAccountsChangedResponse": {
        "type": "object",
        "properties": {
          "changed": {
            "type": "boolean"
          },
          "serviceAccount": {
            "$ref": "#/components/schemas/ServiceAccount"
          }
        },
        "required": ["changed", "serviceAccount"]
      },
      "ServiceAccountDetail": {
        "type": "object",
        "properties": {
          "grants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServiceAccountGrant"
            }
          },
          "grantsTruncated": {
            "type": "boolean"
          },
          "serviceAccount": {
            "$ref": "#/components/schemas/ServiceAccount"
          },
          "tokens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServiceAccountToken"
            }
          },
          "tokensTruncated": {
            "type": "boolean"
          }
        },
        "required": ["grants", "grantsTruncated", "serviceAccount", "tokens", "tokensTruncated"]
      },
      "ServiceAccountGrant": {
        "type": "object",
        "properties": {
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "projectId": {
            "type": "string",
            "minLength": 1
          },
          "projectName": {
            "type": "string",
            "minLength": 1
          },
          "rung": {
            "type": "string",
            "enum": ["read", "contribute", "operate", "admin"]
          }
        },
        "required": ["createdAt", "projectId", "rung"]
      },
      "ServiceAccountsRetireResponse": {
        "type": "object",
        "properties": {
          "changed": {
            "type": "boolean"
          },
          "revokedTokens": {
            "type": "integer",
            "minimum": 0
          },
          "serviceAccount": {
            "$ref": "#/components/schemas/ServiceAccount"
          }
        },
        "required": ["changed", "revokedTokens", "serviceAccount"]
      },
      "ServiceAccountsSetPermissionsResponse": {
        "type": "object",
        "properties": {
          "added": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountPermission"
            }
          },
          "changed": {
            "type": "boolean"
          },
          "removed": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountPermission"
            }
          },
          "serviceAccount": {
            "$ref": "#/components/schemas/ServiceAccount"
          }
        },
        "required": ["added", "changed", "removed", "serviceAccount"]
      },
      "SessionResponse": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "minLength": 1
          },
          "accountName": {
            "type": "string",
            "minLength": 1
          },
          "effectivePermissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "nextCursor": {
            "$ref": "#/components/schemas/NextCursor"
          },
          "principal": {
            "$ref": "#/components/schemas/SessionPrincipal"
          },
          "projects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SessionProject"
            }
          },
          "serviceAccount": {
            "$ref": "#/components/schemas/SessionServiceAccount"
          },
          "token": {
            "$ref": "#/components/schemas/SessionToken"
          }
        },
        "required": ["accountId", "accountName", "principal"]
      },
      "SessionPrincipal": {
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string",
            "minLength": 1
          },
          "subject": {
            "type": "string",
            "minLength": 1
          },
          "type": {
            "type": "string",
            "enum": ["agent", "user"]
          }
        },
        "required": ["displayName", "subject", "type"]
      },
      "SessionProject": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "projectId": {
            "type": "string",
            "minLength": 1
          },
          "rung": {
            "type": "string",
            "enum": ["read", "contribute", "operate", "admin"]
          }
        },
        "required": ["name", "projectId", "rung"]
      },
      "SessionServiceAccount": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string",
            "enum": ["active", "disabled", "retired"]
          }
        },
        "required": ["id", "name", "status"]
      },
      "SessionToken": {
        "type": "object",
        "properties": {
          "expiresAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "hint": {
            "type": "string",
            "minLength": 1
          },
          "createdVia": {
            "type": "string",
            "enum": ["cli-login", "dashboard"]
          },
          "projectCapabilities": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "enum": ["dataset-version:approve"]
            }
          },
          "projectRungCap": {
            "type": "string",
            "enum": ["read", "contribute", "operate", "admin"]
          },
          "restriction": {
            "type": "string",
            "enum": ["inherits", "narrower"]
          }
        },
        "required": ["expiresAt", "projectRungCap", "restriction"]
      },
      "SourceMaskReadPresignResponse": {
        "type": "object",
        "properties": {
          "chunks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "expiresAt": {
                  "$ref": "#/components/schemas/UtcTimestamp"
                },
                "hash": {
                  "$ref": "#/components/schemas/Sha256Digest"
                },
                "url": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": ["expiresAt", "hash", "url"]
            }
          },
          "manifest": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "expiresAt": {
                    "$ref": "#/components/schemas/UtcTimestamp"
                  },
                  "hash": {
                    "$ref": "#/components/schemas/Sha256Digest"
                  },
                  "url": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": ["expiresAt", "hash", "url"]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": ["chunks", "manifest"]
      },
      "SourceRepresentationPresignResponse": {
        "type": "object",
        "properties": {
          "receipt": {
            "$ref": "#/components/schemas/SourceRepresentationReceipt"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "expiresAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          }
        },
        "required": ["receipt", "url", "expiresAt"]
      },
      "SourceRepresentationReceipt": {
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "producer": {
            "type": "string",
            "const": "vgi-area-average-v1"
          },
          "representationId": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "inputHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "accountId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "sourceVersionId": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "descriptorChecksum": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "voxelChecksum": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "descriptorGeometryHash": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "factors": {
            "type": "array",
            "prefixItems": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 64
              },
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 64
              },
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 64
              }
            ]
          },
          "destination": {
            "type": "object",
            "properties": {
              "storageConnectionId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "bucket": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "prefix": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024
              },
              "objectKey": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024
              }
            },
            "required": ["storageConnectionId", "bucket", "prefix", "objectKey"]
          },
          "output": {
            "type": "object",
            "properties": {
              "checksum": {
                "$ref": "#/components/schemas/Sha256Digest"
              },
              "sizeBytes": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 67108864
              },
              "encoding": {
                "type": "string",
                "const": "raw-float32-le"
              },
              "dimensions": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 65536
                  },
                  {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 65536
                  },
                  {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 65536
                  }
                ]
              },
              "sourceIndexScale": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  {
                    "type": "number",
                    "exclusiveMinimum": 0
                  }
                ]
              },
              "sourceIndexOffset": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  }
                ]
              },
              "physicalExtentMm": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  {
                    "type": "number",
                    "exclusiveMinimum": 0
                  }
                ]
              },
              "mirror": {
                "type": "object",
                "properties": {
                  "x": {
                    "type": "boolean"
                  },
                  "y": {
                    "type": "boolean"
                  },
                  "z": {
                    "type": "boolean"
                  }
                },
                "required": ["x", "y", "z"]
              },
              "invert": {
                "type": "boolean"
              },
              "datarange": {
                "anyOf": [
                  {
                    "type": "array",
                    "prefixItems": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "number"
                      }
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "intensity": {
                "type": "string",
                "const": "stored-values-area-mean"
              }
            },
            "required": [
              "checksum",
              "sizeBytes",
              "encoding",
              "dimensions",
              "sourceIndexScale",
              "sourceIndexOffset",
              "physicalExtentMm",
              "mirror",
              "invert",
              "datarange",
              "intensity"
            ]
          },
          "planes": {
            "type": "object",
            "properties": {
              "rendererVersion": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "encoding": {
                "type": "string",
                "const": "png-gray8"
              },
              "window": {
                "type": "object",
                "properties": {
                  "lower": {
                    "type": "number"
                  },
                  "upper": {
                    "type": "number"
                  }
                },
                "required": ["lower", "upper"]
              },
              "axial": {
                "$ref": "#/components/schemas/SourceRepresentationPlane"
              },
              "coronal": {
                "$ref": "#/components/schemas/SourceRepresentationPlane"
              },
              "sagittal": {
                "$ref": "#/components/schemas/SourceRepresentationPlane"
              }
            },
            "required": ["rendererVersion", "encoding", "window", "axial", "coronal", "sagittal"]
          }
        },
        "required": [
          "schemaVersion",
          "producer",
          "representationId",
          "inputHash",
          "accountId",
          "sourceVersionId",
          "descriptorChecksum",
          "voxelChecksum",
          "descriptorGeometryHash",
          "factors",
          "destination",
          "output"
        ]
      },
      "SourceRepresentationPlane": {
        "type": "object",
        "properties": {
          "objectKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024
          },
          "checksum": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "sizeBytes": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 524288
          },
          "width": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 512
          },
          "height": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 512
          },
          "sliceIndex": {
            "type": "integer",
            "minimum": 0,
            "maximum": 65536
          },
          "physicalExtentMm": {
            "type": "array",
            "prefixItems": [
              {
                "type": "number",
                "exclusiveMinimum": 0
              },
              {
                "type": "number",
                "exclusiveMinimum": 0
              }
            ]
          }
        },
        "required": [
          "objectKey",
          "checksum",
          "sizeBytes",
          "width",
          "height",
          "sliceIndex",
          "physicalExtentMm"
        ]
      },
      "SourceRepresentationStatus": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/SourceRepresentationStatusUnavailable"
          },
          {
            "$ref": "#/components/schemas/SourceRepresentationStatusPending"
          },
          {
            "$ref": "#/components/schemas/SourceRepresentationStatusFailed"
          },
          {
            "$ref": "#/components/schemas/SourceRepresentationStatusReady"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "status",
          "mapping": {
            "unavailable": "#/components/schemas/SourceRepresentationStatusUnavailable",
            "pending": "#/components/schemas/SourceRepresentationStatusPending",
            "failed": "#/components/schemas/SourceRepresentationStatusFailed",
            "ready": "#/components/schemas/SourceRepresentationStatusReady"
          }
        }
      },
      "SourceRepresentationStatusUnavailable": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "const": "unavailable"
          },
          "reason": {
            "type": "string",
            "enum": ["not-prepared", "disabled", "unsupported", "removed"]
          }
        },
        "required": ["status", "reason"]
      },
      "SourceRepresentationStatusPending": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "const": "pending"
          },
          "phase": {
            "type": "string",
            "enum": ["queued", "preparing", "verifying"]
          }
        },
        "required": ["status", "phase"]
      },
      "SourceRepresentationStatusFailed": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "const": "failed"
          },
          "message": {
            "type": "string",
            "maxLength": 512
          }
        },
        "required": ["status", "message"]
      },
      "SourceRepresentationStatusReady": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "const": "ready"
          },
          "receipt": {
            "$ref": "#/components/schemas/SourceRepresentationReceipt"
          }
        },
        "required": ["status", "receipt"]
      },
      "SourcesListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Source"
            }
          },
          "nextCursor": {
            "$ref": "#/components/schemas/NextCursor"
          }
        },
        "required": ["items", "nextCursor"]
      },
      "Source": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ViewableSource"
          },
          {
            "$ref": "#/components/schemas/RawSource"
          },
          {
            "$ref": "#/components/schemas/UnsupportedSource"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "viewability",
          "mapping": {
            "viewable": "#/components/schemas/ViewableSource",
            "raw": "#/components/schemas/RawSource",
            "unsupported": "#/components/schemas/UnsupportedSource"
          }
        }
      },
      "ViewableSource": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "minLength": 1
          },
          "arrival": {
            "description": "How this Source first arrived. `api`, `cli`, `sdk-typescript` and `sdk-python` are reported by the client in its `Nitsor-Client` header, and a request without a recognised one records `api`: they describe a cooperative caller and prove nothing. `cli` and `sdk-typescript` come from earlier clients that are no longer published; the Python SDK reports `sdk-python`. `manual-upload`, `seed`, `demo` and `system` are written by the server and no header can claim them. Later arrivals of the same bytes do not change it. `unknown` marks a Source registered before arrivals were recorded. Absent only from servers older than this field.",
            "$ref": "#/components/schemas/SourceArrival"
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "credentialKind": {
            "description": "The kind of credential that authenticated the first arrival, established by the server: `person` (a signed-in session or a person token), `agent` (an Agent credential) or `system` (deployment access, which the seed and demo runs use). `unknown` marks a Source registered before it was recorded. Absent only from servers older than this field.",
            "$ref": "#/components/schemas/SourceCredentialKind"
          },
          "issues": {
            "maxItems": 32,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IngestIssue"
            }
          },
          "manifest": {
            "maxItems": 512,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceManifestEntry"
            }
          },
          "registeredFileCount": {
            "type": "integer",
            "minimum": 0
          },
          "rejectedFileCount": {
            "type": "integer",
            "minimum": 0
          },
          "sourceId": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "sourceFormat": {
            "$ref": "#/components/schemas/SourceFormat"
          },
          "sourceObjectCount": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 512
          },
          "sourceVersionId": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "status": {
            "type": "string",
            "enum": ["registered", "partial_failure"]
          },
          "storageConnectionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "geometry": {
            "$ref": "#/components/schemas/SourceGeometry"
          },
          "seriesInstanceUid": {
            "type": "string",
            "minLength": 1
          },
          "studyInstanceUid": {
            "type": "string",
            "minLength": 1
          },
          "viewability": {
            "type": "string",
            "const": "viewable"
          }
        },
        "required": [
          "accountId",
          "createdAt",
          "issues",
          "manifest",
          "registeredFileCount",
          "rejectedFileCount",
          "sourceId",
          "sourceFormat",
          "sourceObjectCount",
          "sourceVersionId",
          "status",
          "storageConnectionId",
          "geometry",
          "viewability"
        ]
      },
      "SourceArrival": {
        "type": "string",
        "enum": [
          "api",
          "cli",
          "sdk-typescript",
          "sdk-python",
          "manual-upload",
          "seed",
          "demo",
          "system",
          "unknown"
        ]
      },
      "SourceCredentialKind": {
        "type": "string",
        "enum": ["person", "agent", "system", "unknown"]
      },
      "SourceGeometry": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/DicomGeometry"
          },
          {
            "$ref": "#/components/schemas/RawVolumeGeometry"
          },
          {
            "$ref": "#/components/schemas/TiffStackGeometry"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "dicom": "#/components/schemas/DicomGeometry",
            "raw-volume": "#/components/schemas/RawVolumeGeometry",
            "tiff-stack": "#/components/schemas/TiffStackGeometry"
          }
        }
      },
      "DicomGeometry": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "dicom"
          },
          "bitsAllocated": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "bitsStored": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "columns": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "frames": {
            "$ref": "#/components/schemas/DicomFrames"
          },
          "highBit": {
            "type": "integer",
            "minimum": 0
          },
          "imageOrientationPatient": {
            "minItems": 6,
            "maxItems": 6,
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "modality": {
            "type": "string",
            "minLength": 1
          },
          "orientationSource": {
            "$ref": "#/components/schemas/DicomOrientationSource"
          },
          "photometricInterpretation": {
            "type": "string",
            "minLength": 1
          },
          "pixelRepresentation": {
            "anyOf": [
              {
                "type": "number",
                "const": 0
              },
              {
                "type": "number",
                "const": 1
              }
            ]
          },
          "pixelSpacing": {
            "minItems": 2,
            "maxItems": 2,
            "type": "array",
            "items": {
              "type": "number",
              "exclusiveMinimum": 0
            }
          },
          "rescaleIntercept": {
            "type": "number"
          },
          "rescaleSlope": {
            "type": "number"
          },
          "rows": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "sliceSpacing": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "spacingSource": {
            "$ref": "#/components/schemas/DicomSpacingSource"
          },
          "transferSyntaxUid": {
            "type": "string",
            "minLength": 1
          },
          "windowCenter": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "windowWidth": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "kind",
          "bitsAllocated",
          "bitsStored",
          "columns",
          "highBit",
          "imageOrientationPatient",
          "modality",
          "photometricInterpretation",
          "pixelRepresentation",
          "pixelSpacing",
          "rescaleIntercept",
          "rescaleSlope",
          "rows",
          "sliceSpacing",
          "transferSyntaxUid",
          "windowCenter",
          "windowWidth"
        ]
      },
      "DicomFrames": {
        "type": "object",
        "properties": {
          "axis": {
            "type": "string",
            "enum": ["time", "space"]
          },
          "count": {
            "type": "integer",
            "minimum": 2
          },
          "frameTimeMs": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": ["axis", "count", "frameTimeMs"]
      },
      "DicomOrientationSource": {
        "type": "string",
        "enum": ["image-plane", "in-plane-only", "none"]
      },
      "DicomSpacingSource": {
        "type": "string",
        "enum": ["pixel-spacing", "us-region", "uncalibrated"]
      },
      "RawVolumeGeometry": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "raw-volume"
          },
          "columns": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "rows": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "sliceCount": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "pixelSpacing": {
            "type": "array",
            "prefixItems": [
              {
                "type": "number",
                "exclusiveMinimum": 0
              },
              {
                "type": "number",
                "exclusiveMinimum": 0
              }
            ]
          },
          "sliceSpacingMm": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "encoding": {
            "$ref": "#/components/schemas/RawSliceEncoding"
          },
          "skipHeaderBytes": {
            "type": "integer",
            "minimum": 0
          },
          "datarange": {
            "anyOf": [
              {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "invert": {
            "type": "boolean"
          },
          "mirror": {
            "type": "object",
            "properties": {
              "x": {
                "type": "boolean"
              },
              "y": {
                "type": "boolean"
              },
              "z": {
                "type": "boolean"
              }
            },
            "required": ["x", "y", "z"]
          }
        },
        "required": [
          "kind",
          "columns",
          "rows",
          "sliceCount",
          "pixelSpacing",
          "sliceSpacingMm",
          "encoding",
          "skipHeaderBytes",
          "datarange",
          "invert",
          "mirror"
        ]
      },
      "TiffStackGeometry": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "tiff-stack"
          },
          "columns": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "rows": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "sliceCount": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "bitsPerSample": {
            "anyOf": [
              {
                "type": "number",
                "const": 8
              },
              {
                "type": "number",
                "const": 16
              }
            ]
          },
          "byteOrder": {
            "type": "string",
            "enum": ["little-endian", "big-endian"]
          },
          "invert": {
            "type": "boolean"
          },
          "layout": {
            "type": "string",
            "enum": ["single-page", "multi-page"]
          },
          "sliceByteOffsets": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0
            }
          },
          "spacingMm": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "x": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "y": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "z": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  }
                },
                "required": ["x", "y", "z"]
              },
              {
                "type": "null"
              }
            ]
          },
          "spacingSource": {
            "$ref": "#/components/schemas/TiffStackSpacingSource"
          }
        },
        "required": [
          "kind",
          "columns",
          "rows",
          "sliceCount",
          "bitsPerSample",
          "byteOrder",
          "invert",
          "layout",
          "sliceByteOffsets",
          "spacingMm",
          "spacingSource"
        ]
      },
      "TiffStackSpacingSource": {
        "type": "string",
        "enum": ["sidecar", "unknown"]
      },
      "RawSource": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "minLength": 1
          },
          "arrival": {
            "description": "How this Source first arrived. `api`, `cli`, `sdk-typescript` and `sdk-python` are reported by the client in its `Nitsor-Client` header, and a request without a recognised one records `api`: they describe a cooperative caller and prove nothing. `cli` and `sdk-typescript` come from earlier clients that are no longer published; the Python SDK reports `sdk-python`. `manual-upload`, `seed`, `demo` and `system` are written by the server and no header can claim them. Later arrivals of the same bytes do not change it. `unknown` marks a Source registered before arrivals were recorded. Absent only from servers older than this field.",
            "$ref": "#/components/schemas/SourceArrival"
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "credentialKind": {
            "description": "The kind of credential that authenticated the first arrival, established by the server: `person` (a signed-in session or a person token), `agent` (an Agent credential) or `system` (deployment access, which the seed and demo runs use). `unknown` marks a Source registered before it was recorded. Absent only from servers older than this field.",
            "$ref": "#/components/schemas/SourceCredentialKind"
          },
          "issues": {
            "maxItems": 32,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IngestIssue"
            }
          },
          "manifest": {
            "maxItems": 512,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceManifestEntry"
            }
          },
          "registeredFileCount": {
            "type": "integer",
            "minimum": 0
          },
          "rejectedFileCount": {
            "type": "integer",
            "minimum": 0
          },
          "sourceId": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "sourceFormat": {
            "$ref": "#/components/schemas/SourceFormat"
          },
          "sourceObjectCount": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 512
          },
          "sourceVersionId": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "status": {
            "type": "string",
            "enum": ["registered", "partial_failure"]
          },
          "storageConnectionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "hasImageGroups": {
            "type": "boolean",
            "const": true
          },
          "viewability": {
            "type": "string",
            "const": "raw"
          }
        },
        "required": [
          "accountId",
          "createdAt",
          "issues",
          "manifest",
          "registeredFileCount",
          "rejectedFileCount",
          "sourceId",
          "sourceFormat",
          "sourceObjectCount",
          "sourceVersionId",
          "status",
          "storageConnectionId",
          "viewability"
        ]
      },
      "UnsupportedSource": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "minLength": 1
          },
          "arrival": {
            "description": "How this Source first arrived. `api`, `cli`, `sdk-typescript` and `sdk-python` are reported by the client in its `Nitsor-Client` header, and a request without a recognised one records `api`: they describe a cooperative caller and prove nothing. `cli` and `sdk-typescript` come from earlier clients that are no longer published; the Python SDK reports `sdk-python`. `manual-upload`, `seed`, `demo` and `system` are written by the server and no header can claim them. Later arrivals of the same bytes do not change it. `unknown` marks a Source registered before arrivals were recorded. Absent only from servers older than this field.",
            "$ref": "#/components/schemas/SourceArrival"
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "credentialKind": {
            "description": "The kind of credential that authenticated the first arrival, established by the server: `person` (a signed-in session or a person token), `agent` (an Agent credential) or `system` (deployment access, which the seed and demo runs use). `unknown` marks a Source registered before it was recorded. Absent only from servers older than this field.",
            "$ref": "#/components/schemas/SourceCredentialKind"
          },
          "issues": {
            "maxItems": 32,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IngestIssue"
            }
          },
          "manifest": {
            "maxItems": 512,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceManifestEntry"
            }
          },
          "registeredFileCount": {
            "type": "integer",
            "minimum": 0
          },
          "rejectedFileCount": {
            "type": "integer",
            "minimum": 0
          },
          "sourceId": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "sourceFormat": {
            "$ref": "#/components/schemas/SourceFormat"
          },
          "sourceObjectCount": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 512
          },
          "sourceVersionId": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "status": {
            "type": "string",
            "enum": ["registered", "partial_failure"]
          },
          "storageConnectionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "viewability": {
            "type": "string",
            "const": "unsupported"
          }
        },
        "required": [
          "accountId",
          "createdAt",
          "issues",
          "manifest",
          "registeredFileCount",
          "rejectedFileCount",
          "sourceId",
          "sourceFormat",
          "sourceObjectCount",
          "sourceVersionId",
          "status",
          "storageConnectionId",
          "viewability"
        ]
      },
      "StorageConnection": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "minLength": 1
          },
          "bucket": {
            "type": "string",
            "minLength": 1
          },
          "connectionId": {
            "type": "string",
            "minLength": 1
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "credential": {
            "$ref": "#/components/schemas/StorageConnectionCredential"
          },
          "endpoint": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "pathStyle": {
            "type": "boolean"
          },
          "prefix": {
            "type": "string"
          },
          "provider": {
            "$ref": "#/components/schemas/StorageProvider"
          },
          "region": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "accountId",
          "bucket",
          "connectionId",
          "createdAt",
          "credential",
          "endpoint",
          "name",
          "pathStyle",
          "prefix",
          "region"
        ]
      },
      "StorageConnectionCredential": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/StorageConnectionCredentialHandle"
          },
          {
            "$ref": "#/components/schemas/StorageConnectionCredentialLegacyUnbound"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "handle": "#/components/schemas/StorageConnectionCredentialHandle",
            "legacy-unbound": "#/components/schemas/StorageConnectionCredentialLegacyUnbound"
          }
        }
      },
      "StorageConnectionCredentialHandle": {
        "type": "object",
        "properties": {
          "handleId": {
            "$ref": "#/components/schemas/StorageCredentialHandleId"
          },
          "kind": {
            "type": "string",
            "const": "handle"
          },
          "label": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": ["handleId", "kind", "label"]
      },
      "StorageConnectionCredentialLegacyUnbound": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "legacy-unbound"
          }
        },
        "required": ["kind"]
      },
      "StorageProvider": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/StorageProviderAmazonS3"
          },
          {
            "$ref": "#/components/schemas/StorageProviderCloudflareR2"
          },
          {
            "$ref": "#/components/schemas/StorageProviderGoogleCloudStorageHmac"
          },
          {
            "$ref": "#/components/schemas/StorageProviderS3Compatible"
          },
          {
            "$ref": "#/components/schemas/StorageProviderCustom"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "amazon-s3": "#/components/schemas/StorageProviderAmazonS3",
            "cloudflare-r2": "#/components/schemas/StorageProviderCloudflareR2",
            "google-cloud-storage-hmac": "#/components/schemas/StorageProviderGoogleCloudStorageHmac",
            "s3-compatible": "#/components/schemas/StorageProviderS3Compatible",
            "custom": "#/components/schemas/StorageProviderCustom"
          }
        }
      },
      "StorageProviderAmazonS3": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "amazon-s3"
          }
        },
        "required": ["kind"]
      },
      "StorageProviderCloudflareR2": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          },
          "jurisdiction": {
            "type": "string",
            "enum": ["default", "eu", "us", "fedramp"]
          },
          "kind": {
            "type": "string",
            "const": "cloudflare-r2"
          }
        },
        "required": ["accountId", "jurisdiction", "kind"]
      },
      "StorageProviderGoogleCloudStorageHmac": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "google-cloud-storage-hmac"
          }
        },
        "required": ["kind"]
      },
      "StorageProviderS3Compatible": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "s3-compatible"
          }
        },
        "required": ["kind"]
      },
      "StorageProviderCustom": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "custom"
          }
        },
        "required": ["kind"]
      },
      "StorageConnectionsGetResponse": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "minLength": 1
          },
          "bucket": {
            "type": "string",
            "minLength": 1
          },
          "connectionId": {
            "type": "string",
            "minLength": 1
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "credential": {
            "$ref": "#/components/schemas/StorageConnectionCredential"
          },
          "endpoint": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "pathStyle": {
            "type": "boolean"
          },
          "prefix": {
            "type": "string"
          },
          "provider": {
            "$ref": "#/components/schemas/StorageProvider"
          },
          "region": {
            "type": "string",
            "minLength": 1
          },
          "previewObjectBytes": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "accountId",
          "bucket",
          "connectionId",
          "createdAt",
          "credential",
          "endpoint",
          "name",
          "pathStyle",
          "prefix",
          "region",
          "previewObjectBytes"
        ]
      },
      "StorageCredentialHandlesListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StorageCredentialHandleSummary"
            }
          },
          "nextCursor": {
            "$ref": "#/components/schemas/NextCursor"
          }
        },
        "required": ["items", "nextCursor"]
      },
      "StorageCredentialHandleSummary": {
        "type": "object",
        "properties": {
          "bucket": {
            "type": "string",
            "minLength": 1
          },
          "endpoint": {
            "type": "string",
            "minLength": 1
          },
          "handleId": {
            "$ref": "#/components/schemas/StorageCredentialHandleId"
          },
          "label": {
            "type": "string",
            "minLength": 1
          },
          "pathStyle": {
            "type": "boolean"
          },
          "prefixScope": {
            "type": "string"
          },
          "region": {
            "type": "string",
            "minLength": 1
          },
          "role": {
            "$ref": "#/components/schemas/StorageCredentialRole"
          }
        },
        "required": [
          "bucket",
          "endpoint",
          "handleId",
          "label",
          "pathStyle",
          "prefixScope",
          "region",
          "role"
        ]
      },
      "StorageCredentialRole": {
        "type": "string",
        "enum": ["read", "read-write"]
      },
      "StorageCredentialsAddResponse": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/StorageCredentialsAddResponseConnected"
          },
          {
            "$ref": "#/components/schemas/StorageCredentialsAddResponseFailed"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "status",
          "mapping": {
            "connected": "#/components/schemas/StorageCredentialsAddResponseConnected",
            "failed": "#/components/schemas/StorageCredentialsAddResponseFailed"
          }
        }
      },
      "StorageCredentialsAddResponseConnected": {
        "type": "object",
        "properties": {
          "capabilities": {
            "$ref": "#/components/schemas/StorageCapabilityVerdicts"
          },
          "connection": {
            "$ref": "#/components/schemas/StorageConnection"
          },
          "status": {
            "type": "string",
            "const": "connected"
          }
        },
        "required": ["capabilities", "connection", "status"]
      },
      "StorageCapabilityVerdicts": {
        "type": "object",
        "properties": {
          "browserGet": {
            "$ref": "#/components/schemas/StorageCapabilityVerdictsBrowserGet"
          },
          "list": {
            "$ref": "#/components/schemas/StorageCapabilityVerdictsList"
          },
          "read": {
            "$ref": "#/components/schemas/StorageCapabilityVerdictsRead"
          }
        },
        "required": ["browserGet", "list", "read"]
      },
      "StorageCapabilityVerdictsBrowserGet": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/StorageCapabilityVerdictsBrowserGetPassed"
          },
          {
            "$ref": "#/components/schemas/StorageCapabilityVerdictsBrowserGetNotRun"
          },
          {
            "$ref": "#/components/schemas/StorageCapabilityVerdictsBrowserGetFailed"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "status",
          "mapping": {
            "passed": "#/components/schemas/StorageCapabilityVerdictsBrowserGetPassed",
            "not_run": "#/components/schemas/StorageCapabilityVerdictsBrowserGetNotRun",
            "failed": "#/components/schemas/StorageCapabilityVerdictsBrowserGetFailed"
          }
        }
      },
      "StorageCapabilityVerdictsBrowserGetPassed": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "const": "passed"
          }
        },
        "required": ["status"]
      },
      "StorageCapabilityVerdictsBrowserGetNotRun": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "const": "not_run"
          }
        },
        "required": ["status"]
      },
      "StorageCapabilityVerdictsBrowserGetFailed": {
        "type": "object",
        "properties": {
          "errorCode": {
            "$ref": "#/components/schemas/StorageCheckErrorCode"
          },
          "errorMessage": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "const": "failed"
          },
          "corsRule": {
            "$ref": "#/components/schemas/StorageCorsRule"
          }
        },
        "required": ["errorCode", "errorMessage", "status", "corsRule"]
      },
      "StorageCheckErrorCode": {
        "type": "string",
        "enum": [
          "access_denied",
          "browser_access_refused",
          "bucket_not_found",
          "invalid_access_key",
          "object_missing",
          "region_mismatch",
          "signature_mismatch",
          "store_error",
          "store_unreachable"
        ]
      },
      "StorageCorsRule": {
        "type": "object",
        "properties": {
          "allowedHeaders": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "allowedMethods": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "allowedOrigins": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "exposeHeaders": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "maxAgeSeconds": {
            "type": "number"
          }
        },
        "required": [
          "allowedHeaders",
          "allowedMethods",
          "allowedOrigins",
          "exposeHeaders",
          "maxAgeSeconds"
        ]
      },
      "StorageCapabilityVerdictsList": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/StorageCapabilityVerdictsListPassed"
          },
          {
            "$ref": "#/components/schemas/StorageCapabilityVerdictsListFailed"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "status",
          "mapping": {
            "passed": "#/components/schemas/StorageCapabilityVerdictsListPassed",
            "failed": "#/components/schemas/StorageCapabilityVerdictsListFailed"
          }
        }
      },
      "StorageCapabilityVerdictsListPassed": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "const": "passed"
          }
        },
        "required": ["status"]
      },
      "StorageCapabilityVerdictsListFailed": {
        "type": "object",
        "properties": {
          "errorCode": {
            "$ref": "#/components/schemas/StorageCheckErrorCode"
          },
          "errorMessage": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "const": "failed"
          }
        },
        "required": ["errorCode", "errorMessage", "status"]
      },
      "StorageCapabilityVerdictsRead": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/StorageCapabilityVerdictsReadPassed"
          },
          {
            "$ref": "#/components/schemas/StorageCapabilityVerdictsReadNoObjectYet"
          },
          {
            "$ref": "#/components/schemas/StorageCapabilityVerdictsReadNotRun"
          },
          {
            "$ref": "#/components/schemas/StorageCapabilityVerdictsReadFailed"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "status",
          "mapping": {
            "passed": "#/components/schemas/StorageCapabilityVerdictsReadPassed",
            "no_object_yet": "#/components/schemas/StorageCapabilityVerdictsReadNoObjectYet",
            "not_run": "#/components/schemas/StorageCapabilityVerdictsReadNotRun",
            "failed": "#/components/schemas/StorageCapabilityVerdictsReadFailed"
          }
        }
      },
      "StorageCapabilityVerdictsReadPassed": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "const": "passed"
          }
        },
        "required": ["status"]
      },
      "StorageCapabilityVerdictsReadNoObjectYet": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "const": "no_object_yet"
          }
        },
        "required": ["status"]
      },
      "StorageCapabilityVerdictsReadNotRun": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "const": "not_run"
          }
        },
        "required": ["status"]
      },
      "StorageCapabilityVerdictsReadFailed": {
        "type": "object",
        "properties": {
          "errorCode": {
            "$ref": "#/components/schemas/StorageCheckErrorCode"
          },
          "errorMessage": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "const": "failed"
          }
        },
        "required": ["errorCode", "errorMessage", "status"]
      },
      "StorageCredentialsAddResponseFailed": {
        "type": "object",
        "properties": {
          "capabilities": {
            "$ref": "#/components/schemas/StorageCapabilityVerdicts"
          },
          "errorCode": {
            "$ref": "#/components/schemas/StorageCheckErrorCode"
          },
          "errorMessage": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "const": "failed"
          }
        },
        "required": ["capabilities", "status"]
      },
      "TaskCommentPublicPage": {
        "type": "object",
        "properties": {
          "historyScope": {
            "type": "string",
            "enum": ["lineage", "current-task-only"]
          },
          "threads": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "threadId": {
                  "type": "string"
                },
                "taskId": {
                  "type": "string"
                },
                "seriesId": {
                  "type": "string"
                },
                "body": {
                  "type": "string"
                },
                "author": {
                  "$ref": "#/components/schemas/TaskCommentAuthor"
                },
                "createdAt": {
                  "$ref": "#/components/schemas/UtcTimestamp"
                },
                "seq": {
                  "type": "number"
                },
                "anchor": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/TaskCommentAnchorOutput"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "issue": {
                  "type": "boolean"
                },
                "resolved": {
                  "type": "boolean"
                },
                "updatedAt": {
                  "$ref": "#/components/schemas/UtcTimestamp"
                },
                "replyCount": {
                  "type": "number"
                },
                "replies": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "commentId": {
                        "type": "string"
                      },
                      "threadId": {
                        "type": "string"
                      },
                      "body": {
                        "type": "string"
                      },
                      "author": {
                        "$ref": "#/components/schemas/TaskCommentAuthor"
                      },
                      "createdAt": {
                        "$ref": "#/components/schemas/UtcTimestamp"
                      },
                      "seq": {
                        "type": "number"
                      }
                    },
                    "required": ["commentId", "threadId", "body", "author", "createdAt", "seq"]
                  }
                },
                "repliesTruncated": {
                  "type": "boolean"
                }
              },
              "required": [
                "threadId",
                "taskId",
                "seriesId",
                "body",
                "author",
                "createdAt",
                "seq",
                "anchor",
                "issue",
                "resolved",
                "updatedAt",
                "replyCount",
                "replies",
                "repliesTruncated"
              ]
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "nextBefore": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": ["threads", "hasMore", "nextBefore"]
      },
      "TaskCommentAuthor": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": ["user", "agent", "system"]
          },
          "subject": {
            "type": "string"
          },
          "issuer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "email": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": ["type", "subject", "issuer"]
      },
      "TaskCommentPublicRepliesPage": {
        "type": "object",
        "properties": {
          "replies": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "commentId": {
                  "type": "string"
                },
                "threadId": {
                  "type": "string"
                },
                "body": {
                  "type": "string"
                },
                "author": {
                  "$ref": "#/components/schemas/TaskCommentAuthor"
                },
                "createdAt": {
                  "$ref": "#/components/schemas/UtcTimestamp"
                },
                "seq": {
                  "type": "number"
                }
              },
              "required": ["commentId", "threadId", "body", "author", "createdAt", "seq"]
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "nextBefore": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": ["replies", "hasMore", "nextBefore"]
      },
      "TaskCommentWriteResponse": {
        "type": "object",
        "properties": {
          "threadId": {
            "type": "string"
          }
        },
        "required": ["threadId"]
      },
      "TaxonomyResponse": {
        "type": "object",
        "properties": {
          "definition": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaxonomyDefinitionOutput"
              },
              {
                "type": "null"
              }
            ]
          },
          "taxonomyVersion": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": ["definition", "taxonomyVersion"]
      },
      "TaxonomyBindResponse": {
        "type": "object",
        "properties": {
          "checkpointRequired": {
            "type": "boolean"
          },
          "taxonomyVersion": {
            "type": "string"
          },
          "unchanged": {
            "type": "boolean"
          }
        },
        "required": ["checkpointRequired", "taxonomyVersion", "unchanged"]
      },
      "VersionGraphAnnotationCommitResult": {
        "type": "object",
        "properties": {
          "commit": {
            "$ref": "#/components/schemas/VersionGraphCommit"
          },
          "kind": {
            "type": "string",
            "const": "committed"
          }
        },
        "required": ["commit", "kind"]
      },
      "VersionGraphCommit": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "ambiguousBase": {
            "type": "boolean"
          },
          "authorPrincipalIssuer": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "authorPrincipalSubject": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "authorPrincipalType": {
            "type": "string",
            "enum": ["agent", "system", "user"]
          },
          "authorPrincipalName": {
            "type": "string",
            "minLength": 1
          },
          "authorPrincipalEmail": {
            "type": "string",
            "minLength": 1
          },
          "branchId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "commitId": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "committedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "contentRoot": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "eventRange": {
            "type": "object",
            "properties": {
              "fromSeq": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "toSeq": {
                "type": "integer",
                "exclusiveMinimum": 0
              }
            },
            "required": ["fromSeq", "toSeq"]
          },
          "eventRangeDigest": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "kind": {
            "$ref": "#/components/schemas/VersionGraphCommitKind"
          },
          "message": {
            "type": "string",
            "maxLength": 500
          },
          "messageDisplay": {
            "type": "string"
          },
          "parentCommitIds": {
            "maxItems": 2,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Sha256Digest"
            }
          },
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          }
        },
        "required": [
          "accountId",
          "ambiguousBase",
          "authorPrincipalSubject",
          "authorPrincipalType",
          "branchId",
          "commitId",
          "committedAt",
          "contentRoot",
          "eventRange",
          "eventRangeDigest",
          "kind",
          "message",
          "parentCommitIds",
          "projectId"
        ]
      },
      "VersionGraphCommitKind": {
        "type": "string",
        "enum": [
          "annotate",
          "review",
          "rework",
          "handback",
          "safety",
          "merge",
          "import",
          "branch",
          "checkpoint",
          "run"
        ]
      },
      "VersionGraphBranchCreateResponse": {
        "type": "object",
        "properties": {
          "branch": {
            "$ref": "#/components/schemas/VersionGraphBranch"
          },
          "commit": {
            "$ref": "#/components/schemas/VersionGraphCommit"
          }
        },
        "required": ["branch", "commit"]
      },
      "VersionGraphBranch": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "branchId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "createdByPrincipalIssuer": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "createdByPrincipalSubject": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "createdByPrincipalType": {
            "type": "string",
            "enum": ["agent", "system", "user"]
          },
          "createdFromCommitId": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Sha256Digest"
              },
              {
                "type": "null"
              }
            ]
          },
          "headCommitId": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "headEventSeq": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "lastEventSeq": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "x-nitsor-trim": true
          },
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "protected": {
            "type": "boolean"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          }
        },
        "required": [
          "accountId",
          "branchId",
          "createdAt",
          "createdByPrincipalSubject",
          "createdByPrincipalType",
          "createdFromCommitId",
          "headCommitId",
          "headEventSeq",
          "lastEventSeq",
          "name",
          "projectId",
          "protected",
          "updatedAt"
        ]
      },
      "VersionGraphBranchesListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VersionGraphBranch"
            }
          },
          "nextCursor": {
            "$ref": "#/components/schemas/NextCursor"
          }
        },
        "required": ["items", "nextCursor"]
      },
      "VersionGraphEventAppendResponse": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/VersionGraphPosition"
          },
          {
            "$ref": "#/components/schemas/VersionGraphCheckpointRequired"
          }
        ]
      },
      "VersionGraphPosition": {
        "type": "object",
        "properties": {
          "branchId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "eventSeq": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": ["branchId", "eventSeq"]
      },
      "VersionGraphCheckpointRequired": {
        "type": "object",
        "properties": {
          "branchId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "headEventSeq": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "kind": {
            "type": "string",
            "const": "checkpoint_required"
          },
          "lastEventSeq": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "maxUncommittedEvents": {
            "type": "number",
            "const": 256
          }
        },
        "required": ["branchId", "headEventSeq", "kind", "lastEventSeq", "maxUncommittedEvents"]
      },
      "VersionGraphMergeResult": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/VersionGraphMergeResultConflicts"
          },
          {
            "$ref": "#/components/schemas/VersionGraphMergeResultMerged"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "conflicts": "#/components/schemas/VersionGraphMergeResultConflicts",
            "merged": "#/components/schemas/VersionGraphMergeResultMerged"
          }
        }
      },
      "VersionGraphMergeResultConflicts": {
        "type": "object",
        "properties": {
          "autoMerged": {
            "maxItems": 128,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VersionGraphAutoMergedEntry"
            }
          },
          "autoMergedTotal": {
            "type": "integer",
            "minimum": 0
          },
          "autoMergedTruncated": {
            "type": "boolean"
          },
          "conflicts": {
            "maxItems": 64,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VersionGraphConflict"
            }
          },
          "conflictsTotal": {
            "type": "integer",
            "minimum": 0
          },
          "conflictsTruncated": {
            "type": "boolean"
          },
          "mergeBaseCommitId": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "kind": {
            "type": "string",
            "const": "conflicts"
          },
          "mergeCommit": {
            "type": "null"
          }
        },
        "required": [
          "autoMerged",
          "autoMergedTotal",
          "autoMergedTruncated",
          "conflicts",
          "conflictsTotal",
          "conflictsTruncated",
          "mergeBaseCommitId",
          "kind",
          "mergeCommit"
        ]
      },
      "VersionGraphAutoMergedEntry": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/VersionGraphAutoMergedEntryProject"
          },
          {
            "$ref": "#/components/schemas/VersionGraphAutoMergedEntryWorkflow"
          },
          {
            "$ref": "#/components/schemas/VersionGraphAutoMergedEntryTaxonomy"
          },
          {
            "$ref": "#/components/schemas/VersionGraphAutoMergedEntryAnnotation"
          },
          {
            "$ref": "#/components/schemas/VersionGraphAutoMergedEntryInstructions"
          },
          {
            "$ref": "#/components/schemas/VersionGraphAutoMergedEntryAnswer"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "scope",
          "mapping": {
            "project": "#/components/schemas/VersionGraphAutoMergedEntryProject",
            "workflow": "#/components/schemas/VersionGraphAutoMergedEntryWorkflow",
            "taxonomy": "#/components/schemas/VersionGraphAutoMergedEntryTaxonomy",
            "annotation": "#/components/schemas/VersionGraphAutoMergedEntryAnnotation",
            "instructions": "#/components/schemas/VersionGraphAutoMergedEntryInstructions",
            "answer": "#/components/schemas/VersionGraphAutoMergedEntryAnswer"
          }
        }
      },
      "VersionGraphAutoMergedEntryProject": {
        "type": "object",
        "properties": {
          "fields": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "answers",
                "assetId",
                "body",
                "classId",
                "definition",
                "existence",
                "geometry",
                "name",
                "note",
                "position",
                "provenance",
                "reviewState",
                "value"
              ]
            }
          },
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "scope": {
            "type": "string",
            "const": "project"
          }
        },
        "required": ["fields", "id", "scope"]
      },
      "VersionGraphAutoMergedEntryWorkflow": {
        "type": "object",
        "properties": {
          "fields": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "answers",
                "assetId",
                "body",
                "classId",
                "definition",
                "existence",
                "geometry",
                "name",
                "note",
                "position",
                "provenance",
                "reviewState",
                "value"
              ]
            }
          },
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "scope": {
            "type": "string",
            "const": "workflow"
          }
        },
        "required": ["fields", "id", "scope"]
      },
      "VersionGraphAutoMergedEntryTaxonomy": {
        "type": "object",
        "properties": {
          "fields": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "answers",
                "assetId",
                "body",
                "classId",
                "definition",
                "existence",
                "geometry",
                "name",
                "note",
                "position",
                "provenance",
                "reviewState",
                "value"
              ]
            }
          },
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "scope": {
            "type": "string",
            "const": "taxonomy"
          }
        },
        "required": ["fields", "id", "scope"]
      },
      "VersionGraphAutoMergedEntryAnnotation": {
        "type": "object",
        "properties": {
          "fields": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "answers",
                "assetId",
                "body",
                "classId",
                "definition",
                "existence",
                "geometry",
                "name",
                "note",
                "position",
                "provenance",
                "reviewState",
                "value"
              ]
            }
          },
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "scope": {
            "type": "string",
            "const": "annotation"
          }
        },
        "required": ["fields", "id", "scope"]
      },
      "VersionGraphAutoMergedEntryInstructions": {
        "type": "object",
        "properties": {
          "fields": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "answers",
                "assetId",
                "body",
                "classId",
                "definition",
                "existence",
                "geometry",
                "name",
                "note",
                "position",
                "provenance",
                "reviewState",
                "value"
              ]
            }
          },
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "scope": {
            "type": "string",
            "const": "instructions"
          }
        },
        "required": ["fields", "id", "scope"]
      },
      "VersionGraphAutoMergedEntryAnswer": {
        "type": "object",
        "properties": {
          "answerScope": {
            "$ref": "#/components/schemas/VersionGraphAnswerScope"
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "answers",
                "assetId",
                "body",
                "classId",
                "definition",
                "existence",
                "geometry",
                "name",
                "note",
                "position",
                "provenance",
                "reviewState",
                "value"
              ]
            }
          },
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "scope": {
            "type": "string",
            "const": "answer"
          },
          "scopeKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          }
        },
        "required": ["answerScope", "fields", "id", "scope", "scopeKey"]
      },
      "VersionGraphConflict": {
        "type": "object",
        "properties": {
          "base": {
            "$ref": "#/components/schemas/VersionGraphConflictValue"
          },
          "location": {
            "$ref": "#/components/schemas/VersionGraphConflictLocation"
          },
          "ours": {
            "$ref": "#/components/schemas/VersionGraphConflictValue"
          },
          "resolutionOptions": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": ["open-adjudication", "take-base", "take-ours", "take-theirs"]
            }
          },
          "theirs": {
            "$ref": "#/components/schemas/VersionGraphConflictValue"
          },
          "type": {
            "$ref": "#/components/schemas/VersionGraphConflictType"
          }
        },
        "required": ["base", "location", "ours", "resolutionOptions", "theirs", "type"]
      },
      "VersionGraphConflictValue": {
        "anyOf": [
          {
            "type": "null"
          },
          {
            "type": "string"
          },
          {
            "$ref": "#/components/schemas/VersionGraphLandmarkPosition"
          },
          {
            "$ref": "#/components/schemas/VersionGraphLandmark"
          },
          {
            "$ref": "#/components/schemas/VersionGraphGeometry"
          },
          {
            "$ref": "#/components/schemas/VersionGraphAnnotation"
          },
          {
            "$ref": "#/components/schemas/VersionGraphAnnotationProvenance"
          },
          {
            "$ref": "#/components/schemas/VersionGraphAnswerValueOutput"
          },
          {
            "$ref": "#/components/schemas/VersionGraphClassificationAnswerOutput"
          }
        ]
      },
      "VersionGraphAnnotation": {
        "type": "object",
        "properties": {
          "annotationId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "answers": {
            "minItems": 1,
            "maxItems": 128,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VersionGraphAnnotationAnswerOutput"
            },
            "description": "Sorted by `fieldId`, each field at most once."
          },
          "assetId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "classId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "geometry": {
            "$ref": "#/components/schemas/VersionGraphGeometry"
          },
          "note": {
            "type": "string",
            "maxLength": 1000
          },
          "provenance": {
            "$ref": "#/components/schemas/VersionGraphAnnotationProvenance"
          },
          "reviewState": {
            "$ref": "#/components/schemas/VersionGraphReviewState"
          }
        },
        "required": ["annotationId", "assetId", "classId", "geometry", "note", "reviewState"]
      },
      "VersionGraphAnnotationProvenance": {
        "type": "object",
        "properties": {
          "componentId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "componentIds": {
            "minItems": 1,
            "maxItems": 128,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            }
          },
          "disposition": {
            "type": "string",
            "enum": ["accepted", "corrected"]
          },
          "jobId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "kind": {
            "type": "string",
            "const": "model"
          },
          "modelFamily": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "modelVersion": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "proposalId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "runId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "setupVersion": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          }
        },
        "required": ["disposition", "kind", "modelFamily", "modelVersion", "proposalId"]
      },
      "VersionGraphConflictLocation": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/VersionGraphConflictLocationProject"
          },
          {
            "$ref": "#/components/schemas/VersionGraphConflictLocationWorkflow"
          },
          {
            "$ref": "#/components/schemas/VersionGraphConflictLocationTaxonomy"
          },
          {
            "$ref": "#/components/schemas/VersionGraphConflictLocationInstructions"
          },
          {
            "$ref": "#/components/schemas/VersionGraphConflictLocationAnnotation"
          },
          {
            "$ref": "#/components/schemas/VersionGraphConflictLocationAnswer"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "scope",
          "mapping": {
            "project": "#/components/schemas/VersionGraphConflictLocationProject",
            "workflow": "#/components/schemas/VersionGraphConflictLocationWorkflow",
            "taxonomy": "#/components/schemas/VersionGraphConflictLocationTaxonomy",
            "instructions": "#/components/schemas/VersionGraphConflictLocationInstructions",
            "annotation": "#/components/schemas/VersionGraphConflictLocationAnnotation",
            "answer": "#/components/schemas/VersionGraphConflictLocationAnswer"
          }
        }
      },
      "VersionGraphConflictLocationProject": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "const": "name"
          },
          "scope": {
            "type": "string",
            "const": "project"
          }
        },
        "required": ["field", "scope"]
      },
      "VersionGraphConflictLocationWorkflow": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "const": "definition"
          },
          "scope": {
            "type": "string",
            "const": "workflow"
          }
        },
        "required": ["field", "scope"]
      },
      "VersionGraphConflictLocationTaxonomy": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "const": "definition"
          },
          "scope": {
            "type": "string",
            "const": "taxonomy"
          }
        },
        "required": ["field", "scope"]
      },
      "VersionGraphConflictLocationInstructions": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "const": "body"
          },
          "scope": {
            "type": "string",
            "const": "instructions"
          }
        },
        "required": ["field", "scope"]
      },
      "VersionGraphConflictLocationAnnotation": {
        "type": "object",
        "properties": {
          "annotationId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "field": {
            "type": "string",
            "enum": [
              "answers",
              "assetId",
              "classId",
              "existence",
              "geometry",
              "note",
              "position",
              "provenance",
              "reviewState"
            ]
          },
          "fieldId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "scope": {
            "type": "string",
            "const": "annotation"
          }
        },
        "required": ["annotationId", "field", "scope"]
      },
      "VersionGraphConflictLocationAnswer": {
        "type": "object",
        "properties": {
          "answerScope": {
            "$ref": "#/components/schemas/VersionGraphAnswerScope"
          },
          "field": {
            "type": "string",
            "enum": ["assetId", "existence", "value"]
          },
          "fieldId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "scope": {
            "type": "string",
            "const": "answer"
          },
          "scopeKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          }
        },
        "required": ["answerScope", "field", "fieldId", "scope", "scopeKey"]
      },
      "VersionGraphConflictType": {
        "type": "string",
        "enum": [
          "attribute",
          "class",
          "existence",
          "geometry",
          "instructions",
          "provenance",
          "review-state",
          "taxonomy",
          "workflow"
        ]
      },
      "VersionGraphMergeResultMerged": {
        "type": "object",
        "properties": {
          "autoMerged": {
            "maxItems": 128,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VersionGraphAutoMergedEntry"
            }
          },
          "autoMergedTotal": {
            "type": "integer",
            "minimum": 0
          },
          "autoMergedTruncated": {
            "type": "boolean"
          },
          "conflicts": {
            "maxItems": 64,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VersionGraphConflict"
            }
          },
          "conflictsTotal": {
            "type": "integer",
            "minimum": 0
          },
          "conflictsTruncated": {
            "type": "boolean"
          },
          "mergeBaseCommitId": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "kind": {
            "type": "string",
            "const": "merged"
          },
          "mergeCommit": {
            "$ref": "#/components/schemas/VersionGraphCommit"
          }
        },
        "required": [
          "autoMerged",
          "autoMergedTotal",
          "autoMergedTruncated",
          "conflicts",
          "conflictsTotal",
          "conflictsTruncated",
          "mergeBaseCommitId",
          "kind",
          "mergeCommit"
        ]
      },
      "VersionGraphPositionResponse": {
        "type": "object",
        "properties": {
          "annotations": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VersionGraphAnnotation"
            }
          },
          "answers": {
            "maxItems": 8192,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VersionGraphClassificationAnswerOutput"
            }
          },
          "contentRoot": {
            "$ref": "#/components/schemas/Sha256Digest"
          },
          "landmarks": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VersionGraphLandmark"
            }
          },
          "nextCursor": {
            "$ref": "#/components/schemas/NextCursor"
          },
          "position": {
            "$ref": "#/components/schemas/VersionGraphPosition"
          },
          "projectMetadata": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              }
            },
            "required": ["name"]
          }
        },
        "required": ["contentRoot", "landmarks", "nextCursor", "position", "projectMetadata"]
      },
      "WorkflowDefinitionResponse": {
        "type": "object",
        "properties": {
          "definition": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WorkflowDefinitionOutput"
              },
              {
                "type": "null"
              }
            ]
          },
          "workflowVersion": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": ["definition", "workflowVersion"]
      },
      "WorkflowDefinitionBindResponse": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "commit": {
                "$ref": "#/components/schemas/VersionGraphCommit"
              },
              "workflowVersion": {
                "type": "string"
              }
            },
            "required": ["commit", "workflowVersion"]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "unchanged"
              },
              "workflowVersion": {
                "type": "string"
              }
            },
            "required": ["kind", "workflowVersion"]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "superseded"
              },
              "workflowVersion": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": ["kind", "workflowVersion"]
          }
        ]
      },
      "AsyncRequestResultRefOutput": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": ["kind", "id"]
      },
      "AsyncRequestCountsOutput": {
        "type": "object",
        "properties": {
          "submitted": {
            "type": "integer",
            "minimum": 0
          },
          "pending": {
            "type": "integer",
            "minimum": 0
          },
          "succeeded": {
            "type": "integer",
            "minimum": 0
          },
          "failed": {
            "type": "integer",
            "minimum": 0
          },
          "rejected": {
            "type": "integer",
            "minimum": 0
          },
          "cancelled": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": ["submitted", "pending", "succeeded", "failed", "rejected", "cancelled"],
        "description": "`submitted` equals the sum of `pending`, `succeeded`, `failed`, `rejected` and `cancelled`."
      },
      "AsyncRequestReportRefOutput": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/AsyncRequestReportRefRetainedOutput"
          },
          {
            "$ref": "#/components/schemas/AsyncRequestReportRefExpiredOutput"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "retained": "#/components/schemas/AsyncRequestReportRefRetainedOutput",
            "expired": "#/components/schemas/AsyncRequestReportRefExpiredOutput"
          }
        }
      },
      "AsyncRequestReportRefRetainedOutput": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "retained"
          }
        },
        "required": ["kind"]
      },
      "AsyncRequestReportRefExpiredOutput": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "expired"
          },
          "expiredAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          }
        },
        "required": ["kind", "expiredAt"]
      },
      "AsyncRequestSucceededOutput": {
        "type": "object",
        "properties": {
          "operationId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "operation": {
            "$ref": "#/components/schemas/AsyncRequestOperation"
          },
          "progress": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "startedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "principalId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "target": {
            "$ref": "#/components/schemas/AsyncRequestResultRefOutput"
          },
          "actualCost": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "number",
                "minimum": 0
              },
              "currency": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": ["amount", "currency"]
          },
          "retry": {
            "type": "object",
            "properties": {
              "attempt": {
                "type": "integer",
                "minimum": 0
              },
              "maxAttempts": {
                "type": "integer",
                "minimum": 1
              }
            },
            "required": ["attempt"],
            "description": "`attempt` never exceeds `maxAttempts` when a bound is declared."
          },
          "cancellable": {
            "type": "boolean"
          },
          "counts": {
            "$ref": "#/components/schemas/AsyncRequestCountsOutput"
          },
          "reportRef": {
            "$ref": "#/components/schemas/AsyncRequestReportRefOutput"
          },
          "revision": {
            "type": "integer",
            "minimum": 1
          },
          "cancelRequestedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "finishedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "reportExpiresAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "state": {
            "type": "string",
            "const": "succeeded"
          },
          "outcome": {
            "type": "string",
            "enum": ["succeeded", "partial_failure"]
          },
          "resultRefs": {
            "maxItems": 64,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AsyncRequestResultRefOutput"
            }
          }
        },
        "required": [
          "operationId",
          "operation",
          "createdAt",
          "principalId",
          "cancellable",
          "counts",
          "reportRef",
          "revision",
          "finishedAt",
          "state",
          "outcome",
          "resultRefs"
        ]
      },
      "AsyncRequestFailedOutput": {
        "type": "object",
        "properties": {
          "operationId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "operation": {
            "$ref": "#/components/schemas/AsyncRequestOperation"
          },
          "progress": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "startedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "principalId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "target": {
            "$ref": "#/components/schemas/AsyncRequestResultRefOutput"
          },
          "actualCost": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "number",
                "minimum": 0
              },
              "currency": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": ["amount", "currency"]
          },
          "retry": {
            "type": "object",
            "properties": {
              "attempt": {
                "type": "integer",
                "minimum": 0
              },
              "maxAttempts": {
                "type": "integer",
                "minimum": 1
              }
            },
            "required": ["attempt"],
            "description": "`attempt` never exceeds `maxAttempts` when a bound is declared."
          },
          "cancellable": {
            "type": "boolean"
          },
          "counts": {
            "$ref": "#/components/schemas/AsyncRequestCountsOutput"
          },
          "reportRef": {
            "$ref": "#/components/schemas/AsyncRequestReportRefOutput"
          },
          "revision": {
            "type": "integer",
            "minimum": 1
          },
          "cancelRequestedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "finishedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "reportExpiresAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "state": {
            "type": "string",
            "const": "failed"
          },
          "outcome": {
            "type": "string",
            "const": "failed"
          },
          "resultRefs": {
            "maxItems": 0,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AsyncRequestResultRefOutput"
            }
          },
          "error": {
            "$ref": "#/components/schemas/AsyncRequestErrorOutput"
          }
        },
        "required": [
          "operationId",
          "operation",
          "createdAt",
          "principalId",
          "cancellable",
          "counts",
          "reportRef",
          "revision",
          "finishedAt",
          "state",
          "outcome",
          "error"
        ]
      },
      "AsyncRequestErrorOutput": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/IssueCode"
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 250
          },
          "remediation": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          }
        },
        "required": ["code", "message"]
      },
      "AsyncRequestCancelledOutput": {
        "type": "object",
        "properties": {
          "operationId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "operation": {
            "$ref": "#/components/schemas/AsyncRequestOperation"
          },
          "progress": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "createdAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "startedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "principalId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "target": {
            "$ref": "#/components/schemas/AsyncRequestResultRefOutput"
          },
          "actualCost": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "number",
                "minimum": 0
              },
              "currency": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": ["amount", "currency"]
          },
          "retry": {
            "type": "object",
            "properties": {
              "attempt": {
                "type": "integer",
                "minimum": 0
              },
              "maxAttempts": {
                "type": "integer",
                "minimum": 1
              }
            },
            "required": ["attempt"],
            "description": "`attempt` never exceeds `maxAttempts` when a bound is declared."
          },
          "cancellable": {
            "type": "boolean"
          },
          "counts": {
            "$ref": "#/components/schemas/AsyncRequestCountsOutput"
          },
          "reportRef": {
            "$ref": "#/components/schemas/AsyncRequestReportRefOutput"
          },
          "revision": {
            "type": "integer",
            "minimum": 1
          },
          "cancelRequestedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "finishedAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "reportExpiresAt": {
            "$ref": "#/components/schemas/UtcTimestamp"
          },
          "state": {
            "type": "string",
            "const": "cancelled"
          },
          "outcome": {
            "type": "string",
            "const": "cancelled"
          },
          "resultRefs": {
            "maxItems": 0,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AsyncRequestResultRefOutput"
            }
          }
        },
        "required": [
          "operationId",
          "operation",
          "createdAt",
          "principalId",
          "cancellable",
          "counts",
          "reportRef",
          "revision",
          "finishedAt",
          "state",
          "outcome"
        ]
      },
      "VersionGraphClassificationAnswerOutput": {
        "type": "object",
        "properties": {
          "assetId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "fieldId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "scope": {
            "$ref": "#/components/schemas/VersionGraphAnswerScope"
          },
          "scopeKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "value": {
            "$ref": "#/components/schemas/VersionGraphAnswerValueOutput"
          }
        },
        "required": ["assetId", "fieldId", "scope", "scopeKey", "value"]
      },
      "VersionGraphAnswerValueOutput": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/VersionGraphAnswerValueBooleanOutput"
          },
          {
            "$ref": "#/components/schemas/VersionGraphAnswerValueMultiSelectOutput"
          },
          {
            "$ref": "#/components/schemas/VersionGraphAnswerValueNumericOutput"
          },
          {
            "$ref": "#/components/schemas/VersionGraphAnswerValueSelectOutput"
          },
          {
            "$ref": "#/components/schemas/VersionGraphAnswerValueTextOutput"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "boolean": "#/components/schemas/VersionGraphAnswerValueBooleanOutput",
            "multi-select": "#/components/schemas/VersionGraphAnswerValueMultiSelectOutput",
            "numeric": "#/components/schemas/VersionGraphAnswerValueNumericOutput",
            "select": "#/components/schemas/VersionGraphAnswerValueSelectOutput",
            "text": "#/components/schemas/VersionGraphAnswerValueTextOutput"
          }
        }
      },
      "VersionGraphAnswerValueBooleanOutput": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "boolean"
          },
          "value": {
            "type": "boolean"
          }
        },
        "required": ["kind", "value"]
      },
      "VersionGraphAnswerValueMultiSelectOutput": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "multi-select"
          },
          "optionIds": {
            "minItems": 1,
            "maxItems": 128,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "x-nitsor-trim": true
            }
          }
        },
        "required": ["kind", "optionIds"],
        "description": "`optionIds` is sorted and unique."
      },
      "VersionGraphAnswerValueNumericOutput": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "numeric"
          },
          "value": {
            "type": "number"
          }
        },
        "required": ["kind", "value"]
      },
      "VersionGraphAnswerValueSelectOutput": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "select"
          },
          "optionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          }
        },
        "required": ["kind", "optionId"]
      },
      "VersionGraphAnswerValueTextOutput": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "text"
          },
          "value": {
            "type": "string",
            "maxLength": 1000
          }
        },
        "required": ["kind", "value"]
      },
      "DatasetHoldoutOutput": {
        "type": "object",
        "properties": {
          "assetIds": {
            "maxItems": 1024,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        },
        "required": ["assetIds"]
      },
      "DatasetSelectionOutput": {
        "type": "object",
        "properties": {
          "all": {
            "maxItems": 7,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DatasetClauseOutput"
            },
            "description": "Each clause kind appears at most once (up to 7 clauses)."
          }
        },
        "required": ["all"]
      },
      "DatasetClauseOutput": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/DatasetClauseAssetIdsOutput"
          },
          {
            "$ref": "#/components/schemas/DatasetClauseHoldoutOutput"
          },
          {
            "$ref": "#/components/schemas/DatasetClauseLabelPrefixOutput"
          },
          {
            "$ref": "#/components/schemas/DatasetClauseSeriesRolesOutput"
          },
          {
            "$ref": "#/components/schemas/DatasetClauseSourceIdsOutput"
          },
          {
            "$ref": "#/components/schemas/DatasetClauseProvenanceOutput"
          },
          {
            "$ref": "#/components/schemas/DatasetClauseReviewStateOutput"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "assetIds": "#/components/schemas/DatasetClauseAssetIdsOutput",
            "holdout": "#/components/schemas/DatasetClauseHoldoutOutput",
            "labelPrefix": "#/components/schemas/DatasetClauseLabelPrefixOutput",
            "seriesRoles": "#/components/schemas/DatasetClauseSeriesRolesOutput",
            "sourceIds": "#/components/schemas/DatasetClauseSourceIdsOutput",
            "provenance": "#/components/schemas/DatasetClauseProvenanceOutput",
            "reviewState": "#/components/schemas/DatasetClauseReviewStateOutput"
          }
        }
      },
      "DatasetClauseAssetIdsOutput": {
        "type": "object",
        "properties": {
          "assetIds": {
            "minItems": 1,
            "maxItems": 1024,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "kind": {
            "type": "string",
            "const": "assetIds"
          }
        },
        "required": ["assetIds", "kind"]
      },
      "DatasetClauseHoldoutOutput": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "holdout"
          },
          "policy": {
            "type": "string",
            "enum": ["exclude", "include", "only"]
          }
        },
        "required": ["kind", "policy"]
      },
      "DatasetClauseLabelPrefixOutput": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "labelPrefix"
          },
          "prefix": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": ["kind", "prefix"]
      },
      "DatasetClauseSeriesRolesOutput": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "seriesRoles"
          },
          "seriesRoles": {
            "minItems": 1,
            "maxItems": 1024,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        },
        "required": ["kind", "seriesRoles"]
      },
      "DatasetClauseSourceIdsOutput": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "sourceIds"
          },
          "sourceIds": {
            "minItems": 1,
            "maxItems": 1024,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        },
        "required": ["kind", "sourceIds"]
      },
      "DatasetClauseProvenanceOutput": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "provenance"
          },
          "provenance": {
            "type": "string",
            "enum": ["any", "human-only"]
          }
        },
        "required": ["kind", "provenance"]
      },
      "DatasetClauseReviewStateOutput": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "reviewState"
          },
          "state": {
            "type": "string",
            "enum": ["accepted", "any"]
          }
        },
        "required": ["kind", "state"]
      },
      "TaskCommentAnchorOutput": {
        "type": "object",
        "properties": {
          "seriesId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "slice": {
            "type": "integer",
            "minimum": 0
          },
          "x": {
            "type": "integer",
            "minimum": 0
          },
          "y": {
            "type": "integer",
            "minimum": 0
          },
          "annotationId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "annotationHash": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          }
        },
        "required": ["seriesId", "slice", "x", "y"]
      },
      "TaxonomyDefinitionOutput": {
        "type": "object",
        "properties": {
          "groups": {
            "minItems": 1,
            "maxItems": 64,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaxonomyGroupOutput"
            }
          },
          "categories": {
            "minItems": 1,
            "maxItems": 512,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "archived": {
                  "type": "boolean"
                },
                "geometryKind": {
                  "type": "string",
                  "enum": ["box2d", "box3d", "landmark", "mask", "polygon"]
                },
                "guaranteeUnit": {
                  "type": "string",
                  "enum": ["component", "instance", "classSet", "interval"]
                },
                "hint": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000,
                  "x-nitsor-line-breaks": true
                },
                "icon": {
                  "$ref": "#/components/schemas/MarkIcon"
                },
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200,
                  "x-nitsor-trim": true
                },
                "fieldIds": {
                  "maxItems": 128,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "parentId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "groupId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "position": {
                  "type": "integer",
                  "minimum": 0
                },
                "color": {
                  "$ref": "#/components/schemas/TaxonomyColor"
                }
              },
              "required": ["geometryKind", "guaranteeUnit", "id", "label", "fieldIds"]
            }
          },
          "fields": {
            "maxItems": 128,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "archived": {
                  "type": "boolean"
                },
                "defaultValue": {
                  "anyOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "string"
                    },
                    {
                      "maxItems": 128,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      }
                    }
                  ]
                },
                "hint": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000,
                  "x-nitsor-line-breaks": true
                },
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200,
                  "x-nitsor-trim": true
                },
                "options": {
                  "maxItems": 128,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "archived": {
                        "type": "boolean"
                      },
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "label": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200,
                        "x-nitsor-trim": true
                      }
                    },
                    "required": ["id", "label"]
                  }
                },
                "scope": {
                  "type": "string",
                  "enum": ["image", "object", "study", "volume"]
                },
                "type": {
                  "type": "string",
                  "enum": ["boolean", "multi-select", "numeric", "select", "text"]
                }
              },
              "required": ["id", "label", "scope", "type"],
              "description": "`select` and `multi-select` fields declare at least one option and no other type declares any; a `defaultValue` is a value the field's type can hold and, for selects, a declared option id."
            }
          }
        },
        "required": ["categories", "fields"],
        "description": "Category, field and group ids are unique; a category's `parentId` names another declared category and parent chains do not cycle; every `fieldIds` entry names a declared field; a category's `groupId` names a declared group, a `position` needs a `groupId`, and positions are unique within a group. `groups` is absent rather than empty."
      },
      "TaxonomyGroupOutput": {
        "type": "object",
        "properties": {
          "color": {
            "$ref": "#/components/schemas/TaxonomyColor"
          },
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          }
        },
        "required": ["id", "label"]
      },
      "VersionGraphAnnotationAnswerOutput": {
        "type": "object",
        "properties": {
          "fieldId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "value": {
            "$ref": "#/components/schemas/VersionGraphAnswerValueOutput"
          }
        },
        "required": ["fieldId", "value"]
      },
      "WorkflowDefinitionOutput": {
        "type": "object",
        "properties": {
          "gates": {
            "maxItems": 32,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "predicate": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                }
              },
              "required": ["id", "predicate"]
            }
          },
          "maxTasks": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4096
          },
          "roles": {
            "minItems": 1,
            "maxItems": 32,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                }
              },
              "required": ["id", "label"]
            }
          },
          "stages": {
            "minItems": 1,
            "maxItems": 32,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowStageOutput"
            }
          },
          "transitions": {
            "maxItems": 64,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "from": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "router": {
                  "$ref": "#/components/schemas/WorkflowRouterOutput"
                },
                "to": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "when": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                }
              },
              "required": ["from", "id", "router", "to", "when"]
            }
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "version": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": ["gates", "maxTasks", "roles", "stages", "transitions"],
        "description": "Ids are unique within `roles`, `stages`, `transitions` and `gates`; a stage's `requiredRole` names a declared role; only `consensus-read` stages declare `readers`, and they must; only `auto-label` stages run by a runner declare `runner`; every transition names declared stages; a sampling gate below the full rate only enters a stage that judges work (`adjudicate`, `consensus-read` or `review`)."
      },
      "WorkflowStageOutput": {
        "type": "object",
        "properties": {
          "earlierLabelVisibility": {
            "$ref": "#/components/schemas/EarlierLabelPolicyOutput"
          },
          "earlierLabelEditing": {
            "$ref": "#/components/schemas/EarlierLabelPolicyOutput"
          },
          "execution": {
            "type": "string",
            "enum": ["human", "runner"]
          },
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "readers": {
            "type": "integer",
            "minimum": 2,
            "maximum": 16
          },
          "requiredQualifications": {
            "maxItems": 16,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "requiredRole": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "runner": {
            "$ref": "#/components/schemas/WorkflowRunnerSettingsOutput"
          },
          "type": {
            "type": "string",
            "enum": ["adjudicate", "annotate", "auto-label", "consensus-read", "review"]
          }
        },
        "required": ["execution", "id", "requiredQualifications", "type"]
      },
      "EarlierLabelPolicyOutput": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/EarlierLabelPolicyNoOneOutput"
          },
          {
            "$ref": "#/components/schemas/EarlierLabelPolicyThisStageOutput"
          },
          {
            "$ref": "#/components/schemas/EarlierLabelPolicyNamedRolesOutput"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "no-one": "#/components/schemas/EarlierLabelPolicyNoOneOutput",
            "this-stage": "#/components/schemas/EarlierLabelPolicyThisStageOutput",
            "named-roles": "#/components/schemas/EarlierLabelPolicyNamedRolesOutput"
          }
        }
      },
      "EarlierLabelPolicyNoOneOutput": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "no-one"
          }
        },
        "required": ["kind"]
      },
      "EarlierLabelPolicyThisStageOutput": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "this-stage"
          }
        },
        "required": ["kind"]
      },
      "EarlierLabelPolicyNamedRolesOutput": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "named-roles"
          },
          "roleIds": {
            "minItems": 1,
            "maxItems": 32,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        },
        "required": ["kind", "roleIds"]
      },
      "WorkflowRunnerSettingsOutput": {
        "type": "object",
        "properties": {
          "agentSubject": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "x-nitsor-trim": true
          },
          "categories": {
            "minItems": 1,
            "maxItems": 16,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "boxCategoryId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                }
              },
              "required": ["id"]
            },
            "description": "Each category `id` appears once, and no two entries name the same `boxCategoryId`."
          },
          "promptSource": {
            "type": "string",
            "enum": ["points", "human-box", "taxonomy-text"]
          }
        },
        "required": ["agentSubject", "categories", "promptSource"]
      },
      "WorkflowRouterOutput": {
        "type": "object",
        "properties": {
          "assign": {
            "$ref": "#/components/schemas/WorkflowRouterAssignOutput"
          },
          "capacity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4096
          },
          "gate": {
            "$ref": "#/components/schemas/WorkflowRouterGateOutput"
          },
          "handPicking": {
            "type": "string",
            "enum": ["allowed", "in-order-only"]
          },
          "inject": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "goldRateBps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000
                  },
                  "poolRef": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": ["goldRateBps", "poolRef"]
              },
              {
                "type": "null"
              }
            ]
          },
          "leaseDurationMs": {
            "type": "integer",
            "minimum": 60000,
            "maximum": 86400000
          },
          "order": {
            "type": "string",
            "enum": ["fifo", "oldest-first", "priority", "uncertainty-desc"]
          },
          "wipLimit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4096
          }
        },
        "required": [
          "assign",
          "capacity",
          "gate",
          "inject",
          "leaseDurationMs",
          "order",
          "wipLimit"
        ],
        "description": "`wipLimit` never exceeds `capacity`."
      },
      "WorkflowRouterAssignOutput": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/WorkflowRouterAssignManualOutput"
          },
          {
            "$ref": "#/components/schemas/WorkflowRouterAssignRuleOutput"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "manual": "#/components/schemas/WorkflowRouterAssignManualOutput",
            "rule": "#/components/schemas/WorkflowRouterAssignRuleOutput"
          }
        }
      },
      "WorkflowRouterAssignManualOutput": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "manual"
          }
        },
        "required": ["kind"]
      },
      "WorkflowRouterAssignRuleOutput": {
        "type": "object",
        "properties": {
          "geography": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "kind": {
            "type": "string",
            "const": "rule"
          },
          "maxLoad": {
            "type": "integer",
            "minimum": 0,
            "maximum": 4096
          },
          "strategy": {
            "type": "string",
            "const": "least-loaded"
          }
        },
        "required": ["kind", "maxLoad", "strategy"]
      },
      "WorkflowRouterGateOutput": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/WorkflowRouterGateAlwaysOutput"
          },
          {
            "$ref": "#/components/schemas/WorkflowRouterGateUncertaintyAboveOutput"
          },
          {
            "$ref": "#/components/schemas/WorkflowRouterGateSampleOutput"
          }
        ],
        "type": "object",
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "always": "#/components/schemas/WorkflowRouterGateAlwaysOutput",
            "uncertainty-above": "#/components/schemas/WorkflowRouterGateUncertaintyAboveOutput",
            "sample": "#/components/schemas/WorkflowRouterGateSampleOutput"
          }
        }
      },
      "WorkflowRouterGateAlwaysOutput": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "always"
          }
        },
        "required": ["kind"]
      },
      "WorkflowRouterGateUncertaintyAboveOutput": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "uncertainty-above"
          },
          "threshold": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          }
        },
        "required": ["kind", "threshold"]
      },
      "WorkflowRouterGateSampleOutput": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "sample"
          },
          "rateBasisPoints": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000
          }
        },
        "required": ["kind", "rateBasisPoints"]
      }
    },
    "headers": {
      "RequestId": {
        "description": "The request id every answer carries; echo it when reporting a problem.",
        "schema": {
          "type": "string"
        }
      },
      "RetryAfter": {
        "description": "Whole seconds to wait before polling an accepted Request or retrying a 429 refusal.",
        "schema": {
          "type": "integer",
          "minimum": 0
        }
      },
      "TokenExpires": {
        "description": "The instant the credential that made the request stops working, RFC 3339 in UTC. Sent on every authenticated answer, a refusal after authentication included, once the credential has 14 days or fewer left. Never sent on a 401 or a 405, or by a route that needs no credential.",
        "schema": {
          "type": "string",
          "format": "date-time"
        }
      },
      "ETag": {
        "description": "The representation's validator, weak by construction. Send it back as `If-None-Match` to be told `304` instead of the whole body.",
        "schema": {
          "type": "string"
        }
      },
      "CacheControl": {
        "description": "How long the answer may be reused, and by whom.",
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "NitsorError": {
        "description": "The request was refused. `code` names the refusal; `requestId` correlates it.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/RequestId"
          },
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/NitsorError"
            }
          }
        }
      },
      "NitsorErrorAuthenticated": {
        "description": "The request was refused. `code` names the refusal; `requestId` correlates it.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/RequestId"
          },
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          },
          "Nitsor-Token-Expires": {
            "$ref": "#/components/headers/TokenExpires"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/NitsorError"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "An Agent credential (`nits_…`), or a person token (`nitp_…`) on a deployment that enables them. `GET /api/v1/session` names the principal a credential proves."
      }
    }
  }
}
