forked from NdoleStudio/httpsms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmessage_api_sent_event.go
More file actions
29 lines (24 loc) · 1.04 KB
/
Copy pathmessage_api_sent_event.go
File metadata and controls
29 lines (24 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package events
import (
"time"
"github.com/NdoleStudio/httpsms/pkg/entities"
"github.com/google/uuid"
)
// EventTypeMessageAPISent is emitted when a new message is sent
const EventTypeMessageAPISent = "message.api.sent"
// MessageAPISentPayload is the payload of the EventTypeMessageSent event
type MessageAPISentPayload struct {
MessageID uuid.UUID `json:"message_id"`
UserID entities.UserID `json:"user_id"`
Owner string `json:"owner"`
RequestID *string `json:"request_id"`
MaxSendAttempts uint `json:"max_send_attempts"`
Contact string `json:"contact"`
ScheduledSendTime *time.Time `json:"scheduled_send_time"`
ExactSendTime bool `json:"exact_send_time"`
RequestReceivedAt time.Time `json:"request_received_at"`
Content string `json:"content"`
Attachments []string `json:"attachments"`
Encrypted bool `json:"encrypted"`
SIM entities.SIM `json:"sim"`
}