cal-core 0.2.158

Callable core lib
Documentation
// File: cal-core/src/rest/queue.rs

use serde::{Deserialize, Serialize};
#[cfg(feature = "openapi")]
use utoipa::ToSchema;

/// Request to dequeue a call from a queue
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "openapi", derive(ToSchema))]
#[cfg_attr(feature = "openapi", schema(
    title ="Request to remove a call from a queue",
    example = json!({
        "account_id": "507f1f77bcf86cd799439011",
        "call_sid": "CA1234567890abcdef",
        "queue_name": "support_queue",
        "queue_type": "standard"
    })
))]
#[serde(rename_all = "camelCase")]
pub struct Dequeue {
    /// Account ID that owns the queue
    #[cfg_attr(feature = "openapi", schema(example = "507f1f77bcf86cd799439011"))]
    pub account_id: String,

    /// Unique identifier for the call
    #[cfg_attr(feature = "openapi", schema(example = "CA1234567890abcdef"))]
    pub call_sid: String,

    /// Name of the queue
    #[cfg_attr(feature = "openapi", schema(example = "support_queue"))]
    pub queue_name: String,

    /// Type of queue (e.g., standard, priority, callback)
    #[cfg_attr(feature = "openapi", schema(example = "park"))]
    pub queue_type: String
}