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.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/sentdm/client.rb +6 -0
  5. data/lib/sentdm/models/channel_event_payload.rb +154 -7
  6. data/lib/sentdm/models/contact_event.rb +15 -7
  7. data/lib/sentdm/models/contact_event_payload.rb +77 -16
  8. data/lib/sentdm/models/conversation_messages_list.rb +214 -6
  9. data/lib/sentdm/models/inbound_message_event_payload.rb +70 -3
  10. data/lib/sentdm/models/me_retrieve_response.rb +21 -1
  11. data/lib/sentdm/models/message_event_payload.rb +42 -1
  12. data/lib/sentdm/models/message_retrieve_activities_response.rb +42 -5
  13. data/lib/sentdm/models/message_retrieve_status_response.rb +222 -8
  14. data/lib/sentdm/models/message_send_params.rb +67 -3
  15. data/lib/sentdm/models/message_send_response.rb +13 -4
  16. data/lib/sentdm/models/template_body.rb +82 -1
  17. data/lib/sentdm/models/template_create_params.rb +11 -1
  18. data/lib/sentdm/models/template_header.rb +91 -3
  19. data/lib/sentdm/models/template_variable.rb +15 -1
  20. data/lib/sentdm/models/webhook_create_params.rb +31 -1
  21. data/lib/sentdm/models/webhook_list_events_response.rb +497 -9
  22. data/lib/sentdm/models/webhook_update_params.rb +31 -1
  23. data/lib/sentdm/resources/me.rb +5 -0
  24. data/lib/sentdm/resources/messages.rb +33 -5
  25. data/lib/sentdm/resources/templates.rb +3 -1
  26. data/lib/sentdm/resources/webhooks.rb +9 -3
  27. data/lib/sentdm/version.rb +1 -1
  28. data/lib/sentdm.rb +1 -1
  29. data/rbi/sentdm/client.rbi +6 -0
  30. data/rbi/sentdm/models/channel_event_payload.rbi +273 -10
  31. data/rbi/sentdm/models/contact_event.rbi +28 -12
  32. data/rbi/sentdm/models/contact_event_payload.rbi +118 -28
  33. data/rbi/sentdm/models/conversation_messages_list.rbi +308 -10
  34. data/rbi/sentdm/models/inbound_message_event_payload.rbi +110 -2
  35. data/rbi/sentdm/models/me_retrieve_response.rbi +35 -0
  36. data/rbi/sentdm/models/message_event_payload.rbi +50 -0
  37. data/rbi/sentdm/models/message_retrieve_activities_response.rbi +49 -5
  38. data/rbi/sentdm/models/message_retrieve_status_response.rbi +320 -12
  39. data/rbi/sentdm/models/message_send_params.rbi +100 -2
  40. data/rbi/sentdm/models/message_send_response.rbi +15 -5
  41. data/rbi/sentdm/models/template_body.rbi +133 -0
  42. data/rbi/sentdm/models/template_create_params.rbi +15 -0
  43. data/rbi/sentdm/models/template_header.rbi +143 -2
  44. data/rbi/sentdm/models/template_variable.rbi +10 -0
  45. data/rbi/sentdm/models/webhook_create_params.rbi +61 -0
  46. data/rbi/sentdm/models/webhook_list_events_response.rbi +747 -12
  47. data/rbi/sentdm/models/webhook_update_params.rbi +61 -0
  48. data/rbi/sentdm/resources/me.rbi +5 -0
  49. data/rbi/sentdm/resources/messages.rbi +58 -3
  50. data/rbi/sentdm/resources/templates.rbi +6 -0
  51. data/rbi/sentdm/resources/webhooks.rbi +15 -1
  52. data/sig/sentdm/models/channel_event_payload.rbs +62 -0
  53. data/sig/sentdm/models/contact_event_payload.rbs +24 -9
  54. data/sig/sentdm/models/conversation_messages_list.rbs +99 -6
  55. data/sig/sentdm/models/inbound_message_event_payload.rbs +37 -0
  56. data/sig/sentdm/models/me_retrieve_response.rbs +7 -0
  57. data/sig/sentdm/models/message_event_payload.rbs +20 -0
  58. data/sig/sentdm/models/message_retrieve_activities_response.rbs +15 -0
  59. data/sig/sentdm/models/message_retrieve_status_response.rbs +99 -6
  60. data/sig/sentdm/models/message_send_params.rbs +15 -0
  61. data/sig/sentdm/models/template_body.rbs +44 -0
  62. data/sig/sentdm/models/template_create_params.rbs +7 -0
  63. data/sig/sentdm/models/template_header.rbs +44 -0
  64. data/sig/sentdm/models/webhook_create_params.rbs +29 -0
  65. data/sig/sentdm/models/webhook_list_events_response.rbs +252 -0
  66. data/sig/sentdm/models/webhook_update_params.rbs +29 -0
  67. data/sig/sentdm/resources/messages.rbs +3 -0
  68. data/sig/sentdm/resources/templates.rbs +1 -0
  69. data/sig/sentdm/resources/webhooks.rbs +2 -0
  70. metadata +2 -2
@@ -6,6 +6,19 @@ module Sentdm
6
6
  OrHash =
7
7
  T.type_alias { T.any(Sentdm::TemplateBody, Sentdm::Internal::AnyHash) }
8
8
 
9
+ # MMS-specific content — subject, text and attachments.
10
+ #
11
+ # Like Rcs, an override that cannot stand on its own: a template still needs a
12
+ # MultiChannel body or the Sms + Whatsapp pair to be deliverable at all. Unlike
13
+ # Rcs, it has no fallback at send time — MMS with no media is a more expensive
14
+ # SMS, so a template without this slot is deliberately not MMS-capable and never
15
+ # produces an MMS route candidate.
16
+ sig { returns(T.nilable(Sentdm::TemplateBody::Mms)) }
17
+ attr_reader :mms
18
+
19
+ sig { params(mms: T.nilable(Sentdm::TemplateBody::Mms::OrHash)).void }
20
+ attr_writer :mms
21
+
9
22
  # The shared body, used for every channel. One half of the choice described above.
10
23
  sig { returns(T.nilable(Sentdm::TemplateBodyContent)) }
11
24
  attr_reader :multi_channel
@@ -54,6 +67,7 @@ module Sentdm
54
67
  # the copy, but cannot stand alone.
55
68
  sig do
56
69
  params(
70
+ mms: T.nilable(Sentdm::TemplateBody::Mms::OrHash),
57
71
  multi_channel: T.nilable(Sentdm::TemplateBodyContent::OrHash),
58
72
  rcs: T.nilable(Sentdm::TemplateBodyContent::OrHash),
59
73
  sms: T.nilable(Sentdm::TemplateBodyContent::OrHash),
@@ -61,6 +75,14 @@ module Sentdm
61
75
  ).returns(T.attached_class)
62
76
  end
63
77
  def self.new(
78
+ # MMS-specific content — subject, text and attachments.
79
+ #
80
+ # Like Rcs, an override that cannot stand on its own: a template still needs a
81
+ # MultiChannel body or the Sms + Whatsapp pair to be deliverable at all. Unlike
82
+ # Rcs, it has no fallback at send time — MMS with no media is a more expensive
83
+ # SMS, so a template without this slot is deliberately not MMS-capable and never
84
+ # produces an MMS route candidate.
85
+ mms: nil,
64
86
  # The shared body, used for every channel. One half of the choice described above.
65
87
  multi_channel: nil,
66
88
  # RCS-specific copy that overrides the chosen strategy for RCS only. The one true
@@ -77,6 +99,7 @@ module Sentdm
77
99
  sig do
78
100
  override.returns(
79
101
  {
102
+ mms: T.nilable(Sentdm::TemplateBody::Mms),
80
103
  multi_channel: T.nilable(Sentdm::TemplateBodyContent),
81
104
  rcs: T.nilable(Sentdm::TemplateBodyContent),
82
105
  sms: T.nilable(Sentdm::TemplateBodyContent),
@@ -86,6 +109,116 @@ module Sentdm
86
109
  end
87
110
  def to_hash
88
111
  end
112
+
113
+ class Mms < Sentdm::Models::TemplateBodyContent
114
+ OrHash =
115
+ T.type_alias do
116
+ T.any(Sentdm::TemplateBody::Mms, Sentdm::Internal::AnyHash)
117
+ end
118
+
119
+ # Attachments carried by every send on this template, in order. A per-send
120
+ # media_urls on the request replaces this list rather than adding to it, so a
121
+ # template can hold a default creative and a caller can still send something
122
+ # recipient-specific.
123
+ sig { returns(T.nilable(T::Array[Sentdm::TemplateBody::Mms::Media])) }
124
+ attr_accessor :media
125
+
126
+ # MMS subject line. Optional — most handsets render it above the body, some ignore
127
+ # it entirely. Deliberately its own field rather than riding TemplateHeader: the
128
+ # header is authored once and shared across every channel, and carries Meta's
129
+ # 60-character cap plus its no-newline, no-emoji text rules, none of which
130
+ # describe an MMS subject.
131
+ sig { returns(T.nilable(String)) }
132
+ attr_accessor :subject
133
+
134
+ # MMS-specific content — subject, text and attachments.
135
+ #
136
+ # Like Rcs, an override that cannot stand on its own: a template still needs a
137
+ # MultiChannel body or the Sms + Whatsapp pair to be deliverable at all. Unlike
138
+ # Rcs, it has no fallback at send time — MMS with no media is a more expensive
139
+ # SMS, so a template without this slot is deliberately not MMS-capable and never
140
+ # produces an MMS route candidate.
141
+ sig do
142
+ params(
143
+ media:
144
+ T.nilable(T::Array[Sentdm::TemplateBody::Mms::Media::OrHash]),
145
+ subject: T.nilable(String)
146
+ ).returns(T.attached_class)
147
+ end
148
+ def self.new(
149
+ # Attachments carried by every send on this template, in order. A per-send
150
+ # media_urls on the request replaces this list rather than adding to it, so a
151
+ # template can hold a default creative and a caller can still send something
152
+ # recipient-specific.
153
+ media: nil,
154
+ # MMS subject line. Optional — most handsets render it above the body, some ignore
155
+ # it entirely. Deliberately its own field rather than riding TemplateHeader: the
156
+ # header is authored once and shared across every channel, and carries Meta's
157
+ # 60-character cap plus its no-newline, no-emoji text rules, none of which
158
+ # describe an MMS subject.
159
+ subject: nil
160
+ )
161
+ end
162
+
163
+ sig do
164
+ override.returns(
165
+ {
166
+ media: T.nilable(T::Array[Sentdm::TemplateBody::Mms::Media]),
167
+ subject: T.nilable(String)
168
+ }
169
+ )
170
+ end
171
+ def to_hash
172
+ end
173
+
174
+ class Media < Sentdm::Internal::Type::BaseModel
175
+ OrHash =
176
+ T.type_alias do
177
+ T.any(Sentdm::TemplateBody::Mms::Media, Sentdm::Internal::AnyHash)
178
+ end
179
+
180
+ # One of MmsMediaTypes. Advisory: the carrier reads the Content-Type off the
181
+ # fetched object, not this field. It exists so an authoring UI can render the
182
+ # right preview and so a reviewer can see what was intended.
183
+ sig { returns(T.nilable(String)) }
184
+ attr_accessor :media_type
185
+
186
+ # Publicly fetchable https URL. The carrier's MMSC fetches this at send time, so
187
+ # it has to stay reachable and unauthenticated for the life of the send —
188
+ # including retries and a DLQ replay — which is why a presigned URL is not a valid
189
+ # value here.
190
+ sig { returns(T.nilable(String)) }
191
+ attr_reader :url
192
+
193
+ sig { params(url: String).void }
194
+ attr_writer :url
195
+
196
+ # One attachment on an MMS template body.
197
+ sig do
198
+ params(media_type: T.nilable(String), url: String).returns(
199
+ T.attached_class
200
+ )
201
+ end
202
+ def self.new(
203
+ # One of MmsMediaTypes. Advisory: the carrier reads the Content-Type off the
204
+ # fetched object, not this field. It exists so an authoring UI can render the
205
+ # right preview and so a reviewer can see what was intended.
206
+ media_type: nil,
207
+ # Publicly fetchable https URL. The carrier's MMSC fetches this at send time, so
208
+ # it has to stay reachable and unauthenticated for the life of the send —
209
+ # including retries and a DLQ replay — which is why a presigned URL is not a valid
210
+ # value here.
211
+ url: nil
212
+ )
213
+ end
214
+
215
+ sig do
216
+ override.returns({ media_type: T.nilable(String), url: String })
217
+ end
218
+ def to_hash
219
+ end
220
+ end
221
+ end
89
222
  end
90
223
  end
91
224
  end
@@ -11,6 +11,15 @@ module Sentdm
11
11
  T.any(Sentdm::TemplateCreateParams, Sentdm::Internal::AnyHash)
12
12
  end
13
13
 
14
+ # Create this template automatically on every sender profile of the organization,
15
+ # now and in future (default: false). Accepted only from an organization that has
16
+ # been enabled for it, and only at creation — it cannot be changed afterwards.
17
+ sig { returns(T.nilable(T::Boolean)) }
18
+ attr_reader :auto_create_for_sp
19
+
20
+ sig { params(auto_create_for_sp: T::Boolean).void }
21
+ attr_writer :auto_create_for_sp
22
+
14
23
  # Template category: MARKETING, UTILITY, AUTHENTICATION (optional, auto-detected
15
24
  # if not provided)
16
25
  sig { returns(T.nilable(String)) }
@@ -61,6 +70,7 @@ module Sentdm
61
70
 
62
71
  sig do
63
72
  params(
73
+ auto_create_for_sp: T::Boolean,
64
74
  category: T.nilable(String),
65
75
  creation_source: T.nilable(String),
66
76
  definition: Sentdm::TemplateDefinition::OrHash,
@@ -73,6 +83,10 @@ module Sentdm
73
83
  ).returns(T.attached_class)
74
84
  end
75
85
  def self.new(
86
+ # Create this template automatically on every sender profile of the organization,
87
+ # now and in future (default: false). Accepted only from an organization that has
88
+ # been enabled for it, and only at creation — it cannot be changed afterwards.
89
+ auto_create_for_sp: nil,
76
90
  # Template category: MARKETING, UTILITY, AUTHENTICATION (optional, auto-detected
77
91
  # if not provided)
78
92
  category: nil,
@@ -97,6 +111,7 @@ module Sentdm
97
111
  sig do
98
112
  override.returns(
99
113
  {
114
+ auto_create_for_sp: T::Boolean,
100
115
  category: T.nilable(String),
101
116
  creation_source: T.nilable(String),
102
117
  definition: Sentdm::TemplateDefinition,
@@ -13,7 +13,59 @@ module Sentdm
13
13
  sig { returns(String) }
14
14
  attr_accessor :template
15
15
 
16
- # The type of header (e.g., "text", "image", "video", "document")
16
+ # Request-only. The s.dm URL of the asset Meta's reviewers see —
17
+ # https://s.dm/s/{ID}, eight uppercase characters, uploaded to s.dm out of band.
18
+ # NormalizeRichHeader folds it into the synthesized media variable's Props.Sample
19
+ # and clears it, so it never persists and a stored definition is indistinguishable
20
+ # from an imported one.
21
+ #
22
+ # Stricter than the send path on purpose:
23
+ # TemplateUtils.ValidateMediaVariableValues accepts any absolute https URL for the
24
+ # per-send asset, because that one is the customer's and may live behind a signed
25
+ # CDN link. This one is the review sample, has to outlive every resubmission, and
26
+ # so must be ours. Do not "fix" one to match the other.
27
+ sig { returns(T.nilable(String)) }
28
+ attr_accessor :example_url
29
+
30
+ # The map pin a location header drops. Meta wants none of this at creation — the
31
+ # component is just {"type":"header","format":"location"} — so these values exist
32
+ # for Sent: a preview, and the default a StaticResource header falls back to at
33
+ # send.
34
+ sig { returns(T.nilable(Sentdm::TemplateHeader::Location)) }
35
+ attr_reader :location
36
+
37
+ sig do
38
+ params(
39
+ location: T.nilable(Sentdm::TemplateHeader::Location::OrHash)
40
+ ).void
41
+ end
42
+ attr_writer :location
43
+
44
+ # Whether the asset registered at creation is reused when a caller omits the
45
+ # header's variable at send time. Default false — the caller must supply it per
46
+ # message, which is the behaviour every existing template has. Written only when
47
+ # true, so a default-valued header serializes byte-identically to one imported
48
+ # from Meta.
49
+ #
50
+ # Stored and validated but not yet honoured at send: that lands with the Resumable
51
+ # Upload work, alongside the code that lets such a template be approved in the
52
+ # first place.
53
+ sig { returns(T.nilable(T::Boolean)) }
54
+ attr_reader :static_resource
55
+
56
+ sig { params(static_resource: T::Boolean).void }
57
+ attr_writer :static_resource
58
+
59
+ # The kind of header. One of:
60
+ #
61
+ # text — up to 60 characters, at most one variable. image — png, jpg or jpeg.
62
+ # Needs ExampleUrl. video — mp4. Needs ExampleUrl. gif — mp4, max 3.5MB. WhatsApp
63
+ # renders larger files as an ordinary video. Needs ExampleUrl. document — pdf or
64
+ # docx; only the first page is shown as a thumbnail, so pdf is the practical
65
+ # choice. Needs ExampleUrl. location — a map pin, supplied through Location.
66
+ #
67
+ # Kept lowercase because MetaToTemplateConverter writes Meta's format through
68
+ # ToLowerInvariant() into this field on import, and the two are compared directly.
17
69
  sig { returns(T.nilable(String)) }
18
70
  attr_accessor :type
19
71
 
@@ -25,6 +77,9 @@ module Sentdm
25
77
  sig do
26
78
  params(
27
79
  template: String,
80
+ example_url: T.nilable(String),
81
+ location: T.nilable(Sentdm::TemplateHeader::Location::OrHash),
82
+ static_resource: T::Boolean,
28
83
  type: T.nilable(String),
29
84
  variables: T.nilable(T::Array[Sentdm::TemplateVariable::OrHash])
30
85
  ).returns(T.attached_class)
@@ -33,7 +88,43 @@ module Sentdm
33
88
  # The header template text with optional variable placeholders (e.g., "Welcome to
34
89
  # {{0:variable}}")
35
90
  template:,
36
- # The type of header (e.g., "text", "image", "video", "document")
91
+ # Request-only. The s.dm URL of the asset Meta's reviewers see —
92
+ # https://s.dm/s/{ID}, eight uppercase characters, uploaded to s.dm out of band.
93
+ # NormalizeRichHeader folds it into the synthesized media variable's Props.Sample
94
+ # and clears it, so it never persists and a stored definition is indistinguishable
95
+ # from an imported one.
96
+ #
97
+ # Stricter than the send path on purpose:
98
+ # TemplateUtils.ValidateMediaVariableValues accepts any absolute https URL for the
99
+ # per-send asset, because that one is the customer's and may live behind a signed
100
+ # CDN link. This one is the review sample, has to outlive every resubmission, and
101
+ # so must be ours. Do not "fix" one to match the other.
102
+ example_url: nil,
103
+ # The map pin a location header drops. Meta wants none of this at creation — the
104
+ # component is just {"type":"header","format":"location"} — so these values exist
105
+ # for Sent: a preview, and the default a StaticResource header falls back to at
106
+ # send.
107
+ location: nil,
108
+ # Whether the asset registered at creation is reused when a caller omits the
109
+ # header's variable at send time. Default false — the caller must supply it per
110
+ # message, which is the behaviour every existing template has. Written only when
111
+ # true, so a default-valued header serializes byte-identically to one imported
112
+ # from Meta.
113
+ #
114
+ # Stored and validated but not yet honoured at send: that lands with the Resumable
115
+ # Upload work, alongside the code that lets such a template be approved in the
116
+ # first place.
117
+ static_resource: nil,
118
+ # The kind of header. One of:
119
+ #
120
+ # text — up to 60 characters, at most one variable. image — png, jpg or jpeg.
121
+ # Needs ExampleUrl. video — mp4. Needs ExampleUrl. gif — mp4, max 3.5MB. WhatsApp
122
+ # renders larger files as an ordinary video. Needs ExampleUrl. document — pdf or
123
+ # docx; only the first page is shown as a thumbnail, so pdf is the practical
124
+ # choice. Needs ExampleUrl. location — a map pin, supplied through Location.
125
+ #
126
+ # Kept lowercase because MetaToTemplateConverter writes Meta's format through
127
+ # ToLowerInvariant() into this field on import, and the two are compared directly.
37
128
  type: nil,
38
129
  # List of variables used in the header template
39
130
  variables: nil
@@ -44,6 +135,9 @@ module Sentdm
44
135
  override.returns(
45
136
  {
46
137
  template: String,
138
+ example_url: T.nilable(String),
139
+ location: T.nilable(Sentdm::TemplateHeader::Location),
140
+ static_resource: T::Boolean,
47
141
  type: T.nilable(String),
48
142
  variables: T.nilable(T::Array[Sentdm::TemplateVariable])
49
143
  }
@@ -51,6 +145,53 @@ module Sentdm
51
145
  end
52
146
  def to_hash
53
147
  end
148
+
149
+ class Location < Sentdm::Internal::Type::BaseModel
150
+ OrHash =
151
+ T.type_alias do
152
+ T.any(Sentdm::TemplateHeader::Location, Sentdm::Internal::AnyHash)
153
+ end
154
+
155
+ sig { returns(String) }
156
+ attr_accessor :address
157
+
158
+ sig { returns(String) }
159
+ attr_accessor :latitude
160
+
161
+ sig { returns(String) }
162
+ attr_accessor :longitude
163
+
164
+ sig { returns(String) }
165
+ attr_accessor :name
166
+
167
+ # The map pin a location header drops. Meta wants none of this at creation — the
168
+ # component is just {"type":"header","format":"location"} — so these values exist
169
+ # for Sent: a preview, and the default a StaticResource header falls back to at
170
+ # send.
171
+ sig do
172
+ params(
173
+ address: String,
174
+ latitude: String,
175
+ longitude: String,
176
+ name: String
177
+ ).returns(T.attached_class)
178
+ end
179
+ def self.new(address:, latitude:, longitude:, name:)
180
+ end
181
+
182
+ sig do
183
+ override.returns(
184
+ {
185
+ address: String,
186
+ latitude: String,
187
+ longitude: String,
188
+ name: String
189
+ }
190
+ )
191
+ end
192
+ def to_hash
193
+ end
194
+ end
54
195
  end
55
196
  end
56
197
  end
@@ -86,6 +86,11 @@ module Sentdm
86
86
  sig { returns(String) }
87
87
  attr_accessor :media_type
88
88
 
89
+ # Example value substituted into the template when previewing it and when
90
+ # submitting it to Meta for review. Free text by nature, so the converter accepts
91
+ # a JSON number or boolean here and normalizes it — see
92
+ # JsonScalarToStringConverter for why — and guarantees it is always serialized
93
+ # back out as a JSON string.
89
94
  sig { returns(String) }
90
95
  attr_accessor :sample
91
96
 
@@ -117,6 +122,11 @@ module Sentdm
117
122
  end
118
123
  def self.new(
119
124
  media_type:,
125
+ # Example value substituted into the template when previewing it and when
126
+ # submitting it to Meta for review. Free text by nature, so the converter accepts
127
+ # a JSON number or boolean here and normalizes it — see
128
+ # JsonScalarToStringConverter for why — and guarantees it is always serialized
129
+ # back out as a JSON string.
120
130
  sample:,
121
131
  url:,
122
132
  variable_type:,
@@ -46,6 +46,19 @@ module Sentdm
46
46
  sig { params(sandbox: T::Boolean).void }
47
47
  attr_writer :sandbox
48
48
 
49
+ # Request-only: the events an organization webhook's sender profile clones
50
+ # receive, one clone per existing and future profile. Responses never return it.
51
+ sig { returns(T.nilable(Sentdm::WebhookCreateParams::SenderProfile)) }
52
+ attr_reader :sender_profile
53
+
54
+ sig do
55
+ params(
56
+ sender_profile:
57
+ T.nilable(Sentdm::WebhookCreateParams::SenderProfile::OrHash)
58
+ ).void
59
+ end
60
+ attr_writer :sender_profile
61
+
49
62
  sig { returns(T.nilable(Integer)) }
50
63
  attr_reader :timeout_seconds
51
64
 
@@ -72,6 +85,8 @@ module Sentdm
72
85
  event_types: T::Array[String],
73
86
  retry_count: Integer,
74
87
  sandbox: T::Boolean,
88
+ sender_profile:
89
+ T.nilable(Sentdm::WebhookCreateParams::SenderProfile::OrHash),
75
90
  timeout_seconds: Integer,
76
91
  idempotency_key: String,
77
92
  x_profile_id: String,
@@ -87,6 +102,9 @@ module Sentdm
87
102
  # Sandbox flag - when true, the operation is simulated without side effects Useful
88
103
  # for testing integrations without actual execution
89
104
  sandbox: nil,
105
+ # Request-only: the events an organization webhook's sender profile clones
106
+ # receive, one clone per existing and future profile. Responses never return it.
107
+ sender_profile: nil,
90
108
  timeout_seconds: nil,
91
109
  idempotency_key: nil,
92
110
  x_profile_id: nil,
@@ -103,6 +121,8 @@ module Sentdm
103
121
  event_types: T::Array[String],
104
122
  retry_count: Integer,
105
123
  sandbox: T::Boolean,
124
+ sender_profile:
125
+ T.nilable(Sentdm::WebhookCreateParams::SenderProfile),
106
126
  timeout_seconds: Integer,
107
127
  idempotency_key: String,
108
128
  x_profile_id: String,
@@ -112,6 +132,47 @@ module Sentdm
112
132
  end
113
133
  def to_hash
114
134
  end
135
+
136
+ class SenderProfile < Sentdm::Internal::Type::BaseModel
137
+ OrHash =
138
+ T.type_alias do
139
+ T.any(
140
+ Sentdm::WebhookCreateParams::SenderProfile,
141
+ Sentdm::Internal::AnyHash
142
+ )
143
+ end
144
+
145
+ sig { returns(T.nilable(T::Hash[Symbol, T::Array[String]])) }
146
+ attr_accessor :event_filters
147
+
148
+ sig { returns(T.nilable(T::Array[String])) }
149
+ attr_reader :event_types
150
+
151
+ sig { params(event_types: T::Array[String]).void }
152
+ attr_writer :event_types
153
+
154
+ # Request-only: the events an organization webhook's sender profile clones
155
+ # receive, one clone per existing and future profile. Responses never return it.
156
+ sig do
157
+ params(
158
+ event_filters: T.nilable(T::Hash[Symbol, T::Array[String]]),
159
+ event_types: T::Array[String]
160
+ ).returns(T.attached_class)
161
+ end
162
+ def self.new(event_filters: nil, event_types: nil)
163
+ end
164
+
165
+ sig do
166
+ override.returns(
167
+ {
168
+ event_filters: T.nilable(T::Hash[Symbol, T::Array[String]]),
169
+ event_types: T::Array[String]
170
+ }
171
+ )
172
+ end
173
+ def to_hash
174
+ end
175
+ end
115
176
  end
116
177
  end
117
178
  end