cal_core/rest/
queue.rs

1// File: cal-core/src/rest/queue.rs
2
3use serde::{Deserialize, Serialize};
4#[cfg(feature = "openapi")]
5use utoipa::ToSchema;
6
7/// Request to dequeue a call from a queue
8#[derive(Debug, Clone, Serialize, Deserialize)]
9#[cfg_attr(feature = "openapi", derive(ToSchema))]
10#[cfg_attr(feature = "openapi", schema(
11    title ="Request to remove a call from a queue",
12    example = json!({
13        "account_id": "507f1f77bcf86cd799439011",
14        "call_sid": "CA1234567890abcdef",
15        "queue_name": "support_queue",
16        "queue_type": "standard"
17    })
18))]
19#[serde(rename_all = "camelCase")]
20pub struct Dequeue {
21    /// Account ID that owns the queue
22    #[cfg_attr(feature = "openapi", schema(example = "507f1f77bcf86cd799439011"))]
23    pub account_id: String,
24
25    /// Unique identifier for the call
26    #[cfg_attr(feature = "openapi", schema(example = "CA1234567890abcdef"))]
27    pub call_sid: String,
28
29    /// Name of the queue
30    #[cfg_attr(feature = "openapi", schema(example = "support_queue"))]
31    pub queue_name: String,
32
33    /// Type of queue (e.g., standard, priority, callback)
34    #[cfg_attr(feature = "openapi", schema(example = "park"))]
35    pub queue_type: String
36}