{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fiber-ai/json-schema/fiber-ai-department-size-threshold-response-schema.json",
  "title": "Department size threshold",
  "x-generated": "2026-11-07",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/fiber-ai-api-openapi.json#/components/schemas/DepartmentSizeThresholdResponse",
  "type": "object",
  "properties": {
    "lookbackDays": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 1,
      "maximum": 90,
      "description": "Compare against a snapshot from approximately N days ago instead of the most recent prior snapshot. Omit for the default previous-snapshot comparison. Maximum 90 days."
    },
    "isDummy": {
      "type": "boolean",
      "description": "When true, this rule only fires via the fire-dummy endpoint and is skipped during normal pipeline runs."
    },
    "type": {
      "type": "string",
      "const": "department_size_threshold"
    },
    "entityType": {
      "type": "string",
      "const": "company"
    },
    "department": {
      "type": "string",
      "enum": [
        "Accounting",
        "Administrative",
        "Advertising",
        "Analyst",
        "Art / Creative",
        "Business Development",
        "Consulting",
        "Customer Service",
        "Design",
        "Distribution",
        "Education",
        "Engineering",
        "Finance",
        "General Business",
        "Health Care Provider",
        "Human Resources",
        "Information Technology",
        "Legal",
        "Management",
        "Manufacturing",
        "Marketing",
        "Product Management",
        "Production",
        "Project Management",
        "Public Relations",
        "Purchasing",
        "Quality Assurance",
        "Research",
        "Sales",
        "Science",
        "Strategy / Planning",
        "Supply Chain",
        "Training",
        "Writing / Editing",
        "Community & Social Services",
        "Entrepreneurship",
        "Military & Protective Services",
        "Other",
        "Program & Product Management",
        "Real Estate"
      ],
      "description": "Department to track. Matched against the company's organizational structure."
    },
    "threshold": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "description": "The employee count threshold to watch for crossing"
    },
    "direction": {
      "type": "string",
      "enum": [
        "above",
        "below"
      ],
      "description": "Whether to alert when department size crosses above or below the threshold"
    },
    "id": {
      "type": "string",
      "description": "Unique rule ID. Use with removeRuleIds to delete a specific rule."
    }
  },
  "required": [
    "isDummy",
    "type",
    "entityType",
    "department",
    "threshold",
    "direction",
    "id"
  ]
}