Created
December 2, 2020 12:25
-
-
Save zupzup/c6b1f055fd2b5bb1d1c413b4427a100c to your computer and use it in GitHub Desktop.
Timeular Webhooks Types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[derive(Debug, Deserialize)] | |
#[serde(rename_all = "camelCase")] | |
struct TrackingStartedPayload { | |
user_id: String, | |
event_type: String, | |
data: TrackingStartedData, | |
} | |
#[derive(Debug, Deserialize)] | |
#[serde(rename_all = "camelCase")] | |
struct TrackingStartedData { | |
current_tracking: Tracking, | |
} | |
#[derive(Deserialize, Debug)] | |
#[serde(rename_all = "camelCase")] | |
struct Tracking { | |
id: i64, | |
activity: Activity, | |
started_at: String, | |
note: Note, | |
} | |
#[derive(Deserialize, Debug)] | |
#[serde(rename_all = "camelCase")] | |
struct Note { | |
text: Option<String>, | |
tags: Vec<TagOrMention>, | |
mentions: Vec<TagOrMention>, | |
} | |
#[derive(Deserialize, Debug)] | |
#[serde(rename_all = "camelCase")] | |
struct TagOrMention { | |
id: i64, | |
key: String, | |
label: String, | |
scope: String, | |
space_id: String, | |
} | |
#[derive(Deserialize, Debug)] | |
#[serde(rename_all = "camelCase")] | |
struct Activity { | |
id: String, | |
name: String, | |
color: String, | |
integration: String, | |
space_id: String, | |
device_side: Option<i64>, | |
} | |
#[derive(Debug, Deserialize)] | |
#[serde(rename_all = "camelCase")] | |
struct TrackingStoppedPayload { | |
user_id: String, | |
event_type: String, | |
data: TrackingStoppedData, | |
} | |
#[derive(Debug, Deserialize)] | |
#[serde(rename_all = "camelCase")] | |
struct TrackingStoppedData { | |
new_time_entry: Option<TimeEntry>, | |
} | |
#[derive(Deserialize, Debug)] | |
#[serde(rename_all = "camelCase")] | |
struct TimeEntry { | |
id: String, | |
activity: Activity, | |
duration: Duration, | |
note: Note, | |
} | |
#[derive(Deserialize, Debug)] | |
#[serde(rename_all = "camelCase")] | |
struct Duration { | |
started_at: String, | |
stopped_at: String, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment