{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/harness/main/json-schema/harness-rirecommendation-schedule-success-response-schema.json",
  "title": "RIRecommendationScheduleSuccessResponse",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/harness-commitment-orchestrator-events-apis-api-openapi.yml#/components/schemas/RIRecommendationScheduleSuccessResponse",
  "type": "object",
  "properties": {
    "ts": {
      "type": "integer",
      "description": "Response timestamp"
    },
    "success": {
      "type": "boolean",
      "description": "Specifies if the operation is successful"
    },
    "errors": {
      "type": "string",
      "description": "Specifies the error if the operation failed"
    },
    "response": {
      "$ref": "#/$defs/RIRecommendationSchedule"
    }
  },
  "$defs": {
    "RIRecommendationSchedule": {
      "type": "object",
      "properties": {
        "minIntervalDays": {
          "type": "integer",
          "description": "Minimum calendar days after the last completed RI approval transaction before a non-force recommendation run proceeds"
        },
        "lastTransactionAt": {
          "type": "string",
          "format": "date-time",
          "description": "Omitted when no qualifying completed approval transaction exists (e.g. recommendation job never ran or none completed yet). Otherwise, updated time of the latest transaction used for cooldown."
        },
        "nextEligibleAt": {
          "type": "string",
          "format": "date-time",
          "description": "Earliest time a non-force run clears the cooldown; omitted when there is no prior transaction or cooldown is disabled"
        },
        "isEligibleNow": {
          "type": "boolean",
          "description": "Whether a non-force recommendation run would not be skipped for cooldown reasons"
        },
        "lastRunCompletedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the latest completed RI recommendation engine job finished for this cloud account and service"
        },
        "recommendationsGenerated": {
          "type": "integer",
          "description": "Number of RI recommendations enqueued in that last completed run"
        },
        "noNewRecommendationsReason": {
          "type": "string",
          "description": "When no new recommendations were produced, machine-readable reason (e.g. target_coverage_achieved, guardrails_validation_failed, pending_jobs_or_cooldown, recommendation_cooldown, no_forecast_data)"
        },
        "noNewRecommendationsReasonMessage": {
          "type": "string",
          "description": "Default English explanation for the UI when noNewRecommendationsReason is set; clients may localize using noNewRecommendationsReason as the key"
        }
      }
    }
  }
}