Skip to content

Commit 7943955

Browse files
author
Chris Wilson
committed
Regenerated Webhook events based on most recent documentation.
1 parent 747f499 commit 7943955

File tree

55 files changed

+10586
-2068
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+10586
-2068
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
package com.sparkpost.model.webhook.event;
2+
3+
import java.util.List;
4+
import java.util.Map;
5+
import com.yepher.jsondoc.annotations.Description;
6+
import com.google.gson.annotations.SerializedName;
7+
import com.sparkpost.model.Base;
8+
import lombok.Data;
9+
import lombok.EqualsAndHashCode;
10+
11+
12+
/**
13+
Details of a canceled A/B test
14+
*/
15+
16+
@Data
17+
@EqualsAndHashCode(callSuper = true)
18+
public class ABTestCancellationEvent extends Base {
19+
20+
@SerializedName("event_id")
21+
@Description(
22+
value = "Unique event identifier",
23+
sample = "0e5cf1fc-cb36-4c39-b695-3651b6ea6563")
24+
private String eventId;
25+
26+
@SerializedName("ab_test")
27+
@Description(
28+
value = "Metadata describing an A/B test",
29+
sample = "{\"engagement_metric\":\"count_unique_clicked\",\"test_mode\":\"bayesian\",\"name\":\"Password Reset\",\"default_template\":{\"count_unique_clicked\":10,\"count_accepted\":50,\"template_id\":\"templ-1234\",\"engagement_rate\":0.2},\"id\":\"password-reset\",\"variants\":[{\"count_unique_clicked\":10,\"count_accepted\":50,\"template_id\":\"templ-5678\",\"engagement_rate\":0.2}],\"version\":1}")
30+
private Map<String, String> abTest;
31+
32+
@SerializedName("subaccount_id")
33+
@Description(
34+
value = "Unique subaccount identifier.",
35+
sample = "101")
36+
private String subaccountId;
37+
38+
@Description(
39+
value = "Type of event this record describes",
40+
sample = "ab_test_cancelled")
41+
private String type;
42+
43+
@SerializedName("customer_id")
44+
@Description(
45+
value = "SparkPost-customer identifier through which this message was sent",
46+
sample = "1")
47+
private String customerId;
48+
49+
@Description(
50+
value = "Event date and time, in Unix timestamp format (integer seconds since 00:00:00 GMT 1970-01-01)",
51+
sample = "1460989507")
52+
private String timestamp;
53+
54+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
package com.sparkpost.model.webhook.event;
2+
3+
import java.util.List;
4+
import java.util.Map;
5+
import com.yepher.jsondoc.annotations.Description;
6+
import com.google.gson.annotations.SerializedName;
7+
import com.sparkpost.model.Base;
8+
import lombok.Data;
9+
import lombok.EqualsAndHashCode;
10+
11+
12+
/**
13+
Results of an A/B test
14+
*/
15+
16+
@Data
17+
@EqualsAndHashCode(callSuper = true)
18+
public class ABTestCompletionEvent extends Base {
19+
20+
@SerializedName("event_id")
21+
@Description(
22+
value = "Unique event identifier",
23+
sample = "0e5cf1fc-cb36-4c39-b695-3651b6ea6563")
24+
private String eventId;
25+
26+
@SerializedName("ab_test")
27+
@Description(
28+
value = "Metadata describing an A/B test",
29+
sample = "{\"engagement_metric\":\"count_unique_clicked\",\"test_mode\":\"bayesian\",\"name\":\"Password Reset\",\"default_template\":{\"count_unique_clicked\":10,\"count_accepted\":50,\"template_id\":\"templ-1234\",\"engagement_rate\":0.2},\"id\":\"password-reset\",\"variants\":[{\"count_unique_clicked\":10,\"count_accepted\":50,\"template_id\":\"templ-5678\",\"engagement_rate\":0.2}],\"winning_template_id\":\"templ-1234\",\"version\":1}")
30+
private Map<String, String> abTest;
31+
32+
@SerializedName("subaccount_id")
33+
@Description(
34+
value = "Unique subaccount identifier.",
35+
sample = "101")
36+
private String subaccountId;
37+
38+
@Description(
39+
value = "Type of event this record describes",
40+
sample = "ab_test_completed")
41+
private String type;
42+
43+
@SerializedName("customer_id")
44+
@Description(
45+
value = "SparkPost-customer identifier through which this message was sent",
46+
sample = "1")
47+
private String customerId;
48+
49+
@Description(
50+
value = "Event date and time, in Unix timestamp format (integer seconds since 00:00:00 GMT 1970-01-01)",
51+
sample = "1460989507")
52+
private String timestamp;
53+
54+
}
Lines changed: 262 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,262 @@
1+
package com.sparkpost.model.webhook.event;
2+
3+
import java.util.List;
4+
import java.util.Map;
5+
import com.yepher.jsondoc.annotations.Description;
6+
import com.google.gson.annotations.SerializedName;
7+
import com.sparkpost.model.Base;
8+
import lombok.Data;
9+
import lombok.EqualsAndHashCode;
10+
11+
12+
/**
13+
Recipient clicked a tracked link in an AMP message, thus prompting a redirect through the SparkPost click-tracking server to the link's destination.
14+
*/
15+
16+
@Data
17+
@EqualsAndHashCode(callSuper = true)
18+
public class AmpClickEvent extends Base {
19+
20+
@SerializedName("template_version")
21+
@Description(
22+
value = "Version of the template used to construct this message",
23+
sample = "1")
24+
private String templateVersion;
25+
26+
@SerializedName("friendly_from")
27+
@Description(
28+
value = "Friendly sender or 'From' header in the original email",
29+
sample = "sender@example.com")
30+
private String friendlyFrom;
31+
32+
@Description(
33+
value = "Subject line from the email header",
34+
sample = "Summer deals are here!")
35+
private String subject;
36+
37+
@SerializedName("ab_test_id")
38+
@Description(
39+
value = "A/B test of which this event was a part.",
40+
sample = "password-reset")
41+
private String abTestId;
42+
43+
@SerializedName("ip_pool")
44+
@Description(
45+
value = "IP pool through which this message was sent",
46+
sample = "example-ip-pool")
47+
private String ipPool;
48+
49+
@SerializedName("rcpt_tags")
50+
@Description(
51+
value = "Tags applied to the message which generated this event",
52+
sample = "[\"male\",\"US\"]")
53+
private List<String> rcptTags;
54+
55+
@SerializedName("scheduled_time")
56+
@Description(
57+
value = "Time at which the email was scheduled to be sent",
58+
sample = "1588348800")
59+
private String scheduledTime;
60+
61+
@Description(
62+
value = "Type of event this record describes",
63+
sample = "amp_click")
64+
private String type;
65+
66+
@SerializedName("num_retries")
67+
@Description(
68+
value = "Number of failed attempts before this message was successfully delivered; when the first attempt succeeds, zero",
69+
sample = "2")
70+
private String numRetries;
71+
72+
@SerializedName("raw_rcpt_to")
73+
@Description(
74+
value = "Actual recipient address used on this message's SMTP envelope",
75+
sample = "recipient@example.com")
76+
private String rawRcptTo;
77+
78+
@SerializedName("msg_from")
79+
@Description(
80+
value = "Sender address used on this message's SMTP envelope",
81+
sample = "sender@example.com")
82+
private String msgFrom;
83+
84+
@SerializedName("geo_ip")
85+
@Description(
86+
value = "Geographic location based on the IP address, including latitude, longitude, city, country, region, and zip",
87+
sample = "{\"zip\":21046,\"country\":\"US\",\"city\":\"Columbia\",\"latitude\":39.1749,\"region\":\"MD\",\"postal_code\":\"21046\",\"longitude\":-76.8375}")
88+
private Map<String, String> geoIp;
89+
90+
@SerializedName("rcpt_to")
91+
@Description(
92+
value = "Lowercase version of recipient address used on this message's SMTP envelope",
93+
sample = "recipient@example.com")
94+
private String rcptTo;
95+
96+
@SerializedName("target_link_name")
97+
@Description(
98+
value = "Name of the link for which a click event was generated",
99+
sample = "Example Link Name")
100+
private String targetLinkName;
101+
102+
@SerializedName("subaccount_id")
103+
@Description(
104+
value = "Unique subaccount identifier.",
105+
sample = "101")
106+
private String subaccountId;
107+
108+
@SerializedName("transmission_id")
109+
@Description(
110+
value = "Transmission which originated this message",
111+
sample = "65832150921904138")
112+
private String transmissionId;
113+
114+
@SerializedName("campaign_id")
115+
@Description(
116+
value = "Campaign of which this message was a part",
117+
sample = "Example Campaign Name")
118+
private String campaignId;
119+
120+
@SerializedName("user_agent")
121+
@Description(
122+
value = "Value of the browser's User-Agent header",
123+
sample = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36")
124+
private String userAgent;
125+
126+
@Description(
127+
value = "Event date and time, in Unix timestamp format (integer seconds since 00:00:00 GMT 1970-01-01)",
128+
sample = "1460989507")
129+
private String timestamp;
130+
131+
@SerializedName("ab_test_version")
132+
@Description(
133+
value = "A/B test version that was used for this event.",
134+
sample = "1")
135+
private String abTestVersion;
136+
137+
@SerializedName("click_tracking")
138+
@Description(
139+
value = "Indicates whether or not click tracking was enabled",
140+
sample = "true")
141+
private int clickTracking;
142+
143+
@SerializedName("rcpt_meta")
144+
@Description(
145+
value = "Metadata describing the message recipient",
146+
sample = "{\"customKey\":\"customValue\"}")
147+
private Map<String, String> rcptMeta;
148+
149+
@SerializedName("message_id")
150+
@Description(
151+
value = "SparkPost-cluster-wide unique identifier for this message",
152+
sample = "000443ee14578172be22")
153+
private String messageId;
154+
155+
@SerializedName("ip_address")
156+
@Description(
157+
value = "IP address of the host to which SparkPost delivered this message; in engagement events, the IP address of the host where the HTTP request originated",
158+
sample = "127.0.0.1")
159+
private String ipAddress;
160+
161+
@SerializedName("initial_pixel")
162+
@Description(
163+
value = "Indicates whether or not initial open pixel tracking was enabled",
164+
sample = "true")
165+
private int initialPixel;
166+
167+
@SerializedName("rcpt_type")
168+
@Description(
169+
value = "Indicates that a recipient address appeared in the Cc or Bcc header or the archive JSON array",
170+
sample = "cc")
171+
private String rcptType;
172+
173+
@SerializedName("queue_time")
174+
@Description(
175+
value = "Delay, expressed in milliseconds, between this message's injection into SparkPost and its delivery to the receiving domain; that is, the length of time this message spent in the outgoing queue",
176+
sample = "12")
177+
private String queueTime;
178+
179+
@SerializedName("recipient_domain")
180+
@Description(
181+
value = "Domain part of the recipient address used on this message's SMTP envelope",
182+
sample = "example.com")
183+
private String recipientDomain;
184+
185+
@SerializedName("event_id")
186+
@Description(
187+
value = "Unique event identifier",
188+
sample = "92356927693813856")
189+
private String eventId;
190+
191+
@SerializedName("routing_domain")
192+
@Description(
193+
value = "Domain receiving this message",
194+
sample = "example.com")
195+
private String routingDomain;
196+
197+
@SerializedName("sending_ip")
198+
@Description(
199+
value = "IP address through which this message was sent",
200+
sample = "127.0.0.1")
201+
private String sendingIp;
202+
203+
@SerializedName("amp_enabled")
204+
@Description(
205+
value = "Indicates whether or not amp format was enabled",
206+
sample = "true")
207+
private int ampEnabled;
208+
209+
@SerializedName("target_link_url")
210+
@Description(
211+
value = "URL of the link for which a click event was generated",
212+
sample = "http://example.com")
213+
private String targetLinkUrl;
214+
215+
@SerializedName("template_id")
216+
@Description(
217+
value = "Slug of the template used to construct this message",
218+
sample = "templ-1234")
219+
private String templateId;
220+
221+
@SerializedName("delv_method")
222+
@Description(
223+
value = "Protocol by which SparkPost delivered this message",
224+
sample = "esmtp")
225+
private String delvMethod;
226+
227+
@SerializedName("customer_id")
228+
@Description(
229+
value = "SparkPost-customer identifier through which this message was sent",
230+
sample = "1")
231+
private String customerId;
232+
233+
@SerializedName("open_tracking")
234+
@Description(
235+
value = "Indicates whether or not open tracking was enabled",
236+
sample = "true")
237+
private int openTracking;
238+
239+
@SerializedName("rcpt_hash")
240+
@Description(
241+
value = "Hashed version of recipient address used on this message's SMTP envelope",
242+
sample = "2aae6c35c94fcfb415dbe95f408b9ce91ee846ed")
243+
private String rcptHash;
244+
245+
@SerializedName("injection_time")
246+
@Description(
247+
value = "Time at which this message was injected into SparkPost",
248+
sample = "2016-04-18T14:25:07.000Z")
249+
private String injectionTime;
250+
251+
@Description(
252+
value = "Indicates if the transmission was marked as transactional",
253+
sample = "1")
254+
private String transactional;
255+
256+
@SerializedName("msg_size")
257+
@Description(
258+
value = "Message's size in bytes",
259+
sample = "1337")
260+
private String msgSize;
261+
262+
}

0 commit comments

Comments
 (0)