sentdm 0.24.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +28 -0
- data/README.md +7 -11
- data/lib/sentdm/client.rb +4 -0
- data/lib/sentdm/models/api_response_of_contact_message_summary.rb +43 -0
- data/lib/sentdm/models/api_response_of_conversation_messages_list.rb +43 -0
- data/lib/sentdm/models/{sent_dm_services_common_contracts_poc_os_authentication_config.rb → authentication_config.rb} +2 -3
- data/lib/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_business_info.rb → brand_business_info.rb} +5 -7
- data/lib/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_compliance_info.rb → brand_compliance_info.rb} +2 -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
- data/lib/sentdm/models/brands_brand_data.rb +9 -13
- data/lib/sentdm/models/contact_message_summary.rb +76 -0
- data/lib/sentdm/models/contact_retrieve_message_summary_params.rb +26 -0
- data/lib/sentdm/models/conversation_list_messages_params.rb +38 -0
- data/lib/sentdm/models/conversation_list_params.rb +32 -0
- data/lib/sentdm/models/conversation_messages_list.rb +245 -0
- data/lib/sentdm/models/message_send_response.rb +2 -6
- data/lib/sentdm/models/profile_detail.rb +3 -11
- data/lib/sentdm/models/profile_update_params.rb +2 -2
- data/lib/sentdm/models/profiles/{api_response_of_tcr_campaign_with_use_cases.rb → api_response_of_brand_campaign.rb} +5 -5
- data/lib/sentdm/models/profiles/{campaign_list_response.rb → api_response_of_list_of_brand_campaign.rb} +4 -6
- data/lib/sentdm/models/profiles/{tcr_campaign_with_use_cases.rb → brand_campaign.rb} +63 -111
- data/lib/sentdm/models/profiles/campaign_data.rb +13 -6
- data/lib/sentdm/models/profiles/campaign_use_case.rb +71 -0
- 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
- data/lib/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_body.rb → template_body.rb} +2 -3
- data/lib/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_button.rb → template_button.rb} +5 -6
- data/lib/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_button_props.rb → template_button_props.rb} +2 -3
- data/lib/sentdm/models/template_definition.rb +15 -19
- data/lib/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_footer.rb → template_footer.rb} +1 -1
- data/lib/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_header.rb → template_header.rb} +2 -3
- data/lib/sentdm/models.rb +32 -27
- data/lib/sentdm/resources/contacts.rb +30 -0
- data/lib/sentdm/resources/conversations.rb +82 -0
- data/lib/sentdm/resources/messages.rb +4 -1
- data/lib/sentdm/resources/profiles/campaigns.rb +6 -6
- data/lib/sentdm/resources/profiles.rb +31 -19
- data/lib/sentdm/version.rb +1 -1
- data/lib/sentdm.rb +22 -14
- data/rbi/sentdm/client.rbi +3 -0
- data/rbi/sentdm/models/api_response_of_contact_message_summary.rbi +79 -0
- data/rbi/sentdm/models/api_response_of_conversation_messages_list.rbi +79 -0
- data/rbi/sentdm/models/{sent_dm_services_common_contracts_poc_os_authentication_config.rbi → authentication_config.rbi} +2 -5
- data/rbi/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_business_info.rbi → brand_business_info.rbi} +12 -30
- data/rbi/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_compliance_info.rbi → brand_compliance_info.rbi} +2 -13
- data/rbi/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_contact_info.rbi → brand_contact_info.rbi} +2 -5
- data/rbi/sentdm/models/brands_brand_data.rbi +12 -51
- data/rbi/sentdm/models/contact_message_summary.rbi +144 -0
- data/rbi/sentdm/models/contact_retrieve_message_summary_params.rbi +49 -0
- data/rbi/sentdm/models/conversation_list_messages_params.rbi +65 -0
- data/rbi/sentdm/models/conversation_list_params.rbi +51 -0
- data/rbi/sentdm/models/conversation_messages_list.rbi +419 -0
- data/rbi/sentdm/models/message_send_response.rbi +2 -4
- data/rbi/sentdm/models/profile_detail.rbi +2 -10
- data/rbi/sentdm/models/profile_update_params.rbi +2 -2
- data/rbi/sentdm/models/profiles/{api_response_of_tcr_campaign_with_use_cases.rbi → api_response_of_brand_campaign.rbi} +8 -10
- data/rbi/sentdm/models/profiles/{campaign_list_response.rbi → api_response_of_list_of_brand_campaign.rbi} +5 -13
- data/rbi/sentdm/models/profiles/brand_campaign.rbi +299 -0
- data/rbi/sentdm/models/profiles/campaign_data.rbi +16 -18
- data/rbi/sentdm/models/profiles/campaign_use_case.rbi +110 -0
- 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
- data/rbi/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_body.rbi → template_body.rbi} +2 -7
- data/rbi/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_button.rbi → template_button.rbi} +6 -22
- data/rbi/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_button_props.rbi → template_button_props.rbi} +2 -5
- data/rbi/sentdm/models/template_definition.rbi +19 -87
- data/rbi/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_footer.rbi → template_footer.rbi} +2 -5
- data/rbi/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_header.rbi → template_header.rbi} +2 -5
- data/rbi/sentdm/models.rbi +36 -27
- data/rbi/sentdm/resources/contacts.rbi +20 -0
- data/rbi/sentdm/resources/conversations.rbi +61 -0
- data/rbi/sentdm/resources/messages.rbi +4 -1
- data/rbi/sentdm/resources/profiles/campaigns.rbi +3 -3
- data/rbi/sentdm/resources/profiles.rbi +29 -18
- data/sig/sentdm/client.rbs +2 -0
- data/sig/sentdm/models/api_response_of_contact_message_summary.rbs +39 -0
- data/sig/sentdm/models/api_response_of_conversation_messages_list.rbs +39 -0
- data/sig/sentdm/models/{sent_dm_services_common_contracts_poc_os_authentication_config.rbs → authentication_config.rbs} +2 -2
- data/sig/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_business_info.rbs → brand_business_info.rbs} +7 -7
- data/sig/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_compliance_info.rbs → brand_compliance_info.rbs} +2 -7
- data/sig/sentdm/models/{sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_contact_info.rbs → brand_contact_info.rbs} +2 -2
- data/sig/sentdm/models/brands_brand_data.rbs +12 -12
- data/sig/sentdm/models/contact_message_summary.rbs +84 -0
- data/sig/sentdm/models/contact_retrieve_message_summary_params.rbs +30 -0
- data/sig/sentdm/models/conversation_list_messages_params.rbs +38 -0
- data/sig/sentdm/models/conversation_list_params.rbs +34 -0
- data/sig/sentdm/models/conversation_messages_list.rbs +240 -0
- data/sig/sentdm/models/profile_detail.rbs +0 -5
- data/sig/sentdm/models/profiles/{campaign_list_response.rbs → api_response_of_brand_campaign.rbs} +6 -6
- data/sig/sentdm/models/profiles/{api_response_of_tcr_campaign_with_use_cases.rbs → api_response_of_list_of_brand_campaign.rbs} +6 -6
- data/sig/sentdm/models/profiles/brand_campaign.rbs +194 -0
- data/sig/sentdm/models/profiles/campaign_data.rbs +12 -7
- data/sig/sentdm/models/profiles/campaign_use_case.rbs +66 -0
- 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
- data/sig/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_body.rbs → template_body.rbs} +2 -2
- data/sig/sentdm/models/template_button.rbs +28 -0
- data/sig/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_button_props.rbs → template_button_props.rbs} +2 -2
- data/sig/sentdm/models/template_definition.rbs +20 -20
- data/sig/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_footer.rbs → template_footer.rbs} +2 -2
- data/sig/sentdm/models/{sent_dm_services_common_contracts_poc_os_template_header.rbs → template_header.rbs} +2 -2
- data/sig/sentdm/models.rbs +32 -18
- data/sig/sentdm/resources/contacts.rbs +6 -0
- data/sig/sentdm/resources/conversations.rbs +22 -0
- data/sig/sentdm/resources/profiles/campaigns.rbs +3 -3
- metadata +68 -44
- data/lib/sentdm/models/profiles/base_dto.rb +0 -32
- data/rbi/sentdm/models/profiles/base_dto.rbi +0 -53
- data/rbi/sentdm/models/profiles/tcr_campaign_with_use_cases.rbi +0 -425
- data/sig/sentdm/models/profiles/base_dto.rbs +0 -27
- data/sig/sentdm/models/profiles/tcr_campaign_with_use_cases.rbs +0 -306
- data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button.rbs +0 -32
|
@@ -9,44 +9,25 @@ module Sentdm
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
# Body section of a message template with channel-specific content
|
|
12
|
-
sig { returns(Sentdm::
|
|
12
|
+
sig { returns(Sentdm::TemplateBody) }
|
|
13
13
|
attr_reader :body
|
|
14
14
|
|
|
15
|
-
sig
|
|
16
|
-
params(
|
|
17
|
-
body: Sentdm::SentDmServicesCommonContractsPocOsTemplateBody::OrHash
|
|
18
|
-
).void
|
|
19
|
-
end
|
|
15
|
+
sig { params(body: Sentdm::TemplateBody::OrHash).void }
|
|
20
16
|
attr_writer :body
|
|
21
17
|
|
|
22
18
|
# Configuration for AUTHENTICATION category templates
|
|
23
|
-
sig
|
|
24
|
-
returns(
|
|
25
|
-
T.nilable(
|
|
26
|
-
Sentdm::SentDmServicesCommonContractsPocOsAuthenticationConfig
|
|
27
|
-
)
|
|
28
|
-
)
|
|
29
|
-
end
|
|
19
|
+
sig { returns(T.nilable(Sentdm::AuthenticationConfig)) }
|
|
30
20
|
attr_reader :authentication_config
|
|
31
21
|
|
|
32
22
|
sig do
|
|
33
23
|
params(
|
|
34
|
-
authentication_config:
|
|
35
|
-
T.nilable(
|
|
36
|
-
Sentdm::SentDmServicesCommonContractsPocOsAuthenticationConfig::OrHash
|
|
37
|
-
)
|
|
24
|
+
authentication_config: T.nilable(Sentdm::AuthenticationConfig::OrHash)
|
|
38
25
|
).void
|
|
39
26
|
end
|
|
40
27
|
attr_writer :authentication_config
|
|
41
28
|
|
|
42
29
|
# Optional list of interactive buttons (e.g., quick replies, URLs, phone numbers)
|
|
43
|
-
sig
|
|
44
|
-
returns(
|
|
45
|
-
T.nilable(
|
|
46
|
-
T::Array[Sentdm::SentDmServicesCommonContractsPocOsTemplateButton]
|
|
47
|
-
)
|
|
48
|
-
)
|
|
49
|
-
end
|
|
30
|
+
sig { returns(T.nilable(T::Array[Sentdm::TemplateButton])) }
|
|
50
31
|
attr_accessor :buttons
|
|
51
32
|
|
|
52
33
|
# The version of the template definition format
|
|
@@ -54,65 +35,30 @@ module Sentdm
|
|
|
54
35
|
attr_accessor :definition_version
|
|
55
36
|
|
|
56
37
|
# Footer section of a message template
|
|
57
|
-
sig
|
|
58
|
-
returns(
|
|
59
|
-
T.nilable(Sentdm::SentDmServicesCommonContractsPocOsTemplateFooter)
|
|
60
|
-
)
|
|
61
|
-
end
|
|
38
|
+
sig { returns(T.nilable(Sentdm::TemplateFooter)) }
|
|
62
39
|
attr_reader :footer
|
|
63
40
|
|
|
64
|
-
sig
|
|
65
|
-
params(
|
|
66
|
-
footer:
|
|
67
|
-
T.nilable(
|
|
68
|
-
Sentdm::SentDmServicesCommonContractsPocOsTemplateFooter::OrHash
|
|
69
|
-
)
|
|
70
|
-
).void
|
|
71
|
-
end
|
|
41
|
+
sig { params(footer: T.nilable(Sentdm::TemplateFooter::OrHash)).void }
|
|
72
42
|
attr_writer :footer
|
|
73
43
|
|
|
74
44
|
# Header section of a message template
|
|
75
|
-
sig
|
|
76
|
-
returns(
|
|
77
|
-
T.nilable(Sentdm::SentDmServicesCommonContractsPocOsTemplateHeader)
|
|
78
|
-
)
|
|
79
|
-
end
|
|
45
|
+
sig { returns(T.nilable(Sentdm::TemplateHeader)) }
|
|
80
46
|
attr_reader :header
|
|
81
47
|
|
|
82
|
-
sig
|
|
83
|
-
params(
|
|
84
|
-
header:
|
|
85
|
-
T.nilable(
|
|
86
|
-
Sentdm::SentDmServicesCommonContractsPocOsTemplateHeader::OrHash
|
|
87
|
-
)
|
|
88
|
-
).void
|
|
89
|
-
end
|
|
48
|
+
sig { params(header: T.nilable(Sentdm::TemplateHeader::OrHash)).void }
|
|
90
49
|
attr_writer :header
|
|
91
50
|
|
|
92
51
|
# Complete definition of a message template including header, body, footer, and
|
|
93
52
|
# buttons
|
|
94
53
|
sig do
|
|
95
54
|
params(
|
|
96
|
-
body: Sentdm::
|
|
55
|
+
body: Sentdm::TemplateBody::OrHash,
|
|
97
56
|
authentication_config:
|
|
98
|
-
T.nilable(
|
|
99
|
-
|
|
100
|
-
),
|
|
101
|
-
buttons:
|
|
102
|
-
T.nilable(
|
|
103
|
-
T::Array[
|
|
104
|
-
Sentdm::SentDmServicesCommonContractsPocOsTemplateButton::OrHash
|
|
105
|
-
]
|
|
106
|
-
),
|
|
57
|
+
T.nilable(Sentdm::AuthenticationConfig::OrHash),
|
|
58
|
+
buttons: T.nilable(T::Array[Sentdm::TemplateButton::OrHash]),
|
|
107
59
|
definition_version: T.nilable(String),
|
|
108
|
-
footer:
|
|
109
|
-
|
|
110
|
-
Sentdm::SentDmServicesCommonContractsPocOsTemplateFooter::OrHash
|
|
111
|
-
),
|
|
112
|
-
header:
|
|
113
|
-
T.nilable(
|
|
114
|
-
Sentdm::SentDmServicesCommonContractsPocOsTemplateHeader::OrHash
|
|
115
|
-
)
|
|
60
|
+
footer: T.nilable(Sentdm::TemplateFooter::OrHash),
|
|
61
|
+
header: T.nilable(Sentdm::TemplateHeader::OrHash)
|
|
116
62
|
).returns(T.attached_class)
|
|
117
63
|
end
|
|
118
64
|
def self.new(
|
|
@@ -134,26 +80,12 @@ module Sentdm
|
|
|
134
80
|
sig do
|
|
135
81
|
override.returns(
|
|
136
82
|
{
|
|
137
|
-
body: Sentdm::
|
|
138
|
-
authentication_config:
|
|
139
|
-
|
|
140
|
-
Sentdm::SentDmServicesCommonContractsPocOsAuthenticationConfig
|
|
141
|
-
),
|
|
142
|
-
buttons:
|
|
143
|
-
T.nilable(
|
|
144
|
-
T::Array[
|
|
145
|
-
Sentdm::SentDmServicesCommonContractsPocOsTemplateButton
|
|
146
|
-
]
|
|
147
|
-
),
|
|
83
|
+
body: Sentdm::TemplateBody,
|
|
84
|
+
authentication_config: T.nilable(Sentdm::AuthenticationConfig),
|
|
85
|
+
buttons: T.nilable(T::Array[Sentdm::TemplateButton]),
|
|
148
86
|
definition_version: T.nilable(String),
|
|
149
|
-
footer:
|
|
150
|
-
|
|
151
|
-
Sentdm::SentDmServicesCommonContractsPocOsTemplateFooter
|
|
152
|
-
),
|
|
153
|
-
header:
|
|
154
|
-
T.nilable(
|
|
155
|
-
Sentdm::SentDmServicesCommonContractsPocOsTemplateHeader
|
|
156
|
-
)
|
|
87
|
+
footer: T.nilable(Sentdm::TemplateFooter),
|
|
88
|
+
header: T.nilable(Sentdm::TemplateHeader)
|
|
157
89
|
}
|
|
158
90
|
)
|
|
159
91
|
end
|
|
@@ -2,13 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
module Sentdm
|
|
4
4
|
module Models
|
|
5
|
-
class
|
|
5
|
+
class TemplateFooter < Sentdm::Internal::Type::BaseModel
|
|
6
6
|
OrHash =
|
|
7
7
|
T.type_alias do
|
|
8
|
-
T.any(
|
|
9
|
-
Sentdm::SentDmServicesCommonContractsPocOsTemplateFooter,
|
|
10
|
-
Sentdm::Internal::AnyHash
|
|
11
|
-
)
|
|
8
|
+
T.any(Sentdm::TemplateFooter, Sentdm::Internal::AnyHash)
|
|
12
9
|
end
|
|
13
10
|
|
|
14
11
|
# The footer template text with optional variable placeholders
|
|
@@ -2,13 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
module Sentdm
|
|
4
4
|
module Models
|
|
5
|
-
class
|
|
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
|
data/rbi/sentdm/models.rbi
CHANGED
|
@@ -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,12 +37,24 @@ 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
|
|
@@ -68,47 +94,30 @@ module Sentdm
|
|
|
68
94
|
|
|
69
95
|
ProfileUpdateParams = Sentdm::Models::ProfileUpdateParams
|
|
70
96
|
|
|
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
97
|
TcrBrandRelationship = Sentdm::Models::TcrBrandRelationship
|
|
99
98
|
|
|
100
99
|
TcrVertical = Sentdm::Models::TcrVertical
|
|
101
100
|
|
|
102
101
|
Template = Sentdm::Models::Template
|
|
103
102
|
|
|
103
|
+
TemplateBody = Sentdm::Models::TemplateBody
|
|
104
|
+
|
|
104
105
|
TemplateBodyContent = Sentdm::Models::TemplateBodyContent
|
|
105
106
|
|
|
107
|
+
TemplateButton = Sentdm::Models::TemplateButton
|
|
108
|
+
|
|
109
|
+
TemplateButtonProps = Sentdm::Models::TemplateButtonProps
|
|
110
|
+
|
|
106
111
|
TemplateCreateParams = Sentdm::Models::TemplateCreateParams
|
|
107
112
|
|
|
108
113
|
TemplateDefinition = Sentdm::Models::TemplateDefinition
|
|
109
114
|
|
|
110
115
|
TemplateDeleteParams = Sentdm::Models::TemplateDeleteParams
|
|
111
116
|
|
|
117
|
+
TemplateFooter = Sentdm::Models::TemplateFooter
|
|
118
|
+
|
|
119
|
+
TemplateHeader = Sentdm::Models::TemplateHeader
|
|
120
|
+
|
|
112
121
|
TemplateListParams = Sentdm::Models::TemplateListParams
|
|
113
122
|
|
|
114
123
|
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,10 @@ 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. Account-level preconditions such as
|
|
50
|
+
# insufficient balance do not reject the request: the send is accepted with 202
|
|
51
|
+
# and the affected messages are reported as BLOCKED on GET /messages/{id} and the
|
|
52
|
+
# message status webhook.
|
|
50
53
|
sig do
|
|
51
54
|
params(
|
|
52
55
|
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::
|
|
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::
|
|
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::
|
|
82
|
+
).returns(Sentdm::Profiles::APIResponseOfListOfBrandCampaign)
|
|
83
83
|
end
|
|
84
84
|
def list(
|
|
85
85
|
# Profile ID from route
|
|
@@ -250,8 +250,7 @@ module Sentdm
|
|
|
250
250
|
sandbox: nil,
|
|
251
251
|
# Body param: Direct phone number for SMS sending (optional)
|
|
252
252
|
sending_phone_number: nil,
|
|
253
|
-
# Body param: Reference to another profile to use for SMS
|
|
254
|
-
# (optional)
|
|
253
|
+
# Body param: Reference to another profile to use for SMS configuration (optional)
|
|
255
254
|
sending_phone_number_profile_id: nil,
|
|
256
255
|
# Body param: Reference to another profile to use for WhatsApp configuration
|
|
257
256
|
# (optional)
|
|
@@ -316,24 +315,36 @@ module Sentdm
|
|
|
316
315
|
)
|
|
317
316
|
end
|
|
318
317
|
|
|
319
|
-
# Final step in profile compliance workflow. Validates all prerequisites (
|
|
320
|
-
#
|
|
321
|
-
#
|
|
322
|
-
#
|
|
318
|
+
# Final step in the profile compliance workflow. Validates all prerequisites (KYC,
|
|
319
|
+
# brand, campaigns, required documents), connects the profile to the SMS and
|
|
320
|
+
# WhatsApp channels, and sets its status based on configuration. Prerequisites are
|
|
321
|
+
# always validated first: if any fail the call returns 400. If they pass and the
|
|
322
|
+
# profile is already completed, the call returns 200 and does nothing. Otherwise
|
|
323
|
+
# it returns 202 and calls the provided webhook URL when background processing
|
|
324
|
+
# finishes.
|
|
325
|
+
#
|
|
326
|
+
# Prerequisites:
|
|
327
|
+
#
|
|
328
|
+
# - Profile must have a name, short name, and description (short name max 50
|
|
329
|
+
# characters, description max 5000)
|
|
330
|
+
# - webHookUrl must be supplied on the request
|
|
331
|
+
# - A KYC form submission is required
|
|
332
|
+
# - A brand is required, either on the profile or inherited from the parent
|
|
333
|
+
# organization
|
|
334
|
+
# - TCR applications must have at least one campaign, own or inherited
|
|
335
|
+
# - Destination countries marked as main must have their required compliance
|
|
336
|
+
# documents uploaded
|
|
323
337
|
#
|
|
324
|
-
#
|
|
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
|
|
338
|
+
# Resulting status:
|
|
331
339
|
#
|
|
332
|
-
#
|
|
333
|
-
#
|
|
334
|
-
#
|
|
335
|
-
#
|
|
336
|
-
#
|
|
340
|
+
# - If either the SMS or WhatsApp channel is unconfigured, the profile is
|
|
341
|
+
# SUBMITTED
|
|
342
|
+
# - For a TCR application that inherits both its brand and its campaigns, the
|
|
343
|
+
# profile is COMPLETED
|
|
344
|
+
# - For a TCR application that owns either its brand or its campaigns, the profile
|
|
345
|
+
# is COMPLETED once both have been submitted to TCR, and SUBMITTED until then
|
|
346
|
+
# - For a non-TCR application, the profile is SUBMITTED when a main destination
|
|
347
|
+
# country is set, and COMPLETED otherwise
|
|
337
348
|
sig do
|
|
338
349
|
params(
|
|
339
350
|
profile_id: String,
|
data/sig/sentdm/client.rbs
CHANGED
|
@@ -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
|
|
3
|
+
type authentication_config =
|
|
4
4
|
{ add_security_recommendation: bool, code_expiration_minutes: Integer? }
|
|
5
5
|
|
|
6
|
-
class
|
|
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
|
|
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::
|
|
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
|
|
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::
|
|
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::
|
|
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::
|
|
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::
|
|
85
|
+
def self?.values: -> ::Array[Sentdm::Models::BrandBusinessInfo::entity_type]
|
|
86
86
|
end
|
|
87
87
|
end
|
|
88
88
|
end
|