sentdm 0.0.2

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 (188) hide show
  1. checksums.yaml +7 -0
  2. data/.ignore +2 -0
  3. data/CHANGELOG.md +11 -0
  4. data/README.md +240 -0
  5. data/SECURITY.md +27 -0
  6. data/lib/sentdm/client.rb +115 -0
  7. data/lib/sentdm/errors.rb +228 -0
  8. data/lib/sentdm/file_part.rb +58 -0
  9. data/lib/sentdm/internal/transport/base_client.rb +573 -0
  10. data/lib/sentdm/internal/transport/pooled_net_requester.rb +210 -0
  11. data/lib/sentdm/internal/type/array_of.rb +168 -0
  12. data/lib/sentdm/internal/type/base_model.rb +531 -0
  13. data/lib/sentdm/internal/type/base_page.rb +55 -0
  14. data/lib/sentdm/internal/type/boolean.rb +77 -0
  15. data/lib/sentdm/internal/type/converter.rb +327 -0
  16. data/lib/sentdm/internal/type/enum.rb +131 -0
  17. data/lib/sentdm/internal/type/file_input.rb +111 -0
  18. data/lib/sentdm/internal/type/hash_of.rb +188 -0
  19. data/lib/sentdm/internal/type/request_parameters.rb +42 -0
  20. data/lib/sentdm/internal/type/union.rb +237 -0
  21. data/lib/sentdm/internal/type/unknown.rb +81 -0
  22. data/lib/sentdm/internal/util.rb +920 -0
  23. data/lib/sentdm/internal.rb +20 -0
  24. data/lib/sentdm/models/contact_list_item.rb +96 -0
  25. data/lib/sentdm/models/contact_list_params.rb +30 -0
  26. data/lib/sentdm/models/contact_list_response.rb +40 -0
  27. data/lib/sentdm/models/contact_retrieve_by_phone_params.rb +22 -0
  28. data/lib/sentdm/models/contact_retrieve_id_params.rb +22 -0
  29. data/lib/sentdm/models/message_retrieve_params.rb +14 -0
  30. data/lib/sentdm/models/message_retrieve_response.rb +227 -0
  31. data/lib/sentdm/models/message_send_quick_message_params.rb +34 -0
  32. data/lib/sentdm/models/message_send_to_contact_params.rb +46 -0
  33. data/lib/sentdm/models/message_send_to_phone_params.rb +47 -0
  34. data/lib/sentdm/models/number_lookup_retrieve_params.rb +20 -0
  35. data/lib/sentdm/models/number_lookup_retrieve_response.rb +83 -0
  36. data/lib/sentdm/models/organization_list_params.rb +14 -0
  37. data/lib/sentdm/models/organization_list_response.rb +57 -0
  38. data/lib/sentdm/models/organization_retrieve_profiles_params.rb +14 -0
  39. data/lib/sentdm/models/organization_retrieve_profiles_response.rb +22 -0
  40. data/lib/sentdm/models/organizations/customer_user.rb +96 -0
  41. data/lib/sentdm/models/organizations/user_delete_params.rb +22 -0
  42. data/lib/sentdm/models/organizations/user_invite_params.rb +40 -0
  43. data/lib/sentdm/models/organizations/user_list_params.rb +28 -0
  44. data/lib/sentdm/models/organizations/user_list_response.rb +36 -0
  45. data/lib/sentdm/models/organizations/user_retrieve_params.rb +22 -0
  46. data/lib/sentdm/models/organizations/user_update_role_params.rb +28 -0
  47. data/lib/sentdm/models/profile_summary.rb +45 -0
  48. data/lib/sentdm/models/template_body_content.rb +27 -0
  49. data/lib/sentdm/models/template_create_params.rb +53 -0
  50. data/lib/sentdm/models/template_definition.rb +310 -0
  51. data/lib/sentdm/models/template_delete_params.rb +14 -0
  52. data/lib/sentdm/models/template_list_params.rb +54 -0
  53. data/lib/sentdm/models/template_list_response.rb +40 -0
  54. data/lib/sentdm/models/template_response.rb +100 -0
  55. data/lib/sentdm/models/template_retrieve_params.rb +14 -0
  56. data/lib/sentdm/models/template_variable.rb +74 -0
  57. data/lib/sentdm/models.rb +83 -0
  58. data/lib/sentdm/request_options.rb +77 -0
  59. data/lib/sentdm/resources/contacts.rb +88 -0
  60. data/lib/sentdm/resources/messages.rb +130 -0
  61. data/lib/sentdm/resources/number_lookup.rb +37 -0
  62. data/lib/sentdm/resources/organizations/users.rb +150 -0
  63. data/lib/sentdm/resources/organizations.rb +58 -0
  64. data/lib/sentdm/resources/templates.rb +131 -0
  65. data/lib/sentdm/version.rb +5 -0
  66. data/lib/sentdm.rb +94 -0
  67. data/manifest.yaml +17 -0
  68. data/rbi/sentdm/client.rbi +80 -0
  69. data/rbi/sentdm/errors.rbi +205 -0
  70. data/rbi/sentdm/file_part.rbi +37 -0
  71. data/rbi/sentdm/internal/transport/base_client.rbi +297 -0
  72. data/rbi/sentdm/internal/transport/pooled_net_requester.rbi +82 -0
  73. data/rbi/sentdm/internal/type/array_of.rbi +104 -0
  74. data/rbi/sentdm/internal/type/base_model.rbi +299 -0
  75. data/rbi/sentdm/internal/type/base_page.rbi +42 -0
  76. data/rbi/sentdm/internal/type/boolean.rbi +58 -0
  77. data/rbi/sentdm/internal/type/converter.rbi +204 -0
  78. data/rbi/sentdm/internal/type/enum.rbi +82 -0
  79. data/rbi/sentdm/internal/type/file_input.rbi +59 -0
  80. data/rbi/sentdm/internal/type/hash_of.rbi +104 -0
  81. data/rbi/sentdm/internal/type/request_parameters.rbi +29 -0
  82. data/rbi/sentdm/internal/type/union.rbi +126 -0
  83. data/rbi/sentdm/internal/type/unknown.rbi +58 -0
  84. data/rbi/sentdm/internal/util.rbi +484 -0
  85. data/rbi/sentdm/internal.rbi +16 -0
  86. data/rbi/sentdm/models/contact_list_item.rbi +144 -0
  87. data/rbi/sentdm/models/contact_list_params.rbi +51 -0
  88. data/rbi/sentdm/models/contact_list_response.rbi +74 -0
  89. data/rbi/sentdm/models/contact_retrieve_by_phone_params.rbi +40 -0
  90. data/rbi/sentdm/models/contact_retrieve_id_params.rbi +40 -0
  91. data/rbi/sentdm/models/message_retrieve_params.rbi +27 -0
  92. data/rbi/sentdm/models/message_retrieve_response.rbi +376 -0
  93. data/rbi/sentdm/models/message_send_quick_message_params.rbi +56 -0
  94. data/rbi/sentdm/models/message_send_to_contact_params.rbi +63 -0
  95. data/rbi/sentdm/models/message_send_to_phone_params.rbi +65 -0
  96. data/rbi/sentdm/models/number_lookup_retrieve_params.rbi +35 -0
  97. data/rbi/sentdm/models/number_lookup_retrieve_response.rbi +132 -0
  98. data/rbi/sentdm/models/organization_list_params.rbi +27 -0
  99. data/rbi/sentdm/models/organization_list_response.rbi +131 -0
  100. data/rbi/sentdm/models/organization_retrieve_profiles_params.rbi +30 -0
  101. data/rbi/sentdm/models/organization_retrieve_profiles_response.rbi +47 -0
  102. data/rbi/sentdm/models/organizations/customer_user.rbi +129 -0
  103. data/rbi/sentdm/models/organizations/user_delete_params.rbi +40 -0
  104. data/rbi/sentdm/models/organizations/user_invite_params.rbi +73 -0
  105. data/rbi/sentdm/models/organizations/user_list_params.rbi +48 -0
  106. data/rbi/sentdm/models/organizations/user_list_response.rbi +71 -0
  107. data/rbi/sentdm/models/organizations/user_retrieve_params.rbi +40 -0
  108. data/rbi/sentdm/models/organizations/user_update_role_params.rbi +51 -0
  109. data/rbi/sentdm/models/profile_summary.rbi +74 -0
  110. data/rbi/sentdm/models/template_body_content.rbi +46 -0
  111. data/rbi/sentdm/models/template_create_params.rbi +81 -0
  112. data/rbi/sentdm/models/template_definition.rbi +497 -0
  113. data/rbi/sentdm/models/template_delete_params.rbi +27 -0
  114. data/rbi/sentdm/models/template_list_params.rbi +75 -0
  115. data/rbi/sentdm/models/template_list_response.rbi +74 -0
  116. data/rbi/sentdm/models/template_response.rbi +149 -0
  117. data/rbi/sentdm/models/template_retrieve_params.rbi +27 -0
  118. data/rbi/sentdm/models/template_variable.rbi +120 -0
  119. data/rbi/sentdm/models.rbi +46 -0
  120. data/rbi/sentdm/request_options.rbi +55 -0
  121. data/rbi/sentdm/resources/contacts.rbi +63 -0
  122. data/rbi/sentdm/resources/messages.rbi +97 -0
  123. data/rbi/sentdm/resources/number_lookup.rbi +24 -0
  124. data/rbi/sentdm/resources/organizations/users.rbi +95 -0
  125. data/rbi/sentdm/resources/organizations.rbi +37 -0
  126. data/rbi/sentdm/resources/templates.rbi +103 -0
  127. data/rbi/sentdm/version.rbi +5 -0
  128. data/sig/sentdm/client.rbs +41 -0
  129. data/sig/sentdm/errors.rbs +117 -0
  130. data/sig/sentdm/file_part.rbs +21 -0
  131. data/sig/sentdm/internal/transport/base_client.rbs +133 -0
  132. data/sig/sentdm/internal/transport/pooled_net_requester.rbs +48 -0
  133. data/sig/sentdm/internal/type/array_of.rbs +48 -0
  134. data/sig/sentdm/internal/type/base_model.rbs +102 -0
  135. data/sig/sentdm/internal/type/base_page.rbs +24 -0
  136. data/sig/sentdm/internal/type/boolean.rbs +26 -0
  137. data/sig/sentdm/internal/type/converter.rbs +79 -0
  138. data/sig/sentdm/internal/type/enum.rbs +32 -0
  139. data/sig/sentdm/internal/type/file_input.rbs +25 -0
  140. data/sig/sentdm/internal/type/hash_of.rbs +48 -0
  141. data/sig/sentdm/internal/type/request_parameters.rbs +17 -0
  142. data/sig/sentdm/internal/type/union.rbs +52 -0
  143. data/sig/sentdm/internal/type/unknown.rbs +26 -0
  144. data/sig/sentdm/internal/util.rbs +185 -0
  145. data/sig/sentdm/internal.rbs +9 -0
  146. data/sig/sentdm/models/contact_list_item.rbs +85 -0
  147. data/sig/sentdm/models/contact_list_params.rbs +28 -0
  148. data/sig/sentdm/models/contact_list_response.rbs +52 -0
  149. data/sig/sentdm/models/contact_retrieve_by_phone_params.rbs +23 -0
  150. data/sig/sentdm/models/contact_retrieve_id_params.rbs +20 -0
  151. data/sig/sentdm/models/message_retrieve_params.rbs +15 -0
  152. data/sig/sentdm/models/message_retrieve_response.rbs +188 -0
  153. data/sig/sentdm/models/message_send_quick_message_params.rbs +28 -0
  154. data/sig/sentdm/models/message_send_to_contact_params.rbs +36 -0
  155. data/sig/sentdm/models/message_send_to_phone_params.rbs +36 -0
  156. data/sig/sentdm/models/number_lookup_retrieve_params.rbs +23 -0
  157. data/sig/sentdm/models/number_lookup_retrieve_response.rbs +78 -0
  158. data/sig/sentdm/models/organization_list_params.rbs +15 -0
  159. data/sig/sentdm/models/organization_list_response.rbs +76 -0
  160. data/sig/sentdm/models/organization_retrieve_profiles_params.rbs +15 -0
  161. data/sig/sentdm/models/organization_retrieve_profiles_response.rbs +28 -0
  162. data/sig/sentdm/models/organizations/customer_user.rbs +91 -0
  163. data/sig/sentdm/models/organizations/user_delete_params.rbs +25 -0
  164. data/sig/sentdm/models/organizations/user_invite_params.rbs +44 -0
  165. data/sig/sentdm/models/organizations/user_list_params.rbs +30 -0
  166. data/sig/sentdm/models/organizations/user_list_response.rbs +47 -0
  167. data/sig/sentdm/models/organizations/user_retrieve_params.rbs +25 -0
  168. data/sig/sentdm/models/organizations/user_update_role_params.rbs +32 -0
  169. data/sig/sentdm/models/profile_summary.rbs +51 -0
  170. data/sig/sentdm/models/template_body_content.rbs +32 -0
  171. data/sig/sentdm/models/template_create_params.rbs +43 -0
  172. data/sig/sentdm/models/template_definition.rbs +258 -0
  173. data/sig/sentdm/models/template_delete_params.rbs +15 -0
  174. data/sig/sentdm/models/template_list_params.rbs +46 -0
  175. data/sig/sentdm/models/template_list_response.rbs +52 -0
  176. data/sig/sentdm/models/template_response.rbs +92 -0
  177. data/sig/sentdm/models/template_retrieve_params.rbs +15 -0
  178. data/sig/sentdm/models/template_variable.rbs +87 -0
  179. data/sig/sentdm/models.rbs +43 -0
  180. data/sig/sentdm/request_options.rbs +34 -0
  181. data/sig/sentdm/resources/contacts.rbs +23 -0
  182. data/sig/sentdm/resources/messages.rbs +32 -0
  183. data/sig/sentdm/resources/number_lookup.rbs +12 -0
  184. data/sig/sentdm/resources/organizations/users.rbs +44 -0
  185. data/sig/sentdm/resources/organizations.rbs +18 -0
  186. data/sig/sentdm/resources/templates.rbs +31 -0
  187. data/sig/sentdm/version.rbs +3 -0
  188. metadata +259 -0
@@ -0,0 +1,310 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ class TemplateDefinition < Sentdm::Internal::Type::BaseModel
6
+ # @!attribute body
7
+ # Required template body with content for different channels (multi-channel,
8
+ # SMS-specific, or WhatsApp-specific)
9
+ #
10
+ # @return [Sentdm::Models::TemplateDefinition::Body]
11
+ required :body, -> { Sentdm::TemplateDefinition::Body }
12
+
13
+ # @!attribute authentication_config
14
+ # Configuration specific to AUTHENTICATION category templates (optional)
15
+ #
16
+ # @return [Sentdm::Models::TemplateDefinition::AuthenticationConfig, nil]
17
+ optional :authentication_config,
18
+ -> { Sentdm::TemplateDefinition::AuthenticationConfig },
19
+ api_name: :authenticationConfig,
20
+ nil?: true
21
+
22
+ # @!attribute buttons
23
+ # Optional list of interactive buttons (e.g., quick replies, URLs, phone numbers)
24
+ #
25
+ # @return [Array<Sentdm::Models::TemplateDefinition::Button>, nil]
26
+ optional :buttons,
27
+ -> {
28
+ Sentdm::Internal::Type::ArrayOf[Sentdm::TemplateDefinition::Button]
29
+ },
30
+ nil?: true
31
+
32
+ # @!attribute definition_version
33
+ # The version of the template definition format
34
+ #
35
+ # @return [String, nil]
36
+ optional :definition_version, String, api_name: :definitionVersion, nil?: true
37
+
38
+ # @!attribute footer
39
+ # Optional template footer with optional variables
40
+ #
41
+ # @return [Sentdm::Models::TemplateDefinition::Footer, nil]
42
+ optional :footer, -> { Sentdm::TemplateDefinition::Footer }, nil?: true
43
+
44
+ # @!attribute header
45
+ # Optional template header with optional variables
46
+ #
47
+ # @return [Sentdm::Models::TemplateDefinition::Header, nil]
48
+ optional :header, -> { Sentdm::TemplateDefinition::Header }, nil?: true
49
+
50
+ # @!method initialize(body:, authentication_config: nil, buttons: nil, definition_version: nil, footer: nil, header: nil)
51
+ # Some parameter documentations has been truncated, see
52
+ # {Sentdm::Models::TemplateDefinition} for more details.
53
+ #
54
+ # Complete definition of a message template including header, body, footer, and
55
+ # buttons
56
+ #
57
+ # @param body [Sentdm::Models::TemplateDefinition::Body] Required template body with content for different channels (multi-channel, SMS-s
58
+ #
59
+ # @param authentication_config [Sentdm::Models::TemplateDefinition::AuthenticationConfig, nil] Configuration specific to AUTHENTICATION category templates (optional)
60
+ #
61
+ # @param buttons [Array<Sentdm::Models::TemplateDefinition::Button>, nil] Optional list of interactive buttons (e.g., quick replies, URLs, phone numbers)
62
+ #
63
+ # @param definition_version [String, nil] The version of the template definition format
64
+ #
65
+ # @param footer [Sentdm::Models::TemplateDefinition::Footer, nil] Optional template footer with optional variables
66
+ #
67
+ # @param header [Sentdm::Models::TemplateDefinition::Header, nil] Optional template header with optional variables
68
+
69
+ # @see Sentdm::Models::TemplateDefinition#body
70
+ class Body < Sentdm::Internal::Type::BaseModel
71
+ # @!attribute multi_channel
72
+ # Content that will be used for all channels (SMS and WhatsApp) unless
73
+ # channel-specific content is provided
74
+ #
75
+ # @return [Sentdm::Models::TemplateBodyContent, nil]
76
+ optional :multi_channel, -> { Sentdm::TemplateBodyContent }, api_name: :multiChannel, nil?: true
77
+
78
+ # @!attribute sms
79
+ # SMS-specific content that overrides multi-channel content for SMS messages
80
+ #
81
+ # @return [Sentdm::Models::TemplateBodyContent, nil]
82
+ optional :sms, -> { Sentdm::TemplateBodyContent }, nil?: true
83
+
84
+ # @!attribute whatsapp
85
+ # WhatsApp-specific content that overrides multi-channel content for WhatsApp
86
+ # messages
87
+ #
88
+ # @return [Sentdm::Models::TemplateBodyContent, nil]
89
+ optional :whatsapp, -> { Sentdm::TemplateBodyContent }, nil?: true
90
+
91
+ # @!method initialize(multi_channel: nil, sms: nil, whatsapp: nil)
92
+ # Some parameter documentations has been truncated, see
93
+ # {Sentdm::Models::TemplateDefinition::Body} for more details.
94
+ #
95
+ # Required template body with content for different channels (multi-channel,
96
+ # SMS-specific, or WhatsApp-specific)
97
+ #
98
+ # @param multi_channel [Sentdm::Models::TemplateBodyContent, nil] Content that will be used for all channels (SMS and WhatsApp) unless channel-spe
99
+ #
100
+ # @param sms [Sentdm::Models::TemplateBodyContent, nil] SMS-specific content that overrides multi-channel content for SMS messages
101
+ #
102
+ # @param whatsapp [Sentdm::Models::TemplateBodyContent, nil] WhatsApp-specific content that overrides multi-channel content for WhatsApp mess
103
+ end
104
+
105
+ # @see Sentdm::Models::TemplateDefinition#authentication_config
106
+ class AuthenticationConfig < Sentdm::Internal::Type::BaseModel
107
+ # @!attribute add_security_recommendation
108
+ # Whether to add the security recommendation text: "For your security, do not
109
+ # share this code."
110
+ #
111
+ # @return [Boolean, nil]
112
+ optional :add_security_recommendation,
113
+ Sentdm::Internal::Type::Boolean,
114
+ api_name: :addSecurityRecommendation
115
+
116
+ # @!attribute code_expiration_minutes
117
+ # Code expiration time in minutes (1-90). If set, adds footer: "This code expires
118
+ # in X minutes."
119
+ #
120
+ # @return [Integer, nil]
121
+ optional :code_expiration_minutes, Integer, api_name: :codeExpirationMinutes, nil?: true
122
+
123
+ # @!method initialize(add_security_recommendation: nil, code_expiration_minutes: nil)
124
+ # Some parameter documentations has been truncated, see
125
+ # {Sentdm::Models::TemplateDefinition::AuthenticationConfig} for more details.
126
+ #
127
+ # Configuration specific to AUTHENTICATION category templates (optional)
128
+ #
129
+ # @param add_security_recommendation [Boolean] Whether to add the security recommendation text: "For your security, do not shar
130
+ #
131
+ # @param code_expiration_minutes [Integer, nil] Code expiration time in minutes (1-90). If set, adds footer: "This code expires
132
+ end
133
+
134
+ class Button < Sentdm::Internal::Type::BaseModel
135
+ # @!attribute id
136
+ # The unique identifier of the button (1-based index)
137
+ #
138
+ # @return [Integer, nil]
139
+ optional :id, Integer
140
+
141
+ # @!attribute props
142
+ # Properties specific to the button type
143
+ #
144
+ # @return [Sentdm::Models::TemplateDefinition::Button::Props, nil]
145
+ optional :props, -> { Sentdm::TemplateDefinition::Button::Props }
146
+
147
+ # @!attribute type
148
+ # The type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, VOICE_CALL, COPY_CODE)
149
+ #
150
+ # @return [String, nil]
151
+ optional :type, String
152
+
153
+ # @!method initialize(id: nil, props: nil, type: nil)
154
+ # Some parameter documentations has been truncated, see
155
+ # {Sentdm::Models::TemplateDefinition::Button} for more details.
156
+ #
157
+ # Interactive button in a message template
158
+ #
159
+ # @param id [Integer] The unique identifier of the button (1-based index)
160
+ #
161
+ # @param props [Sentdm::Models::TemplateDefinition::Button::Props] Properties specific to the button type
162
+ #
163
+ # @param type [String] The type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, VOICE_CALL, COPY_CODE)
164
+
165
+ # @see Sentdm::Models::TemplateDefinition::Button#props
166
+ class Props < Sentdm::Internal::Type::BaseModel
167
+ # @!attribute active_for
168
+ #
169
+ # @return [Integer, nil]
170
+ optional :active_for, Integer, api_name: :activeFor, nil?: true
171
+
172
+ # @!attribute autofill_text
173
+ #
174
+ # @return [String, nil]
175
+ optional :autofill_text, String, api_name: :autofillText, nil?: true
176
+
177
+ # @!attribute country_code
178
+ #
179
+ # @return [String, nil]
180
+ optional :country_code, String, api_name: :countryCode, nil?: true
181
+
182
+ # @!attribute offer_code
183
+ #
184
+ # @return [String, nil]
185
+ optional :offer_code, String, api_name: :offerCode, nil?: true
186
+
187
+ # @!attribute otp_type
188
+ #
189
+ # @return [String, nil]
190
+ optional :otp_type, String, api_name: :otpType, nil?: true
191
+
192
+ # @!attribute package_name
193
+ #
194
+ # @return [String, nil]
195
+ optional :package_name, String, api_name: :packageName, nil?: true
196
+
197
+ # @!attribute phone_number
198
+ #
199
+ # @return [String, nil]
200
+ optional :phone_number, String, api_name: :phoneNumber, nil?: true
201
+
202
+ # @!attribute quick_reply_type
203
+ #
204
+ # @return [String, nil]
205
+ optional :quick_reply_type, String, api_name: :quickReplyType, nil?: true
206
+
207
+ # @!attribute signature_hash
208
+ #
209
+ # @return [String, nil]
210
+ optional :signature_hash, String, api_name: :signatureHash, nil?: true
211
+
212
+ # @!attribute text
213
+ #
214
+ # @return [String, nil]
215
+ optional :text, String, nil?: true
216
+
217
+ # @!attribute url
218
+ #
219
+ # @return [String, nil]
220
+ optional :url, String, nil?: true
221
+
222
+ # @!attribute url_type
223
+ #
224
+ # @return [String, nil]
225
+ optional :url_type, String, api_name: :urlType, nil?: true
226
+
227
+ # @!method initialize(active_for: nil, autofill_text: nil, country_code: nil, offer_code: nil, otp_type: nil, package_name: nil, phone_number: nil, quick_reply_type: nil, signature_hash: nil, text: nil, url: nil, url_type: nil)
228
+ # Properties specific to the button type
229
+ #
230
+ # @param active_for [Integer, nil]
231
+ # @param autofill_text [String, nil]
232
+ # @param country_code [String, nil]
233
+ # @param offer_code [String, nil]
234
+ # @param otp_type [String, nil]
235
+ # @param package_name [String, nil]
236
+ # @param phone_number [String, nil]
237
+ # @param quick_reply_type [String, nil]
238
+ # @param signature_hash [String, nil]
239
+ # @param text [String, nil]
240
+ # @param url [String, nil]
241
+ # @param url_type [String, nil]
242
+ end
243
+ end
244
+
245
+ # @see Sentdm::Models::TemplateDefinition#footer
246
+ class Footer < Sentdm::Internal::Type::BaseModel
247
+ # @!attribute template
248
+ # The footer template text with optional variable placeholders
249
+ #
250
+ # @return [String, nil]
251
+ optional :template, String
252
+
253
+ # @!attribute type
254
+ # The type of footer (typically "text")
255
+ #
256
+ # @return [String, nil]
257
+ optional :type, String, nil?: true
258
+
259
+ # @!attribute variables
260
+ # List of variables used in the footer template
261
+ #
262
+ # @return [Array<Sentdm::Models::TemplateVariable>, nil]
263
+ optional :variables, -> { Sentdm::Internal::Type::ArrayOf[Sentdm::TemplateVariable] }, nil?: true
264
+
265
+ # @!method initialize(template: nil, type: nil, variables: nil)
266
+ # Optional template footer with optional variables
267
+ #
268
+ # @param template [String] The footer template text with optional variable placeholders
269
+ #
270
+ # @param type [String, nil] The type of footer (typically "text")
271
+ #
272
+ # @param variables [Array<Sentdm::Models::TemplateVariable>, nil] List of variables used in the footer template
273
+ end
274
+
275
+ # @see Sentdm::Models::TemplateDefinition#header
276
+ class Header < Sentdm::Internal::Type::BaseModel
277
+ # @!attribute template
278
+ # The header template text with optional variable placeholders (e.g., "Welcome to
279
+ # {{0:variable}}")
280
+ #
281
+ # @return [String, nil]
282
+ optional :template, String
283
+
284
+ # @!attribute type
285
+ # The type of header (e.g., "text", "image", "video", "document")
286
+ #
287
+ # @return [String, nil]
288
+ optional :type, String, nil?: true
289
+
290
+ # @!attribute variables
291
+ # List of variables used in the header template
292
+ #
293
+ # @return [Array<Sentdm::Models::TemplateVariable>, nil]
294
+ optional :variables, -> { Sentdm::Internal::Type::ArrayOf[Sentdm::TemplateVariable] }, nil?: true
295
+
296
+ # @!method initialize(template: nil, type: nil, variables: nil)
297
+ # Some parameter documentations has been truncated, see
298
+ # {Sentdm::Models::TemplateDefinition::Header} for more details.
299
+ #
300
+ # Optional template header with optional variables
301
+ #
302
+ # @param template [String] The header template text with optional variable placeholders (e.g., "Welcome to
303
+ #
304
+ # @param type [String, nil] The type of header (e.g., "text", "image", "video", "document")
305
+ #
306
+ # @param variables [Array<Sentdm::Models::TemplateVariable>, nil] List of variables used in the header template
307
+ end
308
+ end
309
+ end
310
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ # @see Sentdm::Resources::Templates#delete
6
+ class TemplateDeleteParams < Sentdm::Internal::Type::BaseModel
7
+ extend Sentdm::Internal::Type::RequestParameters::Converter
8
+ include Sentdm::Internal::Type::RequestParameters
9
+
10
+ # @!method initialize(request_options: {})
11
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ # @see Sentdm::Resources::Templates#list
6
+ class TemplateListParams < Sentdm::Internal::Type::BaseModel
7
+ extend Sentdm::Internal::Type::RequestParameters::Converter
8
+ include Sentdm::Internal::Type::RequestParameters
9
+
10
+ # @!attribute page
11
+ # The page number (zero-indexed). Default is 0.
12
+ #
13
+ # @return [Integer]
14
+ required :page, Integer
15
+
16
+ # @!attribute page_size
17
+ # The number of items per page (1-1000). Default is 100.
18
+ #
19
+ # @return [Integer]
20
+ required :page_size, Integer
21
+
22
+ # @!attribute category
23
+ # Optional filter by template category (e.g., MARKETING, UTILITY, AUTHENTICATION)
24
+ #
25
+ # @return [String, nil]
26
+ optional :category, String, nil?: true
27
+
28
+ # @!attribute search
29
+ # Optional search term to filter templates by name or content
30
+ #
31
+ # @return [String, nil]
32
+ optional :search, String, nil?: true
33
+
34
+ # @!attribute status
35
+ # Optional filter by template status (e.g., APPROVED, PENDING, REJECTED, DRAFT)
36
+ #
37
+ # @return [String, nil]
38
+ optional :status, String, nil?: true
39
+
40
+ # @!method initialize(page:, page_size:, category: nil, search: nil, status: nil, request_options: {})
41
+ # @param page [Integer] The page number (zero-indexed). Default is 0.
42
+ #
43
+ # @param page_size [Integer] The number of items per page (1-1000). Default is 100.
44
+ #
45
+ # @param category [String, nil] Optional filter by template category (e.g., MARKETING, UTILITY, AUTHENTICATION)
46
+ #
47
+ # @param search [String, nil] Optional search term to filter templates by name or content
48
+ #
49
+ # @param status [String, nil] Optional filter by template status (e.g., APPROVED, PENDING, REJECTED, DRAFT)
50
+ #
51
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ # @see Sentdm::Resources::Templates#list
6
+ class TemplateListResponse < Sentdm::Internal::Type::BaseModel
7
+ # @!attribute items
8
+ #
9
+ # @return [Array<Sentdm::Models::TemplateResponse>, nil]
10
+ optional :items, -> { Sentdm::Internal::Type::ArrayOf[Sentdm::TemplateResponse] }
11
+
12
+ # @!attribute page
13
+ #
14
+ # @return [Integer, nil]
15
+ optional :page, Integer
16
+
17
+ # @!attribute page_size
18
+ #
19
+ # @return [Integer, nil]
20
+ optional :page_size, Integer, api_name: :pageSize
21
+
22
+ # @!attribute total_count
23
+ #
24
+ # @return [Integer, nil]
25
+ optional :total_count, Integer, api_name: :totalCount
26
+
27
+ # @!attribute total_pages
28
+ #
29
+ # @return [Integer, nil]
30
+ optional :total_pages, Integer, api_name: :totalPages
31
+
32
+ # @!method initialize(items: nil, page: nil, page_size: nil, total_count: nil, total_pages: nil)
33
+ # @param items [Array<Sentdm::Models::TemplateResponse>]
34
+ # @param page [Integer]
35
+ # @param page_size [Integer]
36
+ # @param total_count [Integer]
37
+ # @param total_pages [Integer]
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,100 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ # @see Sentdm::Resources::Templates#create
6
+ class TemplateResponse < Sentdm::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # The unique identifier of the template
9
+ #
10
+ # @return [String, nil]
11
+ optional :id, String
12
+
13
+ # @!attribute category
14
+ # The template category (e.g., MARKETING, UTILITY, AUTHENTICATION)
15
+ #
16
+ # @return [String, nil]
17
+ optional :category, String
18
+
19
+ # @!attribute created_at
20
+ # The date and time when the template was created
21
+ #
22
+ # @return [Time, nil]
23
+ optional :created_at, Time, api_name: :createdAt
24
+
25
+ # @!attribute definition
26
+ # The complete template definition including header, body, footer, and buttons
27
+ #
28
+ # @return [Sentdm::Models::TemplateDefinition, nil]
29
+ optional :definition, -> { Sentdm::TemplateDefinition }
30
+
31
+ # @!attribute display_name
32
+ # The display name of the template (auto-generated if not provided)
33
+ #
34
+ # @return [String, nil]
35
+ optional :display_name, String, api_name: :displayName
36
+
37
+ # @!attribute is_published
38
+ # Indicates whether the template is published and available for use
39
+ #
40
+ # @return [Boolean, nil]
41
+ optional :is_published, Sentdm::Internal::Type::Boolean, api_name: :isPublished
42
+
43
+ # @!attribute language
44
+ # The template language code (e.g., en_US, es_ES)
45
+ #
46
+ # @return [String, nil]
47
+ optional :language, String
48
+
49
+ # @!attribute status
50
+ # The approval status of the template (e.g., APPROVED, PENDING, REJECTED, DRAFT)
51
+ #
52
+ # @return [String, nil]
53
+ optional :status, String
54
+
55
+ # @!attribute updated_at
56
+ # The date and time when the template was last updated
57
+ #
58
+ # @return [Time, nil]
59
+ optional :updated_at, Time, api_name: :updatedAt, nil?: true
60
+
61
+ # @!attribute whatsapp_template_id
62
+ # The WhatsApp Business API template ID from Meta
63
+ #
64
+ # @return [String, nil]
65
+ optional :whatsapp_template_id, String, api_name: :whatsappTemplateId
66
+
67
+ # @!attribute whatsapp_template_name
68
+ # The WhatsApp template name as registered with Meta
69
+ #
70
+ # @return [String, nil]
71
+ optional :whatsapp_template_name, String, api_name: :whatsappTemplateName
72
+
73
+ # @!method initialize(id: nil, category: nil, created_at: nil, definition: nil, display_name: nil, is_published: nil, language: nil, status: nil, updated_at: nil, whatsapp_template_id: nil, whatsapp_template_name: nil)
74
+ # Represents a message template with comprehensive metadata including definition
75
+ # structure
76
+ #
77
+ # @param id [String] The unique identifier of the template
78
+ #
79
+ # @param category [String] The template category (e.g., MARKETING, UTILITY, AUTHENTICATION)
80
+ #
81
+ # @param created_at [Time] The date and time when the template was created
82
+ #
83
+ # @param definition [Sentdm::Models::TemplateDefinition] The complete template definition including header, body, footer, and buttons
84
+ #
85
+ # @param display_name [String] The display name of the template (auto-generated if not provided)
86
+ #
87
+ # @param is_published [Boolean] Indicates whether the template is published and available for use
88
+ #
89
+ # @param language [String] The template language code (e.g., en_US, es_ES)
90
+ #
91
+ # @param status [String] The approval status of the template (e.g., APPROVED, PENDING, REJECTED, DRAFT)
92
+ #
93
+ # @param updated_at [Time, nil] The date and time when the template was last updated
94
+ #
95
+ # @param whatsapp_template_id [String] The WhatsApp Business API template ID from Meta
96
+ #
97
+ # @param whatsapp_template_name [String] The WhatsApp template name as registered with Meta
98
+ end
99
+ end
100
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ # @see Sentdm::Resources::Templates#retrieve
6
+ class TemplateRetrieveParams < Sentdm::Internal::Type::BaseModel
7
+ extend Sentdm::Internal::Type::RequestParameters::Converter
8
+ include Sentdm::Internal::Type::RequestParameters
9
+
10
+ # @!method initialize(request_options: {})
11
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,74 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Models
5
+ class TemplateVariable < Sentdm::Internal::Type::BaseModel
6
+ # @!attribute id
7
+ #
8
+ # @return [Integer, nil]
9
+ optional :id, Integer
10
+
11
+ # @!attribute name
12
+ #
13
+ # @return [String, nil]
14
+ optional :name, String
15
+
16
+ # @!attribute props
17
+ #
18
+ # @return [Sentdm::Models::TemplateVariable::Props, nil]
19
+ optional :props, -> { Sentdm::TemplateVariable::Props }
20
+
21
+ # @!attribute type
22
+ #
23
+ # @return [String, nil]
24
+ optional :type, String
25
+
26
+ # @!method initialize(id: nil, name: nil, props: nil, type: nil)
27
+ # @param id [Integer]
28
+ # @param name [String]
29
+ # @param props [Sentdm::Models::TemplateVariable::Props]
30
+ # @param type [String]
31
+
32
+ # @see Sentdm::Models::TemplateVariable#props
33
+ class Props < Sentdm::Internal::Type::BaseModel
34
+ # @!attribute alt
35
+ #
36
+ # @return [String, nil]
37
+ optional :alt, String, nil?: true
38
+
39
+ # @!attribute media_type
40
+ #
41
+ # @return [String, nil]
42
+ optional :media_type, String, api_name: :mediaType, nil?: true
43
+
44
+ # @!attribute sample
45
+ #
46
+ # @return [String, nil]
47
+ optional :sample, String, nil?: true
48
+
49
+ # @!attribute short_url
50
+ #
51
+ # @return [String, nil]
52
+ optional :short_url, String, api_name: :shortUrl, nil?: true
53
+
54
+ # @!attribute url
55
+ #
56
+ # @return [String, nil]
57
+ optional :url, String, nil?: true
58
+
59
+ # @!attribute variable_type
60
+ #
61
+ # @return [String, nil]
62
+ optional :variable_type, String, api_name: :variableType, nil?: true
63
+
64
+ # @!method initialize(alt: nil, media_type: nil, sample: nil, short_url: nil, url: nil, variable_type: nil)
65
+ # @param alt [String, nil]
66
+ # @param media_type [String, nil]
67
+ # @param sample [String, nil]
68
+ # @param short_url [String, nil]
69
+ # @param url [String, nil]
70
+ # @param variable_type [String, nil]
71
+ end
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,83 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ [Sentdm::Internal::Type::BaseModel, *Sentdm::Internal::Type::BaseModel.subclasses].each do |cls|
5
+ cls.define_sorbet_constant!(:OrHash) { T.type_alias { T.any(cls, Sentdm::Internal::AnyHash) } }
6
+ end
7
+
8
+ Sentdm::Internal::Util.walk_namespaces(Sentdm::Models).each do |mod|
9
+ case mod
10
+ in Sentdm::Internal::Type::Enum | Sentdm::Internal::Type::Union
11
+ mod.constants.each do |name|
12
+ case mod.const_get(name)
13
+ in true | false
14
+ mod.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T::Boolean } }
15
+ mod.define_sorbet_constant!(:OrBoolean) { T.type_alias { T::Boolean } }
16
+ in Integer
17
+ mod.define_sorbet_constant!(:TaggedInteger) { T.type_alias { Integer } }
18
+ mod.define_sorbet_constant!(:OrInteger) { T.type_alias { Integer } }
19
+ in Float
20
+ mod.define_sorbet_constant!(:TaggedFloat) { T.type_alias { Float } }
21
+ mod.define_sorbet_constant!(:OrFloat) { T.type_alias { Float } }
22
+ in Symbol
23
+ mod.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { Symbol } }
24
+ mod.define_sorbet_constant!(:OrSymbol) { T.type_alias { T.any(Symbol, String) } }
25
+ else
26
+ end
27
+ end
28
+ else
29
+ end
30
+ end
31
+
32
+ Sentdm::Internal::Util.walk_namespaces(Sentdm::Models)
33
+ .lazy
34
+ .grep(Sentdm::Internal::Type::Union)
35
+ .each do |mod|
36
+ const = :Variants
37
+ next if mod.sorbet_constant_defined?(const)
38
+
39
+ mod.define_sorbet_constant!(const) { T.type_alias { mod.to_sorbet_type } }
40
+ end
41
+
42
+ ContactListItem = Sentdm::Models::ContactListItem
43
+
44
+ ContactListParams = Sentdm::Models::ContactListParams
45
+
46
+ ContactRetrieveByPhoneParams = Sentdm::Models::ContactRetrieveByPhoneParams
47
+
48
+ ContactRetrieveIDParams = Sentdm::Models::ContactRetrieveIDParams
49
+
50
+ MessageRetrieveParams = Sentdm::Models::MessageRetrieveParams
51
+
52
+ MessageSendQuickMessageParams = Sentdm::Models::MessageSendQuickMessageParams
53
+
54
+ MessageSendToContactParams = Sentdm::Models::MessageSendToContactParams
55
+
56
+ MessageSendToPhoneParams = Sentdm::Models::MessageSendToPhoneParams
57
+
58
+ NumberLookupRetrieveParams = Sentdm::Models::NumberLookupRetrieveParams
59
+
60
+ OrganizationListParams = Sentdm::Models::OrganizationListParams
61
+
62
+ OrganizationRetrieveProfilesParams = Sentdm::Models::OrganizationRetrieveProfilesParams
63
+
64
+ Organizations = Sentdm::Models::Organizations
65
+
66
+ ProfileSummary = Sentdm::Models::ProfileSummary
67
+
68
+ TemplateBodyContent = Sentdm::Models::TemplateBodyContent
69
+
70
+ TemplateCreateParams = Sentdm::Models::TemplateCreateParams
71
+
72
+ TemplateDefinition = Sentdm::Models::TemplateDefinition
73
+
74
+ TemplateDeleteParams = Sentdm::Models::TemplateDeleteParams
75
+
76
+ TemplateListParams = Sentdm::Models::TemplateListParams
77
+
78
+ TemplateResponse = Sentdm::Models::TemplateResponse
79
+
80
+ TemplateRetrieveParams = Sentdm::Models::TemplateRetrieveParams
81
+
82
+ TemplateVariable = Sentdm::Models::TemplateVariable
83
+ end