knockapi 1.18.0 → 1.20.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 (91) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +32 -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_add_subscriptions_params.rb +13 -3
  12. data/lib/knockapi/models/objects/bulk_set_params.rb +11 -3
  13. data/lib/knockapi/models/recipients/aws_sns_push_channel_data_devices_only.rb +63 -0
  14. data/lib/knockapi/models/recipients/aws_sns_push_channel_data_target_arns_only.rb +25 -0
  15. data/lib/knockapi/models/recipients/channel_data.rb +4 -17
  16. data/lib/knockapi/models/recipients/channel_data_request.rb +8 -162
  17. data/lib/knockapi/models/recipients/inline_channel_data_request.rb +6 -160
  18. data/lib/knockapi/models/recipients/one_signal_channel_data_player_ids_only.rb +20 -0
  19. data/lib/knockapi/models/recipients/preference_set.rb +12 -54
  20. data/lib/knockapi/models/recipients/preference_set_channel_setting.rb +21 -0
  21. data/lib/knockapi/models/recipients/preference_set_request.rb +12 -54
  22. data/lib/knockapi/models/recipients/push_channel_data_devices_only.rb +60 -0
  23. data/lib/knockapi/models/recipients/push_channel_data_tokens_only.rb +20 -0
  24. data/lib/knockapi/models/tenant_get_params.rb +14 -1
  25. data/lib/knockapi/models/tenant_request.rb +11 -3
  26. data/lib/knockapi/models/tenant_set_params.rb +24 -3
  27. data/lib/knockapi/models/users/feed_list_items_params.rb +15 -1
  28. data/lib/knockapi/resources/objects/bulk.rb +1 -1
  29. data/lib/knockapi/resources/objects.rb +6 -4
  30. data/lib/knockapi/resources/tenants.rb +23 -7
  31. data/lib/knockapi/resources/users/feeds.rb +6 -1
  32. data/lib/knockapi/resources/users.rb +3 -3
  33. data/lib/knockapi/version.rb +1 -1
  34. data/lib/knockapi.rb +7 -0
  35. data/manifest.yaml +1 -0
  36. data/rbi/knockapi/client.rbi +7 -0
  37. data/rbi/knockapi/internal/transport/base_client.rbi +5 -0
  38. data/rbi/knockapi/internal/transport/pooled_net_requester.rbi +6 -2
  39. data/rbi/knockapi/internal/type/base_model.rbi +8 -4
  40. data/rbi/knockapi/models/identify_user_request.rbi +15 -15
  41. data/rbi/knockapi/models/inline_identify_user_request.rbi +15 -15
  42. data/rbi/knockapi/models/inline_object_request.rbi +23 -15
  43. data/rbi/knockapi/models/object_set_params.rbi +28 -20
  44. data/rbi/knockapi/models/objects/bulk_add_subscriptions_params.rbi +11 -2
  45. data/rbi/knockapi/models/objects/bulk_set_params.rbi +23 -15
  46. data/rbi/knockapi/models/recipients/aws_sns_push_channel_data_devices_only.rbi +120 -0
  47. data/rbi/knockapi/models/recipients/aws_sns_push_channel_data_target_arns_only.rbi +35 -0
  48. data/rbi/knockapi/models/recipients/channel_data.rbi +2 -30
  49. data/rbi/knockapi/models/recipients/channel_data_request.rbi +20 -326
  50. data/rbi/knockapi/models/recipients/inline_channel_data_request.rbi +5 -309
  51. data/rbi/knockapi/models/recipients/one_signal_channel_data_player_ids_only.rbi +33 -0
  52. data/rbi/knockapi/models/recipients/preference_set.rbi +6 -109
  53. data/rbi/knockapi/models/recipients/preference_set_channel_setting.rbi +38 -0
  54. data/rbi/knockapi/models/recipients/preference_set_request.rbi +12 -115
  55. data/rbi/knockapi/models/recipients/push_channel_data_devices_only.rbi +114 -0
  56. data/rbi/knockapi/models/recipients/push_channel_data_tokens_only.rbi +33 -0
  57. data/rbi/knockapi/models/tenant_get_params.rbi +28 -5
  58. data/rbi/knockapi/models/tenant_request.rbi +23 -15
  59. data/rbi/knockapi/models/tenant_set_params.rbi +38 -15
  60. data/rbi/knockapi/models/users/feed_list_items_params.rbi +17 -0
  61. data/rbi/knockapi/resources/objects/bulk.rbi +1 -1
  62. data/rbi/knockapi/resources/objects.rbi +14 -11
  63. data/rbi/knockapi/resources/tenants.rbi +21 -8
  64. data/rbi/knockapi/resources/users/feeds.rbi +6 -0
  65. data/rbi/knockapi/resources/users.rbi +11 -11
  66. data/sig/knockapi/client.rbs +3 -0
  67. data/sig/knockapi/internal/transport/base_client.rbs +2 -0
  68. data/sig/knockapi/internal/transport/pooled_net_requester.rbs +4 -1
  69. data/sig/knockapi/models/inline_object_request.rbs +5 -0
  70. data/sig/knockapi/models/object_set_params.rbs +5 -0
  71. data/sig/knockapi/models/objects/bulk_add_subscriptions_params.rbs +5 -0
  72. data/sig/knockapi/models/objects/bulk_set_params.rbs +5 -0
  73. data/sig/knockapi/models/recipients/aws_sns_push_channel_data_devices_only.rbs +44 -0
  74. data/sig/knockapi/models/recipients/aws_sns_push_channel_data_target_arns_only.rbs +16 -0
  75. data/sig/knockapi/models/recipients/channel_data.rbs +1 -12
  76. data/sig/knockapi/models/recipients/channel_data_request.rbs +5 -116
  77. data/sig/knockapi/models/recipients/inline_channel_data_request.rbs +5 -116
  78. data/sig/knockapi/models/recipients/one_signal_channel_data_player_ids_only.rbs +16 -0
  79. data/sig/knockapi/models/recipients/preference_set.rbs +3 -44
  80. data/sig/knockapi/models/recipients/preference_set_channel_setting.rbs +16 -0
  81. data/sig/knockapi/models/recipients/preference_set_request.rbs +3 -44
  82. data/sig/knockapi/models/recipients/push_channel_data_devices_only.rbs +40 -0
  83. data/sig/knockapi/models/recipients/push_channel_data_tokens_only.rbs +15 -0
  84. data/sig/knockapi/models/tenant_get_params.rbs +15 -3
  85. data/sig/knockapi/models/tenant_request.rbs +5 -0
  86. data/sig/knockapi/models/tenant_set_params.rbs +12 -0
  87. data/sig/knockapi/models/users/feed_list_items_params.rbs +7 -0
  88. data/sig/knockapi/resources/objects.rbs +1 -0
  89. data/sig/knockapi/resources/tenants.rbs +3 -0
  90. data/sig/knockapi/resources/users/feeds.rbs +1 -0
  91. metadata +20 -2
@@ -33,7 +33,7 @@ module Knockapi
33
33
  # @!attribute channels
34
34
  # Channel preferences.
35
35
  #
36
- # @return [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetRequest::Channel::PreferenceSetChannelSetting}, nil]
36
+ # @return [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting}, nil]
37
37
  optional :channels,
38
38
  -> {
39
39
  Knockapi::Internal::Type::HashOf[union: Knockapi::Recipients::PreferenceSetRequest::Channel]
@@ -70,7 +70,7 @@ module Knockapi
70
70
  #
71
71
  # @param channel_types [Knockapi::Models::Recipients::PreferenceSetChannelTypes, nil] Channel type preferences.
72
72
  #
73
- # @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetRequest::Channel::PreferenceSetChannelSetting}, nil] Channel preferences.
73
+ # @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting}, nil] Channel preferences.
74
74
  #
75
75
  # @param commercial_subscribed [Boolean, nil] Whether the recipient is subscribed to commercial communications. When false, th
76
76
  #
@@ -109,7 +109,7 @@ module Knockapi
109
109
  # @!attribute channels
110
110
  # Channel preferences.
111
111
  #
112
- # @return [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetRequest::Category::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting}, nil]
112
+ # @return [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting}, nil]
113
113
  optional :channels,
114
114
  -> do
115
115
  Knockapi::Internal::Type::HashOf[
@@ -130,7 +130,7 @@ module Knockapi
130
130
  #
131
131
  # @param channel_types [Knockapi::Models::Recipients::PreferenceSetChannelTypes, nil] Channel type preferences.
132
132
  #
133
- # @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetRequest::Category::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting}, nil] Channel preferences.
133
+ # @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting}, nil] Channel preferences.
134
134
  #
135
135
  # @param conditions [Array<Knockapi::Models::Condition>, nil] A list of conditions to apply to a channel type.
136
136
 
@@ -142,24 +142,10 @@ module Knockapi
142
142
  variant Knockapi::Internal::Type::Boolean
143
143
 
144
144
  # A set of settings for a specific channel. Currently, this can only be a list of conditions to apply.
145
- variant -> { Knockapi::Recipients::PreferenceSetRequest::Category::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting }
146
-
147
- class PreferenceSetChannelSetting < Knockapi::Internal::Type::BaseModel
148
- # @!attribute conditions
149
- # A list of conditions to apply to a specific channel.
150
- #
151
- # @return [Array<Knockapi::Models::Condition>]
152
- required :conditions, -> { Knockapi::Internal::Type::ArrayOf[Knockapi::Condition] }
153
-
154
- # @!method initialize(conditions:)
155
- # A set of settings for a specific channel. Currently, this can only be a list of
156
- # conditions to apply.
157
- #
158
- # @param conditions [Array<Knockapi::Models::Condition>] A list of conditions to apply to a specific channel.
159
- end
145
+ variant -> { Knockapi::Recipients::PreferenceSetChannelSetting }
160
146
 
161
147
  # @!method self.variants
162
- # @return [Array(Boolean, Knockapi::Models::Recipients::PreferenceSetRequest::Category::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting)]
148
+ # @return [Array(Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting)]
163
149
  end
164
150
  end
165
151
 
@@ -175,24 +161,10 @@ module Knockapi
175
161
  variant Knockapi::Internal::Type::Boolean
176
162
 
177
163
  # A set of settings for a specific channel. Currently, this can only be a list of conditions to apply.
178
- variant -> { Knockapi::Recipients::PreferenceSetRequest::Channel::PreferenceSetChannelSetting }
179
-
180
- class PreferenceSetChannelSetting < Knockapi::Internal::Type::BaseModel
181
- # @!attribute conditions
182
- # A list of conditions to apply to a specific channel.
183
- #
184
- # @return [Array<Knockapi::Models::Condition>]
185
- required :conditions, -> { Knockapi::Internal::Type::ArrayOf[Knockapi::Condition] }
186
-
187
- # @!method initialize(conditions:)
188
- # A set of settings for a specific channel. Currently, this can only be a list of
189
- # conditions to apply.
190
- #
191
- # @param conditions [Array<Knockapi::Models::Condition>] A list of conditions to apply to a specific channel.
192
- end
164
+ variant -> { Knockapi::Recipients::PreferenceSetChannelSetting }
193
165
 
194
166
  # @!method self.variants
195
- # @return [Array(Boolean, Knockapi::Models::Recipients::PreferenceSetRequest::Channel::PreferenceSetChannelSetting)]
167
+ # @return [Array(Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting)]
196
168
  end
197
169
 
198
170
  # Workflow or category preferences within a preference set
@@ -214,7 +186,7 @@ module Knockapi
214
186
  # @!attribute channels
215
187
  # Channel preferences.
216
188
  #
217
- # @return [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetRequest::Workflow::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting}, nil]
189
+ # @return [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting}, nil]
218
190
  optional :channels,
219
191
  -> do
220
192
  Knockapi::Internal::Type::HashOf[
@@ -235,7 +207,7 @@ module Knockapi
235
207
  #
236
208
  # @param channel_types [Knockapi::Models::Recipients::PreferenceSetChannelTypes, nil] Channel type preferences.
237
209
  #
238
- # @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetRequest::Workflow::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting}, nil] Channel preferences.
210
+ # @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting}, nil] Channel preferences.
239
211
  #
240
212
  # @param conditions [Array<Knockapi::Models::Condition>, nil] A list of conditions to apply to a channel type.
241
213
 
@@ -247,24 +219,10 @@ module Knockapi
247
219
  variant Knockapi::Internal::Type::Boolean
248
220
 
249
221
  # A set of settings for a specific channel. Currently, this can only be a list of conditions to apply.
250
- variant -> { Knockapi::Recipients::PreferenceSetRequest::Workflow::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting }
251
-
252
- class PreferenceSetChannelSetting < Knockapi::Internal::Type::BaseModel
253
- # @!attribute conditions
254
- # A list of conditions to apply to a specific channel.
255
- #
256
- # @return [Array<Knockapi::Models::Condition>]
257
- required :conditions, -> { Knockapi::Internal::Type::ArrayOf[Knockapi::Condition] }
258
-
259
- # @!method initialize(conditions:)
260
- # A set of settings for a specific channel. Currently, this can only be a list of
261
- # conditions to apply.
262
- #
263
- # @param conditions [Array<Knockapi::Models::Condition>] A list of conditions to apply to a specific channel.
264
- end
222
+ variant -> { Knockapi::Recipients::PreferenceSetChannelSetting }
265
223
 
266
224
  # @!method self.variants
267
- # @return [Array(Boolean, Knockapi::Models::Recipients::PreferenceSetRequest::Workflow::PreferenceSetWorkflowCategorySettingObject::Channel::PreferenceSetChannelSetting)]
225
+ # @return [Array(Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting)]
268
226
  end
269
227
  end
270
228
 
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Knockapi
4
+ module Models
5
+ module Recipients
6
+ class PushChannelDataDevicesOnly < Knockapi::Internal::Type::BaseModel
7
+ # @!attribute devices
8
+ # A list of devices. Each device contains a token, and optionally a locale and
9
+ # timezone.
10
+ #
11
+ # @return [Array<Knockapi::Models::Recipients::PushChannelDataDevicesOnly::Device>]
12
+ required :devices,
13
+ -> { Knockapi::Internal::Type::ArrayOf[Knockapi::Recipients::PushChannelDataDevicesOnly::Device] }
14
+
15
+ # @!method initialize(devices:)
16
+ # Some parameter documentations has been truncated, see
17
+ # {Knockapi::Models::Recipients::PushChannelDataDevicesOnly} for more details.
18
+ #
19
+ # Push channel data.
20
+ #
21
+ # @param devices [Array<Knockapi::Models::Recipients::PushChannelDataDevicesOnly::Device>] A list of devices. Each device contains a token, and optionally a locale and tim
22
+
23
+ class Device < Knockapi::Internal::Type::BaseModel
24
+ # @!attribute token
25
+ # The device token to send the push notification to.
26
+ #
27
+ # @return [String]
28
+ required :token, String
29
+
30
+ # @!attribute locale
31
+ # The locale of the object. Used for
32
+ # [message localization](/concepts/translations).
33
+ #
34
+ # @return [String, nil]
35
+ optional :locale, String, nil?: true
36
+
37
+ # @!attribute timezone
38
+ # The timezone of the object. Must be a
39
+ # valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
40
+ # Used
41
+ # for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
42
+ #
43
+ # @return [String, nil]
44
+ optional :timezone, String, nil?: true
45
+
46
+ # @!method initialize(token:, locale: nil, timezone: nil)
47
+ # Some parameter documentations has been truncated, see
48
+ # {Knockapi::Models::Recipients::PushChannelDataDevicesOnly::Device} for more
49
+ # details.
50
+ #
51
+ # @param token [String] The device token to send the push notification to.
52
+ #
53
+ # @param locale [String, nil] The locale of the object. Used for [message localization](/concepts/translations
54
+ #
55
+ # @param timezone [String, nil] The timezone of the object. Must be a valid [tz database time zone string](https
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Knockapi
4
+ module Models
5
+ module Recipients
6
+ class PushChannelDataTokensOnly < Knockapi::Internal::Type::BaseModel
7
+ # @!attribute tokens
8
+ # A list of push channel tokens.
9
+ #
10
+ # @return [Array<String>]
11
+ required :tokens, Knockapi::Internal::Type::ArrayOf[String]
12
+
13
+ # @!method initialize(tokens:)
14
+ # Push channel data.
15
+ #
16
+ # @param tokens [Array<String>] A list of push channel tokens.
17
+ end
18
+ end
19
+ end
20
+ end
@@ -7,7 +7,20 @@ module Knockapi
7
7
  extend Knockapi::Internal::Type::RequestParameters::Converter
8
8
  include Knockapi::Internal::Type::RequestParameters
9
9
 
10
- # @!method initialize(request_options: {})
10
+ # @!attribute resolve_full_preference_settings
11
+ # When true, merges environment-level default preferences into the tenant's
12
+ # `settings.preference_set` field before returning the response. Defaults to
13
+ # false.
14
+ #
15
+ # @return [Boolean, nil]
16
+ optional :resolve_full_preference_settings, Knockapi::Internal::Type::Boolean
17
+
18
+ # @!method initialize(resolve_full_preference_settings: nil, request_options: {})
19
+ # Some parameter documentations has been truncated, see
20
+ # {Knockapi::Models::TenantGetParams} for more details.
21
+ #
22
+ # @param resolve_full_preference_settings [Boolean] When true, merges environment-level default preferences into the tenant's `setti
23
+ #
11
24
  # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}]
12
25
  end
13
26
  end
@@ -12,13 +12,19 @@ module Knockapi
12
12
  # @!attribute channel_data
13
13
  # A request to set channel data for a type of channel inline.
14
14
  #
15
- # @return [Hash{Symbol=>Knockapi::Models::Recipients::InlineChannelDataRequestItem::PushChannelDataTokensOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::PushChannelDataDevicesOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataTargetArNsOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataDevicesOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::OneSignalChannelDataPlayerIDsOnly, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData}, nil]
15
+ # @return [Hash{Symbol=>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}, nil]
16
16
  optional :channel_data,
17
17
  -> {
18
18
  Knockapi::Internal::Type::HashOf[union: Knockapi::Recipients::InlineChannelDataRequestItem]
19
19
  },
20
20
  nil?: true
21
21
 
22
+ # @!attribute name
23
+ # An optional name for the tenant.
24
+ #
25
+ # @return [String, nil]
26
+ optional :name, String, nil?: true
27
+
22
28
  # @!attribute preferences
23
29
  # Inline set preferences for a recipient, where the key is the preference set id.
24
30
  # Preferences that are set inline will be merged into any existing preferences
@@ -35,7 +41,7 @@ module Knockapi
35
41
  # @return [Knockapi::Models::TenantRequest::Settings, nil]
36
42
  optional :settings, -> { Knockapi::TenantRequest::Settings }
37
43
 
38
- # @!method initialize(id:, channel_data: nil, preferences: nil, settings: nil)
44
+ # @!method initialize(id:, channel_data: nil, name: nil, preferences: nil, settings: nil)
39
45
  # Some parameter documentations has been truncated, see
40
46
  # {Knockapi::Models::TenantRequest} for more details.
41
47
  #
@@ -44,7 +50,9 @@ module Knockapi
44
50
  #
45
51
  # @param id [String] The unique identifier for the tenant.
46
52
  #
47
- # @param channel_data [Hash{Symbol=>Knockapi::Models::Recipients::InlineChannelDataRequestItem::PushChannelDataTokensOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::PushChannelDataDevicesOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataTargetArNsOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataDevicesOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::OneSignalChannelDataPlayerIDsOnly, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData}, nil] A request to set channel data for a type of channel inline.
53
+ # @param channel_data [Hash{Symbol=>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}, nil] A request to set channel data for a type of channel inline.
54
+ #
55
+ # @param name [String, nil] An optional name for the tenant.
48
56
  #
49
57
  # @param preferences [Hash{Symbol=>Knockapi::Models::Recipients::PreferenceSetRequest}, nil] Inline set preferences for a recipient, where the key is the preference set id.
50
58
  #
@@ -7,24 +7,45 @@ module Knockapi
7
7
  extend Knockapi::Internal::Type::RequestParameters::Converter
8
8
  include Knockapi::Internal::Type::RequestParameters
9
9
 
10
+ # @!attribute resolve_full_preference_settings
11
+ # When true, merges environment-level default preferences into the tenant's
12
+ # `settings.preference_set` field before returning the response. Defaults to
13
+ # false.
14
+ #
15
+ # @return [Boolean, nil]
16
+ optional :resolve_full_preference_settings, Knockapi::Internal::Type::Boolean
17
+
10
18
  # @!attribute channel_data
11
19
  # A request to set channel data for a type of channel inline.
12
20
  #
13
- # @return [Hash{Symbol=>Knockapi::Models::Recipients::InlineChannelDataRequestItem::PushChannelDataTokensOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::PushChannelDataDevicesOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataTargetArNsOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataDevicesOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::OneSignalChannelDataPlayerIDsOnly, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData}, nil]
21
+ # @return [Hash{Symbol=>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}, nil]
14
22
  optional :channel_data,
15
23
  -> {
16
24
  Knockapi::Internal::Type::HashOf[union: Knockapi::Recipients::InlineChannelDataRequestItem]
17
25
  },
18
26
  nil?: true
19
27
 
28
+ # @!attribute name
29
+ # An optional name for the tenant.
30
+ #
31
+ # @return [String, nil]
32
+ optional :name, String, nil?: true
33
+
20
34
  # @!attribute settings
21
35
  # The settings for the tenant. Includes branding and preference set.
22
36
  #
23
37
  # @return [Knockapi::Models::TenantSetParams::Settings, nil]
24
38
  optional :settings, -> { Knockapi::TenantSetParams::Settings }
25
39
 
26
- # @!method initialize(channel_data: nil, settings: nil, request_options: {})
27
- # @param channel_data [Hash{Symbol=>Knockapi::Models::Recipients::InlineChannelDataRequestItem::PushChannelDataTokensOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::PushChannelDataDevicesOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataTargetArNsOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataDevicesOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::OneSignalChannelDataPlayerIDsOnly, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData}, nil] A request to set channel data for a type of channel inline.
40
+ # @!method initialize(resolve_full_preference_settings: nil, channel_data: nil, name: nil, settings: nil, request_options: {})
41
+ # Some parameter documentations has been truncated, see
42
+ # {Knockapi::Models::TenantSetParams} for more details.
43
+ #
44
+ # @param resolve_full_preference_settings [Boolean] When true, merges environment-level default preferences into the tenant's `setti
45
+ #
46
+ # @param channel_data [Hash{Symbol=>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}, nil] A request to set channel data for a type of channel inline.
47
+ #
48
+ # @param name [String, nil] An optional name for the tenant.
28
49
  #
29
50
  # @param settings [Knockapi::Models::TenantSetParams::Settings] The settings for the tenant. Includes branding and preference set.
30
51
  #
@@ -32,6 +32,15 @@ module Knockapi
32
32
  # @return [Boolean, nil]
33
33
  optional :has_tenant, Knockapi::Internal::Type::Boolean
34
34
 
35
+ # @!attribute locale
36
+ # The locale to render the feed items in. Must be in the IETF 5646 format (e.g.
37
+ # `en-US`). When not provided, will default to the locale that the feed items were
38
+ # rendered in. Only available for enterprise plan customers using custom
39
+ # translations.
40
+ #
41
+ # @return [String, nil]
42
+ optional :locale, String
43
+
35
44
  # @!attribute page_size
36
45
  # The number of items per page (defaults to 50).
37
46
  #
@@ -68,7 +77,10 @@ module Knockapi
68
77
  # @return [Array<String>, nil]
69
78
  optional :workflow_categories, Knockapi::Internal::Type::ArrayOf[String]
70
79
 
71
- # @!method initialize(after: nil, archived: nil, before: nil, has_tenant: nil, page_size: nil, source: nil, status: nil, tenant: nil, trigger_data: nil, workflow_categories: nil, request_options: {})
80
+ # @!method initialize(after: nil, archived: nil, before: nil, has_tenant: nil, locale: nil, page_size: nil, source: nil, status: nil, tenant: nil, trigger_data: nil, workflow_categories: nil, request_options: {})
81
+ # Some parameter documentations has been truncated, see
82
+ # {Knockapi::Models::Users::FeedListItemsParams} for more details.
83
+ #
72
84
  # @param after [String] The cursor to fetch entries after.
73
85
  #
74
86
  # @param archived [Symbol, Knockapi::Models::Users::FeedListItemsParams::Archived] The archived status of the feed items.
@@ -77,6 +89,8 @@ module Knockapi
77
89
  #
78
90
  # @param has_tenant [Boolean] Whether the feed items have a tenant.
79
91
  #
92
+ # @param locale [String] The locale to render the feed items in. Must be in the IETF 5646 format (e.g. `e
93
+ #
80
94
  # @param page_size [Integer] The number of items per page (defaults to 50).
81
95
  #
82
96
  # @param source [String] The workflow key associated with the message in the feed.
@@ -38,7 +38,7 @@ module Knockapi
38
38
  #
39
39
  # @param collection [String] The collection this object belongs to.
40
40
  #
41
- # @param subscriptions [Array<Knockapi::Models::Objects::BulkAddSubscriptionsParams::Subscription>] A list of subscriptions.
41
+ # @param subscriptions [Array<Knockapi::Models::Objects::BulkAddSubscriptionsParams::Subscription>] A nested list of subscriptions.
42
42
  #
43
43
  # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
44
44
  #
@@ -362,16 +362,18 @@ module Knockapi
362
362
  # This operation is used to identify objects with their properties, as well as
363
363
  # optional preferences and channel data.
364
364
  #
365
- # @overload set(collection, id, channel_data: nil, locale: nil, preferences: nil, timezone: nil, request_options: {})
365
+ # @overload set(collection, id, channel_data: nil, locale: nil, name: nil, preferences: nil, timezone: nil, request_options: {})
366
366
  #
367
367
  # @param collection [String] The collection this object belongs to.
368
368
  #
369
369
  # @param id [String] Unique identifier for the object.
370
370
  #
371
- # @param channel_data [Hash{Symbol=>Knockapi::Models::Recipients::InlineChannelDataRequestItem::PushChannelDataTokensOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::PushChannelDataDevicesOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataTargetArNsOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataDevicesOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::OneSignalChannelDataPlayerIDsOnly, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData}] A request to set channel data for a type of channel inline.
371
+ # @param channel_data [Hash{Symbol=>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}] A request to set channel data for a type of channel inline.
372
372
  #
373
373
  # @param locale [String, nil] The locale of the object. Used for [message localization](/concepts/translations
374
374
  #
375
+ # @param name [String, nil] An optional name for the object.
376
+ #
375
377
  # @param preferences [Hash{Symbol=>Knockapi::Models::Recipients::PreferenceSetRequest}] Inline set preferences for a recipient, where the key is the preference set id.
376
378
  #
377
379
  # @param timezone [String, nil] The timezone of the object. Must be a valid [tz database time zone string](https
@@ -404,7 +406,7 @@ module Knockapi
404
406
  #
405
407
  # @param channel_id [String] The unique identifier for the channel.
406
408
  #
407
- # @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.
409
+ # @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.
408
410
  #
409
411
  # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
410
412
  #
@@ -448,7 +450,7 @@ module Knockapi
448
450
  #
449
451
  # @param channel_types [Knockapi::Models::Recipients::PreferenceSetChannelTypes, nil] Channel type preferences.
450
452
  #
451
- # @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetRequest::Channel::PreferenceSetChannelSetting}, nil] Channel preferences.
453
+ # @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting}, nil] Channel preferences.
452
454
  #
453
455
  # @param commercial_subscribed [Boolean, nil] Whether the recipient is subscribed to commercial communications. When false, th
454
456
  #
@@ -57,36 +57,50 @@ module Knockapi
57
57
  )
58
58
  end
59
59
 
60
+ # Some parameter documentations has been truncated, see
61
+ # {Knockapi::Models::TenantGetParams} for more details.
62
+ #
60
63
  # Get a tenant by ID.
61
64
  #
62
- # @overload get(id, request_options: {})
65
+ # @overload get(id, resolve_full_preference_settings: nil, request_options: {})
63
66
  #
64
67
  # @param id [String] The unique identifier for the tenant.
65
68
  #
69
+ # @param resolve_full_preference_settings [Boolean] When true, merges environment-level default preferences into the tenant's `setti
70
+ #
66
71
  # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
67
72
  #
68
73
  # @return [Knockapi::Models::Tenant]
69
74
  #
70
75
  # @see Knockapi::Models::TenantGetParams
71
76
  def get(id, params = {})
77
+ parsed, options = Knockapi::TenantGetParams.dump_request(params)
72
78
  @client.request(
73
79
  method: :get,
74
80
  path: ["v1/tenants/%1$s", id],
81
+ query: parsed,
75
82
  model: Knockapi::Tenant,
76
- options: params[:request_options]
83
+ options: options
77
84
  )
78
85
  end
79
86
 
87
+ # Some parameter documentations has been truncated, see
88
+ # {Knockapi::Models::TenantSetParams} for more details.
89
+ #
80
90
  # Sets a tenant within an environment, performing an upsert operation. Any
81
91
  # existing properties will be merged with the incoming properties.
82
92
  #
83
- # @overload set(id, channel_data: nil, settings: nil, request_options: {})
93
+ # @overload set(id, resolve_full_preference_settings: nil, channel_data: nil, name: nil, settings: nil, request_options: {})
84
94
  #
85
- # @param id [String] The unique identifier for the tenant.
95
+ # @param id [String] Path param: The unique identifier for the tenant.
96
+ #
97
+ # @param resolve_full_preference_settings [Boolean] Query param: When true, merges environment-level default preferences into the te
98
+ #
99
+ # @param channel_data [Hash{Symbol=>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}, nil] Body param: A request to set channel data for a type of channel inline.
86
100
  #
87
- # @param channel_data [Hash{Symbol=>Knockapi::Models::Recipients::InlineChannelDataRequestItem::PushChannelDataTokensOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::PushChannelDataDevicesOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataTargetArNsOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataDevicesOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::OneSignalChannelDataPlayerIDsOnly, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData}, nil] A request to set channel data for a type of channel inline.
101
+ # @param name [String, nil] Body param: An optional name for the tenant.
88
102
  #
89
- # @param settings [Knockapi::Models::TenantSetParams::Settings] The settings for the tenant. Includes branding and preference set.
103
+ # @param settings [Knockapi::Models::TenantSetParams::Settings] Body param: The settings for the tenant. Includes branding and preference set.
90
104
  #
91
105
  # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
92
106
  #
@@ -95,10 +109,12 @@ module Knockapi
95
109
  # @see Knockapi::Models::TenantSetParams
96
110
  def set(id, params = {})
97
111
  parsed, options = Knockapi::TenantSetParams.dump_request(params)
112
+ query_params = [:resolve_full_preference_settings]
98
113
  @client.request(
99
114
  method: :put,
100
115
  path: ["v1/tenants/%1$s", id],
101
- body: parsed,
116
+ query: parsed.slice(*query_params),
117
+ body: parsed.except(*query_params),
102
118
  model: Knockapi::Tenant,
103
119
  options: options
104
120
  )
@@ -26,6 +26,9 @@ module Knockapi
26
26
  )
27
27
  end
28
28
 
29
+ # Some parameter documentations has been truncated, see
30
+ # {Knockapi::Models::Users::FeedListItemsParams} for more details.
31
+ #
29
32
  # Returns a paginated list of feed items for a user in reverse chronological
30
33
  # order, including metadata about the feed. If the user has not yet been
31
34
  # identified within Knock, an empty feed will be returned.
@@ -41,7 +44,7 @@ module Knockapi
41
44
  # - This endpoint’s rate limit is always scoped per-user and per-environment. This
42
45
  # is true even for requests made without a signed user token.
43
46
  #
44
- # @overload list_items(user_id, id, after: nil, archived: nil, before: nil, has_tenant: nil, page_size: nil, source: nil, status: nil, tenant: nil, trigger_data: nil, workflow_categories: nil, request_options: {})
47
+ # @overload list_items(user_id, id, after: nil, archived: nil, before: nil, has_tenant: nil, locale: nil, page_size: nil, source: nil, status: nil, tenant: nil, trigger_data: nil, workflow_categories: nil, request_options: {})
45
48
  #
46
49
  # @param user_id [String] The unique identifier of the user.
47
50
  #
@@ -55,6 +58,8 @@ module Knockapi
55
58
  #
56
59
  # @param has_tenant [Boolean] Whether the feed items have a tenant.
57
60
  #
61
+ # @param locale [String] The locale to render the feed items in. Must be in the IETF 5646 format (e.g. `e
62
+ #
58
63
  # @param page_size [Integer] The number of items per page (defaults to 50).
59
64
  #
60
65
  # @param source [String] The workflow key associated with the message in the feed.
@@ -25,7 +25,7 @@ module Knockapi
25
25
  #
26
26
  # @param avatar [String, nil] A URL for the avatar of the user.
27
27
  #
28
- # @param channel_data [Hash{Symbol=>Knockapi::Models::Recipients::InlineChannelDataRequestItem::PushChannelDataTokensOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::PushChannelDataDevicesOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataTargetArNsOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataDevicesOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::OneSignalChannelDataPlayerIDsOnly, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData}, nil] A request to set channel data for a type of channel inline.
28
+ # @param channel_data [Hash{Symbol=>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}, nil] A request to set channel data for a type of channel inline.
29
29
  #
30
30
  # @param created_at [Time, nil] The creation date of the user from your system.
31
31
  #
@@ -354,7 +354,7 @@ module Knockapi
354
354
  #
355
355
  # @param channel_id [String] The unique identifier for the channel.
356
356
  #
357
- # @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.
357
+ # @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.
358
358
  #
359
359
  # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
360
360
  #
@@ -392,7 +392,7 @@ module Knockapi
392
392
  #
393
393
  # @param channel_types [Knockapi::Models::Recipients::PreferenceSetChannelTypes, nil] Channel type preferences.
394
394
  #
395
- # @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetRequest::Channel::PreferenceSetChannelSetting}, nil] Channel preferences.
395
+ # @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetChannelSetting}, nil] Channel preferences.
396
396
  #
397
397
  # @param commercial_subscribed [Boolean, nil] Whether the recipient is subscribed to commercial communications. When false, th
398
398
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Knockapi
4
- VERSION = "1.18.0"
4
+ VERSION = "1.20.0"
5
5
  end
data/lib/knockapi.rb CHANGED
@@ -9,6 +9,7 @@ require "erb"
9
9
  require "etc"
10
10
  require "json"
11
11
  require "net/http"
12
+ require "openssl"
12
13
  require "pathname"
13
14
  require "rbconfig"
14
15
  require "securerandom"
@@ -147,13 +148,19 @@ require_relative "knockapi/models/providers/slack_revoke_access_response"
147
148
  require_relative "knockapi/models/recipient"
148
149
  require_relative "knockapi/models/recipient_reference"
149
150
  require_relative "knockapi/models/recipient_request"
151
+ require_relative "knockapi/models/recipients/aws_sns_push_channel_data_devices_only"
152
+ require_relative "knockapi/models/recipients/aws_sns_push_channel_data_target_arns_only"
150
153
  require_relative "knockapi/models/recipients/discord_channel_data"
151
154
  require_relative "knockapi/models/recipients/inline_channel_data_request"
152
155
  require_relative "knockapi/models/recipients/inline_preference_set_request"
153
156
  require_relative "knockapi/models/recipients/ms_teams_channel_data"
157
+ require_relative "knockapi/models/recipients/one_signal_channel_data_player_ids_only"
154
158
  require_relative "knockapi/models/recipients/preference_set"
159
+ require_relative "knockapi/models/recipients/preference_set_channel_setting"
155
160
  require_relative "knockapi/models/recipients/preference_set_channel_types"
156
161
  require_relative "knockapi/models/recipients/preference_set_channel_type_setting"
162
+ require_relative "knockapi/models/recipients/push_channel_data_devices_only"
163
+ require_relative "knockapi/models/recipients/push_channel_data_tokens_only"
157
164
  require_relative "knockapi/models/recipients/channel_data"
158
165
  require_relative "knockapi/models/recipients/slack_channel_data"
159
166
  require_relative "knockapi/models/recipients/subscription"
data/manifest.yaml CHANGED
@@ -6,6 +6,7 @@ dependencies:
6
6
  - etc
7
7
  - json
8
8
  - net/http
9
+ - openssl
9
10
  - pathname
10
11
  - rbconfig
11
12
  - securerandom
@@ -13,6 +13,10 @@ module Knockapi
13
13
  sig { returns(String) }
14
14
  attr_reader :api_key
15
15
 
16
+ # The slug of an existing branch
17
+ sig { returns(T.nilable(String)) }
18
+ attr_reader :branch
19
+
16
20
  sig { returns(Knockapi::Resources::Recipients) }
17
21
  attr_reader :recipients
18
22
 
@@ -58,6 +62,7 @@ module Knockapi
58
62
  sig do
59
63
  params(
60
64
  api_key: T.nilable(String),
65
+ branch: T.nilable(String),
61
66
  base_url: T.nilable(String),
62
67
  max_retries: Integer,
63
68
  timeout: Float,
@@ -69,6 +74,8 @@ module Knockapi
69
74
  def self.new(
70
75
  # Defaults to `ENV["KNOCK_API_KEY"]`
71
76
  api_key: ENV["KNOCK_API_KEY"],
77
+ # The slug of an existing branch Defaults to `ENV["KNOCK_BRANCH"]`
78
+ branch: ENV["KNOCK_BRANCH"],
72
79
  # Override the default base URL for the API, e.g.,
73
80
  # `"https://api.example.com/v2/"`. Defaults to `ENV["KNOCK_BASE_URL"]`
74
81
  base_url: ENV["KNOCK_BASE_URL"],
@@ -176,6 +176,11 @@ module Knockapi
176
176
  private def auth_headers
177
177
  end
178
178
 
179
+ # @api private
180
+ sig { returns(String) }
181
+ private def user_agent
182
+ end
183
+
179
184
  # @api private
180
185
  sig { returns(String) }
181
186
  private def generate_idempotency_key