sentdm 0.25.0 → 0.27.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 (133) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +39 -0
  3. data/README.md +7 -11
  4. data/lib/sentdm/client.rb +4 -0
  5. data/lib/sentdm/models/api_response_of_contact_message_summary.rb +43 -0
  6. data/lib/sentdm/models/api_response_of_conversation_messages_list.rb +43 -0
  7. data/lib/sentdm/models/{sent_dm_services_common_contracts_poc_os_authentication_config.rb → authentication_config.rb} +2 -3
  8. data/lib/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_business_info.rb → brand_business_info.rb} +5 -7
  9. data/lib/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_compliance_info.rb → brand_compliance_info.rb} +2 -10
  10. data/lib/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_contact_info.rb → brand_contact_info.rb} +1 -1
  11. data/lib/sentdm/models/brands_brand_data.rb +9 -13
  12. data/lib/sentdm/models/contact_message_summary.rb +76 -0
  13. data/lib/sentdm/models/contact_retrieve_message_summary_params.rb +26 -0
  14. data/lib/sentdm/models/conversation_list_messages_params.rb +38 -0
  15. data/lib/sentdm/models/conversation_list_params.rb +32 -0
  16. data/lib/sentdm/models/conversation_messages_list.rb +245 -0
  17. data/lib/sentdm/models/inbound_message_event.rb +52 -0
  18. data/lib/sentdm/models/inbound_message_event_payload.rb +81 -0
  19. data/lib/sentdm/models/message_event.rb +53 -0
  20. data/lib/sentdm/models/message_event_payload.rb +92 -0
  21. data/lib/sentdm/models/message_send_response.rb +2 -6
  22. data/lib/sentdm/models/profile_detail.rb +13 -13
  23. data/lib/sentdm/models/profile_update_params.rb +2 -2
  24. data/lib/sentdm/models/profiles/{api_response_of_tcr_campaign_with_use_cases.rb → api_response_of_brand_campaign.rb} +5 -5
  25. data/lib/sentdm/models/profiles/{campaign_list_response.rb → api_response_of_list_of_brand_campaign.rb} +4 -6
  26. data/lib/sentdm/models/profiles/{tcr_campaign_with_use_cases.rb → brand_campaign.rb} +63 -111
  27. data/lib/sentdm/models/profiles/campaign_data.rb +13 -6
  28. data/lib/sentdm/models/profiles/campaign_use_case.rb +71 -0
  29. data/lib/sentdm/models/profiles/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data.rb → campaign_use_case_data.rb} +1 -1
  30. data/lib/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_body.rb → template_body.rb} +2 -3
  31. data/lib/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_button.rb → template_button.rb} +5 -6
  32. data/lib/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_button_props.rb → template_button_props.rb} +2 -3
  33. data/lib/sentdm/models/template_definition.rb +15 -19
  34. data/lib/sentdm/models/template_event.rb +52 -0
  35. data/lib/sentdm/models/template_event_payload.rb +88 -0
  36. data/lib/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_footer.rb → template_footer.rb} +1 -1
  37. data/lib/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_header.rb → template_header.rb} +2 -3
  38. data/lib/sentdm/models/webhook_list_events_response.rb +45 -3
  39. data/lib/sentdm/models.rb +44 -27
  40. data/lib/sentdm/resources/contacts.rb +30 -0
  41. data/lib/sentdm/resources/conversations.rb +82 -0
  42. data/lib/sentdm/resources/messages.rb +6 -1
  43. data/lib/sentdm/resources/profiles/campaigns.rb +6 -6
  44. data/lib/sentdm/resources/profiles.rb +34 -22
  45. data/lib/sentdm/resources/users.rb +3 -3
  46. data/lib/sentdm/version.rb +1 -1
  47. data/lib/sentdm.rb +28 -14
  48. data/rbi/sentdm/client.rbi +3 -0
  49. data/rbi/sentdm/models/api_response_of_contact_message_summary.rbi +79 -0
  50. data/rbi/sentdm/models/api_response_of_conversation_messages_list.rbi +79 -0
  51. data/rbi/sentdm/models/{sent_dm_services_common_contracts_poc_os_authentication_config.rbi → authentication_config.rbi} +2 -5
  52. data/rbi/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_business_info.rbi → brand_business_info.rbi} +12 -30
  53. data/rbi/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_compliance_info.rbi → brand_compliance_info.rbi} +2 -13
  54. data/rbi/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_contact_info.rbi → brand_contact_info.rbi} +2 -5
  55. data/rbi/sentdm/models/brands_brand_data.rbi +12 -51
  56. data/rbi/sentdm/models/contact_message_summary.rbi +144 -0
  57. data/rbi/sentdm/models/contact_retrieve_message_summary_params.rbi +49 -0
  58. data/rbi/sentdm/models/conversation_list_messages_params.rbi +65 -0
  59. data/rbi/sentdm/models/conversation_list_params.rbi +51 -0
  60. data/rbi/sentdm/models/conversation_messages_list.rbi +419 -0
  61. data/rbi/sentdm/models/inbound_message_event.rbi +88 -0
  62. data/rbi/sentdm/models/inbound_message_event_payload.rbi +122 -0
  63. data/rbi/sentdm/models/message_event.rbi +86 -0
  64. data/rbi/sentdm/models/message_event_payload.rbi +132 -0
  65. data/rbi/sentdm/models/message_send_response.rbi +2 -4
  66. data/rbi/sentdm/models/profile_detail.rbi +10 -12
  67. data/rbi/sentdm/models/profile_update_params.rbi +2 -2
  68. data/rbi/sentdm/models/profiles/{api_response_of_tcr_campaign_with_use_cases.rbi → api_response_of_brand_campaign.rbi} +8 -10
  69. data/rbi/sentdm/models/profiles/{campaign_list_response.rbi → api_response_of_list_of_brand_campaign.rbi} +5 -13
  70. data/rbi/sentdm/models/profiles/brand_campaign.rbi +299 -0
  71. data/rbi/sentdm/models/profiles/campaign_data.rbi +16 -18
  72. data/rbi/sentdm/models/profiles/campaign_use_case.rbi +110 -0
  73. data/rbi/sentdm/models/profiles/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data.rbi → campaign_use_case_data.rbi} +2 -2
  74. data/rbi/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_body.rbi → template_body.rbi} +2 -7
  75. data/rbi/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_button.rbi → template_button.rbi} +6 -22
  76. data/rbi/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_button_props.rbi → template_button_props.rbi} +2 -5
  77. data/rbi/sentdm/models/template_definition.rbi +19 -87
  78. data/rbi/sentdm/models/template_event.rbi +84 -0
  79. data/rbi/sentdm/models/template_event_payload.rbi +131 -0
  80. data/rbi/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_footer.rbi → template_footer.rbi} +2 -5
  81. data/rbi/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_header.rbi → template_header.rbi} +2 -5
  82. data/rbi/sentdm/models/webhook_list_events_response.rbi +60 -4
  83. data/rbi/sentdm/models.rbi +48 -27
  84. data/rbi/sentdm/resources/contacts.rbi +20 -0
  85. data/rbi/sentdm/resources/conversations.rbi +61 -0
  86. data/rbi/sentdm/resources/messages.rbi +6 -1
  87. data/rbi/sentdm/resources/profiles/campaigns.rbi +3 -3
  88. data/rbi/sentdm/resources/profiles.rbi +32 -20
  89. data/rbi/sentdm/resources/users.rbi +3 -2
  90. data/sig/sentdm/client.rbs +2 -0
  91. data/sig/sentdm/models/api_response_of_contact_message_summary.rbs +39 -0
  92. data/sig/sentdm/models/api_response_of_conversation_messages_list.rbs +39 -0
  93. data/sig/sentdm/models/{sent_dm_services_common_contracts_poc_os_authentication_config.rbs → authentication_config.rbs} +2 -2
  94. data/sig/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_business_info.rbs → brand_business_info.rbs} +7 -7
  95. data/sig/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_compliance_info.rbs → brand_compliance_info.rbs} +2 -7
  96. data/sig/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_contact_info.rbs → brand_contact_info.rbs} +2 -2
  97. data/sig/sentdm/models/brands_brand_data.rbs +12 -12
  98. data/sig/sentdm/models/contact_message_summary.rbs +84 -0
  99. data/sig/sentdm/models/contact_retrieve_message_summary_params.rbs +30 -0
  100. data/sig/sentdm/models/conversation_list_messages_params.rbs +38 -0
  101. data/sig/sentdm/models/conversation_list_params.rbs +34 -0
  102. data/sig/sentdm/models/conversation_messages_list.rbs +240 -0
  103. data/sig/sentdm/models/inbound_message_event.rbs +39 -0
  104. data/sig/sentdm/models/inbound_message_event_payload.rbs +69 -0
  105. data/sig/sentdm/models/message_event.rbs +39 -0
  106. data/sig/sentdm/models/message_event_payload.rbs +72 -0
  107. data/sig/sentdm/models/profile_detail.rbs +0 -5
  108. data/sig/sentdm/models/profiles/{campaign_list_response.rbs → api_response_of_brand_campaign.rbs} +6 -6
  109. data/sig/sentdm/models/profiles/{api_response_of_tcr_campaign_with_use_cases.rbs → api_response_of_list_of_brand_campaign.rbs} +6 -6
  110. data/sig/sentdm/models/profiles/brand_campaign.rbs +194 -0
  111. data/sig/sentdm/models/profiles/campaign_data.rbs +12 -7
  112. data/sig/sentdm/models/profiles/campaign_use_case.rbs +66 -0
  113. data/sig/sentdm/models/profiles/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data.rbs → campaign_use_case_data.rbs} +2 -2
  114. data/sig/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_body.rbs → template_body.rbs} +2 -2
  115. data/sig/sentdm/models/template_button.rbs +28 -0
  116. data/sig/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_button_props.rbs → template_button_props.rbs} +2 -2
  117. data/sig/sentdm/models/template_definition.rbs +20 -20
  118. data/sig/sentdm/models/template_event.rbs +39 -0
  119. data/sig/sentdm/models/template_event_payload.rbs +76 -0
  120. data/sig/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_footer.rbs → template_footer.rbs} +2 -2
  121. data/sig/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_header.rbs → template_header.rbs} +2 -2
  122. data/sig/sentdm/models/webhook_list_events_response.rbs +18 -5
  123. data/sig/sentdm/models.rbs +44 -18
  124. data/sig/sentdm/resources/contacts.rbs +6 -0
  125. data/sig/sentdm/resources/conversations.rbs +22 -0
  126. data/sig/sentdm/resources/profiles/campaigns.rbs +3 -3
  127. metadata +86 -44
  128. data/lib/sentdm/models/profiles/base_dto.rb +0 -32
  129. data/rbi/sentdm/models/profiles/base_dto.rbi +0 -53
  130. data/rbi/sentdm/models/profiles/tcr_campaign_with_use_cases.rbi +0 -425
  131. data/sig/sentdm/models/profiles/base_dto.rbs +0 -27
  132. data/sig/sentdm/models/profiles/tcr_campaign_with_use_cases.rbs +0 -306
  133. data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button.rbs +0 -32
@@ -2,13 +2,10 @@
2
2
 
3
3
  module Sentdm
4
4
  module Models
5
- class SentDmServicesCommonContractsPocOsTemplateHeader < Sentdm::Internal::Type::BaseModel
5
+ class TemplateHeader < Sentdm::Internal::Type::BaseModel
6
6
  OrHash =
7
7
  T.type_alias do
8
- T.any(
9
- Sentdm::SentDmServicesCommonContractsPocOsTemplateHeader,
10
- Sentdm::Internal::AnyHash
11
- )
8
+ T.any(Sentdm::TemplateHeader, Sentdm::Internal::AnyHash)
12
9
  end
13
10
 
14
11
  # The header template text with optional variable placeholders (e.g., "Welcome to
@@ -183,10 +183,29 @@ module Sentdm
183
183
  sig { returns(T.nilable(String)) }
184
184
  attr_accessor :error_message
185
185
 
186
- sig { returns(T.nilable(T.anything)) }
186
+ # The exact event body that was delivered, or attempted, for this record. One of
187
+ # the three webhook envelopes: a message status change, an inbound message, or a
188
+ # template status change. Read field and event to tell which, the same way your
189
+ # endpoint does.
190
+ sig do
191
+ returns(
192
+ T.nilable(
193
+ Sentdm::Models::WebhookListEventsResponse::Data::Event::EventData::Variants
194
+ )
195
+ )
196
+ end
187
197
  attr_reader :event_data
188
198
 
189
- sig { params(event_data: T.anything).void }
199
+ sig do
200
+ params(
201
+ event_data:
202
+ T.any(
203
+ Sentdm::MessageEvent::OrHash,
204
+ Sentdm::InboundMessageEvent::OrHash,
205
+ Sentdm::TemplateEvent::OrHash
206
+ )
207
+ ).void
208
+ end
190
209
  attr_writer :event_data
191
210
 
192
211
  sig { returns(T.nilable(String)) }
@@ -214,7 +233,12 @@ module Sentdm
214
233
  delivery_attempts: Integer,
215
234
  delivery_status: String,
216
235
  error_message: T.nilable(String),
217
- event_data: T.anything,
236
+ event_data:
237
+ T.any(
238
+ Sentdm::MessageEvent::OrHash,
239
+ Sentdm::InboundMessageEvent::OrHash,
240
+ Sentdm::TemplateEvent::OrHash
241
+ ),
218
242
  event_type: String,
219
243
  http_status_code: T.nilable(Integer),
220
244
  processing_completed_at: T.nilable(Time),
@@ -228,6 +252,10 @@ module Sentdm
228
252
  delivery_attempts: nil,
229
253
  delivery_status: nil,
230
254
  error_message: nil,
255
+ # The exact event body that was delivered, or attempted, for this record. One of
256
+ # the three webhook envelopes: a message status change, an inbound message, or a
257
+ # template status change. Read field and event to tell which, the same way your
258
+ # endpoint does.
231
259
  event_data: nil,
232
260
  event_type: nil,
233
261
  http_status_code: nil,
@@ -245,7 +273,8 @@ module Sentdm
245
273
  delivery_attempts: Integer,
246
274
  delivery_status: String,
247
275
  error_message: T.nilable(String),
248
- event_data: T.anything,
276
+ event_data:
277
+ Sentdm::Models::WebhookListEventsResponse::Data::Event::EventData::Variants,
249
278
  event_type: String,
250
279
  http_status_code: T.nilable(Integer),
251
280
  processing_completed_at: T.nilable(Time),
@@ -256,6 +285,33 @@ module Sentdm
256
285
  end
257
286
  def to_hash
258
287
  end
288
+
289
+ # The exact event body that was delivered, or attempted, for this record. One of
290
+ # the three webhook envelopes: a message status change, an inbound message, or a
291
+ # template status change. Read field and event to tell which, the same way your
292
+ # endpoint does.
293
+ module EventData
294
+ extend Sentdm::Internal::Type::Union
295
+
296
+ Variants =
297
+ T.type_alias do
298
+ T.any(
299
+ Sentdm::MessageEvent,
300
+ Sentdm::InboundMessageEvent,
301
+ Sentdm::TemplateEvent
302
+ )
303
+ end
304
+
305
+ sig do
306
+ override.returns(
307
+ T::Array[
308
+ Sentdm::Models::WebhookListEventsResponse::Data::Event::EventData::Variants
309
+ ]
310
+ )
311
+ end
312
+ def self.variants
313
+ end
314
+ end
259
315
  end
260
316
  end
261
317
  end
@@ -5,6 +5,12 @@ module Sentdm
5
5
 
6
6
  APIResponseOfContact = Sentdm::Models::APIResponseOfContact
7
7
 
8
+ APIResponseOfContactMessageSummary =
9
+ Sentdm::Models::APIResponseOfContactMessageSummary
10
+
11
+ APIResponseOfConversationMessagesList =
12
+ Sentdm::Models::APIResponseOfConversationMessagesList
13
+
8
14
  APIResponseOfProfileDetail = Sentdm::Models::APIResponseOfProfileDetail
9
15
 
10
16
  APIResponseOfUser = Sentdm::Models::APIResponseOfUser
@@ -13,8 +19,16 @@ module Sentdm
13
19
 
14
20
  APIResponseWebhook = Sentdm::Models::APIResponseWebhook
15
21
 
22
+ AuthenticationConfig = Sentdm::Models::AuthenticationConfig
23
+
16
24
  BillingContactInfo = Sentdm::Models::BillingContactInfo
17
25
 
26
+ BrandBusinessInfo = Sentdm::Models::BrandBusinessInfo
27
+
28
+ BrandComplianceInfo = Sentdm::Models::BrandComplianceInfo
29
+
30
+ BrandContactInfo = Sentdm::Models::BrandContactInfo
31
+
18
32
  BrandsBrandData = Sentdm::Models::BrandsBrandData
19
33
 
20
34
  ContactCreateParams = Sentdm::Models::ContactCreateParams
@@ -23,18 +37,38 @@ module Sentdm
23
37
 
24
38
  ContactListParams = Sentdm::Models::ContactListParams
25
39
 
40
+ ContactMessageSummary = Sentdm::Models::ContactMessageSummary
41
+
26
42
  ContactResponse = Sentdm::Models::ContactResponse
27
43
 
44
+ ContactRetrieveMessageSummaryParams =
45
+ Sentdm::Models::ContactRetrieveMessageSummaryParams
46
+
28
47
  ContactRetrieveParams = Sentdm::Models::ContactRetrieveParams
29
48
 
30
49
  ContactUpdateParams = Sentdm::Models::ContactUpdateParams
31
50
 
51
+ ConversationListMessagesParams =
52
+ Sentdm::Models::ConversationListMessagesParams
53
+
54
+ ConversationListParams = Sentdm::Models::ConversationListParams
55
+
56
+ ConversationMessagesList = Sentdm::Models::ConversationMessagesList
57
+
32
58
  DestinationCountry = Sentdm::Models::DestinationCountry
33
59
 
34
60
  ErrorDetail = Sentdm::Models::ErrorDetail
35
61
 
62
+ InboundMessageEvent = Sentdm::Models::InboundMessageEvent
63
+
64
+ InboundMessageEventPayload = Sentdm::Models::InboundMessageEventPayload
65
+
36
66
  MeRetrieveParams = Sentdm::Models::MeRetrieveParams
37
67
 
68
+ MessageEvent = Sentdm::Models::MessageEvent
69
+
70
+ MessageEventPayload = Sentdm::Models::MessageEventPayload
71
+
38
72
  MessageRetrieveActivitiesParams =
39
73
  Sentdm::Models::MessageRetrieveActivitiesParams
40
74
 
@@ -68,47 +102,34 @@ module Sentdm
68
102
 
69
103
  ProfileUpdateParams = Sentdm::Models::ProfileUpdateParams
70
104
 
71
- SentDmServicesCommonContractsPocOsAuthenticationConfig =
72
- Sentdm::Models::SentDmServicesCommonContractsPocOsAuthenticationConfig
73
-
74
- SentDmServicesCommonContractsPocOsTemplateBody =
75
- Sentdm::Models::SentDmServicesCommonContractsPocOsTemplateBody
76
-
77
- SentDmServicesCommonContractsPocOsTemplateButton =
78
- Sentdm::Models::SentDmServicesCommonContractsPocOsTemplateButton
79
-
80
- SentDmServicesCommonContractsPocOsTemplateButtonProps =
81
- Sentdm::Models::SentDmServicesCommonContractsPocOsTemplateButtonProps
82
-
83
- SentDmServicesCommonContractsPocOsTemplateFooter =
84
- Sentdm::Models::SentDmServicesCommonContractsPocOsTemplateFooter
85
-
86
- SentDmServicesCommonContractsPocOsTemplateHeader =
87
- Sentdm::Models::SentDmServicesCommonContractsPocOsTemplateHeader
88
-
89
- SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo =
90
- Sentdm::Models::SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo
91
-
92
- SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfo =
93
- Sentdm::Models::SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfo
94
-
95
- SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfo =
96
- Sentdm::Models::SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfo
97
-
98
105
  TcrBrandRelationship = Sentdm::Models::TcrBrandRelationship
99
106
 
100
107
  TcrVertical = Sentdm::Models::TcrVertical
101
108
 
102
109
  Template = Sentdm::Models::Template
103
110
 
111
+ TemplateBody = Sentdm::Models::TemplateBody
112
+
104
113
  TemplateBodyContent = Sentdm::Models::TemplateBodyContent
105
114
 
115
+ TemplateButton = Sentdm::Models::TemplateButton
116
+
117
+ TemplateButtonProps = Sentdm::Models::TemplateButtonProps
118
+
106
119
  TemplateCreateParams = Sentdm::Models::TemplateCreateParams
107
120
 
108
121
  TemplateDefinition = Sentdm::Models::TemplateDefinition
109
122
 
110
123
  TemplateDeleteParams = Sentdm::Models::TemplateDeleteParams
111
124
 
125
+ TemplateEvent = Sentdm::Models::TemplateEvent
126
+
127
+ TemplateEventPayload = Sentdm::Models::TemplateEventPayload
128
+
129
+ TemplateFooter = Sentdm::Models::TemplateFooter
130
+
131
+ TemplateHeader = Sentdm::Models::TemplateHeader
132
+
112
133
  TemplateListParams = Sentdm::Models::TemplateListParams
113
134
 
114
135
  TemplateRetrieveParams = Sentdm::Models::TemplateRetrieveParams
@@ -145,6 +145,26 @@ module Sentdm
145
145
  )
146
146
  end
147
147
 
148
+ # Returns aggregate message counts, time bounds, channels used, and per-channel
149
+ # success/fail scores (each as a percentage 0-100 of messages on that channel) for
150
+ # one of your contacts. Successful terminal states: SENT/DELIVERED/READ for
151
+ # outbound, RECEIVED for inbound. Fail: FAILED.
152
+ sig do
153
+ params(
154
+ contact_id: String,
155
+ x_profile_id: String,
156
+ request_options: Sentdm::RequestOptions::OrHash
157
+ ).returns(Sentdm::APIResponseOfContactMessageSummary)
158
+ end
159
+ def retrieve_message_summary(
160
+ contact_id,
161
+ # Profile UUID to scope the request to a child profile. Only organization API keys
162
+ # can use this header. The profile must belong to the calling organization.
163
+ x_profile_id: nil,
164
+ request_options: {}
165
+ )
166
+ end
167
+
148
168
  # @api private
149
169
  sig { params(client: Sentdm::Client).returns(T.attached_class) }
150
170
  def self.new(client:)
@@ -0,0 +1,61 @@
1
+ # typed: strong
2
+
3
+ module Sentdm
4
+ module Resources
5
+ class Conversations
6
+ # Retrieves a paginated list of the authenticated customer's messages across all
7
+ # conversations, ordered by created date (most recent first).
8
+ sig do
9
+ params(
10
+ page: Integer,
11
+ page_size: Integer,
12
+ x_profile_id: String,
13
+ request_options: Sentdm::RequestOptions::OrHash
14
+ ).returns(Sentdm::APIResponseOfConversationMessagesList)
15
+ end
16
+ def list(
17
+ # Query param
18
+ page:,
19
+ # Query param
20
+ page_size:,
21
+ # Header param: Profile UUID to scope the request to a child profile. Only
22
+ # organization API keys can use this header. The profile must belong to the
23
+ # calling organization.
24
+ x_profile_id: nil,
25
+ request_options: {}
26
+ )
27
+ end
28
+
29
+ # Retrieves a paginated list of the messages in a single conversation (scoped to
30
+ # the authenticated customer), ordered by created date (most recent first).
31
+ sig do
32
+ params(
33
+ id: String,
34
+ page: Integer,
35
+ page_size: Integer,
36
+ x_profile_id: String,
37
+ request_options: Sentdm::RequestOptions::OrHash
38
+ ).returns(Sentdm::APIResponseOfConversationMessagesList)
39
+ end
40
+ def list_messages(
41
+ # Path param: Conversation id from the route.
42
+ id,
43
+ # Query param
44
+ page:,
45
+ # Query param
46
+ page_size:,
47
+ # Header param: Profile UUID to scope the request to a child profile. Only
48
+ # organization API keys can use this header. The profile must belong to the
49
+ # calling organization.
50
+ x_profile_id: nil,
51
+ request_options: {}
52
+ )
53
+ end
54
+
55
+ # @api private
56
+ sig { params(client: Sentdm::Client).returns(T.attached_class) }
57
+ def self.new(client:)
58
+ end
59
+ end
60
+ end
61
+ end
@@ -46,7 +46,12 @@ module Sentdm
46
46
  # multi-channel broadcast — when multiple channels are specified (e.g. ["sms",
47
47
  # "whatsapp"]), a separate message is created for each (recipient, channel) pair.
48
48
  # Returns immediately with per-recipient message IDs for async tracking via
49
- # webhooks or the GET /messages/{id} endpoint.
49
+ # webhooks or the GET /messages/{id} endpoint. Sends gated before any delivery
50
+ # attempt do not reject the request — an account-level precondition such as
51
+ # insufficient balance, a template not approved for sending, or free-form content
52
+ # with no open conversation with the contact. The send is accepted with 202 and
53
+ # the affected messages are reported as BLOCKED on GET /messages/{id} and the
54
+ # message.blocked webhook.
50
55
  sig do
51
56
  params(
52
57
  channel: T.nilable(T::Array[String]),
@@ -15,7 +15,7 @@ module Sentdm
15
15
  idempotency_key: String,
16
16
  x_profile_id: String,
17
17
  request_options: Sentdm::RequestOptions::OrHash
18
- ).returns(Sentdm::Profiles::APIResponseOfTcrCampaignWithUseCases)
18
+ ).returns(Sentdm::Profiles::APIResponseOfBrandCampaign)
19
19
  end
20
20
  def create(
21
21
  # Path param: Profile ID from route
@@ -48,7 +48,7 @@ module Sentdm
48
48
  idempotency_key: String,
49
49
  x_profile_id: String,
50
50
  request_options: Sentdm::RequestOptions::OrHash
51
- ).returns(Sentdm::Profiles::APIResponseOfTcrCampaignWithUseCases)
51
+ ).returns(Sentdm::Profiles::APIResponseOfBrandCampaign)
52
52
  end
53
53
  def update(
54
54
  # Path param: Campaign ID from route
@@ -79,7 +79,7 @@ module Sentdm
79
79
  profile_id: String,
80
80
  x_profile_id: String,
81
81
  request_options: Sentdm::RequestOptions::OrHash
82
- ).returns(Sentdm::Models::Profiles::CampaignListResponse)
82
+ ).returns(Sentdm::Profiles::APIResponseOfListOfBrandCampaign)
83
83
  end
84
84
  def list(
85
85
  # Profile ID from route
@@ -148,6 +148,7 @@ module Sentdm
148
148
  ).returns(Sentdm::APIResponseOfProfileDetail)
149
149
  end
150
150
  def retrieve(
151
+ # Profile ID from route parameter
151
152
  profile_id,
152
153
  # Profile UUID to scope the request to a child profile. Only organization API keys
153
154
  # can use this header. The profile must belong to the calling organization.
@@ -203,7 +204,7 @@ module Sentdm
203
204
  ).returns(Sentdm::APIResponseOfProfileDetail)
204
205
  end
205
206
  def update(
206
- # Path param
207
+ # Path param: Profile ID from route parameter
207
208
  profile_id,
208
209
  # Body param: Whether contacts are shared across profiles (optional)
209
210
  allow_contact_sharing: nil,
@@ -250,8 +251,7 @@ module Sentdm
250
251
  sandbox: nil,
251
252
  # Body param: Direct phone number for SMS sending (optional)
252
253
  sending_phone_number: nil,
253
- # Body param: Reference to another profile to use for SMS/Telnyx configuration
254
- # (optional)
254
+ # Body param: Reference to another profile to use for SMS configuration (optional)
255
255
  sending_phone_number_profile_id: nil,
256
256
  # Body param: Reference to another profile to use for WhatsApp configuration
257
257
  # (optional)
@@ -303,7 +303,7 @@ module Sentdm
303
303
  ).void
304
304
  end
305
305
  def delete(
306
- # Path param
306
+ # Path param: Profile ID from route parameter
307
307
  profile_id,
308
308
  # Body param: Sandbox flag - when true, the operation is simulated without side
309
309
  # effects Useful for testing integrations without actual execution
@@ -316,24 +316,36 @@ module Sentdm
316
316
  )
317
317
  end
318
318
 
319
- # Final step in profile compliance workflow. Validates all prerequisites (general
320
- # data, brand, campaigns), connects profile to Telnyx/WhatsApp, and sets status
321
- # based on configuration. The process runs in the background and calls the
322
- # provided webhook URL when finished.
319
+ # Final step in the profile compliance workflow. Validates all prerequisites (KYC,
320
+ # brand, campaigns, required documents), connects the profile to the SMS and
321
+ # WhatsApp channels, and sets its status based on configuration. Prerequisites are
322
+ # always validated first: if any fail the call returns 400. If they pass and the
323
+ # profile is already completed, the call returns 200 and does nothing. Otherwise
324
+ # it returns 202 and calls the provided webhook URL when background processing
325
+ # finishes.
326
+ #
327
+ # Prerequisites:
328
+ #
329
+ # - Profile must have a name, short name, and description (short name max 50
330
+ # characters, description max 5000)
331
+ # - webHookUrl must be supplied on the request
332
+ # - A KYC form submission is required
333
+ # - A brand is required, either on the profile or inherited from the parent
334
+ # organization
335
+ # - TCR applications must have at least one campaign, own or inherited
336
+ # - Destination countries marked as main must have their required compliance
337
+ # documents uploaded
323
338
  #
324
- # Prerequisites:
325
- # - Profile must be completed
326
- # - If inheritTcrBrand=false: Profile must have existing brand
327
- # - If inheritTcrBrand=true: Parent must have existing brand
328
- # - If TCR application: Must have at least one campaign (own or inherited)
329
- # - If inheritTcrCampaign=false: Profile should have campaigns
330
- # - If inheritTcrCampaign=true: Parent must have campaigns
339
+ # Resulting status:
331
340
  #
332
- # Status Logic:
333
- # - If both SMS and WhatsApp channels are missing → SUBMITTED
334
- # - If TCR application and not inheriting brand/campaigns → SUBMITTED
335
- # - If non-TCR with destination country (IsMain=true) → SUBMITTED
336
- # - Otherwise COMPLETED
341
+ # - If either the SMS or WhatsApp channel is unconfigured, the profile is
342
+ # SUBMITTED
343
+ # - For a TCR application that inherits both its brand and its campaigns, the
344
+ # profile is COMPLETED
345
+ # - For a TCR application that owns either its brand or its campaigns, the profile
346
+ # is COMPLETED once both have been submitted to TCR, and SUBMITTED until then
347
+ # - For a non-TCR application, the profile is SUBMITTED when a main destination
348
+ # country is set, and COMPLETED otherwise
337
349
  sig do
338
350
  params(
339
351
  profile_id: String,
@@ -14,6 +14,7 @@ module Sentdm
14
14
  ).returns(Sentdm::APIResponseOfUser)
15
15
  end
16
16
  def retrieve(
17
+ # User ID from route parameter
17
18
  user_id,
18
19
  # Profile UUID to scope the request to a child profile. Only organization API keys
19
20
  # can use this header. The profile must belong to the calling organization.
@@ -86,7 +87,7 @@ module Sentdm
86
87
  ).void
87
88
  end
88
89
  def remove(
89
- # Path param
90
+ # Path param: User ID from route parameter
90
91
  user_id,
91
92
  # Body param: Sandbox flag - when true, the operation is simulated without side
92
93
  # effects Useful for testing integrations without actual execution
@@ -112,7 +113,7 @@ module Sentdm
112
113
  ).returns(Sentdm::APIResponseOfUser)
113
114
  end
114
115
  def update_role(
115
- # Path param
116
+ # Path param: User ID from route parameter
116
117
  user_id,
117
118
  # Body param: User role: admin, billing, or developer (required)
118
119
  role: nil,
@@ -24,6 +24,8 @@ module Sentdm
24
24
 
25
25
  attr_reader contacts: Sentdm::Resources::Contacts
26
26
 
27
+ attr_reader conversations: Sentdm::Resources::Conversations
28
+
27
29
  attr_reader me: Sentdm::Resources::Me
28
30
 
29
31
  private def auth_headers: -> ::Hash[String, String]
@@ -0,0 +1,39 @@
1
+ module Sentdm
2
+ module Models
3
+ type api_response_of_contact_message_summary =
4
+ {
5
+ data: Sentdm::ContactMessageSummary?,
6
+ error: Sentdm::ErrorDetail?,
7
+ meta: Sentdm::APIMeta,
8
+ success: bool
9
+ }
10
+
11
+ class APIResponseOfContactMessageSummary < Sentdm::Internal::Type::BaseModel
12
+ attr_accessor data: Sentdm::ContactMessageSummary?
13
+
14
+ attr_accessor error: Sentdm::ErrorDetail?
15
+
16
+ attr_reader meta: Sentdm::APIMeta?
17
+
18
+ def meta=: (Sentdm::APIMeta) -> Sentdm::APIMeta
19
+
20
+ attr_reader success: bool?
21
+
22
+ def success=: (bool) -> bool
23
+
24
+ def initialize: (
25
+ ?data: Sentdm::ContactMessageSummary?,
26
+ ?error: Sentdm::ErrorDetail?,
27
+ ?meta: Sentdm::APIMeta,
28
+ ?success: bool
29
+ ) -> void
30
+
31
+ def to_hash: -> {
32
+ data: Sentdm::ContactMessageSummary?,
33
+ error: Sentdm::ErrorDetail?,
34
+ meta: Sentdm::APIMeta,
35
+ success: bool
36
+ }
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,39 @@
1
+ module Sentdm
2
+ module Models
3
+ type api_response_of_conversation_messages_list =
4
+ {
5
+ data: Sentdm::ConversationMessagesList?,
6
+ error: Sentdm::ErrorDetail?,
7
+ meta: Sentdm::APIMeta,
8
+ success: bool
9
+ }
10
+
11
+ class APIResponseOfConversationMessagesList < Sentdm::Internal::Type::BaseModel
12
+ attr_accessor data: Sentdm::ConversationMessagesList?
13
+
14
+ attr_accessor error: Sentdm::ErrorDetail?
15
+
16
+ attr_reader meta: Sentdm::APIMeta?
17
+
18
+ def meta=: (Sentdm::APIMeta) -> Sentdm::APIMeta
19
+
20
+ attr_reader success: bool?
21
+
22
+ def success=: (bool) -> bool
23
+
24
+ def initialize: (
25
+ ?data: Sentdm::ConversationMessagesList?,
26
+ ?error: Sentdm::ErrorDetail?,
27
+ ?meta: Sentdm::APIMeta,
28
+ ?success: bool
29
+ ) -> void
30
+
31
+ def to_hash: -> {
32
+ data: Sentdm::ConversationMessagesList?,
33
+ error: Sentdm::ErrorDetail?,
34
+ meta: Sentdm::APIMeta,
35
+ success: bool
36
+ }
37
+ end
38
+ end
39
+ end
@@ -1,9 +1,9 @@
1
1
  module Sentdm
2
2
  module Models
3
- type sent_dm_services_common_contracts_poc_os_authentication_config =
3
+ type authentication_config =
4
4
  { add_security_recommendation: bool, code_expiration_minutes: Integer? }
5
5
 
6
- class SentDmServicesCommonContractsPocOsAuthenticationConfig < Sentdm::Internal::Type::BaseModel
6
+ class AuthenticationConfig < Sentdm::Internal::Type::BaseModel
7
7
  attr_reader add_security_recommendation: bool?
8
8
 
9
9
  def add_security_recommendation=: (bool) -> bool
@@ -1,11 +1,11 @@
1
1
  module Sentdm
2
2
  module Models
3
- type sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_business_info =
3
+ type brand_business_info =
4
4
  {
5
5
  city: String?,
6
6
  country: String?,
7
7
  country_of_registration: String?,
8
- entity_type: Sentdm::Models::SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo::entity_type?,
8
+ entity_type: Sentdm::Models::BrandBusinessInfo::entity_type?,
9
9
  legal_name: String?,
10
10
  postal_code: String?,
11
11
  state: String?,
@@ -15,14 +15,14 @@ module Sentdm
15
15
  url: String?
16
16
  }
17
17
 
18
- class SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo < Sentdm::Internal::Type::BaseModel
18
+ class BrandBusinessInfo < Sentdm::Internal::Type::BaseModel
19
19
  attr_accessor city: String?
20
20
 
21
21
  attr_accessor country: String?
22
22
 
23
23
  attr_accessor country_of_registration: String?
24
24
 
25
- attr_accessor entity_type: Sentdm::Models::SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo::entity_type?
25
+ attr_accessor entity_type: Sentdm::Models::BrandBusinessInfo::entity_type?
26
26
 
27
27
  attr_accessor legal_name: String?
28
28
 
@@ -42,7 +42,7 @@ module Sentdm
42
42
  ?city: String?,
43
43
  ?country: String?,
44
44
  ?country_of_registration: String?,
45
- ?entity_type: Sentdm::Models::SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo::entity_type?,
45
+ ?entity_type: Sentdm::Models::BrandBusinessInfo::entity_type?,
46
46
  ?legal_name: String?,
47
47
  ?postal_code: String?,
48
48
  ?state: String?,
@@ -56,7 +56,7 @@ module Sentdm
56
56
  city: String?,
57
57
  country: String?,
58
58
  country_of_registration: String?,
59
- entity_type: Sentdm::Models::SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo::entity_type?,
59
+ entity_type: Sentdm::Models::BrandBusinessInfo::entity_type?,
60
60
  legal_name: String?,
61
61
  postal_code: String?,
62
62
  state: String?,
@@ -82,7 +82,7 @@ module Sentdm
82
82
  SOLE_PROPRIETOR: :SOLE_PROPRIETOR
83
83
  GOVERNMENT: :GOVERNMENT
84
84
 
85
- def self?.values: -> ::Array[Sentdm::Models::SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo::entity_type]
85
+ def self?.values: -> ::Array[Sentdm::Models::BrandBusinessInfo::entity_type]
86
86
  end
87
87
  end
88
88
  end