{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/rulebase/main/json-schema/rulebase-evaluation-schedule-schema.json",
  "title": "EvaluationSchedule",
  "x-generated": "2026-10-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rulebase-openapi.json#/components/schemas/EvaluationSchedule",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "frequency": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "tickets_per_reviewer": {
      "type": "number"
    },
    "created_at": {
      "type": "string"
    },
    "updated_at": {
      "type": "string"
    },
    "next_batch_window_start_on": {
      "type": [
        "string",
        "null"
      ]
    },
    "last_batch_window_start_on": {
      "type": [
        "string",
        "null"
      ]
    },
    "duration": {
      "type": [
        "number",
        "null"
      ]
    },
    "evaluations_per_ticket": {
      "type": [
        "number",
        "null"
      ]
    },
    "rotate_evaluator_pairs": {
      "type": "boolean"
    },
    "latest_batch_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "zendesk_brand_ids": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "conversation_ids": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "group_ids": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "channels": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "assigned_zendesk_brands": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      }
    },
    "groups": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      }
    },
    "assigned_account_ids": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "assigned_role_ids": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "assigned_scorecard_ids": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "assigned_accounts": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "full_name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "full_name",
          "email"
        ]
      }
    },
    "assigned_roles": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "key": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "key",
          "name"
        ]
      }
    },
    "assigned_scorecards": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "status"
        ]
      }
    },
    "evaluation_batches": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "subject_type": {
            "type": "string",
            "enum": [
              "conversation",
              "work_item"
            ]
          },
          "status": {
            "type": "string"
          },
          "selection_mode": {
            "type": "string",
            "enum": [
              "targeted",
              "sampled"
            ]
          },
          "assignments_count": {
            "type": "number"
          },
          "completed_count": {
            "type": "number"
          },
          "tickets_per_reviewer": {
            "type": [
              "number",
              "null"
            ]
          },
          "evaluations_per_ticket": {
            "type": [
              "number",
              "null"
            ]
          },
          "rotate_evaluator_pairs": {
            "type": "boolean"
          },
          "sampling_percentage": {
            "type": [
              "number",
              "null"
            ]
          },
          "window_start_on": {
            "type": [
              "string",
              "null"
            ]
          },
          "window_end_on": {
            "type": [
              "string",
              "null"
            ]
          },
          "end_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "assigned_account_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "conversation_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "work_item_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "window_date_type": {
            "type": "string",
            "enum": [
              "started",
              "evaluated"
            ]
          },
          "editable": {
            "type": "boolean"
          },
          "duration": {
            "type": [
              "number",
              "null"
            ]
          },
          "assigned_role_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "assigned_scorecard_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "zendesk_brand_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "group_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "qa_score_levels": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "high",
                "medium",
                "low"
              ]
            }
          },
          "channels": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "chat",
                "email",
                "call"
              ]
            }
          },
          "assigned_zendesk_brands": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name"
              ]
            }
          },
          "evaluation_schedule": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string"
              }
            },
            "required": [
              "id"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "subject_type",
          "status",
          "selection_mode",
          "assignments_count",
          "completed_count",
          "tickets_per_reviewer",
          "evaluations_per_ticket",
          "rotate_evaluator_pairs",
          "sampling_percentage",
          "window_start_on",
          "window_end_on",
          "end_date",
          "assigned_account_ids",
          "conversation_ids",
          "work_item_ids",
          "window_date_type",
          "editable",
          "duration",
          "assigned_role_ids",
          "assigned_scorecard_ids",
          "zendesk_brand_ids",
          "group_ids",
          "qa_score_levels",
          "channels",
          "assigned_zendesk_brands",
          "evaluation_schedule",
          "created_at",
          "updated_at"
        ]
      }
    }
  },
  "required": [
    "id",
    "name",
    "frequency",
    "status",
    "tickets_per_reviewer",
    "created_at",
    "updated_at",
    "next_batch_window_start_on",
    "last_batch_window_start_on",
    "duration",
    "evaluations_per_ticket",
    "rotate_evaluator_pairs",
    "latest_batch_id",
    "zendesk_brand_ids",
    "conversation_ids",
    "group_ids",
    "channels",
    "assigned_zendesk_brands",
    "groups",
    "assigned_account_ids",
    "assigned_role_ids",
    "assigned_scorecard_ids",
    "assigned_accounts",
    "assigned_roles",
    "assigned_scorecards",
    "evaluation_batches"
  ]
}