pub struct EventResponse {
pub action: String,
pub change: Value,
pub created_at: DateTime<Utc>,
pub parent: Value,
pub resource: Value,
pub type_: String,
pub user: Value,
}Expand description
An event is an object representing a change to a resource that was observed by an event subscription or delivered asynchronously to the target location of an active webhook.
The event may be triggered by a different user than the
subscriber. For example, if user A subscribes to a task and user B
modified it, the event’s user will be user B. Note: Some events
are generated by the system, and will have null as the user. API
consumers should make sure to handle this case.
The resource that triggered the event may be different from the one
that the events were requested for or the webhook is subscribed to. For
example, a subscription to a project will contain events for tasks
contained within the project.
Note: pay close attention to the relationship between the fields
Event.action and Event.change.action.
Event.action represents the action taken on the resource
itself, and Event.change.action represents how the information
within the resource’s fields have been modified.
For instance, consider these scenarios:
-
When at task is added to a project,
Event.actionwill beadded,Event.parentwill be an object with theidandtypeof the project, and there will be nochangefield. -
When an assignee is set on the task,
Event.parentwill benull,Event.actionwill bechanged,Event.change.actionwill bechanged, andnew_valuewill be an object with the user’sidandtype. -
When a collaborator is added to the task,
Event.parentwill benull,Event.actionwill bechanged,Event.change.actionwill beadded, andadded_valuewill be an object with the user’sidandtype.
Fields§
§action: StringThe type of action taken on the resource that triggered the event. This can be one of changed, added, removed, deleted, or undeleted depending on the nature of the event.
change: ValueInformation about the type of change that has occurred. This field is only present when the value of the property action, describing the action taken on the resource, is changed.
created_at: DateTime<Utc>The timestamp when the event occurred.
parent: Value§resource: Value§type_: StringDeprecated: Refer to the resource_type of the resource. The type of the resource that generated the event.
user: ValueTrait Implementations§
Source§impl Clone for EventResponse
impl Clone for EventResponse
Source§fn clone(&self) -> EventResponse
fn clone(&self) -> EventResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more