{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/alert-camp/json-schema/alert-camp-subscription-screen-config-response-schema.json",
  "title": "SubscriptionScreenConfigResponse",
  "description": "v2 response for /plans endpoint — full subscription screen config.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/alert-camp-subscriptions-api-openapi.yml#/components/schemas/SubscriptionScreenConfigResponse",
  "properties": {
    "version": {
      "type": "integer",
      "title": "Version",
      "default": 1
    },
    "tiers": {
      "items": {
        "$ref": "#/$defs/TierTileConfig"
      },
      "type": "array",
      "title": "Tiers",
      "default": []
    },
    "paid_tiers": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Paid Tiers",
      "default": []
    },
    "comparison_rows": {
      "items": {
        "$ref": "#/$defs/ComparisonRowConfig"
      },
      "type": "array",
      "title": "Comparison Rows",
      "default": []
    },
    "features": {
      "items": {
        "$ref": "#/$defs/FeatureItemConfig"
      },
      "type": "array",
      "title": "Features",
      "default": []
    },
    "provider_site_overrides": {
      "additionalProperties": {
        "additionalProperties": {
          "$ref": "#/$defs/ProviderSiteOverride"
        },
        "type": "object"
      },
      "type": "object",
      "title": "Provider Site Overrides",
      "default": {}
    },
    "capacity": {
      "additionalProperties": {
        "$ref": "#/$defs/TierCapacityInfo"
      },
      "type": "object",
      "title": "Capacity",
      "default": {}
    },
    "provider_config": {
      "additionalProperties": {
        "$ref": "#/$defs/ProviderConfig"
      },
      "type": "object",
      "title": "Provider Config",
      "default": {}
    }
  },
  "type": "object",
  "$defs": {
    "ComparisonRowConfig": {
      "properties": {
        "label": {
          "type": "string",
          "title": "Label"
        },
        "values": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Values"
        },
        "type": {
          "type": "string",
          "title": "Type"
        }
      },
      "type": "object",
      "required": [
        "label",
        "values",
        "type"
      ],
      "title": "ComparisonRowConfig",
      "description": "A row in the tier comparison table."
    },
    "FeatureItemConfig": {
      "properties": {
        "icon": {
          "type": "string",
          "title": "Icon"
        },
        "title": {
          "type": "string",
          "title": "Title"
        },
        "description": {
          "type": "string",
          "title": "Description"
        }
      },
      "type": "object",
      "required": [
        "icon",
        "title",
        "description"
      ],
      "title": "FeatureItemConfig",
      "description": "A feature in the expandable feature list."
    },
    "ProviderConfig": {
      "properties": {
        "show_quota_banner": {
          "type": "boolean",
          "title": "Show Quota Banner",
          "default": true
        }
      },
      "type": "object",
      "title": "ProviderConfig",
      "description": "Provider-level configuration flags."
    },
    "ProviderSiteOverride": {
      "properties": {
        "max_sites_per_alert": {
          "type": "integer",
          "title": "Max Sites Per Alert"
        },
        "max_total_sites": {
          "type": "integer",
          "title": "Max Total Sites"
        }
      },
      "type": "object",
      "required": [
        "max_sites_per_alert",
        "max_total_sites"
      ],
      "title": "ProviderSiteOverride",
      "description": "Site limit overrides for a provider."
    },
    "TierCapacityInfo": {
      "properties": {
        "capacity": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Capacity"
        },
        "current_subscribers": {
          "type": "integer",
          "title": "Current Subscribers",
          "default": 0
        },
        "available_spots": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Available Spots"
        },
        "is_available": {
          "type": "boolean",
          "title": "Is Available",
          "default": true
        }
      },
      "type": "object",
      "title": "TierCapacityInfo",
      "description": "Capacity information for a single tier."
    },
    "TierTileConfig": {
      "properties": {
        "tier": {
          "type": "string",
          "title": "Tier"
        },
        "icon": {
          "type": "string",
          "title": "Icon"
        },
        "price_cad": {
          "type": "number",
          "title": "Price Cad"
        },
        "revenuecat_product_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Revenuecat Product Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "description": {
          "type": "string",
          "title": "Description"
        },
        "badge": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Badge"
        },
        "features": {
          "items": {
            "$ref": "#/$defs/TileFeatureRow"
          },
          "type": "array",
          "title": "Features",
          "default": []
        }
      },
      "type": "object",
      "required": [
        "tier",
        "icon",
        "price_cad",
        "name",
        "description"
      ],
      "title": "TierTileConfig",
      "description": "Configuration for a single tier tile on the subscription screen."
    },
    "TileFeatureRow": {
      "properties": {
        "icon": {
          "type": "string",
          "title": "Icon"
        },
        "text": {
          "type": "string",
          "title": "Text"
        },
        "highlight": {
          "type": "boolean",
          "title": "Highlight",
          "default": false
        },
        "highlight_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Highlight Color"
        }
      },
      "type": "object",
      "required": [
        "icon",
        "text"
      ],
      "title": "TileFeatureRow",
      "description": "Feature row within a tier tile card."
    }
  }
}