knockapi 1.16.0 → 1.18.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 +36 -0
- data/README.md +1 -1
- data/lib/knockapi/internal/transport/pooled_net_requester.rb +30 -24
- data/lib/knockapi/internal/util.rb +5 -5
- data/lib/knockapi/models/identify_user_request.rb +2 -2
- data/lib/knockapi/models/inline_identify_user_request.rb +2 -2
- data/lib/knockapi/models/inline_object_request.rb +2 -2
- data/lib/knockapi/models/message.rb +94 -3
- data/lib/knockapi/models/messages/batch_archive_response.rb +1 -1
- data/lib/knockapi/models/messages/batch_mark_as_interacted_response.rb +1 -1
- data/lib/knockapi/models/messages/batch_mark_as_read_response.rb +1 -1
- data/lib/knockapi/models/messages/batch_mark_as_seen_response.rb +1 -1
- data/lib/knockapi/models/messages/batch_mark_as_unread_response.rb +1 -1
- data/lib/knockapi/models/messages/batch_mark_as_unseen_response.rb +1 -1
- data/lib/knockapi/models/messages/batch_unarchive_response.rb +1 -1
- data/lib/knockapi/models/object_set_params.rb +2 -2
- data/lib/knockapi/models/objects/bulk_set_params.rb +2 -2
- data/lib/knockapi/models/recipients/channel_data.rb +133 -11
- data/lib/knockapi/models/recipients/channel_data_request.rb +151 -9
- data/lib/knockapi/models/recipients/inline_channel_data_request.rb +149 -7
- data/lib/knockapi/models/recipients/preference_set.rb +130 -3
- data/lib/knockapi/models/recipients/preference_set_request.rb +136 -3
- data/lib/knockapi/models/tenant_request.rb +2 -2
- data/lib/knockapi/models/tenant_set_params.rb +2 -2
- data/lib/knockapi/models/users/guide_get_channel_response.rb +270 -34
- data/lib/knockapi/resources/messages/batch.rb +7 -7
- data/lib/knockapi/resources/objects.rb +7 -3
- data/lib/knockapi/resources/tenants.rb +1 -1
- data/lib/knockapi/resources/users.rb +7 -3
- data/lib/knockapi/version.rb +1 -1
- data/lib/knockapi.rb +0 -2
- data/rbi/knockapi/models/identify_user_request.rbi +15 -9
- data/rbi/knockapi/models/inline_identify_user_request.rbi +15 -9
- data/rbi/knockapi/models/inline_object_request.rbi +15 -9
- data/rbi/knockapi/models/message.rbi +123 -2
- data/rbi/knockapi/models/messages/batch_archive_response.rbi +1 -1
- data/rbi/knockapi/models/messages/batch_mark_as_interacted_response.rbi +1 -1
- data/rbi/knockapi/models/messages/batch_mark_as_read_response.rbi +1 -1
- data/rbi/knockapi/models/messages/batch_mark_as_seen_response.rbi +1 -1
- data/rbi/knockapi/models/messages/batch_mark_as_unread_response.rbi +1 -1
- data/rbi/knockapi/models/messages/batch_mark_as_unseen_response.rbi +1 -1
- data/rbi/knockapi/models/messages/batch_unarchive_response.rbi +1 -1
- data/rbi/knockapi/models/object_set_params.rbi +20 -12
- data/rbi/knockapi/models/objects/bulk_set_params.rbi +15 -9
- data/rbi/knockapi/models/recipients/channel_data.rbi +250 -12
- data/rbi/knockapi/models/recipients/channel_data_request.rbi +298 -14
- data/rbi/knockapi/models/recipients/inline_channel_data_request.rbi +281 -5
- data/rbi/knockapi/models/recipients/preference_set.rbi +279 -0
- data/rbi/knockapi/models/recipients/preference_set_request.rbi +299 -0
- data/rbi/knockapi/models/tenant_request.rbi +15 -9
- data/rbi/knockapi/models/tenant_set_params.rbi +15 -9
- data/rbi/knockapi/models/users/guide_get_channel_response.rbi +532 -70
- data/rbi/knockapi/resources/messages/batch.rbi +7 -7
- data/rbi/knockapi/resources/objects.rbi +26 -6
- data/rbi/knockapi/resources/tenants.rbi +5 -3
- data/rbi/knockapi/resources/users.rbi +26 -6
- data/sig/knockapi/models/message.rbs +79 -0
- data/sig/knockapi/models/messages/batch_archive_response.rbs +1 -1
- data/sig/knockapi/models/messages/batch_mark_as_interacted_response.rbs +1 -2
- data/sig/knockapi/models/messages/batch_mark_as_read_response.rbs +1 -1
- data/sig/knockapi/models/messages/batch_mark_as_seen_response.rbs +1 -1
- data/sig/knockapi/models/messages/batch_mark_as_unread_response.rbs +1 -1
- data/sig/knockapi/models/messages/batch_mark_as_unseen_response.rbs +1 -1
- data/sig/knockapi/models/messages/batch_unarchive_response.rbs +1 -1
- data/sig/knockapi/models/recipients/channel_data.rbs +97 -7
- data/sig/knockapi/models/recipients/channel_data_request.rbs +108 -5
- data/sig/knockapi/models/recipients/inline_channel_data_request.rbs +108 -5
- data/sig/knockapi/models/recipients/preference_set.rbs +87 -0
- data/sig/knockapi/models/recipients/preference_set_request.rbs +87 -0
- data/sig/knockapi/models/users/guide_get_channel_response.rbs +294 -31
- data/sig/knockapi/resources/objects.rbs +2 -0
- data/sig/knockapi/resources/users.rbs +2 -0
- metadata +2 -8
- data/lib/knockapi/models/recipients/one_signal_channel_data.rb +0 -20
- data/lib/knockapi/models/recipients/push_channel_data.rb +0 -20
- data/rbi/knockapi/models/recipients/one_signal_channel_data.rbi +0 -33
- data/rbi/knockapi/models/recipients/push_channel_data.rbi +0 -33
- data/sig/knockapi/models/recipients/one_signal_channel_data.rbs +0 -15
- data/sig/knockapi/models/recipients/push_channel_data.rbs +0 -15
|
@@ -27,6 +27,21 @@ module Knockapi
|
|
|
27
27
|
# @return [Knockapi::Models::Recipients::PreferenceSetChannelTypes, nil]
|
|
28
28
|
optional :channel_types, -> { Knockapi::Recipients::PreferenceSetChannelTypes }, nil?: true
|
|
29
29
|
|
|
30
|
+
# @!attribute channels
|
|
31
|
+
# Channel preferences.
|
|
32
|
+
#
|
|
33
|
+
# @return [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSet::Channel::PreferenceSetChannelSetting}, nil]
|
|
34
|
+
optional :channels,
|
|
35
|
+
-> { Knockapi::Internal::Type::HashOf[union: Knockapi::Recipients::PreferenceSet::Channel] },
|
|
36
|
+
nil?: true
|
|
37
|
+
|
|
38
|
+
# @!attribute commercial_subscribed
|
|
39
|
+
# Whether the recipient is subscribed to commercial communications. When false,
|
|
40
|
+
# the recipient will not receive commercial workflow notifications.
|
|
41
|
+
#
|
|
42
|
+
# @return [Boolean, nil]
|
|
43
|
+
optional :commercial_subscribed, Knockapi::Internal::Type::Boolean, nil?: true
|
|
44
|
+
|
|
30
45
|
# @!attribute workflows
|
|
31
46
|
# An object where the key is the workflow key and the values are the preference
|
|
32
47
|
# settings for that workflow.
|
|
@@ -38,7 +53,7 @@ module Knockapi
|
|
|
38
53
|
},
|
|
39
54
|
nil?: true
|
|
40
55
|
|
|
41
|
-
# @!method initialize(id:, categories: nil, channel_types: nil, workflows: nil)
|
|
56
|
+
# @!method initialize(id:, categories: nil, channel_types: nil, channels: nil, commercial_subscribed: nil, workflows: nil)
|
|
42
57
|
# Some parameter documentations has been truncated, see
|
|
43
58
|
# {Knockapi::Models::Recipients::PreferenceSet} for more details.
|
|
44
59
|
#
|
|
@@ -51,6 +66,10 @@ module Knockapi
|
|
|
51
66
|
#
|
|
52
67
|
# @param channel_types [Knockapi::Models::Recipients::PreferenceSetChannelTypes, nil] Channel type preferences.
|
|
53
68
|
#
|
|
69
|
+
# @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSet::Channel::PreferenceSetChannelSetting}, nil] Channel preferences.
|
|
70
|
+
#
|
|
71
|
+
# @param commercial_subscribed [Boolean, nil] Whether the recipient is subscribed to commercial communications. When false, th
|
|
72
|
+
#
|
|
54
73
|
# @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
|
|
55
74
|
|
|
56
75
|
# Workflow or category preferences within a preference set
|
|
@@ -69,25 +88,93 @@ module Knockapi
|
|
|
69
88
|
# @return [Knockapi::Models::Recipients::PreferenceSetChannelTypes, nil]
|
|
70
89
|
optional :channel_types, -> { Knockapi::Recipients::PreferenceSetChannelTypes }, nil?: true
|
|
71
90
|
|
|
91
|
+
# @!attribute channels
|
|
92
|
+
# Channel preferences.
|
|
93
|
+
#
|
|
94
|
+
# @return [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSet::Category::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting}, nil]
|
|
95
|
+
optional :channels,
|
|
96
|
+
-> {
|
|
97
|
+
Knockapi::Internal::Type::HashOf[union: Knockapi::Recipients::PreferenceSet::Category::PreferenceSetWorkflowCategorySettingObject::Channel]
|
|
98
|
+
},
|
|
99
|
+
nil?: true
|
|
100
|
+
|
|
72
101
|
# @!attribute conditions
|
|
73
102
|
# A list of conditions to apply to a channel type.
|
|
74
103
|
#
|
|
75
104
|
# @return [Array<Knockapi::Models::Condition>, nil]
|
|
76
105
|
optional :conditions, -> { Knockapi::Internal::Type::ArrayOf[Knockapi::Condition] }, nil?: true
|
|
77
106
|
|
|
78
|
-
# @!method initialize(channel_types: nil, conditions: nil)
|
|
107
|
+
# @!method initialize(channel_types: nil, channels: nil, conditions: nil)
|
|
79
108
|
# The settings object for a workflow or category, where you can specify channel
|
|
80
109
|
# types or conditions.
|
|
81
110
|
#
|
|
82
111
|
# @param channel_types [Knockapi::Models::Recipients::PreferenceSetChannelTypes, nil] Channel type preferences.
|
|
83
112
|
#
|
|
113
|
+
# @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSet::Category::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting}, nil] Channel preferences.
|
|
114
|
+
#
|
|
84
115
|
# @param conditions [Array<Knockapi::Models::Condition>, nil] A list of conditions to apply to a channel type.
|
|
116
|
+
|
|
117
|
+
# Whether the specific channel (by channel_id) is enabled for the preference set,
|
|
118
|
+
# or a settings object with conditions.
|
|
119
|
+
module Channel
|
|
120
|
+
extend Knockapi::Internal::Type::Union
|
|
121
|
+
|
|
122
|
+
variant Knockapi::Internal::Type::Boolean
|
|
123
|
+
|
|
124
|
+
# A set of settings for a specific channel. Currently, this can only be a list of conditions to apply.
|
|
125
|
+
variant -> { Knockapi::Recipients::PreferenceSet::Category::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting }
|
|
126
|
+
|
|
127
|
+
class PreferenceSetChannelSetting < Knockapi::Internal::Type::BaseModel
|
|
128
|
+
# @!attribute conditions
|
|
129
|
+
# A list of conditions to apply to a specific channel.
|
|
130
|
+
#
|
|
131
|
+
# @return [Array<Knockapi::Models::Condition>]
|
|
132
|
+
required :conditions, -> { Knockapi::Internal::Type::ArrayOf[Knockapi::Condition] }
|
|
133
|
+
|
|
134
|
+
# @!method initialize(conditions:)
|
|
135
|
+
# A set of settings for a specific channel. Currently, this can only be a list of
|
|
136
|
+
# conditions to apply.
|
|
137
|
+
#
|
|
138
|
+
# @param conditions [Array<Knockapi::Models::Condition>] A list of conditions to apply to a specific channel.
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# @!method self.variants
|
|
142
|
+
# @return [Array(Boolean, Knockapi::Models::Recipients::PreferenceSet::Category::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting)]
|
|
143
|
+
end
|
|
85
144
|
end
|
|
86
145
|
|
|
87
146
|
# @!method self.variants
|
|
88
147
|
# @return [Array(Boolean, Knockapi::Models::Recipients::PreferenceSet::Category::PreferenceSetWorkflowCategorySettingObject)]
|
|
89
148
|
end
|
|
90
149
|
|
|
150
|
+
# Whether the specific channel (by channel_id) is enabled for the preference set,
|
|
151
|
+
# or a settings object with conditions.
|
|
152
|
+
module Channel
|
|
153
|
+
extend Knockapi::Internal::Type::Union
|
|
154
|
+
|
|
155
|
+
variant Knockapi::Internal::Type::Boolean
|
|
156
|
+
|
|
157
|
+
# A set of settings for a specific channel. Currently, this can only be a list of conditions to apply.
|
|
158
|
+
variant -> { Knockapi::Recipients::PreferenceSet::Channel::PreferenceSetChannelSetting }
|
|
159
|
+
|
|
160
|
+
class PreferenceSetChannelSetting < Knockapi::Internal::Type::BaseModel
|
|
161
|
+
# @!attribute conditions
|
|
162
|
+
# A list of conditions to apply to a specific channel.
|
|
163
|
+
#
|
|
164
|
+
# @return [Array<Knockapi::Models::Condition>]
|
|
165
|
+
required :conditions, -> { Knockapi::Internal::Type::ArrayOf[Knockapi::Condition] }
|
|
166
|
+
|
|
167
|
+
# @!method initialize(conditions:)
|
|
168
|
+
# A set of settings for a specific channel. Currently, this can only be a list of
|
|
169
|
+
# conditions to apply.
|
|
170
|
+
#
|
|
171
|
+
# @param conditions [Array<Knockapi::Models::Condition>] A list of conditions to apply to a specific channel.
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# @!method self.variants
|
|
175
|
+
# @return [Array(Boolean, Knockapi::Models::Recipients::PreferenceSet::Channel::PreferenceSetChannelSetting)]
|
|
176
|
+
end
|
|
177
|
+
|
|
91
178
|
# Workflow or category preferences within a preference set
|
|
92
179
|
module Workflow
|
|
93
180
|
extend Knockapi::Internal::Type::Union
|
|
@@ -104,19 +191,59 @@ module Knockapi
|
|
|
104
191
|
# @return [Knockapi::Models::Recipients::PreferenceSetChannelTypes, nil]
|
|
105
192
|
optional :channel_types, -> { Knockapi::Recipients::PreferenceSetChannelTypes }, nil?: true
|
|
106
193
|
|
|
194
|
+
# @!attribute channels
|
|
195
|
+
# Channel preferences.
|
|
196
|
+
#
|
|
197
|
+
# @return [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSet::Workflow::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting}, nil]
|
|
198
|
+
optional :channels,
|
|
199
|
+
-> {
|
|
200
|
+
Knockapi::Internal::Type::HashOf[union: Knockapi::Recipients::PreferenceSet::Workflow::PreferenceSetWorkflowCategorySettingObject::Channel]
|
|
201
|
+
},
|
|
202
|
+
nil?: true
|
|
203
|
+
|
|
107
204
|
# @!attribute conditions
|
|
108
205
|
# A list of conditions to apply to a channel type.
|
|
109
206
|
#
|
|
110
207
|
# @return [Array<Knockapi::Models::Condition>, nil]
|
|
111
208
|
optional :conditions, -> { Knockapi::Internal::Type::ArrayOf[Knockapi::Condition] }, nil?: true
|
|
112
209
|
|
|
113
|
-
# @!method initialize(channel_types: nil, conditions: nil)
|
|
210
|
+
# @!method initialize(channel_types: nil, channels: nil, conditions: nil)
|
|
114
211
|
# The settings object for a workflow or category, where you can specify channel
|
|
115
212
|
# types or conditions.
|
|
116
213
|
#
|
|
117
214
|
# @param channel_types [Knockapi::Models::Recipients::PreferenceSetChannelTypes, nil] Channel type preferences.
|
|
118
215
|
#
|
|
216
|
+
# @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSet::Workflow::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting}, nil] Channel preferences.
|
|
217
|
+
#
|
|
119
218
|
# @param conditions [Array<Knockapi::Models::Condition>, nil] A list of conditions to apply to a channel type.
|
|
219
|
+
|
|
220
|
+
# Whether the specific channel (by channel_id) is enabled for the preference set,
|
|
221
|
+
# or a settings object with conditions.
|
|
222
|
+
module Channel
|
|
223
|
+
extend Knockapi::Internal::Type::Union
|
|
224
|
+
|
|
225
|
+
variant Knockapi::Internal::Type::Boolean
|
|
226
|
+
|
|
227
|
+
# A set of settings for a specific channel. Currently, this can only be a list of conditions to apply.
|
|
228
|
+
variant -> { Knockapi::Recipients::PreferenceSet::Workflow::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting }
|
|
229
|
+
|
|
230
|
+
class PreferenceSetChannelSetting < Knockapi::Internal::Type::BaseModel
|
|
231
|
+
# @!attribute conditions
|
|
232
|
+
# A list of conditions to apply to a specific channel.
|
|
233
|
+
#
|
|
234
|
+
# @return [Array<Knockapi::Models::Condition>]
|
|
235
|
+
required :conditions, -> { Knockapi::Internal::Type::ArrayOf[Knockapi::Condition] }
|
|
236
|
+
|
|
237
|
+
# @!method initialize(conditions:)
|
|
238
|
+
# A set of settings for a specific channel. Currently, this can only be a list of
|
|
239
|
+
# conditions to apply.
|
|
240
|
+
#
|
|
241
|
+
# @param conditions [Array<Knockapi::Models::Condition>] A list of conditions to apply to a specific channel.
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# @!method self.variants
|
|
245
|
+
# @return [Array(Boolean, Knockapi::Models::Recipients::PreferenceSet::Workflow::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting)]
|
|
246
|
+
end
|
|
120
247
|
end
|
|
121
248
|
|
|
122
249
|
# @!method self.variants
|
|
@@ -30,6 +30,23 @@ module Knockapi
|
|
|
30
30
|
# @return [Knockapi::Models::Recipients::PreferenceSetChannelTypes, nil]
|
|
31
31
|
optional :channel_types, -> { Knockapi::Recipients::PreferenceSetChannelTypes }, nil?: true
|
|
32
32
|
|
|
33
|
+
# @!attribute channels
|
|
34
|
+
# Channel preferences.
|
|
35
|
+
#
|
|
36
|
+
# @return [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetRequest::Channel::PreferenceSetChannelSetting}, nil]
|
|
37
|
+
optional :channels,
|
|
38
|
+
-> {
|
|
39
|
+
Knockapi::Internal::Type::HashOf[union: Knockapi::Recipients::PreferenceSetRequest::Channel]
|
|
40
|
+
},
|
|
41
|
+
nil?: true
|
|
42
|
+
|
|
43
|
+
# @!attribute commercial_subscribed
|
|
44
|
+
# Whether the recipient is subscribed to commercial communications. When false,
|
|
45
|
+
# the recipient will not receive commercial workflow notifications.
|
|
46
|
+
#
|
|
47
|
+
# @return [Boolean, nil]
|
|
48
|
+
optional :commercial_subscribed, Knockapi::Internal::Type::Boolean, nil?: true
|
|
49
|
+
|
|
33
50
|
# @!attribute workflows
|
|
34
51
|
# An object where the key is the workflow key and the values are the preference
|
|
35
52
|
# settings for that workflow.
|
|
@@ -41,7 +58,7 @@ module Knockapi
|
|
|
41
58
|
},
|
|
42
59
|
nil?: true
|
|
43
60
|
|
|
44
|
-
# @!method initialize(_persistence_strategy: nil, categories: nil, channel_types: nil, workflows: nil)
|
|
61
|
+
# @!method initialize(_persistence_strategy: nil, categories: nil, channel_types: nil, channels: nil, commercial_subscribed: nil, workflows: nil)
|
|
45
62
|
# Some parameter documentations has been truncated, see
|
|
46
63
|
# {Knockapi::Models::Recipients::PreferenceSetRequest} for more details.
|
|
47
64
|
#
|
|
@@ -53,6 +70,10 @@ module Knockapi
|
|
|
53
70
|
#
|
|
54
71
|
# @param channel_types [Knockapi::Models::Recipients::PreferenceSetChannelTypes, nil] Channel type preferences.
|
|
55
72
|
#
|
|
73
|
+
# @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetRequest::Channel::PreferenceSetChannelSetting}, nil] Channel preferences.
|
|
74
|
+
#
|
|
75
|
+
# @param commercial_subscribed [Boolean, nil] Whether the recipient is subscribed to commercial communications. When false, th
|
|
76
|
+
#
|
|
56
77
|
# @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
|
|
57
78
|
|
|
58
79
|
# Controls how the preference set is persisted. 'replace' will completely replace
|
|
@@ -85,25 +106,95 @@ module Knockapi
|
|
|
85
106
|
# @return [Knockapi::Models::Recipients::PreferenceSetChannelTypes, nil]
|
|
86
107
|
optional :channel_types, -> { Knockapi::Recipients::PreferenceSetChannelTypes }, nil?: true
|
|
87
108
|
|
|
109
|
+
# @!attribute channels
|
|
110
|
+
# Channel preferences.
|
|
111
|
+
#
|
|
112
|
+
# @return [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetRequest::Category::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting}, nil]
|
|
113
|
+
optional :channels,
|
|
114
|
+
-> do
|
|
115
|
+
Knockapi::Internal::Type::HashOf[
|
|
116
|
+
union: Knockapi::Recipients::PreferenceSetRequest::Category::PreferenceSetWorkflowCategorySettingObject::Channel
|
|
117
|
+
]
|
|
118
|
+
end,
|
|
119
|
+
nil?: true
|
|
120
|
+
|
|
88
121
|
# @!attribute conditions
|
|
89
122
|
# A list of conditions to apply to a channel type.
|
|
90
123
|
#
|
|
91
124
|
# @return [Array<Knockapi::Models::Condition>, nil]
|
|
92
125
|
optional :conditions, -> { Knockapi::Internal::Type::ArrayOf[Knockapi::Condition] }, nil?: true
|
|
93
126
|
|
|
94
|
-
# @!method initialize(channel_types: nil, conditions: nil)
|
|
127
|
+
# @!method initialize(channel_types: nil, channels: nil, conditions: nil)
|
|
95
128
|
# The settings object for a workflow or category, where you can specify channel
|
|
96
129
|
# types or conditions.
|
|
97
130
|
#
|
|
98
131
|
# @param channel_types [Knockapi::Models::Recipients::PreferenceSetChannelTypes, nil] Channel type preferences.
|
|
99
132
|
#
|
|
133
|
+
# @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetRequest::Category::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting}, nil] Channel preferences.
|
|
134
|
+
#
|
|
100
135
|
# @param conditions [Array<Knockapi::Models::Condition>, nil] A list of conditions to apply to a channel type.
|
|
136
|
+
|
|
137
|
+
# Whether the specific channel (by channel_id) is enabled for the preference set,
|
|
138
|
+
# or a settings object with conditions.
|
|
139
|
+
module Channel
|
|
140
|
+
extend Knockapi::Internal::Type::Union
|
|
141
|
+
|
|
142
|
+
variant Knockapi::Internal::Type::Boolean
|
|
143
|
+
|
|
144
|
+
# A set of settings for a specific channel. Currently, this can only be a list of conditions to apply.
|
|
145
|
+
variant -> { Knockapi::Recipients::PreferenceSetRequest::Category::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting }
|
|
146
|
+
|
|
147
|
+
class PreferenceSetChannelSetting < Knockapi::Internal::Type::BaseModel
|
|
148
|
+
# @!attribute conditions
|
|
149
|
+
# A list of conditions to apply to a specific channel.
|
|
150
|
+
#
|
|
151
|
+
# @return [Array<Knockapi::Models::Condition>]
|
|
152
|
+
required :conditions, -> { Knockapi::Internal::Type::ArrayOf[Knockapi::Condition] }
|
|
153
|
+
|
|
154
|
+
# @!method initialize(conditions:)
|
|
155
|
+
# A set of settings for a specific channel. Currently, this can only be a list of
|
|
156
|
+
# conditions to apply.
|
|
157
|
+
#
|
|
158
|
+
# @param conditions [Array<Knockapi::Models::Condition>] A list of conditions to apply to a specific channel.
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# @!method self.variants
|
|
162
|
+
# @return [Array(Boolean, Knockapi::Models::Recipients::PreferenceSetRequest::Category::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting)]
|
|
163
|
+
end
|
|
101
164
|
end
|
|
102
165
|
|
|
103
166
|
# @!method self.variants
|
|
104
167
|
# @return [Array(Boolean, Knockapi::Models::Recipients::PreferenceSetRequest::Category::PreferenceSetWorkflowCategorySettingObject)]
|
|
105
168
|
end
|
|
106
169
|
|
|
170
|
+
# Whether the specific channel (by channel_id) is enabled for the preference set,
|
|
171
|
+
# or a settings object with conditions.
|
|
172
|
+
module Channel
|
|
173
|
+
extend Knockapi::Internal::Type::Union
|
|
174
|
+
|
|
175
|
+
variant Knockapi::Internal::Type::Boolean
|
|
176
|
+
|
|
177
|
+
# A set of settings for a specific channel. Currently, this can only be a list of conditions to apply.
|
|
178
|
+
variant -> { Knockapi::Recipients::PreferenceSetRequest::Channel::PreferenceSetChannelSetting }
|
|
179
|
+
|
|
180
|
+
class PreferenceSetChannelSetting < Knockapi::Internal::Type::BaseModel
|
|
181
|
+
# @!attribute conditions
|
|
182
|
+
# A list of conditions to apply to a specific channel.
|
|
183
|
+
#
|
|
184
|
+
# @return [Array<Knockapi::Models::Condition>]
|
|
185
|
+
required :conditions, -> { Knockapi::Internal::Type::ArrayOf[Knockapi::Condition] }
|
|
186
|
+
|
|
187
|
+
# @!method initialize(conditions:)
|
|
188
|
+
# A set of settings for a specific channel. Currently, this can only be a list of
|
|
189
|
+
# conditions to apply.
|
|
190
|
+
#
|
|
191
|
+
# @param conditions [Array<Knockapi::Models::Condition>] A list of conditions to apply to a specific channel.
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# @!method self.variants
|
|
195
|
+
# @return [Array(Boolean, Knockapi::Models::Recipients::PreferenceSetRequest::Channel::PreferenceSetChannelSetting)]
|
|
196
|
+
end
|
|
197
|
+
|
|
107
198
|
# Workflow or category preferences within a preference set
|
|
108
199
|
module Workflow
|
|
109
200
|
extend Knockapi::Internal::Type::Union
|
|
@@ -120,19 +211,61 @@ module Knockapi
|
|
|
120
211
|
# @return [Knockapi::Models::Recipients::PreferenceSetChannelTypes, nil]
|
|
121
212
|
optional :channel_types, -> { Knockapi::Recipients::PreferenceSetChannelTypes }, nil?: true
|
|
122
213
|
|
|
214
|
+
# @!attribute channels
|
|
215
|
+
# Channel preferences.
|
|
216
|
+
#
|
|
217
|
+
# @return [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetRequest::Workflow::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting}, nil]
|
|
218
|
+
optional :channels,
|
|
219
|
+
-> do
|
|
220
|
+
Knockapi::Internal::Type::HashOf[
|
|
221
|
+
union: Knockapi::Recipients::PreferenceSetRequest::Workflow::PreferenceSetWorkflowCategorySettingObject::Channel
|
|
222
|
+
]
|
|
223
|
+
end,
|
|
224
|
+
nil?: true
|
|
225
|
+
|
|
123
226
|
# @!attribute conditions
|
|
124
227
|
# A list of conditions to apply to a channel type.
|
|
125
228
|
#
|
|
126
229
|
# @return [Array<Knockapi::Models::Condition>, nil]
|
|
127
230
|
optional :conditions, -> { Knockapi::Internal::Type::ArrayOf[Knockapi::Condition] }, nil?: true
|
|
128
231
|
|
|
129
|
-
# @!method initialize(channel_types: nil, conditions: nil)
|
|
232
|
+
# @!method initialize(channel_types: nil, channels: nil, conditions: nil)
|
|
130
233
|
# The settings object for a workflow or category, where you can specify channel
|
|
131
234
|
# types or conditions.
|
|
132
235
|
#
|
|
133
236
|
# @param channel_types [Knockapi::Models::Recipients::PreferenceSetChannelTypes, nil] Channel type preferences.
|
|
134
237
|
#
|
|
238
|
+
# @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetRequest::Workflow::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting}, nil] Channel preferences.
|
|
239
|
+
#
|
|
135
240
|
# @param conditions [Array<Knockapi::Models::Condition>, nil] A list of conditions to apply to a channel type.
|
|
241
|
+
|
|
242
|
+
# Whether the specific channel (by channel_id) is enabled for the preference set,
|
|
243
|
+
# or a settings object with conditions.
|
|
244
|
+
module Channel
|
|
245
|
+
extend Knockapi::Internal::Type::Union
|
|
246
|
+
|
|
247
|
+
variant Knockapi::Internal::Type::Boolean
|
|
248
|
+
|
|
249
|
+
# A set of settings for a specific channel. Currently, this can only be a list of conditions to apply.
|
|
250
|
+
variant -> { Knockapi::Recipients::PreferenceSetRequest::Workflow::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting }
|
|
251
|
+
|
|
252
|
+
class PreferenceSetChannelSetting < Knockapi::Internal::Type::BaseModel
|
|
253
|
+
# @!attribute conditions
|
|
254
|
+
# A list of conditions to apply to a specific channel.
|
|
255
|
+
#
|
|
256
|
+
# @return [Array<Knockapi::Models::Condition>]
|
|
257
|
+
required :conditions, -> { Knockapi::Internal::Type::ArrayOf[Knockapi::Condition] }
|
|
258
|
+
|
|
259
|
+
# @!method initialize(conditions:)
|
|
260
|
+
# A set of settings for a specific channel. Currently, this can only be a list of
|
|
261
|
+
# conditions to apply.
|
|
262
|
+
#
|
|
263
|
+
# @param conditions [Array<Knockapi::Models::Condition>] A list of conditions to apply to a specific channel.
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# @!method self.variants
|
|
267
|
+
# @return [Array(Boolean, Knockapi::Models::Recipients::PreferenceSetRequest::Workflow::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting)]
|
|
268
|
+
end
|
|
136
269
|
end
|
|
137
270
|
|
|
138
271
|
# @!method self.variants
|
|
@@ -12,7 +12,7 @@ module Knockapi
|
|
|
12
12
|
# @!attribute channel_data
|
|
13
13
|
# A request to set channel data for a type of channel inline.
|
|
14
14
|
#
|
|
15
|
-
# @return [Hash{Symbol=>Knockapi::Models::Recipients::
|
|
15
|
+
# @return [Hash{Symbol=>Knockapi::Models::Recipients::InlineChannelDataRequestItem::PushChannelDataTokensOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::PushChannelDataDevicesOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataTargetArNsOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataDevicesOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::OneSignalChannelDataPlayerIDsOnly, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData}, nil]
|
|
16
16
|
optional :channel_data,
|
|
17
17
|
-> {
|
|
18
18
|
Knockapi::Internal::Type::HashOf[union: Knockapi::Recipients::InlineChannelDataRequestItem]
|
|
@@ -44,7 +44,7 @@ module Knockapi
|
|
|
44
44
|
#
|
|
45
45
|
# @param id [String] The unique identifier for the tenant.
|
|
46
46
|
#
|
|
47
|
-
# @param channel_data [Hash{Symbol=>Knockapi::Models::Recipients::
|
|
47
|
+
# @param channel_data [Hash{Symbol=>Knockapi::Models::Recipients::InlineChannelDataRequestItem::PushChannelDataTokensOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::PushChannelDataDevicesOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataTargetArNsOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataDevicesOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::OneSignalChannelDataPlayerIDsOnly, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData}, nil] A request to set channel data for a type of channel inline.
|
|
48
48
|
#
|
|
49
49
|
# @param preferences [Hash{Symbol=>Knockapi::Models::Recipients::PreferenceSetRequest}, nil] Inline set preferences for a recipient, where the key is the preference set id.
|
|
50
50
|
#
|
|
@@ -10,7 +10,7 @@ module Knockapi
|
|
|
10
10
|
# @!attribute channel_data
|
|
11
11
|
# A request to set channel data for a type of channel inline.
|
|
12
12
|
#
|
|
13
|
-
# @return [Hash{Symbol=>Knockapi::Models::Recipients::
|
|
13
|
+
# @return [Hash{Symbol=>Knockapi::Models::Recipients::InlineChannelDataRequestItem::PushChannelDataTokensOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::PushChannelDataDevicesOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataTargetArNsOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataDevicesOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::OneSignalChannelDataPlayerIDsOnly, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData}, nil]
|
|
14
14
|
optional :channel_data,
|
|
15
15
|
-> {
|
|
16
16
|
Knockapi::Internal::Type::HashOf[union: Knockapi::Recipients::InlineChannelDataRequestItem]
|
|
@@ -24,7 +24,7 @@ module Knockapi
|
|
|
24
24
|
optional :settings, -> { Knockapi::TenantSetParams::Settings }
|
|
25
25
|
|
|
26
26
|
# @!method initialize(channel_data: nil, settings: nil, request_options: {})
|
|
27
|
-
# @param channel_data [Hash{Symbol=>Knockapi::Models::Recipients::
|
|
27
|
+
# @param channel_data [Hash{Symbol=>Knockapi::Models::Recipients::InlineChannelDataRequestItem::PushChannelDataTokensOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::PushChannelDataDevicesOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataTargetArNsOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataDevicesOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::OneSignalChannelDataPlayerIDsOnly, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData}, nil] A request to set channel data for a type of channel inline.
|
|
28
28
|
#
|
|
29
29
|
# @param settings [Knockapi::Models::TenantSetParams::Settings] The settings for the tenant. Includes branding and preference set.
|
|
30
30
|
#
|