// Copyright (c) Subzero Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

use serde::{Deserialize, Serialize};

/// Request parameters for the `getOracleMissedDuties` RPC method
#[derive(Serialize, Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct GetOracleMissedDutiesRequest {
    /// Oracle creator pubkey, that is pubkey of the account that created the oracle request.
    pub creator: String,

    /// Hex representation of the nonce associated with a specific oracle.
    pub nonce: String,
}

/// Response for the `getOracleMissedDuties` RPC method containing proposal rounds where duties were missed.
/// The method returns data based on the `read_missed_oracle_duties` function, which may not include all missed duties
/// due to store constraints or future changes. The duties are represented as corresponding target proposal rounds.
#[derive(Serialize, Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct GetOracleMissedDutiesResponse {
    /// Returns most recent duties that received no updates.
    /// The duties are represented as corresponding proposal rounds.
    pub missed_duties_at_proposal_rounds: Vec<u64>,
}
