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
@@ -0,0 +1,476 @@
1
+ # typed: strong
2
+
3
+ module Knockapi
4
+ module Models
5
+ module Users
6
+ class PreferenceCenterGetConfigResponse < Knockapi::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse,
11
+ Knockapi::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # The name of the account that the preference center is associated with.
16
+ sig { returns(T.nilable(String)) }
17
+ attr_accessor :account_name
18
+
19
+ # The branding for the preference center, sourced from public environment
20
+ # variables.
21
+ sig do
22
+ returns(
23
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Branding
24
+ )
25
+ end
26
+ attr_reader :branding
27
+
28
+ sig do
29
+ params(
30
+ branding:
31
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Branding::OrHash
32
+ ).void
33
+ end
34
+ attr_writer :branding
35
+
36
+ # The preference center configuration data containing the rows to display.
37
+ sig do
38
+ returns(
39
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config
40
+ )
41
+ end
42
+ attr_reader :config
43
+
44
+ sig do
45
+ params(
46
+ config:
47
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::OrHash
48
+ ).void
49
+ end
50
+ attr_writer :config
51
+
52
+ # Whether the preference center is enabled for this environment.
53
+ sig { returns(T::Boolean) }
54
+ attr_accessor :enabled
55
+
56
+ # A display label for the user that the preference center is associated with,
57
+ # resolved as email, then user id.
58
+ sig { returns(T.nilable(String)) }
59
+ attr_accessor :user_email
60
+
61
+ # Whether Knock branding is required in the preference center.
62
+ sig { returns(T.nilable(T::Boolean)) }
63
+ attr_reader :knock_branding_required
64
+
65
+ sig { params(knock_branding_required: T::Boolean).void }
66
+ attr_writer :knock_branding_required
67
+
68
+ # The preference center configuration for an environment. Controls whether the
69
+ # preference center is enabled and defines the rows displayed in the UI.
70
+ sig do
71
+ params(
72
+ account_name: T.nilable(String),
73
+ branding:
74
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Branding::OrHash,
75
+ config:
76
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::OrHash,
77
+ enabled: T::Boolean,
78
+ user_email: T.nilable(String),
79
+ knock_branding_required: T::Boolean
80
+ ).returns(T.attached_class)
81
+ end
82
+ def self.new(
83
+ # The name of the account that the preference center is associated with.
84
+ account_name:,
85
+ # The branding for the preference center, sourced from public environment
86
+ # variables.
87
+ branding:,
88
+ # The preference center configuration data containing the rows to display.
89
+ config:,
90
+ # Whether the preference center is enabled for this environment.
91
+ enabled:,
92
+ # A display label for the user that the preference center is associated with,
93
+ # resolved as email, then user id.
94
+ user_email:,
95
+ # Whether Knock branding is required in the preference center.
96
+ knock_branding_required: nil
97
+ )
98
+ end
99
+
100
+ sig do
101
+ override.returns(
102
+ {
103
+ account_name: T.nilable(String),
104
+ branding:
105
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Branding,
106
+ config:
107
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config,
108
+ enabled: T::Boolean,
109
+ user_email: T.nilable(String),
110
+ knock_branding_required: T::Boolean
111
+ }
112
+ )
113
+ end
114
+ def to_hash
115
+ end
116
+
117
+ class Branding < Knockapi::Models::Users::PreferenceCenterBrandingConfig
118
+ OrHash =
119
+ T.type_alias do
120
+ T.any(
121
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Branding,
122
+ Knockapi::Internal::AnyHash
123
+ )
124
+ end
125
+
126
+ # The branding for the preference center, sourced from public environment
127
+ # variables.
128
+ sig do
129
+ returns(T.nilable(Knockapi::Users::PreferenceCenterBrandingConfig))
130
+ end
131
+ attr_reader :dark
132
+
133
+ sig do
134
+ params(
135
+ dark: Knockapi::Users::PreferenceCenterBrandingConfig::OrHash
136
+ ).void
137
+ end
138
+ attr_writer :dark
139
+
140
+ # The branding for the preference center, sourced from public environment
141
+ # variables.
142
+ sig do
143
+ params(
144
+ dark: Knockapi::Users::PreferenceCenterBrandingConfig::OrHash
145
+ ).returns(T.attached_class)
146
+ end
147
+ def self.new(
148
+ # The branding for the preference center, sourced from public environment
149
+ # variables.
150
+ dark: nil
151
+ )
152
+ end
153
+
154
+ sig do
155
+ override.returns(
156
+ { dark: Knockapi::Users::PreferenceCenterBrandingConfig }
157
+ )
158
+ end
159
+ def to_hash
160
+ end
161
+ end
162
+
163
+ class Config < Knockapi::Internal::Type::BaseModel
164
+ OrHash =
165
+ T.type_alias do
166
+ T.any(
167
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config,
168
+ Knockapi::Internal::AnyHash
169
+ )
170
+ end
171
+
172
+ # The body text displayed below the title.
173
+ sig { returns(String) }
174
+ attr_accessor :body
175
+
176
+ # An ordered list of rows to display in the preference center.
177
+ sig do
178
+ returns(
179
+ T::Array[
180
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row
181
+ ]
182
+ )
183
+ end
184
+ attr_accessor :rows
185
+
186
+ # The title displayed at the top of the preference center.
187
+ sig { returns(String) }
188
+ attr_accessor :title
189
+
190
+ # Whether the account name should be displayed in the preference center.
191
+ sig { returns(T.nilable(T::Boolean)) }
192
+ attr_reader :show_account_name
193
+
194
+ sig { params(show_account_name: T::Boolean).void }
195
+ attr_writer :show_account_name
196
+
197
+ # The preference center configuration data containing the rows to display.
198
+ sig do
199
+ params(
200
+ body: String,
201
+ rows:
202
+ T::Array[
203
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::OrHash
204
+ ],
205
+ title: String,
206
+ show_account_name: T::Boolean
207
+ ).returns(T.attached_class)
208
+ end
209
+ def self.new(
210
+ # The body text displayed below the title.
211
+ body:,
212
+ # An ordered list of rows to display in the preference center.
213
+ rows:,
214
+ # The title displayed at the top of the preference center.
215
+ title:,
216
+ # Whether the account name should be displayed in the preference center.
217
+ show_account_name: nil
218
+ )
219
+ end
220
+
221
+ sig do
222
+ override.returns(
223
+ {
224
+ body: String,
225
+ rows:
226
+ T::Array[
227
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row
228
+ ],
229
+ title: String,
230
+ show_account_name: T::Boolean
231
+ }
232
+ )
233
+ end
234
+ def to_hash
235
+ end
236
+
237
+ class Row < Knockapi::Internal::Type::BaseModel
238
+ OrHash =
239
+ T.type_alias do
240
+ T.any(
241
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row,
242
+ Knockapi::Internal::AnyHash
243
+ )
244
+ end
245
+
246
+ # The display name of the preference row.
247
+ sig { returns(String) }
248
+ attr_accessor :name
249
+
250
+ # The type of this preference row. `workflow` targets a workflow, `channel`
251
+ # targets a specific channel, `category` targets a workflow category,
252
+ # `channel_types` controls per-channel-type opt-in/out, and
253
+ # `commercial_subscribed` is the commercial notification toggle.
254
+ sig do
255
+ returns(
256
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::Type::TaggedSymbol
257
+ )
258
+ end
259
+ attr_accessor :type
260
+
261
+ # The list of channel types this preference is scoped to. An empty list (or
262
+ # `null`) means the preference applies to all channel types. Present for
263
+ # `workflow`, `category`, and `channel_types` types.
264
+ sig do
265
+ returns(
266
+ T.nilable(
267
+ T::Array[
268
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::ChannelType::TaggedSymbol
269
+ ]
270
+ )
271
+ )
272
+ end
273
+ attr_accessor :channel_types
274
+
275
+ # A description shown below the preference row name.
276
+ sig { returns(T.nilable(String)) }
277
+ attr_reader :description
278
+
279
+ sig { params(description: String).void }
280
+ attr_writer :description
281
+
282
+ # The category name, workflow key, or channel ID this row controls (e.g.
283
+ # `marketing`, `new-project-mentions`, or a channel UUID). Present for `workflow`,
284
+ # `channel`, and `category` types.
285
+ sig { returns(T.nilable(String)) }
286
+ attr_accessor :identifier
287
+
288
+ # A preference row in the preference center configuration.
289
+ sig do
290
+ params(
291
+ name: String,
292
+ type:
293
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::Type::OrSymbol,
294
+ channel_types:
295
+ T.nilable(
296
+ T::Array[
297
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::ChannelType::OrSymbol
298
+ ]
299
+ ),
300
+ description: String,
301
+ identifier: T.nilable(String)
302
+ ).returns(T.attached_class)
303
+ end
304
+ def self.new(
305
+ # The display name of the preference row.
306
+ name:,
307
+ # The type of this preference row. `workflow` targets a workflow, `channel`
308
+ # targets a specific channel, `category` targets a workflow category,
309
+ # `channel_types` controls per-channel-type opt-in/out, and
310
+ # `commercial_subscribed` is the commercial notification toggle.
311
+ type:,
312
+ # The list of channel types this preference is scoped to. An empty list (or
313
+ # `null`) means the preference applies to all channel types. Present for
314
+ # `workflow`, `category`, and `channel_types` types.
315
+ channel_types: nil,
316
+ # A description shown below the preference row name.
317
+ description: nil,
318
+ # The category name, workflow key, or channel ID this row controls (e.g.
319
+ # `marketing`, `new-project-mentions`, or a channel UUID). Present for `workflow`,
320
+ # `channel`, and `category` types.
321
+ identifier: nil
322
+ )
323
+ end
324
+
325
+ sig do
326
+ override.returns(
327
+ {
328
+ name: String,
329
+ type:
330
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::Type::TaggedSymbol,
331
+ channel_types:
332
+ T.nilable(
333
+ T::Array[
334
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::ChannelType::TaggedSymbol
335
+ ]
336
+ ),
337
+ description: String,
338
+ identifier: T.nilable(String)
339
+ }
340
+ )
341
+ end
342
+ def to_hash
343
+ end
344
+
345
+ # The type of this preference row. `workflow` targets a workflow, `channel`
346
+ # targets a specific channel, `category` targets a workflow category,
347
+ # `channel_types` controls per-channel-type opt-in/out, and
348
+ # `commercial_subscribed` is the commercial notification toggle.
349
+ module Type
350
+ extend Knockapi::Internal::Type::Enum
351
+
352
+ TaggedSymbol =
353
+ T.type_alias do
354
+ T.all(
355
+ Symbol,
356
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::Type
357
+ )
358
+ end
359
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
360
+
361
+ WORKFLOW =
362
+ T.let(
363
+ :workflow,
364
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::Type::TaggedSymbol
365
+ )
366
+ CHANNEL =
367
+ T.let(
368
+ :channel,
369
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::Type::TaggedSymbol
370
+ )
371
+ CATEGORY =
372
+ T.let(
373
+ :category,
374
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::Type::TaggedSymbol
375
+ )
376
+ CHANNEL_TYPES =
377
+ T.let(
378
+ :channel_types,
379
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::Type::TaggedSymbol
380
+ )
381
+ COMMERCIAL_SUBSCRIBED =
382
+ T.let(
383
+ :commercial_subscribed,
384
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::Type::TaggedSymbol
385
+ )
386
+
387
+ sig do
388
+ override.returns(
389
+ T::Array[
390
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::Type::TaggedSymbol
391
+ ]
392
+ )
393
+ end
394
+ def self.values
395
+ end
396
+ end
397
+
398
+ module ChannelType
399
+ extend Knockapi::Internal::Type::Enum
400
+
401
+ TaggedSymbol =
402
+ T.type_alias do
403
+ T.all(
404
+ Symbol,
405
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::ChannelType
406
+ )
407
+ end
408
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
409
+
410
+ EMAIL =
411
+ T.let(
412
+ :email,
413
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::ChannelType::TaggedSymbol
414
+ )
415
+ IN_APP =
416
+ T.let(
417
+ :in_app,
418
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::ChannelType::TaggedSymbol
419
+ )
420
+ IN_APP_FEED =
421
+ T.let(
422
+ :in_app_feed,
423
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::ChannelType::TaggedSymbol
424
+ )
425
+ IN_APP_GUIDE =
426
+ T.let(
427
+ :in_app_guide,
428
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::ChannelType::TaggedSymbol
429
+ )
430
+ SMS =
431
+ T.let(
432
+ :sms,
433
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::ChannelType::TaggedSymbol
434
+ )
435
+ PUSH =
436
+ T.let(
437
+ :push,
438
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::ChannelType::TaggedSymbol
439
+ )
440
+ CHAT =
441
+ T.let(
442
+ :chat,
443
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::ChannelType::TaggedSymbol
444
+ )
445
+ HTTP =
446
+ T.let(
447
+ :http,
448
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::ChannelType::TaggedSymbol
449
+ )
450
+ LOG =
451
+ T.let(
452
+ :log,
453
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::ChannelType::TaggedSymbol
454
+ )
455
+ DEFERRED_LOG =
456
+ T.let(
457
+ :deferred_log,
458
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::ChannelType::TaggedSymbol
459
+ )
460
+
461
+ sig do
462
+ override.returns(
463
+ T::Array[
464
+ Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::ChannelType::TaggedSymbol
465
+ ]
466
+ )
467
+ end
468
+ def self.values
469
+ end
470
+ end
471
+ end
472
+ end
473
+ end
474
+ end
475
+ end
476
+ end
@@ -9,6 +9,8 @@ module Knockapi
9
9
 
10
10
  AudienceMember = Knockapi::Models::AudienceMember
11
11
 
12
+ AudienceMemberRequest = Knockapi::Models::AudienceMemberRequest
13
+
12
14
  AudienceRemoveMembersParams = Knockapi::Models::AudienceRemoveMembersParams
13
15
 
14
16
  BulkOperation = Knockapi::Models::BulkOperation
@@ -29,10 +31,18 @@ module Knockapi
29
31
 
30
32
  Integrations = Knockapi::Models::Integrations
31
33
 
34
+ ListMessagesResponse = Knockapi::Models::ListMessagesResponse
35
+
36
+ ListSchedulesResponse = Knockapi::Models::ListSchedulesResponse
37
+
38
+ ListSubscriptionsResponse = Knockapi::Models::ListSubscriptionsResponse
39
+
32
40
  Message = Knockapi::Models::Message
33
41
 
34
42
  MessageArchiveParams = Knockapi::Models::MessageArchiveParams
35
43
 
44
+ MessageContents = Knockapi::Models::MessageContents
45
+
36
46
  MessageDeliveryLog = Knockapi::Models::MessageDeliveryLog
37
47
 
38
48
  MessageEvent = Knockapi::Models::MessageEvent
@@ -41,6 +51,11 @@ module Knockapi
41
51
 
42
52
  MessageGetParams = Knockapi::Models::MessageGetParams
43
53
 
54
+ MessageInAppFeedButtonSetBlock =
55
+ Knockapi::Models::MessageInAppFeedButtonSetBlock
56
+
57
+ MessageInAppFeedContentBlock = Knockapi::Models::MessageInAppFeedContentBlock
58
+
44
59
  MessageListActivitiesParams = Knockapi::Models::MessageListActivitiesParams
45
60
 
46
61
  MessageListDeliveryLogsParams =
@@ -105,6 +120,9 @@ module Knockapi
105
120
 
106
121
  PageInfo = Knockapi::Models::PageInfo
107
122
 
123
+ PreferenceSetCommercialSubscribedSetting =
124
+ Knockapi::Models::PreferenceSetCommercialSubscribedSetting
125
+
108
126
  Providers = Knockapi::Models::Providers
109
127
 
110
128
  Recipient = Knockapi::Models::Recipient
@@ -8,7 +8,7 @@ module Knockapi
8
8
  sig do
9
9
  params(
10
10
  key: String,
11
- members: T::Array[Knockapi::AudienceAddMembersParams::Member::OrHash],
11
+ members: T::Array[Knockapi::AudienceMemberRequest::OrHash],
12
12
  create_audience: T::Boolean,
13
13
  request_options: Knockapi::RequestOptions::OrHash
14
14
  ).void
@@ -43,8 +43,7 @@ module Knockapi
43
43
  sig do
44
44
  params(
45
45
  key: String,
46
- members:
47
- T::Array[Knockapi::AudienceRemoveMembersParams::Member::OrHash],
46
+ members: T::Array[Knockapi::AudienceMemberRequest::OrHash],
48
47
  request_options: Knockapi::RequestOptions::OrHash
49
48
  ).void
50
49
  end
@@ -25,9 +25,7 @@ module Knockapi
25
25
  params(
26
26
  message_ids: T::Array[String],
27
27
  request_options: Knockapi::RequestOptions::OrHash
28
- ).returns(
29
- T::Array[Knockapi::Models::Messages::BatchGetContentResponseItem]
30
- )
28
+ ).returns(T::Array[Knockapi::MessageContents])
31
29
  end
32
30
  def get_content(
33
31
  # The IDs of the messages to fetch contents of.
@@ -100,7 +100,7 @@ module Knockapi
100
100
  params(
101
101
  message_id: String,
102
102
  request_options: Knockapi::RequestOptions::OrHash
103
- ).returns(Knockapi::Models::MessageGetContentResponse)
103
+ ).returns(Knockapi::MessageContents)
104
104
  end
105
105
  def get_content(
106
106
  # The ID of the message to fetch contents of.
@@ -471,7 +471,13 @@ module Knockapi
471
471
  )
472
472
  ]
473
473
  ),
474
- commercial_subscribed: T.nilable(T::Boolean),
474
+ commercial_subscribed:
475
+ T.nilable(
476
+ T.any(
477
+ T::Boolean,
478
+ Knockapi::PreferenceSetCommercialSubscribedSetting::OrHash
479
+ )
480
+ ),
475
481
  workflows:
476
482
  T.nilable(
477
483
  T::Hash[
@@ -503,7 +509,9 @@ module Knockapi
503
509
  # Channel preferences.
504
510
  channels: nil,
505
511
  # Whether the recipient is subscribed to commercial communications. When false,
506
- # the recipient will not receive commercial workflow notifications.
512
+ # the recipient will not receive commercial workflow notifications. Can also be
513
+ # set to a settings object with conditions that are evaluated at notification send
514
+ # time.
507
515
  commercial_subscribed: nil,
508
516
  # An object where the key is the workflow key and the values are the preference
509
517
  # settings for that workflow.