Skip to main content

imessage_core/
events.rs

1//! Webhook event type constants.
2//! These strings are the exact values sent in webhook payloads.
3
4pub const NEW_MESSAGE: &str = "new-message";
5pub const MESSAGE_UPDATED: &str = "updated-message";
6pub const NEW_SERVER: &str = "new-server";
7pub const PARTICIPANT_REMOVED: &str = "participant-removed";
8pub const PARTICIPANT_ADDED: &str = "participant-added";
9pub const PARTICIPANT_LEFT: &str = "participant-left";
10pub const GROUP_ICON_CHANGED: &str = "group-icon-changed";
11pub const GROUP_ICON_REMOVED: &str = "group-icon-removed";
12pub const CHAT_READ_STATUS_CHANGED: &str = "chat-read-status-changed";
13pub const HELLO_WORLD: &str = "hello-world";
14pub const TYPING_INDICATOR: &str = "typing-indicator";
15pub const GROUP_NAME_CHANGE: &str = "group-name-change";
16pub const INCOMING_FACETIME: &str = "incoming-facetime";
17pub const IMESSAGE_ALIASES_REMOVED: &str = "imessage-aliases-removed";
18pub const FACETIME_CALL_STATUS_CHANGED: &str = "facetime-call-status-changed";
19pub const NEW_FINDMY_LOCATION: &str = "new-findmy-location";
20pub const MESSAGE_SEND_ERROR: &str = "message-send-error";
21pub const SERVER_UPDATE: &str = "server-update";
22/// All event types for wildcard webhook subscriptions.
23pub const ALL_EVENTS: &[&str] = &[
24    NEW_MESSAGE,
25    MESSAGE_UPDATED,
26    NEW_SERVER,
27    PARTICIPANT_REMOVED,
28    PARTICIPANT_ADDED,
29    PARTICIPANT_LEFT,
30    GROUP_ICON_CHANGED,
31    GROUP_ICON_REMOVED,
32    CHAT_READ_STATUS_CHANGED,
33    HELLO_WORLD,
34    TYPING_INDICATOR,
35    GROUP_NAME_CHANGE,
36    INCOMING_FACETIME,
37    IMESSAGE_ALIASES_REMOVED,
38    FACETIME_CALL_STATUS_CHANGED,
39    NEW_FINDMY_LOCATION,
40    MESSAGE_SEND_ERROR,
41    SERVER_UPDATE,
42];