knockapi 1.38.0 → 1.40.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 (153) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +48 -0
  3. data/README.md +1 -1
  4. data/lib/knockapi/models/audience_add_members_params.rb +3 -30
  5. data/lib/knockapi/models/audience_member_request.rb +32 -0
  6. data/lib/knockapi/models/audience_remove_members_params.rb +3 -30
  7. data/lib/knockapi/models/list_messages_response.rb +26 -0
  8. data/lib/knockapi/models/list_schedules_response.rb +26 -0
  9. data/lib/knockapi/models/list_subscriptions_response.rb +26 -0
  10. data/lib/knockapi/models/message.rb +37 -11
  11. data/lib/knockapi/models/{message_get_content_response.rb → message_contents.rb} +30 -156
  12. data/lib/knockapi/models/message_event.rb +3 -3
  13. data/lib/knockapi/models/message_in_app_feed_button_set_block.rb +76 -0
  14. data/lib/knockapi/models/message_in_app_feed_content_block.rb +55 -0
  15. data/lib/knockapi/models/messages/batch_archive_params.rb +2 -10
  16. data/lib/knockapi/models/messages/batch_get_content_response.rb +1 -495
  17. data/lib/knockapi/models/messages/batch_mark_as_read_params.rb +2 -10
  18. data/lib/knockapi/models/messages/batch_mark_as_seen_params.rb +2 -10
  19. data/lib/knockapi/models/messages/batch_mark_as_unread_params.rb +2 -10
  20. data/lib/knockapi/models/messages/batch_mark_as_unseen_params.rb +2 -10
  21. data/lib/knockapi/models/messages/batch_messages_status_request.rb +20 -0
  22. data/lib/knockapi/models/messages/batch_unarchive_params.rb +2 -10
  23. data/lib/knockapi/models/preference_set_commercial_subscribed_setting.rb +19 -0
  24. data/lib/knockapi/models/recipients/preference_set.rb +26 -4
  25. data/lib/knockapi/models/recipients/preference_set_request.rb +26 -4
  26. data/lib/knockapi/models/recipients/slack_channel_data.rb +9 -1
  27. data/lib/knockapi/models/users/bulk_set_preferences_params.rb +26 -4
  28. data/lib/knockapi/models/users/feed_list_items_response.rb +5 -128
  29. data/lib/knockapi/models/users/{guide_mark_message_as_archived_response.rb → guide_action_response.rb} +1 -1
  30. data/lib/knockapi/models/users/guide_archived_request.rb +72 -0
  31. data/lib/knockapi/models/users/guide_interacted_request.rb +60 -0
  32. data/lib/knockapi/models/users/guide_mark_message_as_archived_params.rb +2 -82
  33. data/lib/knockapi/models/users/guide_mark_message_as_interacted_params.rb +2 -82
  34. data/lib/knockapi/models/users/guide_mark_message_as_seen_params.rb +2 -82
  35. data/lib/knockapi/models/users/guide_reset_guide_engagements_params.rb +39 -0
  36. data/lib/knockapi/models/users/guide_seen_request.rb +68 -0
  37. data/lib/knockapi/models/users/guide_unarchive_guide_message_params.rb +39 -0
  38. data/lib/knockapi/models/users/preference_center_branding_config.rb +50 -0
  39. data/lib/knockapi/models/users/preference_center_generate_signed_url_params.rb +22 -0
  40. data/lib/knockapi/models/users/preference_center_generate_signed_url_response.rb +34 -0
  41. data/lib/knockapi/models/users/preference_center_get_config_params.rb +22 -0
  42. data/lib/knockapi/models/users/preference_center_get_config_response.rb +221 -0
  43. data/lib/knockapi/models.rb +16 -0
  44. data/lib/knockapi/resources/audiences.rb +2 -2
  45. data/lib/knockapi/resources/messages/batch.rb +2 -2
  46. data/lib/knockapi/resources/messages.rb +2 -2
  47. data/lib/knockapi/resources/objects.rb +1 -1
  48. data/lib/knockapi/resources/users/guides.rb +79 -42
  49. data/lib/knockapi/resources/users/preference_center.rb +60 -0
  50. data/lib/knockapi/resources/users.rb +7 -1
  51. data/lib/knockapi/version.rb +1 -1
  52. data/lib/knockapi.rb +21 -4
  53. data/rbi/knockapi/models/audience_add_members_params.rbi +3 -56
  54. data/rbi/knockapi/models/audience_member_request.rbi +55 -0
  55. data/rbi/knockapi/models/audience_remove_members_params.rbi +3 -57
  56. data/rbi/knockapi/models/list_messages_response.rbi +46 -0
  57. data/rbi/knockapi/models/list_schedules_response.rbi +49 -0
  58. data/rbi/knockapi/models/list_subscriptions_response.rbi +52 -0
  59. data/rbi/knockapi/models/message.rbi +50 -18
  60. data/rbi/knockapi/models/{message_get_content_response.rbi → message_contents.rbi} +43 -299
  61. data/rbi/knockapi/models/message_event.rbi +9 -9
  62. data/rbi/knockapi/models/message_in_app_feed_button_set_block.rbi +133 -0
  63. data/rbi/knockapi/models/message_in_app_feed_content_block.rbi +97 -0
  64. data/rbi/knockapi/models/messages/batch_archive_params.rbi +6 -22
  65. data/rbi/knockapi/models/messages/batch_get_content_response.rbi +1 -879
  66. data/rbi/knockapi/models/messages/batch_mark_as_read_params.rbi +6 -22
  67. data/rbi/knockapi/models/messages/batch_mark_as_seen_params.rbi +6 -22
  68. data/rbi/knockapi/models/messages/batch_mark_as_unread_params.rbi +6 -22
  69. data/rbi/knockapi/models/messages/batch_mark_as_unseen_params.rbi +6 -22
  70. data/rbi/knockapi/models/messages/batch_messages_status_request.rbi +33 -0
  71. data/rbi/knockapi/models/messages/batch_unarchive_params.rbi +6 -22
  72. data/rbi/knockapi/models/preference_set_commercial_subscribed_setting.rbi +36 -0
  73. data/rbi/knockapi/models/recipients/preference_set.rbi +50 -5
  74. data/rbi/knockapi/models/recipients/preference_set_request.rbi +56 -5
  75. data/rbi/knockapi/models/recipients/slack_channel_data.rbi +8 -0
  76. data/rbi/knockapi/models/users/bulk_set_preferences_params.rbi +56 -5
  77. data/rbi/knockapi/models/users/feed_list_items_response.rbi +4 -251
  78. data/rbi/knockapi/models/users/{guide_mark_message_as_seen_response.rbi → guide_action_response.rbi} +2 -2
  79. data/rbi/knockapi/models/users/guide_archived_request.rbi +102 -0
  80. data/rbi/knockapi/models/users/guide_interacted_request.rbi +89 -0
  81. data/rbi/knockapi/models/users/guide_mark_message_as_archived_params.rbi +3 -99
  82. data/rbi/knockapi/models/users/guide_mark_message_as_interacted_params.rbi +3 -99
  83. data/rbi/knockapi/models/users/guide_mark_message_as_seen_params.rbi +3 -99
  84. data/rbi/knockapi/models/users/guide_reset_guide_engagements_params.rbi +65 -0
  85. data/rbi/knockapi/models/users/guide_seen_request.rbi +97 -0
  86. data/rbi/knockapi/models/users/guide_unarchive_guide_message_params.rbi +65 -0
  87. data/rbi/knockapi/models/users/preference_center_branding_config.rbi +72 -0
  88. data/rbi/knockapi/models/users/preference_center_generate_signed_url_params.rbi +40 -0
  89. data/rbi/knockapi/models/users/preference_center_generate_signed_url_response.rbi +41 -0
  90. data/rbi/knockapi/models/users/preference_center_get_config_params.rbi +40 -0
  91. data/rbi/knockapi/models/users/preference_center_get_config_response.rbi +476 -0
  92. data/rbi/knockapi/models.rbi +18 -0
  93. data/rbi/knockapi/resources/audiences.rbi +2 -3
  94. data/rbi/knockapi/resources/messages/batch.rbi +1 -3
  95. data/rbi/knockapi/resources/messages.rbi +1 -1
  96. data/rbi/knockapi/resources/objects.rbi +10 -2
  97. data/rbi/knockapi/resources/users/guides.rbi +56 -42
  98. data/rbi/knockapi/resources/users/preference_center.rbi +48 -0
  99. data/rbi/knockapi/resources/users.rbi +15 -2
  100. data/sig/knockapi/models/audience_add_members_params.rbs +4 -23
  101. data/sig/knockapi/models/audience_member_request.rbs +22 -0
  102. data/sig/knockapi/models/audience_remove_members_params.rbs +4 -26
  103. data/sig/knockapi/models/list_messages_response.rbs +22 -0
  104. data/sig/knockapi/models/list_schedules_response.rbs +22 -0
  105. data/sig/knockapi/models/list_subscriptions_response.rbs +25 -0
  106. data/sig/knockapi/models/message.rbs +28 -5
  107. data/sig/knockapi/models/message_contents.rbs +286 -0
  108. data/sig/knockapi/models/message_event.rbs +6 -6
  109. data/sig/knockapi/models/message_in_app_feed_button_set_block.rbs +54 -0
  110. data/sig/knockapi/models/message_in_app_feed_content_block.rbs +46 -0
  111. data/sig/knockapi/models/messages/batch_archive_params.rbs +4 -13
  112. data/sig/knockapi/models/messages/batch_get_content_response.rbs +1 -391
  113. data/sig/knockapi/models/messages/batch_mark_as_read_params.rbs +4 -13
  114. data/sig/knockapi/models/messages/batch_mark_as_seen_params.rbs +4 -13
  115. data/sig/knockapi/models/messages/batch_mark_as_unread_params.rbs +4 -13
  116. data/sig/knockapi/models/messages/batch_mark_as_unseen_params.rbs +4 -13
  117. data/sig/knockapi/models/messages/batch_messages_status_request.rbs +15 -0
  118. data/sig/knockapi/models/messages/batch_unarchive_params.rbs +4 -13
  119. data/sig/knockapi/models/preference_set_commercial_subscribed_setting.rbs +14 -0
  120. data/sig/knockapi/models/recipients/preference_set.rbs +13 -4
  121. data/sig/knockapi/models/recipients/preference_set_request.rbs +13 -4
  122. data/sig/knockapi/models/recipients/slack_channel_data.rbs +10 -1
  123. data/sig/knockapi/models/users/bulk_set_preferences_params.rbs +13 -4
  124. data/sig/knockapi/models/users/feed_list_items_response.rbs +2 -100
  125. data/sig/knockapi/models/users/{guide_mark_message_as_seen_response.rbs → guide_action_response.rbs} +2 -2
  126. data/sig/knockapi/models/users/guide_archived_request.rbs +58 -0
  127. data/sig/knockapi/models/users/guide_interacted_request.rbs +51 -0
  128. data/sig/knockapi/models/users/guide_mark_message_as_archived_params.rbs +4 -63
  129. data/sig/knockapi/models/users/guide_mark_message_as_interacted_params.rbs +4 -63
  130. data/sig/knockapi/models/users/guide_mark_message_as_seen_params.rbs +4 -63
  131. data/sig/knockapi/models/users/guide_reset_guide_engagements_params.rbs +36 -0
  132. data/sig/knockapi/models/users/guide_seen_request.rbs +56 -0
  133. data/sig/knockapi/models/users/guide_unarchive_guide_message_params.rbs +36 -0
  134. data/sig/knockapi/models/users/preference_center_branding_config.rbs +37 -0
  135. data/sig/knockapi/models/users/preference_center_generate_signed_url_params.rbs +25 -0
  136. data/sig/knockapi/models/users/preference_center_generate_signed_url_response.rbs +18 -0
  137. data/sig/knockapi/models/users/preference_center_get_config_params.rbs +25 -0
  138. data/sig/knockapi/models/users/preference_center_get_config_response.rbs +189 -0
  139. data/sig/knockapi/models.rbs +16 -0
  140. data/sig/knockapi/resources/audiences.rbs +2 -2
  141. data/sig/knockapi/resources/messages.rbs +1 -1
  142. data/sig/knockapi/resources/objects.rbs +1 -1
  143. data/sig/knockapi/resources/users/guides.rbs +22 -18
  144. data/sig/knockapi/resources/users/preference_center.rbs +19 -0
  145. data/sig/knockapi/resources/users.rbs +3 -1
  146. metadata +65 -14
  147. data/lib/knockapi/models/users/guide_mark_message_as_interacted_response.rb +0 -21
  148. data/lib/knockapi/models/users/guide_mark_message_as_seen_response.rb +0 -21
  149. data/rbi/knockapi/models/users/guide_mark_message_as_archived_response.rbi +0 -33
  150. data/rbi/knockapi/models/users/guide_mark_message_as_interacted_response.rbi +0 -33
  151. data/sig/knockapi/models/message_get_content_response.rbs +0 -384
  152. data/sig/knockapi/models/users/guide_mark_message_as_archived_response.rbs +0 -15
  153. data/sig/knockapi/models/users/guide_mark_message_as_interacted_response.rbs +0 -15
@@ -3,502 +3,8 @@
3
3
  module Knockapi
4
4
  module Models
5
5
  module Messages
6
- class BatchGetContentResponseItem < Knockapi::Internal::Type::BaseModel
7
- # @!attribute _typename
8
- # The typename of the schema.
9
- #
10
- # @return [String]
11
- required :_typename, String, api_name: :__typename
12
-
13
- # @!attribute data
14
- # Content data specific to the channel type.
15
- #
16
- # @return [Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageEmailContent, Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageSMSContent, Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessagePushContent, Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageChatContent, Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageInAppFeedContent]
17
- required :data, union: -> { Knockapi::Models::Messages::BatchGetContentResponseItem::Data }
18
-
19
- # @!attribute inserted_at
20
- # Timestamp when the message content was created.
21
- #
22
- # @return [Time]
23
- required :inserted_at, Time
24
-
25
- # @!attribute message_id
26
- # The unique identifier for the message content.
27
- #
28
- # @return [String]
29
- required :message_id, String
30
-
31
- # @!method initialize(_typename:, data:, inserted_at:, message_id:)
32
- # The content of a message.
33
- #
34
- # @param _typename [String] The typename of the schema.
35
- #
36
- # @param data [Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageEmailContent, Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageSMSContent, Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessagePushContent, Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageChatContent, Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageInAppFeedContent] Content data specific to the channel type.
37
- #
38
- # @param inserted_at [Time] Timestamp when the message content was created.
39
- #
40
- # @param message_id [String] The unique identifier for the message content.
41
-
42
- # Content data specific to the channel type.
43
- #
44
- # @see Knockapi::Models::Messages::BatchGetContentResponseItem#data
45
- module Data
46
- extend Knockapi::Internal::Type::Union
47
-
48
- # The content of an email message.
49
- variant -> { Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageEmailContent }
50
-
51
- # The content of an SMS message.
52
- variant -> { Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageSMSContent }
53
-
54
- # Push channel data.
55
- variant -> { Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessagePushContent }
56
-
57
- # The content of a chat message.
58
- variant -> { Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageChatContent }
59
-
60
- # The content of an in-app feed message.
61
- variant -> { Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageInAppFeedContent }
62
-
63
- class MessageEmailContent < Knockapi::Internal::Type::BaseModel
64
- # @!attribute _typename
65
- # The typename of the schema.
66
- #
67
- # @return [String]
68
- required :_typename, String, api_name: :__typename
69
-
70
- # @!attribute from
71
- # The sender's email address.
72
- #
73
- # @return [String]
74
- required :from, String
75
-
76
- # @!attribute html_body
77
- # The HTML body of the email message.
78
- #
79
- # @return [String]
80
- required :html_body, String
81
-
82
- # @!attribute subject_line
83
- # The subject line of the email message.
84
- #
85
- # @return [String]
86
- required :subject_line, String
87
-
88
- # @!attribute text_body
89
- # The text body of the email message.
90
- #
91
- # @return [String]
92
- required :text_body, String
93
-
94
- # @!attribute to
95
- # The recipient's email address.
96
- #
97
- # @return [String]
98
- required :to, String
99
-
100
- # @!attribute bcc
101
- # The BCC email addresses.
102
- #
103
- # @return [String, nil]
104
- optional :bcc, String, nil?: true
105
-
106
- # @!attribute cc
107
- # The CC email addresses.
108
- #
109
- # @return [String, nil]
110
- optional :cc, String, nil?: true
111
-
112
- # @!attribute reply_to
113
- # The reply-to email address.
114
- #
115
- # @return [String, nil]
116
- optional :reply_to, String, nil?: true
117
-
118
- # @!method initialize(_typename:, from:, html_body:, subject_line:, text_body:, to:, bcc: nil, cc: nil, reply_to: nil)
119
- # The content of an email message.
120
- #
121
- # @param _typename [String] The typename of the schema.
122
- #
123
- # @param from [String] The sender's email address.
124
- #
125
- # @param html_body [String] The HTML body of the email message.
126
- #
127
- # @param subject_line [String] The subject line of the email message.
128
- #
129
- # @param text_body [String] The text body of the email message.
130
- #
131
- # @param to [String] The recipient's email address.
132
- #
133
- # @param bcc [String, nil] The BCC email addresses.
134
- #
135
- # @param cc [String, nil] The CC email addresses.
136
- #
137
- # @param reply_to [String, nil] The reply-to email address.
138
- end
139
-
140
- class MessageSMSContent < Knockapi::Internal::Type::BaseModel
141
- # @!attribute _typename
142
- # The typename of the schema.
143
- #
144
- # @return [String]
145
- required :_typename, String, api_name: :__typename
146
-
147
- # @!attribute body
148
- # The content body of the SMS message.
149
- #
150
- # @return [String]
151
- required :body, String
152
-
153
- # @!attribute to
154
- # The phone number the SMS was sent to.
155
- #
156
- # @return [String]
157
- required :to, String
158
-
159
- # @!method initialize(_typename:, body:, to:)
160
- # The content of an SMS message.
161
- #
162
- # @param _typename [String] The typename of the schema.
163
- #
164
- # @param body [String] The content body of the SMS message.
165
- #
166
- # @param to [String] The phone number the SMS was sent to.
167
- end
168
-
169
- class MessagePushContent < Knockapi::Internal::Type::BaseModel
170
- # @!attribute token
171
- # The device token to send the push notification to.
172
- #
173
- # @return [String]
174
- required :token, String
175
-
176
- # @!attribute _typename
177
- # The typename of the schema.
178
- #
179
- # @return [String]
180
- required :_typename, String, api_name: :__typename
181
-
182
- # @!attribute body
183
- # The content body of the push notification.
184
- #
185
- # @return [String]
186
- required :body, String
187
-
188
- # @!attribute title
189
- # The title of the push notification.
190
- #
191
- # @return [String]
192
- required :title, String
193
-
194
- # @!attribute data
195
- # Additional data payload for the push notification.
196
- #
197
- # @return [Hash{Symbol=>Object}, nil]
198
- optional :data, Knockapi::Internal::Type::HashOf[Knockapi::Internal::Type::Unknown], nil?: true
199
-
200
- # @!method initialize(token:, _typename:, body:, title:, data: nil)
201
- # Push channel data.
202
- #
203
- # @param token [String] The device token to send the push notification to.
204
- #
205
- # @param _typename [String] The typename of the schema.
206
- #
207
- # @param body [String] The content body of the push notification.
208
- #
209
- # @param title [String] The title of the push notification.
210
- #
211
- # @param data [Hash{Symbol=>Object}, nil] Additional data payload for the push notification.
212
- end
213
-
214
- class MessageChatContent < Knockapi::Internal::Type::BaseModel
215
- # @!attribute _typename
216
- # The typename of the schema.
217
- #
218
- # @return [String]
219
- required :_typename, String, api_name: :__typename
220
-
221
- # @!attribute connection
222
- # The channel data connection from the recipient to the underlying provider.
223
- #
224
- # @return [Hash{Symbol=>Object}]
225
- required :connection, Knockapi::Internal::Type::HashOf[Knockapi::Internal::Type::Unknown]
226
-
227
- # @!attribute template
228
- # The template structure for the chat message.
229
- #
230
- # @return [Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageChatContent::Template]
231
- required :template,
232
- -> { Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageChatContent::Template }
233
-
234
- # @!attribute metadata
235
- # Additional metadata associated with the chat message.
236
- #
237
- # @return [Hash{Symbol=>Object}, nil]
238
- optional :metadata,
239
- Knockapi::Internal::Type::HashOf[Knockapi::Internal::Type::Unknown],
240
- nil?: true
241
-
242
- # @!method initialize(_typename:, connection:, template:, metadata: nil)
243
- # The content of a chat message.
244
- #
245
- # @param _typename [String] The typename of the schema.
246
- #
247
- # @param connection [Hash{Symbol=>Object}] The channel data connection from the recipient to the underlying provider.
248
- #
249
- # @param template [Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageChatContent::Template] The template structure for the chat message.
250
- #
251
- # @param metadata [Hash{Symbol=>Object}, nil] Additional metadata associated with the chat message.
252
-
253
- # @see Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageChatContent#template
254
- class Template < Knockapi::Internal::Type::BaseModel
255
- # @!attribute blocks
256
- # The blocks of the message in a chat.
257
- #
258
- # @return [Array<Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageChatContent::Template::Block>, nil]
259
- optional :blocks,
260
- -> { Knockapi::Internal::Type::ArrayOf[Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageChatContent::Template::Block] },
261
- nil?: true
262
-
263
- # @!attribute json_content
264
- # The JSON content of the message.
265
- #
266
- # @return [Hash{Symbol=>Object}, nil]
267
- optional :json_content,
268
- Knockapi::Internal::Type::HashOf[Knockapi::Internal::Type::Unknown],
269
- nil?: true
270
-
271
- # @!attribute summary
272
- # The summary of the chat message.
273
- #
274
- # @return [String, nil]
275
- optional :summary, String, nil?: true
276
-
277
- # @!method initialize(blocks: nil, json_content: nil, summary: nil)
278
- # The template structure for the chat message.
279
- #
280
- # @param blocks [Array<Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageChatContent::Template::Block>, nil] The blocks of the message in a chat.
281
- #
282
- # @param json_content [Hash{Symbol=>Object}, nil] The JSON content of the message.
283
- #
284
- # @param summary [String, nil] The summary of the chat message.
285
-
286
- class Block < Knockapi::Internal::Type::BaseModel
287
- # @!attribute content
288
- # The actual content of the block.
289
- #
290
- # @return [String]
291
- required :content, String
292
-
293
- # @!attribute name
294
- # The name of the block for identification.
295
- #
296
- # @return [String]
297
- required :name, String
298
-
299
- # @!attribute type
300
- # The type of block in a message in a chat (text or markdown).
301
- #
302
- # @return [Symbol, Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageChatContent::Template::Block::Type]
303
- required :type,
304
- enum: -> { Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageChatContent::Template::Block::Type }
305
-
306
- # @!method initialize(content:, name:, type:)
307
- # A block in a message in a chat.
308
- #
309
- # @param content [String] The actual content of the block.
310
- #
311
- # @param name [String] The name of the block for identification.
312
- #
313
- # @param type [Symbol, Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageChatContent::Template::Block::Type] The type of block in a message in a chat (text or markdown).
314
-
315
- # The type of block in a message in a chat (text or markdown).
316
- #
317
- # @see Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageChatContent::Template::Block#type
318
- module Type
319
- extend Knockapi::Internal::Type::Enum
320
-
321
- TEXT = :text
322
- MARKDOWN = :markdown
323
-
324
- # @!method self.values
325
- # @return [Array<Symbol>]
326
- end
327
- end
328
- end
329
- end
330
-
331
- class MessageInAppFeedContent < Knockapi::Internal::Type::BaseModel
332
- # @!attribute _typename
333
- # The typename of the schema.
334
- #
335
- # @return [String]
336
- required :_typename, String, api_name: :__typename
337
-
338
- # @!attribute blocks
339
- # The blocks of the message in an app feed.
340
- #
341
- # @return [Array<Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageInAppFeedContent::Block::MessageInAppFeedContentBlock, Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageInAppFeedContent::Block::MessageInAppFeedButtonSetBlock>]
342
- required :blocks,
343
- -> { Knockapi::Internal::Type::ArrayOf[union: Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageInAppFeedContent::Block] }
344
-
345
- # @!method initialize(_typename:, blocks:)
346
- # The content of an in-app feed message.
347
- #
348
- # @param _typename [String] The typename of the schema.
349
- #
350
- # @param blocks [Array<Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageInAppFeedContent::Block::MessageInAppFeedContentBlock, Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageInAppFeedContent::Block::MessageInAppFeedButtonSetBlock>] The blocks of the message in an app feed.
351
-
352
- # A block in a message in an app feed.
353
- module Block
354
- extend Knockapi::Internal::Type::Union
355
-
356
- # A block in a message in an app feed.
357
- variant -> { Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageInAppFeedContent::Block::MessageInAppFeedContentBlock }
358
-
359
- # A button set block in a message in an app feed.
360
- variant -> { Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageInAppFeedContent::Block::MessageInAppFeedButtonSetBlock }
361
-
362
- class MessageInAppFeedContentBlock < Knockapi::Internal::Type::BaseModel
363
- # @!attribute content
364
- # The content of the block in a message in an app feed.
365
- #
366
- # @return [String]
367
- required :content, String
368
-
369
- # @!attribute name
370
- # The name of the block in a message in an app feed.
371
- #
372
- # @return [String]
373
- required :name, String
374
-
375
- # @!attribute rendered
376
- # The rendered HTML version of the content.
377
- #
378
- # @return [String]
379
- required :rendered, String
380
-
381
- # @!attribute type
382
- # The type of block in a message in an app feed.
383
- #
384
- # @return [Symbol, Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageInAppFeedContent::Block::MessageInAppFeedContentBlock::Type]
385
- required :type,
386
- enum: -> { Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageInAppFeedContent::Block::MessageInAppFeedContentBlock::Type }
387
-
388
- # @!method initialize(content:, name:, rendered:, type:)
389
- # A block in a message in an app feed.
390
- #
391
- # @param content [String] The content of the block in a message in an app feed.
392
- #
393
- # @param name [String] The name of the block in a message in an app feed.
394
- #
395
- # @param rendered [String] The rendered HTML version of the content.
396
- #
397
- # @param type [Symbol, Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageInAppFeedContent::Block::MessageInAppFeedContentBlock::Type] The type of block in a message in an app feed.
398
-
399
- # The type of block in a message in an app feed.
400
- #
401
- # @see Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageInAppFeedContent::Block::MessageInAppFeedContentBlock#type
402
- module Type
403
- extend Knockapi::Internal::Type::Enum
404
-
405
- MARKDOWN = :markdown
406
- TEXT = :text
407
-
408
- # @!method self.values
409
- # @return [Array<Symbol>]
410
- end
411
- end
412
-
413
- class MessageInAppFeedButtonSetBlock < Knockapi::Internal::Type::BaseModel
414
- # @!attribute buttons
415
- # A list of buttons in an in app feed message.
416
- #
417
- # @return [Array<Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageInAppFeedContent::Block::MessageInAppFeedButtonSetBlock::Button>]
418
- required :buttons,
419
- -> do
420
- Knockapi::Internal::Type::ArrayOf[
421
- Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageInAppFeedContent::Block::MessageInAppFeedButtonSetBlock::Button
422
- ]
423
- end
424
-
425
- # @!attribute name
426
- # The name of the button set in a message in an app feed.
427
- #
428
- # @return [String]
429
- required :name, String
430
-
431
- # @!attribute type
432
- # The type of block in a message in an app feed.
433
- #
434
- # @return [Symbol, Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageInAppFeedContent::Block::MessageInAppFeedButtonSetBlock::Type]
435
- required :type,
436
- enum: -> { Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageInAppFeedContent::Block::MessageInAppFeedButtonSetBlock::Type }
437
-
438
- # @!method initialize(buttons:, name:, type:)
439
- # A button set block in a message in an app feed.
440
- #
441
- # @param buttons [Array<Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageInAppFeedContent::Block::MessageInAppFeedButtonSetBlock::Button>] A list of buttons in an in app feed message.
442
- #
443
- # @param name [String] The name of the button set in a message in an app feed.
444
- #
445
- # @param type [Symbol, Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageInAppFeedContent::Block::MessageInAppFeedButtonSetBlock::Type] The type of block in a message in an app feed.
446
-
447
- class Button < Knockapi::Internal::Type::BaseModel
448
- # @!attribute action
449
- # The action to take when the button is clicked.
450
- #
451
- # @return [String]
452
- required :action, String
453
-
454
- # @!attribute label
455
- # The label of the button.
456
- #
457
- # @return [String]
458
- required :label, String
459
-
460
- # @!attribute name
461
- # The name of the button.
462
- #
463
- # @return [String]
464
- required :name, String
465
-
466
- # @!method initialize(action:, label:, name:)
467
- # A button in an in app feed message.
468
- #
469
- # @param action [String] The action to take when the button is clicked.
470
- #
471
- # @param label [String] The label of the button.
472
- #
473
- # @param name [String] The name of the button.
474
- end
475
-
476
- # The type of block in a message in an app feed.
477
- #
478
- # @see Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageInAppFeedContent::Block::MessageInAppFeedButtonSetBlock#type
479
- module Type
480
- extend Knockapi::Internal::Type::Enum
481
-
482
- BUTTON_SET = :button_set
483
-
484
- # @!method self.values
485
- # @return [Array<Symbol>]
486
- end
487
- end
488
-
489
- # @!method self.variants
490
- # @return [Array(Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageInAppFeedContent::Block::MessageInAppFeedContentBlock, Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageInAppFeedContent::Block::MessageInAppFeedButtonSetBlock)]
491
- end
492
- end
493
-
494
- # @!method self.variants
495
- # @return [Array(Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageEmailContent, Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageSMSContent, Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessagePushContent, Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageChatContent, Knockapi::Models::Messages::BatchGetContentResponseItem::Data::MessageInAppFeedContent)]
496
- end
497
- end
498
-
499
6
  # @type [Knockapi::Internal::Type::Converter]
500
- BatchGetContentResponse =
501
- Knockapi::Internal::Type::ArrayOf[-> { Knockapi::Models::Messages::BatchGetContentResponseItem }]
7
+ BatchGetContentResponse = Knockapi::Internal::Type::ArrayOf[-> { Knockapi::MessageContents }]
502
8
  end
503
9
  end
504
10
  end
@@ -4,19 +4,11 @@ module Knockapi
4
4
  module Models
5
5
  module Messages
6
6
  # @see Knockapi::Resources::Messages::Batch#mark_as_read
7
- class BatchMarkAsReadParams < Knockapi::Internal::Type::BaseModel
7
+ class BatchMarkAsReadParams < Knockapi::Models::Messages::BatchMessagesStatusRequest
8
8
  extend Knockapi::Internal::Type::RequestParameters::Converter
9
9
  include Knockapi::Internal::Type::RequestParameters
10
10
 
11
- # @!attribute message_ids
12
- # The message IDs to update the status of.
13
- #
14
- # @return [Array<String>]
15
- required :message_ids, Knockapi::Internal::Type::ArrayOf[String]
16
-
17
- # @!method initialize(message_ids:, request_options: {})
18
- # @param message_ids [Array<String>] The message IDs to update the status of.
19
- #
11
+ # @!method initialize(request_options: {})
20
12
  # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}]
21
13
  end
22
14
  end
@@ -4,19 +4,11 @@ module Knockapi
4
4
  module Models
5
5
  module Messages
6
6
  # @see Knockapi::Resources::Messages::Batch#mark_as_seen
7
- class BatchMarkAsSeenParams < Knockapi::Internal::Type::BaseModel
7
+ class BatchMarkAsSeenParams < Knockapi::Models::Messages::BatchMessagesStatusRequest
8
8
  extend Knockapi::Internal::Type::RequestParameters::Converter
9
9
  include Knockapi::Internal::Type::RequestParameters
10
10
 
11
- # @!attribute message_ids
12
- # The message IDs to update the status of.
13
- #
14
- # @return [Array<String>]
15
- required :message_ids, Knockapi::Internal::Type::ArrayOf[String]
16
-
17
- # @!method initialize(message_ids:, request_options: {})
18
- # @param message_ids [Array<String>] The message IDs to update the status of.
19
- #
11
+ # @!method initialize(request_options: {})
20
12
  # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}]
21
13
  end
22
14
  end
@@ -4,19 +4,11 @@ module Knockapi
4
4
  module Models
5
5
  module Messages
6
6
  # @see Knockapi::Resources::Messages::Batch#mark_as_unread
7
- class BatchMarkAsUnreadParams < Knockapi::Internal::Type::BaseModel
7
+ class BatchMarkAsUnreadParams < Knockapi::Models::Messages::BatchMessagesStatusRequest
8
8
  extend Knockapi::Internal::Type::RequestParameters::Converter
9
9
  include Knockapi::Internal::Type::RequestParameters
10
10
 
11
- # @!attribute message_ids
12
- # The message IDs to update the status of.
13
- #
14
- # @return [Array<String>]
15
- required :message_ids, Knockapi::Internal::Type::ArrayOf[String]
16
-
17
- # @!method initialize(message_ids:, request_options: {})
18
- # @param message_ids [Array<String>] The message IDs to update the status of.
19
- #
11
+ # @!method initialize(request_options: {})
20
12
  # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}]
21
13
  end
22
14
  end
@@ -4,19 +4,11 @@ module Knockapi
4
4
  module Models
5
5
  module Messages
6
6
  # @see Knockapi::Resources::Messages::Batch#mark_as_unseen
7
- class BatchMarkAsUnseenParams < Knockapi::Internal::Type::BaseModel
7
+ class BatchMarkAsUnseenParams < Knockapi::Models::Messages::BatchMessagesStatusRequest
8
8
  extend Knockapi::Internal::Type::RequestParameters::Converter
9
9
  include Knockapi::Internal::Type::RequestParameters
10
10
 
11
- # @!attribute message_ids
12
- # The message IDs to update the status of.
13
- #
14
- # @return [Array<String>]
15
- required :message_ids, Knockapi::Internal::Type::ArrayOf[String]
16
-
17
- # @!method initialize(message_ids:, request_options: {})
18
- # @param message_ids [Array<String>] The message IDs to update the status of.
19
- #
11
+ # @!method initialize(request_options: {})
20
12
  # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}]
21
13
  end
22
14
  end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Knockapi
4
+ module Models
5
+ module Messages
6
+ class BatchMessagesStatusRequest < Knockapi::Internal::Type::BaseModel
7
+ # @!attribute message_ids
8
+ # The message IDs to update the status of.
9
+ #
10
+ # @return [Array<String>]
11
+ required :message_ids, Knockapi::Internal::Type::ArrayOf[String]
12
+
13
+ # @!method initialize(message_ids:)
14
+ # Request to update the status of multiple messages in batch.
15
+ #
16
+ # @param message_ids [Array<String>] The message IDs to update the status of.
17
+ end
18
+ end
19
+ end
20
+ end
@@ -4,19 +4,11 @@ module Knockapi
4
4
  module Models
5
5
  module Messages
6
6
  # @see Knockapi::Resources::Messages::Batch#unarchive
7
- class BatchUnarchiveParams < Knockapi::Internal::Type::BaseModel
7
+ class BatchUnarchiveParams < Knockapi::Models::Messages::BatchMessagesStatusRequest
8
8
  extend Knockapi::Internal::Type::RequestParameters::Converter
9
9
  include Knockapi::Internal::Type::RequestParameters
10
10
 
11
- # @!attribute message_ids
12
- # The message IDs to update the status of.
13
- #
14
- # @return [Array<String>]
15
- required :message_ids, Knockapi::Internal::Type::ArrayOf[String]
16
-
17
- # @!method initialize(message_ids:, request_options: {})
18
- # @param message_ids [Array<String>] The message IDs to update the status of.
19
- #
11
+ # @!method initialize(request_options: {})
20
12
  # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}]
21
13
  end
22
14
  end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Knockapi
4
+ module Models
5
+ class PreferenceSetCommercialSubscribedSetting < Knockapi::Internal::Type::BaseModel
6
+ # @!attribute conditions
7
+ # A list of conditions to apply to the commercial subscribed preference.
8
+ #
9
+ # @return [Array<Knockapi::Models::Condition>]
10
+ required :conditions, -> { Knockapi::Internal::Type::ArrayOf[Knockapi::Condition] }
11
+
12
+ # @!method initialize(conditions:)
13
+ # A set of settings for the commercial subscribed preference. Currently, this can
14
+ # only be a list of conditions to apply.
15
+ #
16
+ # @param conditions [Array<Knockapi::Models::Condition>] A list of conditions to apply to the commercial subscribed preference.
17
+ end
18
+ end
19
+ end