{
  "components": {
    "schemas": {
      "ApiKeyCreate": {
        "description": "Request body for ``POST /auth/api-keys``.",
        "properties": {
          "name": {
            "description": "Human label, e.g. 'My laptop' or 'Claude Desktop — work'.",
            "maxLength": 100,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "ApiKeyCreate",
        "type": "object"
      },
      "ApiKeyCreatedResponse": {
        "description": "Returned only on POST — includes the plaintext key once.\n\nClients MUST store the ``full_key`` value at this moment; the server cannot\nrecover it after this response (only the HMAC hash is persisted).",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "full_key": {
            "description": "The full API key. Shown once. Cannot be recovered.",
            "title": "Full Key",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "last_four": {
            "title": "Last Four",
            "type": "string"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "prefix": {
            "title": "Prefix",
            "type": "string"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "last_four",
          "created_at",
          "full_key"
        ],
        "title": "ApiKeyCreatedResponse",
        "type": "object"
      },
      "ApiKeyResponse": {
        "description": "Safe-to-return shape — never includes the plaintext or the hash.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "last_four": {
            "title": "Last Four",
            "type": "string"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "prefix": {
            "title": "Prefix",
            "type": "string"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "last_four",
          "created_at"
        ],
        "title": "ApiKeyResponse",
        "type": "object"
      },
      "AppliedDateRange": {
        "properties": {
          "field": {
            "enum": [
              "created",
              "sent",
              "signed"
            ],
            "title": "Field",
            "type": "string"
          },
          "from": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "From"
          },
          "to": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "To"
          }
        },
        "required": [
          "field"
        ],
        "title": "AppliedDateRange",
        "type": "object"
      },
      "ColorPaletteResponse": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "hex_code": {
            "maxLength": 7,
            "minLength": 7,
            "title": "Hex Code",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "is_active": {
            "default": true,
            "title": "Is Active",
            "type": "boolean"
          },
          "is_wood_like": {
            "default": false,
            "title": "Is Wood Like",
            "type": "boolean"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "name_en": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name En"
          },
          "name_he": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Name He",
            "type": "string"
          },
          "name_i18n": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name I18N"
          },
          "sort_order": {
            "default": 0,
            "title": "Sort Order",
            "type": "integer"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "required": [
          "name_he",
          "hex_code",
          "id",
          "created_at"
        ],
        "title": "ColorPaletteResponse",
        "type": "object"
      },
      "CustomerContactResponse": {
        "properties": {
          "contact_type": {
            "title": "Contact Type",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "customer_id": {
            "title": "Customer Id",
            "type": "integer"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "is_primary": {
            "title": "Is Primary",
            "type": "boolean"
          },
          "mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mobile"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "role_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role Title"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "required": [
          "id",
          "customer_id",
          "contact_type",
          "name",
          "is_primary",
          "created_at"
        ],
        "title": "CustomerContactResponse",
        "type": "object"
      },
      "CustomerCreate": {
        "properties": {
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address"
          },
          "building_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Building Code"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "company_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Id"
          },
          "crane_contact": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Crane Contact"
          },
          "document_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mobile"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Id"
          },
          "work_contact": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Contact"
          }
        },
        "required": [
          "name"
        ],
        "title": "CustomerCreate",
        "type": "object"
      },
      "CustomerListItem": {
        "description": "A `GET /customers/` row: the customer plus its creator's live display name\n(`Customer.user_id`; None when that user no longer exists).",
        "properties": {
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address"
          },
          "building_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Building Code"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "company_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Id"
          },
          "crane_contact": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Crane Contact"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "creator_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Creator Name"
          },
          "document_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mobile"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "portal_access_count": {
            "default": 0,
            "title": "Portal Access Count",
            "type": "integer"
          },
          "portal_enabled": {
            "default": false,
            "title": "Portal Enabled",
            "type": "boolean"
          },
          "portal_last_accessed": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Portal Last Accessed"
          },
          "portal_token_expires": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Portal Token Expires"
          },
          "tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Id"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "work_contact": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Contact"
          }
        },
        "required": [
          "name",
          "id",
          "created_at",
          "updated_at"
        ],
        "title": "CustomerListItem",
        "type": "object"
      },
      "CustomerResponse": {
        "properties": {
          "address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address"
          },
          "building_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Building Code"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "company_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Id"
          },
          "crane_contact": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Crane Contact"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "document_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mobile"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "portal_access_count": {
            "default": 0,
            "title": "Portal Access Count",
            "type": "integer"
          },
          "portal_enabled": {
            "default": false,
            "title": "Portal Enabled",
            "type": "boolean"
          },
          "portal_last_accessed": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Portal Last Accessed"
          },
          "portal_token_expires": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Portal Token Expires"
          },
          "tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Id"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "work_contact": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Contact"
          }
        },
        "required": [
          "name",
          "id",
          "created_at",
          "updated_at"
        ],
        "title": "CustomerResponse",
        "type": "object"
      },
      "DrawingSaveRequest": {
        "properties": {
          "expected_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Version"
          },
          "konva_json": {
            "additionalProperties": true,
            "title": "Konva Json",
            "type": "object"
          }
        },
        "required": [
          "konva_json"
        ],
        "title": "DrawingSaveRequest",
        "type": "object"
      },
      "DrawingSaveResponse": {
        "properties": {
          "explore_edits_remaining": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Explore Edits Remaining"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "version"
        ],
        "title": "DrawingSaveResponse",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "OrderBOQResponseDoc": {
        "additionalProperties": true,
        "description": "OpenAPI documentation of GET /order-boq — the served layer keys only.\n\nThe handler returns a hand-built dict with many more keys (profiles,\nunit_items, roofing_panels, summary, overlays). This model is attached via\n``responses=`` so the contract is published WITHOUT response validation,\nwhich would strip every undeclared key the existing clients rely on.",
        "properties": {
          "original_rows": {
            "items": {
              "$ref": "#/components/schemas/OriginalBOQRow"
            },
            "title": "Original Rows",
            "type": "array"
          },
          "original_totals": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OriginalBOQTotals"
              },
              {
                "type": "null"
              }
            ]
          },
          "override_rows": {
            "items": {
              "$ref": "#/components/schemas/OverrideBOQRow"
            },
            "title": "Override Rows",
            "type": "array"
          },
          "override_totals": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OverrideBOQTotals"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "title": "OrderBOQResponseDoc",
        "type": "object"
      },
      "OriginalBOQGroupTotal": {
        "description": "Subtotal of one group, in display order. Only groups with rows appear.",
        "properties": {
          "categories": {
            "items": {
              "type": "string"
            },
            "title": "Categories",
            "type": "array"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "total_cost": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Total Cost"
          },
          "total_weight_kg": {
            "title": "Total Weight Kg",
            "type": "number"
          }
        },
        "required": [
          "key",
          "categories",
          "total_weight_kg",
          "total_cost"
        ],
        "title": "OriginalBOQGroupTotal",
        "type": "object"
      },
      "OriginalBOQRow": {
        "description": "One row of the read-only Original BOQ layer.",
        "properties": {
          "bar_length_mm": {
            "title": "Bar Length Mm",
            "type": "number"
          },
          "category": {
            "title": "Category",
            "type": "string"
          },
          "color_hex": {
            "title": "Color Hex",
            "type": "string"
          },
          "color_hex_secondary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color Hex Secondary"
          },
          "color_name": {
            "title": "Color Name",
            "type": "string"
          },
          "cross_section": {
            "title": "Cross Section",
            "type": "string"
          },
          "group": {
            "title": "Group",
            "type": "string"
          },
          "height_cm": {
            "title": "Height Cm",
            "type": "number"
          },
          "is_actual_length_item": {
            "title": "Is Actual Length Item",
            "type": "boolean"
          },
          "is_angle_profile": {
            "title": "Is Angle Profile",
            "type": "boolean"
          },
          "is_cladding_u_profile": {
            "title": "Is Cladding U Profile",
            "type": "boolean"
          },
          "is_roofing_panel": {
            "title": "Is Roofing Panel",
            "type": "boolean"
          },
          "is_unit_item": {
            "title": "Is Unit Item",
            "type": "boolean"
          },
          "item_type": {
            "title": "Item Type",
            "type": "string"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "net_area_m2": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Net Area M2"
          },
          "notes": {
            "title": "Notes",
            "type": "string"
          },
          "panel_length_m": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Panel Length M"
          },
          "pricing_method": {
            "enum": [
              "kg",
              "unit",
              "sqm",
              "m"
            ],
            "title": "Pricing Method",
            "type": "string"
          },
          "profile_code": {
            "title": "Profile Code",
            "type": "string"
          },
          "profile_label": {
            "title": "Profile Label",
            "type": "string"
          },
          "purchased_cm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Purchased Cm"
          },
          "quantity": {
            "title": "Quantity",
            "type": "number"
          },
          "roofing_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Roofing Type"
          },
          "roofing_width_m": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Roofing Width M"
          },
          "sort_order": {
            "title": "Sort Order",
            "type": "number"
          },
          "spare_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Spare Pct"
          },
          "total_area_m2": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Area M2"
          },
          "total_cost": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Total Cost"
          },
          "total_weight_kg": {
            "title": "Total Weight Kg",
            "type": "number"
          },
          "unit_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Unit Price"
          },
          "used_cm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Used Cm"
          },
          "waste_kg": {
            "title": "Waste Kg",
            "type": "number"
          },
          "waste_pct": {
            "title": "Waste Pct",
            "type": "number"
          },
          "weight_per_meter_kg": {
            "title": "Weight Per Meter Kg",
            "type": "number"
          },
          "weight_per_unit_kg": {
            "title": "Weight Per Unit Kg",
            "type": "number"
          },
          "width_cm": {
            "title": "Width Cm",
            "type": "number"
          }
        },
        "required": [
          "key",
          "category",
          "group",
          "sort_order",
          "item_type",
          "profile_code",
          "profile_label",
          "cross_section",
          "width_cm",
          "height_cm",
          "color_name",
          "color_hex",
          "bar_length_mm",
          "quantity",
          "weight_per_meter_kg",
          "weight_per_unit_kg",
          "total_weight_kg",
          "waste_kg",
          "waste_pct",
          "pricing_method",
          "unit_price",
          "total_cost",
          "notes",
          "is_unit_item",
          "is_roofing_panel",
          "is_angle_profile",
          "is_actual_length_item",
          "is_cladding_u_profile"
        ],
        "title": "OriginalBOQRow",
        "type": "object"
      },
      "OriginalBOQTotals": {
        "properties": {
          "groups": {
            "items": {
              "$ref": "#/components/schemas/OriginalBOQGroupTotal"
            },
            "title": "Groups",
            "type": "array"
          },
          "purchased_cm": {
            "title": "Purchased Cm",
            "type": "number"
          },
          "row_count": {
            "title": "Row Count",
            "type": "integer"
          },
          "total_cost": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Total Cost"
          },
          "total_waste_kg": {
            "title": "Total Waste Kg",
            "type": "number"
          },
          "total_weight_kg": {
            "title": "Total Weight Kg",
            "type": "number"
          },
          "used_cm": {
            "title": "Used Cm",
            "type": "number"
          }
        },
        "required": [
          "row_count",
          "total_weight_kg",
          "total_waste_kg",
          "used_cm",
          "purchased_cm",
          "total_cost"
        ],
        "title": "OriginalBOQTotals",
        "type": "object"
      },
      "OverrideBOQCostImpact": {
        "description": "The changes panel's \"effect on total\": Original total → Override total.\nHidden rows count on neither side. Money — the whole block is stripped\nwithout QUOTE_COSTS.",
        "properties": {
          "after": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "After"
          },
          "before": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Before"
          },
          "delta": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Delta"
          }
        },
        "required": [
          "before",
          "after",
          "delta"
        ],
        "title": "OverrideBOQCostImpact",
        "type": "object"
      },
      "OverrideBOQRow": {
        "description": "One row of the editable Override sheet.",
        "properties": {
          "auto_length_mm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auto Length Mm"
          },
          "auto_quantity": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auto Quantity"
          },
          "bar_length_mm": {
            "title": "Bar Length Mm",
            "type": "number"
          },
          "boq_item_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Boq Item Id"
          },
          "category": {
            "title": "Category",
            "type": "string"
          },
          "color_hex": {
            "title": "Color Hex",
            "type": "string"
          },
          "color_hex_secondary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color Hex Secondary"
          },
          "color_name": {
            "title": "Color Name",
            "type": "string"
          },
          "cross_section": {
            "title": "Cross Section",
            "type": "string"
          },
          "display_height_cm": {
            "title": "Display Height Cm",
            "type": "number"
          },
          "display_item_type": {
            "title": "Display Item Type",
            "type": "string"
          },
          "display_width_cm": {
            "title": "Display Width Cm",
            "type": "number"
          },
          "group": {
            "title": "Group",
            "type": "string"
          },
          "height_cm": {
            "title": "Height Cm",
            "type": "number"
          },
          "is_actual_length_item": {
            "title": "Is Actual Length Item",
            "type": "boolean"
          },
          "is_angle_profile": {
            "title": "Is Angle Profile",
            "type": "boolean"
          },
          "is_cladding_u_profile": {
            "title": "Is Cladding U Profile",
            "type": "boolean"
          },
          "is_excluded": {
            "title": "Is Excluded",
            "type": "boolean"
          },
          "is_manual": {
            "title": "Is Manual",
            "type": "boolean"
          },
          "is_overridden": {
            "title": "Is Overridden",
            "type": "boolean"
          },
          "is_roofing_panel": {
            "title": "Is Roofing Panel",
            "type": "boolean"
          },
          "is_unit_item": {
            "title": "Is Unit Item",
            "type": "boolean"
          },
          "item_type": {
            "title": "Item Type",
            "type": "string"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "net_area_m2": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Net Area M2"
          },
          "notes": {
            "title": "Notes",
            "type": "string"
          },
          "override_fields": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Override Fields"
          },
          "panel_length_m": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Panel Length M"
          },
          "pricing_method": {
            "enum": [
              "kg",
              "unit",
              "sqm",
              "m"
            ],
            "title": "Pricing Method",
            "type": "string"
          },
          "profile_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Profile Code"
          },
          "profile_label": {
            "title": "Profile Label",
            "type": "string"
          },
          "purchased_cm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Purchased Cm"
          },
          "quantity": {
            "title": "Quantity",
            "type": "number"
          },
          "roofing_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Roofing Type"
          },
          "roofing_width_m": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Roofing Width M"
          },
          "sort_order": {
            "title": "Sort Order",
            "type": "number"
          },
          "spare_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Spare Pct"
          },
          "total_area_m2": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Area M2"
          },
          "total_cost": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Total Cost"
          },
          "total_weight_kg": {
            "title": "Total Weight Kg",
            "type": "number"
          },
          "unit_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Unit Price"
          },
          "used_cm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Used Cm"
          },
          "waste_kg": {
            "title": "Waste Kg",
            "type": "number"
          },
          "waste_pct": {
            "title": "Waste Pct",
            "type": "number"
          },
          "weight_per_meter_kg": {
            "title": "Weight Per Meter Kg",
            "type": "number"
          },
          "weight_per_unit_kg": {
            "title": "Weight Per Unit Kg",
            "type": "number"
          },
          "width_cm": {
            "title": "Width Cm",
            "type": "number"
          }
        },
        "required": [
          "key",
          "category",
          "group",
          "sort_order",
          "item_type",
          "display_item_type",
          "display_width_cm",
          "display_height_cm",
          "profile_label",
          "cross_section",
          "width_cm",
          "height_cm",
          "color_name",
          "color_hex",
          "bar_length_mm",
          "quantity",
          "weight_per_meter_kg",
          "weight_per_unit_kg",
          "total_weight_kg",
          "waste_kg",
          "waste_pct",
          "pricing_method",
          "unit_price",
          "total_cost",
          "notes",
          "is_unit_item",
          "is_roofing_panel",
          "is_angle_profile",
          "is_actual_length_item",
          "is_cladding_u_profile",
          "is_manual",
          "is_overridden",
          "is_excluded"
        ],
        "title": "OverrideBOQRow",
        "type": "object"
      },
      "OverrideBOQTotals": {
        "description": "Every figure leaves hidden (excluded) rows out; ``row_count`` counts the\nrows listed, hidden ones included.",
        "properties": {
          "cost_impact": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OverrideBOQCostImpact"
              },
              {
                "type": "null"
              }
            ]
          },
          "groups": {
            "items": {
              "$ref": "#/components/schemas/OriginalBOQGroupTotal"
            },
            "title": "Groups",
            "type": "array"
          },
          "purchased_cm": {
            "title": "Purchased Cm",
            "type": "number"
          },
          "row_count": {
            "title": "Row Count",
            "type": "integer"
          },
          "total_cost": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Total Cost"
          },
          "total_waste_kg": {
            "title": "Total Waste Kg",
            "type": "number"
          },
          "total_weight_kg": {
            "title": "Total Weight Kg",
            "type": "number"
          },
          "used_cm": {
            "title": "Used Cm",
            "type": "number"
          }
        },
        "required": [
          "row_count",
          "total_weight_kg",
          "total_waste_kg",
          "used_cm",
          "purchased_cm",
          "total_cost"
        ],
        "title": "OverrideBOQTotals",
        "type": "object"
      },
      "PaginatedProjectsResponse": {
        "description": "Paginated response for projects list",
        "properties": {
          "applied_date_range": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProjectsAppliedDateRange"
              },
              {
                "type": "null"
              }
            ]
          },
          "grand_total": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Grand Total"
          },
          "has_next": {
            "title": "Has Next",
            "type": "boolean"
          },
          "has_prev": {
            "title": "Has Prev",
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ProjectListItem"
            },
            "title": "Items",
            "type": "array"
          },
          "page": {
            "title": "Page",
            "type": "integer"
          },
          "page_size": {
            "title": "Page Size",
            "type": "integer"
          },
          "status_counts": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "integer"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status Counts"
          },
          "status_totals": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status Totals"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          },
          "total_pages": {
            "title": "Total Pages",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "total_pages",
          "has_next",
          "has_prev"
        ],
        "title": "PaginatedProjectsResponse",
        "type": "object"
      },
      "PaginatedQuotesResponse": {
        "properties": {
          "applied_date_range": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AppliedDateRange"
              },
              {
                "type": "null"
              }
            ]
          },
          "grand_total": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Grand Total"
          },
          "has_next": {
            "title": "Has Next",
            "type": "boolean"
          },
          "has_prev": {
            "title": "Has Prev",
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/QuoteResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "page": {
            "title": "Page",
            "type": "integer"
          },
          "page_size": {
            "title": "Page Size",
            "type": "integer"
          },
          "status_counts": {
            "additionalProperties": {
              "type": "integer"
            },
            "default": {},
            "title": "Status Counts",
            "type": "object"
          },
          "status_totals": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status Totals"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          },
          "total_pages": {
            "title": "Total Pages",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "total_pages",
          "has_next",
          "has_prev"
        ],
        "title": "PaginatedQuotesResponse",
        "type": "object"
      },
      "ProjectCreate": {
        "properties": {
          "customer_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id"
          },
          "customer_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Name"
          },
          "new_customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomerCreate"
              },
              {
                "type": "null"
              }
            ]
          },
          "products": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ProjectProductCreate"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": [],
            "title": "Products"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "title": "ProjectCreate",
        "type": "object"
      },
      "ProjectListItem": {
        "description": "A GET /projects/ row: the project plus its quote's money (quotes are 1:1).",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "creator_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Creator Name"
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id"
          },
          "customer_name": {
            "title": "Customer Name",
            "type": "string"
          },
          "has_quote": {
            "default": false,
            "title": "Has Quote",
            "type": "boolean"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "installed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Installed At"
          },
          "is_demo_locked": {
            "default": false,
            "title": "Is Demo Locked",
            "type": "boolean"
          },
          "is_locked_for_me": {
            "default": false,
            "title": "Is Locked For Me",
            "type": "boolean"
          },
          "project_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Number"
          },
          "quote_total": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quote Total"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "thumbnail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thumbnail"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "workflow_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workflow Category"
          },
          "workflow_stage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workflow Stage"
          }
        },
        "required": [
          "title",
          "id",
          "customer_id",
          "customer_name",
          "status",
          "created_at",
          "updated_at"
        ],
        "title": "ProjectListItem",
        "type": "object"
      },
      "ProjectProductCreate": {
        "properties": {
          "label": {
            "title": "Label",
            "type": "string"
          },
          "type": {
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type",
          "label"
        ],
        "title": "ProjectProductCreate",
        "type": "object"
      },
      "ProjectProductResponse": {
        "properties": {
          "addons": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Addons"
          },
          "canvas_data": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Canvas Data"
          },
          "color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color"
          },
          "columns": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Columns"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "custom_product_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Product Id"
          },
          "division_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Division Count"
          },
          "division_profile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Division Profile"
          },
          "division_profile_custom": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Division Profile Custom"
          },
          "division_spacing": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Division Spacing"
          },
          "division_t_profile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Division T Profile"
          },
          "electric_config": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Electric Config"
          },
          "explore_edits_remaining": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Explore Edits Remaining"
          },
          "explore_edits_used": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": 0,
            "title": "Explore Edits Used"
          },
          "fan_color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fan Color"
          },
          "fan_color_secondary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fan Color Secondary"
          },
          "fence_config": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Fence Config"
          },
          "frame_joint_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Frame Joint Type"
          },
          "frame_profile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Frame Profile"
          },
          "frame_profile_custom": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Frame Profile Custom"
          },
          "frame_subtype": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Frame Subtype"
          },
          "has_drawing": {
            "default": false,
            "title": "Has Drawing",
            "type": "boolean"
          },
          "height": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Height"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "is_demo_locked": {
            "default": false,
            "title": "Is Demo Locked",
            "type": "boolean"
          },
          "is_locked_for_me": {
            "default": false,
            "title": "Is Locked For Me",
            "type": "boolean"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "lifecycle_changed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lifecycle Changed At"
          },
          "lifecycle_changed_by": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lifecycle Changed By"
          },
          "lifecycle_stage": {
            "default": "draft",
            "title": "Lifecycle Stage",
            "type": "string"
          },
          "overhang_at_run_min": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Overhang At Run Min"
          },
          "overhang_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Overhang Enabled"
          },
          "overhang_length_mm": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Overhang Length Mm"
          },
          "pergola_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pergola Model"
          },
          "pillar_profile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pillar Profile"
          },
          "polygon_data": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Polygon Data"
          },
          "project_id": {
            "title": "Project Id",
            "type": "integer"
          },
          "shade_profile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shade Profile"
          },
          "shade_profile_custom": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shade Profile Custom"
          },
          "shade_spacing": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shade Spacing"
          },
          "shading_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shading Count"
          },
          "shading_mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": "uniform",
            "title": "Shading Mode"
          },
          "shading_profile_pattern": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shading Profile Pattern"
          },
          "slope_percentage": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slope Percentage"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "suntuf_color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suntuf Color"
          },
          "thumbnail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thumbnail"
          },
          "thumbnail_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thumbnail Type"
          },
          "type": {
            "title": "Type",
            "type": "string"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "wall_flashing_config": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Wall Flashing Config"
          },
          "walls": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Walls"
          },
          "workflow_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workflow Category"
          },
          "workflow_stage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workflow Stage"
          }
        },
        "required": [
          "type",
          "label",
          "id",
          "project_id",
          "status",
          "created_at",
          "updated_at"
        ],
        "title": "ProjectProductResponse",
        "type": "object"
      },
      "ProjectResponse": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "creator_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Creator Name"
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id"
          },
          "customer_name": {
            "title": "Customer Name",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "is_demo_locked": {
            "default": false,
            "title": "Is Demo Locked",
            "type": "boolean"
          },
          "is_locked_for_me": {
            "default": false,
            "title": "Is Locked For Me",
            "type": "boolean"
          },
          "project_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Number"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "thumbnail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thumbnail"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "workflow_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workflow Category"
          },
          "workflow_stage": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workflow Stage"
          }
        },
        "required": [
          "title",
          "id",
          "customer_id",
          "customer_name",
          "status",
          "created_at",
          "updated_at"
        ],
        "title": "ProjectResponse",
        "type": "object"
      },
      "ProjectsAppliedDateRange": {
        "properties": {
          "field": {
            "enum": [
              "updated",
              "created",
              "installed"
            ],
            "title": "Field",
            "type": "string"
          },
          "from": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "From"
          },
          "to": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "To"
          }
        },
        "required": [
          "field"
        ],
        "title": "ProjectsAppliedDateRange",
        "type": "object"
      },
      "QuoteDetailResponse": {
        "properties": {
          "accepted_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Accepted At"
          },
          "agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Name"
          },
          "business_logo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Business Logo Url"
          },
          "business_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Business Name"
          },
          "business_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Business Phone"
          },
          "business_tax_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Business Tax Id"
          },
          "change_order_total": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Change Order Total"
          },
          "contract_subtotal": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Subtotal"
          },
          "contract_total": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Total"
          },
          "contract_vat_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Vat Amount"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "creator_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Creator Name"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency"
          },
          "customer_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Address"
          },
          "customer_city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer City"
          },
          "customer_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Email"
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id"
          },
          "customer_lang": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Lang"
          },
          "customer_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Name"
          },
          "customer_phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Phone"
          },
          "discount_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Amount"
          },
          "discount_mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Mode"
          },
          "discount_value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Value"
          },
          "expiry_date": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expiry Date"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "items": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/QuoteItemResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "items_auto_population_failed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Items Auto Population Failed"
          },
          "legal_terms": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Legal Terms"
          },
          "legal_terms_override": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Legal Terms Override"
          },
          "legal_terms_snapshot": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Legal Terms Snapshot"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "payment_terms": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Terms"
          },
          "payment_terms_override": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Terms Override"
          },
          "products": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/QuoteProductDetail"
            },
            "title": "Products",
            "type": "array"
          },
          "project_id": {
            "title": "Project Id",
            "type": "integer"
          },
          "project_is_locked_for_me": {
            "default": false,
            "title": "Project Is Locked For Me",
            "type": "boolean"
          },
          "project_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Title"
          },
          "quote_date": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quote Date"
          },
          "quote_number": {
            "title": "Quote Number",
            "type": "string"
          },
          "sent_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sent At"
          },
          "show_agent_name": {
            "default": false,
            "title": "Show Agent Name",
            "type": "boolean"
          },
          "signature_image_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signature Image Path"
          },
          "signed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signed At"
          },
          "signed_pdf_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signed Pdf Path"
          },
          "signer_id_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signer Id Number"
          },
          "signer_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signer Name"
          },
          "spec_product_notes": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Spec Product Notes"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "subtotal": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subtotal"
          },
          "subtotal_after_discount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subtotal After Discount"
          },
          "team_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Id"
          },
          "total": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "user_id": {
            "title": "User Id",
            "type": "integer"
          },
          "vat_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vat Amount"
          },
          "vat_rate": {
            "title": "Vat Rate",
            "type": "number"
          },
          "viewed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Viewed At"
          },
          "warranty_terms": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Warranty Terms"
          },
          "warranty_terms_override": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Warranty Terms Override"
          },
          "work_order_items": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/WorkOrderItem"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Order Items"
          },
          "work_order_items_override": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/WorkOrderItem"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Order Items Override"
          },
          "work_order_notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Order Notes"
          }
        },
        "required": [
          "id",
          "user_id",
          "project_id",
          "quote_number",
          "status",
          "vat_rate",
          "created_at"
        ],
        "title": "QuoteDetailResponse",
        "type": "object"
      },
      "QuoteItemResponse": {
        "properties": {
          "auto_quantity": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auto Quantity"
          },
          "boq_item_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Boq Item Id"
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "custom_product_preview_image": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Product Preview Image"
          },
          "custom_product_thumbnail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Custom Product Thumbnail"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "is_excluded": {
            "default": false,
            "title": "Is Excluded",
            "type": "boolean"
          },
          "is_removed_with_product": {
            "default": false,
            "title": "Is Removed With Product",
            "type": "boolean"
          },
          "item_name": {
            "title": "Item Name",
            "type": "string"
          },
          "pricing_method": {
            "default": "custom",
            "title": "Pricing Method",
            "type": "string"
          },
          "pricing_mode": {
            "title": "Pricing Mode",
            "type": "string"
          },
          "product_color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Color"
          },
          "product_frame_profile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Frame Profile"
          },
          "product_height": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Height"
          },
          "product_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Id"
          },
          "product_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Label"
          },
          "product_pergola_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Pergola Model"
          },
          "product_preview_image": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Preview Image"
          },
          "product_thumbnail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Thumbnail"
          },
          "product_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Type"
          },
          "quantity": {
            "title": "Quantity",
            "type": "number"
          },
          "quote_id": {
            "title": "Quote Id",
            "type": "integer"
          },
          "sort_order": {
            "title": "Sort Order",
            "type": "integer"
          },
          "total_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Price"
          },
          "unit_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Unit Price"
          }
        },
        "required": [
          "id",
          "quote_id",
          "item_name",
          "quantity",
          "pricing_mode",
          "sort_order"
        ],
        "title": "QuoteItemResponse",
        "type": "object"
      },
      "QuoteProductDetail": {
        "properties": {
          "color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color"
          },
          "division_profile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Division Profile"
          },
          "division_spacing": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Division Spacing"
          },
          "frame_profile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Frame Profile"
          },
          "height": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Height"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "pergola_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pergola Model"
          },
          "pillar_profile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pillar Profile"
          },
          "product_shots": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Shots"
          },
          "shade_profile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shade Profile"
          },
          "shade_spacing": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shade Spacing"
          },
          "thumbnail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thumbnail"
          },
          "type": {
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "label",
          "type"
        ],
        "title": "QuoteProductDetail",
        "type": "object"
      },
      "QuoteResponse": {
        "properties": {
          "accepted_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Accepted At"
          },
          "agent_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Name"
          },
          "change_order_total": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Change Order Total"
          },
          "contract_subtotal": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Subtotal"
          },
          "contract_total": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Total"
          },
          "contract_vat_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Vat Amount"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "creator_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Creator Name"
          },
          "customer_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Address"
          },
          "customer_lang": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Lang"
          },
          "customer_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Name"
          },
          "discount_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Amount"
          },
          "discount_mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Mode"
          },
          "discount_value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Value"
          },
          "expiry_date": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expiry Date"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "items_auto_population_failed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Items Auto Population Failed"
          },
          "legal_terms": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Legal Terms"
          },
          "legal_terms_override": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Legal Terms Override"
          },
          "legal_terms_snapshot": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Legal Terms Snapshot"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          },
          "payment_terms": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Terms"
          },
          "payment_terms_override": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Terms Override"
          },
          "project_id": {
            "title": "Project Id",
            "type": "integer"
          },
          "project_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Title"
          },
          "quote_date": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quote Date"
          },
          "quote_number": {
            "title": "Quote Number",
            "type": "string"
          },
          "sent_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sent At"
          },
          "show_agent_name": {
            "default": false,
            "title": "Show Agent Name",
            "type": "boolean"
          },
          "signature_image_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signature Image Path"
          },
          "signed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signed At"
          },
          "signed_pdf_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signed Pdf Path"
          },
          "signer_id_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signer Id Number"
          },
          "signer_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signer Name"
          },
          "spec_product_notes": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Spec Product Notes"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "subtotal": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subtotal"
          },
          "subtotal_after_discount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subtotal After Discount"
          },
          "team_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Team Id"
          },
          "total": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "user_id": {
            "title": "User Id",
            "type": "integer"
          },
          "vat_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vat Amount"
          },
          "vat_rate": {
            "title": "Vat Rate",
            "type": "number"
          },
          "viewed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Viewed At"
          },
          "warranty_terms": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Warranty Terms"
          },
          "warranty_terms_override": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Warranty Terms Override"
          },
          "work_order_items": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/WorkOrderItem"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Order Items"
          },
          "work_order_items_override": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/WorkOrderItem"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Order Items Override"
          },
          "work_order_notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Order Notes"
          }
        },
        "required": [
          "id",
          "user_id",
          "project_id",
          "quote_number",
          "status",
          "vat_rate",
          "created_at"
        ],
        "title": "QuoteResponse",
        "type": "object"
      },
      "ShapeDescriptionRequest": {
        "properties": {
          "description": {
            "maxLength": 500,
            "title": "Description",
            "type": "string"
          }
        },
        "required": [
          "description"
        ],
        "title": "ShapeDescriptionRequest",
        "type": "object"
      },
      "ShapeDimensions": {
        "properties": {
          "A": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "A"
          },
          "B": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "B"
          },
          "C": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "C"
          },
          "D": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "D"
          },
          "E": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "E"
          },
          "F": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "F"
          }
        },
        "title": "ShapeDimensions",
        "type": "object"
      },
      "ShapeParseResponse": {
        "properties": {
          "dimensions": {
            "$ref": "#/components/schemas/ShapeDimensions"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "shape_type": {
            "title": "Shape Type",
            "type": "string"
          }
        },
        "required": [
          "shape_type",
          "dimensions",
          "label"
        ],
        "title": "ShapeParseResponse",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      },
      "WorkOrderItem": {
        "properties": {
          "key": {
            "title": "Key",
            "type": "string"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "state": {
            "default": "hide",
            "enum": [
              "include",
              "exclude",
              "hide"
            ],
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "key",
          "label"
        ],
        "title": "WorkOrderItem",
        "type": "object"
      }
    },
    "securitySchemes": {
      "AluFlowApiKey": {
        "bearerFormat": "aluflow_live_<64 hex chars>",
        "description": "Long-lived API key, sent as `Authorization: Bearer aluflow_live_...`.\n\nA key carries the FULL identity of the user who created it and is subject to that user's team permissions — see `x-required-permissions` on each operation, and /.well-known/oauth-protected-resource for the whole permission vocabulary.\n\nRate limit: 600 requests/minute per key. A 429 carries `Retry-After`.",
        "scheme": "bearer",
        "type": "http"
      },
      "AluFlowSessionJwt": {
        "bearerFormat": "JWT",
        "description": "First-party short-lived session token from POST /auth/login. Third-party automation should use AluFlowApiKey instead.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "externalDocs": {
    "description": "Authentication, rate limits, permission vocabulary",
    "url": "https://aluflow.co.il/docs"
  },
  "info": {
    "contact": {
      "email": "info@aluflow.co.il",
      "name": "AluFlow",
      "url": "https://aluflow.co.il/docs"
    },
    "description": "The subset of the AluFlow API intended for third-party automation and AI agents. Authenticate with an `aluflow_live_*` API key.\n\nThis is a CURATED subset — the full internal surface is not published. Endpoints listed here are contract-stable; anything not listed may change without notice.\n\nDocs: https://aluflow.co.il/docs",
    "license": {
      "identifier": "LicenseRef-AluFlow",
      "name": "Proprietary"
    },
    "summary": "Programmatic access to AluFlow projects, drawings, BOQ and quotes.",
    "termsOfService": "https://aluflow.co.il/terms",
    "title": "AluFlow API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/auth/api-keys": {
      "get": {
        "description": "List the current user's API keys (no plaintext, no hash).",
        "operationId": "list_api_keys_auth_api_keys_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ApiKeyResponse"
                  },
                  "title": "Response List Api Keys Auth Api Keys Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission."
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "List Api Keys",
        "tags": [
          "api-keys"
        ]
      },
      "post": {
        "description": "Create a new API key for the current user. Plaintext returned once.",
        "operationId": "create_api_key_auth_api_keys_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyCreatedResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Create Api Key",
        "tags": [
          "api-keys"
        ]
      }
    },
    "/auth/api-keys/{key_id}": {
      "delete": {
        "description": "Revoke an API key. Idempotent — revoking an already-revoked key is a no-op.",
        "operationId": "revoke_api_key_auth_api_keys__key_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "key_id",
            "required": true,
            "schema": {
              "title": "Key Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Revoke Api Key",
        "tags": [
          "api-keys"
        ]
      }
    },
    "/auth/me": {
      "get": {
        "description": "Get current user profile with team context",
        "operationId": "get_me_auth_me_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission."
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Get Me",
        "tags": [
          "auth"
        ]
      }
    },
    "/colors": {
      "get": {
        "description": "Return all active colors sorted by sort_order. No authentication required.",
        "operationId": "get_color_palette_colors_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ColorPaletteResponse"
                  },
                  "title": "Response Get Color Palette Colors Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission."
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Get Color Palette",
        "tags": [
          "colors"
        ]
      }
    },
    "/customers/": {
      "get": {
        "description": "Get all customers (team-aware visibility), a bare array ordered by name.\n\nOpt-in list filters (the shared list contract): ``date_field`` created (default)\n| last_project (the latest visible project's created_at; customers without one\ndrop out while a date bound is set), ``date_preset`` or ``date_from``/``date_to``\n(inclusive Israel-local days), ``min_total``/``max_total`` on accepted revenue\nincl. VAT (a customer with none drops out while a bound is set), ``member_id``\n(creator; owner or TEAM_VIEW_ALL_PROJECTS), ``sort_by`` name (default) | date | total | member +\n``sort_dir`` (omitted: asc for name, desc otherwise; missing values last, then\nid). Amount params / amount sort 403 ``quote_amounts_hidden`` without\nQUOTE_COSTS. Search stays on the client.",
        "operationId": "get_customers_customers__get",
        "parameters": [
          {
            "in": "query",
            "name": "member_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "integer"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Member Id"
            }
          },
          {
            "in": "query",
            "name": "date_field",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "created",
                    "last_project"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date Field"
            }
          },
          {
            "in": "query",
            "name": "date_preset",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "last_7_days",
                    "last_14_days",
                    "last_30_days",
                    "this_week",
                    "last_week",
                    "this_month",
                    "last_month",
                    "this_quarter",
                    "last_quarter",
                    "this_year",
                    "last_year"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date Preset"
            }
          },
          {
            "in": "query",
            "name": "date_from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date From"
            }
          },
          {
            "in": "query",
            "name": "date_to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date To"
            }
          },
          {
            "in": "query",
            "name": "min_total",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 1000000000000,
                  "minimum": 0,
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Min Total"
            }
          },
          {
            "in": "query",
            "name": "max_total",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 1000000000000,
                  "minimum": 0,
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Max Total"
            }
          },
          {
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "date",
                    "total",
                    "member",
                    "name"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Sort By"
            }
          },
          {
            "in": "query",
            "name": "sort_dir",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "asc",
                    "desc"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Sort Dir"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/CustomerListItem"
                  },
                  "title": "Response Get Customers Customers  Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (CUSTOMER_VIEW)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Get Customers",
        "tags": [
          "customers"
        ],
        "x-required-permissions": [
          "CUSTOMER_VIEW"
        ]
      },
      "post": {
        "description": "Create a new customer (team-aware)",
        "operationId": "create_customer_customers__post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (CUSTOMER_MANAGE)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Create Customer",
        "tags": [
          "customers"
        ],
        "x-required-permissions": [
          "CUSTOMER_MANAGE"
        ]
      }
    },
    "/customers/{customer_id}": {
      "get": {
        "description": "Get a specific customer (team-aware visibility)",
        "operationId": "get_customer_customers__customer_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "customer_id",
            "required": true,
            "schema": {
              "title": "Customer Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (CUSTOMER_VIEW)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Get Customer",
        "tags": [
          "customers"
        ],
        "x-required-permissions": [
          "CUSTOMER_VIEW"
        ]
      }
    },
    "/customers/{customer_id}/contacts": {
      "get": {
        "description": "List all contacts for a customer",
        "operationId": "list_customer_contacts_customers__customer_id__contacts_get",
        "parameters": [
          {
            "in": "path",
            "name": "customer_id",
            "required": true,
            "schema": {
              "title": "Customer Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/CustomerContactResponse"
                  },
                  "title": "Response List Customer Contacts Customers  Customer Id  Contacts Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (CUSTOMER_VIEW)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "List Customer Contacts",
        "tags": [
          "customers"
        ],
        "x-required-permissions": [
          "CUSTOMER_VIEW"
        ]
      }
    },
    "/profiles/by-type/{profile_type}": {
      "get": {
        "description": "Get all active profiles of a specific type.\n\nArgs:\n    profile_type: One of: frame-beam, division-beam, division-beam-t, shading,\n                  pillar, angle, tensioner, u-profile, spider, hardware",
        "operationId": "get_profiles_by_type_profiles_by_type__profile_type__get",
        "parameters": [
          {
            "in": "path",
            "name": "profile_type",
            "required": true,
            "schema": {
              "title": "Profile Type",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "title": "Response Get Profiles By Type Profiles By Type  Profile Type  Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Get Profiles By Type",
        "tags": [
          "profiles"
        ]
      }
    },
    "/projects/": {
      "get": {
        "description": "Get paginated projects (team-aware visibility)\n\nParameters:\n- page: Page number (default: 1, >= 1)\n- page_size: Number of items per page (default: 10, 1..100; larger is capped at 100)\n- search: Search term for project title\n- status: Filter by status (comma-separated)\n- customer_id: only this customer's projects, on top of the visibility filter (a customer the caller cannot see yields an empty page)\n- attention: \"stuck\" = the dashboard's stuck set (live status, untouched 14+ days)\n- sort_by: created_at | updated_at | title (legacy) | date | total | member; anything else 422\n- sort_dir: asc | desc; when omitted the legacy sort_order (asc | desc) applies\n- member_id: Owner / TEAM_VIEW_ALL_PROJECTS filter — return only projects owned by this member\n\nDate filter: ``date_preset`` (resolved here in Asia/Jerusalem, weeks from Sunday) or\n``date_from``/``date_to`` (inclusive Israel-local days; the preset wins) on\n``date_field`` (default ``updated`` = coalesce(updated_at, created_at); ``created``;\n``installed`` drops projects never installed). ``min_total`` / ``max_total`` bound the\nproject's quote ``total`` incl. VAT, inclusive in agorot (a project with no quote drops\nout only while a bound is set). ``include_summary=1`` fills ``status_counts`` /\n``status_totals`` / ``grand_total`` (all three null without it, so a page fetch skips the\nGROUP BY over the whole visibility set; ``applied_date_range`` is always set). They are\nkeyed by stored status, cover every filter except ``status``, and the totals are\nnull for members whose amounts are hidden (QUOTE_COSTS_NO_AMOUNTS without QUOTE_COSTS, or\nno QUOTES_VIEW) — who also get a 403 ``quote_amounts_hidden`` for any amount param or\n``sort_by=total``. Rows carry ``quote_total`` (redacted the same\nway) and ``has_quote``.",
        "operationId": "get_projects_projects__get",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "default": 10,
              "minimum": 1,
              "title": "Page Size",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "customer_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Customer Id"
            }
          },
          {
            "in": "query",
            "name": "attention",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "const": "stuck",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Attention"
            }
          },
          {
            "in": "query",
            "name": "sort_order",
            "required": false,
            "schema": {
              "default": "desc",
              "title": "Sort Order",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "include_thumbnails",
            "required": false,
            "schema": {
              "default": false,
              "title": "Include Thumbnails",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "include_summary",
            "required": false,
            "schema": {
              "default": false,
              "title": "Include Summary",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "member_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "integer"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Member Id"
            }
          },
          {
            "in": "query",
            "name": "date_field",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "updated",
                    "created",
                    "installed"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date Field"
            }
          },
          {
            "in": "query",
            "name": "date_preset",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "last_7_days",
                    "last_14_days",
                    "last_30_days",
                    "this_week",
                    "last_week",
                    "this_month",
                    "last_month",
                    "this_quarter",
                    "last_quarter",
                    "this_year",
                    "last_year"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date Preset"
            }
          },
          {
            "in": "query",
            "name": "date_from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date From"
            }
          },
          {
            "in": "query",
            "name": "date_to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date To"
            }
          },
          {
            "in": "query",
            "name": "min_total",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 1000000000000,
                  "minimum": 0,
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Min Total"
            }
          },
          {
            "in": "query",
            "name": "max_total",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 1000000000000,
                  "minimum": 0,
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Max Total"
            }
          },
          {
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "created_at",
                    "updated_at",
                    "title",
                    "date",
                    "total",
                    "member"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Sort By"
            }
          },
          {
            "in": "query",
            "name": "sort_dir",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "asc",
                    "desc"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Sort Dir"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedProjectsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (PROJECTS_VIEW)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Get Projects",
        "tags": [
          "projects"
        ],
        "x-required-permissions": [
          "PROJECTS_VIEW"
        ]
      },
      "post": {
        "description": "Create a new project with existing or new customer",
        "operationId": "create_project_projects__post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (PROJECT_CREATE)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Create Project",
        "tags": [
          "projects"
        ],
        "x-required-permissions": [
          "PROJECT_CREATE"
        ]
      }
    },
    "/projects/products/{product_id}": {
      "get": {
        "description": "Get a specific product (team-aware visibility)",
        "operationId": "get_product_projects_products__product_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "product_id",
            "required": true,
            "schema": {
              "title": "Product Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectProductResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (PROJECTS_VIEW)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Get Product",
        "tags": [
          "projects"
        ],
        "x-required-permissions": [
          "PROJECTS_VIEW"
        ]
      }
    },
    "/projects/products/{product_id}/boq": {
      "get": {
        "description": "Get the BOQ for a product with override metadata (team-aware, feature-gated).",
        "operationId": "get_product_boq_projects_products__product_id__boq_get",
        "parameters": [
          {
            "in": "path",
            "name": "product_id",
            "required": true,
            "schema": {
              "title": "Product Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (QUOTES_VIEW)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Get Product Boq",
        "tags": [
          "projects"
        ],
        "x-required-permissions": [
          "QUOTES_VIEW"
        ]
      }
    },
    "/projects/products/{product_id}/boq:generate": {
      "post": {
        "description": "Generate BOQ from the latest drawing of a product (team-aware, feature-gated)\n\nArgs:\n    product_id: Product ID\n    angle_type: Type of angle profile (\"3x2\" or \"3x3\")\n    dry_run: When true, compute BOQ + cutting plan but write nothing to the DB\n        and emit no side effects. Used by the stale-BOQ alert flow to preview\n        what regeneration would produce without committing.",
        "operationId": "generate_boq_for_product_projects_products__product_id__boq_generate_post",
        "parameters": [
          {
            "in": "path",
            "name": "product_id",
            "required": true,
            "schema": {
              "title": "Product Id",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "angle_type",
            "required": false,
            "schema": {
              "default": "3x2",
              "title": "Angle Type",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dry_run",
            "required": false,
            "schema": {
              "default": false,
              "title": "Dry Run",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (PROJECT_CREATE)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Generate Boq For Product",
        "tags": [
          "projects"
        ],
        "x-required-permissions": [
          "PROJECT_CREATE"
        ]
      }
    },
    "/projects/products/{product_id}/drawings": {
      "get": {
        "description": "Get the latest drawing for a product (team-aware)",
        "operationId": "get_product_drawing_projects_products__product_id__drawings_get",
        "parameters": [
          {
            "in": "path",
            "name": "product_id",
            "required": true,
            "schema": {
              "title": "Product Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (PROJECTS_VIEW)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Get Product Drawing",
        "tags": [
          "projects"
        ],
        "x-required-permissions": [
          "PROJECTS_VIEW"
        ]
      },
      "post": {
        "description": "Save a drawing with optimistic locking (team-aware).\n\nPROJECT_CREATE or QUOTE_DESIGN: the canvas opens for QUOTE_DESIGN members on every client.",
        "operationId": "save_product_drawing_projects_products__product_id__drawings_post",
        "parameters": [
          {
            "in": "path",
            "name": "product_id",
            "required": true,
            "schema": {
              "title": "Product Id",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DrawingSaveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DrawingSaveResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission. At least one of: PROJECT_CREATE / QUOTE_DESIGN."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Save Product Drawing",
        "tags": [
          "projects"
        ],
        "x-required-permissions-any": [
          [
            "PROJECT_CREATE",
            "QUOTE_DESIGN"
          ]
        ]
      }
    },
    "/projects/products/{product_id}/manufacturing-plan": {
      "get": {
        "description": "Get the Manufacturing Plan for a product (team-aware, feature-gated)",
        "operationId": "get_manufacturing_plan_projects_products__product_id__manufacturing_plan_get",
        "parameters": [
          {
            "in": "path",
            "name": "product_id",
            "required": true,
            "schema": {
              "title": "Product Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (PROJECTS_VIEW)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Get Manufacturing Plan",
        "tags": [
          "projects"
        ],
        "x-required-permissions": [
          "PROJECTS_VIEW"
        ]
      }
    },
    "/projects/products/{product_id}/manufacturing-plan:generate": {
      "post": {
        "description": "Generate Manufacturing Plan (Cut List) from the latest drawing of a product.\nThis is the source of truth for production cuts. (team-aware, feature-gated)\n\nArgs:\n    product_id: Product ID\n    angle_type: Type of angle profile (\"3x2\" or \"3x3\")",
        "operationId": "generate_manufacturing_plan_projects_products__product_id__manufacturing_plan_generate_post",
        "parameters": [
          {
            "in": "path",
            "name": "product_id",
            "required": true,
            "schema": {
              "title": "Product Id",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "angle_type",
            "required": false,
            "schema": {
              "default": "3x2",
              "title": "Angle Type",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (PROJECT_CREATE)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Generate Manufacturing Plan",
        "tags": [
          "projects"
        ],
        "x-required-permissions": [
          "PROJECT_CREATE"
        ]
      }
    },
    "/projects/products/{product_id}/order-boq": {
      "get": {
        "description": "Get the Order BOQ for a product with cutting optimization results (team-aware, feature-gated)",
        "operationId": "get_order_boq_projects_products__product_id__order_boq_get",
        "parameters": [
          {
            "in": "path",
            "name": "product_id",
            "required": true,
            "schema": {
              "title": "Product Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderBOQResponseDoc"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (PROJECTS_VIEW)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Get Order Boq",
        "tags": [
          "projects"
        ],
        "x-required-permissions": [
          "PROJECTS_VIEW"
        ]
      }
    },
    "/projects/products/{product_id}/order-boq:generate": {
      "post": {
        "description": "Generate Order BOQ with optimized cutting plan (team-aware, feature-gated).\nUses production-grade manufacturing service with:\n- Advanced beam splitting (>700cm) with angle inheritance\n- Strict FFD optimization (cuts must fit within stock length minus kerf)\n- SVG-ready metadata for precise diagram rendering\n- Optional offcut reuse from inventory (use_offcuts=True)\n\nNote: Will automatically generate Manufacturing Plan if it doesn't exist,\nto ensure beam names are available for display.\n\nArgs:\n    product_id: Product ID\n    angle_type: Type of angle profile (\"3x2\" or \"3x3\")\n    use_offcuts: If True, prefer existing offcuts from inventory over new stock bars",
        "operationId": "generate_order_boq_projects_products__product_id__order_boq_generate_post",
        "parameters": [
          {
            "in": "path",
            "name": "product_id",
            "required": true,
            "schema": {
              "title": "Product Id",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "angle_type",
            "required": false,
            "schema": {
              "default": "3x2",
              "title": "Angle Type",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "use_offcuts",
            "required": false,
            "schema": {
              "default": false,
              "title": "Use Offcuts",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (ORDER_CREATE)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Generate Order Boq",
        "tags": [
          "projects"
        ],
        "x-required-permissions": [
          "ORDER_CREATE"
        ]
      }
    },
    "/projects/{project_id}": {
      "get": {
        "description": "Get a specific project (team-aware visibility)",
        "operationId": "get_project_projects__project_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "title": "Project Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (PROJECTS_VIEW)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Get Project",
        "tags": [
          "projects"
        ],
        "x-required-permissions": [
          "PROJECTS_VIEW"
        ]
      }
    },
    "/projects/{project_id}/products": {
      "get": {
        "description": "Get all products for a project (team-aware visibility)",
        "operationId": "get_project_products_projects__project_id__products_get",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "title": "Project Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ProjectProductResponse"
                  },
                  "title": "Response Get Project Products Projects  Project Id  Products Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (PROJECTS_VIEW)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Get Project Products",
        "tags": [
          "projects"
        ],
        "x-required-permissions": [
          "PROJECTS_VIEW"
        ]
      },
      "post": {
        "description": "Add a product to a project (team-aware visibility)",
        "operationId": "add_project_product_projects__project_id__products_post",
        "parameters": [
          {
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "title": "Project Id",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectProductCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectProductResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (PROJECT_CREATE)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Add Project Product",
        "tags": [
          "projects"
        ],
        "x-required-permissions": [
          "PROJECT_CREATE"
        ]
      }
    },
    "/quotes/": {
      "get": {
        "description": "List quotes for current user.\nTeam owners also see all quotes belonging to their team.\nOptionally filter by project_id, member_id (owner or TEAM_VIEW_ALL_PROJECTS) or status (repeatable).\n``status_counts`` in the response counts every status the caller may see under the\nOTHER filters (visibility, member, project, search) and ignores ``status`` itself, so\na grouped list can label every group while fetching one group at a time.\n``status_totals`` / ``grand_total`` sum ``total`` (incl. VAT) over the same scope.\n\nDate filter: ``date_preset`` (resolved here in Asia/Jerusalem, weeks from Sunday)\nor ``date_from``/``date_to`` (inclusive Israel-local days; the preset wins), on\n``date_field`` (default ``created``): created = coalesce(quote_date, created_at),\nsent = coalesce(sent_at, created_at) and never a draft (only when asked for explicitly), signed =\ncoalesce(signed_at, accepted_at) and never an unsigned quote. ``min_total`` /\n``max_total`` are inclusive. ``sort_by`` date|total|member + ``sort_dir``; no\n``sort_by`` keeps the historical ``created_at desc`` (then ``id desc``). Members whose amounts are\nhidden get null totals and a 403 ``quote_amounts_hidden`` for any amount param.",
        "operationId": "list_quotes_quotes__get",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "title": "Page Size",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "member_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "integer"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Member Id"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "date_field",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "created",
                    "sent",
                    "signed"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date Field"
            }
          },
          {
            "in": "query",
            "name": "date_preset",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "last_7_days",
                    "last_14_days",
                    "last_30_days",
                    "this_week",
                    "last_week",
                    "this_month",
                    "last_month",
                    "this_quarter",
                    "last_quarter",
                    "this_year",
                    "last_year"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date Preset"
            }
          },
          {
            "in": "query",
            "name": "date_from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date From"
            }
          },
          {
            "in": "query",
            "name": "date_to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date To"
            }
          },
          {
            "in": "query",
            "name": "min_total",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 1000000000000,
                  "minimum": 0,
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Min Total"
            }
          },
          {
            "in": "query",
            "name": "max_total",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 1000000000000,
                  "minimum": 0,
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Max Total"
            }
          },
          {
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "date",
                    "total",
                    "member"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Sort By"
            }
          },
          {
            "in": "query",
            "name": "sort_dir",
            "required": false,
            "schema": {
              "default": "desc",
              "enum": [
                "asc",
                "desc"
              ],
              "title": "Sort Dir",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedQuotesResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (QUOTES_VIEW)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "List Quotes",
        "tags": [
          "quotes"
        ],
        "x-required-permissions": [
          "QUOTES_VIEW"
        ]
      }
    },
    "/quotes/{quote_id}": {
      "get": {
        "description": "Get a single quote by ID — full detail with items, products, and business info.",
        "operationId": "get_quote_quotes__quote_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "quote_id",
            "required": true,
            "schema": {
              "title": "Quote Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission (QUOTES_VIEW)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Get Quote",
        "tags": [
          "quotes"
        ],
        "x-required-permissions": [
          "QUOTES_VIEW"
        ]
      }
    },
    "/shapes/parse-description": {
      "post": {
        "description": "Parse a natural language shape description into shape type + dimensions.\nTier 1: regex (instant). Tier 2: Claude API (if ANTHROPIC_API_KEY set).",
        "operationId": "parse_shape_description_shapes_parse_description_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShapeDescriptionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShapeParseResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked credential."
          },
          "403": {
            "description": "Authenticated but lacking a required permission."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Rate limit exceeded. Back off for `Retry-After` seconds.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "AluFlowApiKey": []
          },
          {
            "AluFlowSessionJwt": []
          }
        ],
        "summary": "Parse Shape Description",
        "tags": [
          "shapes"
        ]
      }
    }
  },
  "security": [
    {
      "AluFlowApiKey": []
    }
  ],
  "servers": [
    {
      "description": "Israel (Hebrew, ILS)",
      "url": "https://aluflow.co.il/api"
    },
    {
      "description": "International (English, EUR)",
      "url": "https://aluflow.io/api"
    }
  ],
  "x-aluflow-permissions": {
    "description": "AluFlow team permission keys. These are IDENTITY permissions enforced per calling user, NOT token-narrowing OAuth scopes: an API key inherits its creator's permissions and cannot be narrower. Also published as `scopes_supported` at /.well-known/oauth-protected-resource (RFC 9728).",
    "implies": {
      "LEADS_ADMIN": [
        "LEADS_MANAGE",
        "LEADS_VIEW"
      ],
      "LEADS_MANAGE": [
        "LEADS_VIEW"
      ],
      "PAYMENTS_MANAGE": [
        "PAYMENTS_VIEW"
      ],
      "PRICING_EDIT": [
        "PRICING_VIEW"
      ],
      "SCHEDULE_MANAGE": [
        "SCHEDULE_VIEW"
      ]
    },
    "keys": [
      "ANALYTICS",
      "BUSINESS_PROFILE_EDIT",
      "CUSTOMER_MANAGE",
      "CUSTOMER_VIEW",
      "LEADS_ADMIN",
      "LEADS_MANAGE",
      "LEADS_VIEW",
      "LEGAL_TERMS_EDIT",
      "ORDER_CREATE",
      "PAYMENTS_MANAGE",
      "PAYMENTS_VIEW",
      "PDF_BOQ_NO_AMOUNTS",
      "PDF_BOQ_WITH_AMOUNTS",
      "PDF_CONTACT",
      "PDF_ENGINEERING",
      "PDF_MANUFACTURING_NAMED",
      "PDF_MANUFACTURING_VISUAL",
      "PDF_QUOTE",
      "PORTAL_USERS_MANAGE",
      "PRICE_LIST",
      "PRICING_EDIT",
      "PRICING_VIEW",
      "PRODUCT_PRODUCTION_APPROVE",
      "PROFITABILITY_REPORT",
      "PROJECTS_VIEW",
      "PROJECT_CREATE",
      "QUOTES_VIEW",
      "QUOTE_COSTS",
      "QUOTE_COSTS_NO_AMOUNTS",
      "QUOTE_DESIGN",
      "SCHEDULE_MANAGE",
      "SCHEDULE_VIEW",
      "TEAM_VIEW_ALL_ACTIVITY",
      "TEAM_VIEW_ALL_PROJECTS",
      "USER_SETTINGS",
      "WORK_ORDER_EDIT"
    ],
    "legacyAliases": {
      "PRICE_LIST": [
        "PRICING_EDIT",
        "PRICING_VIEW"
      ]
    }
  }
}
