knockapi 1.16.0 → 1.17.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 +26 -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 +36 -10
- data/lib/knockapi/models/recipients/inline_channel_data_request.rb +34 -8
- 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 +9 -9
- data/rbi/knockapi/models/inline_identify_user_request.rbi +9 -9
- data/rbi/knockapi/models/inline_object_request.rbi +9 -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 +12 -12
- data/rbi/knockapi/models/objects/bulk_set_params.rbi +9 -9
- data/rbi/knockapi/models/recipients/channel_data.rbi +250 -12
- data/rbi/knockapi/models/recipients/channel_data_request.rbi +68 -14
- data/rbi/knockapi/models/recipients/inline_channel_data_request.rbi +57 -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 +9 -9
- data/rbi/knockapi/models/tenant_set_params.rbi +9 -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 +22 -6
- data/rbi/knockapi/resources/tenants.rbi +3 -3
- data/rbi/knockapi/resources/users.rbi +22 -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 +27 -5
- data/sig/knockapi/models/recipients/inline_channel_data_request.rbs +27 -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
|
@@ -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::AwssnsPushChannelDataTargetArNsOnly, 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::AwssnsPushChannelDataTargetArNsOnly, 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::AwssnsPushChannelDataTargetArNsOnly, 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::AwssnsPushChannelDataTargetArNsOnly, 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
|
#
|
|
@@ -5,81 +5,317 @@ module Knockapi
|
|
|
5
5
|
module Users
|
|
6
6
|
# @see Knockapi::Resources::Users::Guides#get_channel
|
|
7
7
|
class GuideGetChannelResponse < Knockapi::Internal::Type::BaseModel
|
|
8
|
-
# @!attribute
|
|
8
|
+
# @!attribute entries
|
|
9
9
|
# A list of guides.
|
|
10
10
|
#
|
|
11
|
-
# @return [Array<Knockapi::Models::Users::GuideGetChannelResponse::
|
|
12
|
-
required :
|
|
13
|
-
-> { Knockapi::Internal::Type::ArrayOf[Knockapi::Models::Users::GuideGetChannelResponse::
|
|
11
|
+
# @return [Array<Knockapi::Models::Users::GuideGetChannelResponse::Entry>]
|
|
12
|
+
required :entries,
|
|
13
|
+
-> { Knockapi::Internal::Type::ArrayOf[Knockapi::Models::Users::GuideGetChannelResponse::Entry] }
|
|
14
14
|
|
|
15
|
-
# @!attribute
|
|
16
|
-
#
|
|
15
|
+
# @!attribute guide_group_display_logs
|
|
16
|
+
# A map of guide group keys to their last display timestamps.
|
|
17
17
|
#
|
|
18
|
-
# @return [
|
|
19
|
-
|
|
18
|
+
# @return [Hash{Symbol=>Time}]
|
|
19
|
+
required :guide_group_display_logs, Knockapi::Internal::Type::HashOf[Time]
|
|
20
20
|
|
|
21
|
-
# @!
|
|
21
|
+
# @!attribute guide_groups
|
|
22
|
+
# A list of guide groups with their display sequences and intervals.
|
|
23
|
+
#
|
|
24
|
+
# @return [Array<Knockapi::Models::Users::GuideGetChannelResponse::GuideGroup>]
|
|
25
|
+
required :guide_groups,
|
|
26
|
+
-> { Knockapi::Internal::Type::ArrayOf[Knockapi::Models::Users::GuideGetChannelResponse::GuideGroup] }
|
|
27
|
+
|
|
28
|
+
# @!method initialize(entries:, guide_group_display_logs:, guide_groups:)
|
|
22
29
|
# A response for a list of guides.
|
|
23
30
|
#
|
|
24
|
-
# @param
|
|
31
|
+
# @param entries [Array<Knockapi::Models::Users::GuideGetChannelResponse::Entry>] A list of guides.
|
|
32
|
+
#
|
|
33
|
+
# @param guide_group_display_logs [Hash{Symbol=>Time}] A map of guide group keys to their last display timestamps.
|
|
25
34
|
#
|
|
26
|
-
# @param
|
|
35
|
+
# @param guide_groups [Array<Knockapi::Models::Users::GuideGetChannelResponse::GuideGroup>] A list of guide groups with their display sequences and intervals.
|
|
27
36
|
|
|
28
|
-
class
|
|
37
|
+
class Entry < Knockapi::Internal::Type::BaseModel
|
|
29
38
|
# @!attribute id
|
|
30
39
|
# The unique identifier for the guide.
|
|
31
40
|
#
|
|
32
41
|
# @return [String, nil]
|
|
33
42
|
optional :id, String
|
|
34
43
|
|
|
44
|
+
# @!attribute _typename
|
|
45
|
+
# The typename of the schema.
|
|
46
|
+
#
|
|
47
|
+
# @return [String, nil]
|
|
48
|
+
optional :_typename, String, api_name: :__typename
|
|
49
|
+
|
|
50
|
+
# @!attribute activation_url_patterns
|
|
51
|
+
# A list of URL Patterns to evaluate user's current location to activate the
|
|
52
|
+
# guide, if matched
|
|
53
|
+
#
|
|
54
|
+
# @return [Array<Knockapi::Models::Users::GuideGetChannelResponse::Entry::ActivationURLPattern>, nil]
|
|
55
|
+
optional :activation_url_patterns,
|
|
56
|
+
-> { Knockapi::Internal::Type::ArrayOf[Knockapi::Models::Users::GuideGetChannelResponse::Entry::ActivationURLPattern] }
|
|
57
|
+
|
|
58
|
+
# @!attribute activation_url_rules
|
|
59
|
+
# A list of URL rules to evaluate user's current location to activate the guide,
|
|
60
|
+
# if matched
|
|
61
|
+
#
|
|
62
|
+
# @return [Array<Knockapi::Models::Users::GuideGetChannelResponse::Entry::ActivationURLRule>, nil]
|
|
63
|
+
optional :activation_url_rules,
|
|
64
|
+
-> { Knockapi::Internal::Type::ArrayOf[Knockapi::Models::Users::GuideGetChannelResponse::Entry::ActivationURLRule] }
|
|
65
|
+
|
|
35
66
|
# @!attribute active
|
|
36
67
|
# Whether the guide is active.
|
|
37
68
|
#
|
|
38
69
|
# @return [Boolean, nil]
|
|
39
70
|
optional :active, Knockapi::Internal::Type::Boolean
|
|
40
71
|
|
|
41
|
-
# @!attribute
|
|
42
|
-
#
|
|
72
|
+
# @!attribute bypass_global_group_limit
|
|
73
|
+
#
|
|
74
|
+
# @return [Boolean, nil]
|
|
75
|
+
optional :bypass_global_group_limit, Knockapi::Internal::Type::Boolean
|
|
76
|
+
|
|
77
|
+
# @!attribute channel_id
|
|
43
78
|
#
|
|
44
79
|
# @return [String, nil]
|
|
45
|
-
optional :
|
|
80
|
+
optional :channel_id, String
|
|
46
81
|
|
|
47
|
-
# @!attribute
|
|
48
|
-
# The metadata of the guide.
|
|
82
|
+
# @!attribute inserted_at
|
|
49
83
|
#
|
|
50
|
-
# @return [
|
|
51
|
-
optional :
|
|
84
|
+
# @return [Time, nil]
|
|
85
|
+
optional :inserted_at, Time
|
|
52
86
|
|
|
53
|
-
# @!attribute
|
|
54
|
-
# The
|
|
87
|
+
# @!attribute key
|
|
88
|
+
# The key of the guide.
|
|
55
89
|
#
|
|
56
90
|
# @return [String, nil]
|
|
57
|
-
optional :
|
|
91
|
+
optional :key, String
|
|
58
92
|
|
|
59
|
-
# @!
|
|
93
|
+
# @!attribute semver
|
|
94
|
+
#
|
|
95
|
+
# @return [String, nil]
|
|
96
|
+
optional :semver, String
|
|
97
|
+
|
|
98
|
+
# @!attribute steps
|
|
99
|
+
#
|
|
100
|
+
# @return [Array<Knockapi::Models::Users::GuideGetChannelResponse::Entry::Step>, nil]
|
|
101
|
+
optional :steps,
|
|
102
|
+
-> { Knockapi::Internal::Type::ArrayOf[Knockapi::Models::Users::GuideGetChannelResponse::Entry::Step] }
|
|
103
|
+
|
|
104
|
+
# @!attribute type
|
|
105
|
+
# The type of the guide.
|
|
106
|
+
#
|
|
107
|
+
# @return [String, nil]
|
|
108
|
+
optional :type, String
|
|
109
|
+
|
|
110
|
+
# @!attribute updated_at
|
|
111
|
+
#
|
|
112
|
+
# @return [Time, nil]
|
|
113
|
+
optional :updated_at, Time
|
|
114
|
+
|
|
115
|
+
# @!method initialize(id: nil, _typename: nil, activation_url_patterns: nil, activation_url_rules: nil, active: nil, bypass_global_group_limit: nil, channel_id: nil, inserted_at: nil, key: nil, semver: nil, steps: nil, type: nil, updated_at: nil)
|
|
116
|
+
# Some parameter documentations has been truncated, see
|
|
117
|
+
# {Knockapi::Models::Users::GuideGetChannelResponse::Entry} for more details.
|
|
118
|
+
#
|
|
60
119
|
# @param id [String] The unique identifier for the guide.
|
|
61
120
|
#
|
|
121
|
+
# @param _typename [String] The typename of the schema.
|
|
122
|
+
#
|
|
123
|
+
# @param activation_url_patterns [Array<Knockapi::Models::Users::GuideGetChannelResponse::Entry::ActivationURLPattern>] A list of URL Patterns to evaluate user's current location to activate the guide
|
|
124
|
+
#
|
|
125
|
+
# @param activation_url_rules [Array<Knockapi::Models::Users::GuideGetChannelResponse::Entry::ActivationURLRule>] A list of URL rules to evaluate user's current location to activate the guide, i
|
|
126
|
+
#
|
|
62
127
|
# @param active [Boolean] Whether the guide is active.
|
|
63
128
|
#
|
|
64
|
-
# @param
|
|
129
|
+
# @param bypass_global_group_limit [Boolean]
|
|
130
|
+
#
|
|
131
|
+
# @param channel_id [String]
|
|
132
|
+
#
|
|
133
|
+
# @param inserted_at [Time]
|
|
65
134
|
#
|
|
66
|
-
# @param
|
|
135
|
+
# @param key [String] The key of the guide.
|
|
67
136
|
#
|
|
68
|
-
# @param
|
|
137
|
+
# @param semver [String]
|
|
138
|
+
#
|
|
139
|
+
# @param steps [Array<Knockapi::Models::Users::GuideGetChannelResponse::Entry::Step>]
|
|
140
|
+
#
|
|
141
|
+
# @param type [String] The type of the guide.
|
|
142
|
+
#
|
|
143
|
+
# @param updated_at [Time]
|
|
144
|
+
|
|
145
|
+
class ActivationURLPattern < Knockapi::Internal::Type::BaseModel
|
|
146
|
+
# @!attribute directive
|
|
147
|
+
# The directive for the URL pattern ('allow' or 'block')
|
|
148
|
+
#
|
|
149
|
+
# @return [String, nil]
|
|
150
|
+
optional :directive, String
|
|
151
|
+
|
|
152
|
+
# @!attribute pathname
|
|
153
|
+
# The pathname pattern to match (supports wildcards like /\*)
|
|
154
|
+
#
|
|
155
|
+
# @return [String, nil]
|
|
156
|
+
optional :pathname, String
|
|
157
|
+
|
|
158
|
+
# @!method initialize(directive: nil, pathname: nil)
|
|
159
|
+
# @param directive [String] The directive for the URL pattern ('allow' or 'block')
|
|
160
|
+
#
|
|
161
|
+
# @param pathname [String] The pathname pattern to match (supports wildcards like /\*)
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
class ActivationURLRule < Knockapi::Internal::Type::BaseModel
|
|
165
|
+
# @!attribute argument
|
|
166
|
+
# The value to compare against
|
|
167
|
+
#
|
|
168
|
+
# @return [String, nil]
|
|
169
|
+
optional :argument, String
|
|
170
|
+
|
|
171
|
+
# @!attribute directive
|
|
172
|
+
# The directive for the URL pattern ('allow' or 'block')
|
|
173
|
+
#
|
|
174
|
+
# @return [String, nil]
|
|
175
|
+
optional :directive, String
|
|
176
|
+
|
|
177
|
+
# @!attribute operator
|
|
178
|
+
# The comparison operator ('contains' or 'equal_to')
|
|
179
|
+
#
|
|
180
|
+
# @return [String, nil]
|
|
181
|
+
optional :operator, String
|
|
182
|
+
|
|
183
|
+
# @!attribute variable
|
|
184
|
+
# The variable to evaluate ('pathname')
|
|
185
|
+
#
|
|
186
|
+
# @return [String, nil]
|
|
187
|
+
optional :variable, String
|
|
188
|
+
|
|
189
|
+
# @!method initialize(argument: nil, directive: nil, operator: nil, variable: nil)
|
|
190
|
+
# @param argument [String] The value to compare against
|
|
191
|
+
#
|
|
192
|
+
# @param directive [String] The directive for the URL pattern ('allow' or 'block')
|
|
193
|
+
#
|
|
194
|
+
# @param operator [String] The comparison operator ('contains' or 'equal_to')
|
|
195
|
+
#
|
|
196
|
+
# @param variable [String] The variable to evaluate ('pathname')
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
class Step < Knockapi::Internal::Type::BaseModel
|
|
200
|
+
# @!attribute content
|
|
201
|
+
#
|
|
202
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
203
|
+
optional :content, Knockapi::Internal::Type::HashOf[Knockapi::Internal::Type::Unknown]
|
|
204
|
+
|
|
205
|
+
# @!attribute message
|
|
206
|
+
#
|
|
207
|
+
# @return [Knockapi::Models::Users::GuideGetChannelResponse::Entry::Step::Message, nil]
|
|
208
|
+
optional :message, -> { Knockapi::Models::Users::GuideGetChannelResponse::Entry::Step::Message }
|
|
209
|
+
|
|
210
|
+
# @!attribute ref
|
|
211
|
+
#
|
|
212
|
+
# @return [String, nil]
|
|
213
|
+
optional :ref, String
|
|
214
|
+
|
|
215
|
+
# @!attribute schema_key
|
|
216
|
+
#
|
|
217
|
+
# @return [String, nil]
|
|
218
|
+
optional :schema_key, String
|
|
219
|
+
|
|
220
|
+
# @!attribute schema_semver
|
|
221
|
+
#
|
|
222
|
+
# @return [String, nil]
|
|
223
|
+
optional :schema_semver, String
|
|
224
|
+
|
|
225
|
+
# @!attribute schema_variant_key
|
|
226
|
+
#
|
|
227
|
+
# @return [String, nil]
|
|
228
|
+
optional :schema_variant_key, String
|
|
229
|
+
|
|
230
|
+
# @!method initialize(content: nil, message: nil, ref: nil, schema_key: nil, schema_semver: nil, schema_variant_key: nil)
|
|
231
|
+
# @param content [Hash{Symbol=>Object}]
|
|
232
|
+
# @param message [Knockapi::Models::Users::GuideGetChannelResponse::Entry::Step::Message]
|
|
233
|
+
# @param ref [String]
|
|
234
|
+
# @param schema_key [String]
|
|
235
|
+
# @param schema_semver [String]
|
|
236
|
+
# @param schema_variant_key [String]
|
|
237
|
+
|
|
238
|
+
# @see Knockapi::Models::Users::GuideGetChannelResponse::Entry::Step#message
|
|
239
|
+
class Message < Knockapi::Internal::Type::BaseModel
|
|
240
|
+
# @!attribute id
|
|
241
|
+
#
|
|
242
|
+
# @return [String, nil]
|
|
243
|
+
optional :id, String, nil?: true
|
|
244
|
+
|
|
245
|
+
# @!attribute archived_at
|
|
246
|
+
#
|
|
247
|
+
# @return [Time, nil]
|
|
248
|
+
optional :archived_at, Time, nil?: true
|
|
249
|
+
|
|
250
|
+
# @!attribute interacted_at
|
|
251
|
+
#
|
|
252
|
+
# @return [Time, nil]
|
|
253
|
+
optional :interacted_at, Time, nil?: true
|
|
254
|
+
|
|
255
|
+
# @!attribute link_clicked_at
|
|
256
|
+
#
|
|
257
|
+
# @return [Time, nil]
|
|
258
|
+
optional :link_clicked_at, Time, nil?: true
|
|
259
|
+
|
|
260
|
+
# @!attribute read_at
|
|
261
|
+
#
|
|
262
|
+
# @return [Time, nil]
|
|
263
|
+
optional :read_at, Time, nil?: true
|
|
264
|
+
|
|
265
|
+
# @!attribute seen_at
|
|
266
|
+
#
|
|
267
|
+
# @return [Time, nil]
|
|
268
|
+
optional :seen_at, Time, nil?: true
|
|
269
|
+
|
|
270
|
+
# @!method initialize(id: nil, archived_at: nil, interacted_at: nil, link_clicked_at: nil, read_at: nil, seen_at: nil)
|
|
271
|
+
# @param id [String, nil]
|
|
272
|
+
# @param archived_at [Time, nil]
|
|
273
|
+
# @param interacted_at [Time, nil]
|
|
274
|
+
# @param link_clicked_at [Time, nil]
|
|
275
|
+
# @param read_at [Time, nil]
|
|
276
|
+
# @param seen_at [Time, nil]
|
|
277
|
+
end
|
|
278
|
+
end
|
|
69
279
|
end
|
|
70
280
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
# @!attribute id
|
|
74
|
-
# Unique identifier for the recipient.
|
|
281
|
+
class GuideGroup < Knockapi::Internal::Type::BaseModel
|
|
282
|
+
# @!attribute _typename
|
|
75
283
|
#
|
|
76
284
|
# @return [String, nil]
|
|
77
|
-
optional :
|
|
285
|
+
optional :_typename, String, api_name: :__typename
|
|
286
|
+
|
|
287
|
+
# @!attribute display_interval
|
|
288
|
+
#
|
|
289
|
+
# @return [Integer, nil]
|
|
290
|
+
optional :display_interval, Integer
|
|
78
291
|
|
|
79
|
-
# @!
|
|
80
|
-
# The recipient of the guide.
|
|
292
|
+
# @!attribute display_sequence
|
|
81
293
|
#
|
|
82
|
-
# @
|
|
294
|
+
# @return [Array<String>, nil]
|
|
295
|
+
optional :display_sequence, Knockapi::Internal::Type::ArrayOf[String]
|
|
296
|
+
|
|
297
|
+
# @!attribute inserted_at
|
|
298
|
+
#
|
|
299
|
+
# @return [Time, nil]
|
|
300
|
+
optional :inserted_at, Time
|
|
301
|
+
|
|
302
|
+
# @!attribute key
|
|
303
|
+
#
|
|
304
|
+
# @return [String, nil]
|
|
305
|
+
optional :key, String
|
|
306
|
+
|
|
307
|
+
# @!attribute updated_at
|
|
308
|
+
#
|
|
309
|
+
# @return [Time, nil]
|
|
310
|
+
optional :updated_at, Time
|
|
311
|
+
|
|
312
|
+
# @!method initialize(_typename: nil, display_interval: nil, display_sequence: nil, inserted_at: nil, key: nil, updated_at: nil)
|
|
313
|
+
# @param _typename [String]
|
|
314
|
+
# @param display_interval [Integer]
|
|
315
|
+
# @param display_sequence [Array<String>]
|
|
316
|
+
# @param inserted_at [Time]
|
|
317
|
+
# @param key [String]
|
|
318
|
+
# @param updated_at [Time]
|
|
83
319
|
end
|
|
84
320
|
end
|
|
85
321
|
end
|
|
@@ -22,7 +22,7 @@ module Knockapi
|
|
|
22
22
|
method: :post,
|
|
23
23
|
path: "v1/messages/batch/archived",
|
|
24
24
|
body: parsed,
|
|
25
|
-
model: Knockapi::Internal::Type::ArrayOf[Knockapi::
|
|
25
|
+
model: Knockapi::Internal::Type::ArrayOf[Knockapi::Message],
|
|
26
26
|
options: options
|
|
27
27
|
)
|
|
28
28
|
end
|
|
@@ -72,7 +72,7 @@ module Knockapi
|
|
|
72
72
|
method: :post,
|
|
73
73
|
path: "v1/messages/batch/interacted",
|
|
74
74
|
body: parsed,
|
|
75
|
-
model: Knockapi::Internal::Type::ArrayOf[Knockapi::
|
|
75
|
+
model: Knockapi::Internal::Type::ArrayOf[Knockapi::Message],
|
|
76
76
|
options: options
|
|
77
77
|
)
|
|
78
78
|
end
|
|
@@ -95,7 +95,7 @@ module Knockapi
|
|
|
95
95
|
method: :post,
|
|
96
96
|
path: "v1/messages/batch/read",
|
|
97
97
|
body: parsed,
|
|
98
|
-
model: Knockapi::Internal::Type::ArrayOf[Knockapi::
|
|
98
|
+
model: Knockapi::Internal::Type::ArrayOf[Knockapi::Message],
|
|
99
99
|
options: options
|
|
100
100
|
)
|
|
101
101
|
end
|
|
@@ -119,7 +119,7 @@ module Knockapi
|
|
|
119
119
|
method: :post,
|
|
120
120
|
path: "v1/messages/batch/seen",
|
|
121
121
|
body: parsed,
|
|
122
|
-
model: Knockapi::Internal::Type::ArrayOf[Knockapi::
|
|
122
|
+
model: Knockapi::Internal::Type::ArrayOf[Knockapi::Message],
|
|
123
123
|
options: options
|
|
124
124
|
)
|
|
125
125
|
end
|
|
@@ -143,7 +143,7 @@ module Knockapi
|
|
|
143
143
|
method: :post,
|
|
144
144
|
path: "v1/messages/batch/unread",
|
|
145
145
|
body: parsed,
|
|
146
|
-
model: Knockapi::Internal::Type::ArrayOf[Knockapi::
|
|
146
|
+
model: Knockapi::Internal::Type::ArrayOf[Knockapi::Message],
|
|
147
147
|
options: options
|
|
148
148
|
)
|
|
149
149
|
end
|
|
@@ -167,7 +167,7 @@ module Knockapi
|
|
|
167
167
|
method: :post,
|
|
168
168
|
path: "v1/messages/batch/unseen",
|
|
169
169
|
body: parsed,
|
|
170
|
-
model: Knockapi::Internal::Type::ArrayOf[Knockapi::
|
|
170
|
+
model: Knockapi::Internal::Type::ArrayOf[Knockapi::Message],
|
|
171
171
|
options: options
|
|
172
172
|
)
|
|
173
173
|
end
|
|
@@ -191,7 +191,7 @@ module Knockapi
|
|
|
191
191
|
method: :post,
|
|
192
192
|
path: "v1/messages/batch/unarchived",
|
|
193
193
|
body: parsed,
|
|
194
|
-
model: Knockapi::Internal::Type::ArrayOf[Knockapi::
|
|
194
|
+
model: Knockapi::Internal::Type::ArrayOf[Knockapi::Message],
|
|
195
195
|
options: options
|
|
196
196
|
)
|
|
197
197
|
end
|