whatsapp_cloud_api/models/
message_response.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Clone, Debug, Serialize, Deserialize)]
4pub struct MessageResponse {
5    pub contacts: Vec<ContactResponse>,
6    pub messages: Vec<CreatedMessage>,
7    pub messaging_product: String,
8}
9
10#[derive(Clone, Debug, Serialize, Deserialize)]
11pub struct MessageStatusResponse {
12    pub success: Option<bool>,
13    // TODO: error and otehr attributes
14}
15
16#[derive(Clone, Debug, Serialize, Deserialize)]
17pub struct CreatedMessage {
18    pub id: String,
19    pub message_status: Option<String>,
20}
21
22#[derive(Clone, Debug, Serialize, Deserialize)]
23pub struct ContactResponse {
24    pub input: String,
25    pub wa_id: String,
26}