{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/faxforagents/json-schema/faxforagents-effective-policies-schema.json",
  "title": "EffectivePolicies",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/faxforagents-policies-api-openapi.yml#/components/schemas/EffectivePolicies",
  "properties": {
    "actor": {
      "type": "string",
      "title": "Actor"
    },
    "environment": {
      "type": "string",
      "enum": [
        "live",
        "test"
      ],
      "title": "Environment"
    },
    "under_policy": {
      "type": "boolean",
      "title": "Under Policy"
    },
    "approval_required_without_policy": {
      "type": "boolean",
      "title": "Approval Required Without Policy"
    },
    "policies": {
      "items": {
        "$ref": "#/$defs/Policy"
      },
      "type": "array",
      "title": "Policies"
    },
    "rules_order": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Rules Order"
    }
  },
  "additionalProperties": true,
  "type": "object",
  "required": [
    "actor",
    "environment",
    "under_policy",
    "approval_required_without_policy",
    "policies",
    "rules_order"
  ],
  "$defs": {
    "Policy": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "purpose": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Purpose"
        },
        "enabled": {
          "type": "boolean",
          "title": "Enabled"
        },
        "version": {
          "type": "integer",
          "title": "Version"
        },
        "current_version_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Current Version Id"
        },
        "rules": {
          "additionalProperties": true,
          "type": "object",
          "title": "Rules"
        },
        "created_by": {
          "type": "string",
          "title": "Created By"
        },
        "created_at": {
          "type": "string",
          "title": "Created At"
        },
        "updated_at": {
          "type": "string",
          "title": "Updated At"
        }
      },
      "additionalProperties": true,
      "type": "object",
      "required": [
        "id",
        "name",
        "purpose",
        "enabled",
        "version",
        "current_version_id",
        "rules",
        "created_by",
        "created_at",
        "updated_at"
      ],
      "title": "Policy"
    }
  }
}