pub struct MessageIn {
pub application: Option<Box<ApplicationIn>>,
pub channels: Option<Vec<String>>,
pub event_id: Option<String>,
pub event_type: String,
pub payload: Value,
pub payload_retention_hours: Option<i64>,
pub payload_retention_period: Option<i64>,
pub tags: Option<Vec<String>>,
pub transformations_params: Option<Value>,
}
Fields§
§application: Option<Box<ApplicationIn>>
§channels: Option<Vec<String>>
List of free-form identifiers that endpoints can filter by
event_id: Option<String>
Optional unique identifier for the message
event_type: String
The event type’s name
payload: Value
JSON payload to send as the request body of the webhook. We also support sending non-JSON payloads. Please contact us for more information.
payload_retention_hours: Option<i64>
Optional number of hours to retain the message payload. Note that this is mutually exclusive with payloadRetentionPeriod
.
payload_retention_period: Option<i64>
Optional number of days to retain the message payload. Defaults to 90. Note that this is mutually exclusive with payloadRetentionHours
.
List of free-form tags that can be filtered by when listing messages
transformations_params: Option<Value>
Extra parameters to pass to Transformations (for future use)
Implementations§
Source§impl MessageIn
impl MessageIn
Sourcepub fn new_raw_payload(event_type: String, payload: String) -> Self
pub fn new_raw_payload(event_type: String, payload: String) -> Self
Create a new message with a pre-serialized payload.
The payload is not normalized on the server. Normally, payloads are required to be JSON, and Svix will minify the payload before sending the webhook (for example, by removing extraneous whitespace or unnecessarily escaped characters in strings). With this constructor, the payload will be sent “as is”, without any minification or other processing.
The default content-type
of application/json
will still be used for
the webhook sent by Svix, unless overwritten with
with_content_type
.
Sourcepub fn with_content_type(self, content_type: String) -> Self
pub fn with_content_type(self, content_type: String) -> Self
Set the content-type
header to use for the webhook sent by Svix.