{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/arcnm-io/json-schema/arcnm-io-folder-summary-public-schema.json",
  "title": "FolderSummaryPublic",
  "description": "Scoped rollup over a folder's whole subtree (or the entire workspace).\n\nSpend and savings are in ``currency`` — the currency every quoted part\nin scope is priced in, each figure on the basis of that part's own\ncalculated unit cost. Parts priced in different currencies have no\ncommon total: the money totals are then null and ``currencies`` names\nwhat the scope holds, rather than a sum across currencies under one\nlabel. Likewise, where one part's lot-size figures are valued at the\npurchase price after discounts and another's at the offer price (a\ncalculation made before that basis), the savings and effective-cost\ntotals are null rather than a sum across the two prices.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/arcnm-io-folders-api-openapi.yml#/components/schemas/FolderSummaryPublic",
  "properties": {
    "folder_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Folder Id",
      "description": "The folder this rollup is scoped to; null means the whole workspace."
    },
    "part_count": {
      "type": "integer",
      "title": "Part Count",
      "description": "Parts in this folder and all its subfolders.",
      "default": 0
    },
    "quoted_part_count": {
      "type": "integer",
      "title": "Quoted Part Count",
      "description": "Parts in scope that have at least one succeeded calculation.",
      "default": 0
    },
    "calculation_count": {
      "type": "integer",
      "title": "Calculation Count",
      "description": "Succeeded calculations counted in this rollup.",
      "default": 0
    },
    "total_annual_spend_eur": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Total Annual Spend Eur",
      "description": "Σ over scoped parts of (latest should-cost unit price × annual volume), in currency. Null when the scope holds more than one currency.",
      "default": 0.0
    },
    "potential_savings_eur": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Potential Savings Eur",
      "description": "Σ over scoped parts of the net annual saving of moving to the recommended (holding-aware) lot size, in currency — production plus inventory holding. Null when the scope holds more than one currency, or parts valued at the purchase price beside parts valued at the offer price (see effective_annual_cost_eur).",
      "default": 0.0
    },
    "effective_annual_cost_eur": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Effective Annual Cost Eur",
      "description": "Σ over scoped parts of the effective annual cost at the current lot — the purchase price after the supplier's discounts where a cost sheet is stated, learning over the year and inventory holding — else the production spend, in currency. The denominator of a savings percentage. Null when the scope holds more than one currency, or when a calculation made before the purchase-price basis (valued at the offer price) sits beside one valued at the purchase price: the two are never summed.",
      "default": 0.0
    },
    "currency": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Currency",
      "description": "Currency of the money totals: the one every quoted part in scope is priced in. Null when nothing in scope is quoted, or when the scope holds more than one currency (see currencies)."
    },
    "currencies": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Currencies",
      "description": "Every currency the quoted parts in scope are priced in, sorted. More than one means the money totals are null: amounts in different currencies are never summed."
    }
  },
  "type": "object"
}