knockapi 1.18.0 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +23 -0
  3. data/README.md +1 -1
  4. data/lib/knockapi/client.rb +12 -0
  5. data/lib/knockapi/internal/transport/base_client.rb +7 -1
  6. data/lib/knockapi/internal/transport/pooled_net_requester.rb +6 -2
  7. data/lib/knockapi/models/identify_user_request.rb +2 -2
  8. data/lib/knockapi/models/inline_identify_user_request.rb +2 -2
  9. data/lib/knockapi/models/inline_object_request.rb +11 -3
  10. data/lib/knockapi/models/object_set_params.rb +11 -3
  11. data/lib/knockapi/models/objects/bulk_set_params.rb +11 -3
  12. data/lib/knockapi/models/recipients/aws_sns_push_channel_data_devices_only.rb +63 -0
  13. data/lib/knockapi/models/recipients/aws_sns_push_channel_data_target_arns_only.rb +25 -0
  14. data/lib/knockapi/models/recipients/channel_data.rb +4 -17
  15. data/lib/knockapi/models/recipients/channel_data_request.rb +8 -162
  16. data/lib/knockapi/models/recipients/inline_channel_data_request.rb +6 -160
  17. data/lib/knockapi/models/recipients/one_signal_channel_data_player_ids_only.rb +20 -0
  18. data/lib/knockapi/models/recipients/preference_set.rb +12 -54
  19. data/lib/knockapi/models/recipients/preference_set_channel_setting.rb +21 -0
  20. data/lib/knockapi/models/recipients/preference_set_request.rb +12 -54
  21. data/lib/knockapi/models/recipients/push_channel_data_devices_only.rb +60 -0
  22. data/lib/knockapi/models/recipients/push_channel_data_tokens_only.rb +20 -0
  23. data/lib/knockapi/models/tenant_request.rb +11 -3
  24. data/lib/knockapi/models/tenant_set_params.rb +11 -3
  25. data/lib/knockapi/models/users/feed_list_items_params.rb +15 -1
  26. data/lib/knockapi/resources/objects.rb +6 -4
  27. data/lib/knockapi/resources/tenants.rb +4 -2
  28. data/lib/knockapi/resources/users/feeds.rb +6 -1
  29. data/lib/knockapi/resources/users.rb +3 -3
  30. data/lib/knockapi/version.rb +1 -1
  31. data/lib/knockapi.rb +7 -0
  32. data/manifest.yaml +1 -0
  33. data/rbi/knockapi/client.rbi +7 -0
  34. data/rbi/knockapi/internal/transport/base_client.rbi +5 -0
  35. data/rbi/knockapi/internal/transport/pooled_net_requester.rbi +6 -2
  36. data/rbi/knockapi/internal/type/base_model.rbi +8 -4
  37. data/rbi/knockapi/models/identify_user_request.rbi +15 -15
  38. data/rbi/knockapi/models/inline_identify_user_request.rbi +15 -15
  39. data/rbi/knockapi/models/inline_object_request.rbi +23 -15
  40. data/rbi/knockapi/models/object_set_params.rbi +28 -20
  41. data/rbi/knockapi/models/objects/bulk_set_params.rbi +23 -15
  42. data/rbi/knockapi/models/recipients/aws_sns_push_channel_data_devices_only.rbi +120 -0
  43. data/rbi/knockapi/models/recipients/aws_sns_push_channel_data_target_arns_only.rbi +35 -0
  44. data/rbi/knockapi/models/recipients/channel_data.rbi +2 -30
  45. data/rbi/knockapi/models/recipients/channel_data_request.rbi +20 -326
  46. data/rbi/knockapi/models/recipients/inline_channel_data_request.rbi +5 -309
  47. data/rbi/knockapi/models/recipients/one_signal_channel_data_player_ids_only.rbi +33 -0
  48. data/rbi/knockapi/models/recipients/preference_set.rbi +6 -109
  49. data/rbi/knockapi/models/recipients/preference_set_channel_setting.rbi +38 -0
  50. data/rbi/knockapi/models/recipients/preference_set_request.rbi +12 -115
  51. data/rbi/knockapi/models/recipients/push_channel_data_devices_only.rbi +114 -0
  52. data/rbi/knockapi/models/recipients/push_channel_data_tokens_only.rbi +33 -0
  53. data/rbi/knockapi/models/tenant_request.rbi +23 -15
  54. data/rbi/knockapi/models/tenant_set_params.rbi +23 -15
  55. data/rbi/knockapi/models/users/feed_list_items_params.rbi +17 -0
  56. data/rbi/knockapi/resources/objects.rbi +14 -11
  57. data/rbi/knockapi/resources/tenants.rbi +8 -5
  58. data/rbi/knockapi/resources/users/feeds.rbi +6 -0
  59. data/rbi/knockapi/resources/users.rbi +11 -11
  60. data/sig/knockapi/client.rbs +3 -0
  61. data/sig/knockapi/internal/transport/base_client.rbs +2 -0
  62. data/sig/knockapi/internal/transport/pooled_net_requester.rbs +4 -1
  63. data/sig/knockapi/models/inline_object_request.rbs +5 -0
  64. data/sig/knockapi/models/object_set_params.rbs +5 -0
  65. data/sig/knockapi/models/objects/bulk_set_params.rbs +5 -0
  66. data/sig/knockapi/models/recipients/aws_sns_push_channel_data_devices_only.rbs +44 -0
  67. data/sig/knockapi/models/recipients/aws_sns_push_channel_data_target_arns_only.rbs +16 -0
  68. data/sig/knockapi/models/recipients/channel_data.rbs +1 -12
  69. data/sig/knockapi/models/recipients/channel_data_request.rbs +5 -116
  70. data/sig/knockapi/models/recipients/inline_channel_data_request.rbs +5 -116
  71. data/sig/knockapi/models/recipients/one_signal_channel_data_player_ids_only.rbs +16 -0
  72. data/sig/knockapi/models/recipients/preference_set.rbs +3 -44
  73. data/sig/knockapi/models/recipients/preference_set_channel_setting.rbs +16 -0
  74. data/sig/knockapi/models/recipients/preference_set_request.rbs +3 -44
  75. data/sig/knockapi/models/recipients/push_channel_data_devices_only.rbs +40 -0
  76. data/sig/knockapi/models/recipients/push_channel_data_tokens_only.rbs +15 -0
  77. data/sig/knockapi/models/tenant_request.rbs +5 -0
  78. data/sig/knockapi/models/tenant_set_params.rbs +5 -0
  79. data/sig/knockapi/models/users/feed_list_items_params.rbs +7 -0
  80. data/sig/knockapi/resources/objects.rbs +1 -0
  81. data/sig/knockapi/resources/tenants.rbs +1 -0
  82. data/sig/knockapi/resources/users/feeds.rbs +1 -0
  83. metadata +20 -2
@@ -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::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]
10
+ # @return [Knockapi::Models::Recipients::PushChannelDataTokensOnly, Knockapi::Models::Recipients::PushChannelDataDevicesOnly, Knockapi::Models::Recipients::AwsSnsPushChannelDataTargetArnsOnly, Knockapi::Models::Recipients::AwsSnsPushChannelDataDevicesOnly, Knockapi::Models::Recipients::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::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.
16
+ # @param data [Knockapi::Models::Recipients::PushChannelDataTokensOnly, Knockapi::Models::Recipients::PushChannelDataDevicesOnly, Knockapi::Models::Recipients::AwsSnsPushChannelDataTargetArnsOnly, Knockapi::Models::Recipients::AwsSnsPushChannelDataDevicesOnly, Knockapi::Models::Recipients::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,19 +22,19 @@ module Knockapi
22
22
  extend Knockapi::Internal::Type::Union
23
23
 
24
24
  # Push channel data.
25
- variant -> { Knockapi::Recipients::ChannelDataRequest::Data::PushChannelDataTokensOnly }
25
+ variant -> { Knockapi::Recipients::PushChannelDataTokensOnly }
26
26
 
27
27
  # Push channel data.
28
- variant -> { Knockapi::Recipients::ChannelDataRequest::Data::PushChannelDataDevicesOnly }
28
+ variant -> { Knockapi::Recipients::PushChannelDataDevicesOnly }
29
29
 
30
30
  # AWS SNS push channel data.
31
- variant -> { Knockapi::Recipients::ChannelDataRequest::Data::AwssnsPushChannelDataTargetArNsOnly }
31
+ variant -> { Knockapi::Recipients::AwsSnsPushChannelDataTargetArnsOnly }
32
32
 
33
33
  # AWS SNS push channel data.
34
- variant -> { Knockapi::Recipients::ChannelDataRequest::Data::AwssnsPushChannelDataDevicesOnly }
34
+ variant -> { Knockapi::Recipients::AwsSnsPushChannelDataDevicesOnly }
35
35
 
36
36
  # OneSignal channel data.
37
- variant -> { Knockapi::Recipients::ChannelDataRequest::Data::OneSignalChannelDataPlayerIDsOnly }
37
+ variant -> { Knockapi::Recipients::OneSignalChannelDataPlayerIDsOnly }
38
38
 
39
39
  # Slack channel data.
40
40
  variant -> { Knockapi::Recipients::SlackChannelData }
@@ -45,162 +45,8 @@ module Knockapi
45
45
  # Discord channel data.
46
46
  variant -> { Knockapi::Recipients::DiscordChannelData }
47
47
 
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
116
- # @!attribute target_arns
117
- # A list of platform endpoint ARNs. See
118
- # [Setting up an Amazon SNS platform endpoint for mobile notifications](https://docs.aws.amazon.com/sns/latest/dg/mobile-platform-endpoint.html).
119
- #
120
- # @return [Array<String>]
121
- required :target_arns, Knockapi::Internal::Type::ArrayOf[String]
122
-
123
- # @!method initialize(target_arns:)
124
- # Some parameter documentations has been truncated, see
125
- # {Knockapi::Models::Recipients::ChannelDataRequest::Data::AwssnsPushChannelDataTargetArNsOnly}
126
- # for more details.
127
- #
128
- # AWS SNS push channel data.
129
- #
130
- # @param target_arns [Array<String>] A list of platform endpoint ARNs. See [Setting up an Amazon SNS platform endpoin
131
- end
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
-
202
48
  # @!method self.variants
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)]
49
+ # @return [Array(Knockapi::Models::Recipients::PushChannelDataTokensOnly, Knockapi::Models::Recipients::PushChannelDataDevicesOnly, Knockapi::Models::Recipients::AwsSnsPushChannelDataTargetArnsOnly, Knockapi::Models::Recipients::AwsSnsPushChannelDataDevicesOnly, Knockapi::Models::Recipients::OneSignalChannelDataPlayerIDsOnly, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData)]
204
50
  end
205
51
  end
206
52
  end
@@ -8,19 +8,19 @@ module Knockapi
8
8
  extend Knockapi::Internal::Type::Union
9
9
 
10
10
  # Push channel data.
11
- variant -> { Knockapi::Recipients::InlineChannelDataRequestItem::PushChannelDataTokensOnly }
11
+ variant -> { Knockapi::Recipients::PushChannelDataTokensOnly }
12
12
 
13
13
  # Push channel data.
14
- variant -> { Knockapi::Recipients::InlineChannelDataRequestItem::PushChannelDataDevicesOnly }
14
+ variant -> { Knockapi::Recipients::PushChannelDataDevicesOnly }
15
15
 
16
16
  # AWS SNS push channel data.
17
- variant -> { Knockapi::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataTargetArNsOnly }
17
+ variant -> { Knockapi::Recipients::AwsSnsPushChannelDataTargetArnsOnly }
18
18
 
19
19
  # AWS SNS push channel data.
20
- variant -> { Knockapi::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataDevicesOnly }
20
+ variant -> { Knockapi::Recipients::AwsSnsPushChannelDataDevicesOnly }
21
21
 
22
22
  # OneSignal channel data.
23
- variant -> { Knockapi::Recipients::InlineChannelDataRequestItem::OneSignalChannelDataPlayerIDsOnly }
23
+ variant -> { Knockapi::Recipients::OneSignalChannelDataPlayerIDsOnly }
24
24
 
25
25
  # Slack channel data.
26
26
  variant -> { Knockapi::Recipients::SlackChannelData }
@@ -31,162 +31,8 @@ module Knockapi
31
31
  # Discord channel data.
32
32
  variant -> { Knockapi::Recipients::DiscordChannelData }
33
33
 
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
102
- # @!attribute target_arns
103
- # A list of platform endpoint ARNs. See
104
- # [Setting up an Amazon SNS platform endpoint for mobile notifications](https://docs.aws.amazon.com/sns/latest/dg/mobile-platform-endpoint.html).
105
- #
106
- # @return [Array<String>]
107
- required :target_arns, Knockapi::Internal::Type::ArrayOf[String]
108
-
109
- # @!method initialize(target_arns:)
110
- # Some parameter documentations has been truncated, see
111
- # {Knockapi::Models::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataTargetArNsOnly}
112
- # for more details.
113
- #
114
- # AWS SNS push channel data.
115
- #
116
- # @param target_arns [Array<String>] A list of platform endpoint ARNs. See [Setting up an Amazon SNS platform endpoin
117
- end
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
-
188
34
  # @!method self.variants
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)]
35
+ # @return [Array(Knockapi::Models::Recipients::PushChannelDataTokensOnly, Knockapi::Models::Recipients::PushChannelDataDevicesOnly, Knockapi::Models::Recipients::AwsSnsPushChannelDataTargetArnsOnly, Knockapi::Models::Recipients::AwsSnsPushChannelDataDevicesOnly, Knockapi::Models::Recipients::OneSignalChannelDataPlayerIDsOnly, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData)]
190
36
  end
191
37
 
192
38
  # @type [Knockapi::Internal::Type::Converter]
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Knockapi
4
+ module Models
5
+ module Recipients
6
+ class OneSignalChannelDataPlayerIDsOnly < Knockapi::Internal::Type::BaseModel
7
+ # @!attribute player_ids
8
+ # A list of OneSignal player IDs.
9
+ #
10
+ # @return [Array<String>]
11
+ required :player_ids, Knockapi::Internal::Type::ArrayOf[String]
12
+
13
+ # @!method initialize(player_ids:)
14
+ # OneSignal channel data.
15
+ #
16
+ # @param player_ids [Array<String>] A list of OneSignal player IDs.
17
+ end
18
+ end
19
+ end
20
+ end
@@ -30,7 +30,7 @@ module Knockapi
30
30
  # @!attribute channels
31
31
  # Channel preferences.
32
32
  #
33
- # @return [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSet::Channel::PreferenceSetChannelSetting}, nil]
33
+ # @return [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting}, nil]
34
34
  optional :channels,
35
35
  -> { Knockapi::Internal::Type::HashOf[union: Knockapi::Recipients::PreferenceSet::Channel] },
36
36
  nil?: true
@@ -66,7 +66,7 @@ module Knockapi
66
66
  #
67
67
  # @param channel_types [Knockapi::Models::Recipients::PreferenceSetChannelTypes, nil] Channel type preferences.
68
68
  #
69
- # @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSet::Channel::PreferenceSetChannelSetting}, nil] Channel preferences.
69
+ # @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting}, nil] Channel preferences.
70
70
  #
71
71
  # @param commercial_subscribed [Boolean, nil] Whether the recipient is subscribed to commercial communications. When false, th
72
72
  #
@@ -91,7 +91,7 @@ module Knockapi
91
91
  # @!attribute channels
92
92
  # Channel preferences.
93
93
  #
94
- # @return [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSet::Category::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting}, nil]
94
+ # @return [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting}, nil]
95
95
  optional :channels,
96
96
  -> {
97
97
  Knockapi::Internal::Type::HashOf[union: Knockapi::Recipients::PreferenceSet::Category::PreferenceSetWorkflowCategorySettingObject::Channel]
@@ -110,7 +110,7 @@ module Knockapi
110
110
  #
111
111
  # @param channel_types [Knockapi::Models::Recipients::PreferenceSetChannelTypes, nil] Channel type preferences.
112
112
  #
113
- # @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSet::Category::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting}, nil] Channel preferences.
113
+ # @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting}, nil] Channel preferences.
114
114
  #
115
115
  # @param conditions [Array<Knockapi::Models::Condition>, nil] A list of conditions to apply to a channel type.
116
116
 
@@ -122,24 +122,10 @@ module Knockapi
122
122
  variant Knockapi::Internal::Type::Boolean
123
123
 
124
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
125
+ variant -> { Knockapi::Recipients::PreferenceSetChannelSetting }
140
126
 
141
127
  # @!method self.variants
142
- # @return [Array(Boolean, Knockapi::Models::Recipients::PreferenceSet::Category::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting)]
128
+ # @return [Array(Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting)]
143
129
  end
144
130
  end
145
131
 
@@ -155,24 +141,10 @@ module Knockapi
155
141
  variant Knockapi::Internal::Type::Boolean
156
142
 
157
143
  # 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
144
+ variant -> { Knockapi::Recipients::PreferenceSetChannelSetting }
173
145
 
174
146
  # @!method self.variants
175
- # @return [Array(Boolean, Knockapi::Models::Recipients::PreferenceSet::Channel::PreferenceSetChannelSetting)]
147
+ # @return [Array(Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting)]
176
148
  end
177
149
 
178
150
  # Workflow or category preferences within a preference set
@@ -194,7 +166,7 @@ module Knockapi
194
166
  # @!attribute channels
195
167
  # Channel preferences.
196
168
  #
197
- # @return [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSet::Workflow::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting}, nil]
169
+ # @return [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting}, nil]
198
170
  optional :channels,
199
171
  -> {
200
172
  Knockapi::Internal::Type::HashOf[union: Knockapi::Recipients::PreferenceSet::Workflow::PreferenceSetWorkflowCategorySettingObject::Channel]
@@ -213,7 +185,7 @@ module Knockapi
213
185
  #
214
186
  # @param channel_types [Knockapi::Models::Recipients::PreferenceSetChannelTypes, nil] Channel type preferences.
215
187
  #
216
- # @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSet::Workflow::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting}, nil] Channel preferences.
188
+ # @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting}, nil] Channel preferences.
217
189
  #
218
190
  # @param conditions [Array<Knockapi::Models::Condition>, nil] A list of conditions to apply to a channel type.
219
191
 
@@ -225,24 +197,10 @@ module Knockapi
225
197
  variant Knockapi::Internal::Type::Boolean
226
198
 
227
199
  # 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
200
+ variant -> { Knockapi::Recipients::PreferenceSetChannelSetting }
243
201
 
244
202
  # @!method self.variants
245
- # @return [Array(Boolean, Knockapi::Models::Recipients::PreferenceSet::Workflow::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting)]
203
+ # @return [Array(Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting)]
246
204
  end
247
205
  end
248
206
 
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Knockapi
4
+ module Models
5
+ module Recipients
6
+ class PreferenceSetChannelSetting < Knockapi::Internal::Type::BaseModel
7
+ # @!attribute conditions
8
+ # A list of conditions to apply to a specific channel.
9
+ #
10
+ # @return [Array<Knockapi::Models::Condition>]
11
+ required :conditions, -> { Knockapi::Internal::Type::ArrayOf[Knockapi::Condition] }
12
+
13
+ # @!method initialize(conditions:)
14
+ # A set of settings for a specific channel. Currently, this can only be a list of
15
+ # conditions to apply.
16
+ #
17
+ # @param conditions [Array<Knockapi::Models::Condition>] A list of conditions to apply to a specific channel.
18
+ end
19
+ end
20
+ end
21
+ end