knockapi 1.15.0 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +55 -0
- data/README.md +1 -1
- data/lib/knockapi/client.rb +0 -4
- data/lib/knockapi/file_part.rb +10 -7
- data/lib/knockapi/internal/transport/pooled_net_requester.rb +34 -31
- data/lib/knockapi/internal/type/file_input.rb +7 -4
- data/lib/knockapi/internal/util.rb +7 -6
- data/lib/knockapi/models/audience_add_members_params.rb +2 -2
- 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 +124 -11
- data/lib/knockapi/models/messages/batch_archive_response.rb +1 -1
- data/lib/knockapi/models/messages/batch_mark_as_interacted_response.rb +1 -1
- data/lib/knockapi/models/messages/batch_mark_as_read_response.rb +1 -1
- data/lib/knockapi/models/messages/batch_mark_as_seen_response.rb +1 -1
- data/lib/knockapi/models/messages/batch_mark_as_unread_response.rb +1 -1
- data/lib/knockapi/models/messages/batch_mark_as_unseen_response.rb +1 -1
- data/lib/knockapi/models/messages/batch_unarchive_response.rb +1 -1
- data/lib/knockapi/models/object_set_params.rb +2 -2
- data/lib/knockapi/models/objects/bulk_set_params.rb +2 -2
- data/lib/knockapi/models/recipients/channel_data.rb +133 -11
- data/lib/knockapi/models/recipients/channel_data_request.rb +36 -10
- data/lib/knockapi/models/recipients/inline_channel_data_request.rb +34 -8
- data/lib/knockapi/models/recipients/preference_set.rb +130 -3
- data/lib/knockapi/models/recipients/preference_set_request.rb +136 -3
- data/lib/knockapi/models/tenant_request.rb +2 -2
- data/lib/knockapi/models/tenant_set_params.rb +2 -2
- data/lib/knockapi/models/users/guide_get_channel_response.rb +270 -34
- data/lib/knockapi/resources/audiences.rb +1 -1
- data/lib/knockapi/resources/messages/batch.rb +7 -7
- data/lib/knockapi/resources/objects.rb +7 -3
- data/lib/knockapi/resources/tenants/bulk.rb +3 -2
- 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 -3
- data/rbi/knockapi/client.rbi +0 -3
- data/rbi/knockapi/file_part.rbi +1 -1
- data/rbi/knockapi/models/audience_add_members_params.rbi +2 -2
- data/rbi/knockapi/models/identify_user_request.rbi +9 -9
- data/rbi/knockapi/models/inline_identify_user_request.rbi +9 -9
- data/rbi/knockapi/models/inline_object_request.rbi +9 -9
- data/rbi/knockapi/models/message.rbi +169 -12
- data/rbi/knockapi/models/messages/batch_archive_response.rbi +1 -1
- data/rbi/knockapi/models/messages/batch_mark_as_interacted_response.rbi +1 -1
- data/rbi/knockapi/models/messages/batch_mark_as_read_response.rbi +1 -1
- data/rbi/knockapi/models/messages/batch_mark_as_seen_response.rbi +1 -1
- data/rbi/knockapi/models/messages/batch_mark_as_unread_response.rbi +1 -1
- data/rbi/knockapi/models/messages/batch_mark_as_unseen_response.rbi +1 -1
- data/rbi/knockapi/models/messages/batch_unarchive_response.rbi +1 -1
- data/rbi/knockapi/models/object_set_params.rbi +12 -12
- data/rbi/knockapi/models/objects/bulk_set_params.rbi +9 -9
- data/rbi/knockapi/models/recipients/channel_data.rbi +250 -12
- data/rbi/knockapi/models/recipients/channel_data_request.rbi +68 -14
- data/rbi/knockapi/models/recipients/inline_channel_data_request.rbi +57 -5
- data/rbi/knockapi/models/recipients/preference_set.rbi +279 -0
- data/rbi/knockapi/models/recipients/preference_set_request.rbi +299 -0
- data/rbi/knockapi/models/tenant_request.rbi +9 -9
- data/rbi/knockapi/models/tenant_set_params.rbi +9 -9
- data/rbi/knockapi/models/users/guide_get_channel_response.rbi +532 -70
- data/rbi/knockapi/resources/audiences.rbi +1 -1
- data/rbi/knockapi/resources/messages/batch.rbi +7 -7
- data/rbi/knockapi/resources/objects.rbi +22 -6
- data/rbi/knockapi/resources/tenants/bulk.rbi +3 -2
- data/rbi/knockapi/resources/tenants.rbi +3 -3
- data/rbi/knockapi/resources/users.rbi +22 -6
- data/sig/knockapi/client.rbs +0 -2
- data/sig/knockapi/file_part.rbs +1 -1
- data/sig/knockapi/models/message.rbs +103 -3
- data/sig/knockapi/models/messages/batch_archive_response.rbs +1 -1
- data/sig/knockapi/models/messages/batch_mark_as_interacted_response.rbs +1 -2
- data/sig/knockapi/models/messages/batch_mark_as_read_response.rbs +1 -1
- data/sig/knockapi/models/messages/batch_mark_as_seen_response.rbs +1 -1
- data/sig/knockapi/models/messages/batch_mark_as_unread_response.rbs +1 -1
- data/sig/knockapi/models/messages/batch_mark_as_unseen_response.rbs +1 -1
- data/sig/knockapi/models/messages/batch_unarchive_response.rbs +1 -1
- data/sig/knockapi/models/recipients/channel_data.rbs +97 -7
- data/sig/knockapi/models/recipients/channel_data_request.rbs +27 -5
- data/sig/knockapi/models/recipients/inline_channel_data_request.rbs +27 -5
- data/sig/knockapi/models/recipients/preference_set.rbs +87 -0
- data/sig/knockapi/models/recipients/preference_set_request.rbs +87 -0
- data/sig/knockapi/models/users/guide_get_channel_response.rbs +294 -31
- data/sig/knockapi/resources/objects.rbs +2 -0
- data/sig/knockapi/resources/users.rbs +2 -0
- metadata +2 -11
- data/lib/knockapi/models/recipients/one_signal_channel_data.rb +0 -20
- data/lib/knockapi/models/recipients/push_channel_data.rb +0 -20
- data/lib/knockapi/resources/shared.rb +0 -14
- data/rbi/knockapi/models/recipients/one_signal_channel_data.rbi +0 -33
- data/rbi/knockapi/models/recipients/push_channel_data.rbi +0 -33
- data/rbi/knockapi/resources/shared.rbi +0 -12
- data/sig/knockapi/models/recipients/one_signal_channel_data.rbs +0 -15
- data/sig/knockapi/models/recipients/push_channel_data.rbs +0 -15
- data/sig/knockapi/resources/shared.rbs +0 -7
|
@@ -368,7 +368,7 @@ module Knockapi
|
|
|
368
368
|
#
|
|
369
369
|
# @param id [String] Unique identifier for the object.
|
|
370
370
|
#
|
|
371
|
-
# @param channel_data [Hash{Symbol=>Knockapi::Models::Recipients::
|
|
371
|
+
# @param channel_data [Hash{Symbol=>Knockapi::Models::Recipients::InlineChannelDataRequestItem::PushChannelDataTokensOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataTargetArNsOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::OneSignalChannelDataPlayerIDsOnly, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData}] 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
|
#
|
|
@@ -404,7 +404,7 @@ module Knockapi
|
|
|
404
404
|
#
|
|
405
405
|
# @param channel_id [String] The unique identifier for the channel.
|
|
406
406
|
#
|
|
407
|
-
# @param data [Knockapi::Models::Recipients::
|
|
407
|
+
# @param data [Knockapi::Models::Recipients::ChannelDataRequest::Data::PushChannelDataTokensOnly, Knockapi::Models::Recipients::ChannelDataRequest::Data::AwssnsPushChannelDataTargetArNsOnly, Knockapi::Models::Recipients::ChannelDataRequest::Data::OneSignalChannelDataPlayerIDsOnly, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData] Channel data for a given channel type.
|
|
408
408
|
#
|
|
409
409
|
# @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
410
410
|
#
|
|
@@ -434,7 +434,7 @@ module Knockapi
|
|
|
434
434
|
# `tenant.id`. Learn more about
|
|
435
435
|
# [per-tenant preferences](/preferences/tenant-preferences).
|
|
436
436
|
#
|
|
437
|
-
# @overload set_preferences(collection, object_id_, id, _persistence_strategy: nil, categories: nil, channel_types: nil, workflows: nil, request_options: {})
|
|
437
|
+
# @overload set_preferences(collection, object_id_, id, _persistence_strategy: nil, categories: nil, channel_types: nil, channels: nil, commercial_subscribed: nil, workflows: nil, request_options: {})
|
|
438
438
|
#
|
|
439
439
|
# @param collection [String] The collection this object belongs to.
|
|
440
440
|
#
|
|
@@ -448,6 +448,10 @@ module Knockapi
|
|
|
448
448
|
#
|
|
449
449
|
# @param channel_types [Knockapi::Models::Recipients::PreferenceSetChannelTypes, nil] Channel type preferences.
|
|
450
450
|
#
|
|
451
|
+
# @param channels [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetRequest::Channel::PreferenceSetChannelSetting}, nil] Channel preferences.
|
|
452
|
+
#
|
|
453
|
+
# @param commercial_subscribed [Boolean, nil] Whether the recipient is subscribed to commercial communications. When false, th
|
|
454
|
+
#
|
|
451
455
|
# @param workflows [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetRequest::Workflow::PreferenceSetWorkflowCategorySettingObject}, nil] An object where the key is the workflow key and the values are the preference se
|
|
452
456
|
#
|
|
453
457
|
# @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
@@ -4,7 +4,8 @@ module Knockapi
|
|
|
4
4
|
module Resources
|
|
5
5
|
class Tenants
|
|
6
6
|
class Bulk
|
|
7
|
-
# Delete
|
|
7
|
+
# Delete up to 100 tenants at a time in a single operation. This operation cannot
|
|
8
|
+
# be undone.
|
|
8
9
|
#
|
|
9
10
|
# @overload delete(tenant_ids:, request_options: {})
|
|
10
11
|
#
|
|
@@ -26,7 +27,7 @@ module Knockapi
|
|
|
26
27
|
)
|
|
27
28
|
end
|
|
28
29
|
|
|
29
|
-
# Set or update up to
|
|
30
|
+
# Set or update up to 100 tenants in a single operation.
|
|
30
31
|
#
|
|
31
32
|
# @overload set(tenants:, request_options: {})
|
|
32
33
|
#
|
|
@@ -84,7 +84,7 @@ module Knockapi
|
|
|
84
84
|
#
|
|
85
85
|
# @param id [String] The unique identifier for the tenant.
|
|
86
86
|
#
|
|
87
|
-
# @param channel_data [Hash{Symbol=>Knockapi::Models::Recipients::
|
|
87
|
+
# @param channel_data [Hash{Symbol=>Knockapi::Models::Recipients::InlineChannelDataRequestItem::PushChannelDataTokensOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataTargetArNsOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::OneSignalChannelDataPlayerIDsOnly, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData}, nil] A request to set channel data for a type of channel inline.
|
|
88
88
|
#
|
|
89
89
|
# @param settings [Knockapi::Models::TenantSetParams::Settings] The settings for the tenant. Includes branding and preference set.
|
|
90
90
|
#
|
|
@@ -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::
|
|
28
|
+
# @param channel_data [Hash{Symbol=>Knockapi::Models::Recipients::InlineChannelDataRequestItem::PushChannelDataTokensOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataTargetArNsOnly, Knockapi::Models::Recipients::InlineChannelDataRequestItem::OneSignalChannelDataPlayerIDsOnly, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData}, nil] A request to set channel data for a type of channel inline.
|
|
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::
|
|
357
|
+
# @param data [Knockapi::Models::Recipients::ChannelDataRequest::Data::PushChannelDataTokensOnly, Knockapi::Models::Recipients::ChannelDataRequest::Data::AwssnsPushChannelDataTargetArNsOnly, Knockapi::Models::Recipients::ChannelDataRequest::Data::OneSignalChannelDataPlayerIDsOnly, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData] Channel data for a given channel type.
|
|
358
358
|
#
|
|
359
359
|
# @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
360
360
|
#
|
|
@@ -380,7 +380,7 @@ module Knockapi
|
|
|
380
380
|
# Use '**persistence_strategy**': 'merge' to merge with existing preferences
|
|
381
381
|
# instead.
|
|
382
382
|
#
|
|
383
|
-
# @overload set_preferences(user_id, id, _persistence_strategy: nil, categories: nil, channel_types: nil, workflows: nil, request_options: {})
|
|
383
|
+
# @overload set_preferences(user_id, id, _persistence_strategy: nil, categories: nil, channel_types: nil, channels: nil, commercial_subscribed: nil, workflows: nil, request_options: {})
|
|
384
384
|
#
|
|
385
385
|
# @param user_id [String] The unique identifier of the user.
|
|
386
386
|
#
|
|
@@ -392,6 +392,10 @@ 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.
|
|
396
|
+
#
|
|
397
|
+
# @param commercial_subscribed [Boolean, nil] Whether the recipient is subscribed to commercial communications. When false, th
|
|
398
|
+
#
|
|
395
399
|
# @param workflows [Hash{Symbol=>Boolean, Knockapi::Models::Recipients::PreferenceSetRequest::Workflow::PreferenceSetWorkflowCategorySettingObject}, nil] An object where the key is the workflow key and the values are the preference se
|
|
396
400
|
#
|
|
397
401
|
# @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
|
data/lib/knockapi/version.rb
CHANGED
data/lib/knockapi.rb
CHANGED
|
@@ -151,11 +151,9 @@ require_relative "knockapi/models/recipients/discord_channel_data"
|
|
|
151
151
|
require_relative "knockapi/models/recipients/inline_channel_data_request"
|
|
152
152
|
require_relative "knockapi/models/recipients/inline_preference_set_request"
|
|
153
153
|
require_relative "knockapi/models/recipients/ms_teams_channel_data"
|
|
154
|
-
require_relative "knockapi/models/recipients/one_signal_channel_data"
|
|
155
154
|
require_relative "knockapi/models/recipients/preference_set"
|
|
156
155
|
require_relative "knockapi/models/recipients/preference_set_channel_types"
|
|
157
156
|
require_relative "knockapi/models/recipients/preference_set_channel_type_setting"
|
|
158
|
-
require_relative "knockapi/models/recipients/push_channel_data"
|
|
159
157
|
require_relative "knockapi/models/recipients/channel_data"
|
|
160
158
|
require_relative "knockapi/models/recipients/slack_channel_data"
|
|
161
159
|
require_relative "knockapi/models/recipients/subscription"
|
|
@@ -232,7 +230,6 @@ require_relative "knockapi/resources/recipients/preferences"
|
|
|
232
230
|
require_relative "knockapi/resources/recipients/subscriptions"
|
|
233
231
|
require_relative "knockapi/resources/schedules"
|
|
234
232
|
require_relative "knockapi/resources/schedules/bulk"
|
|
235
|
-
require_relative "knockapi/resources/shared"
|
|
236
233
|
require_relative "knockapi/resources/tenants"
|
|
237
234
|
require_relative "knockapi/resources/tenants/bulk"
|
|
238
235
|
require_relative "knockapi/resources/users"
|
data/rbi/knockapi/client.rbi
CHANGED
data/rbi/knockapi/file_part.rbi
CHANGED
|
@@ -11,7 +11,7 @@ module Knockapi
|
|
|
11
11
|
T.any(Knockapi::AudienceAddMembersParams, Knockapi::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
# A list of audience members to add.
|
|
14
|
+
# A list of audience members to add. Limited to 1,000 members per request.
|
|
15
15
|
sig { returns(T::Array[Knockapi::AudienceAddMembersParams::Member]) }
|
|
16
16
|
attr_accessor :members
|
|
17
17
|
|
|
@@ -22,7 +22,7 @@ module Knockapi
|
|
|
22
22
|
).returns(T.attached_class)
|
|
23
23
|
end
|
|
24
24
|
def self.new(
|
|
25
|
-
# A list of audience members to add.
|
|
25
|
+
# A list of audience members to add. Limited to 1,000 members per request.
|
|
26
26
|
members:,
|
|
27
27
|
request_options: {}
|
|
28
28
|
)
|
|
@@ -19,9 +19,9 @@ module Knockapi
|
|
|
19
19
|
T::Hash[
|
|
20
20
|
Symbol,
|
|
21
21
|
T.any(
|
|
22
|
-
Knockapi::Recipients::
|
|
23
|
-
Knockapi::Recipients::
|
|
24
|
-
Knockapi::Recipients::InlineChannelDataRequestItem::
|
|
22
|
+
Knockapi::Recipients::InlineChannelDataRequestItem::PushChannelDataTokensOnly,
|
|
23
|
+
Knockapi::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataTargetArNsOnly,
|
|
24
|
+
Knockapi::Recipients::InlineChannelDataRequestItem::OneSignalChannelDataPlayerIDsOnly,
|
|
25
25
|
Knockapi::Recipients::SlackChannelData,
|
|
26
26
|
Knockapi::Recipients::MsTeamsChannelData,
|
|
27
27
|
Knockapi::Recipients::DiscordChannelData
|
|
@@ -81,9 +81,9 @@ module Knockapi
|
|
|
81
81
|
T::Hash[
|
|
82
82
|
Symbol,
|
|
83
83
|
T.any(
|
|
84
|
-
Knockapi::Recipients::
|
|
85
|
-
Knockapi::Recipients::
|
|
86
|
-
Knockapi::Recipients::InlineChannelDataRequestItem::
|
|
84
|
+
Knockapi::Recipients::InlineChannelDataRequestItem::PushChannelDataTokensOnly::OrHash,
|
|
85
|
+
Knockapi::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataTargetArNsOnly::OrHash,
|
|
86
|
+
Knockapi::Recipients::InlineChannelDataRequestItem::OneSignalChannelDataPlayerIDsOnly::OrHash,
|
|
87
87
|
Knockapi::Recipients::SlackChannelData::OrHash,
|
|
88
88
|
Knockapi::Recipients::MsTeamsChannelData::OrHash,
|
|
89
89
|
Knockapi::Recipients::DiscordChannelData::OrHash
|
|
@@ -142,9 +142,9 @@ module Knockapi
|
|
|
142
142
|
T::Hash[
|
|
143
143
|
Symbol,
|
|
144
144
|
T.any(
|
|
145
|
-
Knockapi::Recipients::
|
|
146
|
-
Knockapi::Recipients::
|
|
147
|
-
Knockapi::Recipients::InlineChannelDataRequestItem::
|
|
145
|
+
Knockapi::Recipients::InlineChannelDataRequestItem::PushChannelDataTokensOnly,
|
|
146
|
+
Knockapi::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataTargetArNsOnly,
|
|
147
|
+
Knockapi::Recipients::InlineChannelDataRequestItem::OneSignalChannelDataPlayerIDsOnly,
|
|
148
148
|
Knockapi::Recipients::SlackChannelData,
|
|
149
149
|
Knockapi::Recipients::MsTeamsChannelData,
|
|
150
150
|
Knockapi::Recipients::DiscordChannelData
|
|
@@ -26,9 +26,9 @@ module Knockapi
|
|
|
26
26
|
T::Hash[
|
|
27
27
|
Symbol,
|
|
28
28
|
T.any(
|
|
29
|
-
Knockapi::Recipients::
|
|
30
|
-
Knockapi::Recipients::
|
|
31
|
-
Knockapi::Recipients::InlineChannelDataRequestItem::
|
|
29
|
+
Knockapi::Recipients::InlineChannelDataRequestItem::PushChannelDataTokensOnly,
|
|
30
|
+
Knockapi::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataTargetArNsOnly,
|
|
31
|
+
Knockapi::Recipients::InlineChannelDataRequestItem::OneSignalChannelDataPlayerIDsOnly,
|
|
32
32
|
Knockapi::Recipients::SlackChannelData,
|
|
33
33
|
Knockapi::Recipients::MsTeamsChannelData,
|
|
34
34
|
Knockapi::Recipients::DiscordChannelData
|
|
@@ -90,9 +90,9 @@ module Knockapi
|
|
|
90
90
|
T::Hash[
|
|
91
91
|
Symbol,
|
|
92
92
|
T.any(
|
|
93
|
-
Knockapi::Recipients::
|
|
94
|
-
Knockapi::Recipients::
|
|
95
|
-
Knockapi::Recipients::InlineChannelDataRequestItem::
|
|
93
|
+
Knockapi::Recipients::InlineChannelDataRequestItem::PushChannelDataTokensOnly::OrHash,
|
|
94
|
+
Knockapi::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataTargetArNsOnly::OrHash,
|
|
95
|
+
Knockapi::Recipients::InlineChannelDataRequestItem::OneSignalChannelDataPlayerIDsOnly::OrHash,
|
|
96
96
|
Knockapi::Recipients::SlackChannelData::OrHash,
|
|
97
97
|
Knockapi::Recipients::MsTeamsChannelData::OrHash,
|
|
98
98
|
Knockapi::Recipients::DiscordChannelData::OrHash
|
|
@@ -154,9 +154,9 @@ module Knockapi
|
|
|
154
154
|
T::Hash[
|
|
155
155
|
Symbol,
|
|
156
156
|
T.any(
|
|
157
|
-
Knockapi::Recipients::
|
|
158
|
-
Knockapi::Recipients::
|
|
159
|
-
Knockapi::Recipients::InlineChannelDataRequestItem::
|
|
157
|
+
Knockapi::Recipients::InlineChannelDataRequestItem::PushChannelDataTokensOnly,
|
|
158
|
+
Knockapi::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataTargetArNsOnly,
|
|
159
|
+
Knockapi::Recipients::InlineChannelDataRequestItem::OneSignalChannelDataPlayerIDsOnly,
|
|
160
160
|
Knockapi::Recipients::SlackChannelData,
|
|
161
161
|
Knockapi::Recipients::MsTeamsChannelData,
|
|
162
162
|
Knockapi::Recipients::DiscordChannelData
|
|
@@ -23,9 +23,9 @@ module Knockapi
|
|
|
23
23
|
T::Hash[
|
|
24
24
|
Symbol,
|
|
25
25
|
T.any(
|
|
26
|
-
Knockapi::Recipients::
|
|
27
|
-
Knockapi::Recipients::
|
|
28
|
-
Knockapi::Recipients::InlineChannelDataRequestItem::
|
|
26
|
+
Knockapi::Recipients::InlineChannelDataRequestItem::PushChannelDataTokensOnly,
|
|
27
|
+
Knockapi::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataTargetArNsOnly,
|
|
28
|
+
Knockapi::Recipients::InlineChannelDataRequestItem::OneSignalChannelDataPlayerIDsOnly,
|
|
29
29
|
Knockapi::Recipients::SlackChannelData,
|
|
30
30
|
Knockapi::Recipients::MsTeamsChannelData,
|
|
31
31
|
Knockapi::Recipients::DiscordChannelData
|
|
@@ -60,9 +60,9 @@ module Knockapi
|
|
|
60
60
|
T::Hash[
|
|
61
61
|
Symbol,
|
|
62
62
|
T.any(
|
|
63
|
-
Knockapi::Recipients::
|
|
64
|
-
Knockapi::Recipients::
|
|
65
|
-
Knockapi::Recipients::InlineChannelDataRequestItem::
|
|
63
|
+
Knockapi::Recipients::InlineChannelDataRequestItem::PushChannelDataTokensOnly::OrHash,
|
|
64
|
+
Knockapi::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataTargetArNsOnly::OrHash,
|
|
65
|
+
Knockapi::Recipients::InlineChannelDataRequestItem::OneSignalChannelDataPlayerIDsOnly::OrHash,
|
|
66
66
|
Knockapi::Recipients::SlackChannelData::OrHash,
|
|
67
67
|
Knockapi::Recipients::MsTeamsChannelData::OrHash,
|
|
68
68
|
Knockapi::Recipients::DiscordChannelData::OrHash
|
|
@@ -105,9 +105,9 @@ module Knockapi
|
|
|
105
105
|
T::Hash[
|
|
106
106
|
Symbol,
|
|
107
107
|
T.any(
|
|
108
|
-
Knockapi::Recipients::
|
|
109
|
-
Knockapi::Recipients::
|
|
110
|
-
Knockapi::Recipients::InlineChannelDataRequestItem::
|
|
108
|
+
Knockapi::Recipients::InlineChannelDataRequestItem::PushChannelDataTokensOnly,
|
|
109
|
+
Knockapi::Recipients::InlineChannelDataRequestItem::AwssnsPushChannelDataTargetArNsOnly,
|
|
110
|
+
Knockapi::Recipients::InlineChannelDataRequestItem::OneSignalChannelDataPlayerIDsOnly,
|
|
111
111
|
Knockapi::Recipients::SlackChannelData,
|
|
112
112
|
Knockapi::Recipients::MsTeamsChannelData,
|
|
113
113
|
Knockapi::Recipients::DiscordChannelData
|
|
@@ -14,7 +14,7 @@ module Knockapi
|
|
|
14
14
|
sig { returns(String) }
|
|
15
15
|
attr_accessor :_typename
|
|
16
16
|
|
|
17
|
-
#
|
|
17
|
+
# Deprecated, use channel.id instead.
|
|
18
18
|
sig { returns(String) }
|
|
19
19
|
attr_accessor :channel_id
|
|
20
20
|
|
|
@@ -33,7 +33,7 @@ module Knockapi
|
|
|
33
33
|
sig { returns(Knockapi::RecipientReference::Variants) }
|
|
34
34
|
attr_accessor :recipient
|
|
35
35
|
|
|
36
|
-
# The workflow that triggered the message.
|
|
36
|
+
# The workflow or guide that triggered the message.
|
|
37
37
|
sig { returns(Knockapi::Message::Source) }
|
|
38
38
|
attr_reader :source
|
|
39
39
|
|
|
@@ -73,6 +73,13 @@ module Knockapi
|
|
|
73
73
|
sig { returns(T.nilable(Time)) }
|
|
74
74
|
attr_accessor :archived_at
|
|
75
75
|
|
|
76
|
+
# A configured channel, which is a way to route messages to a provider.
|
|
77
|
+
sig { returns(T.nilable(Knockapi::Message::Channel)) }
|
|
78
|
+
attr_reader :channel
|
|
79
|
+
|
|
80
|
+
sig { params(channel: Knockapi::Message::Channel::OrHash).void }
|
|
81
|
+
attr_writer :channel
|
|
82
|
+
|
|
76
83
|
# Timestamp when the message was clicked.
|
|
77
84
|
sig { returns(T.nilable(Time)) }
|
|
78
85
|
attr_accessor :clicked_at
|
|
@@ -144,6 +151,7 @@ module Knockapi
|
|
|
144
151
|
)
|
|
145
152
|
],
|
|
146
153
|
archived_at: T.nilable(Time),
|
|
154
|
+
channel: Knockapi::Message::Channel::OrHash,
|
|
147
155
|
clicked_at: T.nilable(Time),
|
|
148
156
|
data: T.nilable(T::Hash[Symbol, T.anything]),
|
|
149
157
|
interacted_at: T.nilable(Time),
|
|
@@ -161,7 +169,7 @@ module Knockapi
|
|
|
161
169
|
id:,
|
|
162
170
|
# The typename of the schema.
|
|
163
171
|
_typename:,
|
|
164
|
-
#
|
|
172
|
+
# Deprecated, use channel.id instead.
|
|
165
173
|
channel_id:,
|
|
166
174
|
# A list of engagement statuses.
|
|
167
175
|
engagement_statuses:,
|
|
@@ -170,7 +178,7 @@ module Knockapi
|
|
|
170
178
|
# A reference to a recipient, either a user identifier (string) or an object
|
|
171
179
|
# reference (ID, collection).
|
|
172
180
|
recipient:,
|
|
173
|
-
# The workflow that triggered the message.
|
|
181
|
+
# The workflow or guide that triggered the message.
|
|
174
182
|
source:,
|
|
175
183
|
# The message delivery status.
|
|
176
184
|
status:,
|
|
@@ -182,6 +190,8 @@ module Knockapi
|
|
|
182
190
|
actors: nil,
|
|
183
191
|
# Timestamp when the message was archived.
|
|
184
192
|
archived_at: nil,
|
|
193
|
+
# A configured channel, which is a way to route messages to a provider.
|
|
194
|
+
channel: nil,
|
|
185
195
|
# Timestamp when the message was clicked.
|
|
186
196
|
clicked_at: nil,
|
|
187
197
|
# Data associated with the message’s workflow run. Includes the workflow trigger
|
|
@@ -225,6 +235,7 @@ module Knockapi
|
|
|
225
235
|
updated_at: Time,
|
|
226
236
|
actors: T::Array[Knockapi::RecipientReference::Variants],
|
|
227
237
|
archived_at: T.nilable(Time),
|
|
238
|
+
channel: Knockapi::Message::Channel,
|
|
228
239
|
clicked_at: T.nilable(Time),
|
|
229
240
|
data: T.nilable(T::Hash[Symbol, T.anything]),
|
|
230
241
|
interacted_at: T.nilable(Time),
|
|
@@ -284,11 +295,11 @@ module Knockapi
|
|
|
284
295
|
sig { returns(T::Array[String]) }
|
|
285
296
|
attr_accessor :categories
|
|
286
297
|
|
|
287
|
-
# The key of the workflow that triggered the message.
|
|
298
|
+
# The key of the workflow or guide that triggered the message.
|
|
288
299
|
sig { returns(String) }
|
|
289
300
|
attr_accessor :key
|
|
290
301
|
|
|
291
|
-
# The ID of the version of the workflow that triggered the message.
|
|
302
|
+
# The ID of the version of the workflow or guide that triggered the message.
|
|
292
303
|
sig { returns(String) }
|
|
293
304
|
attr_accessor :version_id
|
|
294
305
|
|
|
@@ -296,26 +307,38 @@ module Knockapi
|
|
|
296
307
|
sig { returns(T.nilable(String)) }
|
|
297
308
|
attr_accessor :step_ref
|
|
298
309
|
|
|
299
|
-
#
|
|
310
|
+
# Whether this message was generated from a workflow, broadcast, or guide.
|
|
311
|
+
sig do
|
|
312
|
+
returns(T.nilable(Knockapi::Message::Source::Type::TaggedSymbol))
|
|
313
|
+
end
|
|
314
|
+
attr_reader :type
|
|
315
|
+
|
|
316
|
+
sig { params(type: Knockapi::Message::Source::Type::OrSymbol).void }
|
|
317
|
+
attr_writer :type
|
|
318
|
+
|
|
319
|
+
# The workflow or guide that triggered the message.
|
|
300
320
|
sig do
|
|
301
321
|
params(
|
|
302
322
|
_typename: String,
|
|
303
323
|
categories: T::Array[String],
|
|
304
324
|
key: String,
|
|
305
325
|
version_id: String,
|
|
306
|
-
step_ref: T.nilable(String)
|
|
326
|
+
step_ref: T.nilable(String),
|
|
327
|
+
type: Knockapi::Message::Source::Type::OrSymbol
|
|
307
328
|
).returns(T.attached_class)
|
|
308
329
|
end
|
|
309
330
|
def self.new(
|
|
310
331
|
_typename:,
|
|
311
332
|
# The categories associated with the message.
|
|
312
333
|
categories:,
|
|
313
|
-
# The key of the workflow that triggered the message.
|
|
334
|
+
# The key of the workflow or guide that triggered the message.
|
|
314
335
|
key:,
|
|
315
|
-
# The ID of the version of the workflow that triggered the message.
|
|
336
|
+
# The ID of the version of the workflow or guide that triggered the message.
|
|
316
337
|
version_id:,
|
|
317
338
|
# The step reference for the step in the workflow that generated the message.
|
|
318
|
-
step_ref: nil
|
|
339
|
+
step_ref: nil,
|
|
340
|
+
# Whether this message was generated from a workflow, broadcast, or guide.
|
|
341
|
+
type: nil
|
|
319
342
|
)
|
|
320
343
|
end
|
|
321
344
|
|
|
@@ -326,12 +349,36 @@ module Knockapi
|
|
|
326
349
|
categories: T::Array[String],
|
|
327
350
|
key: String,
|
|
328
351
|
version_id: String,
|
|
329
|
-
step_ref: T.nilable(String)
|
|
352
|
+
step_ref: T.nilable(String),
|
|
353
|
+
type: Knockapi::Message::Source::Type::TaggedSymbol
|
|
330
354
|
}
|
|
331
355
|
)
|
|
332
356
|
end
|
|
333
357
|
def to_hash
|
|
334
358
|
end
|
|
359
|
+
|
|
360
|
+
# Whether this message was generated from a workflow, broadcast, or guide.
|
|
361
|
+
module Type
|
|
362
|
+
extend Knockapi::Internal::Type::Enum
|
|
363
|
+
|
|
364
|
+
TaggedSymbol =
|
|
365
|
+
T.type_alias { T.all(Symbol, Knockapi::Message::Source::Type) }
|
|
366
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
367
|
+
|
|
368
|
+
BROADCAST =
|
|
369
|
+
T.let(:broadcast, Knockapi::Message::Source::Type::TaggedSymbol)
|
|
370
|
+
WORKFLOW =
|
|
371
|
+
T.let(:workflow, Knockapi::Message::Source::Type::TaggedSymbol)
|
|
372
|
+
GUIDE = T.let(:guide, Knockapi::Message::Source::Type::TaggedSymbol)
|
|
373
|
+
|
|
374
|
+
sig do
|
|
375
|
+
override.returns(
|
|
376
|
+
T::Array[Knockapi::Message::Source::Type::TaggedSymbol]
|
|
377
|
+
)
|
|
378
|
+
end
|
|
379
|
+
def self.values
|
|
380
|
+
end
|
|
381
|
+
end
|
|
335
382
|
end
|
|
336
383
|
|
|
337
384
|
# The message delivery status.
|
|
@@ -357,6 +404,116 @@ module Knockapi
|
|
|
357
404
|
def self.values
|
|
358
405
|
end
|
|
359
406
|
end
|
|
407
|
+
|
|
408
|
+
class Channel < Knockapi::Internal::Type::BaseModel
|
|
409
|
+
OrHash =
|
|
410
|
+
T.type_alias do
|
|
411
|
+
T.any(Knockapi::Message::Channel, Knockapi::Internal::AnyHash)
|
|
412
|
+
end
|
|
413
|
+
|
|
414
|
+
# The unique identifier for the channel.
|
|
415
|
+
sig { returns(String) }
|
|
416
|
+
attr_accessor :id
|
|
417
|
+
|
|
418
|
+
# The timestamp of when the channel was created.
|
|
419
|
+
sig { returns(Time) }
|
|
420
|
+
attr_accessor :created_at
|
|
421
|
+
|
|
422
|
+
# The ID of the provider that this channel uses to deliver messages.
|
|
423
|
+
sig { returns(String) }
|
|
424
|
+
attr_accessor :provider
|
|
425
|
+
|
|
426
|
+
# The type of channel, determining what kind of messages it can send.
|
|
427
|
+
sig { returns(Knockapi::Message::Channel::Type::TaggedSymbol) }
|
|
428
|
+
attr_accessor :type
|
|
429
|
+
|
|
430
|
+
# The timestamp of when the channel was last updated.
|
|
431
|
+
sig { returns(Time) }
|
|
432
|
+
attr_accessor :updated_at
|
|
433
|
+
|
|
434
|
+
# Unique identifier for the channel within a project (immutable once created).
|
|
435
|
+
sig { returns(T.nilable(String)) }
|
|
436
|
+
attr_accessor :key
|
|
437
|
+
|
|
438
|
+
# The human-readable name of the channel.
|
|
439
|
+
sig { returns(T.nilable(String)) }
|
|
440
|
+
attr_accessor :name
|
|
441
|
+
|
|
442
|
+
# A configured channel, which is a way to route messages to a provider.
|
|
443
|
+
sig do
|
|
444
|
+
params(
|
|
445
|
+
id: String,
|
|
446
|
+
created_at: Time,
|
|
447
|
+
provider: String,
|
|
448
|
+
type: Knockapi::Message::Channel::Type::OrSymbol,
|
|
449
|
+
updated_at: Time,
|
|
450
|
+
key: T.nilable(String),
|
|
451
|
+
name: T.nilable(String)
|
|
452
|
+
).returns(T.attached_class)
|
|
453
|
+
end
|
|
454
|
+
def self.new(
|
|
455
|
+
# The unique identifier for the channel.
|
|
456
|
+
id:,
|
|
457
|
+
# The timestamp of when the channel was created.
|
|
458
|
+
created_at:,
|
|
459
|
+
# The ID of the provider that this channel uses to deliver messages.
|
|
460
|
+
provider:,
|
|
461
|
+
# The type of channel, determining what kind of messages it can send.
|
|
462
|
+
type:,
|
|
463
|
+
# The timestamp of when the channel was last updated.
|
|
464
|
+
updated_at:,
|
|
465
|
+
# Unique identifier for the channel within a project (immutable once created).
|
|
466
|
+
key: nil,
|
|
467
|
+
# The human-readable name of the channel.
|
|
468
|
+
name: nil
|
|
469
|
+
)
|
|
470
|
+
end
|
|
471
|
+
|
|
472
|
+
sig do
|
|
473
|
+
override.returns(
|
|
474
|
+
{
|
|
475
|
+
id: String,
|
|
476
|
+
created_at: Time,
|
|
477
|
+
provider: String,
|
|
478
|
+
type: Knockapi::Message::Channel::Type::TaggedSymbol,
|
|
479
|
+
updated_at: Time,
|
|
480
|
+
key: T.nilable(String),
|
|
481
|
+
name: T.nilable(String)
|
|
482
|
+
}
|
|
483
|
+
)
|
|
484
|
+
end
|
|
485
|
+
def to_hash
|
|
486
|
+
end
|
|
487
|
+
|
|
488
|
+
# The type of channel, determining what kind of messages it can send.
|
|
489
|
+
module Type
|
|
490
|
+
extend Knockapi::Internal::Type::Enum
|
|
491
|
+
|
|
492
|
+
TaggedSymbol =
|
|
493
|
+
T.type_alias { T.all(Symbol, Knockapi::Message::Channel::Type) }
|
|
494
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
495
|
+
|
|
496
|
+
EMAIL = T.let(:email, Knockapi::Message::Channel::Type::TaggedSymbol)
|
|
497
|
+
IN_APP =
|
|
498
|
+
T.let(:in_app, Knockapi::Message::Channel::Type::TaggedSymbol)
|
|
499
|
+
IN_APP_FEED =
|
|
500
|
+
T.let(:in_app_feed, Knockapi::Message::Channel::Type::TaggedSymbol)
|
|
501
|
+
IN_APP_GUIDE =
|
|
502
|
+
T.let(:in_app_guide, Knockapi::Message::Channel::Type::TaggedSymbol)
|
|
503
|
+
SMS = T.let(:sms, Knockapi::Message::Channel::Type::TaggedSymbol)
|
|
504
|
+
PUSH = T.let(:push, Knockapi::Message::Channel::Type::TaggedSymbol)
|
|
505
|
+
CHAT = T.let(:chat, Knockapi::Message::Channel::Type::TaggedSymbol)
|
|
506
|
+
HTTP = T.let(:http, Knockapi::Message::Channel::Type::TaggedSymbol)
|
|
507
|
+
|
|
508
|
+
sig do
|
|
509
|
+
override.returns(
|
|
510
|
+
T::Array[Knockapi::Message::Channel::Type::TaggedSymbol]
|
|
511
|
+
)
|
|
512
|
+
end
|
|
513
|
+
def self.values
|
|
514
|
+
end
|
|
515
|
+
end
|
|
516
|
+
end
|
|
360
517
|
end
|
|
361
518
|
end
|
|
362
519
|
end
|