use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "structured", derive(schemars::JsonSchema))]
pub struct Data {
pub id: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "structured", derive(schemars::JsonSchema))]
pub struct BatchCancelledWebhookEvent {
pub id: String,
pub created_at: i64,
pub data: Data,
#[serde(rename = "type")]
pub type_: String,
#[serde(skip_serializing_if = "Option::is_none", default)]
pub object: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "structured", derive(schemars::JsonSchema))]
pub struct BatchCompletedWebhookEvent {
pub id: String,
pub created_at: i64,
pub data: Data,
#[serde(rename = "type")]
pub type_: String,
#[serde(skip_serializing_if = "Option::is_none", default)]
pub object: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "structured", derive(schemars::JsonSchema))]
pub struct BatchExpiredWebhookEvent {
pub id: String,
pub created_at: i64,
pub data: Data,
#[serde(rename = "type")]
pub type_: String,
#[serde(skip_serializing_if = "Option::is_none", default)]
pub object: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "structured", derive(schemars::JsonSchema))]
pub struct BatchFailedWebhookEvent {
pub id: String,
pub created_at: i64,
pub data: Data,
#[serde(rename = "type")]
pub type_: String,
#[serde(skip_serializing_if = "Option::is_none", default)]
pub object: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "structured", derive(schemars::JsonSchema))]
pub struct EvalRunCanceledWebhookEvent {
pub id: String,
pub created_at: i64,
pub data: Data,
#[serde(rename = "type")]
pub type_: String,
#[serde(skip_serializing_if = "Option::is_none", default)]
pub object: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "structured", derive(schemars::JsonSchema))]
pub struct EvalRunFailedWebhookEvent {
pub id: String,
pub created_at: i64,
pub data: Data,
#[serde(rename = "type")]
pub type_: String,
#[serde(skip_serializing_if = "Option::is_none", default)]
pub object: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "structured", derive(schemars::JsonSchema))]
pub struct EvalRunSucceededWebhookEvent {
pub id: String,
pub created_at: i64,
pub data: Data,
#[serde(rename = "type")]
pub type_: String,
#[serde(skip_serializing_if = "Option::is_none", default)]
pub object: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "structured", derive(schemars::JsonSchema))]
pub struct FineTuningJobCancelledWebhookEvent {
pub id: String,
pub created_at: i64,
pub data: Data,
#[serde(rename = "type")]
pub type_: String,
#[serde(skip_serializing_if = "Option::is_none", default)]
pub object: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "structured", derive(schemars::JsonSchema))]
pub struct FineTuningJobFailedWebhookEvent {
pub id: String,
pub created_at: i64,
pub data: Data,
#[serde(rename = "type")]
pub type_: String,
#[serde(skip_serializing_if = "Option::is_none", default)]
pub object: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "structured", derive(schemars::JsonSchema))]
pub struct FineTuningJobSucceededWebhookEvent {
pub id: String,
pub created_at: i64,
pub data: Data,
#[serde(rename = "type")]
pub type_: String,
#[serde(skip_serializing_if = "Option::is_none", default)]
pub object: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "structured", derive(schemars::JsonSchema))]
pub struct DataSipHeader {
pub name: String,
pub value: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "structured", derive(schemars::JsonSchema))]
pub struct RealtimeCallIncomingWebhookEvent {
pub id: String,
pub created_at: i64,
pub data: Data,
#[serde(rename = "type")]
pub type_: String,
#[serde(skip_serializing_if = "Option::is_none", default)]
pub object: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "structured", derive(schemars::JsonSchema))]
pub struct ResponseCancelledWebhookEvent {
pub id: String,
pub created_at: i64,
pub data: Data,
#[serde(rename = "type")]
pub type_: String,
#[serde(skip_serializing_if = "Option::is_none", default)]
pub object: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "structured", derive(schemars::JsonSchema))]
pub struct ResponseCompletedWebhookEvent {
pub id: String,
pub created_at: i64,
pub data: Data,
#[serde(rename = "type")]
pub type_: String,
#[serde(skip_serializing_if = "Option::is_none", default)]
pub object: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "structured", derive(schemars::JsonSchema))]
pub struct ResponseFailedWebhookEvent {
pub id: String,
pub created_at: i64,
pub data: Data,
#[serde(rename = "type")]
pub type_: String,
#[serde(skip_serializing_if = "Option::is_none", default)]
pub object: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "structured", derive(schemars::JsonSchema))]
pub struct ResponseIncompleteWebhookEvent {
pub id: String,
pub created_at: i64,
pub data: Data,
#[serde(rename = "type")]
pub type_: String,
#[serde(skip_serializing_if = "Option::is_none", default)]
pub object: Option<String>,
}
pub type UnwrapWebhookEvent = serde_json::Value;