sentdm 0.30.0 → 0.32.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 (111) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -0
  3. data/README.md +29 -1
  4. data/lib/sentdm/internal/contacts_page.rb +115 -0
  5. data/lib/sentdm/internal/conversations_page.rb +115 -0
  6. data/lib/sentdm/internal/templates_page.rb +115 -0
  7. data/lib/sentdm/internal/webhook_events_page.rb +115 -0
  8. data/lib/sentdm/internal/webhooks_page.rb +115 -0
  9. data/lib/sentdm/models/api_response_of_conversation_messages_list.rb +0 -1
  10. data/lib/sentdm/models/channel_event.rb +78 -0
  11. data/lib/sentdm/models/channel_event_payload.rb +128 -0
  12. data/lib/sentdm/models/contact_event.rb +69 -0
  13. data/lib/sentdm/models/contact_event_payload.rb +111 -0
  14. data/lib/sentdm/models/contact_list_params.rb +13 -13
  15. data/lib/sentdm/models/contact_response.rb +1 -0
  16. data/lib/sentdm/models/conversation_list_messages_params.rb +5 -5
  17. data/lib/sentdm/models/conversation_list_params.rb +5 -5
  18. data/lib/sentdm/models/inbound_message_event.rb +16 -8
  19. data/lib/sentdm/models/message_event.rb +16 -8
  20. data/lib/sentdm/models/message_event_payload.rb +11 -1
  21. data/lib/sentdm/models/template.rb +37 -5
  22. data/lib/sentdm/models/template_body.rb +20 -11
  23. data/lib/sentdm/models/template_body_content.rb +35 -3
  24. data/lib/sentdm/models/template_button.rb +8 -2
  25. data/lib/sentdm/models/template_button_props.rb +12 -1
  26. data/lib/sentdm/models/template_definition.rb +14 -2
  27. data/lib/sentdm/models/template_event.rb +16 -8
  28. data/lib/sentdm/models/template_event_payload.rb +31 -4
  29. data/lib/sentdm/models/template_list_params.rb +17 -17
  30. data/lib/sentdm/models/template_variable.rb +20 -3
  31. data/lib/sentdm/models/webhook_list_events_params.rb +5 -5
  32. data/lib/sentdm/models/webhook_list_events_response.rb +116 -168
  33. data/lib/sentdm/models/webhook_list_params.rb +11 -11
  34. data/lib/sentdm/models/webhook_response.rb +1 -0
  35. data/lib/sentdm/models.rb +8 -0
  36. data/lib/sentdm/resources/contacts.rb +8 -7
  37. data/lib/sentdm/resources/conversations.rb +10 -8
  38. data/lib/sentdm/resources/templates.rb +38 -11
  39. data/lib/sentdm/resources/webhooks.rb +12 -10
  40. data/lib/sentdm/version.rb +1 -1
  41. data/lib/sentdm.rb +9 -3
  42. data/rbi/sentdm/internal/contacts_page.rbi +71 -0
  43. data/rbi/sentdm/internal/conversations_page.rbi +71 -0
  44. data/rbi/sentdm/internal/templates_page.rbi +71 -0
  45. data/rbi/sentdm/internal/webhook_events_page.rbi +71 -0
  46. data/rbi/sentdm/internal/webhooks_page.rbi +71 -0
  47. data/rbi/sentdm/models/channel_event.rbi +128 -0
  48. data/rbi/sentdm/models/channel_event_payload.rbi +189 -0
  49. data/rbi/sentdm/models/contact_event.rbi +110 -0
  50. data/rbi/sentdm/models/contact_event_payload.rbi +164 -0
  51. data/rbi/sentdm/models/contact_list_params.rbi +19 -13
  52. data/rbi/sentdm/models/conversation_list_messages_params.rbi +12 -6
  53. data/rbi/sentdm/models/conversation_list_params.rbi +16 -5
  54. data/rbi/sentdm/models/inbound_message_event.rbi +18 -10
  55. data/rbi/sentdm/models/message_event.rbi +18 -10
  56. data/rbi/sentdm/models/message_event_payload.rbi +12 -0
  57. data/rbi/sentdm/models/template.rbi +58 -4
  58. data/rbi/sentdm/models/template_body.rbi +22 -13
  59. data/rbi/sentdm/models/template_body_content.rbi +59 -1
  60. data/rbi/sentdm/models/template_button.rbi +14 -2
  61. data/rbi/sentdm/models/template_button_props.rbi +22 -0
  62. data/rbi/sentdm/models/template_definition.rbi +20 -2
  63. data/rbi/sentdm/models/template_event.rbi +18 -10
  64. data/rbi/sentdm/models/template_event_payload.rbi +51 -8
  65. data/rbi/sentdm/models/template_list_params.rbi +22 -16
  66. data/rbi/sentdm/models/template_variable.rbi +28 -1
  67. data/rbi/sentdm/models/webhook_list_events_params.rbi +12 -6
  68. data/rbi/sentdm/models/webhook_list_events_response.rbi +120 -263
  69. data/rbi/sentdm/models/webhook_list_params.rbi +16 -10
  70. data/rbi/sentdm/models.rbi +8 -0
  71. data/rbi/sentdm/resources/contacts.rbi +6 -6
  72. data/rbi/sentdm/resources/conversations.rbi +14 -6
  73. data/rbi/sentdm/resources/templates.rbi +35 -9
  74. data/rbi/sentdm/resources/webhooks.rbi +12 -8
  75. data/sig/sentdm/internal/contacts_page.rbs +41 -0
  76. data/sig/sentdm/internal/conversations_page.rbs +41 -0
  77. data/sig/sentdm/internal/templates_page.rbs +44 -0
  78. data/sig/sentdm/internal/webhook_events_page.rbs +41 -0
  79. data/sig/sentdm/internal/webhooks_page.rbs +41 -0
  80. data/sig/sentdm/models/channel_event.rbs +44 -0
  81. data/sig/sentdm/models/channel_event_payload.rbs +63 -0
  82. data/sig/sentdm/models/contact_event.rbs +44 -0
  83. data/sig/sentdm/models/contact_event_payload.rbs +63 -0
  84. data/sig/sentdm/models/contact_list_params.rbs +11 -7
  85. data/sig/sentdm/models/conversation_list_messages_params.rbs +8 -4
  86. data/sig/sentdm/models/conversation_list_params.rbs +8 -4
  87. data/sig/sentdm/models/inbound_message_event.rbs +5 -0
  88. data/sig/sentdm/models/message_event.rbs +5 -0
  89. data/sig/sentdm/models/message_event_payload.rbs +5 -0
  90. data/sig/sentdm/models/template.rbs +5 -0
  91. data/sig/sentdm/models/template_event.rbs +5 -0
  92. data/sig/sentdm/models/template_event_payload.rbs +9 -6
  93. data/sig/sentdm/models/template_list_params.rbs +14 -10
  94. data/sig/sentdm/models/webhook_list_events_params.rbs +8 -4
  95. data/sig/sentdm/models/webhook_list_events_response.rbs +65 -127
  96. data/sig/sentdm/models/webhook_list_params.rbs +11 -7
  97. data/sig/sentdm/models.rbs +8 -0
  98. data/sig/sentdm/resources/contacts.rbs +3 -3
  99. data/sig/sentdm/resources/conversations.rbs +6 -6
  100. data/sig/sentdm/resources/templates.rbs +3 -3
  101. data/sig/sentdm/resources/webhooks.rbs +6 -6
  102. metadata +29 -11
  103. data/lib/sentdm/models/contact_list_response.rb +0 -65
  104. data/lib/sentdm/models/template_list_response.rb +0 -65
  105. data/lib/sentdm/models/webhook_list_response.rb +0 -65
  106. data/rbi/sentdm/models/contact_list_response.rbi +0 -128
  107. data/rbi/sentdm/models/template_list_response.rbi +0 -128
  108. data/rbi/sentdm/models/webhook_list_response.rbi +0 -128
  109. data/sig/sentdm/models/contact_list_response.rbs +0 -67
  110. data/sig/sentdm/models/template_list_response.rbs +0 -65
  111. data/sig/sentdm/models/webhook_list_response.rbs +0 -67
@@ -100,22 +100,22 @@ module Sentdm
100
100
  # filtering by search term, channel, or phone number.
101
101
  sig do
102
102
  params(
103
+ channel: T.nilable(String),
103
104
  page: Integer,
104
105
  page_size: Integer,
105
- channel: T.nilable(String),
106
106
  phone: T.nilable(String),
107
107
  search: T.nilable(String),
108
108
  x_profile_id: String,
109
109
  request_options: Sentdm::RequestOptions::OrHash
110
- ).returns(Sentdm::Models::ContactListResponse)
110
+ ).returns(Sentdm::Internal::ContactsPage[Sentdm::ContactResponse])
111
111
  end
112
112
  def list(
113
- # Query param: Page number (1-indexed)
114
- page:,
115
- # Query param: Number of items per page
116
- page_size:,
117
113
  # Query param: Optional channel filter (sms, whatsapp)
118
114
  channel: nil,
115
+ # Query param: Page number (1-indexed)
116
+ page: nil,
117
+ # Query param: Number of items per page
118
+ page_size: nil,
119
119
  # Query param: Optional phone number filter (alternative to list view)
120
120
  phone: nil,
121
121
  # Query param: Optional search term for filtering contacts
@@ -19,13 +19,17 @@ module Sentdm
19
19
  page_size: Integer,
20
20
  x_profile_id: String,
21
21
  request_options: Sentdm::RequestOptions::OrHash
22
- ).returns(Sentdm::APIResponseOfConversationMessagesList)
22
+ ).returns(
23
+ Sentdm::Internal::ConversationsPage[
24
+ Sentdm::ConversationMessagesList::Message
25
+ ]
26
+ )
23
27
  end
24
28
  def list(
25
29
  # Query param
26
- page:,
30
+ page: nil,
27
31
  # Query param
28
- page_size:,
32
+ page_size: nil,
29
33
  # Header param: Profile UUID to scope the request to a child profile. Only
30
34
  # organization API keys can use this header. The profile must belong to the
31
35
  # calling organization.
@@ -43,15 +47,19 @@ module Sentdm
43
47
  page_size: Integer,
44
48
  x_profile_id: String,
45
49
  request_options: Sentdm::RequestOptions::OrHash
46
- ).returns(Sentdm::APIResponseOfConversationMessagesList)
50
+ ).returns(
51
+ Sentdm::Internal::ConversationsPage[
52
+ Sentdm::ConversationMessagesList::Message
53
+ ]
54
+ )
47
55
  end
48
56
  def list_messages(
49
57
  # Path param: Conversation id from the route.
50
58
  id,
51
59
  # Query param
52
- page:,
60
+ page: nil,
53
61
  # Query param
54
- page_size:,
62
+ page_size: nil,
55
63
  # Header param: Profile UUID to scope the request to a child profile. Only
56
64
  # organization API keys can use this header. The profile must belong to the
57
65
  # calling organization.
@@ -12,7 +12,9 @@ module Sentdm
12
12
  class Templates
13
13
  # Creates a new message template with header, body, footer, and buttons. The
14
14
  # template can be submitted for review immediately or saved as draft for later
15
- # submission.
15
+ # submission. There is no `name` field on create — the display name is derived
16
+ # from the template's content and can be changed afterwards with
17
+ # `PUT /v3/templates/{id}`.
16
18
  sig do
17
19
  params(
18
20
  category: T.nilable(String),
@@ -76,7 +78,31 @@ module Sentdm
76
78
  end
77
79
 
78
80
  # Updates an existing template's name, category, language, definition, or submits
79
- # it for review.
81
+ # it for review. While the template is in review (status PENDING, or any channel
82
+ # awaiting a verdict) its definition, category and language are frozen and a
83
+ # resubmission is refused — those requests answer 409 CONFLICT_006. The display
84
+ # name stays editable throughout.
85
+ #
86
+ # `definition`, `category` and `language` are editable only from status DRAFT,
87
+ # REJECTED or APPROVED. An edit to any of them on a template in another state
88
+ # (PAUSED, DISABLED or REVOKED) is refused with 400 VALIDATION_001 and the detail
89
+ # "Template (except display name) cannot be updated unless it is in draft or
90
+ # rejected status"; `name` stays editable in every state. `submit_for_review` on a
91
+ # PAUSED, DISABLED or REVOKED template is accepted and answers 200, but opens no
92
+ # review and does not move the status — only the reviewer can reinstate it.
93
+ #
94
+ # Editing an APPROVED template is a live edit: the new content is stored
95
+ # immediately, and sending `submit_for_review: true` re-opens review, which
96
+ # returns the affected channels to PENDING so they stop sending until they are
97
+ # approved again. The previously approved content is never sent during re-review.
98
+ # Watch the per-channel `templates` webhook events rather than assuming the
99
+ # template-level status.
100
+ #
101
+ # Templates provisioned by Sent (light-onboarding templates, whose names carry the
102
+ # reserved `sent_` prefix) are read-only: every field is refused with 400
103
+ # VALIDATION*001 and the detail "This template is read-only. Only 'submit for
104
+ # review' is allowed.", and only `submit_for_review` is accepted. A `name`
105
+ # starting with `sent*` is refused for the same reason — the prefix is reserved.
80
106
  sig do
81
107
  params(
82
108
  id: String,
@@ -125,21 +151,17 @@ module Sentdm
125
151
  # Supports filtering by status, category, and search term.
126
152
  sig do
127
153
  params(
128
- page: Integer,
129
- page_size: Integer,
130
154
  category: T.nilable(String),
131
155
  is_welcome_playground: T.nilable(T::Boolean),
156
+ page: Integer,
157
+ page_size: Integer,
132
158
  search: T.nilable(String),
133
159
  status: T.nilable(String),
134
160
  x_profile_id: String,
135
161
  request_options: Sentdm::RequestOptions::OrHash
136
- ).returns(Sentdm::Models::TemplateListResponse)
162
+ ).returns(Sentdm::Internal::TemplatesPage[Sentdm::Template])
137
163
  end
138
164
  def list(
139
- # Query param: Page number (1-indexed)
140
- page:,
141
- # Query param: Number of items per page
142
- page_size:,
143
165
  # Query param: Optional category filter: MARKETING, UTILITY, AUTHENTICATION
144
166
  category: nil,
145
167
  # Query param: Accepted and ignored. It used to filter on the welcome-playground
@@ -148,6 +170,10 @@ module Sentdm
148
170
  # so a client still passing is_welcome_playground keeps binding instead of the
149
171
  # request shape changing under it.
150
172
  is_welcome_playground: nil,
173
+ # Query param: Page number (1-indexed)
174
+ page: nil,
175
+ # Query param: Number of items per page
176
+ page_size: nil,
151
177
  # Query param: Optional search term for filtering templates
152
178
  search: nil,
153
179
  # Query param: Optional status filter: APPROVED, PENDING, REJECTED
@@ -123,21 +123,21 @@ module Sentdm
123
123
  # Retrieves a paginated list of webhooks for the authenticated customer.
124
124
  sig do
125
125
  params(
126
+ is_active: T.nilable(T::Boolean),
126
127
  page: Integer,
127
128
  page_size: Integer,
128
- is_active: T.nilable(T::Boolean),
129
129
  search: T.nilable(String),
130
130
  x_profile_id: String,
131
131
  request_options: Sentdm::RequestOptions::OrHash
132
- ).returns(Sentdm::Models::WebhookListResponse)
132
+ ).returns(Sentdm::Internal::WebhooksPage[Sentdm::WebhookResponse])
133
133
  end
134
134
  def list(
135
135
  # Query param
136
- page:,
136
+ is_active: nil,
137
137
  # Query param
138
- page_size:,
138
+ page: nil,
139
139
  # Query param
140
- is_active: nil,
140
+ page_size: nil,
141
141
  # Query param
142
142
  search: nil,
143
143
  # Header param: Profile UUID to scope the request to a child profile. Only
@@ -189,15 +189,19 @@ module Sentdm
189
189
  search: T.nilable(String),
190
190
  x_profile_id: String,
191
191
  request_options: Sentdm::RequestOptions::OrHash
192
- ).returns(Sentdm::Models::WebhookListEventsResponse)
192
+ ).returns(
193
+ Sentdm::Internal::WebhookEventsPage[
194
+ Sentdm::Models::WebhookListEventsResponse
195
+ ]
196
+ )
193
197
  end
194
198
  def list_events(
195
199
  # Path param
196
200
  id,
197
201
  # Query param
198
- page:,
202
+ page: nil,
199
203
  # Query param
200
- page_size:,
204
+ page_size: nil,
201
205
  # Query param
202
206
  search: nil,
203
207
  # Header param: Profile UUID to scope the request to a child profile. Only
@@ -0,0 +1,41 @@
1
+ module Sentdm
2
+ module Internal
3
+ class ContactsPage[Elem]
4
+ include Sentdm::Internal::Type::BasePage[Elem]
5
+
6
+ attr_accessor data: Data
7
+
8
+ def inspect: -> String
9
+
10
+ type data = { contacts: ::Array[top], pagination: Data::Pagination }
11
+ class Data < Sentdm::Internal::Type::BaseModel
12
+ attr_reader contacts: ::Array[top]?
13
+
14
+ def contacts=: (::Array[top]) -> ::Array[top]
15
+
16
+ attr_reader pagination: Data::Pagination?
17
+
18
+ def pagination=: (Data::Pagination) -> Data::Pagination
19
+
20
+ def initialize: (
21
+ ?contacts: ::Array[top],
22
+ ?pagination: Data::Pagination
23
+ ) -> void
24
+
25
+ def to_hash: -> { contacts: ::Array[top], pagination: Data::Pagination }
26
+
27
+ type pagination = { has_more: bool }
28
+
29
+ class Pagination < Sentdm::Internal::Type::BaseModel
30
+ attr_reader has_more: bool?
31
+
32
+ def has_more=: (bool) -> bool
33
+
34
+ def initialize: (?has_more: bool) -> void
35
+
36
+ def to_hash: -> { has_more: bool }
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,41 @@
1
+ module Sentdm
2
+ module Internal
3
+ class ConversationsPage[Elem]
4
+ include Sentdm::Internal::Type::BasePage[Elem]
5
+
6
+ attr_accessor data: Data
7
+
8
+ def inspect: -> String
9
+
10
+ type data = { messages: ::Array[top], pagination: Data::Pagination }
11
+ class Data < Sentdm::Internal::Type::BaseModel
12
+ attr_reader messages: ::Array[top]?
13
+
14
+ def messages=: (::Array[top]) -> ::Array[top]
15
+
16
+ attr_reader pagination: Data::Pagination?
17
+
18
+ def pagination=: (Data::Pagination) -> Data::Pagination
19
+
20
+ def initialize: (
21
+ ?messages: ::Array[top],
22
+ ?pagination: Data::Pagination
23
+ ) -> void
24
+
25
+ def to_hash: -> { messages: ::Array[top], pagination: Data::Pagination }
26
+
27
+ type pagination = { has_more: bool }
28
+
29
+ class Pagination < Sentdm::Internal::Type::BaseModel
30
+ attr_reader has_more: bool?
31
+
32
+ def has_more=: (bool) -> bool
33
+
34
+ def initialize: (?has_more: bool) -> void
35
+
36
+ def to_hash: -> { has_more: bool }
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,44 @@
1
+ module Sentdm
2
+ module Internal
3
+ class TemplatesPage[Elem]
4
+ include Sentdm::Internal::Type::BasePage[Elem]
5
+
6
+ attr_accessor data: Data
7
+
8
+ def inspect: -> String
9
+
10
+ type data = { pagination: Data::Pagination, templates: ::Array[top] }
11
+ class Data < Sentdm::Internal::Type::BaseModel
12
+ attr_reader pagination: Data::Pagination?
13
+
14
+ def pagination=: (Data::Pagination) -> Data::Pagination
15
+
16
+ attr_reader templates: ::Array[top]?
17
+
18
+ def templates=: (::Array[top]) -> ::Array[top]
19
+
20
+ def initialize: (
21
+ ?pagination: Data::Pagination,
22
+ ?templates: ::Array[top]
23
+ ) -> void
24
+
25
+ def to_hash: -> {
26
+ pagination: Data::Pagination,
27
+ templates: ::Array[top]
28
+ }
29
+
30
+ type pagination = { has_more: bool }
31
+
32
+ class Pagination < Sentdm::Internal::Type::BaseModel
33
+ attr_reader has_more: bool?
34
+
35
+ def has_more=: (bool) -> bool
36
+
37
+ def initialize: (?has_more: bool) -> void
38
+
39
+ def to_hash: -> { has_more: bool }
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,41 @@
1
+ module Sentdm
2
+ module Internal
3
+ class WebhookEventsPage[Elem]
4
+ include Sentdm::Internal::Type::BasePage[Elem]
5
+
6
+ attr_accessor data: Data
7
+
8
+ def inspect: -> String
9
+
10
+ type data = { events: ::Array[top], pagination: Data::Pagination }
11
+ class Data < Sentdm::Internal::Type::BaseModel
12
+ attr_reader events: ::Array[top]?
13
+
14
+ def events=: (::Array[top]) -> ::Array[top]
15
+
16
+ attr_reader pagination: Data::Pagination?
17
+
18
+ def pagination=: (Data::Pagination) -> Data::Pagination
19
+
20
+ def initialize: (
21
+ ?events: ::Array[top],
22
+ ?pagination: Data::Pagination
23
+ ) -> void
24
+
25
+ def to_hash: -> { events: ::Array[top], pagination: Data::Pagination }
26
+
27
+ type pagination = { has_more: bool }
28
+
29
+ class Pagination < Sentdm::Internal::Type::BaseModel
30
+ attr_reader has_more: bool?
31
+
32
+ def has_more=: (bool) -> bool
33
+
34
+ def initialize: (?has_more: bool) -> void
35
+
36
+ def to_hash: -> { has_more: bool }
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,41 @@
1
+ module Sentdm
2
+ module Internal
3
+ class WebhooksPage[Elem]
4
+ include Sentdm::Internal::Type::BasePage[Elem]
5
+
6
+ attr_accessor data: Data
7
+
8
+ def inspect: -> String
9
+
10
+ type data = { pagination: Data::Pagination, webhooks: ::Array[top] }
11
+ class Data < Sentdm::Internal::Type::BaseModel
12
+ attr_reader pagination: Data::Pagination?
13
+
14
+ def pagination=: (Data::Pagination) -> Data::Pagination
15
+
16
+ attr_reader webhooks: ::Array[top]?
17
+
18
+ def webhooks=: (::Array[top]) -> ::Array[top]
19
+
20
+ def initialize: (
21
+ ?pagination: Data::Pagination,
22
+ ?webhooks: ::Array[top]
23
+ ) -> void
24
+
25
+ def to_hash: -> { pagination: Data::Pagination, webhooks: ::Array[top] }
26
+
27
+ type pagination = { has_more: bool }
28
+
29
+ class Pagination < Sentdm::Internal::Type::BaseModel
30
+ attr_reader has_more: bool?
31
+
32
+ def has_more=: (bool) -> bool
33
+
34
+ def initialize: (?has_more: bool) -> void
35
+
36
+ def to_hash: -> { has_more: bool }
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,44 @@
1
+ module Sentdm
2
+ module Models
3
+ type channel_event =
4
+ {
5
+ event: String?,
6
+ field: String,
7
+ payload: Sentdm::ChannelEventPayload?,
8
+ request_id: String?,
9
+ timestamp: String
10
+ }
11
+
12
+ class ChannelEvent < Sentdm::Internal::Type::BaseModel
13
+ attr_accessor event: String?
14
+
15
+ attr_reader field: String?
16
+
17
+ def field=: (String) -> String
18
+
19
+ attr_accessor payload: Sentdm::ChannelEventPayload?
20
+
21
+ attr_accessor request_id: String?
22
+
23
+ attr_reader timestamp: String?
24
+
25
+ def timestamp=: (String) -> String
26
+
27
+ def initialize: (
28
+ ?event: String?,
29
+ ?field: String,
30
+ ?payload: Sentdm::ChannelEventPayload?,
31
+ ?request_id: String?,
32
+ ?timestamp: String
33
+ ) -> void
34
+
35
+ def to_hash: -> {
36
+ event: String?,
37
+ field: String,
38
+ payload: Sentdm::ChannelEventPayload?,
39
+ request_id: String?,
40
+ timestamp: String
41
+ }
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,63 @@
1
+ module Sentdm
2
+ module Models
3
+ type channel_event_payload =
4
+ {
5
+ country: String,
6
+ account_id: String,
7
+ channel: String,
8
+ number_type: String?,
9
+ reason: String?,
10
+ sender_value: String?,
11
+ status: String,
12
+ updated_at: String
13
+ }
14
+
15
+ class ChannelEventPayload < Sentdm::Internal::Type::BaseModel
16
+ attr_accessor country: String
17
+
18
+ attr_reader account_id: String?
19
+
20
+ def account_id=: (String) -> String
21
+
22
+ attr_reader channel: String?
23
+
24
+ def channel=: (String) -> String
25
+
26
+ attr_accessor number_type: String?
27
+
28
+ attr_accessor reason: String?
29
+
30
+ attr_accessor sender_value: String?
31
+
32
+ attr_reader status: String?
33
+
34
+ def status=: (String) -> String
35
+
36
+ attr_reader updated_at: String?
37
+
38
+ def updated_at=: (String) -> String
39
+
40
+ def initialize: (
41
+ country: String,
42
+ ?account_id: String,
43
+ ?channel: String,
44
+ ?number_type: String?,
45
+ ?reason: String?,
46
+ ?sender_value: String?,
47
+ ?status: String,
48
+ ?updated_at: String
49
+ ) -> void
50
+
51
+ def to_hash: -> {
52
+ country: String,
53
+ account_id: String,
54
+ channel: String,
55
+ number_type: String?,
56
+ reason: String?,
57
+ sender_value: String?,
58
+ status: String,
59
+ updated_at: String
60
+ }
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,44 @@
1
+ module Sentdm
2
+ module Models
3
+ type contact_event =
4
+ {
5
+ event: String?,
6
+ field: String,
7
+ payload: Sentdm::ContactEventPayload?,
8
+ request_id: String?,
9
+ timestamp: String
10
+ }
11
+
12
+ class ContactEvent < Sentdm::Internal::Type::BaseModel
13
+ attr_accessor event: String?
14
+
15
+ attr_reader field: String?
16
+
17
+ def field=: (String) -> String
18
+
19
+ attr_accessor payload: Sentdm::ContactEventPayload?
20
+
21
+ attr_accessor request_id: String?
22
+
23
+ attr_reader timestamp: String?
24
+
25
+ def timestamp=: (String) -> String
26
+
27
+ def initialize: (
28
+ ?event: String?,
29
+ ?field: String,
30
+ ?payload: Sentdm::ContactEventPayload?,
31
+ ?request_id: String?,
32
+ ?timestamp: String
33
+ ) -> void
34
+
35
+ def to_hash: -> {
36
+ event: String?,
37
+ field: String,
38
+ payload: Sentdm::ContactEventPayload?,
39
+ request_id: String?,
40
+ timestamp: String
41
+ }
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,63 @@
1
+ module Sentdm
2
+ module Models
3
+ type contact_event_payload =
4
+ {
5
+ opt_out: bool,
6
+ source: String,
7
+ account_id: String,
8
+ channel: String,
9
+ contact_id: String,
10
+ message_id: String?,
11
+ phone_number: String,
12
+ text: String?
13
+ }
14
+
15
+ class ContactEventPayload < Sentdm::Internal::Type::BaseModel
16
+ attr_accessor opt_out: bool
17
+
18
+ attr_accessor source: String
19
+
20
+ attr_reader account_id: String?
21
+
22
+ def account_id=: (String) -> String
23
+
24
+ attr_reader channel: String?
25
+
26
+ def channel=: (String) -> String
27
+
28
+ attr_reader contact_id: String?
29
+
30
+ def contact_id=: (String) -> String
31
+
32
+ attr_accessor message_id: String?
33
+
34
+ attr_reader phone_number: String?
35
+
36
+ def phone_number=: (String) -> String
37
+
38
+ attr_accessor text: String?
39
+
40
+ def initialize: (
41
+ opt_out: bool,
42
+ source: String,
43
+ ?account_id: String,
44
+ ?channel: String,
45
+ ?contact_id: String,
46
+ ?message_id: String?,
47
+ ?phone_number: String,
48
+ ?text: String?
49
+ ) -> void
50
+
51
+ def to_hash: -> {
52
+ opt_out: bool,
53
+ source: String,
54
+ account_id: String,
55
+ channel: String,
56
+ contact_id: String,
57
+ message_id: String?,
58
+ phone_number: String,
59
+ text: String?
60
+ }
61
+ end
62
+ end
63
+ end
@@ -2,9 +2,9 @@ module Sentdm
2
2
  module Models
3
3
  type contact_list_params =
4
4
  {
5
+ channel: String?,
5
6
  page: Integer,
6
7
  page_size: Integer,
7
- channel: String?,
8
8
  phone: String?,
9
9
  search: String?,
10
10
  x_profile_id: String
@@ -15,11 +15,15 @@ module Sentdm
15
15
  extend Sentdm::Internal::Type::RequestParameters::Converter
16
16
  include Sentdm::Internal::Type::RequestParameters
17
17
 
18
- attr_accessor page: Integer
18
+ attr_accessor channel: String?
19
19
 
20
- attr_accessor page_size: Integer
20
+ attr_reader page: Integer?
21
21
 
22
- attr_accessor channel: String?
22
+ def page=: (Integer) -> Integer
23
+
24
+ attr_reader page_size: Integer?
25
+
26
+ def page_size=: (Integer) -> Integer
23
27
 
24
28
  attr_accessor phone: String?
25
29
 
@@ -30,9 +34,9 @@ module Sentdm
30
34
  def x_profile_id=: (String) -> String
31
35
 
32
36
  def initialize: (
33
- page: Integer,
34
- page_size: Integer,
35
37
  ?channel: String?,
38
+ ?page: Integer,
39
+ ?page_size: Integer,
36
40
  ?phone: String?,
37
41
  ?search: String?,
38
42
  ?x_profile_id: String,
@@ -40,9 +44,9 @@ module Sentdm
40
44
  ) -> void
41
45
 
42
46
  def to_hash: -> {
47
+ channel: String?,
43
48
  page: Integer,
44
49
  page_size: Integer,
45
- channel: String?,
46
50
  phone: String?,
47
51
  search: String?,
48
52
  x_profile_id: String,