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
@@ -0,0 +1,88 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ class TemplateEventPayload < Sentdm::Internal::Type::BaseModel
6
+ # @!attribute account_id
7
+ # The account the template belongs to.
8
+ #
9
+ # @return [String, nil]
10
+ optional :account_id, String
11
+
12
+ # @!attribute category
13
+ # The template's category, for example UTILITY, MARKETING, or AUTHENTICATION.
14
+ #
15
+ # @return [String, nil]
16
+ optional :category, String
17
+
18
+ # @!attribute channel
19
+ # The channel the template applies to.
20
+ #
21
+ # @return [String, nil]
22
+ optional :channel, String
23
+
24
+ # @!attribute language
25
+ # The template's language code, for example en_US.
26
+ #
27
+ # @return [String, nil]
28
+ optional :language, String
29
+
30
+ # @!attribute reason
31
+ # Why the template reached Status, when a reason was given. Populated on a
32
+ # rejection.
33
+ #
34
+ # @return [String, nil]
35
+ optional :reason, String, nil?: true
36
+
37
+ # @!attribute status
38
+ # The review status the template just reached, for example APPROVED or REJECTED.
39
+ #
40
+ # @return [String, nil]
41
+ optional :status, String
42
+
43
+ # @!attribute template_id
44
+ # The template in Sent.
45
+ #
46
+ # @return [String, nil]
47
+ optional :template_id, String
48
+
49
+ # @!attribute template_name
50
+ # The template's display name.
51
+ #
52
+ # @return [String, nil]
53
+ optional :template_name, String
54
+
55
+ # @!attribute whatsapp_template_id
56
+ # The template's identifier with Meta, assigned when the template is submitted for
57
+ # review.
58
+ #
59
+ # @return [String, nil]
60
+ optional :whatsapp_template_id, String
61
+
62
+ # @!method initialize(account_id: nil, category: nil, channel: nil, language: nil, reason: nil, status: nil, template_id: nil, template_name: nil, whatsapp_template_id: nil)
63
+ # Some parameter documentations has been truncated, see
64
+ # {Sentdm::Models::TemplateEventPayload} for more details.
65
+ #
66
+ # Body of a template status event. Delivered when a template's review outcome
67
+ # changes, so you can react without polling.
68
+ #
69
+ # @param account_id [String] The account the template belongs to.
70
+ #
71
+ # @param category [String] The template's category, for example UTILITY, MARKETING, or
72
+ #
73
+ # @param channel [String] The channel the template applies to.
74
+ #
75
+ # @param language [String] The template's language code, for example en_US.
76
+ #
77
+ # @param reason [String, nil] Why the template reached Status, when a reason was given. Populated on a
78
+ #
79
+ # @param status [String] The review status the template just reached, for example APPROVED or
80
+ #
81
+ # @param template_id [String] The template in Sent.
82
+ #
83
+ # @param template_name [String] The template's display name.
84
+ #
85
+ # @param whatsapp_template_id [String] The template's identifier with Meta, assigned when the template is submitted for
86
+ end
87
+ end
88
+ end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Sentdm
4
4
  module Models
5
- class SentDmServicesCommonContractsPocOsTemplateFooter < Sentdm::Internal::Type::BaseModel
5
+ class TemplateFooter < Sentdm::Internal::Type::BaseModel
6
6
  # @!attribute template
7
7
  # The footer template text with optional variable placeholders
8
8
  #
@@ -2,7 +2,7 @@
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
  # @!attribute template
7
7
  # The header template text with optional variable placeholders (e.g., "Welcome to
8
8
  # {{0:variable}}")
@@ -24,8 +24,7 @@ module Sentdm
24
24
 
25
25
  # @!method initialize(template:, type: nil, variables: nil)
26
26
  # Some parameter documentations has been truncated, see
27
- # {Sentdm::Models::SentDmServicesCommonContractsPocOsTemplateHeader} for more
28
- # details.
27
+ # {Sentdm::Models::TemplateHeader} for more details.
29
28
  #
30
29
  # Header section of a message template
31
30
  #
@@ -87,9 +87,13 @@ module Sentdm
87
87
  optional :error_message, String, nil?: true
88
88
 
89
89
  # @!attribute event_data
90
+ # The exact event body that was delivered, or attempted, for this record. One of
91
+ # the three webhook envelopes: a message status change, an inbound message, or a
92
+ # template status change. Read field and event to tell which, the same way your
93
+ # endpoint does.
90
94
  #
91
- # @return [Object, nil]
92
- optional :event_data, Sentdm::Internal::Type::Unknown
95
+ # @return [Sentdm::Models::MessageEvent, Sentdm::Models::InboundMessageEvent, Sentdm::Models::TemplateEvent, nil]
96
+ optional :event_data, union: -> { Sentdm::Models::WebhookListEventsResponse::Data::Event::EventData }
93
97
 
94
98
  # @!attribute event_type
95
99
  #
@@ -117,17 +121,55 @@ module Sentdm
117
121
  optional :response_body, String, nil?: true
118
122
 
119
123
  # @!method initialize(id: nil, created_at: nil, delivery_attempts: nil, delivery_status: nil, error_message: nil, event_data: nil, event_type: nil, http_status_code: nil, processing_completed_at: nil, processing_started_at: nil, response_body: nil)
124
+ # Some parameter documentations has been truncated, see
125
+ # {Sentdm::Models::WebhookListEventsResponse::Data::Event} for more details.
126
+ #
120
127
  # @param id [String]
128
+ #
121
129
  # @param created_at [Time]
130
+ #
122
131
  # @param delivery_attempts [Integer]
132
+ #
123
133
  # @param delivery_status [String]
134
+ #
124
135
  # @param error_message [String, nil]
125
- # @param event_data [Object]
136
+ #
137
+ # @param event_data [Sentdm::Models::MessageEvent, Sentdm::Models::InboundMessageEvent, Sentdm::Models::TemplateEvent] The exact event body that was delivered, or attempted, for this record. One of t
138
+ #
126
139
  # @param event_type [String]
140
+ #
127
141
  # @param http_status_code [Integer, nil]
142
+ #
128
143
  # @param processing_completed_at [Time, nil]
144
+ #
129
145
  # @param processing_started_at [Time, nil]
146
+ #
130
147
  # @param response_body [String, nil]
148
+
149
+ # The exact event body that was delivered, or attempted, for this record. One of
150
+ # the three webhook envelopes: a message status change, an inbound message, or a
151
+ # template status change. Read field and event to tell which, the same way your
152
+ # endpoint does.
153
+ #
154
+ # @see Sentdm::Models::WebhookListEventsResponse::Data::Event#event_data
155
+ module EventData
156
+ extend Sentdm::Internal::Type::Union
157
+
158
+ # The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares this shape and
159
+ # varies only in Payload.
160
+ variant -> { Sentdm::MessageEvent }
161
+
162
+ # The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares this shape and
163
+ # varies only in Payload.
164
+ variant -> { Sentdm::InboundMessageEvent }
165
+
166
+ # The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares this shape and
167
+ # varies only in Payload.
168
+ variant -> { Sentdm::TemplateEvent }
169
+
170
+ # @!method self.variants
171
+ # @return [Array(Sentdm::Models::MessageEvent, Sentdm::Models::InboundMessageEvent, Sentdm::Models::TemplateEvent)]
172
+ end
131
173
  end
132
174
  end
133
175
  end
data/lib/sentdm/models.rb CHANGED
@@ -43,6 +43,10 @@ module Sentdm
43
43
 
44
44
  APIResponseOfContact = Sentdm::Models::APIResponseOfContact
45
45
 
46
+ APIResponseOfContactMessageSummary = Sentdm::Models::APIResponseOfContactMessageSummary
47
+
48
+ APIResponseOfConversationMessagesList = Sentdm::Models::APIResponseOfConversationMessagesList
49
+
46
50
  APIResponseOfProfileDetail = Sentdm::Models::APIResponseOfProfileDetail
47
51
 
48
52
  APIResponseOfUser = Sentdm::Models::APIResponseOfUser
@@ -51,8 +55,16 @@ module Sentdm
51
55
 
52
56
  APIResponseWebhook = Sentdm::Models::APIResponseWebhook
53
57
 
58
+ AuthenticationConfig = Sentdm::Models::AuthenticationConfig
59
+
54
60
  BillingContactInfo = Sentdm::Models::BillingContactInfo
55
61
 
62
+ BrandBusinessInfo = Sentdm::Models::BrandBusinessInfo
63
+
64
+ BrandComplianceInfo = Sentdm::Models::BrandComplianceInfo
65
+
66
+ BrandContactInfo = Sentdm::Models::BrandContactInfo
67
+
56
68
  BrandsBrandData = Sentdm::Models::BrandsBrandData
57
69
 
58
70
  ContactCreateParams = Sentdm::Models::ContactCreateParams
@@ -61,18 +73,36 @@ module Sentdm
61
73
 
62
74
  ContactListParams = Sentdm::Models::ContactListParams
63
75
 
76
+ ContactMessageSummary = Sentdm::Models::ContactMessageSummary
77
+
64
78
  ContactResponse = Sentdm::Models::ContactResponse
65
79
 
80
+ ContactRetrieveMessageSummaryParams = Sentdm::Models::ContactRetrieveMessageSummaryParams
81
+
66
82
  ContactRetrieveParams = Sentdm::Models::ContactRetrieveParams
67
83
 
68
84
  ContactUpdateParams = Sentdm::Models::ContactUpdateParams
69
85
 
86
+ ConversationListMessagesParams = Sentdm::Models::ConversationListMessagesParams
87
+
88
+ ConversationListParams = Sentdm::Models::ConversationListParams
89
+
90
+ ConversationMessagesList = Sentdm::Models::ConversationMessagesList
91
+
70
92
  DestinationCountry = Sentdm::Models::DestinationCountry
71
93
 
72
94
  ErrorDetail = Sentdm::Models::ErrorDetail
73
95
 
96
+ InboundMessageEvent = Sentdm::Models::InboundMessageEvent
97
+
98
+ InboundMessageEventPayload = Sentdm::Models::InboundMessageEventPayload
99
+
74
100
  MeRetrieveParams = Sentdm::Models::MeRetrieveParams
75
101
 
102
+ MessageEvent = Sentdm::Models::MessageEvent
103
+
104
+ MessageEventPayload = Sentdm::Models::MessageEventPayload
105
+
76
106
  MessageRetrieveActivitiesParams = Sentdm::Models::MessageRetrieveActivitiesParams
77
107
 
78
108
  MessageRetrieveStatusParams = Sentdm::Models::MessageRetrieveStatusParams
@@ -105,47 +135,34 @@ module Sentdm
105
135
 
106
136
  ProfileUpdateParams = Sentdm::Models::ProfileUpdateParams
107
137
 
108
- SentDmServicesCommonContractsPocOsAuthenticationConfig =
109
- Sentdm::Models::SentDmServicesCommonContractsPocOsAuthenticationConfig
110
-
111
- SentDmServicesCommonContractsPocOsTemplateBody =
112
- Sentdm::Models::SentDmServicesCommonContractsPocOsTemplateBody
113
-
114
- SentDmServicesCommonContractsPocOsTemplateButton =
115
- Sentdm::Models::SentDmServicesCommonContractsPocOsTemplateButton
116
-
117
- SentDmServicesCommonContractsPocOsTemplateButtonProps =
118
- Sentdm::Models::SentDmServicesCommonContractsPocOsTemplateButtonProps
119
-
120
- SentDmServicesCommonContractsPocOsTemplateFooter =
121
- Sentdm::Models::SentDmServicesCommonContractsPocOsTemplateFooter
122
-
123
- SentDmServicesCommonContractsPocOsTemplateHeader =
124
- Sentdm::Models::SentDmServicesCommonContractsPocOsTemplateHeader
125
-
126
- SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo =
127
- Sentdm::Models::SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo
128
-
129
- SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfo =
130
- Sentdm::Models::SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfo
131
-
132
- SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfo =
133
- Sentdm::Models::SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfo
134
-
135
138
  TcrBrandRelationship = Sentdm::Models::TcrBrandRelationship
136
139
 
137
140
  TcrVertical = Sentdm::Models::TcrVertical
138
141
 
139
142
  Template = Sentdm::Models::Template
140
143
 
144
+ TemplateBody = Sentdm::Models::TemplateBody
145
+
141
146
  TemplateBodyContent = Sentdm::Models::TemplateBodyContent
142
147
 
148
+ TemplateButton = Sentdm::Models::TemplateButton
149
+
150
+ TemplateButtonProps = Sentdm::Models::TemplateButtonProps
151
+
143
152
  TemplateCreateParams = Sentdm::Models::TemplateCreateParams
144
153
 
145
154
  TemplateDefinition = Sentdm::Models::TemplateDefinition
146
155
 
147
156
  TemplateDeleteParams = Sentdm::Models::TemplateDeleteParams
148
157
 
158
+ TemplateEvent = Sentdm::Models::TemplateEvent
159
+
160
+ TemplateEventPayload = Sentdm::Models::TemplateEventPayload
161
+
162
+ TemplateFooter = Sentdm::Models::TemplateFooter
163
+
164
+ TemplateHeader = Sentdm::Models::TemplateHeader
165
+
149
166
  TemplateListParams = Sentdm::Models::TemplateListParams
150
167
 
151
168
  TemplateRetrieveParams = Sentdm::Models::TemplateRetrieveParams
@@ -176,6 +176,36 @@ module Sentdm
176
176
  )
177
177
  end
178
178
 
179
+ # Some parameter documentations has been truncated, see
180
+ # {Sentdm::Models::ContactRetrieveMessageSummaryParams} for more details.
181
+ #
182
+ # Returns aggregate message counts, time bounds, channels used, and per-channel
183
+ # success/fail scores (each as a percentage 0-100 of messages on that channel) for
184
+ # one of your contacts. Successful terminal states: SENT/DELIVERED/READ for
185
+ # outbound, RECEIVED for inbound. Fail: FAILED.
186
+ #
187
+ # @overload retrieve_message_summary(contact_id, x_profile_id: nil, request_options: {})
188
+ #
189
+ # @param contact_id [String]
190
+ #
191
+ # @param x_profile_id [String] Profile UUID to scope the request to a child profile. Only organization API keys
192
+ #
193
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
194
+ #
195
+ # @return [Sentdm::Models::APIResponseOfContactMessageSummary]
196
+ #
197
+ # @see Sentdm::Models::ContactRetrieveMessageSummaryParams
198
+ def retrieve_message_summary(contact_id, params = {})
199
+ parsed, options = Sentdm::ContactRetrieveMessageSummaryParams.dump_request(params)
200
+ @client.request(
201
+ method: :get,
202
+ path: ["v3/contacts/%1$s/message-summary", contact_id],
203
+ headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
204
+ model: Sentdm::APIResponseOfContactMessageSummary,
205
+ options: options
206
+ )
207
+ end
208
+
179
209
  # @api private
180
210
  #
181
211
  # @param client [Sentdm::Client]
@@ -0,0 +1,82 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Resources
5
+ class Conversations
6
+ # Some parameter documentations has been truncated, see
7
+ # {Sentdm::Models::ConversationListParams} for more details.
8
+ #
9
+ # Retrieves a paginated list of the authenticated customer's messages across all
10
+ # conversations, ordered by created date (most recent first).
11
+ #
12
+ # @overload list(page:, page_size:, x_profile_id: nil, request_options: {})
13
+ #
14
+ # @param page [Integer] Query param
15
+ #
16
+ # @param page_size [Integer] Query param
17
+ #
18
+ # @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
19
+ #
20
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
21
+ #
22
+ # @return [Sentdm::Models::APIResponseOfConversationMessagesList]
23
+ #
24
+ # @see Sentdm::Models::ConversationListParams
25
+ def list(params)
26
+ query_params = [:page, :page_size]
27
+ parsed, options = Sentdm::ConversationListParams.dump_request(params)
28
+ query = Sentdm::Internal::Util.encode_query_params(parsed.slice(*query_params))
29
+ @client.request(
30
+ method: :get,
31
+ path: "v3/conversations",
32
+ query: query,
33
+ headers: parsed.except(*query_params).transform_keys(x_profile_id: "x-profile-id"),
34
+ model: Sentdm::APIResponseOfConversationMessagesList,
35
+ options: options
36
+ )
37
+ end
38
+
39
+ # Some parameter documentations has been truncated, see
40
+ # {Sentdm::Models::ConversationListMessagesParams} for more details.
41
+ #
42
+ # Retrieves a paginated list of the messages in a single conversation (scoped to
43
+ # the authenticated customer), ordered by created date (most recent first).
44
+ #
45
+ # @overload list_messages(id, page:, page_size:, x_profile_id: nil, request_options: {})
46
+ #
47
+ # @param id [String] Path param: Conversation id from the route.
48
+ #
49
+ # @param page [Integer] Query param
50
+ #
51
+ # @param page_size [Integer] Query param
52
+ #
53
+ # @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
54
+ #
55
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
56
+ #
57
+ # @return [Sentdm::Models::APIResponseOfConversationMessagesList]
58
+ #
59
+ # @see Sentdm::Models::ConversationListMessagesParams
60
+ def list_messages(id, params)
61
+ query_params = [:page, :page_size]
62
+ parsed, options = Sentdm::ConversationListMessagesParams.dump_request(params)
63
+ query = Sentdm::Internal::Util.encode_query_params(parsed.slice(*query_params))
64
+ @client.request(
65
+ method: :get,
66
+ path: ["v3/conversations/%1$s", id],
67
+ query: query,
68
+ headers: parsed.except(*query_params).transform_keys(x_profile_id: "x-profile-id"),
69
+ model: Sentdm::APIResponseOfConversationMessagesList,
70
+ options: options
71
+ )
72
+ end
73
+
74
+ # @api private
75
+ #
76
+ # @param client [Sentdm::Client]
77
+ def initialize(client:)
78
+ @client = client
79
+ end
80
+ end
81
+ end
82
+ end
@@ -67,7 +67,12 @@ module Sentdm
67
67
  # multi-channel broadcast — when multiple channels are specified (e.g. ["sms",
68
68
  # "whatsapp"]), a separate message is created for each (recipient, channel) pair.
69
69
  # Returns immediately with per-recipient message IDs for async tracking via
70
- # webhooks or the GET /messages/{id} endpoint.
70
+ # webhooks or the GET /messages/{id} endpoint. Sends gated before any delivery
71
+ # attempt do not reject the request — an account-level precondition such as
72
+ # insufficient balance, a template not approved for sending, or free-form content
73
+ # with no open conversation with the contact. The send is accepted with 202 and
74
+ # the affected messages are reported as BLOCKED on GET /messages/{id} and the
75
+ # message.blocked webhook.
71
76
  #
72
77
  # @overload send_(channel: nil, sandbox: nil, template: nil, text: nil, to: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
73
78
  #
@@ -25,7 +25,7 @@ module Sentdm
25
25
  #
26
26
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
27
27
  #
28
- # @return [Sentdm::Models::Profiles::APIResponseOfTcrCampaignWithUseCases]
28
+ # @return [Sentdm::Models::Profiles::APIResponseOfBrandCampaign]
29
29
  #
30
30
  # @see Sentdm::Models::Profiles::CampaignCreateParams
31
31
  def create(profile_id, params)
@@ -36,7 +36,7 @@ module Sentdm
36
36
  path: ["v3/profiles/%1$s/campaigns", profile_id],
37
37
  headers: parsed.slice(*header_params.keys).transform_keys(header_params),
38
38
  body: parsed.except(*header_params.keys),
39
- model: Sentdm::Profiles::APIResponseOfTcrCampaignWithUseCases,
39
+ model: Sentdm::Profiles::APIResponseOfBrandCampaign,
40
40
  options: options
41
41
  )
42
42
  end
@@ -63,7 +63,7 @@ module Sentdm
63
63
  #
64
64
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
65
65
  #
66
- # @return [Sentdm::Models::Profiles::APIResponseOfTcrCampaignWithUseCases]
66
+ # @return [Sentdm::Models::Profiles::APIResponseOfBrandCampaign]
67
67
  #
68
68
  # @see Sentdm::Models::Profiles::CampaignUpdateParams
69
69
  def update(campaign_id, params)
@@ -78,7 +78,7 @@ module Sentdm
78
78
  path: ["v3/profiles/%1$s/campaigns/%2$s", profile_id, campaign_id],
79
79
  headers: parsed.slice(*header_params.keys).transform_keys(header_params),
80
80
  body: parsed.except(*header_params.keys),
81
- model: Sentdm::Profiles::APIResponseOfTcrCampaignWithUseCases,
81
+ model: Sentdm::Profiles::APIResponseOfBrandCampaign,
82
82
  options: options
83
83
  )
84
84
  end
@@ -97,7 +97,7 @@ module Sentdm
97
97
  #
98
98
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
99
99
  #
100
- # @return [Sentdm::Models::Profiles::CampaignListResponse]
100
+ # @return [Sentdm::Models::Profiles::APIResponseOfListOfBrandCampaign]
101
101
  #
102
102
  # @see Sentdm::Models::Profiles::CampaignListParams
103
103
  def list(profile_id, params = {})
@@ -106,7 +106,7 @@ module Sentdm
106
106
  method: :get,
107
107
  path: ["v3/profiles/%1$s/campaigns", profile_id],
108
108
  headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
109
- model: Sentdm::Models::Profiles::CampaignListResponse,
109
+ model: Sentdm::Profiles::APIResponseOfListOfBrandCampaign,
110
110
  options: options
111
111
  )
112
112
  end
@@ -113,7 +113,7 @@ module Sentdm
113
113
  #
114
114
  # @overload retrieve(profile_id, x_profile_id: nil, request_options: {})
115
115
  #
116
- # @param profile_id [String]
116
+ # @param profile_id [String] Profile ID from route parameter
117
117
  #
118
118
  # @param x_profile_id [String] Profile UUID to scope the request to a child profile. Only organization API keys
119
119
  #
@@ -157,7 +157,7 @@ module Sentdm
157
157
  #
158
158
  # @overload update(profile_id, allow_contact_sharing: nil, allow_number_change_during_onboarding: nil, allow_template_sharing: nil, billing_contact: nil, billing_model: nil, brand: nil, description: nil, icon: nil, inherit_contacts: nil, inherit_tcr_brand: nil, inherit_tcr_campaign: nil, inherit_templates: nil, name: nil, payment_details: nil, sandbox: nil, sending_phone_number: nil, sending_phone_number_profile_id: nil, sending_whatsapp_number_profile_id: nil, short_name: nil, whatsapp_phone_number: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
159
159
  #
160
- # @param profile_id [String] Path param
160
+ # @param profile_id [String] Path param: Profile ID from route parameter
161
161
  #
162
162
  # @param allow_contact_sharing [Boolean, nil] Body param: Whether contacts are shared across profiles (optional)
163
163
  #
@@ -191,7 +191,7 @@ module Sentdm
191
191
  #
192
192
  # @param sending_phone_number [String, nil] Body param: Direct phone number for SMS sending (optional)
193
193
  #
194
- # @param sending_phone_number_profile_id [String, nil] Body param: Reference to another profile to use for SMS/Telnyx configuration (op
194
+ # @param sending_phone_number_profile_id [String, nil] Body param: Reference to another profile to use for SMS configuration (optional)
195
195
  #
196
196
  # @param sending_whatsapp_number_profile_id [String, nil] Body param: Reference to another profile to use for WhatsApp configuration (opti
197
197
  #
@@ -257,7 +257,7 @@ module Sentdm
257
257
  #
258
258
  # @overload delete(profile_id, sandbox: nil, x_profile_id: nil, request_options: {})
259
259
  #
260
- # @param profile_id [String] Path param
260
+ # @param profile_id [String] Path param: Profile ID from route parameter
261
261
  #
262
262
  # @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
263
263
  #
@@ -284,24 +284,36 @@ module Sentdm
284
284
  # Some parameter documentations has been truncated, see
285
285
  # {Sentdm::Models::ProfileCompleteParams} for more details.
286
286
  #
287
- # Final step in profile compliance workflow. Validates all prerequisites (general
288
- # data, brand, campaigns), connects profile to Telnyx/WhatsApp, and sets status
289
- # based on configuration. The process runs in the background and calls the
290
- # provided webhook URL when finished.
291
- #
292
- # Prerequisites:
293
- # - Profile must be completed
294
- # - If inheritTcrBrand=false: Profile must have existing brand
295
- # - If inheritTcrBrand=true: Parent must have existing brand
296
- # - If TCR application: Must have at least one campaign (own or inherited)
297
- # - If inheritTcrCampaign=false: Profile should have campaigns
298
- # - If inheritTcrCampaign=true: Parent must have campaigns
299
- #
300
- # Status Logic:
301
- # - If both SMS and WhatsApp channels are missing SUBMITTED
302
- # - If TCR application and not inheriting brand/campaigns → SUBMITTED
303
- # - If non-TCR with destination country (IsMain=true) SUBMITTED
304
- # - Otherwise COMPLETED
287
+ # Final step in the profile compliance workflow. Validates all prerequisites (KYC,
288
+ # brand, campaigns, required documents), connects the profile to the SMS and
289
+ # WhatsApp channels, and sets its status based on configuration. Prerequisites are
290
+ # always validated first: if any fail the call returns 400. If they pass and the
291
+ # profile is already completed, the call returns 200 and does nothing. Otherwise
292
+ # it returns 202 and calls the provided webhook URL when background processing
293
+ # finishes.
294
+ #
295
+ # Prerequisites:
296
+ #
297
+ # - Profile must have a name, short name, and description (short name max 50
298
+ # characters, description max 5000)
299
+ # - webHookUrl must be supplied on the request
300
+ # - A KYC form submission is required
301
+ # - A brand is required, either on the profile or inherited from the parent
302
+ # organization
303
+ # - TCR applications must have at least one campaign, own or inherited
304
+ # - Destination countries marked as main must have their required compliance
305
+ # documents uploaded
306
+ #
307
+ # Resulting status:
308
+ #
309
+ # - If either the SMS or WhatsApp channel is unconfigured, the profile is
310
+ # SUBMITTED
311
+ # - For a TCR application that inherits both its brand and its campaigns, the
312
+ # profile is COMPLETED
313
+ # - For a TCR application that owns either its brand or its campaigns, the profile
314
+ # is COMPLETED once both have been submitted to TCR, and SUBMITTED until then
315
+ # - For a non-TCR application, the profile is SUBMITTED when a main destination
316
+ # country is set, and COMPLETED otherwise
305
317
  #
306
318
  # @overload complete(profile_id, web_hook_url:, sandbox: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
307
319
  #
@@ -12,7 +12,7 @@ module Sentdm
12
12
  #
13
13
  # @overload retrieve(user_id, x_profile_id: nil, request_options: {})
14
14
  #
15
- # @param user_id [String]
15
+ # @param user_id [String] User ID from route parameter
16
16
  #
17
17
  # @param x_profile_id [String] Profile UUID to scope the request to a child profile. Only organization API keys
18
18
  #
@@ -106,7 +106,7 @@ module Sentdm
106
106
  #
107
107
  # @overload remove(user_id, sandbox: nil, x_profile_id: nil, request_options: {})
108
108
  #
109
- # @param user_id [String] Path param
109
+ # @param user_id [String] Path param: User ID from route parameter
110
110
  #
111
111
  # @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
112
112
  #
@@ -138,7 +138,7 @@ module Sentdm
138
138
  #
139
139
  # @overload update_role(user_id, role: nil, sandbox: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
140
140
  #
141
- # @param user_id [String] Path param
141
+ # @param user_id [String] Path param: User ID from route parameter
142
142
  #
143
143
  # @param role [String] Body param: User role: admin, billing, or developer (required)
144
144
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sentdm
4
- VERSION = "0.25.0"
4
+ VERSION = "0.27.0"
5
5
  end