{
  "components": {
    "schemas": {
      "CheckResultOut": {
        "properties": {
          "actual_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actual Value"
          },
          "check_id": {
            "title": "Check Id",
            "type": "string"
          },
          "expected_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Value"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "message": {
            "default": "",
            "title": "Message",
            "type": "string"
          },
          "passed": {
            "title": "Passed",
            "type": "boolean"
          },
          "severity": {
            "title": "Severity",
            "type": "string"
          }
        },
        "required": [
          "check_id",
          "kind",
          "severity",
          "passed"
        ],
        "title": "CheckResultOut",
        "type": "object"
      },
      "ConstraintGateSchema": {
        "description": "The ``applies_if`` verdict for one constraint.\n\n``description`` is rendered server-side so the client can explain why a\nconstraint was skipped without reimplementing the evaluator.",
        "properties": {
          "description": {
            "default": "",
            "title": "Description",
            "type": "string"
          },
          "met": {
            "title": "Met",
            "type": "boolean"
          },
          "present": {
            "title": "Present",
            "type": "boolean"
          }
        },
        "required": [
          "present",
          "met"
        ],
        "title": "ConstraintGateSchema",
        "type": "object"
      },
      "ConstraintRulingOut": {
        "properties": {
          "actual_value": {
            "title": "Actual Value"
          },
          "constraint_type": {
            "title": "Constraint Type",
            "type": "string"
          },
          "field_id": {
            "title": "Field Id",
            "type": "string"
          },
          "gate_description": {
            "default": "",
            "title": "Gate Description",
            "type": "string"
          },
          "is_violation": {
            "title": "Is Violation",
            "type": "boolean"
          },
          "key": {
            "description": "Stable constraint key — the verifier checklist row's `requirement_id` (`CONSTRAINT-{field_id}-{idx}` spec-level, `TMPL-CONSTRAINT-{field_id}-{idx}` template).",
            "title": "Key",
            "type": "string"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "message": {
            "default": "",
            "title": "Message",
            "type": "string"
          },
          "parameters": {
            "additionalProperties": true,
            "default": {},
            "title": "Parameters",
            "type": "object"
          },
          "severity": {
            "description": "`error`, `warning` or `info`.",
            "title": "Severity",
            "type": "string"
          },
          "source": {
            "description": "`spec` or `template`.",
            "title": "Source",
            "type": "string"
          },
          "status": {
            "description": "`passed`, `failed`, `missing_value`, `skipped_gate`, `not_evaluable` or `misconfigured`.",
            "title": "Status",
            "type": "string"
          },
          "valid_range": {
            "default": "",
            "title": "Valid Range",
            "type": "string"
          },
          "value_provided": {
            "title": "Value Provided",
            "type": "boolean"
          },
          "value_source": {
            "description": "`reference_inputs` for `ext__` fields, else `document`.",
            "title": "Value Source",
            "type": "string"
          }
        },
        "required": [
          "key",
          "source",
          "field_id",
          "label",
          "constraint_type",
          "severity",
          "status",
          "is_violation",
          "value_provided",
          "value_source"
        ],
        "title": "ConstraintRulingOut",
        "type": "object"
      },
      "ConstraintRulingSchema": {
        "description": "A verdict for one constraint — emitted whether or not it failed.",
        "properties": {
          "actual_value": {
            "title": "Actual Value"
          },
          "constraint_type": {
            "title": "Constraint Type",
            "type": "string"
          },
          "field_id": {
            "title": "Field Id",
            "type": "string"
          },
          "gate": {
            "$ref": "#/components/schemas/ConstraintGateSchema"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "severity": {
            "default": "error",
            "title": "Severity",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "valid_range": {
            "default": "",
            "title": "Valid Range",
            "type": "string"
          }
        },
        "required": [
          "field_id",
          "constraint_type",
          "status",
          "message",
          "gate"
        ],
        "title": "ConstraintRulingSchema",
        "type": "object"
      },
      "ConstraintViolationSchema": {
        "properties": {
          "actual_value": {
            "title": "Actual Value"
          },
          "constraint_type": {
            "title": "Constraint Type",
            "type": "string"
          },
          "field_id": {
            "title": "Field Id",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "severity": {
            "default": "error",
            "title": "Severity",
            "type": "string"
          },
          "valid_range": {
            "title": "Valid Range",
            "type": "string"
          }
        },
        "required": [
          "field_id",
          "constraint_type",
          "message",
          "valid_range"
        ],
        "title": "ConstraintViolationSchema",
        "type": "object"
      },
      "CursorPaginatedPCCsSchema": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/PCCSchema"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "next_cursor",
          "has_more"
        ],
        "title": "CursorPaginatedPCCsSchema",
        "type": "object"
      },
      "CursorPaginatedPlantsSchema": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/PlantSchema"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "next_cursor",
          "has_more"
        ],
        "title": "CursorPaginatedPlantsSchema",
        "type": "object"
      },
      "CursorPaginatedPreapprovedToolsSchema": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/PreapprovedToolSchema"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "next_cursor",
          "has_more"
        ],
        "title": "CursorPaginatedPreapprovedToolsSchema",
        "type": "object"
      },
      "CursorPaginatedProjectsSchema": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ProjectSchema"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "next_cursor",
          "has_more"
        ],
        "title": "CursorPaginatedProjectsSchema",
        "type": "object"
      },
      "CursorPaginatedSpecsSchema": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/SpecSchema"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "next_cursor",
          "has_more"
        ],
        "title": "CursorPaginatedSpecsSchema",
        "type": "object"
      },
      "CursorPaginatedWorkspacesSchema": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/WorkspaceSchema"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "next_cursor",
          "has_more"
        ],
        "title": "CursorPaginatedWorkspacesSchema",
        "type": "object"
      },
      "EpdCreateIn": {
        "properties": {
          "epd_type": {
            "default": "standard",
            "title": "Epd Type",
            "type": "string"
          },
          "lca_author_company": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lca Author Company"
          },
          "lca_author_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lca Author Email"
          },
          "lca_author_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lca Author Name"
          },
          "template_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template Id"
          }
        },
        "title": "EpdCreateIn",
        "type": "object"
      },
      "EpdDetailOut": {
        "properties": {
          "approved_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ISO-8601 timestamp when the EPD was approved; `null` if not approved.",
            "title": "Approved At"
          },
          "approved_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the user (verifier) who approved the EPD.",
            "title": "Approved By Id"
          },
          "approved_template_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reference EPDs only: the approved constraint version its variants are validated against; `null` until the reference is first approved.",
            "title": "Approved Template Id"
          },
          "authoring_policy": {
            "additionalProperties": true,
            "default": {},
            "title": "Authoring Policy",
            "type": "object"
          },
          "constraint_failures_acknowledged_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ISO-8601 timestamp of the author's explicit acknowledgement when a reference EPD was submitted with failing error-severity constraints (`acknowledge_constraint_failures=true`); `null` after a clean submit.",
            "title": "Constraint Failures Acknowledged At"
          },
          "constraint_violations": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Constraint Violations"
          },
          "created_at": {
            "description": "ISO-8601 timestamp when the EPD was created.",
            "title": "Created At",
            "type": "string"
          },
          "display_config": {
            "additionalProperties": true,
            "default": {},
            "title": "Display Config",
            "type": "object"
          },
          "document": {
            "additionalProperties": true,
            "default": {},
            "title": "Document",
            "type": "object"
          },
          "ec3_id": {
            "description": "EC3 (Building Transparency) identifier for this EPD when published to EC3; empty string if not linked.",
            "title": "Ec3 Id",
            "type": "string"
          },
          "epd_type": {
            "description": "EPD type — one of `standard`, `reference`, or `variant`.",
            "examples": [
              "standard"
            ],
            "title": "Epd Type",
            "type": "string"
          },
          "flagged_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ISO-8601 timestamp when the EPD was most recently flagged during review.",
            "title": "Flagged At"
          },
          "flagged_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the user who flagged the EPD.",
            "title": "Flagged By Id"
          },
          "flagged_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Display name (or email) of the user who flagged the EPD; shown to the manufacturer in the verifier-feedback walkthrough.",
            "title": "Flagged By Name"
          },
          "id": {
            "description": "Unique identifier (UUID) of the EPD.",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ],
            "title": "Id",
            "type": "string"
          },
          "is_prospective": {
            "default": false,
            "description": "True when the EPD is a Prospective EPD — a forward-looking LCA declared before manufacturing or scaled distribution. Prospective EPDs are published with a 1-year validity window instead of 5 years.",
            "title": "Is Prospective",
            "type": "boolean"
          },
          "lca_author_company": {
            "default": "",
            "description": "Company of the LCA practitioner. Optional.",
            "title": "Lca Author Company",
            "type": "string"
          },
          "lca_author_email": {
            "default": "",
            "description": "Email of the LCA practitioner. Optional.",
            "title": "Lca Author Email",
            "type": "string"
          },
          "lca_author_name": {
            "default": "",
            "description": "Name of the LCA practitioner who authored the underlying LCA. Optional.",
            "title": "Lca Author Name",
            "type": "string"
          },
          "model_lock": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reference and variant EPDs only (`null` for standard). A reference reports its latest submission snapshot — the EPD tool + version, PCR spec version and constraint version (`template`: `{id, version}`) it was submitted against — and whether approval has LOCKED it (`role`, `locked`, `locked_at`, `snapshot_id`, `digest`, `transition`, `coordinates`, `template`, `captured_at`, `platform_release`), plus `lock` (the latest LOCKED snapshot in the same shape — what its variants are held to — or `null`) and `pending` (a newer unlocked submission, e.g. a revision in review, or `null`). A variant reports its model's conformance to its reference's lock (`role`, `verdict`: `conformant` | `drift` | `no_lock` | `unavailable` — the variant's coordinates could not be digested; submit refuses the same data —, `drift`: `[{coordinate, label, locked, actual}]`, `reference_epd_id`, `reference_snapshot_id`, `reference_tool`: the locked tool's `{kind, id, name, version}` — `version` blank when the lock pins no tool version — or `null`, `reference_revision_open`). An approved or published variant reports the verdict it was approved with (`persisted: true`) and `reference_revised_since` (`{from, to}` constraint versions when its reference was revised after it was submitted, else `null`).",
            "title": "Model Lock"
          },
          "pdf_file_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Storage key of the most recently generated EPD PDF, if any.",
            "title": "Pdf File Key"
          },
          "pdf_generated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ISO-8601 timestamp of the most recent PDF generation.",
            "title": "Pdf Generated At"
          },
          "product_name": {
            "default": "",
            "description": "Marketing name of the product as it appears on the EPD. Optional; defaults to blank.",
            "examples": [
              "Type X Gypsum Board"
            ],
            "title": "Product Name",
            "type": "string"
          },
          "project_id": {
            "description": "Identifier of the project this EPD belongs to.",
            "title": "Project Id",
            "type": "string"
          },
          "published_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ISO-8601 timestamp when the EPD was published; `null` if unpublished.",
            "title": "Published At"
          },
          "published_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the user who published the EPD.",
            "title": "Published By Id"
          },
          "reference_epd_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Variant EPDs only (`null` otherwise): the id of the reference EPD this variant belongs to — the `{epd_id}` of the `/epds/{epd_id}/variants/{variant_id}/...` routes.",
            "title": "Reference Epd Id"
          },
          "reference_inputs": {
            "additionalProperties": true,
            "description": "Reference EPDs only: this EPD's own values for its template's external input fields, keyed by full field id (`ext__product_mass`). Set with `PUT /epds/{epd_id}/reference-inputs/`; evaluated against the template's constraints at submit. `{}` for other EPD types.",
            "examples": [
              {
                "ext__product_mass": 0.5
              }
            ],
            "title": "Reference Inputs",
            "type": "object"
          },
          "resolved_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ISO-8601 timestamp when the most recent flag was resolved.",
            "title": "Resolved At"
          },
          "review_notes": {
            "default": "",
            "description": "Free-text notes left by a reviewer on the EPD. Optional.",
            "title": "Review Notes",
            "type": "string"
          },
          "review_notes_severity": {
            "default": "",
            "description": "Severity associated with `review_notes`, when set.",
            "title": "Review Notes Severity",
            "type": "string"
          },
          "sections": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/EpdSectionOut"
            },
            "title": "Sections",
            "type": "array"
          },
          "spec_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the spec (PCR/standard) that the pinned version belongs to.",
            "title": "Spec Id"
          },
          "spec_params": {
            "additionalProperties": true,
            "description": "Bound spec-parameter values snapshotted at creation from the project's PCC (e.g. `{\"tool\": true}`). Param-gated requirements and questions in the spec only apply when these match. Editable while the EPD is draft.",
            "examples": [
              {
                "tool": true
              }
            ],
            "title": "Spec Params",
            "type": "object"
          },
          "spec_version_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the pinned spec version (the resolved PCR/standard chain) used to validate this EPD.",
            "title": "Spec Version Id"
          },
          "spec_version_string": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Human-readable version of the pinned spec.",
            "examples": [
              "1.2.0"
            ],
            "title": "Spec Version String"
          },
          "status": {
            "description": "Current lifecycle status, e.g. `draft`, `in_review`, `approved`, or `published`.",
            "examples": [
              "draft"
            ],
            "title": "Status",
            "type": "string"
          },
          "submitted_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ISO-8601 timestamp when the EPD was submitted for review; `null` if not yet submitted.",
            "title": "Submitted At"
          },
          "submitted_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the user who submitted the EPD for review.",
            "title": "Submitted By Id"
          },
          "target_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional target completion date for the EPD (ISO-8601 date).",
            "title": "Target Date"
          },
          "target_date_set_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ISO-8601 timestamp when the target date was set.",
            "title": "Target Date Set At"
          },
          "target_date_set_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the user who set the target date.",
            "title": "Target Date Set By Id"
          },
          "template_context": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template Context"
          },
          "template_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the resolved template assigned to this EPD; `null` until a template is pinned.",
            "title": "Template Id"
          },
          "template_version": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reference EPDs only (`null` otherwise): the reference's current constraint version and what its state allows — `id`, `version`, `status`, `is_working_template` (a never-submitted draft editing the project's shared working template), `constraints_enabled` (this version or the approved one enforces its constraints — else constraints are off for this EPD), `editable`, `locked_reason` (`in_review` | `start_revision` | `start_republishing` | `null`), `locked_message`, `approved` (`{id, version, status, approved_at}` of the version its variants answer to, or `null`), `revises` (`{id, version}` or `null`), `revision_open`, `can_start_revision`, `next_revision_version` (the version number Start revision will create — numbers of discarded revisions are not reused — or `null` when it cannot start), `can_discard_revision`.",
            "title": "Template Version"
          },
          "updated_at": {
            "description": "ISO-8601 timestamp when the EPD was last updated.",
            "title": "Updated At",
            "type": "string"
          },
          "variant_envelope": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Variant EPDs only (absent otherwise): the version of its reference's constraints this variant is validated against — always the reference's APPROVED version, never a revision in progress: `template_id`, `version` (`null` when the reference has no approved version), and `reference_revision_open` (the reference is being revised; the variant stays on this version and nothing auto-approves until the revision is approved), `locked_field_ids` (the spec field ids that version locks — what the variant's form renders locked, not the variant's own `authoring_policy` copy, which a later approved revision can supersede) and `locked_values` (those fields' values as approved, keyed by field id — what a document save must carry for them).",
            "title": "Variant Envelope"
          },
          "variant_field_inputs": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Variant Field Inputs"
          },
          "variant_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Variant Id"
          },
          "variant_parameters": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Variant Parameters"
          }
        },
        "required": [
          "id",
          "project_id",
          "epd_type",
          "status",
          "ec3_id",
          "created_at",
          "updated_at"
        ],
        "title": "EpdDetailOut",
        "type": "object"
      },
      "EpdDocumentUpdateIn": {
        "properties": {
          "authoring_policy": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Authoring Policy"
          },
          "display_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Config"
          },
          "document": {
            "additionalProperties": true,
            "default": {},
            "title": "Document",
            "type": "object"
          },
          "product_name": {
            "default": "",
            "title": "Product Name",
            "type": "string"
          }
        },
        "title": "EpdDocumentUpdateIn",
        "type": "object"
      },
      "EpdOut": {
        "properties": {
          "approved_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ISO-8601 timestamp when the EPD was approved; `null` if not approved.",
            "title": "Approved At"
          },
          "approved_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the user (verifier) who approved the EPD.",
            "title": "Approved By Id"
          },
          "approved_template_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reference EPDs only: the approved constraint version its variants are validated against; `null` until the reference is first approved.",
            "title": "Approved Template Id"
          },
          "constraint_failures_acknowledged_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ISO-8601 timestamp of the author's explicit acknowledgement when a reference EPD was submitted with failing error-severity constraints (`acknowledge_constraint_failures=true`); `null` after a clean submit.",
            "title": "Constraint Failures Acknowledged At"
          },
          "created_at": {
            "description": "ISO-8601 timestamp when the EPD was created.",
            "title": "Created At",
            "type": "string"
          },
          "ec3_id": {
            "description": "EC3 (Building Transparency) identifier for this EPD when published to EC3; empty string if not linked.",
            "title": "Ec3 Id",
            "type": "string"
          },
          "epd_type": {
            "description": "EPD type — one of `standard`, `reference`, or `variant`.",
            "examples": [
              "standard"
            ],
            "title": "Epd Type",
            "type": "string"
          },
          "flagged_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ISO-8601 timestamp when the EPD was most recently flagged during review.",
            "title": "Flagged At"
          },
          "flagged_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the user who flagged the EPD.",
            "title": "Flagged By Id"
          },
          "flagged_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Display name (or email) of the user who flagged the EPD; shown to the manufacturer in the verifier-feedback walkthrough.",
            "title": "Flagged By Name"
          },
          "id": {
            "description": "Unique identifier (UUID) of the EPD.",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ],
            "title": "Id",
            "type": "string"
          },
          "is_prospective": {
            "default": false,
            "description": "True when the EPD is a Prospective EPD — a forward-looking LCA declared before manufacturing or scaled distribution. Prospective EPDs are published with a 1-year validity window instead of 5 years.",
            "title": "Is Prospective",
            "type": "boolean"
          },
          "lca_author_company": {
            "default": "",
            "description": "Company of the LCA practitioner. Optional.",
            "title": "Lca Author Company",
            "type": "string"
          },
          "lca_author_email": {
            "default": "",
            "description": "Email of the LCA practitioner. Optional.",
            "title": "Lca Author Email",
            "type": "string"
          },
          "lca_author_name": {
            "default": "",
            "description": "Name of the LCA practitioner who authored the underlying LCA. Optional.",
            "title": "Lca Author Name",
            "type": "string"
          },
          "pdf_file_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Storage key of the most recently generated EPD PDF, if any.",
            "title": "Pdf File Key"
          },
          "pdf_generated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ISO-8601 timestamp of the most recent PDF generation.",
            "title": "Pdf Generated At"
          },
          "product_name": {
            "default": "",
            "description": "Marketing name of the product as it appears on the EPD. Optional; defaults to blank.",
            "examples": [
              "Type X Gypsum Board"
            ],
            "title": "Product Name",
            "type": "string"
          },
          "project_id": {
            "description": "Identifier of the project this EPD belongs to.",
            "title": "Project Id",
            "type": "string"
          },
          "published_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ISO-8601 timestamp when the EPD was published; `null` if unpublished.",
            "title": "Published At"
          },
          "published_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the user who published the EPD.",
            "title": "Published By Id"
          },
          "reference_epd_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Variant EPDs only (`null` otherwise): the id of the reference EPD this variant belongs to — the `{epd_id}` of the `/epds/{epd_id}/variants/{variant_id}/...` routes.",
            "title": "Reference Epd Id"
          },
          "reference_inputs": {
            "additionalProperties": true,
            "description": "Reference EPDs only: this EPD's own values for its template's external input fields, keyed by full field id (`ext__product_mass`). Set with `PUT /epds/{epd_id}/reference-inputs/`; evaluated against the template's constraints at submit. `{}` for other EPD types.",
            "examples": [
              {
                "ext__product_mass": 0.5
              }
            ],
            "title": "Reference Inputs",
            "type": "object"
          },
          "resolved_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ISO-8601 timestamp when the most recent flag was resolved.",
            "title": "Resolved At"
          },
          "review_notes": {
            "default": "",
            "description": "Free-text notes left by a reviewer on the EPD. Optional.",
            "title": "Review Notes",
            "type": "string"
          },
          "review_notes_severity": {
            "default": "",
            "description": "Severity associated with `review_notes`, when set.",
            "title": "Review Notes Severity",
            "type": "string"
          },
          "spec_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the spec (PCR/standard) that the pinned version belongs to.",
            "title": "Spec Id"
          },
          "spec_params": {
            "additionalProperties": true,
            "description": "Bound spec-parameter values snapshotted at creation from the project's PCC (e.g. `{\"tool\": true}`). Param-gated requirements and questions in the spec only apply when these match. Editable while the EPD is draft.",
            "examples": [
              {
                "tool": true
              }
            ],
            "title": "Spec Params",
            "type": "object"
          },
          "spec_version_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the pinned spec version (the resolved PCR/standard chain) used to validate this EPD.",
            "title": "Spec Version Id"
          },
          "spec_version_string": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Human-readable version of the pinned spec.",
            "examples": [
              "1.2.0"
            ],
            "title": "Spec Version String"
          },
          "status": {
            "description": "Current lifecycle status, e.g. `draft`, `in_review`, `approved`, or `published`.",
            "examples": [
              "draft"
            ],
            "title": "Status",
            "type": "string"
          },
          "submitted_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ISO-8601 timestamp when the EPD was submitted for review; `null` if not yet submitted.",
            "title": "Submitted At"
          },
          "submitted_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the user who submitted the EPD for review.",
            "title": "Submitted By Id"
          },
          "target_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional target completion date for the EPD (ISO-8601 date).",
            "title": "Target Date"
          },
          "target_date_set_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ISO-8601 timestamp when the target date was set.",
            "title": "Target Date Set At"
          },
          "target_date_set_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the user who set the target date.",
            "title": "Target Date Set By Id"
          },
          "template_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the resolved template assigned to this EPD; `null` until a template is pinned.",
            "title": "Template Id"
          },
          "template_version": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reference EPDs only (`null` otherwise): the reference's current constraint version and what its state allows — `id`, `version`, `status`, `is_working_template` (a never-submitted draft editing the project's shared working template), `constraints_enabled` (this version or the approved one enforces its constraints — else constraints are off for this EPD), `editable`, `locked_reason` (`in_review` | `start_revision` | `start_republishing` | `null`), `locked_message`, `approved` (`{id, version, status, approved_at}` of the version its variants answer to, or `null`), `revises` (`{id, version}` or `null`), `revision_open`, `can_start_revision`, `next_revision_version` (the version number Start revision will create — numbers of discarded revisions are not reused — or `null` when it cannot start), `can_discard_revision`.",
            "title": "Template Version"
          },
          "updated_at": {
            "description": "ISO-8601 timestamp when the EPD was last updated.",
            "title": "Updated At",
            "type": "string"
          },
          "variant_envelope": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Variant EPDs only (absent otherwise): the version of its reference's constraints this variant is validated against — always the reference's APPROVED version, never a revision in progress: `template_id`, `version` (`null` when the reference has no approved version), and `reference_revision_open` (the reference is being revised; the variant stays on this version and nothing auto-approves until the revision is approved), `locked_field_ids` (the spec field ids that version locks — what the variant's form renders locked, not the variant's own `authoring_policy` copy, which a later approved revision can supersede) and `locked_values` (those fields' values as approved, keyed by field id — what a document save must carry for them).",
            "title": "Variant Envelope"
          }
        },
        "required": [
          "id",
          "project_id",
          "epd_type",
          "status",
          "ec3_id",
          "created_at",
          "updated_at"
        ],
        "title": "EpdOut",
        "type": "object"
      },
      "EpdPublicViewOut": {
        "description": "Anonymous public library payload — ``EpdViewOut`` minus the\nworkspace/project navigation context and authoring metadata (see\n``serialize_epd_public_view``).",
        "properties": {
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "date_of_issue": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Date Of Issue"
          },
          "declaration_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Declaration Number"
          },
          "display_config": {
            "additionalProperties": true,
            "title": "Display Config",
            "type": "object"
          },
          "document": {
            "additionalProperties": true,
            "title": "Document",
            "type": "object"
          },
          "epd_type": {
            "title": "Epd Type",
            "type": "string"
          },
          "expiration_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expiration Date"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "is_prospective": {
            "default": false,
            "title": "Is Prospective",
            "type": "boolean"
          },
          "last_republished_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Republished At"
          },
          "lca_author": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lca Author"
          },
          "organization": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization"
          },
          "pcc": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pcc"
          },
          "pcr_metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pcr Metadata"
          },
          "pcr_spec": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pcr Spec"
          },
          "print_document_enabled": {
            "default": false,
            "title": "Print Document Enabled",
            "type": "boolean"
          },
          "product_name": {
            "title": "Product Name",
            "type": "string"
          },
          "public_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Public Url"
          },
          "published_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Published At"
          },
          "revision": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revision"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "tool_metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Metadata"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          },
          "verifier": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Verifier"
          },
          "view_spec": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "View Spec"
          }
        },
        "required": [
          "id",
          "epd_type",
          "status",
          "product_name",
          "document",
          "display_config",
          "created_at",
          "updated_at"
        ],
        "title": "EpdPublicViewOut",
        "type": "object"
      },
      "EpdSchemaOut": {
        "properties": {
          "indicator_catalog": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Indicator Catalog"
          },
          "input_field_defs": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Input Field Defs",
            "type": "array"
          },
          "requirements": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Requirements",
            "type": "array"
          }
        },
        "required": [
          "input_field_defs",
          "requirements"
        ],
        "title": "EpdSchemaOut",
        "type": "object"
      },
      "EpdSchemaSummaryFieldOut": {
        "properties": {
          "constraints": {
            "default": [],
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Constraints",
            "type": "array"
          },
          "default": {
            "title": "Default"
          },
          "group": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group"
          },
          "help_text": {
            "default": "",
            "title": "Help Text",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "locked": {
            "default": false,
            "title": "Locked",
            "type": "boolean"
          },
          "locked_value": {
            "title": "Locked Value"
          },
          "options": {
            "title": "Options"
          },
          "order": {
            "default": 0,
            "title": "Order",
            "type": "integer"
          },
          "required": {
            "default": false,
            "title": "Required",
            "type": "boolean"
          },
          "show_if": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Show If"
          },
          "type": {
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "label"
        ],
        "title": "EpdSchemaSummaryFieldOut",
        "type": "object"
      },
      "EpdSchemaSummaryOut": {
        "properties": {
          "counts": {
            "additionalProperties": {
              "type": "integer"
            },
            "title": "Counts",
            "type": "object"
          },
          "fields": {
            "items": {
              "$ref": "#/components/schemas/EpdSchemaSummaryFieldOut"
            },
            "title": "Fields",
            "type": "array"
          },
          "requirements": {
            "items": {
              "$ref": "#/components/schemas/EpdSchemaSummaryRequirementOut"
            },
            "title": "Requirements",
            "type": "array"
          }
        },
        "required": [
          "fields",
          "requirements",
          "counts"
        ],
        "title": "EpdSchemaSummaryOut",
        "type": "object"
      },
      "EpdSchemaSummaryRequirementOut": {
        "properties": {
          "applies_if": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Applies If"
          },
          "applies_to": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Applies To",
            "type": "array"
          },
          "comment_type": {
            "default": "",
            "title": "Comment Type",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "refs": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Refs",
            "type": "array"
          },
          "text": {
            "title": "Text",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "topic": {
            "default": "",
            "title": "Topic",
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "text"
        ],
        "title": "EpdSchemaSummaryRequirementOut",
        "type": "object"
      },
      "EpdSectionOut": {
        "properties": {
          "conformance_status": {
            "title": "Conformance Status",
            "type": "string"
          },
          "content": {
            "title": "Content",
            "type": "string"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "epd_id": {
            "title": "Epd Id",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "section_id": {
            "title": "Section Id",
            "type": "string"
          },
          "slug": {
            "title": "Slug",
            "type": "string"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "epd_id",
          "section_id",
          "slug",
          "content",
          "conformance_status",
          "created_at",
          "updated_at"
        ],
        "title": "EpdSectionOut",
        "type": "object"
      },
      "EpdUpdateIn": {
        "properties": {
          "is_prospective": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Prospective"
          },
          "lca_author_company": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lca Author Company"
          },
          "lca_author_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lca Author Email"
          },
          "lca_author_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lca Author Name"
          },
          "product_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Name"
          },
          "spec_params": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Spec Params"
          }
        },
        "title": "EpdUpdateIn",
        "type": "object"
      },
      "EpdValidationOut": {
        "properties": {
          "is_valid": {
            "title": "Is Valid",
            "type": "boolean"
          },
          "no_image": {
            "title": "No Image",
            "type": "boolean"
          },
          "requirement_results": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/RequirementResultOut"
            },
            "title": "Requirement Results",
            "type": "array"
          },
          "summary": {
            "$ref": "#/components/schemas/EvaluationSummaryOut"
          }
        },
        "required": [
          "is_valid",
          "no_image",
          "summary"
        ],
        "title": "EpdValidationOut",
        "type": "object"
      },
      "EpdViewOut": {
        "properties": {
          "authoring_policy": {
            "additionalProperties": true,
            "default": {},
            "title": "Authoring Policy",
            "type": "object"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "date_of_issue": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Date Of Issue"
          },
          "declaration_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Declaration Number"
          },
          "display_config": {
            "additionalProperties": true,
            "title": "Display Config",
            "type": "object"
          },
          "document": {
            "additionalProperties": true,
            "title": "Document",
            "type": "object"
          },
          "epd_type": {
            "title": "Epd Type",
            "type": "string"
          },
          "expiration_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expiration Date"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "is_prospective": {
            "default": false,
            "title": "Is Prospective",
            "type": "boolean"
          },
          "last_republished_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Republished At"
          },
          "lca_author": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lca Author"
          },
          "organization": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization"
          },
          "pcc": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pcc"
          },
          "pcr_metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pcr Metadata"
          },
          "pcr_spec": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pcr Spec"
          },
          "print_document_enabled": {
            "default": false,
            "title": "Print Document Enabled",
            "type": "boolean"
          },
          "product_name": {
            "title": "Product Name",
            "type": "string"
          },
          "project": {
            "additionalProperties": true,
            "title": "Project",
            "type": "object"
          },
          "project_id": {
            "title": "Project Id",
            "type": "string"
          },
          "public_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Public Url"
          },
          "published_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Published At"
          },
          "review_round_diff_available": {
            "default": false,
            "title": "Review Round Diff Available",
            "type": "boolean"
          },
          "revision": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revision"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "tool_metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Metadata"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          },
          "verifier": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Verifier"
          },
          "view_spec": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "View Spec"
          }
        },
        "required": [
          "id",
          "project_id",
          "project",
          "epd_type",
          "status",
          "product_name",
          "document",
          "display_config",
          "created_at",
          "updated_at"
        ],
        "title": "EpdViewOut",
        "type": "object"
      },
      "ErrorDetailSchema": {
        "properties": {
          "code": {
            "description": "Stable, machine-readable error code. Branch on this rather than on `message`.",
            "examples": [
              "validation_error"
            ],
            "title": "Code",
            "type": "string"
          },
          "details": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional field-level breakdown, e.g. `[{\"field\": \"name\", \"message\": \"This field is required.\"}]`. Present mainly on validation errors; omitted otherwise.",
            "title": "Details"
          },
          "message": {
            "description": "Human-readable explanation of what went wrong. Safe to surface to end users.",
            "examples": [
              "Name is required."
            ],
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "ErrorDetailSchema",
        "type": "object"
      },
      "ErrorEnvelope": {
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorDetailSchema",
            "description": "Wrapper object — every v2 error response has exactly this top-level `error` key."
          }
        },
        "required": [
          "error"
        ],
        "title": "ErrorEnvelope",
        "type": "object"
      },
      "EvaluationSummaryOut": {
        "properties": {
          "compliant": {
            "default": 0,
            "title": "Compliant",
            "type": "integer"
          },
          "errors": {
            "default": 0,
            "title": "Errors",
            "type": "integer"
          },
          "na": {
            "default": 0,
            "title": "Na",
            "type": "integer"
          },
          "non_compliant": {
            "default": 0,
            "title": "Non Compliant",
            "type": "integer"
          },
          "ofi": {
            "default": 0,
            "title": "Ofi",
            "type": "integer"
          },
          "warnings": {
            "default": 0,
            "title": "Warnings",
            "type": "integer"
          }
        },
        "title": "EvaluationSummaryOut",
        "type": "object"
      },
      "ExpertiseAreaTag": {
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          },
          "slug": {
            "title": "Slug",
            "type": "string"
          }
        },
        "required": [
          "slug",
          "name"
        ],
        "title": "ExpertiseAreaTag",
        "type": "object"
      },
      "ExternalInputFieldSchema": {
        "properties": {
          "data_type": {
            "title": "Data Type",
            "type": "string"
          },
          "description": {
            "default": "",
            "title": "Description",
            "type": "string"
          },
          "field_id": {
            "title": "Field Id",
            "type": "string"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "required": {
            "default": false,
            "title": "Required",
            "type": "boolean"
          }
        },
        "required": [
          "field_id",
          "label",
          "data_type"
        ],
        "title": "ExternalInputFieldSchema",
        "type": "object"
      },
      "ForceActionIn": {
        "properties": {
          "force_status": {
            "default": "",
            "title": "Force Status",
            "type": "string"
          }
        },
        "title": "ForceActionIn",
        "type": "object"
      },
      "LCADocumentDiffIn": {
        "properties": {
          "new_document_id": {
            "format": "uuid",
            "title": "New Document Id",
            "type": "string"
          },
          "old_document_id": {
            "format": "uuid",
            "title": "Old Document Id",
            "type": "string"
          }
        },
        "required": [
          "old_document_id",
          "new_document_id"
        ],
        "title": "LCADocumentDiffIn",
        "type": "object"
      },
      "LCADocumentOut": {
        "properties": {
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "deprecated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deprecated At"
          },
          "document_type": {
            "title": "Document Type",
            "type": "string"
          },
          "file_name": {
            "title": "File Name",
            "type": "string"
          },
          "file_size": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Size"
          },
          "file_url": {
            "title": "File Url",
            "type": "string"
          },
          "has_stored_file": {
            "default": false,
            "title": "Has Stored File",
            "type": "boolean"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "lca_version_id": {
            "title": "Lca Version Id",
            "type": "string"
          },
          "mime_type": {
            "title": "Mime Type",
            "type": "string"
          },
          "stage": {
            "title": "Stage",
            "type": "string"
          },
          "uploaded_by": {
            "title": "Uploaded By",
            "type": "string"
          }
        },
        "required": [
          "id",
          "lca_version_id",
          "file_url",
          "file_name",
          "uploaded_by",
          "stage",
          "document_type",
          "mime_type",
          "created_at"
        ],
        "title": "LCADocumentOut",
        "type": "object"
      },
      "LCADocumentUpdateIn": {
        "properties": {
          "document_type": {
            "title": "Document Type",
            "type": "string"
          }
        },
        "required": [
          "document_type"
        ],
        "title": "LCADocumentUpdateIn",
        "type": "object"
      },
      "LCASubmissionOut": {
        "properties": {
          "assignment_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assignment Id"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "display_status": {
            "title": "Display Status",
            "type": "string"
          },
          "documents": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/LCADocumentOut"
            },
            "title": "Documents",
            "type": "array"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "project_id": {
            "title": "Project Id",
            "type": "string"
          },
          "review_notes": {
            "title": "Review Notes",
            "type": "string"
          },
          "review_notes_severity": {
            "default": "",
            "title": "Review Notes Severity",
            "type": "string"
          },
          "reviewed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reviewed At"
          },
          "reviewed_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reviewed By Id"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "submitted_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Submitted By Id"
          },
          "target_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Date"
          },
          "target_date_set_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Date Set At"
          },
          "target_date_set_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Date Set By Id"
          },
          "tool_url": {
            "title": "Tool Url",
            "type": "string"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          },
          "verifier_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Verifier Name"
          },
          "verifier_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Verifier User Id"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "project_id",
          "version",
          "status",
          "display_status",
          "review_notes",
          "tool_url",
          "created_at",
          "updated_at"
        ],
        "title": "LCASubmissionOut",
        "type": "object"
      },
      "LCAVersionCreateIn": {
        "properties": {
          "version": {
            "default": 1,
            "title": "Version",
            "type": "integer"
          }
        },
        "title": "LCAVersionCreateIn",
        "type": "object"
      },
      "LCAVersionDetailOut": {
        "properties": {
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "display_status": {
            "title": "Display Status",
            "type": "string"
          },
          "documents": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/LCADocumentOut"
            },
            "title": "Documents",
            "type": "array"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "project_id": {
            "title": "Project Id",
            "type": "string"
          },
          "review_notes": {
            "title": "Review Notes",
            "type": "string"
          },
          "review_notes_severity": {
            "default": "",
            "title": "Review Notes Severity",
            "type": "string"
          },
          "reviewed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reviewed At"
          },
          "reviewed_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reviewed By Id"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "submitted_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Submitted By Id"
          },
          "target_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Date"
          },
          "target_date_set_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Date Set At"
          },
          "target_date_set_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Date Set By Id"
          },
          "tool_url": {
            "title": "Tool Url",
            "type": "string"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "project_id",
          "version",
          "status",
          "display_status",
          "review_notes",
          "tool_url",
          "created_at",
          "updated_at"
        ],
        "title": "LCAVersionDetailOut",
        "type": "object"
      },
      "LCAVersionOut": {
        "properties": {
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "display_status": {
            "title": "Display Status",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "project_id": {
            "title": "Project Id",
            "type": "string"
          },
          "review_notes": {
            "title": "Review Notes",
            "type": "string"
          },
          "review_notes_severity": {
            "default": "",
            "title": "Review Notes Severity",
            "type": "string"
          },
          "reviewed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reviewed At"
          },
          "reviewed_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reviewed By Id"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "submitted_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Submitted By Id"
          },
          "target_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Date"
          },
          "target_date_set_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Date Set At"
          },
          "target_date_set_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Date Set By Id"
          },
          "tool_url": {
            "title": "Tool Url",
            "type": "string"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "project_id",
          "version",
          "status",
          "display_status",
          "review_notes",
          "tool_url",
          "created_at",
          "updated_at"
        ],
        "title": "LCAVersionOut",
        "type": "object"
      },
      "LCAVersionUpdateIn": {
        "properties": {
          "tool_url": {
            "default": "",
            "title": "Tool Url",
            "type": "string"
          }
        },
        "title": "LCAVersionUpdateIn",
        "type": "object"
      },
      "PCCCreateSchema": {
        "properties": {
          "lca_platform": {
            "default": "",
            "title": "Lca Platform",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "pcr_spec_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pcr Spec Id"
          },
          "preapproved_tool_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preapproved Tool Id"
          },
          "spec_params": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Spec Params"
          },
          "tool_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Id"
          },
          "tool_version": {
            "default": "",
            "title": "Tool Version",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "PCCCreateSchema",
        "type": "object"
      },
      "PCCSchema": {
        "properties": {
          "allows_reference_epds": {
            "title": "Allows Reference Epds",
            "type": "boolean"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "lca_platform": {
            "title": "Lca Platform",
            "type": "string"
          },
          "mode": {
            "title": "Mode",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "pcr_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PCRInfoSchema"
              },
              {
                "type": "null"
              }
            ]
          },
          "pcr_spec_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pcr Spec Id"
          },
          "pcr_spec_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pcr Spec Name"
          },
          "pcr_spec_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pcr Spec Version"
          },
          "preapproved_tool_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preapproved Tool Id"
          },
          "preapproved_tool_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preapproved Tool Name"
          },
          "published_spec_version_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Published Spec Version Id"
          },
          "spec_params": {
            "additionalProperties": true,
            "title": "Spec Params",
            "type": "object"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "tool_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Id"
          },
          "tool_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ToolInfoSchema"
              },
              {
                "type": "null"
              }
            ]
          },
          "tool_version": {
            "title": "Tool Version",
            "type": "string"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          },
          "workspace_id": {
            "title": "Workspace Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "name",
          "mode",
          "status",
          "lca_platform",
          "pcr_spec_id",
          "pcr_spec_name",
          "pcr_info",
          "tool_id",
          "preapproved_tool_id",
          "preapproved_tool_name",
          "tool_info",
          "tool_version",
          "allows_reference_epds",
          "spec_params",
          "created_at",
          "updated_at"
        ],
        "title": "PCCSchema",
        "type": "object"
      },
      "PCRInfoSchema": {
        "properties": {
          "description": {
            "title": "Description",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "is_variant": {
            "title": "Is Variant",
            "type": "boolean"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "parent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Name"
          },
          "version": {
            "title": "Version",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "version",
          "description",
          "is_variant",
          "parent_name"
        ],
        "title": "PCRInfoSchema",
        "type": "object"
      },
      "PaginatedEpdsOut": {
        "properties": {
          "data": {
            "description": "The current page of EPDs.",
            "items": {
              "$ref": "#/components/schemas/EpdOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "description": "`true` if at least one more page exists after this one.",
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Opaque cursor for the next page; pass it back as the `cursor` query param. `null` when there are no more pages.",
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more"
        ],
        "title": "PaginatedEpdsOut",
        "type": "object"
      },
      "PaginatedLCAVersionsOut": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/LCAVersionOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more"
        ],
        "title": "PaginatedLCAVersionsOut",
        "type": "object"
      },
      "PaginatedPublicEpdsOut": {
        "properties": {
          "data": {
            "description": "The current page of EPDs.",
            "items": {
              "$ref": "#/components/schemas/PublicEpdSummaryOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "description": "`true` if at least one more page exists after this one.",
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Opaque cursor for the next page; pass it back as the `cursor` query param. `null` when there are no more pages.",
            "title": "Next Cursor"
          },
          "unavailable_platforms": {
            "description": "Platforms that could not be read for this page. Normally empty; when not, the page — and `has_more` — covers only the other platform, so retry later for a complete listing.",
            "items": {
              "enum": [
                "v1",
                "v2"
              ],
              "type": "string"
            },
            "title": "Unavailable Platforms",
            "type": "array"
          }
        },
        "required": [
          "data",
          "has_more"
        ],
        "title": "PaginatedPublicEpdsOut",
        "type": "object"
      },
      "PaginatedVariantEpdsOut": {
        "properties": {
          "data": {
            "description": "The current page of variant EPDs.",
            "items": {
              "$ref": "#/components/schemas/VariantEpdOut"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "description": "`true` if at least one more page exists after this one.",
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Opaque cursor for the next page; pass it back as the `cursor` query param. `null` when there are no more pages.",
            "title": "Next Cursor"
          }
        },
        "required": [
          "data",
          "has_more"
        ],
        "title": "PaginatedVariantEpdsOut",
        "type": "object"
      },
      "PlantCreateSchema": {
        "properties": {
          "address": {
            "default": "",
            "title": "Address",
            "type": "string"
          },
          "attachments": {
            "default": [],
            "items": {},
            "title": "Attachments",
            "type": "array"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "openepd_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Openepd Id"
          },
          "pluscode": {
            "default": "",
            "title": "Pluscode",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "PlantCreateSchema",
        "type": "object"
      },
      "PlantSchema": {
        "properties": {
          "address": {
            "title": "Address",
            "type": "string"
          },
          "attachments": {
            "items": {},
            "title": "Attachments",
            "type": "array"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "openepd_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Openepd Id"
          },
          "org_id": {
            "title": "Org Id",
            "type": "string"
          },
          "pluscode": {
            "title": "Pluscode",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "org_id",
          "name",
          "address",
          "pluscode",
          "openepd_id",
          "attachments",
          "status",
          "created_at",
          "updated_at"
        ],
        "title": "PlantSchema",
        "type": "object"
      },
      "PlantUpdateSchema": {
        "properties": {
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address"
          },
          "attachments": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attachments"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "openepd_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Openepd Id"
          },
          "pluscode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pluscode"
          }
        },
        "title": "PlantUpdateSchema",
        "type": "object"
      },
      "PreapprovedToolSchema": {
        "properties": {
          "allows_reference_epds": {
            "title": "Allows Reference Epds",
            "type": "boolean"
          },
          "certified_at": {
            "title": "Certified At",
            "type": "string"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "expires_on": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires On"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "is_universal": {
            "title": "Is Universal",
            "type": "boolean"
          },
          "lca_platform": {
            "title": "Lca Platform",
            "type": "string"
          },
          "limitations": {
            "title": "Limitations",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "requirements": {
            "title": "Requirements",
            "type": "string"
          },
          "supported_versions": {
            "items": {
              "type": "string"
            },
            "title": "Supported Versions",
            "type": "array"
          },
          "tool_type": {
            "title": "Tool Type",
            "type": "string"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          },
          "validity_period_years": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Validity Period Years"
          },
          "verified_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Verified At"
          },
          "version": {
            "title": "Version",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "version",
          "lca_platform",
          "certified_at",
          "description",
          "requirements",
          "limitations",
          "tool_type",
          "is_universal",
          "supported_versions",
          "allows_reference_epds",
          "created_at",
          "updated_at"
        ],
        "title": "PreapprovedToolSchema",
        "type": "object"
      },
      "ProjectCreateSchema": {
        "properties": {
          "description": {
            "default": "",
            "title": "Description",
            "type": "string"
          },
          "is_tool": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Tool"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "ProjectCreateSchema",
        "type": "object"
      },
      "ProjectSchema": {
        "properties": {
          "active_verifier_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active Verifier Email"
          },
          "active_verifier_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active Verifier Id"
          },
          "active_verifier_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active Verifier Name"
          },
          "close_reason_code": {
            "default": "",
            "title": "Close Reason Code",
            "type": "string"
          },
          "close_reason_text": {
            "default": "",
            "title": "Close Reason Text",
            "type": "string"
          },
          "closed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Closed At"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "epd_count": {
            "default": 0,
            "title": "Epd Count",
            "type": "integer"
          },
          "epd_status_counts": {
            "additionalProperties": {
              "type": "integer"
            },
            "default": {},
            "title": "Epd Status Counts",
            "type": "object"
          },
          "expertise_areas": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/ExpertiseAreaTag"
            },
            "title": "Expertise Areas",
            "type": "array"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "is_tool": {
            "default": false,
            "title": "Is Tool",
            "type": "boolean"
          },
          "lca_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lca Status"
          },
          "monday_close_sync_status": {
            "default": "not_applicable",
            "title": "Monday Close Sync Status",
            "type": "string"
          },
          "monday_item_id": {
            "default": "",
            "title": "Monday Item Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "pcc_id": {
            "title": "Pcc Id",
            "type": "string"
          },
          "previous_revision_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Previous Revision Id"
          },
          "reporting_owner_address": {
            "title": "Reporting Owner Address",
            "type": "string"
          },
          "reporting_owner_email": {
            "title": "Reporting Owner Email",
            "type": "string"
          },
          "reporting_owner_name": {
            "title": "Reporting Owner Name",
            "type": "string"
          },
          "reporting_owner_phone": {
            "title": "Reporting Owner Phone",
            "type": "string"
          },
          "reporting_owner_website": {
            "title": "Reporting Owner Website",
            "type": "string"
          },
          "revision": {
            "title": "Revision",
            "type": "integer"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          },
          "workspace_id": {
            "title": "Workspace Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "pcc_id",
          "workspace_id",
          "name",
          "description",
          "status",
          "revision",
          "previous_revision_id",
          "reporting_owner_name",
          "reporting_owner_phone",
          "reporting_owner_address",
          "reporting_owner_website",
          "reporting_owner_email",
          "created_at",
          "updated_at"
        ],
        "title": "ProjectSchema",
        "type": "object"
      },
      "ProjectTimelineSchema": {
        "properties": {
          "epd": {
            "items": {
              "$ref": "#/components/schemas/TimelineMilestoneSchema"
            },
            "title": "Epd",
            "type": "array"
          },
          "epd_review_cycle": {
            "default": 0,
            "title": "Epd Review Cycle",
            "type": "integer"
          },
          "lca": {
            "items": {
              "$ref": "#/components/schemas/TimelineMilestoneSchema"
            },
            "title": "Lca",
            "type": "array"
          },
          "lca_review_cycle": {
            "default": 0,
            "title": "Lca Review Cycle",
            "type": "integer"
          }
        },
        "required": [
          "lca",
          "epd"
        ],
        "title": "ProjectTimelineSchema",
        "type": "object"
      },
      "ProjectUpdateSchema": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "is_tool": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Tool"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "reporting_owner_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reporting Owner Address"
          },
          "reporting_owner_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reporting Owner Email"
          },
          "reporting_owner_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reporting Owner Name"
          },
          "reporting_owner_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reporting Owner Phone"
          },
          "reporting_owner_website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reporting Owner Website"
          }
        },
        "title": "ProjectUpdateSchema",
        "type": "object"
      },
      "PublicEpdPcrOut": {
        "properties": {
          "name": {
            "description": "PCR name.",
            "examples": [
              "NSF PCR for Concrete"
            ],
            "title": "Name",
            "type": "string"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "PCR version, when the PCR publishes one.",
            "examples": [
              "2.1"
            ],
            "title": "Version"
          }
        },
        "required": [
          "name"
        ],
        "title": "PublicEpdPcrOut",
        "type": "object"
      },
      "PublicEpdSummaryOut": {
        "description": "One publicly listed EPD from either platform (see ``public_library``).",
        "properties": {
          "date_of_issue": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Date of issue (`YYYY-MM-DD`). Listing is newest first on this date.",
            "title": "Date Of Issue"
          },
          "declaration_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Registration / declaration number printed on the EPD.",
            "examples": [
              "SmartEPD-2025-012-0042-01"
            ],
            "title": "Declaration Number"
          },
          "detail_url": {
            "description": "Anonymous JSON detail for the EPD. For `v2`: `GET /api/v2/public/epds/{id}/view/`. For `v1`: the classic platform's library record — a different, V1-shaped payload.",
            "title": "Detail Url",
            "type": "string"
          },
          "ec3_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The EPD's id in Building Transparency's EC3, if listed there.",
            "title": "Ec3 Id"
          },
          "expiration_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Last day of validity (`YYYY-MM-DD`). Expired EPDs are never listed; `null` means none recorded.",
            "title": "Expiration Date"
          },
          "id": {
            "description": "The EPD's id on its own platform: a UUID for `v2` EPDs, a 24-character hex id for `v1` EPDs. Unique only together with `platform`.",
            "examples": [
              "01928f3a-7c1e-7b4d-9a2e-5f6b8c9d0e1f"
            ],
            "title": "Id",
            "type": "string"
          },
          "is_prospective": {
            "default": false,
            "description": "`true` for a prospective EPD (forward-looking LCA, 1-year validity).",
            "title": "Is Prospective",
            "type": "boolean"
          },
          "manufacturer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Name of the declaring organization.",
            "title": "Manufacturer"
          },
          "pcr": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicEpdPcrOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "The Product Category Rules it conforms to."
          },
          "platform": {
            "description": "`v2` for EPDs published on the current platform, `v1` for the classic platform.",
            "enum": [
              "v1",
              "v2"
            ],
            "title": "Platform",
            "type": "string"
          },
          "product_name": {
            "description": "Product name as declared on the EPD.",
            "title": "Product Name",
            "type": "string"
          },
          "url": {
            "description": "Public web page for the EPD.",
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "id",
          "platform",
          "product_name",
          "url",
          "detail_url"
        ],
        "title": "PublicEpdSummaryOut",
        "type": "object"
      },
      "ReferenceConstraintEvaluationOut": {
        "properties": {
          "blocking_failures": {
            "description": "Enforced only: error-severity violations other than the missing inputs.",
            "items": {
              "$ref": "#/components/schemas/ConstraintRulingOut"
            },
            "title": "Blocking Failures",
            "type": "array"
          },
          "enforced": {
            "description": "The template's `constraints_enforced` flag.",
            "title": "Enforced",
            "type": "boolean"
          },
          "input_fields": {
            "description": "The external input field definitions these rulings were made with: the EPD's current constraint version for `live`, the submission's own copy for `submission` (a flagged author's edits to the fields never reach it).",
            "items": {
              "$ref": "#/components/schemas/ReferenceInputFieldOut"
            },
            "title": "Input Fields",
            "type": "array"
          },
          "missing_inputs": {
            "description": "Enforced only: external fields a constraint needs (or marked required) with no value.",
            "items": {
              "$ref": "#/components/schemas/ReferenceInputMissingOut"
            },
            "title": "Missing Inputs",
            "type": "array"
          },
          "rulings": {
            "items": {
              "$ref": "#/components/schemas/ConstraintRulingOut"
            },
            "title": "Rulings",
            "type": "array"
          },
          "snapshot_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The submission snapshot evaluated, when `source_used` is `submission`.",
            "title": "Snapshot Id"
          },
          "source_used": {
            "default": "live",
            "description": "`live` (the current template and stored values) or `submission` (the latest submission snapshot). A `submission` request for an EPD with no snapshot falls back to `live` and says so here.",
            "title": "Source Used",
            "type": "string"
          },
          "would_block": {
            "description": "Whether submit would refuse these values (before acknowledgement).",
            "title": "Would Block",
            "type": "boolean"
          }
        },
        "required": [
          "enforced",
          "rulings",
          "would_block"
        ],
        "title": "ReferenceConstraintEvaluationOut",
        "type": "object"
      },
      "ReferenceConstraintsEvaluateIn": {
        "properties": {
          "reference_inputs": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reference Inputs"
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`live` (default): the EPD's current template and stored values — the author's view. `submission`: the definitions, enforcement and values of the EPD's latest submission snapshot — what the verifier's constraint rows show, unaffected by edits made since (a flagged author's unsubmitted changes). Given values are a what-if on top of either. Not combinable with `template_constraints`.",
            "title": "Source"
          },
          "template_constraints": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template Constraints"
          }
        },
        "title": "ReferenceConstraintsEvaluateIn",
        "type": "object"
      },
      "ReferenceInputFieldOut": {
        "properties": {
          "data_type": {
            "description": "`number`, `string`, `boolean`, `array` or `object`.",
            "title": "Data Type",
            "type": "string"
          },
          "field_id": {
            "description": "The `ext__` id of the external input field.",
            "title": "Field Id",
            "type": "string"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "required": {
            "default": false,
            "title": "Required",
            "type": "boolean"
          }
        },
        "required": [
          "field_id",
          "label",
          "data_type"
        ],
        "title": "ReferenceInputFieldOut",
        "type": "object"
      },
      "ReferenceInputMissingOut": {
        "properties": {
          "field_id": {
            "title": "Field Id",
            "type": "string"
          },
          "label": {
            "title": "Label",
            "type": "string"
          }
        },
        "required": [
          "field_id",
          "label"
        ],
        "title": "ReferenceInputMissingOut",
        "type": "object"
      },
      "ReferenceInputsIn": {
        "properties": {
          "reference_inputs": {
            "additionalProperties": true,
            "description": "The full set of this reference EPD's external input values (a replacement, not a merge). Keys with or without the `ext__` prefix; `null` or blank text removes a key.",
            "examples": [
              {
                "ext__product_mass": 0.5,
                "ext__test_mass": 100
              }
            ],
            "title": "Reference Inputs",
            "type": "object"
          }
        },
        "required": [
          "reference_inputs"
        ],
        "title": "ReferenceInputsIn",
        "type": "object"
      },
      "RequirementResultOut": {
        "properties": {
          "check_results": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/CheckResultOut"
            },
            "title": "Check Results",
            "type": "array"
          },
          "compliance": {
            "title": "Compliance",
            "type": "string"
          },
          "requirement_id": {
            "title": "Requirement Id",
            "type": "string"
          },
          "title": {
            "default": "",
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "requirement_id",
          "compliance"
        ],
        "title": "RequirementResultOut",
        "type": "object"
      },
      "SpecSchema": {
        "properties": {
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "draft_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Draft Version"
          },
          "has_children": {
            "title": "Has Children",
            "type": "boolean"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "inherits_from": {
            "items": {
              "type": "string"
            },
            "title": "Inherits From",
            "type": "array"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "namespace": {
            "title": "Namespace",
            "type": "string"
          },
          "parent_spec_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Spec Id"
          },
          "pcc_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pcc Id"
          },
          "spec_type": {
            "title": "Spec Type",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "string"
          },
          "version_count": {
            "title": "Version Count",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "spec_type",
          "version",
          "status",
          "namespace",
          "description",
          "parent_spec_id",
          "pcc_id",
          "has_children",
          "inherits_from",
          "draft_version",
          "version_count",
          "created_at",
          "updated_at"
        ],
        "title": "SpecSchema",
        "type": "object"
      },
      "SubmitErrorEnvelope": {
        "properties": {
          "error": {
            "$ref": "#/components/schemas/_SubmitErrorDetailOut"
          }
        },
        "required": [
          "error"
        ],
        "title": "SubmitErrorEnvelope",
        "type": "object"
      },
      "SubmitLCAIn": {
        "properties": {
          "force_status": {
            "default": "",
            "title": "Force Status",
            "type": "string"
          }
        },
        "title": "SubmitLCAIn",
        "type": "object"
      },
      "TemplateConstraintInputSchema": {
        "properties": {
          "applies_if_json": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Applies If Json"
          },
          "constraint_type": {
            "title": "Constraint Type",
            "type": "string"
          },
          "label": {
            "default": "",
            "title": "Label",
            "type": "string"
          },
          "parameters_json": {
            "additionalProperties": true,
            "default": {},
            "title": "Parameters Json",
            "type": "object"
          },
          "reference_field_id": {
            "default": "",
            "title": "Reference Field Id",
            "type": "string"
          },
          "severity": {
            "default": "error",
            "title": "Severity",
            "type": "string"
          }
        },
        "required": [
          "constraint_type"
        ],
        "title": "TemplateConstraintInputSchema",
        "type": "object"
      },
      "TemplateConstraintReportSchema": {
        "description": "Response for the two ``test-constraints`` endpoints (SMA-2573).\n\nA subclass rather than extra fields on the base so\n``/projects/{id}/template/validate/`` never advertises keys it does not\npopulate. ``rulings`` stays empty unless ``include_report`` was requested.",
        "properties": {
          "constraints_enforced": {
            "default": false,
            "title": "Constraints Enforced",
            "type": "boolean"
          },
          "has_blocking_errors": {
            "default": false,
            "title": "Has Blocking Errors",
            "type": "boolean"
          },
          "rulings": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/ConstraintRulingSchema"
            },
            "title": "Rulings",
            "type": "array"
          },
          "valid": {
            "title": "Valid",
            "type": "boolean"
          },
          "violations": {
            "items": {
              "$ref": "#/components/schemas/ConstraintViolationSchema"
            },
            "title": "Violations",
            "type": "array"
          }
        },
        "required": [
          "valid",
          "violations"
        ],
        "title": "TemplateConstraintReportSchema",
        "type": "object"
      },
      "TemplateDetailSchema": {
        "properties": {
          "ai_sanity_instructions": {
            "default": "",
            "title": "Ai Sanity Instructions",
            "type": "string"
          },
          "approved": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TemplateVersionRefSchema"
              },
              {
                "type": "null"
              }
            ]
          },
          "approved_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Approved At"
          },
          "approved_by_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Approved By Id"
          },
          "constraints_enforced": {
            "default": false,
            "title": "Constraints Enforced",
            "type": "boolean"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "editable": {
            "default": true,
            "title": "Editable",
            "type": "boolean"
          },
          "external_input_fields": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Input Fields"
          },
          "forked_from_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Forked From Id"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "locked_fields": {
            "default": [],
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Locked Fields",
            "type": "array"
          },
          "locked_message": {
            "default": "",
            "title": "Locked Message",
            "type": "string"
          },
          "locked_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Locked Reason"
          },
          "project_id": {
            "title": "Project Id",
            "type": "string"
          },
          "reference_epd_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reference Epd Id"
          },
          "rejected_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rejected At"
          },
          "rejection_reason": {
            "title": "Rejection Reason",
            "type": "string"
          },
          "sample_external_payload": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sample External Payload"
          },
          "sections": {
            "items": {
              "$ref": "#/components/schemas/TemplateSectionSchema"
            },
            "title": "Sections",
            "type": "array"
          },
          "shared_draft_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shared Draft Count"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "supersedes_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Supersedes Id"
          },
          "template_constraints": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template Constraints"
          },
          "unlocked_fields": {
            "default": [],
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Unlocked Fields",
            "type": "array"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "project_id",
          "status",
          "version",
          "approved_by_id",
          "rejected_at",
          "rejection_reason",
          "created_at",
          "updated_at",
          "sections"
        ],
        "title": "TemplateDetailSchema",
        "type": "object"
      },
      "TemplateSamplePayloadSchema": {
        "description": "Body of ``PUT /epds/{epd_id}/template/sample-payload/`` (the what-if scratchpad).",
        "properties": {
          "sample_external_payload": {
            "additionalProperties": true,
            "title": "Sample External Payload",
            "type": "object"
          }
        },
        "required": [
          "sample_external_payload"
        ],
        "title": "TemplateSamplePayloadSchema",
        "type": "object"
      },
      "TemplateSaveDraftSchema": {
        "properties": {
          "ai_sanity_instructions": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Sanity Instructions"
          },
          "base_updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional optimistic-concurrency token: the `updated_at` of the template you loaded (ISO 8601). If the template has been saved since, the save is refused with `409 template_conflict` and `details[0]` (`field` `updated_at`) carries its current `updated_at`. Omit it to save unconditionally.",
            "title": "Base Updated At"
          },
          "constraints_enforced": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Constraints Enforced"
          },
          "external_input_fields": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ExternalInputFieldSchema"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Input Fields"
          },
          "sample_external_payload": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sample External Payload"
          },
          "sections": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TemplateSectionInputSchema"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sections"
          },
          "template_constraints": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/TemplateConstraintInputSchema"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template Constraints"
          }
        },
        "title": "TemplateSaveDraftSchema",
        "type": "object"
      },
      "TemplateSchema": {
        "properties": {
          "approved_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Approved At"
          },
          "approved_by_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Approved By Id"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "forked_from_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Forked From Id"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "project_id": {
            "title": "Project Id",
            "type": "string"
          },
          "reference_epd_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reference Epd Id"
          },
          "rejected_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rejected At"
          },
          "rejection_reason": {
            "title": "Rejection Reason",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "supersedes_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Supersedes Id"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "project_id",
          "status",
          "version",
          "approved_by_id",
          "rejected_at",
          "rejection_reason",
          "created_at",
          "updated_at"
        ],
        "title": "TemplateSchema",
        "type": "object"
      },
      "TemplateSectionInputSchema": {
        "properties": {
          "content": {
            "default": "",
            "title": "Content",
            "type": "string"
          },
          "is_required": {
            "default": false,
            "title": "Is Required",
            "type": "boolean"
          },
          "order": {
            "default": 0,
            "title": "Order",
            "type": "integer"
          },
          "spec_field_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Spec Field Id"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "title"
        ],
        "title": "TemplateSectionInputSchema",
        "type": "object"
      },
      "TemplateSectionSchema": {
        "properties": {
          "content": {
            "title": "Content",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "is_required": {
            "title": "Is Required",
            "type": "boolean"
          },
          "order": {
            "title": "Order",
            "type": "integer"
          },
          "spec_field_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Spec Field Id"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "content",
          "is_required",
          "order",
          "spec_field_id"
        ],
        "title": "TemplateSectionSchema",
        "type": "object"
      },
      "TemplateTestConstraintsSchema": {
        "properties": {
          "epd_field_values": {
            "additionalProperties": true,
            "default": {},
            "title": "Epd Field Values",
            "type": "object"
          },
          "external_payload": {
            "additionalProperties": true,
            "default": {},
            "title": "External Payload",
            "type": "object"
          },
          "include_report": {
            "default": false,
            "title": "Include Report",
            "type": "boolean"
          }
        },
        "title": "TemplateTestConstraintsSchema",
        "type": "object"
      },
      "TemplateVersionRefSchema": {
        "description": "A pointer to one constraint version.",
        "properties": {
          "approved_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Approved At"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "version",
          "status"
        ],
        "title": "TemplateVersionRefSchema",
        "type": "object"
      },
      "TimelineMilestoneSchema": {
        "properties": {
          "current": {
            "title": "Current",
            "type": "boolean"
          },
          "date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Date"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "reached": {
            "title": "Reached",
            "type": "boolean"
          }
        },
        "required": [
          "key",
          "label",
          "date",
          "reached",
          "current"
        ],
        "title": "TimelineMilestoneSchema",
        "type": "object"
      },
      "ToolInfoSchema": {
        "properties": {
          "allows_reference_epds": {
            "title": "Allows Reference Epds",
            "type": "boolean"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "lca_platform": {
            "title": "Lca Platform",
            "type": "string"
          },
          "limitations": {
            "title": "Limitations",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "provider_org_id": {
            "title": "Provider Org Id",
            "type": "string"
          },
          "provider_org_name": {
            "title": "Provider Org Name",
            "type": "string"
          },
          "requirements": {
            "title": "Requirements",
            "type": "string"
          },
          "tool_type": {
            "title": "Tool Type",
            "type": "string"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          },
          "version": {
            "title": "Version",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "version",
          "provider_org_id",
          "provider_org_name",
          "lca_platform",
          "description",
          "requirements",
          "limitations",
          "tool_type",
          "allows_reference_epds",
          "created_at",
          "updated_at"
        ],
        "title": "ToolInfoSchema",
        "type": "object"
      },
      "VariantConstraintViolationOut": {
        "properties": {
          "actual_value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actual Value"
          },
          "constraint_type": {
            "title": "Constraint Type",
            "type": "string"
          },
          "field_id": {
            "title": "Field Id",
            "type": "string"
          },
          "message": {
            "default": "",
            "title": "Message",
            "type": "string"
          },
          "severity": {
            "title": "Severity",
            "type": "string"
          },
          "valid_range": {
            "default": "",
            "title": "Valid Range",
            "type": "string"
          }
        },
        "required": [
          "field_id",
          "constraint_type",
          "severity"
        ],
        "title": "VariantConstraintViolationOut",
        "type": "object"
      },
      "VariantCreateIn": {
        "properties": {
          "field_inputs": {
            "additionalProperties": true,
            "default": {},
            "title": "Field Inputs",
            "type": "object"
          },
          "parameters": {
            "additionalProperties": true,
            "default": {},
            "title": "Parameters",
            "type": "object"
          }
        },
        "title": "VariantCreateIn",
        "type": "object"
      },
      "VariantEpdOut": {
        "properties": {
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "epd_id": {
            "title": "Epd Id",
            "type": "string"
          },
          "field_inputs": {
            "additionalProperties": true,
            "title": "Field Inputs",
            "type": "object"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "parameters": {
            "additionalProperties": true,
            "title": "Parameters",
            "type": "object"
          },
          "reference_epd_id": {
            "title": "Reference Epd Id",
            "type": "string"
          },
          "rejection_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rejection Reason"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "epd_id",
          "reference_epd_id",
          "status",
          "parameters",
          "field_inputs",
          "created_at"
        ],
        "title": "VariantEpdOut",
        "type": "object"
      },
      "VariantValidationResultOut": {
        "properties": {
          "has_blocking_errors": {
            "title": "Has Blocking Errors",
            "type": "boolean"
          },
          "valid": {
            "title": "Valid",
            "type": "boolean"
          },
          "violations": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/VariantConstraintViolationOut"
            },
            "title": "Violations",
            "type": "array"
          }
        },
        "required": [
          "valid",
          "has_blocking_errors"
        ],
        "title": "VariantValidationResultOut",
        "type": "object"
      },
      "WorkspaceCreateOrgSchema": {
        "properties": {
          "default_user_role": {
            "default": "viewer",
            "title": "Default User Role",
            "type": "string"
          },
          "organization_id": {
            "title": "Organization Id",
            "type": "string"
          },
          "role": {
            "title": "Role",
            "type": "string"
          }
        },
        "required": [
          "organization_id",
          "role"
        ],
        "title": "WorkspaceCreateOrgSchema",
        "type": "object"
      },
      "WorkspaceCreateSchema": {
        "properties": {
          "description": {
            "default": "",
            "title": "Description",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "organizations": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/WorkspaceCreateOrgSchema"
            },
            "title": "Organizations",
            "type": "array"
          },
          "primary_org_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Primary Org Id"
          }
        },
        "required": [
          "name"
        ],
        "title": "WorkspaceCreateSchema",
        "type": "object"
      },
      "WorkspaceMemberSummarySchema": {
        "properties": {
          "email": {
            "title": "Email",
            "type": "string"
          },
          "initials": {
            "title": "Initials",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "role": {
            "title": "Role",
            "type": "string"
          },
          "user_id": {
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "user_id",
          "name",
          "initials",
          "email",
          "role"
        ],
        "title": "WorkspaceMemberSummarySchema",
        "type": "object"
      },
      "WorkspaceOrgSummarySchema": {
        "properties": {
          "organization_id": {
            "title": "Organization Id",
            "type": "string"
          },
          "organization_name": {
            "title": "Organization Name",
            "type": "string"
          },
          "role": {
            "title": "Role",
            "type": "string"
          }
        },
        "required": [
          "organization_id",
          "organization_name",
          "role"
        ],
        "title": "WorkspaceOrgSummarySchema",
        "type": "object"
      },
      "WorkspaceSchema": {
        "properties": {
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "created_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By Id"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "epd_count": {
            "title": "Epd Count",
            "type": "integer"
          },
          "epd_status_counts": {
            "additionalProperties": {
              "type": "integer"
            },
            "default": {},
            "title": "Epd Status Counts",
            "type": "object"
          },
          "has_lca_in_review": {
            "default": false,
            "title": "Has Lca In Review",
            "type": "boolean"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "member_count": {
            "title": "Member Count",
            "type": "integer"
          },
          "members": {
            "items": {
              "$ref": "#/components/schemas/WorkspaceMemberSummarySchema"
            },
            "title": "Members",
            "type": "array"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "organizations": {
            "items": {
              "$ref": "#/components/schemas/WorkspaceOrgSummarySchema"
            },
            "title": "Organizations",
            "type": "array"
          },
          "pcc_count": {
            "title": "Pcc Count",
            "type": "integer"
          },
          "primary_org_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Primary Org Id"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "created_by_id",
          "primary_org_id",
          "status",
          "pcc_count",
          "epd_count",
          "member_count",
          "members",
          "organizations",
          "created_at",
          "updated_at"
        ],
        "title": "WorkspaceSchema",
        "type": "object"
      },
      "WorkspaceUpdateSchema": {
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "title": "WorkspaceUpdateSchema",
        "type": "object"
      },
      "_SubmitErrorDetailOut": {
        "properties": {
          "code": {
            "description": "Stable, machine-readable error code — e.g. `shape_validation_error`, `tool_expired`, `reference_inputs_missing`, `constraint_failures`, `model_lock_drift`, `validation_error`.",
            "title": "Code",
            "type": "string"
          },
          "details": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "`reference_inputs_missing`: `[{field_id, label}]`. `constraint_failures`: the failing constraint rulings (see `POST reference-inputs/evaluate/`). `model_lock_drift`: `[{coordinate, label, locked, actual}]`. `shape_validation_error`: the blocking document violations.",
            "title": "Details"
          },
          "message": {
            "description": "Human-readable explanation, safe to show.",
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "_SubmitErrorDetailOut",
        "type": "object"
      }
    },
    "securitySchemes": {
      "JWTAuth": {
        "in": "header",
        "name": "Authorization",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "description": "SmartEPD v2 API with cursor pagination and structured errors",
    "title": "SmartEPD API v2",
    "version": "2.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/v2/epds/{epd_id}/": {
      "get": {
        "description": "Get a single EPD with its sections.",
        "operationId": "smartepd_epds_api_v2_get_epd",
        "parameters": [
          {
            "in": "path",
            "name": "epd_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Epd Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EpdDetailOut"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Get Epd",
        "tags": [
          "EPDs"
        ]
      },
      "patch": {
        "description": "Update mutable fields on a draft EPD.\n\nNote: ``product_name`` writes through to the EPD column but is also\nderived from the document's general-info section — saving the document\nlater will overwrite a column-only update. Most callers should set\nproduct name via the document, not this endpoint.",
        "operationId": "smartepd_epds_api_v2_update_epd",
        "parameters": [
          {
            "in": "path",
            "name": "epd_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Epd Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EpdUpdateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EpdOut"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Update Epd",
        "tags": [
          "EPDs"
        ]
      }
    },
    "/api/v2/epds/{epd_id}/cover/": {
      "get": {
        "description": "Render the EPD's cover page as standalone HTML (no full PDF).\n\nBacks the \"Preview PDF Cover Page\" button with the same Jinja2\n``cover.html`` used inside the real PDF, so the preview can never\ndisagree with what ships. Returns 400 for an EPD on the paginated\nprint-document pipeline — that pipeline's cover is page one of the\nReact-rendered document, not this Jinja template, so there is nothing\nfor this endpoint to return for it.",
        "operationId": "smartepd_epds_api_v2_get_epd_cover_html",
        "parameters": [
          {
            "in": "path",
            "name": "epd_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Epd Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response",
                  "type": "string"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Get Epd Cover Html",
        "tags": [
          "EPDs"
        ]
      }
    },
    "/api/v2/epds/{epd_id}/document/": {
      "put": {
        "description": "Store the full EPD content document and display config.",
        "operationId": "smartepd_epds_api_v2_update_epd_document_endpoint",
        "parameters": [
          {
            "in": "path",
            "name": "epd_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Epd Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EpdDocumentUpdateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EpdViewOut"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Update Epd Document Endpoint",
        "tags": [
          "EPDs"
        ]
      }
    },
    "/api/v2/epds/{epd_id}/force-approve/": {
      "post": {
        "description": "Force-approve an EPD in a single call — non-prod, org-admin only.\n\nThis collapses the full verification dance (assign verifier → start\nreview → approve with force_status) into one call so developers can\ndrive an EPD end-to-end from an API key. It exists specifically for\nthe API Quickstart flow.\n\nGates:\n\n- ``guard_force_non_prod``: in production this endpoint always\n  returns 400 regardless of caller — there is no escape hatch.\n- Caller must either be Django staff or hold an ``admin`` role in\n  at least one organization (``is_org_admin``).\n\nBehaviour:\n\n- Reuses the EPD's active verifier assignment if one exists, or\n  creates a new one with the caller as the verifier (the\n  independence checks on ``verifier_assign`` are bypassed via\n  ``force=True``).\n- Calls the review approval path with the provided ``force_status``\n  (defaults to ``\"approved\"``) so every downstream gate —\n  active-assignment, checklist sign-off, and self-approval\n  independence — is skipped.",
        "operationId": "smartepd_epds_api_v2_force_approve_epd",
        "parameters": [
          {
            "in": "path",
            "name": "epd_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Epd Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/ForceActionIn"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EpdOut"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Force Approve Epd",
        "tags": [
          "EPDs"
        ]
      }
    },
    "/api/v2/epds/{epd_id}/morph-to-reference/": {
      "post": {
        "description": "Convert a standard draft EPD into a reference EPD.\n\nAuto-creates a template from the project's PCC spec.",
        "operationId": "smartepd_epds_api_v2_morph_epd_to_reference",
        "parameters": [
          {
            "in": "path",
            "name": "epd_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Epd Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EpdOut"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Morph Epd To Reference",
        "tags": [
          "EPDs"
        ]
      }
    },
    "/api/v2/epds/{epd_id}/pdf/": {
      "get": {
        "description": "Download the EPD as a PDF file.\n\nServes the pre-generated PDF for published EPDs (fast path), or\ngenerates one on-demand for drafts and in-review EPDs.",
        "operationId": "smartepd_epds_api_v2_download_epd_pdf",
        "parameters": [
          {
            "in": "path",
            "name": "epd_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Epd Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "format": "binary",
                  "title": "Response",
                  "type": "string"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Gateway"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Download Epd Pdf",
        "tags": [
          "EPDs"
        ]
      }
    },
    "/api/v2/epds/{epd_id}/reference-inputs/": {
      "put": {
        "description": "Set a reference EPD's own values for its template's external input fields.\n\nThe template (and its constraints) is shared by every reference EPD in the\nproject; these values belong to this EPD alone. Editable while the EPD is\ndraft, flagged or republishing — the same gate as the document.",
        "operationId": "smartepd_epds_api_v2_update_reference_inputs",
        "parameters": [
          {
            "in": "path",
            "name": "epd_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Epd Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReferenceInputsIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EpdDetailOut"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Update Reference Inputs",
        "tags": [
          "EPDs"
        ]
      }
    },
    "/api/v2/epds/{epd_id}/reference-inputs/evaluate/": {
      "post": {
        "description": "Rule every constraint on a reference EPD against its values. Read-only.\n\nOmit ``reference_inputs`` to evaluate the stored values, or pass draft\nvalues to preview them; pass ``template_constraints`` to evaluate unsaved\nconstraint edits in place of the template's (callers who can edit the EPD\nonly; at most 50, a formula expression at most 500 characters and 32\nbrackets deep). Every ruling carries the key of the verifier checklist row\nit becomes, and ``would_block`` says whether submit would refuse these\nvalues. ``source: \"submission\"`` evaluates the latest submission snapshot\ninstead of the live model (see ``source_used``).",
        "operationId": "smartepd_epds_api_v2_evaluate_reference_inputs",
        "parameters": [
          {
            "in": "path",
            "name": "epd_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Epd Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/ReferenceConstraintsEvaluateIn"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferenceConstraintEvaluationOut"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Evaluate Reference Inputs",
        "tags": [
          "EPDs"
        ]
      }
    },
    "/api/v2/epds/{epd_id}/revision/": {
      "post": {
        "description": "Start a revision of an approved reference EPD's constraints (\"Start revision\").\n\nFor an APPROVED, unpublished reference EPD: its approved constraint\nversion is copied into the next version as a draft, and the EPD goes back\nto `draft` so its constraints (and document) can be changed and submitted\nfor a new review round — which goes to the verifier who approved it. The\napproved version stays in force for the reference's variants until the\nrevision is approved; no new variants can be created, and none\nauto-approve, until then.\n\n409 `epd_not_approved` for any other status — for a PUBLISHED reference\nwith `details[0].message` = `start_republishing`: changing a published\nreference's constraints requires republishing it, which V2 does not\nsupport yet (SMA-2180). 409 `revision_already_open` when a revision is\nalready open. Requires write access to the EPD's workspace.",
        "operationId": "smartepd_epds_api_v2_start_reference_revision",
        "parameters": [
          {
            "in": "path",
            "name": "epd_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Epd Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EpdDetailOut"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Start Reference Revision",
        "tags": [
          "EPDs"
        ]
      }
    },
    "/api/v2/epds/{epd_id}/revision/discard/": {
      "post": {
        "description": "Discard an open revision of a reference EPD (\"Discard revision\").\n\nReturns the EPD to its approved version: `approved` status, the approved\nconstraint version, and the document, reference values and field locks it\nwas approved with. The revision's draft version is archived. Accepted\nwhile the revision is a `draft` or `flagged` (changes requested); 409\n`revision_in_review` while the verifier has it, 409 `no_revision_open`\nwhen there is nothing to discard. Requires write access to the EPD's\nworkspace.",
        "operationId": "smartepd_epds_api_v2_discard_reference_revision",
        "parameters": [
          {
            "in": "path",
            "name": "epd_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Epd Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EpdDetailOut"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Discard Reference Revision",
        "tags": [
          "EPDs"
        ]
      }
    },
    "/api/v2/epds/{epd_id}/schema/": {
      "get": {
        "description": "Return the resolved input field definitions and requirements for this EPD.\n\nWalks the spec inheritance chain to return all fields (with types,\nrequired flags, options, and constraints) and requirements (without\nchecks) that apply to this EPD.\n\nQuery params:\n    view: ``\"full\"`` (default) returns the verbose internal shape used\n        by the resolver — every field, every inheritance flag, every\n        legacy/normalized dual. ``\"summary\"`` returns a slim,\n        integrator-friendly shape suitable for dynamic form generation.\n        See ``/concepts/epd-schema`` in the docs for the field-by-field\n        decode of both views.",
        "operationId": "smartepd_epds_api_v2_get_epd_schema",
        "parameters": [
          {
            "in": "path",
            "name": "epd_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Epd Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "view",
            "required": false,
            "schema": {
              "default": "full",
              "title": "View",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/EpdSchemaOut"
                    },
                    {
                      "$ref": "#/components/schemas/EpdSchemaSummaryOut"
                    }
                  ],
                  "title": "Response"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Get Epd Schema",
        "tags": [
          "EPDs"
        ]
      }
    },
    "/api/v2/epds/{epd_id}/submit/": {
      "post": {
        "description": "Submit a draft EPD for verification.\n\nA reference EPD whose template enforces its constraints is checked against\nits own `reference_inputs`: a missing value an applicable constraint needs\nreturns `reference_inputs_missing`; failing error-severity constraints\nreturn `constraint_failures` unless `acknowledge_constraint_failures=true`,\nwhich submits anyway and records the acknowledgement for the verifier.\n\nA variant EPD whose model (EPD tool + version, PCR spec version, template)\ndrifted from its reference's locked model is flagged on the EPD's\n`model_lock`; where the `variant_model_lock_block` flag is on, it returns\n`model_lock_drift` instead.",
        "operationId": "smartepd_epds_api_v2_submit_epd",
        "parameters": [
          {
            "in": "path",
            "name": "epd_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Epd Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "acknowledge_constraint_failures",
            "required": false,
            "schema": {
              "default": false,
              "title": "Acknowledge Constraint Failures",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EpdOut"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubmitErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Submit Epd",
        "tags": [
          "EPDs"
        ]
      }
    },
    "/api/v2/epds/{epd_id}/template/": {
      "get": {
        "description": "Get a reference EPD's current constraint version (its template).\n\nReference EPDs (``epd_type=\"reference\"``) own the constraints their\nvariants are validated against — input constraints, external input\nfields, and the enforcement flag. While a reference is a never-submitted\ndraft this is the project's shared WORKING template (``reference_epd_id``\nis `null`; ``shared_draft_count`` says how many drafts share it). Its\nfirst submission freezes its own version (``version`` 1, 2, …), which is\nwhat this returns from then on.\n\n``editable`` / ``locked_reason`` / ``locked_message`` say whether\n``PUT`` would be accepted now. ``approved`` is the version the reference's\nvariants answer to — it differs from this one while a revision is open.\n\nStandard EPDs and variants do not have a template of their own —\nthis endpoint returns 400 for them.",
        "operationId": "smartepd_epds_api_v2_get_reference_epd_template",
        "parameters": [
          {
            "in": "path",
            "name": "epd_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Epd Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateDetailSchema"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Get Reference Epd Template",
        "tags": [
          "EPDs"
        ]
      },
      "put": {
        "description": "Update the constraints and external input fields of a reference EPD's current version.\n\nAccepted only while that version is editable: a never-submitted draft\nediting the project's working template (the edit reaches every draft\nreference sharing it), a flagged reference fixing its own version, or an\nopen revision's draft. Otherwise 409 ``template_locked`` with\n``details[0].message`` naming the way forward: ``in_review`` (frozen\nuntil the verifier decides), ``start_revision`` (approved) or\n``start_republishing`` (published — not yet supported in V2).\n\n``base_updated_at`` (the ``updated_at`` of the copy the client loaded)\nmakes the save conditional: if the version was saved since — the working\ntemplate is shared by every draft reference in the project — 409\n``template_conflict``, ``details[0].message`` = its current ``updated_at``.",
        "operationId": "smartepd_epds_api_v2_save_reference_epd_template",
        "parameters": [
          {
            "in": "path",
            "name": "epd_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Epd Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateSaveDraftSchema"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateDetailSchema"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Save Reference Epd Template",
        "tags": [
          "EPDs"
        ]
      }
    },
    "/api/v2/epds/{epd_id}/template/sample-payload/": {
      "put": {
        "description": "Save the \"Test Constraints\" what-if payload on a reference EPD's current version.\n\nA scratchpad, not certified content: accepted in every status, including\na version frozen for review or approved — trying values never needs a\nrevision. It is NOT the reference's own values (those are\n``PUT /epds/{epd_id}/reference-inputs/``).",
        "operationId": "smartepd_epds_api_v2_save_reference_epd_template_sample_payload",
        "parameters": [
          {
            "in": "path",
            "name": "epd_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Epd Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateSamplePayloadSchema"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateDetailSchema"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Save Reference Epd Template Sample Payload",
        "tags": [
          "EPDs"
        ]
      }
    },
    "/api/v2/epds/{epd_id}/template/test-constraints/": {
      "post": {
        "description": "Dry-run a reference EPD's template constraints against sample inputs.\n\nUseful when configuring constraints before submitting a reference EPD:\nfeed in a candidate ``epd_field_values`` / ``external_payload`` pair\nand see which constraints would pass or fail.\n\nWith ``include_report: true`` the response also carries a ``rulings`` entry\nfor **every** constraint — passes and gate-skips included — so a caller can\ntell \"this passed\" from \"this didn't apply\". Read-only either way.",
        "operationId": "smartepd_epds_api_v2_test_reference_epd_template_constraints",
        "parameters": [
          {
            "in": "path",
            "name": "epd_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Epd Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateTestConstraintsSchema"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateConstraintReportSchema"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Test Reference Epd Template Constraints",
        "tags": [
          "EPDs"
        ]
      }
    },
    "/api/v2/epds/{epd_id}/template/versions/": {
      "get": {
        "description": "List a reference EPD's own constraint versions, newest first.\n\nEvery version it has submitted: ``in_review``, ``draft`` (a flagged round\nor an open revision), ``approved`` (what its variants answer to) and\n``superseded``. Empty for a never-submitted draft, which edits the\nproject's shared working template instead.",
        "operationId": "smartepd_epds_api_v2_list_reference_epd_template_versions",
        "parameters": [
          {
            "in": "path",
            "name": "epd_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Epd Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TemplateSchema"
                  },
                  "title": "Response",
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "List Reference Epd Template Versions",
        "tags": [
          "EPDs"
        ]
      }
    },
    "/api/v2/epds/{epd_id}/validate/": {
      "post": {
        "description": "Validate EPD document against its spec requirements (pre-submit check).",
        "operationId": "smartepd_epds_api_v2_validate_epd",
        "parameters": [
          {
            "in": "path",
            "name": "epd_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Epd Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EpdValidationOut"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Validate Epd",
        "tags": [
          "EPDs"
        ]
      }
    },
    "/api/v2/epds/{epd_id}/variants/": {
      "get": {
        "description": "List variant EPDs for a reference EPD.",
        "operationId": "smartepd_epds_api_v2_list_variants",
        "parameters": [
          {
            "in": "path",
            "name": "epd_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Epd Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 25,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedVariantEpdsOut"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "List Variants",
        "tags": [
          "EPDs"
        ]
      },
      "post": {
        "description": "Create a variant EPD from an approved/published reference EPD.\n\nThe variant inherits the reference EPD's whole document (and its product\nname). `parameters` are the external inputs (`ext__` fields, without the\nprefix); `field_inputs` are OVERRIDES of unlocked document fields, keyed\nby field id (or the bound document key) — send only what this variant\nchanges. An override naming a locked field (the spec's or the reference\nauthor's) or no field of the EPD returns 400 listing the keys.",
        "operationId": "smartepd_epds_api_v2_create_variant",
        "parameters": [
          {
            "in": "path",
            "name": "epd_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Epd Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VariantCreateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VariantEpdOut"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Create Variant",
        "tags": [
          "EPDs"
        ]
      }
    },
    "/api/v2/epds/{epd_id}/variants/{variant_id}/validate/": {
      "post": {
        "description": "Validate a variant EPD's document against constraint rules.\n\nReturns constraint validation results without changing variant state.",
        "operationId": "smartepd_epds_api_v2_validate_variant",
        "parameters": [
          {
            "in": "path",
            "name": "epd_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Epd Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "variant_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Variant Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VariantValidationResultOut"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Validate Variant",
        "tags": [
          "EPDs"
        ]
      }
    },
    "/api/v2/lca-versions/{lca_version_id}/": {
      "get": {
        "description": "Get a single LCA version with its documents.",
        "operationId": "smartepd_lca_api_v2_get_lca_version",
        "parameters": [
          {
            "in": "path",
            "name": "lca_version_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Lca Version Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LCAVersionDetailOut"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Get Lca Version",
        "tags": [
          "LCA"
        ]
      }
    },
    "/api/v2/lca-versions/{lca_version_id}/document-diff/": {
      "post": {
        "description": "Compute an on-demand text diff between two documents of this LCA version.\n\nRead-only and available to any workspace reader (verifier, manufacturer,\nadmin). Both document ids are scoped to ``lca_version_id`` so a document\nfrom another version/project can't be reached by id alone (IDOR guard).",
        "operationId": "smartepd_lca_api_v2_diff_lca_documents",
        "parameters": [
          {
            "in": "path",
            "name": "lca_version_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Lca Version Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LCADocumentDiffIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response",
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Diff Lca Documents",
        "tags": [
          "LCA"
        ]
      }
    },
    "/api/v2/organizations/{org_id}/plants/": {
      "get": {
        "description": "List plants for an organization (cursor-paginated).",
        "operationId": "smartepd_organizations_api_v2_list_plants",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 25,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CursorPaginatedPlantsSchema"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "List Plants",
        "tags": [
          "Plants"
        ]
      },
      "post": {
        "description": "Create a new plant for an organization.",
        "operationId": "smartepd_organizations_api_v2_create_plant",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "title": "Org Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlantCreateSchema"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlantSchema"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Create Plant",
        "tags": [
          "Plants"
        ]
      }
    },
    "/api/v2/organizations/{org_id}/plants/{plant_id}/": {
      "get": {
        "description": "Get a single plant by ID.",
        "operationId": "smartepd_organizations_api_v2_get_plant",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "plant_id",
            "required": true,
            "schema": {
              "title": "Plant Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlantSchema"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Get Plant",
        "tags": [
          "Plants"
        ]
      },
      "patch": {
        "description": "Update a plant's fields (partial update).",
        "operationId": "smartepd_organizations_api_v2_update_plant",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "plant_id",
            "required": true,
            "schema": {
              "title": "Plant Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlantUpdateSchema"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlantSchema"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Update Plant",
        "tags": [
          "Plants"
        ]
      }
    },
    "/api/v2/organizations/{org_id}/plants/{plant_id}/archive/": {
      "post": {
        "description": "Archive a plant (soft delete).",
        "operationId": "smartepd_organizations_api_v2_archive_plant_endpoint",
        "parameters": [
          {
            "in": "path",
            "name": "org_id",
            "required": true,
            "schema": {
              "title": "Org Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "plant_id",
            "required": true,
            "schema": {
              "title": "Plant Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlantSchema"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Archive Plant Endpoint",
        "tags": [
          "Plants"
        ]
      }
    },
    "/api/v2/pccs/{pcc_id}/": {
      "get": {
        "description": "Get a single PCC by ID.",
        "operationId": "smartepd_pccs_api_v2_get_pcc",
        "parameters": [
          {
            "in": "path",
            "name": "pcc_id",
            "required": true,
            "schema": {
              "title": "Pcc Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PCCSchema"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Get Pcc",
        "tags": [
          "PCCs"
        ]
      }
    },
    "/api/v2/pccs/{pcc_id}/projects/": {
      "get": {
        "description": "List projects for a PCC (cursor-paginated).\n\n``expertise_area`` (an ExpertiseArea slug) filters to projects tagged with\nthat Area of Expertise — powers the project-list filter.",
        "operationId": "smartepd_projects_api_v2_list_projects_for_pcc",
        "parameters": [
          {
            "in": "path",
            "name": "pcc_id",
            "required": true,
            "schema": {
              "title": "Pcc Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 25,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "expertise_area",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Expertise Area"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CursorPaginatedProjectsSchema"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "List Projects For Pcc",
        "tags": [
          "Projects"
        ]
      },
      "post": {
        "description": "Create a new project under a PCC.",
        "operationId": "smartepd_projects_api_v2_create_project_for_pcc",
        "parameters": [
          {
            "in": "path",
            "name": "pcc_id",
            "required": true,
            "schema": {
              "title": "Pcc Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectCreateSchema"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectSchema"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Create Project For Pcc",
        "tags": [
          "Projects"
        ]
      }
    },
    "/api/v2/projects/{project_id}/": {
      "delete": {
        "description": "Delete a project. Only draft projects can be deleted.\n\nSMA-2565: this is a soft delete — the project is hidden from every read and\nlist endpoint but the underlying record is retained. Still returns 204 so the\ncontract is unchanged for existing callers.",
        "operationId": "smartepd_projects_api_v2_delete_project_endpoint",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Conflict"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Delete Project Endpoint",
        "tags": [
          "Projects"
        ]
      },
      "get": {
        "description": "Get a single project by ID.",
        "operationId": "smartepd_projects_api_v2_get_project",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectSchema"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Get Project",
        "tags": [
          "Projects"
        ]
      },
      "patch": {
        "description": "Update a project's fields (partial update). Only draft projects.",
        "operationId": "smartepd_projects_api_v2_update_project_endpoint",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectUpdateSchema"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectSchema"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Update Project Endpoint",
        "tags": [
          "Projects"
        ]
      }
    },
    "/api/v2/projects/{project_id}/epds/": {
      "get": {
        "description": "List EPDs for a project.",
        "operationId": "smartepd_epds_api_v2_list_epds",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 25,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedEpdsOut"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "List Epds",
        "tags": [
          "EPDs"
        ]
      },
      "post": {
        "description": "Create a new EPD in draft status.",
        "operationId": "smartepd_epds_api_v2_create_epd",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EpdCreateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EpdOut"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Create Epd",
        "tags": [
          "EPDs"
        ]
      }
    },
    "/api/v2/projects/{project_id}/lca-versions/": {
      "get": {
        "description": "List LCA versions for a project.",
        "operationId": "smartepd_lca_api_v2_list_lca_versions",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 25,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedLCAVersionsOut"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "List Lca Versions",
        "tags": [
          "LCA"
        ]
      },
      "post": {
        "description": "Create a new LCA version under a project.",
        "operationId": "smartepd_lca_api_v2_create_lca_version",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LCAVersionCreateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LCAVersionOut"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Create Lca Version",
        "tags": [
          "LCA"
        ]
      }
    },
    "/api/v2/projects/{project_id}/lca/": {
      "get": {
        "description": "Get current LCA submission status + documents. Auto-creates draft if none.",
        "operationId": "smartepd_lca_api_v2_get_project_lca",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LCASubmissionOut"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Get Project Lca",
        "tags": [
          "LCA"
        ]
      },
      "patch": {
        "description": "Update the project's current LCA version metadata (e.g. tool_url).",
        "operationId": "smartepd_lca_api_v2_update_project_lca",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LCAVersionUpdateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LCASubmissionOut"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Update Project Lca",
        "tags": [
          "LCA"
        ]
      }
    },
    "/api/v2/projects/{project_id}/lca/documents/": {
      "post": {
        "description": "Upload a document to the project's current LCA version (multipart).\n\nPass ``replaces_document_id`` to supersede an existing document: the new\nfile inherits its stage/document_type and the old one is deprecated\natomically (kept for the paper trail). Omit it to add the file alongside\nthe current documents.",
        "operationId": "smartepd_lca_api_v2_upload_project_lca_document",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "properties": {
                  "document_type": {
                    "default": "other",
                    "title": "Document Type",
                    "type": "string"
                  },
                  "file": {
                    "format": "binary",
                    "title": "File",
                    "type": "string"
                  },
                  "replaces_document_id": {
                    "anyOf": [
                      {
                        "format": "uuid",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Replaces Document Id"
                  },
                  "stage": {
                    "default": "lca_submittal",
                    "title": "Stage",
                    "type": "string"
                  }
                },
                "required": [
                  "file"
                ],
                "title": "MultiPartBodyParams",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LCADocumentOut"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Upload Project Lca Document",
        "tags": [
          "LCA"
        ]
      }
    },
    "/api/v2/projects/{project_id}/lca/documents/{document_id}/": {
      "delete": {
        "description": "Delete a document from the project's current LCA version.",
        "operationId": "smartepd_lca_api_v2_delete_project_lca_document",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "document_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Document Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Delete Project Lca Document",
        "tags": [
          "LCA"
        ]
      },
      "patch": {
        "description": "Update document metadata (e.g. document_type).",
        "operationId": "smartepd_lca_api_v2_update_project_lca_document",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "document_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Document Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LCADocumentUpdateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LCADocumentOut"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Update Project Lca Document",
        "tags": [
          "LCA"
        ]
      }
    },
    "/api/v2/projects/{project_id}/lca/documents/{document_id}/deprecate/": {
      "post": {
        "description": "Mark a document as deprecated (superseded). File is preserved for the paper trail.",
        "operationId": "smartepd_lca_api_v2_deprecate_project_lca_document",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "document_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Document Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LCADocumentOut"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Deprecate Project Lca Document",
        "tags": [
          "LCA"
        ]
      }
    },
    "/api/v2/projects/{project_id}/lca/reopen/": {
      "post": {
        "description": "Reopen a verified LCA for updates.",
        "operationId": "smartepd_lca_api_v2_reopen_project_lca",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LCASubmissionOut"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Reopen Project Lca",
        "tags": [
          "LCA"
        ]
      }
    },
    "/api/v2/projects/{project_id}/lca/submit/": {
      "post": {
        "description": "Submit the project's LCA for verification.\n\nAccepts an optional ``force_status`` in the payload which, in\nnon-production environments, jumps the LCA directly to that status\n(e.g. ``\"approved\"``). This is the non-prod shortcut for the API\nQuickstart flow.",
        "operationId": "smartepd_lca_api_v2_submit_project_lca",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/SubmitLCAIn"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LCASubmissionOut"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Submit Project Lca",
        "tags": [
          "LCA"
        ]
      }
    },
    "/api/v2/projects/{project_id}/timeline/": {
      "get": {
        "description": "Return the granular LCA + EPD lifecycle timeline for a project.\n\nRead-only and derived entirely from existing data + the pghistory event\nstore. Degrades gracefully (null dates) on legacy projects.\n\nNow a plain workspace-read endpoint: the staff-only gate from the initial\nSMA-2160 rollout has been removed, so any project member sees the timeline.\nAccess is workspace membership alone — a non-member still gets a 404 (not a\n403 that would confirm the project exists).",
        "operationId": "smartepd_projects_api_v2_get_project_timeline",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "title": "Project Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectTimelineSchema"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Get Project Timeline",
        "tags": [
          "Projects"
        ]
      }
    },
    "/api/v2/public/epds/": {
      "get": {
        "description": "List every publicly listed EPD across both SmartEPD platforms.\n\nUnauthenticated by design. One newest-first list (by date of issue) of the\npublished, unexpired EPDs from the current platform (`v2`) and the classic\nplatform (`v1`) — the same EPDs each platform's public library page shows.\nEach row carries its `platform`, a public `url`, and a `detail_url` for\nthe full record. Cursor-paginated; see `unavailable_platforms` for pages\nserved while one platform could not be read. Rate limited per client IP.",
        "operationId": "smartepd_epds_api_v2_list_public_epds",
        "parameters": [
          {
            "description": "Case-insensitive search across product name, manufacturer and declaration number. Hyphens and spaces are interchangeable.",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 200,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Case-insensitive search across product name, manufacturer and declaration number. Hyphens and spaces are interchangeable.",
              "title": "Q"
            }
          },
          {
            "description": "Only list EPDs from one platform. Omit for both.",
            "in": "query",
            "name": "platform",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "v1",
                    "v2"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only list EPDs from one platform. Omit for both.",
              "title": "Platform"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 25,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedPublicEpdsOut"
                }
              }
            },
            "description": "OK"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          }
        },
        "summary": "List Public Epds",
        "tags": [
          "EPDs"
        ]
      }
    },
    "/api/v2/public/epds/{epd_id}/view/": {
      "get": {
        "description": "Public digital view of a published EPD.\n\nUnauthenticated by design — this is the EPD-library page the printed\ncover's QR code points at. Only ``published`` EPDs resolve; drafts and\nin-review EPDs 404 exactly like unknown ids (no existence leak). Rate\nlimited per client IP.",
        "operationId": "smartepd_epds_api_v2_get_epd_public_view_endpoint",
        "parameters": [
          {
            "in": "path",
            "name": "epd_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Epd Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EpdPublicViewOut"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Too Many Requests"
          }
        },
        "summary": "Get Epd Public View Endpoint",
        "tags": [
          "EPDs"
        ]
      }
    },
    "/api/v2/specs/": {
      "get": {
        "description": "List PCR specs that can be attached to a PCC.\n\nAlways restricted to ``spec_type=pcr`` specs that have at least one\npublished ``SpecVersion`` — the only specs a PCC can actually link\nto. Other spec types (ISO standards, PCF templates, tool specs) and\nPCRs without a published revision are never returned here.\n\nNon-staff users additionally have PCC-linked specs filtered to\nworkspaces they have access to.",
        "operationId": "smartepd_specs_api_v2_specs_list_specs",
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "in": "query",
            "name": "is_root",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Is Root"
            }
          },
          {
            "in": "query",
            "name": "parent_spec_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Parent Spec Id"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 25,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CursorPaginatedSpecsSchema"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "List Specs",
        "tags": [
          "Specs"
        ]
      }
    },
    "/api/v2/tools/preapproved/": {
      "get": {
        "description": "List pre-approved tools, optionally filtered to those available to an org.\n\n``org_uuid`` is the org's external identifier and takes precedence over the\nlegacy integer ``org_id`` when provided — it is resolved to the org's pk so\ncallers that only hold the UUID (e.g. a workspace's owner org) can scope the\nlist. A malformed or unknown ``org_uuid`` yields an empty result.",
        "operationId": "smartepd_tools_api_v2_list_preapproved_tools",
        "parameters": [
          {
            "in": "query",
            "name": "org_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Org Id"
            }
          },
          {
            "in": "query",
            "name": "org_uuid",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Org Uuid"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 25,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CursorPaginatedPreapprovedToolsSchema"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "List Preapproved Tools",
        "tags": [
          "Tools"
        ]
      }
    },
    "/api/v2/tools/preapproved/{tool_id}/": {
      "get": {
        "description": "Get a single pre-approved tool by ID.",
        "operationId": "smartepd_tools_api_v2_get_preapproved_tool",
        "parameters": [
          {
            "in": "path",
            "name": "tool_id",
            "required": true,
            "schema": {
              "title": "Tool Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreapprovedToolSchema"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Get Preapproved Tool",
        "tags": [
          "Tools"
        ]
      }
    },
    "/api/v2/workspaces/": {
      "get": {
        "description": "List workspaces for the current user (cursor-paginated).\n\nWhen ``active_org_id`` is provided, scopes the list to workspaces\nvisible under that organization (its own + granted workspaces).",
        "operationId": "smartepd_workspaces_api_v2_list_workspaces",
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "active_org_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Active Org Id"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 25,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CursorPaginatedWorkspacesSchema"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "List Workspaces",
        "tags": [
          "Workspaces"
        ]
      },
      "post": {
        "description": "Create a new workspace owned by an organization with the workspace-create capability.\n\nAuthorization (SMA-2177): workspace creation is an admin action.\n\n- **Staff / superusers** create on behalf of any organization and must\n  supply ``primary_org_id`` explicitly (the org that will own the\n  workspace). They retain access regardless.\n- **Everyone else** does not choose the owner. The workspace is always\n  owned by the creator's own organization, resolved server-side from their\n  reporting org (falling back to their first org that admins-with-\n  ``can_create_workspaces``). Any client-supplied ``primary_org_id`` is\n  ignored — a non-staff user cannot set another org as the primary owner.\n  Outside production this requires an org-admin role on a qualifying org;\n  in production only staff/superusers can create at all.",
        "operationId": "smartepd_workspaces_api_v2_create_workspace",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceCreateSchema"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceSchema"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Create Workspace",
        "tags": [
          "Workspaces"
        ]
      }
    },
    "/api/v2/workspaces/{workspace_id}/": {
      "delete": {
        "description": "Delete a workspace (hard delete — cascades to projects and EPDs).\n\nAdmin action (SMA-2177): staff anywhere; primary-org admins outside\nproduction. Not gated on workspace-level roles.",
        "operationId": "smartepd_workspaces_api_v2_delete_workspace",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Delete Workspace",
        "tags": [
          "Workspaces"
        ]
      },
      "get": {
        "description": "Get workspace details.",
        "operationId": "smartepd_workspaces_api_v2_get_workspace",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceSchema"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Get Workspace",
        "tags": [
          "Workspaces"
        ]
      },
      "patch": {
        "description": "Update workspace name and/or description.\n\nAdmin action (SMA-2177): staff anywhere; primary-org admins outside\nproduction. Not gated on workspace-level roles.",
        "operationId": "smartepd_workspaces_api_v2_update_workspace",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceUpdateSchema"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceSchema"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Update Workspace",
        "tags": [
          "Workspaces"
        ]
      }
    },
    "/api/v2/workspaces/{workspace_id}/pccs/": {
      "get": {
        "description": "List PCCs for a workspace (cursor-paginated).",
        "operationId": "smartepd_pccs_api_v2_list_pccs",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 25,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CursorPaginatedPCCsSchema"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "List Pccs",
        "tags": [
          "PCCs"
        ]
      },
      "post": {
        "description": "Create a new PCC in a workspace.\n\nAdmin action (SMA-2177): staff anywhere; primary-org admins outside\nproduction. Not gated on workspace-level roles.",
        "operationId": "smartepd_pccs_api_v2_create_pcc",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "title": "Workspace Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PCCCreateSchema"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PCCSchema"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "JWTAuth": []
          }
        ],
        "summary": "Create Pcc",
        "tags": [
          "PCCs"
        ]
      }
    }
  },
  "servers": []
}