knockapi 1.39.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +32 -0
- data/README.md +1 -1
- data/lib/knockapi/models/audience_add_members_params.rb +3 -30
- data/lib/knockapi/models/audience_member_request.rb +32 -0
- data/lib/knockapi/models/audience_remove_members_params.rb +3 -30
- data/lib/knockapi/models/list_messages_response.rb +26 -0
- data/lib/knockapi/models/list_schedules_response.rb +26 -0
- data/lib/knockapi/models/list_subscriptions_response.rb +26 -0
- data/lib/knockapi/models/message.rb +37 -11
- data/lib/knockapi/models/{message_get_content_response.rb → message_contents.rb} +30 -156
- data/lib/knockapi/models/message_event.rb +8 -8
- data/lib/knockapi/models/message_in_app_feed_button_set_block.rb +76 -0
- data/lib/knockapi/models/message_in_app_feed_content_block.rb +55 -0
- data/lib/knockapi/models/messages/batch_archive_params.rb +2 -10
- data/lib/knockapi/models/messages/batch_get_content_response.rb +1 -495
- data/lib/knockapi/models/messages/batch_mark_as_read_params.rb +2 -10
- data/lib/knockapi/models/messages/batch_mark_as_seen_params.rb +2 -10
- data/lib/knockapi/models/messages/batch_mark_as_unread_params.rb +2 -10
- data/lib/knockapi/models/messages/batch_mark_as_unseen_params.rb +2 -10
- data/lib/knockapi/models/messages/batch_messages_status_request.rb +20 -0
- data/lib/knockapi/models/messages/batch_unarchive_params.rb +2 -10
- data/lib/knockapi/models/preference_set_commercial_subscribed_setting.rb +19 -0
- data/lib/knockapi/models/recipients/preference_set.rb +26 -4
- data/lib/knockapi/models/recipients/preference_set_request.rb +26 -4
- data/lib/knockapi/models/recipients/slack_channel_data.rb +9 -1
- data/lib/knockapi/models/users/bulk_set_preferences_params.rb +26 -4
- data/lib/knockapi/models/users/feed_list_items_response.rb +5 -128
- data/lib/knockapi/models/users/{guide_mark_message_as_archived_response.rb → guide_action_response.rb} +1 -1
- data/lib/knockapi/models/users/guide_archived_request.rb +72 -0
- data/lib/knockapi/models/users/guide_interacted_request.rb +60 -0
- data/lib/knockapi/models/users/guide_mark_message_as_archived_params.rb +2 -70
- data/lib/knockapi/models/users/guide_mark_message_as_interacted_params.rb +2 -58
- data/lib/knockapi/models/users/guide_mark_message_as_seen_params.rb +2 -66
- data/lib/knockapi/models/users/guide_reset_guide_engagements_params.rb +39 -0
- data/lib/knockapi/models/users/guide_seen_request.rb +68 -0
- data/lib/knockapi/models/users/guide_unarchive_guide_message_params.rb +39 -0
- data/lib/knockapi/models/users/preference_center_branding_config.rb +50 -0
- data/lib/knockapi/models/users/preference_center_generate_signed_url_params.rb +22 -0
- data/lib/knockapi/models/users/preference_center_generate_signed_url_response.rb +34 -0
- data/lib/knockapi/models/users/preference_center_get_config_params.rb +22 -0
- data/lib/knockapi/models/users/preference_center_get_config_response.rb +221 -0
- data/lib/knockapi/models.rb +16 -0
- data/lib/knockapi/resources/audiences.rb +2 -2
- data/lib/knockapi/resources/messages/batch.rb +2 -2
- data/lib/knockapi/resources/messages.rb +2 -2
- data/lib/knockapi/resources/objects.rb +1 -1
- data/lib/knockapi/resources/users/guides.rb +69 -21
- data/lib/knockapi/resources/users/preference_center.rb +60 -0
- data/lib/knockapi/resources/users.rb +7 -1
- data/lib/knockapi/version.rb +1 -1
- data/lib/knockapi.rb +21 -4
- data/rbi/knockapi/models/audience_add_members_params.rbi +3 -56
- data/rbi/knockapi/models/audience_member_request.rbi +55 -0
- data/rbi/knockapi/models/audience_remove_members_params.rbi +3 -57
- data/rbi/knockapi/models/list_messages_response.rbi +46 -0
- data/rbi/knockapi/models/list_schedules_response.rbi +49 -0
- data/rbi/knockapi/models/list_subscriptions_response.rbi +52 -0
- data/rbi/knockapi/models/message.rbi +50 -18
- data/rbi/knockapi/models/{message_get_content_response.rbi → message_contents.rbi} +43 -299
- data/rbi/knockapi/models/message_event.rbi +19 -19
- data/rbi/knockapi/models/message_in_app_feed_button_set_block.rbi +133 -0
- data/rbi/knockapi/models/message_in_app_feed_content_block.rbi +97 -0
- data/rbi/knockapi/models/messages/batch_archive_params.rbi +6 -22
- data/rbi/knockapi/models/messages/batch_get_content_response.rbi +1 -879
- data/rbi/knockapi/models/messages/batch_mark_as_read_params.rbi +6 -22
- data/rbi/knockapi/models/messages/batch_mark_as_seen_params.rbi +6 -22
- data/rbi/knockapi/models/messages/batch_mark_as_unread_params.rbi +6 -22
- data/rbi/knockapi/models/messages/batch_mark_as_unseen_params.rbi +6 -22
- data/rbi/knockapi/models/messages/batch_messages_status_request.rbi +33 -0
- data/rbi/knockapi/models/messages/batch_unarchive_params.rbi +6 -22
- data/rbi/knockapi/models/preference_set_commercial_subscribed_setting.rbi +36 -0
- data/rbi/knockapi/models/recipients/preference_set.rbi +50 -5
- data/rbi/knockapi/models/recipients/preference_set_request.rbi +56 -5
- data/rbi/knockapi/models/recipients/slack_channel_data.rbi +8 -0
- data/rbi/knockapi/models/users/bulk_set_preferences_params.rbi +56 -5
- data/rbi/knockapi/models/users/feed_list_items_response.rbi +4 -251
- data/rbi/knockapi/models/users/{guide_mark_message_as_seen_response.rbi → guide_action_response.rbi} +2 -2
- data/rbi/knockapi/models/users/guide_archived_request.rbi +102 -0
- data/rbi/knockapi/models/users/guide_interacted_request.rbi +89 -0
- data/rbi/knockapi/models/users/guide_mark_message_as_archived_params.rbi +3 -82
- data/rbi/knockapi/models/users/guide_mark_message_as_interacted_params.rbi +3 -69
- data/rbi/knockapi/models/users/guide_mark_message_as_seen_params.rbi +3 -77
- data/rbi/knockapi/models/users/guide_reset_guide_engagements_params.rbi +65 -0
- data/rbi/knockapi/models/users/guide_seen_request.rbi +97 -0
- data/rbi/knockapi/models/users/guide_unarchive_guide_message_params.rbi +65 -0
- data/rbi/knockapi/models/users/preference_center_branding_config.rbi +72 -0
- data/rbi/knockapi/models/users/preference_center_generate_signed_url_params.rbi +40 -0
- data/rbi/knockapi/models/users/preference_center_generate_signed_url_response.rbi +41 -0
- data/rbi/knockapi/models/users/preference_center_get_config_params.rbi +40 -0
- data/rbi/knockapi/models/users/preference_center_get_config_response.rbi +476 -0
- data/rbi/knockapi/models.rbi +18 -0
- data/rbi/knockapi/resources/audiences.rbi +2 -3
- data/rbi/knockapi/resources/messages/batch.rbi +1 -3
- data/rbi/knockapi/resources/messages.rbi +1 -1
- data/rbi/knockapi/resources/objects.rbi +10 -2
- data/rbi/knockapi/resources/users/guides.rbi +45 -11
- data/rbi/knockapi/resources/users/preference_center.rbi +48 -0
- data/rbi/knockapi/resources/users.rbi +15 -2
- data/sig/knockapi/models/audience_add_members_params.rbs +4 -23
- data/sig/knockapi/models/audience_member_request.rbs +22 -0
- data/sig/knockapi/models/audience_remove_members_params.rbs +4 -26
- data/sig/knockapi/models/list_messages_response.rbs +22 -0
- data/sig/knockapi/models/list_schedules_response.rbs +22 -0
- data/sig/knockapi/models/list_subscriptions_response.rbs +25 -0
- data/sig/knockapi/models/message.rbs +28 -5
- data/sig/knockapi/models/message_contents.rbs +286 -0
- data/sig/knockapi/models/message_event.rbs +16 -16
- data/sig/knockapi/models/message_in_app_feed_button_set_block.rbs +54 -0
- data/sig/knockapi/models/message_in_app_feed_content_block.rbs +46 -0
- data/sig/knockapi/models/messages/batch_archive_params.rbs +4 -13
- data/sig/knockapi/models/messages/batch_get_content_response.rbs +1 -391
- data/sig/knockapi/models/messages/batch_mark_as_read_params.rbs +4 -13
- data/sig/knockapi/models/messages/batch_mark_as_seen_params.rbs +4 -13
- data/sig/knockapi/models/messages/batch_mark_as_unread_params.rbs +4 -13
- data/sig/knockapi/models/messages/batch_mark_as_unseen_params.rbs +4 -13
- data/sig/knockapi/models/messages/batch_messages_status_request.rbs +15 -0
- data/sig/knockapi/models/messages/batch_unarchive_params.rbs +4 -13
- data/sig/knockapi/models/preference_set_commercial_subscribed_setting.rbs +14 -0
- data/sig/knockapi/models/recipients/preference_set.rbs +13 -4
- data/sig/knockapi/models/recipients/preference_set_request.rbs +13 -4
- data/sig/knockapi/models/recipients/slack_channel_data.rbs +10 -1
- data/sig/knockapi/models/users/bulk_set_preferences_params.rbs +13 -4
- data/sig/knockapi/models/users/feed_list_items_response.rbs +2 -100
- data/sig/knockapi/models/users/{guide_mark_message_as_seen_response.rbs → guide_action_response.rbs} +2 -2
- data/sig/knockapi/models/users/guide_archived_request.rbs +58 -0
- data/sig/knockapi/models/users/guide_interacted_request.rbs +51 -0
- data/sig/knockapi/models/users/guide_mark_message_as_archived_params.rbs +4 -51
- data/sig/knockapi/models/users/guide_mark_message_as_interacted_params.rbs +4 -44
- data/sig/knockapi/models/users/guide_mark_message_as_seen_params.rbs +4 -49
- data/sig/knockapi/models/users/guide_reset_guide_engagements_params.rbs +36 -0
- data/sig/knockapi/models/users/guide_seen_request.rbs +56 -0
- data/sig/knockapi/models/users/guide_unarchive_guide_message_params.rbs +36 -0
- data/sig/knockapi/models/users/preference_center_branding_config.rbs +37 -0
- data/sig/knockapi/models/users/preference_center_generate_signed_url_params.rbs +25 -0
- data/sig/knockapi/models/users/preference_center_generate_signed_url_response.rbs +18 -0
- data/sig/knockapi/models/users/preference_center_get_config_params.rbs +25 -0
- data/sig/knockapi/models/users/preference_center_get_config_response.rbs +189 -0
- data/sig/knockapi/models.rbs +16 -0
- data/sig/knockapi/resources/audiences.rbs +2 -2
- data/sig/knockapi/resources/messages.rbs +1 -1
- data/sig/knockapi/resources/objects.rbs +1 -1
- data/sig/knockapi/resources/users/guides.rbs +17 -6
- data/sig/knockapi/resources/users/preference_center.rbs +19 -0
- data/sig/knockapi/resources/users.rbs +3 -1
- metadata +65 -14
- data/lib/knockapi/models/users/guide_mark_message_as_interacted_response.rb +0 -21
- data/lib/knockapi/models/users/guide_mark_message_as_seen_response.rb +0 -21
- data/rbi/knockapi/models/users/guide_mark_message_as_archived_response.rbi +0 -33
- data/rbi/knockapi/models/users/guide_mark_message_as_interacted_response.rbi +0 -33
- data/sig/knockapi/models/message_get_content_response.rbs +0 -384
- data/sig/knockapi/models/users/guide_mark_message_as_archived_response.rbs +0 -15
- data/sig/knockapi/models/users/guide_mark_message_as_interacted_response.rbs +0 -15
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Knockapi
|
|
4
4
|
module Models
|
|
5
5
|
# @see Knockapi::Resources::Messages#get_content
|
|
6
|
-
class
|
|
6
|
+
class MessageContents < Knockapi::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute _typename
|
|
8
8
|
# The typename of the schema.
|
|
9
9
|
#
|
|
@@ -13,8 +13,8 @@ module Knockapi
|
|
|
13
13
|
# @!attribute data
|
|
14
14
|
# Content data specific to the channel type.
|
|
15
15
|
#
|
|
16
|
-
# @return [Knockapi::Models::
|
|
17
|
-
required :data, union: -> { Knockapi::
|
|
16
|
+
# @return [Knockapi::Models::MessageContents::Data::MessageEmailContent, Knockapi::Models::MessageContents::Data::MessageSMSContent, Knockapi::Models::MessageContents::Data::MessagePushContent, Knockapi::Models::MessageContents::Data::MessageChatContent, Knockapi::Models::MessageContents::Data::MessageInAppFeedContent]
|
|
17
|
+
required :data, union: -> { Knockapi::MessageContents::Data }
|
|
18
18
|
|
|
19
19
|
# @!attribute inserted_at
|
|
20
20
|
# Timestamp when the message content was created.
|
|
@@ -33,7 +33,7 @@ module Knockapi
|
|
|
33
33
|
#
|
|
34
34
|
# @param _typename [String] The typename of the schema.
|
|
35
35
|
#
|
|
36
|
-
# @param data [Knockapi::Models::
|
|
36
|
+
# @param data [Knockapi::Models::MessageContents::Data::MessageEmailContent, Knockapi::Models::MessageContents::Data::MessageSMSContent, Knockapi::Models::MessageContents::Data::MessagePushContent, Knockapi::Models::MessageContents::Data::MessageChatContent, Knockapi::Models::MessageContents::Data::MessageInAppFeedContent] Content data specific to the channel type.
|
|
37
37
|
#
|
|
38
38
|
# @param inserted_at [Time] Timestamp when the message content was created.
|
|
39
39
|
#
|
|
@@ -41,24 +41,24 @@ module Knockapi
|
|
|
41
41
|
|
|
42
42
|
# Content data specific to the channel type.
|
|
43
43
|
#
|
|
44
|
-
# @see Knockapi::Models::
|
|
44
|
+
# @see Knockapi::Models::MessageContents#data
|
|
45
45
|
module Data
|
|
46
46
|
extend Knockapi::Internal::Type::Union
|
|
47
47
|
|
|
48
48
|
# The content of an email message.
|
|
49
|
-
variant -> { Knockapi::
|
|
49
|
+
variant -> { Knockapi::MessageContents::Data::MessageEmailContent }
|
|
50
50
|
|
|
51
51
|
# The content of an SMS message.
|
|
52
|
-
variant -> { Knockapi::
|
|
52
|
+
variant -> { Knockapi::MessageContents::Data::MessageSMSContent }
|
|
53
53
|
|
|
54
54
|
# Push channel data.
|
|
55
|
-
variant -> { Knockapi::
|
|
55
|
+
variant -> { Knockapi::MessageContents::Data::MessagePushContent }
|
|
56
56
|
|
|
57
57
|
# The content of a chat message.
|
|
58
|
-
variant -> { Knockapi::
|
|
58
|
+
variant -> { Knockapi::MessageContents::Data::MessageChatContent }
|
|
59
59
|
|
|
60
60
|
# The content of an in-app feed message.
|
|
61
|
-
variant -> { Knockapi::
|
|
61
|
+
variant -> { Knockapi::MessageContents::Data::MessageInAppFeedContent }
|
|
62
62
|
|
|
63
63
|
class MessageEmailContent < Knockapi::Internal::Type::BaseModel
|
|
64
64
|
# @!attribute _typename
|
|
@@ -227,8 +227,8 @@ module Knockapi
|
|
|
227
227
|
# @!attribute template
|
|
228
228
|
# The template structure for the chat message.
|
|
229
229
|
#
|
|
230
|
-
# @return [Knockapi::Models::
|
|
231
|
-
required :template, -> { Knockapi::
|
|
230
|
+
# @return [Knockapi::Models::MessageContents::Data::MessageChatContent::Template]
|
|
231
|
+
required :template, -> { Knockapi::MessageContents::Data::MessageChatContent::Template }
|
|
232
232
|
|
|
233
233
|
# @!attribute metadata
|
|
234
234
|
# Additional metadata associated with the chat message.
|
|
@@ -243,18 +243,20 @@ module Knockapi
|
|
|
243
243
|
#
|
|
244
244
|
# @param connection [Hash{Symbol=>Object}] The channel data connection from the recipient to the underlying provider.
|
|
245
245
|
#
|
|
246
|
-
# @param template [Knockapi::Models::
|
|
246
|
+
# @param template [Knockapi::Models::MessageContents::Data::MessageChatContent::Template] The template structure for the chat message.
|
|
247
247
|
#
|
|
248
248
|
# @param metadata [Hash{Symbol=>Object}, nil] Additional metadata associated with the chat message.
|
|
249
249
|
|
|
250
|
-
# @see Knockapi::Models::
|
|
250
|
+
# @see Knockapi::Models::MessageContents::Data::MessageChatContent#template
|
|
251
251
|
class Template < Knockapi::Internal::Type::BaseModel
|
|
252
252
|
# @!attribute blocks
|
|
253
253
|
# The blocks of the message in a chat.
|
|
254
254
|
#
|
|
255
|
-
# @return [Array<Knockapi::Models::
|
|
255
|
+
# @return [Array<Knockapi::Models::MessageContents::Data::MessageChatContent::Template::Block>, nil]
|
|
256
256
|
optional :blocks,
|
|
257
|
-
-> {
|
|
257
|
+
-> {
|
|
258
|
+
Knockapi::Internal::Type::ArrayOf[Knockapi::MessageContents::Data::MessageChatContent::Template::Block]
|
|
259
|
+
},
|
|
258
260
|
nil?: true
|
|
259
261
|
|
|
260
262
|
# @!attribute json_content
|
|
@@ -274,7 +276,7 @@ module Knockapi
|
|
|
274
276
|
# @!method initialize(blocks: nil, json_content: nil, summary: nil)
|
|
275
277
|
# The template structure for the chat message.
|
|
276
278
|
#
|
|
277
|
-
# @param blocks [Array<Knockapi::Models::
|
|
279
|
+
# @param blocks [Array<Knockapi::Models::MessageContents::Data::MessageChatContent::Template::Block>, nil] The blocks of the message in a chat.
|
|
278
280
|
#
|
|
279
281
|
# @param json_content [Hash{Symbol=>Object}, nil] The JSON content of the message.
|
|
280
282
|
#
|
|
@@ -296,9 +298,8 @@ module Knockapi
|
|
|
296
298
|
# @!attribute type
|
|
297
299
|
# The type of block in a message in a chat (text or markdown).
|
|
298
300
|
#
|
|
299
|
-
# @return [Symbol, Knockapi::Models::
|
|
300
|
-
required :type,
|
|
301
|
-
enum: -> { Knockapi::Models::MessageGetContentResponse::Data::MessageChatContent::Template::Block::Type }
|
|
301
|
+
# @return [Symbol, Knockapi::Models::MessageContents::Data::MessageChatContent::Template::Block::Type]
|
|
302
|
+
required :type, enum: -> { Knockapi::MessageContents::Data::MessageChatContent::Template::Block::Type }
|
|
302
303
|
|
|
303
304
|
# @!method initialize(content:, name:, type:)
|
|
304
305
|
# A block in a message in a chat.
|
|
@@ -307,11 +308,11 @@ module Knockapi
|
|
|
307
308
|
#
|
|
308
309
|
# @param name [String] The name of the block for identification.
|
|
309
310
|
#
|
|
310
|
-
# @param type [Symbol, Knockapi::Models::
|
|
311
|
+
# @param type [Symbol, Knockapi::Models::MessageContents::Data::MessageChatContent::Template::Block::Type] The type of block in a message in a chat (text or markdown).
|
|
311
312
|
|
|
312
313
|
# The type of block in a message in a chat (text or markdown).
|
|
313
314
|
#
|
|
314
|
-
# @see Knockapi::Models::
|
|
315
|
+
# @see Knockapi::Models::MessageContents::Data::MessageChatContent::Template::Block#type
|
|
315
316
|
module Type
|
|
316
317
|
extend Knockapi::Internal::Type::Enum
|
|
317
318
|
|
|
@@ -335,161 +336,34 @@ module Knockapi
|
|
|
335
336
|
# @!attribute blocks
|
|
336
337
|
# The blocks of the message in an app feed.
|
|
337
338
|
#
|
|
338
|
-
# @return [Array<Knockapi::Models::
|
|
339
|
+
# @return [Array<Knockapi::Models::MessageInAppFeedContentBlock, Knockapi::Models::MessageInAppFeedButtonSetBlock>]
|
|
339
340
|
required :blocks,
|
|
340
|
-
-> { Knockapi::Internal::Type::ArrayOf[union: Knockapi::
|
|
341
|
+
-> { Knockapi::Internal::Type::ArrayOf[union: Knockapi::MessageContents::Data::MessageInAppFeedContent::Block] }
|
|
341
342
|
|
|
342
343
|
# @!method initialize(_typename:, blocks:)
|
|
343
344
|
# The content of an in-app feed message.
|
|
344
345
|
#
|
|
345
346
|
# @param _typename [String] The typename of the schema.
|
|
346
347
|
#
|
|
347
|
-
# @param blocks [Array<Knockapi::Models::
|
|
348
|
+
# @param blocks [Array<Knockapi::Models::MessageInAppFeedContentBlock, Knockapi::Models::MessageInAppFeedButtonSetBlock>] The blocks of the message in an app feed.
|
|
348
349
|
|
|
349
350
|
# A block in a message in an app feed.
|
|
350
351
|
module Block
|
|
351
352
|
extend Knockapi::Internal::Type::Union
|
|
352
353
|
|
|
353
354
|
# A block in a message in an app feed.
|
|
354
|
-
variant -> { Knockapi::
|
|
355
|
+
variant -> { Knockapi::MessageInAppFeedContentBlock }
|
|
355
356
|
|
|
356
357
|
# A button set block in a message in an app feed.
|
|
357
|
-
variant -> { Knockapi::
|
|
358
|
-
|
|
359
|
-
class MessageInAppFeedContentBlock < Knockapi::Internal::Type::BaseModel
|
|
360
|
-
# @!attribute content
|
|
361
|
-
# The content of the block in a message in an app feed.
|
|
362
|
-
#
|
|
363
|
-
# @return [String]
|
|
364
|
-
required :content, String
|
|
365
|
-
|
|
366
|
-
# @!attribute name
|
|
367
|
-
# The name of the block in a message in an app feed.
|
|
368
|
-
#
|
|
369
|
-
# @return [String]
|
|
370
|
-
required :name, String
|
|
371
|
-
|
|
372
|
-
# @!attribute rendered
|
|
373
|
-
# The rendered HTML version of the content.
|
|
374
|
-
#
|
|
375
|
-
# @return [String]
|
|
376
|
-
required :rendered, String
|
|
377
|
-
|
|
378
|
-
# @!attribute type
|
|
379
|
-
# The type of block in a message in an app feed.
|
|
380
|
-
#
|
|
381
|
-
# @return [Symbol, Knockapi::Models::MessageGetContentResponse::Data::MessageInAppFeedContent::Block::MessageInAppFeedContentBlock::Type]
|
|
382
|
-
required :type,
|
|
383
|
-
enum: -> { Knockapi::Models::MessageGetContentResponse::Data::MessageInAppFeedContent::Block::MessageInAppFeedContentBlock::Type }
|
|
384
|
-
|
|
385
|
-
# @!method initialize(content:, name:, rendered:, type:)
|
|
386
|
-
# A block in a message in an app feed.
|
|
387
|
-
#
|
|
388
|
-
# @param content [String] The content of the block in a message in an app feed.
|
|
389
|
-
#
|
|
390
|
-
# @param name [String] The name of the block in a message in an app feed.
|
|
391
|
-
#
|
|
392
|
-
# @param rendered [String] The rendered HTML version of the content.
|
|
393
|
-
#
|
|
394
|
-
# @param type [Symbol, Knockapi::Models::MessageGetContentResponse::Data::MessageInAppFeedContent::Block::MessageInAppFeedContentBlock::Type] The type of block in a message in an app feed.
|
|
395
|
-
|
|
396
|
-
# The type of block in a message in an app feed.
|
|
397
|
-
#
|
|
398
|
-
# @see Knockapi::Models::MessageGetContentResponse::Data::MessageInAppFeedContent::Block::MessageInAppFeedContentBlock#type
|
|
399
|
-
module Type
|
|
400
|
-
extend Knockapi::Internal::Type::Enum
|
|
401
|
-
|
|
402
|
-
MARKDOWN = :markdown
|
|
403
|
-
TEXT = :text
|
|
404
|
-
|
|
405
|
-
# @!method self.values
|
|
406
|
-
# @return [Array<Symbol>]
|
|
407
|
-
end
|
|
408
|
-
end
|
|
409
|
-
|
|
410
|
-
class MessageInAppFeedButtonSetBlock < Knockapi::Internal::Type::BaseModel
|
|
411
|
-
# @!attribute buttons
|
|
412
|
-
# A list of buttons in an in app feed message.
|
|
413
|
-
#
|
|
414
|
-
# @return [Array<Knockapi::Models::MessageGetContentResponse::Data::MessageInAppFeedContent::Block::MessageInAppFeedButtonSetBlock::Button>]
|
|
415
|
-
required :buttons,
|
|
416
|
-
-> do
|
|
417
|
-
Knockapi::Internal::Type::ArrayOf[
|
|
418
|
-
Knockapi::Models::MessageGetContentResponse::Data::MessageInAppFeedContent::Block::MessageInAppFeedButtonSetBlock::Button
|
|
419
|
-
]
|
|
420
|
-
end
|
|
421
|
-
|
|
422
|
-
# @!attribute name
|
|
423
|
-
# The name of the button set in a message in an app feed.
|
|
424
|
-
#
|
|
425
|
-
# @return [String]
|
|
426
|
-
required :name, String
|
|
427
|
-
|
|
428
|
-
# @!attribute type
|
|
429
|
-
# The type of block in a message in an app feed.
|
|
430
|
-
#
|
|
431
|
-
# @return [Symbol, Knockapi::Models::MessageGetContentResponse::Data::MessageInAppFeedContent::Block::MessageInAppFeedButtonSetBlock::Type]
|
|
432
|
-
required :type,
|
|
433
|
-
enum: -> { Knockapi::Models::MessageGetContentResponse::Data::MessageInAppFeedContent::Block::MessageInAppFeedButtonSetBlock::Type }
|
|
434
|
-
|
|
435
|
-
# @!method initialize(buttons:, name:, type:)
|
|
436
|
-
# A button set block in a message in an app feed.
|
|
437
|
-
#
|
|
438
|
-
# @param buttons [Array<Knockapi::Models::MessageGetContentResponse::Data::MessageInAppFeedContent::Block::MessageInAppFeedButtonSetBlock::Button>] A list of buttons in an in app feed message.
|
|
439
|
-
#
|
|
440
|
-
# @param name [String] The name of the button set in a message in an app feed.
|
|
441
|
-
#
|
|
442
|
-
# @param type [Symbol, Knockapi::Models::MessageGetContentResponse::Data::MessageInAppFeedContent::Block::MessageInAppFeedButtonSetBlock::Type] The type of block in a message in an app feed.
|
|
443
|
-
|
|
444
|
-
class Button < Knockapi::Internal::Type::BaseModel
|
|
445
|
-
# @!attribute action
|
|
446
|
-
# The action to take when the button is clicked.
|
|
447
|
-
#
|
|
448
|
-
# @return [String]
|
|
449
|
-
required :action, String
|
|
450
|
-
|
|
451
|
-
# @!attribute label
|
|
452
|
-
# The label of the button.
|
|
453
|
-
#
|
|
454
|
-
# @return [String]
|
|
455
|
-
required :label, String
|
|
456
|
-
|
|
457
|
-
# @!attribute name
|
|
458
|
-
# The name of the button.
|
|
459
|
-
#
|
|
460
|
-
# @return [String]
|
|
461
|
-
required :name, String
|
|
462
|
-
|
|
463
|
-
# @!method initialize(action:, label:, name:)
|
|
464
|
-
# A button in an in app feed message.
|
|
465
|
-
#
|
|
466
|
-
# @param action [String] The action to take when the button is clicked.
|
|
467
|
-
#
|
|
468
|
-
# @param label [String] The label of the button.
|
|
469
|
-
#
|
|
470
|
-
# @param name [String] The name of the button.
|
|
471
|
-
end
|
|
472
|
-
|
|
473
|
-
# The type of block in a message in an app feed.
|
|
474
|
-
#
|
|
475
|
-
# @see Knockapi::Models::MessageGetContentResponse::Data::MessageInAppFeedContent::Block::MessageInAppFeedButtonSetBlock#type
|
|
476
|
-
module Type
|
|
477
|
-
extend Knockapi::Internal::Type::Enum
|
|
478
|
-
|
|
479
|
-
BUTTON_SET = :button_set
|
|
480
|
-
|
|
481
|
-
# @!method self.values
|
|
482
|
-
# @return [Array<Symbol>]
|
|
483
|
-
end
|
|
484
|
-
end
|
|
358
|
+
variant -> { Knockapi::MessageInAppFeedButtonSetBlock }
|
|
485
359
|
|
|
486
360
|
# @!method self.variants
|
|
487
|
-
# @return [Array(Knockapi::Models::
|
|
361
|
+
# @return [Array(Knockapi::Models::MessageInAppFeedContentBlock, Knockapi::Models::MessageInAppFeedButtonSetBlock)]
|
|
488
362
|
end
|
|
489
363
|
end
|
|
490
364
|
|
|
491
365
|
# @!method self.variants
|
|
492
|
-
# @return [Array(Knockapi::Models::
|
|
366
|
+
# @return [Array(Knockapi::Models::MessageContents::Data::MessageEmailContent, Knockapi::Models::MessageContents::Data::MessageSMSContent, Knockapi::Models::MessageContents::Data::MessagePushContent, Knockapi::Models::MessageContents::Data::MessageChatContent, Knockapi::Models::MessageContents::Data::MessageInAppFeedContent)]
|
|
493
367
|
end
|
|
494
368
|
end
|
|
495
369
|
end
|
|
@@ -69,19 +69,19 @@ module Knockapi
|
|
|
69
69
|
MESSAGE_READ = :"message.read"
|
|
70
70
|
MESSAGE_SENT = :"message.sent"
|
|
71
71
|
MESSAGE_SEEN = :"message.seen"
|
|
72
|
-
|
|
72
|
+
MESSAGE_CREATED = :"message.created"
|
|
73
73
|
MESSAGE_QUEUED = :"message.queued"
|
|
74
74
|
MESSAGE_DELIVERED = :"message.delivered"
|
|
75
|
-
MESSAGE_NOT_SENT = :"message.not_sent"
|
|
76
|
-
MESSAGE_BOUNCED = :"message.bounced"
|
|
77
|
-
MESSAGE_UNDELIVERED = :"message.undelivered"
|
|
78
75
|
MESSAGE_DELIVERY_ATTEMPTED = :"message.delivery_attempted"
|
|
79
|
-
|
|
80
|
-
|
|
76
|
+
MESSAGE_UNDELIVERED = :"message.undelivered"
|
|
77
|
+
MESSAGE_BOUNCED = :"message.bounced"
|
|
78
|
+
MESSAGE_NOT_SENT = :"message.not_sent"
|
|
79
|
+
MESSAGE_ARCHIVED = :"message.archived"
|
|
81
80
|
MESSAGE_LINK_CLICKED = :"message.link_clicked"
|
|
82
|
-
|
|
81
|
+
MESSAGE_INTERACTED = :"message.interacted"
|
|
83
82
|
MESSAGE_UNREAD = :"message.unread"
|
|
84
|
-
|
|
83
|
+
MESSAGE_UNSEEN = :"message.unseen"
|
|
84
|
+
MESSAGE_UNARCHIVED = :"message.unarchived"
|
|
85
85
|
|
|
86
86
|
# @!method self.values
|
|
87
87
|
# @return [Array<Symbol>]
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Knockapi
|
|
4
|
+
module Models
|
|
5
|
+
class MessageInAppFeedButtonSetBlock < Knockapi::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute buttons
|
|
7
|
+
# A list of buttons in an in app feed message.
|
|
8
|
+
#
|
|
9
|
+
# @return [Array<Knockapi::Models::MessageInAppFeedButtonSetBlock::Button>]
|
|
10
|
+
required :buttons,
|
|
11
|
+
-> { Knockapi::Internal::Type::ArrayOf[Knockapi::MessageInAppFeedButtonSetBlock::Button] }
|
|
12
|
+
|
|
13
|
+
# @!attribute name
|
|
14
|
+
# The name of the button set in a message in an app feed.
|
|
15
|
+
#
|
|
16
|
+
# @return [String]
|
|
17
|
+
required :name, String
|
|
18
|
+
|
|
19
|
+
# @!attribute type
|
|
20
|
+
# The type of block in a message in an app feed.
|
|
21
|
+
#
|
|
22
|
+
# @return [Symbol, Knockapi::Models::MessageInAppFeedButtonSetBlock::Type]
|
|
23
|
+
required :type, enum: -> { Knockapi::MessageInAppFeedButtonSetBlock::Type }
|
|
24
|
+
|
|
25
|
+
# @!method initialize(buttons:, name:, type:)
|
|
26
|
+
# A button set block in a message in an app feed.
|
|
27
|
+
#
|
|
28
|
+
# @param buttons [Array<Knockapi::Models::MessageInAppFeedButtonSetBlock::Button>] A list of buttons in an in app feed message.
|
|
29
|
+
#
|
|
30
|
+
# @param name [String] The name of the button set in a message in an app feed.
|
|
31
|
+
#
|
|
32
|
+
# @param type [Symbol, Knockapi::Models::MessageInAppFeedButtonSetBlock::Type] The type of block in a message in an app feed.
|
|
33
|
+
|
|
34
|
+
class Button < Knockapi::Internal::Type::BaseModel
|
|
35
|
+
# @!attribute action
|
|
36
|
+
# The action to take when the button is clicked.
|
|
37
|
+
#
|
|
38
|
+
# @return [String]
|
|
39
|
+
required :action, String
|
|
40
|
+
|
|
41
|
+
# @!attribute label
|
|
42
|
+
# The label of the button.
|
|
43
|
+
#
|
|
44
|
+
# @return [String]
|
|
45
|
+
required :label, String
|
|
46
|
+
|
|
47
|
+
# @!attribute name
|
|
48
|
+
# The name of the button.
|
|
49
|
+
#
|
|
50
|
+
# @return [String]
|
|
51
|
+
required :name, String
|
|
52
|
+
|
|
53
|
+
# @!method initialize(action:, label:, name:)
|
|
54
|
+
# A button in an in app feed message.
|
|
55
|
+
#
|
|
56
|
+
# @param action [String] The action to take when the button is clicked.
|
|
57
|
+
#
|
|
58
|
+
# @param label [String] The label of the button.
|
|
59
|
+
#
|
|
60
|
+
# @param name [String] The name of the button.
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# The type of block in a message in an app feed.
|
|
64
|
+
#
|
|
65
|
+
# @see Knockapi::Models::MessageInAppFeedButtonSetBlock#type
|
|
66
|
+
module Type
|
|
67
|
+
extend Knockapi::Internal::Type::Enum
|
|
68
|
+
|
|
69
|
+
BUTTON_SET = :button_set
|
|
70
|
+
|
|
71
|
+
# @!method self.values
|
|
72
|
+
# @return [Array<Symbol>]
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Knockapi
|
|
4
|
+
module Models
|
|
5
|
+
class MessageInAppFeedContentBlock < Knockapi::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute content
|
|
7
|
+
# The content of the block in a message in an app feed.
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :content, String
|
|
11
|
+
|
|
12
|
+
# @!attribute name
|
|
13
|
+
# The name of the block in a message in an app feed.
|
|
14
|
+
#
|
|
15
|
+
# @return [String]
|
|
16
|
+
required :name, String
|
|
17
|
+
|
|
18
|
+
# @!attribute rendered
|
|
19
|
+
# The rendered HTML version of the content.
|
|
20
|
+
#
|
|
21
|
+
# @return [String]
|
|
22
|
+
required :rendered, String
|
|
23
|
+
|
|
24
|
+
# @!attribute type
|
|
25
|
+
# The type of block in a message in an app feed.
|
|
26
|
+
#
|
|
27
|
+
# @return [Symbol, Knockapi::Models::MessageInAppFeedContentBlock::Type]
|
|
28
|
+
required :type, enum: -> { Knockapi::MessageInAppFeedContentBlock::Type }
|
|
29
|
+
|
|
30
|
+
# @!method initialize(content:, name:, rendered:, type:)
|
|
31
|
+
# A block in a message in an app feed.
|
|
32
|
+
#
|
|
33
|
+
# @param content [String] The content of the block in a message in an app feed.
|
|
34
|
+
#
|
|
35
|
+
# @param name [String] The name of the block in a message in an app feed.
|
|
36
|
+
#
|
|
37
|
+
# @param rendered [String] The rendered HTML version of the content.
|
|
38
|
+
#
|
|
39
|
+
# @param type [Symbol, Knockapi::Models::MessageInAppFeedContentBlock::Type] The type of block in a message in an app feed.
|
|
40
|
+
|
|
41
|
+
# The type of block in a message in an app feed.
|
|
42
|
+
#
|
|
43
|
+
# @see Knockapi::Models::MessageInAppFeedContentBlock#type
|
|
44
|
+
module Type
|
|
45
|
+
extend Knockapi::Internal::Type::Enum
|
|
46
|
+
|
|
47
|
+
MARKDOWN = :markdown
|
|
48
|
+
TEXT = :text
|
|
49
|
+
|
|
50
|
+
# @!method self.values
|
|
51
|
+
# @return [Array<Symbol>]
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -4,19 +4,11 @@ module Knockapi
|
|
|
4
4
|
module Models
|
|
5
5
|
module Messages
|
|
6
6
|
# @see Knockapi::Resources::Messages::Batch#archive
|
|
7
|
-
class BatchArchiveParams < Knockapi::
|
|
7
|
+
class BatchArchiveParams < Knockapi::Models::Messages::BatchMessagesStatusRequest
|
|
8
8
|
extend Knockapi::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Knockapi::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
|
-
# @!
|
|
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
|