{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "@context": [
    "https://schemas.meta-aiml.org/v3.0.0/context.jsonld"
  ],
  "@id": "https://schemas.meta-aiml.org/v3.0.0/components/price_format.json",
  "@type": [
    "Thing",
    "ComponentSchema"
  ],
  "schemaVersion": "3.0.0",
  "aimlVersion": "3.0.0",
  "title": "Price Format Component",
  "description": "Pricing, costs, and financial information",
  "type": "object",
  "$defs": {
    "Price": {
      "type": "object",
      "title": "Price",
      "description": "Single price with currency",
      "properties": {
        "price": {
          "type": "number",
          "minimum": 0
        },
        "priceCurrency": {
          "type": "string",
          "pattern": "^[A-Z]{3}$"
        },
        "priceValidFrom": {
          "type": "string",
          "format": "date"
        },
        "priceValidUntil": {
          "type": "string",
          "format": "date"
        }
      },
      "required": [
        "price",
        "priceCurrency"
      ]
    },
    "PriceRange": {
      "type": "object",
      "title": "Price Range",
      "description": "Price range specification",
      "properties": {
        "minPrice": {
          "type": "number",
          "minimum": 0
        },
        "maxPrice": {
          "type": "number",
          "minimum": 0
        },
        "currency": {
          "type": "string",
          "pattern": "^[A-Z]{3}$"
        },
        "label": {
          "type": "string",
          "enum": [
            "budgetFriendly",
            "moderate",
            "premium",
            "luxury"
          ]
        }
      }
    },
    "Discount": {
      "type": "object",
      "title": "Discount",
      "description": "Reusable discount definition covering type, value, validity interval, and optional coupon reference for promotional pricing scenarios.",
      "properties": {
        "name": {
          "type": "string"
        },
        "discountType": {
          "type": "string",
          "enum": [
            "percentage",
            "amount",
            "fixed_price",
            "bogo"
          ]
        },
        "discountValue": {
          "type": "number",
          "minimum": 0
        },
        "validFrom": {
          "type": "string",
          "format": "date"
        },
        "validUntil": {
          "type": "string",
          "format": "date"
        },
        "couponCode": {
          "type": "string"
        }
      }
    },
    "Subscription": {
      "type": "object",
      "title": "Subscription",
      "description": "Subscription pricing plan",
      "properties": {
        "name": {
          "type": "string"
        },
        "price": {
          "type": "number"
        },
        "priceCurrency": {
          "type": "string"
        },
        "billingPeriod": {
          "type": "string",
          "enum": [
            "monthly",
            "quarterly",
            "annual",
            "lifetime"
          ]
        },
        "features": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "cancellationPolicy": {
          "type": "string"
        },
        "autoRenewal": {
          "type": "boolean"
        }
      }
    },
    "Offer": {
      "type": "object",
      "title": "Offer",
      "description": "Product or service offer with pricing",
      "properties": {
        "name": {
          "type": "string"
        },
        "price": {
          "type": "number"
        },
        "priceCurrency": {
          "type": "string"
        },
        "availability": {
          "type": "string",
          "enum": [
            "InStock",
            "OutOfStock",
            "PreOrder",
            "OnOrder",
            "Discontinued"
          ]
        },
        "validFrom": {
          "type": "string",
          "format": "date"
        },
        "validUntil": {
          "type": "string",
          "format": "date"
        }
      }
    }
  },
  "validationMetadata": {
    "schemaVersion": "3.0.0",
    "phase": "phase_1",
    "status": "draft",
    "lastValidated": "2026-02-19",
    "validator": "META-AIML QA"
  },
  "$id": "https://schemas.meta-aiml.org/v3.0.0/components/price_format.json",
  "semanticAnnotations": {
    "componentPurpose": "price_format.json provides reusable definitions for META-AIML v3 schemas.",
    "interoperabilityNotes": "Definitions are intended for reuse through $ref across entity schemas."
  },
  "governanceMetadata": {
    "schemaVersion": "3.0.0",
    "stabilityLevel": "draft",
    "sdkValidationRules": [
      "RULE-COMP-001: $defs MUST be present and resolvable",
      "RULE-COMP-002: Component versions MUST match schemaVersion/aimlVersion"
    ]
  },
  "examples": [
    {
      "scenario": "Component usage example #1",
      "note": "Referenced by an entity schema via $ref."
    },
    {
      "scenario": "Component usage example #2",
      "note": "Demonstrates alternative valid composition."
    }
  ]
}
