knockapi 1.38.0 → 1.40.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 +48 -0
- data/README.md +1 -1
- data/lib/knockapi/models/audience_add_members_params.rb +3 -30
- data/lib/knockapi/models/audience_member_request.rb +32 -0
- data/lib/knockapi/models/audience_remove_members_params.rb +3 -30
- data/lib/knockapi/models/list_messages_response.rb +26 -0
- data/lib/knockapi/models/list_schedules_response.rb +26 -0
- data/lib/knockapi/models/list_subscriptions_response.rb +26 -0
- data/lib/knockapi/models/message.rb +37 -11
- data/lib/knockapi/models/{message_get_content_response.rb → message_contents.rb} +30 -156
- data/lib/knockapi/models/message_event.rb +3 -3
- data/lib/knockapi/models/message_in_app_feed_button_set_block.rb +76 -0
- data/lib/knockapi/models/message_in_app_feed_content_block.rb +55 -0
- data/lib/knockapi/models/messages/batch_archive_params.rb +2 -10
- data/lib/knockapi/models/messages/batch_get_content_response.rb +1 -495
- data/lib/knockapi/models/messages/batch_mark_as_read_params.rb +2 -10
- data/lib/knockapi/models/messages/batch_mark_as_seen_params.rb +2 -10
- data/lib/knockapi/models/messages/batch_mark_as_unread_params.rb +2 -10
- data/lib/knockapi/models/messages/batch_mark_as_unseen_params.rb +2 -10
- data/lib/knockapi/models/messages/batch_messages_status_request.rb +20 -0
- data/lib/knockapi/models/messages/batch_unarchive_params.rb +2 -10
- data/lib/knockapi/models/preference_set_commercial_subscribed_setting.rb +19 -0
- data/lib/knockapi/models/recipients/preference_set.rb +26 -4
- data/lib/knockapi/models/recipients/preference_set_request.rb +26 -4
- data/lib/knockapi/models/recipients/slack_channel_data.rb +9 -1
- data/lib/knockapi/models/users/bulk_set_preferences_params.rb +26 -4
- data/lib/knockapi/models/users/feed_list_items_response.rb +5 -128
- data/lib/knockapi/models/users/{guide_mark_message_as_archived_response.rb → guide_action_response.rb} +1 -1
- data/lib/knockapi/models/users/guide_archived_request.rb +72 -0
- data/lib/knockapi/models/users/guide_interacted_request.rb +60 -0
- data/lib/knockapi/models/users/guide_mark_message_as_archived_params.rb +2 -82
- data/lib/knockapi/models/users/guide_mark_message_as_interacted_params.rb +2 -82
- data/lib/knockapi/models/users/guide_mark_message_as_seen_params.rb +2 -82
- data/lib/knockapi/models/users/guide_reset_guide_engagements_params.rb +39 -0
- data/lib/knockapi/models/users/guide_seen_request.rb +68 -0
- data/lib/knockapi/models/users/guide_unarchive_guide_message_params.rb +39 -0
- data/lib/knockapi/models/users/preference_center_branding_config.rb +50 -0
- data/lib/knockapi/models/users/preference_center_generate_signed_url_params.rb +22 -0
- data/lib/knockapi/models/users/preference_center_generate_signed_url_response.rb +34 -0
- data/lib/knockapi/models/users/preference_center_get_config_params.rb +22 -0
- data/lib/knockapi/models/users/preference_center_get_config_response.rb +221 -0
- data/lib/knockapi/models.rb +16 -0
- data/lib/knockapi/resources/audiences.rb +2 -2
- data/lib/knockapi/resources/messages/batch.rb +2 -2
- data/lib/knockapi/resources/messages.rb +2 -2
- data/lib/knockapi/resources/objects.rb +1 -1
- data/lib/knockapi/resources/users/guides.rb +79 -42
- data/lib/knockapi/resources/users/preference_center.rb +60 -0
- data/lib/knockapi/resources/users.rb +7 -1
- data/lib/knockapi/version.rb +1 -1
- data/lib/knockapi.rb +21 -4
- data/rbi/knockapi/models/audience_add_members_params.rbi +3 -56
- data/rbi/knockapi/models/audience_member_request.rbi +55 -0
- data/rbi/knockapi/models/audience_remove_members_params.rbi +3 -57
- data/rbi/knockapi/models/list_messages_response.rbi +46 -0
- data/rbi/knockapi/models/list_schedules_response.rbi +49 -0
- data/rbi/knockapi/models/list_subscriptions_response.rbi +52 -0
- data/rbi/knockapi/models/message.rbi +50 -18
- data/rbi/knockapi/models/{message_get_content_response.rbi → message_contents.rbi} +43 -299
- data/rbi/knockapi/models/message_event.rbi +9 -9
- data/rbi/knockapi/models/message_in_app_feed_button_set_block.rbi +133 -0
- data/rbi/knockapi/models/message_in_app_feed_content_block.rbi +97 -0
- data/rbi/knockapi/models/messages/batch_archive_params.rbi +6 -22
- data/rbi/knockapi/models/messages/batch_get_content_response.rbi +1 -879
- data/rbi/knockapi/models/messages/batch_mark_as_read_params.rbi +6 -22
- data/rbi/knockapi/models/messages/batch_mark_as_seen_params.rbi +6 -22
- data/rbi/knockapi/models/messages/batch_mark_as_unread_params.rbi +6 -22
- data/rbi/knockapi/models/messages/batch_mark_as_unseen_params.rbi +6 -22
- data/rbi/knockapi/models/messages/batch_messages_status_request.rbi +33 -0
- data/rbi/knockapi/models/messages/batch_unarchive_params.rbi +6 -22
- data/rbi/knockapi/models/preference_set_commercial_subscribed_setting.rbi +36 -0
- data/rbi/knockapi/models/recipients/preference_set.rbi +50 -5
- data/rbi/knockapi/models/recipients/preference_set_request.rbi +56 -5
- data/rbi/knockapi/models/recipients/slack_channel_data.rbi +8 -0
- data/rbi/knockapi/models/users/bulk_set_preferences_params.rbi +56 -5
- data/rbi/knockapi/models/users/feed_list_items_response.rbi +4 -251
- data/rbi/knockapi/models/users/{guide_mark_message_as_seen_response.rbi → guide_action_response.rbi} +2 -2
- data/rbi/knockapi/models/users/guide_archived_request.rbi +102 -0
- data/rbi/knockapi/models/users/guide_interacted_request.rbi +89 -0
- data/rbi/knockapi/models/users/guide_mark_message_as_archived_params.rbi +3 -99
- data/rbi/knockapi/models/users/guide_mark_message_as_interacted_params.rbi +3 -99
- data/rbi/knockapi/models/users/guide_mark_message_as_seen_params.rbi +3 -99
- data/rbi/knockapi/models/users/guide_reset_guide_engagements_params.rbi +65 -0
- data/rbi/knockapi/models/users/guide_seen_request.rbi +97 -0
- data/rbi/knockapi/models/users/guide_unarchive_guide_message_params.rbi +65 -0
- data/rbi/knockapi/models/users/preference_center_branding_config.rbi +72 -0
- data/rbi/knockapi/models/users/preference_center_generate_signed_url_params.rbi +40 -0
- data/rbi/knockapi/models/users/preference_center_generate_signed_url_response.rbi +41 -0
- data/rbi/knockapi/models/users/preference_center_get_config_params.rbi +40 -0
- data/rbi/knockapi/models/users/preference_center_get_config_response.rbi +476 -0
- data/rbi/knockapi/models.rbi +18 -0
- data/rbi/knockapi/resources/audiences.rbi +2 -3
- data/rbi/knockapi/resources/messages/batch.rbi +1 -3
- data/rbi/knockapi/resources/messages.rbi +1 -1
- data/rbi/knockapi/resources/objects.rbi +10 -2
- data/rbi/knockapi/resources/users/guides.rbi +56 -42
- data/rbi/knockapi/resources/users/preference_center.rbi +48 -0
- data/rbi/knockapi/resources/users.rbi +15 -2
- data/sig/knockapi/models/audience_add_members_params.rbs +4 -23
- data/sig/knockapi/models/audience_member_request.rbs +22 -0
- data/sig/knockapi/models/audience_remove_members_params.rbs +4 -26
- data/sig/knockapi/models/list_messages_response.rbs +22 -0
- data/sig/knockapi/models/list_schedules_response.rbs +22 -0
- data/sig/knockapi/models/list_subscriptions_response.rbs +25 -0
- data/sig/knockapi/models/message.rbs +28 -5
- data/sig/knockapi/models/message_contents.rbs +286 -0
- data/sig/knockapi/models/message_event.rbs +6 -6
- data/sig/knockapi/models/message_in_app_feed_button_set_block.rbs +54 -0
- data/sig/knockapi/models/message_in_app_feed_content_block.rbs +46 -0
- data/sig/knockapi/models/messages/batch_archive_params.rbs +4 -13
- data/sig/knockapi/models/messages/batch_get_content_response.rbs +1 -391
- data/sig/knockapi/models/messages/batch_mark_as_read_params.rbs +4 -13
- data/sig/knockapi/models/messages/batch_mark_as_seen_params.rbs +4 -13
- data/sig/knockapi/models/messages/batch_mark_as_unread_params.rbs +4 -13
- data/sig/knockapi/models/messages/batch_mark_as_unseen_params.rbs +4 -13
- data/sig/knockapi/models/messages/batch_messages_status_request.rbs +15 -0
- data/sig/knockapi/models/messages/batch_unarchive_params.rbs +4 -13
- data/sig/knockapi/models/preference_set_commercial_subscribed_setting.rbs +14 -0
- data/sig/knockapi/models/recipients/preference_set.rbs +13 -4
- data/sig/knockapi/models/recipients/preference_set_request.rbs +13 -4
- data/sig/knockapi/models/recipients/slack_channel_data.rbs +10 -1
- data/sig/knockapi/models/users/bulk_set_preferences_params.rbs +13 -4
- data/sig/knockapi/models/users/feed_list_items_response.rbs +2 -100
- data/sig/knockapi/models/users/{guide_mark_message_as_seen_response.rbs → guide_action_response.rbs} +2 -2
- data/sig/knockapi/models/users/guide_archived_request.rbs +58 -0
- data/sig/knockapi/models/users/guide_interacted_request.rbs +51 -0
- data/sig/knockapi/models/users/guide_mark_message_as_archived_params.rbs +4 -63
- data/sig/knockapi/models/users/guide_mark_message_as_interacted_params.rbs +4 -63
- data/sig/knockapi/models/users/guide_mark_message_as_seen_params.rbs +4 -63
- data/sig/knockapi/models/users/guide_reset_guide_engagements_params.rbs +36 -0
- data/sig/knockapi/models/users/guide_seen_request.rbs +56 -0
- data/sig/knockapi/models/users/guide_unarchive_guide_message_params.rbs +36 -0
- data/sig/knockapi/models/users/preference_center_branding_config.rbs +37 -0
- data/sig/knockapi/models/users/preference_center_generate_signed_url_params.rbs +25 -0
- data/sig/knockapi/models/users/preference_center_generate_signed_url_response.rbs +18 -0
- data/sig/knockapi/models/users/preference_center_get_config_params.rbs +25 -0
- data/sig/knockapi/models/users/preference_center_get_config_response.rbs +189 -0
- data/sig/knockapi/models.rbs +16 -0
- data/sig/knockapi/resources/audiences.rbs +2 -2
- data/sig/knockapi/resources/messages.rbs +1 -1
- data/sig/knockapi/resources/objects.rbs +1 -1
- data/sig/knockapi/resources/users/guides.rbs +22 -18
- data/sig/knockapi/resources/users/preference_center.rbs +19 -0
- data/sig/knockapi/resources/users.rbs +3 -1
- metadata +65 -14
- data/lib/knockapi/models/users/guide_mark_message_as_interacted_response.rb +0 -21
- data/lib/knockapi/models/users/guide_mark_message_as_seen_response.rb +0 -21
- data/rbi/knockapi/models/users/guide_mark_message_as_archived_response.rbi +0 -33
- data/rbi/knockapi/models/users/guide_mark_message_as_interacted_response.rbi +0 -33
- data/sig/knockapi/models/message_get_content_response.rbs +0 -384
- data/sig/knockapi/models/users/guide_mark_message_as_archived_response.rbs +0 -15
- data/sig/knockapi/models/users/guide_mark_message_as_interacted_response.rbs +0 -15
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Knockapi
|
|
4
4
|
module Models
|
|
5
5
|
module Messages
|
|
6
|
-
class BatchMarkAsReadParams < Knockapi::
|
|
6
|
+
class BatchMarkAsReadParams < Knockapi::Models::Messages::BatchMessagesStatusRequest
|
|
7
7
|
extend Knockapi::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Knockapi::Internal::Type::RequestParameters
|
|
9
9
|
|
|
@@ -15,31 +15,15 @@ module Knockapi
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
# The message IDs to update the status of.
|
|
19
|
-
sig { returns(T::Array[String]) }
|
|
20
|
-
attr_accessor :message_ids
|
|
21
|
-
|
|
22
18
|
sig do
|
|
23
|
-
params(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
).returns(T.attached_class)
|
|
19
|
+
params(request_options: Knockapi::RequestOptions::OrHash).returns(
|
|
20
|
+
T.attached_class
|
|
21
|
+
)
|
|
27
22
|
end
|
|
28
|
-
def self.new(
|
|
29
|
-
# The message IDs to update the status of.
|
|
30
|
-
message_ids:,
|
|
31
|
-
request_options: {}
|
|
32
|
-
)
|
|
23
|
+
def self.new(request_options: {})
|
|
33
24
|
end
|
|
34
25
|
|
|
35
|
-
sig
|
|
36
|
-
override.returns(
|
|
37
|
-
{
|
|
38
|
-
message_ids: T::Array[String],
|
|
39
|
-
request_options: Knockapi::RequestOptions
|
|
40
|
-
}
|
|
41
|
-
)
|
|
42
|
-
end
|
|
26
|
+
sig { override.returns({ request_options: Knockapi::RequestOptions }) }
|
|
43
27
|
def to_hash
|
|
44
28
|
end
|
|
45
29
|
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Knockapi
|
|
4
4
|
module Models
|
|
5
5
|
module Messages
|
|
6
|
-
class BatchMarkAsSeenParams < Knockapi::
|
|
6
|
+
class BatchMarkAsSeenParams < Knockapi::Models::Messages::BatchMessagesStatusRequest
|
|
7
7
|
extend Knockapi::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Knockapi::Internal::Type::RequestParameters
|
|
9
9
|
|
|
@@ -15,31 +15,15 @@ module Knockapi
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
# The message IDs to update the status of.
|
|
19
|
-
sig { returns(T::Array[String]) }
|
|
20
|
-
attr_accessor :message_ids
|
|
21
|
-
|
|
22
18
|
sig do
|
|
23
|
-
params(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
).returns(T.attached_class)
|
|
19
|
+
params(request_options: Knockapi::RequestOptions::OrHash).returns(
|
|
20
|
+
T.attached_class
|
|
21
|
+
)
|
|
27
22
|
end
|
|
28
|
-
def self.new(
|
|
29
|
-
# The message IDs to update the status of.
|
|
30
|
-
message_ids:,
|
|
31
|
-
request_options: {}
|
|
32
|
-
)
|
|
23
|
+
def self.new(request_options: {})
|
|
33
24
|
end
|
|
34
25
|
|
|
35
|
-
sig
|
|
36
|
-
override.returns(
|
|
37
|
-
{
|
|
38
|
-
message_ids: T::Array[String],
|
|
39
|
-
request_options: Knockapi::RequestOptions
|
|
40
|
-
}
|
|
41
|
-
)
|
|
42
|
-
end
|
|
26
|
+
sig { override.returns({ request_options: Knockapi::RequestOptions }) }
|
|
43
27
|
def to_hash
|
|
44
28
|
end
|
|
45
29
|
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Knockapi
|
|
4
4
|
module Models
|
|
5
5
|
module Messages
|
|
6
|
-
class BatchMarkAsUnreadParams < Knockapi::
|
|
6
|
+
class BatchMarkAsUnreadParams < Knockapi::Models::Messages::BatchMessagesStatusRequest
|
|
7
7
|
extend Knockapi::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Knockapi::Internal::Type::RequestParameters
|
|
9
9
|
|
|
@@ -15,31 +15,15 @@ module Knockapi
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
# The message IDs to update the status of.
|
|
19
|
-
sig { returns(T::Array[String]) }
|
|
20
|
-
attr_accessor :message_ids
|
|
21
|
-
|
|
22
18
|
sig do
|
|
23
|
-
params(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
).returns(T.attached_class)
|
|
19
|
+
params(request_options: Knockapi::RequestOptions::OrHash).returns(
|
|
20
|
+
T.attached_class
|
|
21
|
+
)
|
|
27
22
|
end
|
|
28
|
-
def self.new(
|
|
29
|
-
# The message IDs to update the status of.
|
|
30
|
-
message_ids:,
|
|
31
|
-
request_options: {}
|
|
32
|
-
)
|
|
23
|
+
def self.new(request_options: {})
|
|
33
24
|
end
|
|
34
25
|
|
|
35
|
-
sig
|
|
36
|
-
override.returns(
|
|
37
|
-
{
|
|
38
|
-
message_ids: T::Array[String],
|
|
39
|
-
request_options: Knockapi::RequestOptions
|
|
40
|
-
}
|
|
41
|
-
)
|
|
42
|
-
end
|
|
26
|
+
sig { override.returns({ request_options: Knockapi::RequestOptions }) }
|
|
43
27
|
def to_hash
|
|
44
28
|
end
|
|
45
29
|
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Knockapi
|
|
4
4
|
module Models
|
|
5
5
|
module Messages
|
|
6
|
-
class BatchMarkAsUnseenParams < Knockapi::
|
|
6
|
+
class BatchMarkAsUnseenParams < Knockapi::Models::Messages::BatchMessagesStatusRequest
|
|
7
7
|
extend Knockapi::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Knockapi::Internal::Type::RequestParameters
|
|
9
9
|
|
|
@@ -15,31 +15,15 @@ module Knockapi
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
# The message IDs to update the status of.
|
|
19
|
-
sig { returns(T::Array[String]) }
|
|
20
|
-
attr_accessor :message_ids
|
|
21
|
-
|
|
22
18
|
sig do
|
|
23
|
-
params(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
).returns(T.attached_class)
|
|
19
|
+
params(request_options: Knockapi::RequestOptions::OrHash).returns(
|
|
20
|
+
T.attached_class
|
|
21
|
+
)
|
|
27
22
|
end
|
|
28
|
-
def self.new(
|
|
29
|
-
# The message IDs to update the status of.
|
|
30
|
-
message_ids:,
|
|
31
|
-
request_options: {}
|
|
32
|
-
)
|
|
23
|
+
def self.new(request_options: {})
|
|
33
24
|
end
|
|
34
25
|
|
|
35
|
-
sig
|
|
36
|
-
override.returns(
|
|
37
|
-
{
|
|
38
|
-
message_ids: T::Array[String],
|
|
39
|
-
request_options: Knockapi::RequestOptions
|
|
40
|
-
}
|
|
41
|
-
)
|
|
42
|
-
end
|
|
26
|
+
sig { override.returns({ request_options: Knockapi::RequestOptions }) }
|
|
43
27
|
def to_hash
|
|
44
28
|
end
|
|
45
29
|
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Knockapi
|
|
4
|
+
module Models
|
|
5
|
+
module Messages
|
|
6
|
+
class BatchMessagesStatusRequest < Knockapi::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
Knockapi::Messages::BatchMessagesStatusRequest,
|
|
11
|
+
Knockapi::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# The message IDs to update the status of.
|
|
16
|
+
sig { returns(T::Array[String]) }
|
|
17
|
+
attr_accessor :message_ids
|
|
18
|
+
|
|
19
|
+
# Request to update the status of multiple messages in batch.
|
|
20
|
+
sig { params(message_ids: T::Array[String]).returns(T.attached_class) }
|
|
21
|
+
def self.new(
|
|
22
|
+
# The message IDs to update the status of.
|
|
23
|
+
message_ids:
|
|
24
|
+
)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
sig { override.returns({ message_ids: T::Array[String] }) }
|
|
28
|
+
def to_hash
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Knockapi
|
|
4
4
|
module Models
|
|
5
5
|
module Messages
|
|
6
|
-
class BatchUnarchiveParams < Knockapi::
|
|
6
|
+
class BatchUnarchiveParams < Knockapi::Models::Messages::BatchMessagesStatusRequest
|
|
7
7
|
extend Knockapi::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Knockapi::Internal::Type::RequestParameters
|
|
9
9
|
|
|
@@ -15,31 +15,15 @@ module Knockapi
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
# The message IDs to update the status of.
|
|
19
|
-
sig { returns(T::Array[String]) }
|
|
20
|
-
attr_accessor :message_ids
|
|
21
|
-
|
|
22
18
|
sig do
|
|
23
|
-
params(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
).returns(T.attached_class)
|
|
19
|
+
params(request_options: Knockapi::RequestOptions::OrHash).returns(
|
|
20
|
+
T.attached_class
|
|
21
|
+
)
|
|
27
22
|
end
|
|
28
|
-
def self.new(
|
|
29
|
-
# The message IDs to update the status of.
|
|
30
|
-
message_ids:,
|
|
31
|
-
request_options: {}
|
|
32
|
-
)
|
|
23
|
+
def self.new(request_options: {})
|
|
33
24
|
end
|
|
34
25
|
|
|
35
|
-
sig
|
|
36
|
-
override.returns(
|
|
37
|
-
{
|
|
38
|
-
message_ids: T::Array[String],
|
|
39
|
-
request_options: Knockapi::RequestOptions
|
|
40
|
-
}
|
|
41
|
-
)
|
|
42
|
-
end
|
|
26
|
+
sig { override.returns({ request_options: Knockapi::RequestOptions }) }
|
|
43
27
|
def to_hash
|
|
44
28
|
end
|
|
45
29
|
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Knockapi
|
|
4
|
+
module Models
|
|
5
|
+
class PreferenceSetCommercialSubscribedSetting < Knockapi::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Knockapi::PreferenceSetCommercialSubscribedSetting,
|
|
10
|
+
Knockapi::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# A list of conditions to apply to the commercial subscribed preference.
|
|
15
|
+
sig { returns(T::Array[Knockapi::Condition]) }
|
|
16
|
+
attr_accessor :conditions
|
|
17
|
+
|
|
18
|
+
# A set of settings for the commercial subscribed preference. Currently, this can
|
|
19
|
+
# only be a list of conditions to apply.
|
|
20
|
+
sig do
|
|
21
|
+
params(conditions: T::Array[Knockapi::Condition::OrHash]).returns(
|
|
22
|
+
T.attached_class
|
|
23
|
+
)
|
|
24
|
+
end
|
|
25
|
+
def self.new(
|
|
26
|
+
# A list of conditions to apply to the commercial subscribed preference.
|
|
27
|
+
conditions:
|
|
28
|
+
)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
sig { override.returns({ conditions: T::Array[Knockapi::Condition] }) }
|
|
32
|
+
def to_hash
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -58,8 +58,16 @@ module Knockapi
|
|
|
58
58
|
attr_accessor :channels
|
|
59
59
|
|
|
60
60
|
# Whether the recipient is subscribed to commercial communications. When false,
|
|
61
|
-
# the recipient will not receive commercial workflow notifications.
|
|
62
|
-
|
|
61
|
+
# the recipient will not receive commercial workflow notifications. Can also be
|
|
62
|
+
# set to a settings object with conditions that are evaluated at notification send
|
|
63
|
+
# time.
|
|
64
|
+
sig do
|
|
65
|
+
returns(
|
|
66
|
+
T.nilable(
|
|
67
|
+
Knockapi::Recipients::PreferenceSet::CommercialSubscribed::Variants
|
|
68
|
+
)
|
|
69
|
+
)
|
|
70
|
+
end
|
|
63
71
|
attr_accessor :commercial_subscribed
|
|
64
72
|
|
|
65
73
|
# An object where the key is the workflow key and the values are the preference
|
|
@@ -105,7 +113,13 @@ module Knockapi
|
|
|
105
113
|
)
|
|
106
114
|
]
|
|
107
115
|
),
|
|
108
|
-
commercial_subscribed:
|
|
116
|
+
commercial_subscribed:
|
|
117
|
+
T.nilable(
|
|
118
|
+
T.any(
|
|
119
|
+
T::Boolean,
|
|
120
|
+
Knockapi::PreferenceSetCommercialSubscribedSetting::OrHash
|
|
121
|
+
)
|
|
122
|
+
),
|
|
109
123
|
workflows:
|
|
110
124
|
T.nilable(
|
|
111
125
|
T::Hash[
|
|
@@ -129,7 +143,9 @@ module Knockapi
|
|
|
129
143
|
# Channel preferences.
|
|
130
144
|
channels: nil,
|
|
131
145
|
# Whether the recipient is subscribed to commercial communications. When false,
|
|
132
|
-
# the recipient will not receive commercial workflow notifications.
|
|
146
|
+
# the recipient will not receive commercial workflow notifications. Can also be
|
|
147
|
+
# set to a settings object with conditions that are evaluated at notification send
|
|
148
|
+
# time.
|
|
133
149
|
commercial_subscribed: nil,
|
|
134
150
|
# An object where the key is the workflow key and the values are the preference
|
|
135
151
|
# settings for that workflow.
|
|
@@ -157,7 +173,10 @@ module Knockapi
|
|
|
157
173
|
Knockapi::Recipients::PreferenceSet::Channel::Variants
|
|
158
174
|
]
|
|
159
175
|
),
|
|
160
|
-
commercial_subscribed:
|
|
176
|
+
commercial_subscribed:
|
|
177
|
+
T.nilable(
|
|
178
|
+
Knockapi::Recipients::PreferenceSet::CommercialSubscribed::Variants
|
|
179
|
+
),
|
|
161
180
|
workflows:
|
|
162
181
|
T.nilable(
|
|
163
182
|
T::Hash[
|
|
@@ -333,6 +352,32 @@ module Knockapi
|
|
|
333
352
|
end
|
|
334
353
|
end
|
|
335
354
|
|
|
355
|
+
# Whether the recipient is subscribed to commercial communications. When false,
|
|
356
|
+
# the recipient will not receive commercial workflow notifications. Can also be
|
|
357
|
+
# set to a settings object with conditions that are evaluated at notification send
|
|
358
|
+
# time.
|
|
359
|
+
module CommercialSubscribed
|
|
360
|
+
extend Knockapi::Internal::Type::Union
|
|
361
|
+
|
|
362
|
+
Variants =
|
|
363
|
+
T.type_alias do
|
|
364
|
+
T.any(
|
|
365
|
+
T::Boolean,
|
|
366
|
+
Knockapi::PreferenceSetCommercialSubscribedSetting
|
|
367
|
+
)
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
sig do
|
|
371
|
+
override.returns(
|
|
372
|
+
T::Array[
|
|
373
|
+
Knockapi::Recipients::PreferenceSet::CommercialSubscribed::Variants
|
|
374
|
+
]
|
|
375
|
+
)
|
|
376
|
+
end
|
|
377
|
+
def self.variants
|
|
378
|
+
end
|
|
379
|
+
end
|
|
380
|
+
|
|
336
381
|
# Workflow or category preferences within a preference set
|
|
337
382
|
module Workflow
|
|
338
383
|
extend Knockapi::Internal::Type::Union
|
|
@@ -79,8 +79,19 @@ module Knockapi
|
|
|
79
79
|
attr_accessor :channels
|
|
80
80
|
|
|
81
81
|
# Whether the recipient is subscribed to commercial communications. When false,
|
|
82
|
-
# the recipient will not receive commercial workflow notifications.
|
|
83
|
-
|
|
82
|
+
# the recipient will not receive commercial workflow notifications. Can also be
|
|
83
|
+
# set to a settings object with conditions that are evaluated at notification send
|
|
84
|
+
# time.
|
|
85
|
+
sig do
|
|
86
|
+
returns(
|
|
87
|
+
T.nilable(
|
|
88
|
+
T.any(
|
|
89
|
+
T::Boolean,
|
|
90
|
+
Knockapi::PreferenceSetCommercialSubscribedSetting
|
|
91
|
+
)
|
|
92
|
+
)
|
|
93
|
+
)
|
|
94
|
+
end
|
|
84
95
|
attr_accessor :commercial_subscribed
|
|
85
96
|
|
|
86
97
|
# An object where the key is the workflow key and the values are the preference
|
|
@@ -129,7 +140,13 @@ module Knockapi
|
|
|
129
140
|
)
|
|
130
141
|
]
|
|
131
142
|
),
|
|
132
|
-
commercial_subscribed:
|
|
143
|
+
commercial_subscribed:
|
|
144
|
+
T.nilable(
|
|
145
|
+
T.any(
|
|
146
|
+
T::Boolean,
|
|
147
|
+
Knockapi::PreferenceSetCommercialSubscribedSetting::OrHash
|
|
148
|
+
)
|
|
149
|
+
),
|
|
133
150
|
workflows:
|
|
134
151
|
T.nilable(
|
|
135
152
|
T::Hash[
|
|
@@ -154,7 +171,9 @@ module Knockapi
|
|
|
154
171
|
# Channel preferences.
|
|
155
172
|
channels: nil,
|
|
156
173
|
# Whether the recipient is subscribed to commercial communications. When false,
|
|
157
|
-
# the recipient will not receive commercial workflow notifications.
|
|
174
|
+
# the recipient will not receive commercial workflow notifications. Can also be
|
|
175
|
+
# set to a settings object with conditions that are evaluated at notification send
|
|
176
|
+
# time.
|
|
158
177
|
commercial_subscribed: nil,
|
|
159
178
|
# An object where the key is the workflow key and the values are the preference
|
|
160
179
|
# settings for that workflow.
|
|
@@ -189,7 +208,13 @@ module Knockapi
|
|
|
189
208
|
)
|
|
190
209
|
]
|
|
191
210
|
),
|
|
192
|
-
commercial_subscribed:
|
|
211
|
+
commercial_subscribed:
|
|
212
|
+
T.nilable(
|
|
213
|
+
T.any(
|
|
214
|
+
T::Boolean,
|
|
215
|
+
Knockapi::PreferenceSetCommercialSubscribedSetting
|
|
216
|
+
)
|
|
217
|
+
),
|
|
193
218
|
workflows:
|
|
194
219
|
T.nilable(
|
|
195
220
|
T::Hash[
|
|
@@ -414,6 +439,32 @@ module Knockapi
|
|
|
414
439
|
end
|
|
415
440
|
end
|
|
416
441
|
|
|
442
|
+
# Whether the recipient is subscribed to commercial communications. When false,
|
|
443
|
+
# the recipient will not receive commercial workflow notifications. Can also be
|
|
444
|
+
# set to a settings object with conditions that are evaluated at notification send
|
|
445
|
+
# time.
|
|
446
|
+
module CommercialSubscribed
|
|
447
|
+
extend Knockapi::Internal::Type::Union
|
|
448
|
+
|
|
449
|
+
Variants =
|
|
450
|
+
T.type_alias do
|
|
451
|
+
T.any(
|
|
452
|
+
T::Boolean,
|
|
453
|
+
Knockapi::PreferenceSetCommercialSubscribedSetting
|
|
454
|
+
)
|
|
455
|
+
end
|
|
456
|
+
|
|
457
|
+
sig do
|
|
458
|
+
override.returns(
|
|
459
|
+
T::Array[
|
|
460
|
+
Knockapi::Recipients::PreferenceSetRequest::CommercialSubscribed::Variants
|
|
461
|
+
]
|
|
462
|
+
)
|
|
463
|
+
end
|
|
464
|
+
def self.variants
|
|
465
|
+
end
|
|
466
|
+
end
|
|
467
|
+
|
|
417
468
|
# Workflow or category preferences within a preference set
|
|
418
469
|
module Workflow
|
|
419
470
|
extend Knockapi::Internal::Type::Union
|
|
@@ -107,6 +107,10 @@ module Knockapi
|
|
|
107
107
|
sig { returns(T.nilable(String)) }
|
|
108
108
|
attr_accessor :channel_id
|
|
109
109
|
|
|
110
|
+
# Slack channel name.
|
|
111
|
+
sig { returns(T.nilable(String)) }
|
|
112
|
+
attr_accessor :channel_name
|
|
113
|
+
|
|
110
114
|
# A Slack user ID from the Slack provider.
|
|
111
115
|
sig { returns(T.nilable(String)) }
|
|
112
116
|
attr_accessor :user_id
|
|
@@ -116,6 +120,7 @@ module Knockapi
|
|
|
116
120
|
params(
|
|
117
121
|
access_token: T.nilable(String),
|
|
118
122
|
channel_id: T.nilable(String),
|
|
123
|
+
channel_name: T.nilable(String),
|
|
119
124
|
user_id: T.nilable(String)
|
|
120
125
|
).returns(T.attached_class)
|
|
121
126
|
end
|
|
@@ -124,6 +129,8 @@ module Knockapi
|
|
|
124
129
|
access_token: nil,
|
|
125
130
|
# A Slack channel ID from the Slack provider.
|
|
126
131
|
channel_id: nil,
|
|
132
|
+
# Slack channel name.
|
|
133
|
+
channel_name: nil,
|
|
127
134
|
# A Slack user ID from the Slack provider.
|
|
128
135
|
user_id: nil
|
|
129
136
|
)
|
|
@@ -134,6 +141,7 @@ module Knockapi
|
|
|
134
141
|
{
|
|
135
142
|
access_token: T.nilable(String),
|
|
136
143
|
channel_id: T.nilable(String),
|
|
144
|
+
channel_name: T.nilable(String),
|
|
137
145
|
user_id: T.nilable(String)
|
|
138
146
|
}
|
|
139
147
|
)
|
|
@@ -129,8 +129,19 @@ module Knockapi
|
|
|
129
129
|
attr_accessor :channels
|
|
130
130
|
|
|
131
131
|
# Whether the recipient is subscribed to commercial communications. When false,
|
|
132
|
-
# the recipient will not receive commercial workflow notifications.
|
|
133
|
-
|
|
132
|
+
# the recipient will not receive commercial workflow notifications. Can also be
|
|
133
|
+
# set to a settings object with conditions that are evaluated at notification send
|
|
134
|
+
# time.
|
|
135
|
+
sig do
|
|
136
|
+
returns(
|
|
137
|
+
T.nilable(
|
|
138
|
+
T.any(
|
|
139
|
+
T::Boolean,
|
|
140
|
+
Knockapi::PreferenceSetCommercialSubscribedSetting
|
|
141
|
+
)
|
|
142
|
+
)
|
|
143
|
+
)
|
|
144
|
+
end
|
|
134
145
|
attr_accessor :commercial_subscribed
|
|
135
146
|
|
|
136
147
|
# An object where the key is the workflow key and the values are the preference
|
|
@@ -179,7 +190,13 @@ module Knockapi
|
|
|
179
190
|
)
|
|
180
191
|
]
|
|
181
192
|
),
|
|
182
|
-
commercial_subscribed:
|
|
193
|
+
commercial_subscribed:
|
|
194
|
+
T.nilable(
|
|
195
|
+
T.any(
|
|
196
|
+
T::Boolean,
|
|
197
|
+
Knockapi::PreferenceSetCommercialSubscribedSetting::OrHash
|
|
198
|
+
)
|
|
199
|
+
),
|
|
183
200
|
workflows:
|
|
184
201
|
T.nilable(
|
|
185
202
|
T::Hash[
|
|
@@ -203,7 +220,9 @@ module Knockapi
|
|
|
203
220
|
# Channel preferences.
|
|
204
221
|
channels: nil,
|
|
205
222
|
# Whether the recipient is subscribed to commercial communications. When false,
|
|
206
|
-
# the recipient will not receive commercial workflow notifications.
|
|
223
|
+
# the recipient will not receive commercial workflow notifications. Can also be
|
|
224
|
+
# set to a settings object with conditions that are evaluated at notification send
|
|
225
|
+
# time.
|
|
207
226
|
commercial_subscribed: nil,
|
|
208
227
|
# An object where the key is the workflow key and the values are the preference
|
|
209
228
|
# settings for that workflow.
|
|
@@ -237,7 +256,13 @@ module Knockapi
|
|
|
237
256
|
)
|
|
238
257
|
]
|
|
239
258
|
),
|
|
240
|
-
commercial_subscribed:
|
|
259
|
+
commercial_subscribed:
|
|
260
|
+
T.nilable(
|
|
261
|
+
T.any(
|
|
262
|
+
T::Boolean,
|
|
263
|
+
Knockapi::PreferenceSetCommercialSubscribedSetting
|
|
264
|
+
)
|
|
265
|
+
),
|
|
241
266
|
workflows:
|
|
242
267
|
T.nilable(
|
|
243
268
|
T::Hash[
|
|
@@ -428,6 +453,32 @@ module Knockapi
|
|
|
428
453
|
end
|
|
429
454
|
end
|
|
430
455
|
|
|
456
|
+
# Whether the recipient is subscribed to commercial communications. When false,
|
|
457
|
+
# the recipient will not receive commercial workflow notifications. Can also be
|
|
458
|
+
# set to a settings object with conditions that are evaluated at notification send
|
|
459
|
+
# time.
|
|
460
|
+
module CommercialSubscribed
|
|
461
|
+
extend Knockapi::Internal::Type::Union
|
|
462
|
+
|
|
463
|
+
Variants =
|
|
464
|
+
T.type_alias do
|
|
465
|
+
T.any(
|
|
466
|
+
T::Boolean,
|
|
467
|
+
Knockapi::PreferenceSetCommercialSubscribedSetting
|
|
468
|
+
)
|
|
469
|
+
end
|
|
470
|
+
|
|
471
|
+
sig do
|
|
472
|
+
override.returns(
|
|
473
|
+
T::Array[
|
|
474
|
+
Knockapi::Users::BulkSetPreferencesParams::Preferences::CommercialSubscribed::Variants
|
|
475
|
+
]
|
|
476
|
+
)
|
|
477
|
+
end
|
|
478
|
+
def self.variants
|
|
479
|
+
end
|
|
480
|
+
end
|
|
481
|
+
|
|
431
482
|
# Workflow or category preferences within a preference set
|
|
432
483
|
module Workflow
|
|
433
484
|
extend Knockapi::Internal::Type::Union
|