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
|
@@ -19,7 +19,7 @@ module Knockapi
|
|
|
19
19
|
# @!attribute data
|
|
20
20
|
# Channel data for a given channel type.
|
|
21
21
|
#
|
|
22
|
-
# @return [Knockapi::Models::Recipients::
|
|
22
|
+
# @return [Knockapi::Models::Recipients::RecipientsChannelData::Data::PushChannelDataFull, Knockapi::Models::Recipients::RecipientsChannelData::Data::AwssnsPushChannelDataFull, Knockapi::Models::Recipients::RecipientsChannelData::Data::OneSignalChannelDataPlayerIDsOnly, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData]
|
|
23
23
|
required :data, union: -> { Knockapi::Recipients::RecipientsChannelData::Data }
|
|
24
24
|
|
|
25
25
|
# @!attribute provider
|
|
@@ -35,7 +35,7 @@ module Knockapi
|
|
|
35
35
|
#
|
|
36
36
|
# @param channel_id [String] The unique identifier for the channel.
|
|
37
37
|
#
|
|
38
|
-
# @param data [Knockapi::Models::Recipients::
|
|
38
|
+
# @param data [Knockapi::Models::Recipients::RecipientsChannelData::Data::PushChannelDataFull, Knockapi::Models::Recipients::RecipientsChannelData::Data::AwssnsPushChannelDataFull, Knockapi::Models::Recipients::RecipientsChannelData::Data::OneSignalChannelDataPlayerIDsOnly, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData] Channel data for a given channel type.
|
|
39
39
|
#
|
|
40
40
|
# @param provider [Symbol, Knockapi::Models::Recipients::RecipientsChannelData::Provider] The type of provider.
|
|
41
41
|
|
|
@@ -46,7 +46,13 @@ module Knockapi
|
|
|
46
46
|
extend Knockapi::Internal::Type::Union
|
|
47
47
|
|
|
48
48
|
# Push channel data.
|
|
49
|
-
variant -> { Knockapi::Recipients::
|
|
49
|
+
variant -> { Knockapi::Recipients::RecipientsChannelData::Data::PushChannelDataFull }
|
|
50
|
+
|
|
51
|
+
# AWS SNS push channel data.
|
|
52
|
+
variant -> { Knockapi::Recipients::RecipientsChannelData::Data::AwssnsPushChannelDataFull }
|
|
53
|
+
|
|
54
|
+
# OneSignal channel data.
|
|
55
|
+
variant -> { Knockapi::Recipients::RecipientsChannelData::Data::OneSignalChannelDataPlayerIDsOnly }
|
|
50
56
|
|
|
51
57
|
# Slack channel data.
|
|
52
58
|
variant -> { Knockapi::Recipients::SlackChannelData }
|
|
@@ -57,13 +63,77 @@ module Knockapi
|
|
|
57
63
|
# Discord channel data.
|
|
58
64
|
variant -> { Knockapi::Recipients::DiscordChannelData }
|
|
59
65
|
|
|
60
|
-
|
|
61
|
-
|
|
66
|
+
class PushChannelDataFull < Knockapi::Internal::Type::BaseModel
|
|
67
|
+
# @!attribute devices
|
|
68
|
+
# A list of devices. Each device contains a token, and optionally a locale and
|
|
69
|
+
# timezone.
|
|
70
|
+
#
|
|
71
|
+
# @return [Array<Knockapi::Models::Recipients::RecipientsChannelData::Data::PushChannelDataFull::Device>]
|
|
72
|
+
required :devices,
|
|
73
|
+
-> { Knockapi::Internal::Type::ArrayOf[Knockapi::Recipients::RecipientsChannelData::Data::PushChannelDataFull::Device] }
|
|
62
74
|
|
|
63
|
-
|
|
64
|
-
|
|
75
|
+
# @!attribute tokens
|
|
76
|
+
# A list of push channel tokens.
|
|
77
|
+
#
|
|
78
|
+
# @return [Array<String>]
|
|
79
|
+
required :tokens, Knockapi::Internal::Type::ArrayOf[String]
|
|
80
|
+
|
|
81
|
+
# @!method initialize(devices:, tokens:)
|
|
82
|
+
# Some parameter documentations has been truncated, see
|
|
83
|
+
# {Knockapi::Models::Recipients::RecipientsChannelData::Data::PushChannelDataFull}
|
|
84
|
+
# for more details.
|
|
85
|
+
#
|
|
86
|
+
# Push channel data.
|
|
87
|
+
#
|
|
88
|
+
# @param devices [Array<Knockapi::Models::Recipients::RecipientsChannelData::Data::PushChannelDataFull::Device>] A list of devices. Each device contains a token, and optionally a locale and tim
|
|
89
|
+
#
|
|
90
|
+
# @param tokens [Array<String>] A list of push channel tokens.
|
|
91
|
+
|
|
92
|
+
class Device < Knockapi::Internal::Type::BaseModel
|
|
93
|
+
# @!attribute token
|
|
94
|
+
# The device token to send the push notification to.
|
|
95
|
+
#
|
|
96
|
+
# @return [String]
|
|
97
|
+
required :token, String
|
|
98
|
+
|
|
99
|
+
# @!attribute locale
|
|
100
|
+
# The locale of the object. Used for
|
|
101
|
+
# [message localization](/concepts/translations).
|
|
102
|
+
#
|
|
103
|
+
# @return [String, nil]
|
|
104
|
+
optional :locale, String, nil?: true
|
|
105
|
+
|
|
106
|
+
# @!attribute timezone
|
|
107
|
+
# The timezone of the object. Must be a
|
|
108
|
+
# valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
109
|
+
# Used
|
|
110
|
+
# for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
|
|
111
|
+
#
|
|
112
|
+
# @return [String, nil]
|
|
113
|
+
optional :timezone, String, nil?: true
|
|
114
|
+
|
|
115
|
+
# @!method initialize(token:, locale: nil, timezone: nil)
|
|
116
|
+
# Some parameter documentations has been truncated, see
|
|
117
|
+
# {Knockapi::Models::Recipients::RecipientsChannelData::Data::PushChannelDataFull::Device}
|
|
118
|
+
# for more details.
|
|
119
|
+
#
|
|
120
|
+
# @param token [String] The device token to send the push notification to.
|
|
121
|
+
#
|
|
122
|
+
# @param locale [String, nil] The locale of the object. Used for [message localization](/concepts/translations
|
|
123
|
+
#
|
|
124
|
+
# @param timezone [String, nil] The timezone of the object. Must be a valid [tz database time zone string](https
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
class AwssnsPushChannelDataFull < Knockapi::Internal::Type::BaseModel
|
|
129
|
+
# @!attribute devices
|
|
130
|
+
# A list of devices. Each device contains a target_arn, and optionally a locale
|
|
131
|
+
# and timezone.
|
|
132
|
+
#
|
|
133
|
+
# @return [Array<Knockapi::Models::Recipients::RecipientsChannelData::Data::AwssnsPushChannelDataFull::Device>]
|
|
134
|
+
required :devices,
|
|
135
|
+
-> { Knockapi::Internal::Type::ArrayOf[Knockapi::Recipients::RecipientsChannelData::Data::AwssnsPushChannelDataFull::Device] }
|
|
65
136
|
|
|
66
|
-
class AwsSnsPushChannelData < Knockapi::Internal::Type::BaseModel
|
|
67
137
|
# @!attribute target_arns
|
|
68
138
|
# A list of platform endpoint ARNs. See
|
|
69
139
|
# [Setting up an Amazon SNS platform endpoint for mobile notifications](https://docs.aws.amazon.com/sns/latest/dg/mobile-platform-endpoint.html).
|
|
@@ -71,18 +141,70 @@ module Knockapi
|
|
|
71
141
|
# @return [Array<String>]
|
|
72
142
|
required :target_arns, Knockapi::Internal::Type::ArrayOf[String]
|
|
73
143
|
|
|
74
|
-
# @!method initialize(target_arns:)
|
|
144
|
+
# @!method initialize(devices:, target_arns:)
|
|
75
145
|
# Some parameter documentations has been truncated, see
|
|
76
|
-
# {Knockapi::Models::Recipients::RecipientsChannelData::Data::
|
|
146
|
+
# {Knockapi::Models::Recipients::RecipientsChannelData::Data::AwssnsPushChannelDataFull}
|
|
77
147
|
# for more details.
|
|
78
148
|
#
|
|
79
149
|
# AWS SNS push channel data.
|
|
80
150
|
#
|
|
151
|
+
# @param devices [Array<Knockapi::Models::Recipients::RecipientsChannelData::Data::AwssnsPushChannelDataFull::Device>] A list of devices. Each device contains a target_arn, and optionally a locale an
|
|
152
|
+
#
|
|
81
153
|
# @param target_arns [Array<String>] A list of platform endpoint ARNs. See [Setting up an Amazon SNS platform endpoin
|
|
154
|
+
|
|
155
|
+
class Device < Knockapi::Internal::Type::BaseModel
|
|
156
|
+
# @!attribute target_arn
|
|
157
|
+
# The ARN of a platform endpoint associated with a platform application and a
|
|
158
|
+
# device token. See
|
|
159
|
+
# [Setting up an Amazon SNS platform endpoint for mobile notifications](https://docs.aws.amazon.com/sns/latest/dg/mobile-platform-endpoint.html).
|
|
160
|
+
#
|
|
161
|
+
# @return [String]
|
|
162
|
+
required :target_arn, String
|
|
163
|
+
|
|
164
|
+
# @!attribute locale
|
|
165
|
+
# The locale of the object. Used for
|
|
166
|
+
# [message localization](/concepts/translations).
|
|
167
|
+
#
|
|
168
|
+
# @return [String, nil]
|
|
169
|
+
optional :locale, String, nil?: true
|
|
170
|
+
|
|
171
|
+
# @!attribute timezone
|
|
172
|
+
# The timezone of the object. Must be a
|
|
173
|
+
# valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
174
|
+
# Used
|
|
175
|
+
# for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
|
|
176
|
+
#
|
|
177
|
+
# @return [String, nil]
|
|
178
|
+
optional :timezone, String, nil?: true
|
|
179
|
+
|
|
180
|
+
# @!method initialize(target_arn:, locale: nil, timezone: nil)
|
|
181
|
+
# Some parameter documentations has been truncated, see
|
|
182
|
+
# {Knockapi::Models::Recipients::RecipientsChannelData::Data::AwssnsPushChannelDataFull::Device}
|
|
183
|
+
# for more details.
|
|
184
|
+
#
|
|
185
|
+
# @param target_arn [String] The ARN of a platform endpoint associated with a platform application and a devi
|
|
186
|
+
#
|
|
187
|
+
# @param locale [String, nil] The locale of the object. Used for [message localization](/concepts/translations
|
|
188
|
+
#
|
|
189
|
+
# @param timezone [String, nil] The timezone of the object. Must be a valid [tz database time zone string](https
|
|
190
|
+
end
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
class OneSignalChannelDataPlayerIDsOnly < Knockapi::Internal::Type::BaseModel
|
|
194
|
+
# @!attribute player_ids
|
|
195
|
+
# A list of OneSignal player IDs.
|
|
196
|
+
#
|
|
197
|
+
# @return [Array<String>]
|
|
198
|
+
required :player_ids, Knockapi::Internal::Type::ArrayOf[String]
|
|
199
|
+
|
|
200
|
+
# @!method initialize(player_ids:)
|
|
201
|
+
# OneSignal channel data.
|
|
202
|
+
#
|
|
203
|
+
# @param player_ids [Array<String>] A list of OneSignal player IDs.
|
|
82
204
|
end
|
|
83
205
|
|
|
84
206
|
# @!method self.variants
|
|
85
|
-
# @return [Array(Knockapi::Models::Recipients::
|
|
207
|
+
# @return [Array(Knockapi::Models::Recipients::RecipientsChannelData::Data::PushChannelDataFull, Knockapi::Models::Recipients::RecipientsChannelData::Data::AwssnsPushChannelDataFull, Knockapi::Models::Recipients::RecipientsChannelData::Data::OneSignalChannelDataPlayerIDsOnly, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData)]
|
|
86
208
|
end
|
|
87
209
|
|
|
88
210
|
# The type of provider.
|
|
@@ -7,13 +7,13 @@ module Knockapi
|
|
|
7
7
|
# @!attribute data
|
|
8
8
|
# Channel data for a given channel type.
|
|
9
9
|
#
|
|
10
|
-
# @return [Knockapi::Models::Recipients::
|
|
10
|
+
# @return [Knockapi::Models::Recipients::ChannelDataRequest::Data::PushChannelDataTokensOnly, Knockapi::Models::Recipients::ChannelDataRequest::Data::AwssnsPushChannelDataTargetArNsOnly, Knockapi::Models::Recipients::ChannelDataRequest::Data::OneSignalChannelDataPlayerIDsOnly, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData]
|
|
11
11
|
required :data, union: -> { Knockapi::Recipients::ChannelDataRequest::Data }
|
|
12
12
|
|
|
13
13
|
# @!method initialize(data:)
|
|
14
14
|
# A request to set channel data for a type of channel.
|
|
15
15
|
#
|
|
16
|
-
# @param data [Knockapi::Models::Recipients::
|
|
16
|
+
# @param data [Knockapi::Models::Recipients::ChannelDataRequest::Data::PushChannelDataTokensOnly, Knockapi::Models::Recipients::ChannelDataRequest::Data::AwssnsPushChannelDataTargetArNsOnly, Knockapi::Models::Recipients::ChannelDataRequest::Data::OneSignalChannelDataPlayerIDsOnly, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData] Channel data for a given channel type.
|
|
17
17
|
|
|
18
18
|
# Channel data for a given channel type.
|
|
19
19
|
#
|
|
@@ -22,13 +22,13 @@ module Knockapi
|
|
|
22
22
|
extend Knockapi::Internal::Type::Union
|
|
23
23
|
|
|
24
24
|
# Push channel data.
|
|
25
|
-
variant -> { Knockapi::Recipients::
|
|
26
|
-
|
|
27
|
-
# OneSignal channel data.
|
|
28
|
-
variant -> { Knockapi::Recipients::OneSignalChannelData }
|
|
25
|
+
variant -> { Knockapi::Recipients::ChannelDataRequest::Data::PushChannelDataTokensOnly }
|
|
29
26
|
|
|
30
27
|
# AWS SNS push channel data.
|
|
31
|
-
variant -> { Knockapi::Recipients::ChannelDataRequest::Data::
|
|
28
|
+
variant -> { Knockapi::Recipients::ChannelDataRequest::Data::AwssnsPushChannelDataTargetArNsOnly }
|
|
29
|
+
|
|
30
|
+
# OneSignal channel data.
|
|
31
|
+
variant -> { Knockapi::Recipients::ChannelDataRequest::Data::OneSignalChannelDataPlayerIDsOnly }
|
|
32
32
|
|
|
33
33
|
# Slack channel data.
|
|
34
34
|
variant -> { Knockapi::Recipients::SlackChannelData }
|
|
@@ -39,7 +39,20 @@ module Knockapi
|
|
|
39
39
|
# Discord channel data.
|
|
40
40
|
variant -> { Knockapi::Recipients::DiscordChannelData }
|
|
41
41
|
|
|
42
|
-
class
|
|
42
|
+
class PushChannelDataTokensOnly < Knockapi::Internal::Type::BaseModel
|
|
43
|
+
# @!attribute tokens
|
|
44
|
+
# A list of push channel tokens.
|
|
45
|
+
#
|
|
46
|
+
# @return [Array<String>]
|
|
47
|
+
required :tokens, Knockapi::Internal::Type::ArrayOf[String]
|
|
48
|
+
|
|
49
|
+
# @!method initialize(tokens:)
|
|
50
|
+
# Push channel data.
|
|
51
|
+
#
|
|
52
|
+
# @param tokens [Array<String>] A list of push channel tokens.
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
class AwssnsPushChannelDataTargetArNsOnly < Knockapi::Internal::Type::BaseModel
|
|
43
56
|
# @!attribute target_arns
|
|
44
57
|
# A list of platform endpoint ARNs. See
|
|
45
58
|
# [Setting up an Amazon SNS platform endpoint for mobile notifications](https://docs.aws.amazon.com/sns/latest/dg/mobile-platform-endpoint.html).
|
|
@@ -49,7 +62,7 @@ module Knockapi
|
|
|
49
62
|
|
|
50
63
|
# @!method initialize(target_arns:)
|
|
51
64
|
# Some parameter documentations has been truncated, see
|
|
52
|
-
# {Knockapi::Models::Recipients::ChannelDataRequest::Data::
|
|
65
|
+
# {Knockapi::Models::Recipients::ChannelDataRequest::Data::AwssnsPushChannelDataTargetArNsOnly}
|
|
53
66
|
# for more details.
|
|
54
67
|
#
|
|
55
68
|
# AWS SNS push channel data.
|
|
@@ -57,8 +70,21 @@ module Knockapi
|
|
|
57
70
|
# @param target_arns [Array<String>] A list of platform endpoint ARNs. See [Setting up an Amazon SNS platform endpoin
|
|
58
71
|
end
|
|
59
72
|
|
|
73
|
+
class OneSignalChannelDataPlayerIDsOnly < Knockapi::Internal::Type::BaseModel
|
|
74
|
+
# @!attribute player_ids
|
|
75
|
+
# A list of OneSignal player IDs.
|
|
76
|
+
#
|
|
77
|
+
# @return [Array<String>]
|
|
78
|
+
required :player_ids, Knockapi::Internal::Type::ArrayOf[String]
|
|
79
|
+
|
|
80
|
+
# @!method initialize(player_ids:)
|
|
81
|
+
# OneSignal channel data.
|
|
82
|
+
#
|
|
83
|
+
# @param player_ids [Array<String>] A list of OneSignal player IDs.
|
|
84
|
+
end
|
|
85
|
+
|
|
60
86
|
# @!method self.variants
|
|
61
|
-
# @return [Array(Knockapi::Models::Recipients::
|
|
87
|
+
# @return [Array(Knockapi::Models::Recipients::ChannelDataRequest::Data::PushChannelDataTokensOnly, Knockapi::Models::Recipients::ChannelDataRequest::Data::AwssnsPushChannelDataTargetArNsOnly, Knockapi::Models::Recipients::ChannelDataRequest::Data::OneSignalChannelDataPlayerIDsOnly, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData)]
|
|
62
88
|
end
|
|
63
89
|
end
|
|
64
90
|
end
|
|
@@ -8,13 +8,13 @@ module Knockapi
|
|
|
8
8
|
extend Knockapi::Internal::Type::Union
|
|
9
9
|
|
|
10
10
|
# Push channel data.
|
|
11
|
-
variant -> { Knockapi::Recipients::
|
|
12
|
-
|
|
13
|
-
# OneSignal channel data.
|
|
14
|
-
variant -> { Knockapi::Recipients::OneSignalChannelData }
|
|
11
|
+
variant -> { Knockapi::Recipients::InlineChannelDataRequestItem::PushChannelDataTokensOnly }
|
|
15
12
|
|
|
16
13
|
# AWS SNS push channel data.
|
|
17
|
-
variant -> { Knockapi::Recipients::InlineChannelDataRequestItem::
|
|
14
|
+
variant -> { Knockapi::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataTargetArNsOnly }
|
|
15
|
+
|
|
16
|
+
# OneSignal channel data.
|
|
17
|
+
variant -> { Knockapi::Recipients::InlineChannelDataRequestItem::OneSignalChannelDataPlayerIDsOnly }
|
|
18
18
|
|
|
19
19
|
# Slack channel data.
|
|
20
20
|
variant -> { Knockapi::Recipients::SlackChannelData }
|
|
@@ -25,7 +25,20 @@ module Knockapi
|
|
|
25
25
|
# Discord channel data.
|
|
26
26
|
variant -> { Knockapi::Recipients::DiscordChannelData }
|
|
27
27
|
|
|
28
|
-
class
|
|
28
|
+
class PushChannelDataTokensOnly < Knockapi::Internal::Type::BaseModel
|
|
29
|
+
# @!attribute tokens
|
|
30
|
+
# A list of push channel tokens.
|
|
31
|
+
#
|
|
32
|
+
# @return [Array<String>]
|
|
33
|
+
required :tokens, Knockapi::Internal::Type::ArrayOf[String]
|
|
34
|
+
|
|
35
|
+
# @!method initialize(tokens:)
|
|
36
|
+
# Push channel data.
|
|
37
|
+
#
|
|
38
|
+
# @param tokens [Array<String>] A list of push channel tokens.
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
class AwssnsPushChannelDataTargetArNsOnly < Knockapi::Internal::Type::BaseModel
|
|
29
42
|
# @!attribute target_arns
|
|
30
43
|
# A list of platform endpoint ARNs. See
|
|
31
44
|
# [Setting up an Amazon SNS platform endpoint for mobile notifications](https://docs.aws.amazon.com/sns/latest/dg/mobile-platform-endpoint.html).
|
|
@@ -35,7 +48,7 @@ module Knockapi
|
|
|
35
48
|
|
|
36
49
|
# @!method initialize(target_arns:)
|
|
37
50
|
# Some parameter documentations has been truncated, see
|
|
38
|
-
# {Knockapi::Models::Recipients::InlineChannelDataRequestItem::
|
|
51
|
+
# {Knockapi::Models::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataTargetArNsOnly}
|
|
39
52
|
# for more details.
|
|
40
53
|
#
|
|
41
54
|
# AWS SNS push channel data.
|
|
@@ -43,8 +56,21 @@ module Knockapi
|
|
|
43
56
|
# @param target_arns [Array<String>] A list of platform endpoint ARNs. See [Setting up an Amazon SNS platform endpoin
|
|
44
57
|
end
|
|
45
58
|
|
|
59
|
+
class OneSignalChannelDataPlayerIDsOnly < Knockapi::Internal::Type::BaseModel
|
|
60
|
+
# @!attribute player_ids
|
|
61
|
+
# A list of OneSignal player IDs.
|
|
62
|
+
#
|
|
63
|
+
# @return [Array<String>]
|
|
64
|
+
required :player_ids, Knockapi::Internal::Type::ArrayOf[String]
|
|
65
|
+
|
|
66
|
+
# @!method initialize(player_ids:)
|
|
67
|
+
# OneSignal channel data.
|
|
68
|
+
#
|
|
69
|
+
# @param player_ids [Array<String>] A list of OneSignal player IDs.
|
|
70
|
+
end
|
|
71
|
+
|
|
46
72
|
# @!method self.variants
|
|
47
|
-
# @return [Array(Knockapi::Models::Recipients::
|
|
73
|
+
# @return [Array(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)]
|
|
48
74
|
end
|
|
49
75
|
|
|
50
76
|
# @type [Knockapi::Internal::Type::Converter]
|
|
@@ -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
|