Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
638da70649 | ||
|
|
7bffed3f9d | ||
|
|
3527f1aff3 |
@@ -0,0 +1,18 @@
|
|||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
pub const MESSAGE_EVENT_RESPONSE_STATUS_INSTANT: &str = "INSTANT";
|
||||||
|
pub const MESSAGE_EVENT_RESPONSE_STATUS_SCHEDULED: &str = "SCHEDULED";
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||||
|
pub struct MessageEventResponse {
|
||||||
|
pub id: uuid::Uuid,
|
||||||
|
pub scheduled_message_event_id: uuid::Uuid,
|
||||||
|
// Json field
|
||||||
|
pub response: String,
|
||||||
|
pub user_id: uuid::Uuid,
|
||||||
|
pub contact_id: uuid::Uuid,
|
||||||
|
pub message_id: uuid::Uuid,
|
||||||
|
pub status: String,
|
||||||
|
#[serde(with = "time::serde::rfc3339::option")]
|
||||||
|
pub sent: Option<time::OffsetDateTime>,
|
||||||
|
}
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
|
pub mod event;
|
||||||
|
pub mod scheduling;
|
||||||
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||||
|
pub struct ScheduledMessageEvent {
|
||||||
|
id: uuid::Uuid,
|
||||||
|
contact_id: uuid::Uuid,
|
||||||
|
message_id: uuid::Uuid,
|
||||||
|
scheduled_message_id: uuid::Uuid,
|
||||||
|
#[serde(with = "time::serde::rfc3339::option")]
|
||||||
|
created: Option<time::OffsetDateTime>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||||
|
pub struct ScheduledMessage {
|
||||||
|
id: uuid::Uuid,
|
||||||
|
#[serde(with = "time::serde::rfc3339::option")]
|
||||||
|
scheduled: Option<time::OffsetDateTime>,
|
||||||
|
#[serde(with = "time::serde::rfc3339::option")]
|
||||||
|
created: Option<time::OffsetDateTime>,
|
||||||
|
status: String,
|
||||||
|
user_id: uuid::Uuid,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub const READY: &str = "READY";
|
||||||
|
pub const PENDING: &str = "PENDING";
|
||||||
|
pub const PROCESSING: &str = "PROCESSING";
|
||||||
|
pub const DONE: &str = "DONE";
|
||||||
Reference in New Issue
Block a user