{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/selah-fyi/json-schema/selah-fyi-quote-result-schema.json",
  "title": "QuoteResult",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/selah-fyi-openapi.json#/components/schemas/QuoteResult",
  "type": "object",
  "required": [
    "brand_name",
    "line_items",
    "addons",
    "total",
    "currency",
    "bullet_points",
    "quota"
  ],
  "properties": {
    "brand_name": {
      "type": "string"
    },
    "line_items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LineItem"
      }
    },
    "addons": {
      "$ref": "#/$defs/AddonsConfig"
    },
    "total": {
      "type": "number"
    },
    "currency": {
      "type": "string"
    },
    "bullet_points": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "quota": {
      "$ref": "#/$defs/QuotaStatus"
    },
    "detected_brand_region": {
      "type": [
        "string",
        "null"
      ]
    },
    "detected_deal_currency": {
      "type": [
        "string",
        "null"
      ]
    },
    "pricing_notes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "auto_switched_currency": {
      "type": "boolean"
    },
    "at_deal_limit": {
      "type": "boolean"
    },
    "brand_initial_offer": {
      "type": [
        "number",
        "null"
      ]
    }
  },
  "$defs": {
    "AddonsConfig": {
      "type": "object",
      "description": "Add-on fees beyond base deliverables"
    },
    "LineItem": {
      "type": "object",
      "required": [
        "id",
        "deliverable_type",
        "label",
        "unit_label",
        "quantity",
        "rate",
        "subtotal"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "deliverable_type": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "unit_label": {
          "type": "string"
        },
        "quantity": {
          "type": "number"
        },
        "rate": {
          "type": "number"
        },
        "subtotal": {
          "type": "number"
        },
        "is_estimated": {
          "type": "boolean"
        }
      }
    },
    "QuotaStatus": {
      "type": "object",
      "required": [
        "allowed",
        "used",
        "limit",
        "remaining",
        "isPro",
        "tier"
      ],
      "properties": {
        "allowed": {
          "type": "boolean"
        },
        "used": {
          "type": "number"
        },
        "limit": {
          "type": "number"
        },
        "remaining": {
          "type": "number"
        },
        "isPro": {
          "type": "boolean"
        },
        "isLastFree": {
          "type": "boolean"
        },
        "tier": {
          "type": "string",
          "enum": [
            "free",
            "pro",
            "founding"
          ]
        },
        "dealLimit": {
          "type": "number"
        },
        "trialDaysLeft": {
          "type": [
            "number",
            "null"
          ]
        }
      }
    }
  }
}