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
@@ -37,10 +37,14 @@ module Knockapi
37
37
 
38
38
  # @!attribute commercial_subscribed
39
39
  # Whether the recipient is subscribed to commercial communications. When false,
40
- # the recipient will not receive commercial workflow notifications.
40
+ # the recipient will not receive commercial workflow notifications. Can also be
41
+ # set to a settings object with conditions that are evaluated at notification send
42
+ # time.
41
43
  #
42
- # @return [Boolean, nil]
43
- optional :commercial_subscribed, Knockapi::Internal::Type::Boolean, nil?: true
44
+ # @return [Boolean, Knockapi::Models::PreferenceSetCommercialSubscribedSetting, nil]
45
+ optional :commercial_subscribed,
46
+ union: -> { Knockapi::Recipients::PreferenceSet::CommercialSubscribed },
47
+ nil?: true
44
48
 
45
49
  # @!attribute workflows
46
50
  # An object where the key is the workflow key and the values are the preference
@@ -68,7 +72,7 @@ module Knockapi
68
72
  #
69
73
  # @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting}, nil] Channel preferences.
70
74
  #
71
- # @param commercial_subscribed [Boolean, nil] Whether the recipient is subscribed to commercial communications. When false, th
75
+ # @param commercial_subscribed [Boolean, Knockapi::Models::PreferenceSetCommercialSubscribedSetting, nil] Whether the recipient is subscribed to commercial communications. When false, th
72
76
  #
73
77
  # @param workflows [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSet::Workflow::PreferenceSetWorkflowCategorySettingObject}, nil] An object where the key is the workflow key and the values are the preference se
74
78
 
@@ -147,6 +151,24 @@ module Knockapi
147
151
  # @return [Array(Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting)]
148
152
  end
149
153
 
154
+ # Whether the recipient is subscribed to commercial communications. When false,
155
+ # the recipient will not receive commercial workflow notifications. Can also be
156
+ # set to a settings object with conditions that are evaluated at notification send
157
+ # time.
158
+ #
159
+ # @see Knockapi::Models::Recipients::PreferenceSet#commercial_subscribed
160
+ module CommercialSubscribed
161
+ extend Knockapi::Internal::Type::Union
162
+
163
+ variant Knockapi::Internal::Type::Boolean
164
+
165
+ # A set of settings for the commercial subscribed preference. Currently, this can only be a list of conditions to apply.
166
+ variant -> { Knockapi::PreferenceSetCommercialSubscribedSetting }
167
+
168
+ # @!method self.variants
169
+ # @return [Array(Boolean, Knockapi::Models::PreferenceSetCommercialSubscribedSetting)]
170
+ end
171
+
150
172
  # Workflow or category preferences within a preference set
151
173
  module Workflow
152
174
  extend Knockapi::Internal::Type::Union
@@ -42,10 +42,14 @@ module Knockapi
42
42
 
43
43
  # @!attribute commercial_subscribed
44
44
  # Whether the recipient is subscribed to commercial communications. When false,
45
- # the recipient will not receive commercial workflow notifications.
45
+ # the recipient will not receive commercial workflow notifications. Can also be
46
+ # set to a settings object with conditions that are evaluated at notification send
47
+ # time.
46
48
  #
47
- # @return [Boolean, nil]
48
- optional :commercial_subscribed, Knockapi::Internal::Type::Boolean, nil?: true
49
+ # @return [Boolean, Knockapi::Models::PreferenceSetCommercialSubscribedSetting, nil]
50
+ optional :commercial_subscribed,
51
+ union: -> { Knockapi::Recipients::PreferenceSetRequest::CommercialSubscribed },
52
+ nil?: true
49
53
 
50
54
  # @!attribute workflows
51
55
  # An object where the key is the workflow key and the values are the preference
@@ -72,7 +76,7 @@ module Knockapi
72
76
  #
73
77
  # @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting}, nil] Channel preferences.
74
78
  #
75
- # @param commercial_subscribed [Boolean, nil] Whether the recipient is subscribed to commercial communications. When false, th
79
+ # @param commercial_subscribed [Boolean, Knockapi::Models::PreferenceSetCommercialSubscribedSetting, nil] Whether the recipient is subscribed to commercial communications. When false, th
76
80
  #
77
81
  # @param workflows [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetRequest::Workflow::PreferenceSetWorkflowCategorySettingObject}, nil] An object where the key is the workflow key and the values are the preference se
78
82
 
@@ -167,6 +171,24 @@ module Knockapi
167
171
  # @return [Array(Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting)]
168
172
  end
169
173
 
174
+ # Whether the recipient is subscribed to commercial communications. When false,
175
+ # the recipient will not receive commercial workflow notifications. Can also be
176
+ # set to a settings object with conditions that are evaluated at notification send
177
+ # time.
178
+ #
179
+ # @see Knockapi::Models::Recipients::PreferenceSetRequest#commercial_subscribed
180
+ module CommercialSubscribed
181
+ extend Knockapi::Internal::Type::Union
182
+
183
+ variant Knockapi::Internal::Type::Boolean
184
+
185
+ # A set of settings for the commercial subscribed preference. Currently, this can only be a list of conditions to apply.
186
+ variant -> { Knockapi::PreferenceSetCommercialSubscribedSetting }
187
+
188
+ # @!method self.variants
189
+ # @return [Array(Boolean, Knockapi::Models::PreferenceSetCommercialSubscribedSetting)]
190
+ end
191
+
170
192
  # Workflow or category preferences within a preference set
171
193
  module Workflow
172
194
  extend Knockapi::Internal::Type::Union
@@ -47,19 +47,27 @@ module Knockapi
47
47
  # @return [String, nil]
48
48
  optional :channel_id, String, nil?: true
49
49
 
50
+ # @!attribute channel_name
51
+ # Slack channel name.
52
+ #
53
+ # @return [String, nil]
54
+ optional :channel_name, String, nil?: true
55
+
50
56
  # @!attribute user_id
51
57
  # A Slack user ID from the Slack provider.
52
58
  #
53
59
  # @return [String, nil]
54
60
  optional :user_id, String, nil?: true
55
61
 
56
- # @!method initialize(access_token: nil, channel_id: nil, user_id: nil)
62
+ # @!method initialize(access_token: nil, channel_id: nil, channel_name: nil, user_id: nil)
57
63
  # A Slack connection token.
58
64
  #
59
65
  # @param access_token [String, nil] A Slack access token.
60
66
  #
61
67
  # @param channel_id [String, nil] A Slack channel ID from the Slack provider.
62
68
  #
69
+ # @param channel_name [String, nil] Slack channel name.
70
+ #
63
71
  # @param user_id [String, nil] A Slack user ID from the Slack provider.
64
72
  end
65
73
 
@@ -67,10 +67,14 @@ module Knockapi
67
67
 
68
68
  # @!attribute commercial_subscribed
69
69
  # Whether the recipient is subscribed to commercial communications. When false,
70
- # the recipient will not receive commercial workflow notifications.
70
+ # the recipient will not receive commercial workflow notifications. Can also be
71
+ # set to a settings object with conditions that are evaluated at notification send
72
+ # time.
71
73
  #
72
- # @return [Boolean, nil]
73
- optional :commercial_subscribed, Knockapi::Internal::Type::Boolean, nil?: true
74
+ # @return [Boolean, Knockapi::Models::PreferenceSetCommercialSubscribedSetting, nil]
75
+ optional :commercial_subscribed,
76
+ union: -> { Knockapi::Users::BulkSetPreferencesParams::Preferences::CommercialSubscribed },
77
+ nil?: true
74
78
 
75
79
  # @!attribute workflows
76
80
  # An object where the key is the workflow key and the values are the preference
@@ -99,7 +103,7 @@ module Knockapi
99
103
  #
100
104
  # @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting}, nil] Channel preferences.
101
105
  #
102
- # @param commercial_subscribed [Boolean, nil] Whether the recipient is subscribed to commercial communications. When false, th
106
+ # @param commercial_subscribed [Boolean, Knockapi::Models::PreferenceSetCommercialSubscribedSetting, nil] Whether the recipient is subscribed to commercial communications. When false, th
103
107
  #
104
108
  # @param workflows [Hash{Symbol=>Boolean, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::Workflow::PreferenceSetWorkflowCategorySettingObject}, nil] An object where the key is the workflow key and the values are the preference se
105
109
 
@@ -180,6 +184,24 @@ module Knockapi
180
184
  # @return [Array(Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting)]
181
185
  end
182
186
 
187
+ # Whether the recipient is subscribed to commercial communications. When false,
188
+ # the recipient will not receive commercial workflow notifications. Can also be
189
+ # set to a settings object with conditions that are evaluated at notification send
190
+ # time.
191
+ #
192
+ # @see Knockapi::Models::Users::BulkSetPreferencesParams::Preferences#commercial_subscribed
193
+ module CommercialSubscribed
194
+ extend Knockapi::Internal::Type::Union
195
+
196
+ variant Knockapi::Internal::Type::Boolean
197
+
198
+ # A set of settings for the commercial subscribed preference. Currently, this can only be a list of conditions to apply.
199
+ variant -> { Knockapi::PreferenceSetCommercialSubscribedSetting }
200
+
201
+ # @!method self.variants
202
+ # @return [Array(Boolean, Knockapi::Models::PreferenceSetCommercialSubscribedSetting)]
203
+ end
204
+
183
205
  # Workflow or category preferences within a preference set
184
206
  module Workflow
185
207
  extend Knockapi::Internal::Type::Union
@@ -32,7 +32,7 @@ module Knockapi
32
32
  # @!attribute blocks
33
33
  # Content blocks that make up the feed item.
34
34
  #
35
- # @return [Array<Knockapi::Models::Users::FeedListItemsResponse::Block::MessageInAppFeedContentBlock, Knockapi::Models::Users::FeedListItemsResponse::Block::MessageInAppFeedButtonSetBlock>]
35
+ # @return [Array<Knockapi::Models::MessageInAppFeedContentBlock, Knockapi::Models::MessageInAppFeedButtonSetBlock>]
36
36
  required :blocks,
37
37
  -> { Knockapi::Internal::Type::ArrayOf[union: Knockapi::Models::Users::FeedListItemsResponse::Block] }
38
38
 
@@ -125,7 +125,7 @@ module Knockapi
125
125
  #
126
126
  # @param actors [Array<Knockapi::Models::User, Knockapi::Models::Object>] List of actors associated with this feed item.
127
127
  #
128
- # @param blocks [Array<Knockapi::Models::Users::FeedListItemsResponse::Block::MessageInAppFeedContentBlock, Knockapi::Models::Users::FeedListItemsResponse::Block::MessageInAppFeedButtonSetBlock>] Content blocks that make up the feed item.
128
+ # @param blocks [Array<Knockapi::Models::MessageInAppFeedContentBlock, Knockapi::Models::MessageInAppFeedButtonSetBlock>] Content blocks that make up the feed item.
129
129
  #
130
130
  # @param data [Hash{Symbol=>Object}, nil] Additional data associated with the feed item.
131
131
  #
@@ -158,136 +158,13 @@ module Knockapi
158
158
  extend Knockapi::Internal::Type::Union
159
159
 
160
160
  # A block in a message in an app feed.
161
- variant -> { Knockapi::Models::Users::FeedListItemsResponse::Block::MessageInAppFeedContentBlock }
161
+ variant -> { Knockapi::MessageInAppFeedContentBlock }
162
162
 
163
163
  # A button set block in a message in an app feed.
164
- variant -> { Knockapi::Models::Users::FeedListItemsResponse::Block::MessageInAppFeedButtonSetBlock }
165
-
166
- class MessageInAppFeedContentBlock < Knockapi::Internal::Type::BaseModel
167
- # @!attribute content
168
- # The content of the block in a message in an app feed.
169
- #
170
- # @return [String]
171
- required :content, String
172
-
173
- # @!attribute name
174
- # The name of the block in a message in an app feed.
175
- #
176
- # @return [String]
177
- required :name, String
178
-
179
- # @!attribute rendered
180
- # The rendered HTML version of the content.
181
- #
182
- # @return [String]
183
- required :rendered, String
184
-
185
- # @!attribute type
186
- # The type of block in a message in an app feed.
187
- #
188
- # @return [Symbol, Knockapi::Models::Users::FeedListItemsResponse::Block::MessageInAppFeedContentBlock::Type]
189
- required :type,
190
- enum: -> { Knockapi::Models::Users::FeedListItemsResponse::Block::MessageInAppFeedContentBlock::Type }
191
-
192
- # @!method initialize(content:, name:, rendered:, type:)
193
- # A block in a message in an app feed.
194
- #
195
- # @param content [String] The content of the block in a message in an app feed.
196
- #
197
- # @param name [String] The name of the block in a message in an app feed.
198
- #
199
- # @param rendered [String] The rendered HTML version of the content.
200
- #
201
- # @param type [Symbol, Knockapi::Models::Users::FeedListItemsResponse::Block::MessageInAppFeedContentBlock::Type] The type of block in a message in an app feed.
202
-
203
- # The type of block in a message in an app feed.
204
- #
205
- # @see Knockapi::Models::Users::FeedListItemsResponse::Block::MessageInAppFeedContentBlock#type
206
- module Type
207
- extend Knockapi::Internal::Type::Enum
208
-
209
- MARKDOWN = :markdown
210
- TEXT = :text
211
-
212
- # @!method self.values
213
- # @return [Array<Symbol>]
214
- end
215
- end
216
-
217
- class MessageInAppFeedButtonSetBlock < Knockapi::Internal::Type::BaseModel
218
- # @!attribute buttons
219
- # A list of buttons in an in app feed message.
220
- #
221
- # @return [Array<Knockapi::Models::Users::FeedListItemsResponse::Block::MessageInAppFeedButtonSetBlock::Button>]
222
- required :buttons,
223
- -> { Knockapi::Internal::Type::ArrayOf[Knockapi::Models::Users::FeedListItemsResponse::Block::MessageInAppFeedButtonSetBlock::Button] }
224
-
225
- # @!attribute name
226
- # The name of the button set in a message in an app feed.
227
- #
228
- # @return [String]
229
- required :name, String
230
-
231
- # @!attribute type
232
- # The type of block in a message in an app feed.
233
- #
234
- # @return [Symbol, Knockapi::Models::Users::FeedListItemsResponse::Block::MessageInAppFeedButtonSetBlock::Type]
235
- required :type,
236
- enum: -> { Knockapi::Models::Users::FeedListItemsResponse::Block::MessageInAppFeedButtonSetBlock::Type }
237
-
238
- # @!method initialize(buttons:, name:, type:)
239
- # A button set block in a message in an app feed.
240
- #
241
- # @param buttons [Array<Knockapi::Models::Users::FeedListItemsResponse::Block::MessageInAppFeedButtonSetBlock::Button>] A list of buttons in an in app feed message.
242
- #
243
- # @param name [String] The name of the button set in a message in an app feed.
244
- #
245
- # @param type [Symbol, Knockapi::Models::Users::FeedListItemsResponse::Block::MessageInAppFeedButtonSetBlock::Type] The type of block in a message in an app feed.
246
-
247
- class Button < Knockapi::Internal::Type::BaseModel
248
- # @!attribute action
249
- # The action to take when the button is clicked.
250
- #
251
- # @return [String]
252
- required :action, String
253
-
254
- # @!attribute label
255
- # The label of the button.
256
- #
257
- # @return [String]
258
- required :label, String
259
-
260
- # @!attribute name
261
- # The name of the button.
262
- #
263
- # @return [String]
264
- required :name, String
265
-
266
- # @!method initialize(action:, label:, name:)
267
- # A button in an in app feed message.
268
- #
269
- # @param action [String] The action to take when the button is clicked.
270
- #
271
- # @param label [String] The label of the button.
272
- #
273
- # @param name [String] The name of the button.
274
- end
275
-
276
- # The type of block in a message in an app feed.
277
- #
278
- # @see Knockapi::Models::Users::FeedListItemsResponse::Block::MessageInAppFeedButtonSetBlock#type
279
- module Type
280
- extend Knockapi::Internal::Type::Enum
281
-
282
- BUTTON_SET = :button_set
283
-
284
- # @!method self.values
285
- # @return [Array<Symbol>]
286
- end
287
- end
164
+ variant -> { Knockapi::MessageInAppFeedButtonSetBlock }
288
165
 
289
166
  # @!method self.variants
290
- # @return [Array(Knockapi::Models::Users::FeedListItemsResponse::Block::MessageInAppFeedContentBlock, Knockapi::Models::Users::FeedListItemsResponse::Block::MessageInAppFeedButtonSetBlock)]
167
+ # @return [Array(Knockapi::Models::MessageInAppFeedContentBlock, Knockapi::Models::MessageInAppFeedButtonSetBlock)]
291
168
  end
292
169
 
293
170
  # @see Knockapi::Models::Users::FeedListItemsResponse#source
@@ -4,7 +4,7 @@ module Knockapi
4
4
  module Models
5
5
  module Users
6
6
  # @see Knockapi::Resources::Users::Guides#mark_message_as_archived
7
- class GuideMarkMessageAsArchivedResponse < Knockapi::Internal::Type::BaseModel
7
+ class GuideActionResponse < Knockapi::Internal::Type::BaseModel
8
8
  # @!attribute status
9
9
  # The status of a guide's action.
10
10
  #
@@ -0,0 +1,72 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Knockapi
4
+ module Models
5
+ module Users
6
+ class GuideArchivedRequest < Knockapi::Internal::Type::BaseModel
7
+ # @!attribute channel_id
8
+ # The unique identifier for the channel.
9
+ #
10
+ # @return [String]
11
+ required :channel_id, String
12
+
13
+ # @!attribute guide_id
14
+ # The unique identifier for the guide.
15
+ #
16
+ # @return [String]
17
+ required :guide_id, String
18
+
19
+ # @!attribute guide_key
20
+ # The key of the guide.
21
+ #
22
+ # @return [String]
23
+ required :guide_key, String
24
+
25
+ # @!attribute guide_step_ref
26
+ # The step reference of the guide.
27
+ #
28
+ # @return [String]
29
+ required :guide_step_ref, String
30
+
31
+ # @!attribute is_final
32
+ # Whether the guide is final.
33
+ #
34
+ # @return [Boolean, nil]
35
+ optional :is_final, Knockapi::Internal::Type::Boolean
36
+
37
+ # @!attribute tenant
38
+ # The tenant ID of the guide.
39
+ #
40
+ # @return [String, nil]
41
+ optional :tenant, String
42
+
43
+ # @!attribute unthrottled
44
+ # Whether the guide bypasses its guide group's throttle settings. When true,
45
+ # archiving the guide does not open a new throttle window.
46
+ #
47
+ # @return [Boolean, nil]
48
+ optional :unthrottled, Knockapi::Internal::Type::Boolean
49
+
50
+ # @!method initialize(channel_id:, guide_id:, guide_key:, guide_step_ref:, is_final: nil, tenant: nil, unthrottled: nil)
51
+ # Some parameter documentations has been truncated, see
52
+ # {Knockapi::Models::Users::GuideArchivedRequest} for more details.
53
+ #
54
+ # A request to mark a guide as archived.
55
+ #
56
+ # @param channel_id [String] The unique identifier for the channel.
57
+ #
58
+ # @param guide_id [String] The unique identifier for the guide.
59
+ #
60
+ # @param guide_key [String] The key of the guide.
61
+ #
62
+ # @param guide_step_ref [String] The step reference of the guide.
63
+ #
64
+ # @param is_final [Boolean] Whether the guide is final.
65
+ #
66
+ # @param tenant [String] The tenant ID of the guide.
67
+ #
68
+ # @param unthrottled [Boolean] Whether the guide bypasses its guide group's throttle settings. When true, archi
69
+ end
70
+ end
71
+ end
72
+ end
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Knockapi
4
+ module Models
5
+ module Users
6
+ class GuideInteractedRequest < Knockapi::Internal::Type::BaseModel
7
+ # @!attribute channel_id
8
+ # The unique identifier for the channel.
9
+ #
10
+ # @return [String]
11
+ required :channel_id, String
12
+
13
+ # @!attribute guide_id
14
+ # The unique identifier for the guide.
15
+ #
16
+ # @return [String]
17
+ required :guide_id, String
18
+
19
+ # @!attribute guide_key
20
+ # The key of the guide.
21
+ #
22
+ # @return [String]
23
+ required :guide_key, String
24
+
25
+ # @!attribute guide_step_ref
26
+ # The step reference of the guide.
27
+ #
28
+ # @return [String]
29
+ required :guide_step_ref, String
30
+
31
+ # @!attribute metadata
32
+ # Metadata about the interaction.
33
+ #
34
+ # @return [Hash{Symbol=>Object}, nil]
35
+ optional :metadata, Knockapi::Internal::Type::HashOf[Knockapi::Internal::Type::Unknown]
36
+
37
+ # @!attribute tenant
38
+ # The tenant ID of the guide.
39
+ #
40
+ # @return [String, nil]
41
+ optional :tenant, String
42
+
43
+ # @!method initialize(channel_id:, guide_id:, guide_key:, guide_step_ref:, metadata: nil, tenant: nil)
44
+ # A request to mark a guide as interacted with.
45
+ #
46
+ # @param channel_id [String] The unique identifier for the channel.
47
+ #
48
+ # @param guide_id [String] The unique identifier for the guide.
49
+ #
50
+ # @param guide_key [String] The key of the guide.
51
+ #
52
+ # @param guide_step_ref [String] The step reference of the guide.
53
+ #
54
+ # @param metadata [Hash{Symbol=>Object}] Metadata about the interaction.
55
+ #
56
+ # @param tenant [String] The tenant ID of the guide.
57
+ end
58
+ end
59
+ end
60
+ end
@@ -4,7 +4,7 @@ module Knockapi
4
4
  module Models
5
5
  module Users
6
6
  # @see Knockapi::Resources::Users::Guides#mark_message_as_archived
7
- class GuideMarkMessageAsArchivedParams < Knockapi::Internal::Type::BaseModel
7
+ class GuideMarkMessageAsArchivedParams < Knockapi::Models::Users::GuideArchivedRequest
8
8
  extend Knockapi::Internal::Type::RequestParameters::Converter
9
9
  include Knockapi::Internal::Type::RequestParameters
10
10
 
@@ -13,88 +13,8 @@ module Knockapi
13
13
  # @return [String]
14
14
  required :user_id, String
15
15
 
16
- # @!attribute message_id
17
- #
18
- # @return [String]
19
- required :message_id, String
20
-
21
- # @!attribute channel_id
22
- # The unique identifier for the channel.
23
- #
24
- # @return [String]
25
- required :channel_id, String
26
-
27
- # @!attribute guide_id
28
- # The unique identifier for the guide.
29
- #
30
- # @return [String]
31
- required :guide_id, String
32
-
33
- # @!attribute guide_key
34
- # The key of the guide.
35
- #
36
- # @return [String]
37
- required :guide_key, String
38
-
39
- # @!attribute guide_step_ref
40
- # The step reference of the guide.
41
- #
42
- # @return [String]
43
- required :guide_step_ref, String
44
-
45
- # @!attribute content
46
- # The content of the guide.
47
- #
48
- # @return [Hash{Symbol=>Object}, nil]
49
- optional :content, Knockapi::Internal::Type::HashOf[Knockapi::Internal::Type::Unknown]
50
-
51
- # @!attribute data
52
- # The data of the guide.
53
- #
54
- # @return [Hash{Symbol=>Object}, nil]
55
- optional :data, Knockapi::Internal::Type::HashOf[Knockapi::Internal::Type::Unknown]
56
-
57
- # @!attribute is_final
58
- # Whether the guide is final.
59
- #
60
- # @return [Boolean, nil]
61
- optional :is_final, Knockapi::Internal::Type::Boolean
62
-
63
- # @!attribute metadata
64
- # The metadata of the guide.
65
- #
66
- # @return [Hash{Symbol=>Object}, nil]
67
- optional :metadata, Knockapi::Internal::Type::HashOf[Knockapi::Internal::Type::Unknown]
68
-
69
- # @!attribute tenant
70
- # The tenant ID of the guide.
71
- #
72
- # @return [String, nil]
73
- optional :tenant, String, nil?: true
74
-
75
- # @!method initialize(user_id:, message_id:, channel_id:, guide_id:, guide_key:, guide_step_ref:, content: nil, data: nil, is_final: nil, metadata: nil, tenant: nil, request_options: {})
16
+ # @!method initialize(user_id:, request_options: {})
76
17
  # @param user_id [String]
77
- #
78
- # @param message_id [String]
79
- #
80
- # @param channel_id [String] The unique identifier for the channel.
81
- #
82
- # @param guide_id [String] The unique identifier for the guide.
83
- #
84
- # @param guide_key [String] The key of the guide.
85
- #
86
- # @param guide_step_ref [String] The step reference of the guide.
87
- #
88
- # @param content [Hash{Symbol=>Object}] The content of the guide.
89
- #
90
- # @param data [Hash{Symbol=>Object}] The data of the guide.
91
- #
92
- # @param is_final [Boolean] Whether the guide is final.
93
- #
94
- # @param metadata [Hash{Symbol=>Object}] The metadata of the guide.
95
- #
96
- # @param tenant [String, nil] The tenant ID of the guide.
97
- #
98
18
  # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}]
99
19
  end
100
20
  end
@@ -4,7 +4,7 @@ module Knockapi
4
4
  module Models
5
5
  module Users
6
6
  # @see Knockapi::Resources::Users::Guides#mark_message_as_interacted
7
- class GuideMarkMessageAsInteractedParams < Knockapi::Internal::Type::BaseModel
7
+ class GuideMarkMessageAsInteractedParams < Knockapi::Models::Users::GuideInteractedRequest
8
8
  extend Knockapi::Internal::Type::RequestParameters::Converter
9
9
  include Knockapi::Internal::Type::RequestParameters
10
10
 
@@ -13,88 +13,8 @@ module Knockapi
13
13
  # @return [String]
14
14
  required :user_id, String
15
15
 
16
- # @!attribute message_id
17
- #
18
- # @return [String]
19
- required :message_id, String
20
-
21
- # @!attribute channel_id
22
- # The unique identifier for the channel.
23
- #
24
- # @return [String]
25
- required :channel_id, String
26
-
27
- # @!attribute guide_id
28
- # The unique identifier for the guide.
29
- #
30
- # @return [String]
31
- required :guide_id, String
32
-
33
- # @!attribute guide_key
34
- # The key of the guide.
35
- #
36
- # @return [String]
37
- required :guide_key, String
38
-
39
- # @!attribute guide_step_ref
40
- # The step reference of the guide.
41
- #
42
- # @return [String]
43
- required :guide_step_ref, String
44
-
45
- # @!attribute content
46
- # The content of the guide.
47
- #
48
- # @return [Hash{Symbol=>Object}, nil]
49
- optional :content, Knockapi::Internal::Type::HashOf[Knockapi::Internal::Type::Unknown]
50
-
51
- # @!attribute data
52
- # The data of the guide.
53
- #
54
- # @return [Hash{Symbol=>Object}, nil]
55
- optional :data, Knockapi::Internal::Type::HashOf[Knockapi::Internal::Type::Unknown]
56
-
57
- # @!attribute is_final
58
- # Whether the guide is final.
59
- #
60
- # @return [Boolean, nil]
61
- optional :is_final, Knockapi::Internal::Type::Boolean
62
-
63
- # @!attribute metadata
64
- # The metadata of the guide.
65
- #
66
- # @return [Hash{Symbol=>Object}, nil]
67
- optional :metadata, Knockapi::Internal::Type::HashOf[Knockapi::Internal::Type::Unknown]
68
-
69
- # @!attribute tenant
70
- # The tenant ID of the guide.
71
- #
72
- # @return [String, nil]
73
- optional :tenant, String, nil?: true
74
-
75
- # @!method initialize(user_id:, message_id:, channel_id:, guide_id:, guide_key:, guide_step_ref:, content: nil, data: nil, is_final: nil, metadata: nil, tenant: nil, request_options: {})
16
+ # @!method initialize(user_id:, request_options: {})
76
17
  # @param user_id [String]
77
- #
78
- # @param message_id [String]
79
- #
80
- # @param channel_id [String] The unique identifier for the channel.
81
- #
82
- # @param guide_id [String] The unique identifier for the guide.
83
- #
84
- # @param guide_key [String] The key of the guide.
85
- #
86
- # @param guide_step_ref [String] The step reference of the guide.
87
- #
88
- # @param content [Hash{Symbol=>Object}] The content of the guide.
89
- #
90
- # @param data [Hash{Symbol=>Object}] The data of the guide.
91
- #
92
- # @param is_final [Boolean] Whether the guide is final.
93
- #
94
- # @param metadata [Hash{Symbol=>Object}] The metadata of the guide.
95
- #
96
- # @param tenant [String, nil] The tenant ID of the guide.
97
- #
98
18
  # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}]
99
19
  end
100
20
  end