sentdm 0.32.0 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +1 -1
- data/lib/sentdm/client.rb +6 -0
- data/lib/sentdm/models/channel_event_payload.rb +154 -7
- data/lib/sentdm/models/contact_event.rb +15 -7
- data/lib/sentdm/models/contact_event_payload.rb +77 -16
- data/lib/sentdm/models/conversation_messages_list.rb +214 -6
- data/lib/sentdm/models/inbound_message_event_payload.rb +70 -3
- data/lib/sentdm/models/me_retrieve_response.rb +21 -1
- data/lib/sentdm/models/message_event_payload.rb +42 -1
- data/lib/sentdm/models/message_retrieve_activities_response.rb +42 -5
- data/lib/sentdm/models/message_retrieve_status_response.rb +222 -8
- data/lib/sentdm/models/message_send_params.rb +67 -3
- data/lib/sentdm/models/message_send_response.rb +13 -4
- data/lib/sentdm/models/template_body.rb +82 -1
- data/lib/sentdm/models/template_create_params.rb +11 -1
- data/lib/sentdm/models/template_header.rb +91 -3
- data/lib/sentdm/models/template_variable.rb +15 -1
- data/lib/sentdm/models/webhook_create_params.rb +31 -1
- data/lib/sentdm/models/webhook_list_events_response.rb +497 -9
- data/lib/sentdm/models/webhook_update_params.rb +31 -1
- data/lib/sentdm/resources/me.rb +5 -0
- data/lib/sentdm/resources/messages.rb +33 -5
- data/lib/sentdm/resources/templates.rb +3 -1
- data/lib/sentdm/resources/webhooks.rb +9 -3
- data/lib/sentdm/version.rb +1 -1
- data/lib/sentdm.rb +1 -1
- data/rbi/sentdm/client.rbi +6 -0
- data/rbi/sentdm/models/channel_event_payload.rbi +273 -10
- data/rbi/sentdm/models/contact_event.rbi +28 -12
- data/rbi/sentdm/models/contact_event_payload.rbi +118 -28
- data/rbi/sentdm/models/conversation_messages_list.rbi +308 -10
- data/rbi/sentdm/models/inbound_message_event_payload.rbi +110 -2
- data/rbi/sentdm/models/me_retrieve_response.rbi +35 -0
- data/rbi/sentdm/models/message_event_payload.rbi +50 -0
- data/rbi/sentdm/models/message_retrieve_activities_response.rbi +49 -5
- data/rbi/sentdm/models/message_retrieve_status_response.rbi +320 -12
- data/rbi/sentdm/models/message_send_params.rbi +100 -2
- data/rbi/sentdm/models/message_send_response.rbi +15 -5
- data/rbi/sentdm/models/template_body.rbi +133 -0
- data/rbi/sentdm/models/template_create_params.rbi +15 -0
- data/rbi/sentdm/models/template_header.rbi +143 -2
- data/rbi/sentdm/models/template_variable.rbi +10 -0
- data/rbi/sentdm/models/webhook_create_params.rbi +61 -0
- data/rbi/sentdm/models/webhook_list_events_response.rbi +747 -12
- data/rbi/sentdm/models/webhook_update_params.rbi +61 -0
- data/rbi/sentdm/resources/me.rbi +5 -0
- data/rbi/sentdm/resources/messages.rbi +58 -3
- data/rbi/sentdm/resources/templates.rbi +6 -0
- data/rbi/sentdm/resources/webhooks.rbi +15 -1
- data/sig/sentdm/models/channel_event_payload.rbs +62 -0
- data/sig/sentdm/models/contact_event_payload.rbs +24 -9
- data/sig/sentdm/models/conversation_messages_list.rbs +99 -6
- data/sig/sentdm/models/inbound_message_event_payload.rbs +37 -0
- data/sig/sentdm/models/me_retrieve_response.rbs +7 -0
- data/sig/sentdm/models/message_event_payload.rbs +20 -0
- data/sig/sentdm/models/message_retrieve_activities_response.rbs +15 -0
- data/sig/sentdm/models/message_retrieve_status_response.rbs +99 -6
- data/sig/sentdm/models/message_send_params.rbs +15 -0
- data/sig/sentdm/models/template_body.rbs +44 -0
- data/sig/sentdm/models/template_create_params.rbs +7 -0
- data/sig/sentdm/models/template_header.rbs +44 -0
- data/sig/sentdm/models/webhook_create_params.rbs +29 -0
- data/sig/sentdm/models/webhook_list_events_response.rbs +252 -0
- data/sig/sentdm/models/webhook_update_params.rbs +29 -0
- data/sig/sentdm/resources/messages.rbs +3 -0
- data/sig/sentdm/resources/templates.rbs +1 -0
- data/sig/sentdm/resources/webhooks.rbs +2 -0
- metadata +2 -2
|
@@ -31,11 +31,24 @@ module Sentdm
|
|
|
31
31
|
|
|
32
32
|
# @!attribute event_data
|
|
33
33
|
# The exact event body that was delivered, or attempted, for this record. One of
|
|
34
|
-
# the
|
|
35
|
-
# template status change, or a contact consent signal. Read field and event to
|
|
36
|
-
# tell which, the same way your endpoint does.
|
|
34
|
+
# the six webhook envelopes:
|
|
37
35
|
#
|
|
38
|
-
#
|
|
36
|
+
# message — an outbound message changed status. message with event:
|
|
37
|
+
# message.received — someone replied to you. templates — a template was approved,
|
|
38
|
+
# rejected, paused or similar. channel — one of your markets moved in provisioning
|
|
39
|
+
# or compliance. contact — a consent signal: opt-in, opt-out or help. link — a
|
|
40
|
+
# tracked short link was clicked or a hosted file downloaded, or one expired or
|
|
41
|
+
# was revoked.
|
|
42
|
+
#
|
|
43
|
+
# Read field and event to tell which, the same way your endpoint does. The two
|
|
44
|
+
# message envelopes are the reason that is two fields and not one: they share a
|
|
45
|
+
# field and differ by event.
|
|
46
|
+
#
|
|
47
|
+
# Treat the list as open. It has grown twice — channel and then link — and a
|
|
48
|
+
# handler that rejects an envelope it does not recognise will break on the next
|
|
49
|
+
# addition rather than ignore it.
|
|
50
|
+
#
|
|
51
|
+
# @return [Sentdm::Models::MessageEvent, Sentdm::Models::InboundMessageEvent, Sentdm::Models::TemplateEvent, Sentdm::Models::ChannelEvent, Sentdm::Models::ContactEvent, Sentdm::Models::WebhookListEventsResponse::EventData::SentDmServicesCommonServicesWebhooksContractsWebhookEventOfLinkWebhookPayload, Sentdm::Models::WebhookListEventsResponse::EventData::SentDmServicesCommonServicesWebhooksContractsWebhookEventOfCallWebhookPayload, nil]
|
|
39
52
|
optional :event_data, union: -> { Sentdm::Models::WebhookListEventsResponse::EventData }
|
|
40
53
|
|
|
41
54
|
# @!attribute event_type
|
|
@@ -77,7 +90,7 @@ module Sentdm
|
|
|
77
90
|
#
|
|
78
91
|
# @param error_message [String, nil]
|
|
79
92
|
#
|
|
80
|
-
# @param event_data [Sentdm::Models::MessageEvent, Sentdm::Models::InboundMessageEvent, Sentdm::Models::TemplateEvent, Sentdm::Models::ChannelEvent, Sentdm::Models::ContactEvent] The exact event body that was delivered, or attempted, for this record. One of t
|
|
93
|
+
# @param event_data [Sentdm::Models::MessageEvent, Sentdm::Models::InboundMessageEvent, Sentdm::Models::TemplateEvent, Sentdm::Models::ChannelEvent, Sentdm::Models::ContactEvent, Sentdm::Models::WebhookListEventsResponse::EventData::SentDmServicesCommonServicesWebhooksContractsWebhookEventOfLinkWebhookPayload, Sentdm::Models::WebhookListEventsResponse::EventData::SentDmServicesCommonServicesWebhooksContractsWebhookEventOfCallWebhookPayload] The exact event body that was delivered, or attempted, for this record. One of t
|
|
81
94
|
#
|
|
82
95
|
# @param event_type [String]
|
|
83
96
|
#
|
|
@@ -90,9 +103,22 @@ module Sentdm
|
|
|
90
103
|
# @param response_body [String, nil]
|
|
91
104
|
|
|
92
105
|
# The exact event body that was delivered, or attempted, for this record. One of
|
|
93
|
-
# the
|
|
94
|
-
#
|
|
95
|
-
#
|
|
106
|
+
# the six webhook envelopes:
|
|
107
|
+
#
|
|
108
|
+
# message — an outbound message changed status. message with event:
|
|
109
|
+
# message.received — someone replied to you. templates — a template was approved,
|
|
110
|
+
# rejected, paused or similar. channel — one of your markets moved in provisioning
|
|
111
|
+
# or compliance. contact — a consent signal: opt-in, opt-out or help. link — a
|
|
112
|
+
# tracked short link was clicked or a hosted file downloaded, or one expired or
|
|
113
|
+
# was revoked.
|
|
114
|
+
#
|
|
115
|
+
# Read field and event to tell which, the same way your endpoint does. The two
|
|
116
|
+
# message envelopes are the reason that is two fields and not one: they share a
|
|
117
|
+
# field and differ by event.
|
|
118
|
+
#
|
|
119
|
+
# Treat the list as open. It has grown twice — channel and then link — and a
|
|
120
|
+
# handler that rejects an envelope it does not recognise will break on the next
|
|
121
|
+
# addition rather than ignore it.
|
|
96
122
|
#
|
|
97
123
|
# @see Sentdm::Models::WebhookListEventsResponse#event_data
|
|
98
124
|
module EventData
|
|
@@ -118,8 +144,470 @@ module Sentdm
|
|
|
118
144
|
# varies only in Payload.
|
|
119
145
|
variant -> { Sentdm::ContactEvent }
|
|
120
146
|
|
|
147
|
+
# The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares this shape and
|
|
148
|
+
# varies only in Payload.
|
|
149
|
+
variant -> { Sentdm::Models::WebhookListEventsResponse::EventData::SentDmServicesCommonServicesWebhooksContractsWebhookEventOfLinkWebhookPayload }
|
|
150
|
+
|
|
151
|
+
# The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares this shape and
|
|
152
|
+
# varies only in Payload.
|
|
153
|
+
variant -> { Sentdm::Models::WebhookListEventsResponse::EventData::SentDmServicesCommonServicesWebhooksContractsWebhookEventOfCallWebhookPayload }
|
|
154
|
+
|
|
155
|
+
class SentDmServicesCommonServicesWebhooksContractsWebhookEventOfLinkWebhookPayload < Sentdm::Internal::Type::BaseModel
|
|
156
|
+
# @!attribute event
|
|
157
|
+
# The specific event within the family, for example message.delivered,
|
|
158
|
+
# message.received or contact.opt_out. Absent on events that have no subtype, so
|
|
159
|
+
# treat it as optional.
|
|
160
|
+
#
|
|
161
|
+
# @return [String, nil]
|
|
162
|
+
optional :event, String, nil?: true
|
|
163
|
+
|
|
164
|
+
# @!attribute field
|
|
165
|
+
# The event family, for example message, templates or contact. Route on this
|
|
166
|
+
# first, then on event for the specific change.
|
|
167
|
+
#
|
|
168
|
+
# @return [String, nil]
|
|
169
|
+
optional :field, String
|
|
170
|
+
|
|
171
|
+
# @!attribute payload
|
|
172
|
+
# Body of a link event: something happened to a tracked link Sent published on the
|
|
173
|
+
# customer's behalf. A link points either at a URL the customer supplied or at a
|
|
174
|
+
# file Sent hosts for them; LinkKind says which. Delivered when an eligible
|
|
175
|
+
# request is served, or when a published link reaches the end of its life.
|
|
176
|
+
#
|
|
177
|
+
# A click is a request, not a read receipt. link.clicked means the redirect was
|
|
178
|
+
# served; link.downloaded means bytes went out. Neither proves a person saw
|
|
179
|
+
# anything — messaging providers and link scanners fetch URLs on their own, which
|
|
180
|
+
# is what TrafficClass exists to tell apart. Filter on it before reporting a
|
|
181
|
+
# click-through rate; treat likely_human as a hint, never as delivery
|
|
182
|
+
# confirmation.
|
|
183
|
+
#
|
|
184
|
+
# RecordId identifies the link; the X-Webhook-Event-ID header identifies the
|
|
185
|
+
# delivery. One link is hit many times, so those are the two keys a subscriber
|
|
186
|
+
# needs: group by the first, deduplicate on the second — exactly as on every other
|
|
187
|
+
# family. The payload carries no event identifier of its own, for the same reason
|
|
188
|
+
# none of the others do.
|
|
189
|
+
#
|
|
190
|
+
# Nothing here identifies the visitor. No IP address and no visitor token crosses
|
|
191
|
+
# this boundary. Country, Device and Browser are coarse buckets derived at the
|
|
192
|
+
# edge and are absent whenever the request did not supply enough to derive them.
|
|
193
|
+
#
|
|
194
|
+
# @return [Sentdm::Models::WebhookListEventsResponse::EventData::SentDmServicesCommonServicesWebhooksContractsWebhookEventOfLinkWebhookPayload::Payload, nil]
|
|
195
|
+
optional :payload,
|
|
196
|
+
-> { Sentdm::Models::WebhookListEventsResponse::EventData::SentDmServicesCommonServicesWebhooksContractsWebhookEventOfLinkWebhookPayload::Payload },
|
|
197
|
+
nil?: true
|
|
198
|
+
|
|
199
|
+
# @!attribute request_id
|
|
200
|
+
# The event-specific body.
|
|
201
|
+
#
|
|
202
|
+
# @return [String, nil]
|
|
203
|
+
optional :request_id, String, nil?: true
|
|
204
|
+
|
|
205
|
+
# @!attribute timestamp
|
|
206
|
+
# When Sent emitted the event, in UTC (yyyy-MM-ddTHH:mm:ssZ). This is the emission
|
|
207
|
+
# time, not the time the underlying change happened. Use the timestamp inside the
|
|
208
|
+
# payload for the latter.
|
|
209
|
+
#
|
|
210
|
+
# @return [String, nil]
|
|
211
|
+
optional :timestamp, String
|
|
212
|
+
|
|
213
|
+
# @!method initialize(event: nil, field: nil, payload: nil, request_id: nil, timestamp: nil)
|
|
214
|
+
# Some parameter documentations has been truncated, see
|
|
215
|
+
# {Sentdm::Models::WebhookListEventsResponse::EventData::SentDmServicesCommonServicesWebhooksContractsWebhookEventOfLinkWebhookPayload}
|
|
216
|
+
# for more details.
|
|
217
|
+
#
|
|
218
|
+
# The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares
|
|
219
|
+
# this shape and varies only in Payload.
|
|
220
|
+
#
|
|
221
|
+
# @param event [String, nil] The specific event within the family, for example message.delivered,
|
|
222
|
+
#
|
|
223
|
+
# @param field [String] The event family, for example message, templates or contact. Route on
|
|
224
|
+
#
|
|
225
|
+
# @param payload [Sentdm::Models::WebhookListEventsResponse::EventData::SentDmServicesCommonServicesWebhooksContractsWebhookEventOfLinkWebhookPayload::Payload, nil] Body of a link event: something happened to a tracked link Sent published on the
|
|
226
|
+
#
|
|
227
|
+
# @param request_id [String, nil] The event-specific body.
|
|
228
|
+
#
|
|
229
|
+
# @param timestamp [String] When Sent emitted the event, in UTC (yyyy-MM-ddTHH:mm:ssZ). This is the emission
|
|
230
|
+
|
|
231
|
+
# @see Sentdm::Models::WebhookListEventsResponse::EventData::SentDmServicesCommonServicesWebhooksContractsWebhookEventOfLinkWebhookPayload#payload
|
|
232
|
+
class Payload < Sentdm::Internal::Type::BaseModel
|
|
233
|
+
# @!attribute record_id
|
|
234
|
+
# The link's public identifier — the eight-character code in the short URL, for
|
|
235
|
+
# example A78B2BU0. Unique across both kinds, and never reused, so it is the
|
|
236
|
+
# stable key to group one link's events by.
|
|
237
|
+
#
|
|
238
|
+
# @return [String]
|
|
239
|
+
required :record_id, String
|
|
240
|
+
|
|
241
|
+
# @!attribute access_country
|
|
242
|
+
# Where the request appeared to come from, as an ISO 3166-1 alpha-2 code. Named
|
|
243
|
+
# separately from the country on a channel event, which is a destination market
|
|
244
|
+
# the customer registered for — this one is a property of a single visitor and is
|
|
245
|
+
# absent when the edge could not resolve it.
|
|
246
|
+
#
|
|
247
|
+
# @return [String, nil]
|
|
248
|
+
optional :access_country, String, nil?: true
|
|
249
|
+
|
|
250
|
+
# @!attribute access_outcome
|
|
251
|
+
# How the request was served, when the edge recorded it. Free text describing the
|
|
252
|
+
# outcome — show it to a human rather than branching on it.
|
|
253
|
+
#
|
|
254
|
+
# @return [String, nil]
|
|
255
|
+
optional :access_outcome, String, nil?: true
|
|
256
|
+
|
|
257
|
+
# @!attribute browser
|
|
258
|
+
# The requesting browser family, for example chrome or safari, or unknown. Derived
|
|
259
|
+
# from the user agent.
|
|
260
|
+
#
|
|
261
|
+
# @return [String, nil]
|
|
262
|
+
optional :browser, String, nil?: true
|
|
263
|
+
|
|
264
|
+
# @!attribute bytes_served
|
|
265
|
+
# How many bytes were served, for a file access. A ranged request reports the
|
|
266
|
+
# bytes in that range, not the size of the file, so several accesses of one file
|
|
267
|
+
# can each report a part.
|
|
268
|
+
#
|
|
269
|
+
# @return [Integer, nil]
|
|
270
|
+
optional :bytes_served, Integer, nil?: true
|
|
271
|
+
|
|
272
|
+
# @!attribute channel
|
|
273
|
+
# The channel the message carrying this link went out on: sms, whatsapp, or rcs.
|
|
274
|
+
#
|
|
275
|
+
# @return [String, nil]
|
|
276
|
+
optional :channel, String, nil?: true
|
|
277
|
+
|
|
278
|
+
# @!attribute customer_id
|
|
279
|
+
# The organization the link belongs to. Always the parent account, never a sender
|
|
280
|
+
# profile — read SenderProfileId for that.
|
|
281
|
+
#
|
|
282
|
+
# This family publishes the owner as an explicit pair rather than the single
|
|
283
|
+
# account_id the other families use. The pair says which organization and which
|
|
284
|
+
# profile without the subscriber deriving either, which is the trade: one more key
|
|
285
|
+
# against not having to know that account_id silently becomes the profile when one
|
|
286
|
+
# exists.
|
|
287
|
+
#
|
|
288
|
+
# @return [String, nil]
|
|
289
|
+
optional :customer_id, String
|
|
290
|
+
|
|
291
|
+
# @!attribute device
|
|
292
|
+
# The requesting device class: mobile, tablet, desktop or unknown. Derived from
|
|
293
|
+
# the user agent.
|
|
294
|
+
#
|
|
295
|
+
# @return [String, nil]
|
|
296
|
+
optional :device, String, nil?: true
|
|
297
|
+
|
|
298
|
+
# @!attribute link_kind
|
|
299
|
+
# What the link points at: url for a destination the customer supplied, file for
|
|
300
|
+
# media Sent hosts. Always present, and implied by the event — link.clicked is
|
|
301
|
+
# always url and link.downloaded always file — but published as its own field so a
|
|
302
|
+
# subscriber can branch on the kind without parsing the event name, the same
|
|
303
|
+
# separation the channel family keeps between its event and its status.
|
|
304
|
+
#
|
|
305
|
+
# @return [String, nil]
|
|
306
|
+
optional :link_kind, String
|
|
307
|
+
|
|
308
|
+
# @!attribute message_id
|
|
309
|
+
# The message the link was published in.
|
|
310
|
+
#
|
|
311
|
+
# The event can arrive before the message is readable through GET /v3/messages: a
|
|
312
|
+
# provider may fetch a link within milliseconds of the send, and nothing here
|
|
313
|
+
# waits for the message row. Retry the read rather than treating an unknown id as
|
|
314
|
+
# an error.
|
|
315
|
+
#
|
|
316
|
+
# @return [String, nil]
|
|
317
|
+
optional :message_id, String, nil?: true
|
|
318
|
+
|
|
319
|
+
# @!attribute occurred_at
|
|
320
|
+
# When the access or lifecycle change actually happened, in UTC
|
|
321
|
+
# (yyyy-MM-ddTHH:mm:ssZ). The envelope's timestamp is when Sent emitted the event;
|
|
322
|
+
# this is when the thing occurred, and the two differ by the ingest delay.
|
|
323
|
+
#
|
|
324
|
+
# @return [String, nil]
|
|
325
|
+
optional :occurred_at, String
|
|
326
|
+
|
|
327
|
+
# @!attribute reference_key
|
|
328
|
+
# The caller-supplied label tying this link back to a position in the message, for
|
|
329
|
+
# example body:0 for the first link in the body. Present when the link was created
|
|
330
|
+
# with one.
|
|
331
|
+
#
|
|
332
|
+
# @return [String, nil]
|
|
333
|
+
optional :reference_key, String, nil?: true
|
|
334
|
+
|
|
335
|
+
# @!attribute referrer_host
|
|
336
|
+
# The host of the page that linked here, when the request supplied one. The host
|
|
337
|
+
# only — never a full referring URL.
|
|
338
|
+
#
|
|
339
|
+
# @return [String, nil]
|
|
340
|
+
optional :referrer_host, String, nil?: true
|
|
341
|
+
|
|
342
|
+
# @!attribute request_method
|
|
343
|
+
# The HTTP method of the request that was served, for an access event. Omitted on
|
|
344
|
+
# link.expired and link.revoked, which describe no request.
|
|
345
|
+
#
|
|
346
|
+
# @return [String, nil]
|
|
347
|
+
optional :request_method, String, nil?: true
|
|
348
|
+
|
|
349
|
+
# @!attribute sender_profile_id
|
|
350
|
+
# The sender profile that owns the link, or null when the organization owns it
|
|
351
|
+
# directly. Always on the wire so a handler reads one shape rather than branching
|
|
352
|
+
# on whether the key arrived.
|
|
353
|
+
#
|
|
354
|
+
# sender_profile_id, not profile_id: the API already publishes
|
|
355
|
+
# messaging_profile_id and sending_phone_number_profile_id for provider-side
|
|
356
|
+
# profiles, which are a different thing entirely. The unqualified name would read
|
|
357
|
+
# as one of those.
|
|
358
|
+
#
|
|
359
|
+
# @return [String, nil]
|
|
360
|
+
optional :sender_profile_id, String, nil?: true
|
|
361
|
+
|
|
362
|
+
# @!attribute status_code
|
|
363
|
+
# The HTTP status Sent answered the request with: 302 for a link, 200 or 206 for a
|
|
364
|
+
# file. Omitted on lifecycle events.
|
|
365
|
+
#
|
|
366
|
+
# @return [Integer, nil]
|
|
367
|
+
optional :status_code, Integer, nil?: true
|
|
368
|
+
|
|
369
|
+
# @!attribute traffic_class
|
|
370
|
+
# A coarse guess at what made the request: likely_human, provider (a messaging
|
|
371
|
+
# platform prefetching the link), bot, or unknown. Derived from the user agent, so
|
|
372
|
+
# it is a hint for filtering noise rather than a fact to bill or report on.
|
|
373
|
+
#
|
|
374
|
+
# @return [String, nil]
|
|
375
|
+
optional :traffic_class, String, nil?: true
|
|
376
|
+
|
|
377
|
+
# @!method initialize(record_id:, access_country: nil, access_outcome: nil, browser: nil, bytes_served: nil, channel: nil, customer_id: nil, device: nil, link_kind: nil, message_id: nil, occurred_at: nil, reference_key: nil, referrer_host: nil, request_method: nil, sender_profile_id: nil, status_code: nil, traffic_class: nil)
|
|
378
|
+
# Some parameter documentations has been truncated, see
|
|
379
|
+
# {Sentdm::Models::WebhookListEventsResponse::EventData::SentDmServicesCommonServicesWebhooksContractsWebhookEventOfLinkWebhookPayload::Payload}
|
|
380
|
+
# for more details.
|
|
381
|
+
#
|
|
382
|
+
# Body of a link event: something happened to a tracked link Sent published on the
|
|
383
|
+
# customer's behalf. A link points either at a URL the customer supplied or at a
|
|
384
|
+
# file Sent hosts for them; LinkKind says which. Delivered when an eligible
|
|
385
|
+
# request is served, or when a published link reaches the end of its life.
|
|
386
|
+
#
|
|
387
|
+
# A click is a request, not a read receipt. link.clicked means the redirect was
|
|
388
|
+
# served; link.downloaded means bytes went out. Neither proves a person saw
|
|
389
|
+
# anything — messaging providers and link scanners fetch URLs on their own, which
|
|
390
|
+
# is what TrafficClass exists to tell apart. Filter on it before reporting a
|
|
391
|
+
# click-through rate; treat likely_human as a hint, never as delivery
|
|
392
|
+
# confirmation.
|
|
393
|
+
#
|
|
394
|
+
# RecordId identifies the link; the X-Webhook-Event-ID header identifies the
|
|
395
|
+
# delivery. One link is hit many times, so those are the two keys a subscriber
|
|
396
|
+
# needs: group by the first, deduplicate on the second — exactly as on every other
|
|
397
|
+
# family. The payload carries no event identifier of its own, for the same reason
|
|
398
|
+
# none of the others do.
|
|
399
|
+
#
|
|
400
|
+
# Nothing here identifies the visitor. No IP address and no visitor token crosses
|
|
401
|
+
# this boundary. Country, Device and Browser are coarse buckets derived at the
|
|
402
|
+
# edge and are absent whenever the request did not supply enough to derive them.
|
|
403
|
+
#
|
|
404
|
+
# @param record_id [String] The link's public identifier — the eight-character code in the short URL, for ex
|
|
405
|
+
#
|
|
406
|
+
# @param access_country [String, nil] Where the request appeared to come from, as an ISO 3166-1 alpha-2 code. Named se
|
|
407
|
+
#
|
|
408
|
+
# @param access_outcome [String, nil] How the request was served, when the edge recorded it. Free text describing the
|
|
409
|
+
#
|
|
410
|
+
# @param browser [String, nil] The requesting browser family, for example chrome or safari, or
|
|
411
|
+
#
|
|
412
|
+
# @param bytes_served [Integer, nil] How many bytes were served, for a file access. A ranged request reports the byte
|
|
413
|
+
#
|
|
414
|
+
# @param channel [String, nil] The channel the message carrying this link went out on: sms, whatsapp, or
|
|
415
|
+
#
|
|
416
|
+
# @param customer_id [String] The organization the link belongs to. Always the parent account, never a sender
|
|
417
|
+
#
|
|
418
|
+
# @param device [String, nil] The requesting device class: mobile, tablet, desktop or
|
|
419
|
+
#
|
|
420
|
+
# @param link_kind [String] What the link points at: url for a destination the customer supplied, file for
|
|
421
|
+
#
|
|
422
|
+
# @param message_id [String, nil] The message the link was published in.
|
|
423
|
+
#
|
|
424
|
+
# @param occurred_at [String] When the access or lifecycle change actually happened, in UTC
|
|
425
|
+
#
|
|
426
|
+
# @param reference_key [String, nil] The caller-supplied label tying this link back to a position in the message, for
|
|
427
|
+
#
|
|
428
|
+
# @param referrer_host [String, nil] The host of the page that linked here, when the request supplied one. The host o
|
|
429
|
+
#
|
|
430
|
+
# @param request_method [String, nil] The HTTP method of the request that was served, for an access event. Omitted on
|
|
431
|
+
#
|
|
432
|
+
# @param sender_profile_id [String, nil] The sender profile that owns the link, or null when the organization owns it dir
|
|
433
|
+
#
|
|
434
|
+
# @param status_code [Integer, nil] The HTTP status Sent answered the request with: 302 for a link, 200 or
|
|
435
|
+
#
|
|
436
|
+
# @param traffic_class [String, nil] A coarse guess at what made the request: likely_human, provider (a messaging
|
|
437
|
+
end
|
|
438
|
+
end
|
|
439
|
+
|
|
440
|
+
class SentDmServicesCommonServicesWebhooksContractsWebhookEventOfCallWebhookPayload < Sentdm::Internal::Type::BaseModel
|
|
441
|
+
# @!attribute event
|
|
442
|
+
# The specific event within the family, for example message.delivered,
|
|
443
|
+
# message.received or contact.opt_out. Absent on events that have no subtype, so
|
|
444
|
+
# treat it as optional.
|
|
445
|
+
#
|
|
446
|
+
# @return [String, nil]
|
|
447
|
+
optional :event, String, nil?: true
|
|
448
|
+
|
|
449
|
+
# @!attribute field
|
|
450
|
+
# The event family, for example message, templates or contact. Route on this
|
|
451
|
+
# first, then on event for the specific change.
|
|
452
|
+
#
|
|
453
|
+
# @return [String, nil]
|
|
454
|
+
optional :field, String
|
|
455
|
+
|
|
456
|
+
# @!attribute payload
|
|
457
|
+
# Body of a call.initiated, call.answered, call.completed, call.failed or
|
|
458
|
+
# call.recording_ready event. Which of them occurred is the envelope's event.
|
|
459
|
+
#
|
|
460
|
+
# Shaped like the message, inbound, template and channel payloads: account_id
|
|
461
|
+
# names the account the event is about, channel names the channel, and updated_at
|
|
462
|
+
# is when the change happened on the call, in the same yyyy-MM-ddTHH:mm:ssZ form.
|
|
463
|
+
# duration_seconds and price are added on call.completed, reason on call.failed
|
|
464
|
+
# and recording_id on call.recording_ready; each is omitted rather than sent as
|
|
465
|
+
# null when it does not apply.
|
|
466
|
+
#
|
|
467
|
+
# Casing is snake_case because these ride the same webhook stream customers
|
|
468
|
+
# already parse message_id from; the question/answer contract is a separate
|
|
469
|
+
# surface and stays camelCase. Nothing here is provider-shaped: no provider call
|
|
470
|
+
# id, no namespaced identity.
|
|
471
|
+
#
|
|
472
|
+
# @return [Sentdm::Models::WebhookListEventsResponse::EventData::SentDmServicesCommonServicesWebhooksContractsWebhookEventOfCallWebhookPayload::Payload, nil]
|
|
473
|
+
optional :payload,
|
|
474
|
+
-> { Sentdm::Models::WebhookListEventsResponse::EventData::SentDmServicesCommonServicesWebhooksContractsWebhookEventOfCallWebhookPayload::Payload },
|
|
475
|
+
nil?: true
|
|
476
|
+
|
|
477
|
+
# @!attribute request_id
|
|
478
|
+
# The event-specific body.
|
|
479
|
+
#
|
|
480
|
+
# @return [String, nil]
|
|
481
|
+
optional :request_id, String, nil?: true
|
|
482
|
+
|
|
483
|
+
# @!attribute timestamp
|
|
484
|
+
# When Sent emitted the event, in UTC (yyyy-MM-ddTHH:mm:ssZ). This is the emission
|
|
485
|
+
# time, not the time the underlying change happened. Use the timestamp inside the
|
|
486
|
+
# payload for the latter.
|
|
487
|
+
#
|
|
488
|
+
# @return [String, nil]
|
|
489
|
+
optional :timestamp, String
|
|
490
|
+
|
|
491
|
+
# @!method initialize(event: nil, field: nil, payload: nil, request_id: nil, timestamp: nil)
|
|
492
|
+
# Some parameter documentations has been truncated, see
|
|
493
|
+
# {Sentdm::Models::WebhookListEventsResponse::EventData::SentDmServicesCommonServicesWebhooksContractsWebhookEventOfCallWebhookPayload}
|
|
494
|
+
# for more details.
|
|
495
|
+
#
|
|
496
|
+
# The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares
|
|
497
|
+
# this shape and varies only in Payload.
|
|
498
|
+
#
|
|
499
|
+
# @param event [String, nil] The specific event within the family, for example message.delivered,
|
|
500
|
+
#
|
|
501
|
+
# @param field [String] The event family, for example message, templates or contact. Route on
|
|
502
|
+
#
|
|
503
|
+
# @param payload [Sentdm::Models::WebhookListEventsResponse::EventData::SentDmServicesCommonServicesWebhooksContractsWebhookEventOfCallWebhookPayload::Payload, nil] Body of a call.initiated, call.answered, call.completed, call.failed
|
|
504
|
+
#
|
|
505
|
+
# @param request_id [String, nil] The event-specific body.
|
|
506
|
+
#
|
|
507
|
+
# @param timestamp [String] When Sent emitted the event, in UTC (yyyy-MM-ddTHH:mm:ssZ). This is the emission
|
|
508
|
+
|
|
509
|
+
# @see Sentdm::Models::WebhookListEventsResponse::EventData::SentDmServicesCommonServicesWebhooksContractsWebhookEventOfCallWebhookPayload#payload
|
|
510
|
+
class Payload < Sentdm::Internal::Type::BaseModel
|
|
511
|
+
# @!attribute call_id
|
|
512
|
+
# Sent's call id, the same one the customer saw on the first question.
|
|
513
|
+
#
|
|
514
|
+
# @return [String]
|
|
515
|
+
required :call_id, String
|
|
516
|
+
|
|
517
|
+
# @!attribute account_id
|
|
518
|
+
# The account the call belongs to: the key's own customer, or the sender profile
|
|
519
|
+
# it acted as.
|
|
520
|
+
#
|
|
521
|
+
# @return [String, nil]
|
|
522
|
+
optional :account_id, String
|
|
523
|
+
|
|
524
|
+
# @!attribute channel
|
|
525
|
+
# Always voice.
|
|
526
|
+
#
|
|
527
|
+
# @return [String, nil]
|
|
528
|
+
optional :channel, String
|
|
529
|
+
|
|
530
|
+
# @!attribute duration_seconds
|
|
531
|
+
# How long the call lasted. Only on call.completed.
|
|
532
|
+
#
|
|
533
|
+
# @return [Integer, nil]
|
|
534
|
+
optional :duration_seconds, Integer, nil?: true
|
|
535
|
+
|
|
536
|
+
# @!attribute number
|
|
537
|
+
# The customer number that owns the call, in E.164 format.
|
|
538
|
+
#
|
|
539
|
+
# @return [String, nil]
|
|
540
|
+
optional :number, String
|
|
541
|
+
|
|
542
|
+
# @!attribute price
|
|
543
|
+
# What the call was charged. Only on call.completed, and omitted there until
|
|
544
|
+
# billing has recorded the charge.
|
|
545
|
+
#
|
|
546
|
+
# @return [Float, nil]
|
|
547
|
+
optional :price, Float, nil?: true
|
|
548
|
+
|
|
549
|
+
# @!attribute reason
|
|
550
|
+
# The machine-readable reason the call did not complete. Only on call.failed, and
|
|
551
|
+
# omitted when no reason was recorded.
|
|
552
|
+
#
|
|
553
|
+
# @return [String, nil]
|
|
554
|
+
optional :reason, String, nil?: true
|
|
555
|
+
|
|
556
|
+
# @!attribute recording_id
|
|
557
|
+
# The recording that became available, the same id GET /v3/calls/{id}/recordings
|
|
558
|
+
# lists it under. Only on call.recording_ready, which is sent once per recording.
|
|
559
|
+
#
|
|
560
|
+
# @return [String, nil]
|
|
561
|
+
optional :recording_id, String, nil?: true
|
|
562
|
+
|
|
563
|
+
# @!attribute updated_at
|
|
564
|
+
# When the change happened on the call, as opposed to when the event was emitted.
|
|
565
|
+
#
|
|
566
|
+
# @return [String, nil]
|
|
567
|
+
optional :updated_at, String
|
|
568
|
+
|
|
569
|
+
# @!method initialize(call_id:, account_id: nil, channel: nil, duration_seconds: nil, number: nil, price: nil, reason: nil, recording_id: nil, updated_at: nil)
|
|
570
|
+
# Some parameter documentations has been truncated, see
|
|
571
|
+
# {Sentdm::Models::WebhookListEventsResponse::EventData::SentDmServicesCommonServicesWebhooksContractsWebhookEventOfCallWebhookPayload::Payload}
|
|
572
|
+
# for more details.
|
|
573
|
+
#
|
|
574
|
+
# Body of a call.initiated, call.answered, call.completed, call.failed or
|
|
575
|
+
# call.recording_ready event. Which of them occurred is the envelope's event.
|
|
576
|
+
#
|
|
577
|
+
# Shaped like the message, inbound, template and channel payloads: account_id
|
|
578
|
+
# names the account the event is about, channel names the channel, and updated_at
|
|
579
|
+
# is when the change happened on the call, in the same yyyy-MM-ddTHH:mm:ssZ form.
|
|
580
|
+
# duration_seconds and price are added on call.completed, reason on call.failed
|
|
581
|
+
# and recording_id on call.recording_ready; each is omitted rather than sent as
|
|
582
|
+
# null when it does not apply.
|
|
583
|
+
#
|
|
584
|
+
# Casing is snake_case because these ride the same webhook stream customers
|
|
585
|
+
# already parse message_id from; the question/answer contract is a separate
|
|
586
|
+
# surface and stays camelCase. Nothing here is provider-shaped: no provider call
|
|
587
|
+
# id, no namespaced identity.
|
|
588
|
+
#
|
|
589
|
+
# @param call_id [String] Sent's call id, the same one the customer saw on the first question.
|
|
590
|
+
#
|
|
591
|
+
# @param account_id [String] The account the call belongs to: the key's own customer, or the sender profile i
|
|
592
|
+
#
|
|
593
|
+
# @param channel [String] Always voice.
|
|
594
|
+
#
|
|
595
|
+
# @param duration_seconds [Integer, nil] How long the call lasted. Only on call.completed.
|
|
596
|
+
#
|
|
597
|
+
# @param number [String] The customer number that owns the call, in E.164 format.
|
|
598
|
+
#
|
|
599
|
+
# @param price [Float, nil] What the call was charged. Only on call.completed, and omitted there until billi
|
|
600
|
+
#
|
|
601
|
+
# @param reason [String, nil] The machine-readable reason the call did not complete. Only on call.failed, and
|
|
602
|
+
#
|
|
603
|
+
# @param recording_id [String, nil] The recording that became available, the same id GET /v3/calls/{id}/recordings l
|
|
604
|
+
#
|
|
605
|
+
# @param updated_at [String] When the change happened on the call, as opposed to when the event was emitted.
|
|
606
|
+
end
|
|
607
|
+
end
|
|
608
|
+
|
|
121
609
|
# @!method self.variants
|
|
122
|
-
# @return [Array(Sentdm::Models::MessageEvent, Sentdm::Models::InboundMessageEvent, Sentdm::Models::TemplateEvent, Sentdm::Models::ChannelEvent, Sentdm::Models::ContactEvent)]
|
|
610
|
+
# @return [Array(Sentdm::Models::MessageEvent, Sentdm::Models::InboundMessageEvent, Sentdm::Models::TemplateEvent, Sentdm::Models::ChannelEvent, Sentdm::Models::ContactEvent, Sentdm::Models::WebhookListEventsResponse::EventData::SentDmServicesCommonServicesWebhooksContractsWebhookEventOfLinkWebhookPayload, Sentdm::Models::WebhookListEventsResponse::EventData::SentDmServicesCommonServicesWebhooksContractsWebhookEventOfCallWebhookPayload)]
|
|
123
611
|
end
|
|
124
612
|
end
|
|
125
613
|
end
|
|
@@ -46,6 +46,13 @@ module Sentdm
|
|
|
46
46
|
# @return [Boolean, nil]
|
|
47
47
|
optional :sandbox, Sentdm::Internal::Type::Boolean
|
|
48
48
|
|
|
49
|
+
# @!attribute sender_profile
|
|
50
|
+
# Request-only: the events an organization webhook's sender profile clones
|
|
51
|
+
# receive, one clone per existing and future profile. Responses never return it.
|
|
52
|
+
#
|
|
53
|
+
# @return [Sentdm::Models::WebhookUpdateParams::SenderProfile, nil]
|
|
54
|
+
optional :sender_profile, -> { Sentdm::WebhookUpdateParams::SenderProfile }, nil?: true
|
|
55
|
+
|
|
49
56
|
# @!attribute timeout_seconds
|
|
50
57
|
#
|
|
51
58
|
# @return [Integer, nil]
|
|
@@ -61,7 +68,7 @@ module Sentdm
|
|
|
61
68
|
# @return [String, nil]
|
|
62
69
|
optional :x_profile_id, String
|
|
63
70
|
|
|
64
|
-
# @!method initialize(id:, display_name: nil, endpoint_url: nil, event_filters: nil, event_types: nil, retry_count: nil, sandbox: nil, timeout_seconds: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
|
|
71
|
+
# @!method initialize(id:, display_name: nil, endpoint_url: nil, event_filters: nil, event_types: nil, retry_count: nil, sandbox: nil, sender_profile: nil, timeout_seconds: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
|
|
65
72
|
# Some parameter documentations has been truncated, see
|
|
66
73
|
# {Sentdm::Models::WebhookUpdateParams} for more details.
|
|
67
74
|
#
|
|
@@ -79,6 +86,8 @@ module Sentdm
|
|
|
79
86
|
#
|
|
80
87
|
# @param sandbox [Boolean] Sandbox flag - when true, the operation is simulated without side effects
|
|
81
88
|
#
|
|
89
|
+
# @param sender_profile [Sentdm::Models::WebhookUpdateParams::SenderProfile, nil] Request-only: the events an organization webhook's sender profile clones receive
|
|
90
|
+
#
|
|
82
91
|
# @param timeout_seconds [Integer]
|
|
83
92
|
#
|
|
84
93
|
# @param idempotency_key [String]
|
|
@@ -86,6 +95,27 @@ module Sentdm
|
|
|
86
95
|
# @param x_profile_id [String]
|
|
87
96
|
#
|
|
88
97
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
|
|
98
|
+
|
|
99
|
+
class SenderProfile < Sentdm::Internal::Type::BaseModel
|
|
100
|
+
# @!attribute event_filters
|
|
101
|
+
#
|
|
102
|
+
# @return [Hash{Symbol=>Array<String>}, nil]
|
|
103
|
+
optional :event_filters,
|
|
104
|
+
Sentdm::Internal::Type::HashOf[Sentdm::Internal::Type::ArrayOf[String]],
|
|
105
|
+
nil?: true
|
|
106
|
+
|
|
107
|
+
# @!attribute event_types
|
|
108
|
+
#
|
|
109
|
+
# @return [Array<String>, nil]
|
|
110
|
+
optional :event_types, Sentdm::Internal::Type::ArrayOf[String]
|
|
111
|
+
|
|
112
|
+
# @!method initialize(event_filters: nil, event_types: nil)
|
|
113
|
+
# Request-only: the events an organization webhook's sender profile clones
|
|
114
|
+
# receive, one clone per existing and future profile. Responses never return it.
|
|
115
|
+
#
|
|
116
|
+
# @param event_filters [Hash{Symbol=>Array<String>}, nil]
|
|
117
|
+
# @param event_types [Array<String>]
|
|
118
|
+
end
|
|
89
119
|
end
|
|
90
120
|
end
|
|
91
121
|
end
|
data/lib/sentdm/resources/me.rb
CHANGED
|
@@ -39,6 +39,11 @@ module Sentdm
|
|
|
39
39
|
# inventory — normally this account, and a different one where a number is shared.
|
|
40
40
|
# Both are `null` when the account has no US SMS sender.
|
|
41
41
|
#
|
|
42
|
+
# **Template auto-creation:** `enable_template_auto_creation_for_sp` reports
|
|
43
|
+
# whether this account may mark a template for automatic creation on its sender
|
|
44
|
+
# profiles. It is granted by Sent and off by default. A `profile` reports `false`,
|
|
45
|
+
# having no sender profiles of its own to create anything on.
|
|
46
|
+
#
|
|
42
47
|
# @overload retrieve(x_profile_id: nil, request_options: {})
|
|
43
48
|
#
|
|
44
49
|
# @param x_profile_id [String] Profile UUID to scope the request to a child profile. Only organization API keys
|