{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://weverlabs.com/schemas/enterprise-controls.schema.json",
  "title": "Enterprise Controls",
  "type": "object",
  "required": [
    "schema_version",
    "mode"
  ],
  "properties": {
    "schema_version": {
      "type": "string"
    },
    "mode": {
      "type": "string",
      "enum": [
        "read_enterprise_controls",
        "create_enterprise_account",
        "quote_enterprise_controls_fee",
        "create_enterprise_controls_plan",
        "record_enterprise_usage_summary",
        "record_enterprise_fee_event",
        "read_enterprise_accounts"
      ]
    },
    "enterprise_account_id": {
      "type": "string"
    },
    "enterprise_usage_summary_id": {
      "type": "string"
    },
    "enterprise_fee_event_id": {
      "type": "string"
    },
    "organization_name": {
      "type": "string"
    },
    "control_surface": {
      "type": "string"
    },
    "commercial_plan_id": {
      "type": "string"
    },
    "fee_quote_id": {
      "type": "string"
    },
    "fee_event_id": {
      "type": "string"
    },
    "fee_type": {
      "type": "string"
    },
    "monthly_units": {
      "type": "number",
      "minimum": 0
    },
    "fee_units": {
      "type": "number",
      "minimum": 0
    },
    "currency": {
      "type": "string"
    },
    "agent_count": {
      "type": "integer",
      "minimum": 0
    },
    "wallet_count": {
      "type": "integer",
      "minimum": 0
    },
    "run_count": {
      "type": "integer",
      "minimum": 0
    },
    "receipt_count": {
      "type": "integer",
      "minimum": 0
    },
    "fee_event_count": {
      "type": "integer",
      "minimum": 0
    },
    "allowed_rails": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "period_start": {
      "type": "string"
    },
    "period_end": {
      "type": "string"
    },
    "usage_summary": {
      "type": "object"
    },
    "commercial_state": {
      "type": "string"
    }
  },
  "additionalProperties": true
}
