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