knockapi 1.39.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 +32 -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 +8 -8
- 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 -70
- data/lib/knockapi/models/users/guide_mark_message_as_interacted_params.rb +2 -58
- data/lib/knockapi/models/users/guide_mark_message_as_seen_params.rb +2 -66
- 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 +69 -21
- 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 +19 -19
- 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 -82
- data/rbi/knockapi/models/users/guide_mark_message_as_interacted_params.rbi +3 -69
- data/rbi/knockapi/models/users/guide_mark_message_as_seen_params.rbi +3 -77
- 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 +45 -11
- 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 +16 -16
- 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 -51
- data/sig/knockapi/models/users/guide_mark_message_as_interacted_params.rbs +4 -44
- data/sig/knockapi/models/users/guide_mark_message_as_seen_params.rbs +4 -49
- 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 +17 -6
- 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
|
@@ -4,7 +4,7 @@ module Knockapi
|
|
|
4
4
|
module Models
|
|
5
5
|
module Users
|
|
6
6
|
# @see Knockapi::Resources::Users::Guides#mark_message_as_seen
|
|
7
|
-
class GuideMarkMessageAsSeenParams < Knockapi::
|
|
7
|
+
class GuideMarkMessageAsSeenParams < Knockapi::Models::Users::GuideSeenRequest
|
|
8
8
|
extend Knockapi::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Knockapi::Internal::Type::RequestParameters
|
|
10
10
|
|
|
@@ -13,72 +13,8 @@ module Knockapi
|
|
|
13
13
|
# @return [String]
|
|
14
14
|
required :user_id, String
|
|
15
15
|
|
|
16
|
-
# @!
|
|
17
|
-
#
|
|
18
|
-
# @return [String]
|
|
19
|
-
required :message_id, String
|
|
20
|
-
|
|
21
|
-
# @!attribute channel_id
|
|
22
|
-
# The unique identifier for the channel.
|
|
23
|
-
#
|
|
24
|
-
# @return [String]
|
|
25
|
-
required :channel_id, String
|
|
26
|
-
|
|
27
|
-
# @!attribute content
|
|
28
|
-
# The content of the guide.
|
|
29
|
-
#
|
|
30
|
-
# @return [Hash{Symbol=>Object}]
|
|
31
|
-
required :content, Knockapi::Internal::Type::HashOf[Knockapi::Internal::Type::Unknown]
|
|
32
|
-
|
|
33
|
-
# @!attribute guide_id
|
|
34
|
-
# The unique identifier for the guide.
|
|
35
|
-
#
|
|
36
|
-
# @return [String]
|
|
37
|
-
required :guide_id, String
|
|
38
|
-
|
|
39
|
-
# @!attribute guide_key
|
|
40
|
-
# The key of the guide.
|
|
41
|
-
#
|
|
42
|
-
# @return [String]
|
|
43
|
-
required :guide_key, String
|
|
44
|
-
|
|
45
|
-
# @!attribute guide_step_ref
|
|
46
|
-
# The step reference of the guide.
|
|
47
|
-
#
|
|
48
|
-
# @return [String]
|
|
49
|
-
required :guide_step_ref, String
|
|
50
|
-
|
|
51
|
-
# @!attribute data
|
|
52
|
-
# The data of the guide.
|
|
53
|
-
#
|
|
54
|
-
# @return [Hash{Symbol=>Object}, nil]
|
|
55
|
-
optional :data, Knockapi::Internal::Type::HashOf[Knockapi::Internal::Type::Unknown]
|
|
56
|
-
|
|
57
|
-
# @!attribute tenant
|
|
58
|
-
# The tenant ID of the guide.
|
|
59
|
-
#
|
|
60
|
-
# @return [String, nil]
|
|
61
|
-
optional :tenant, String
|
|
62
|
-
|
|
63
|
-
# @!method initialize(user_id:, message_id:, channel_id:, content:, guide_id:, guide_key:, guide_step_ref:, data: nil, tenant: nil, request_options: {})
|
|
16
|
+
# @!method initialize(user_id:, request_options: {})
|
|
64
17
|
# @param user_id [String]
|
|
65
|
-
#
|
|
66
|
-
# @param message_id [String]
|
|
67
|
-
#
|
|
68
|
-
# @param channel_id [String] The unique identifier for the channel.
|
|
69
|
-
#
|
|
70
|
-
# @param content [Hash{Symbol=>Object}] The content of the guide.
|
|
71
|
-
#
|
|
72
|
-
# @param guide_id [String] The unique identifier for the guide.
|
|
73
|
-
#
|
|
74
|
-
# @param guide_key [String] The key of the guide.
|
|
75
|
-
#
|
|
76
|
-
# @param guide_step_ref [String] The step reference of the guide.
|
|
77
|
-
#
|
|
78
|
-
# @param data [Hash{Symbol=>Object}] The data of the guide.
|
|
79
|
-
#
|
|
80
|
-
# @param tenant [String] The tenant ID of the guide.
|
|
81
|
-
#
|
|
82
18
|
# @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}]
|
|
83
19
|
end
|
|
84
20
|
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Knockapi
|
|
4
|
+
module Models
|
|
5
|
+
module Users
|
|
6
|
+
# @see Knockapi::Resources::Users::Guides#reset_guide_engagements
|
|
7
|
+
class GuideResetGuideEngagementsParams < Knockapi::Internal::Type::BaseModel
|
|
8
|
+
extend Knockapi::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Knockapi::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute user_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :user_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute guide_key
|
|
17
|
+
# The key of the guide.
|
|
18
|
+
#
|
|
19
|
+
# @return [String]
|
|
20
|
+
required :guide_key, String
|
|
21
|
+
|
|
22
|
+
# @!attribute tenant
|
|
23
|
+
# The tenant ID of the guide.
|
|
24
|
+
#
|
|
25
|
+
# @return [String, nil]
|
|
26
|
+
optional :tenant, String
|
|
27
|
+
|
|
28
|
+
# @!method initialize(user_id:, guide_key:, tenant: nil, request_options: {})
|
|
29
|
+
# @param user_id [String]
|
|
30
|
+
#
|
|
31
|
+
# @param guide_key [String] The key of the guide.
|
|
32
|
+
#
|
|
33
|
+
# @param tenant [String] The tenant ID of the guide.
|
|
34
|
+
#
|
|
35
|
+
# @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}]
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Knockapi
|
|
4
|
+
module Models
|
|
5
|
+
module Users
|
|
6
|
+
class GuideSeenRequest < Knockapi::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute channel_id
|
|
8
|
+
# The unique identifier for the channel.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :channel_id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute content
|
|
14
|
+
# The content of the guide.
|
|
15
|
+
#
|
|
16
|
+
# @return [Hash{Symbol=>Object}]
|
|
17
|
+
required :content, Knockapi::Internal::Type::HashOf[Knockapi::Internal::Type::Unknown]
|
|
18
|
+
|
|
19
|
+
# @!attribute guide_id
|
|
20
|
+
# The unique identifier for the guide.
|
|
21
|
+
#
|
|
22
|
+
# @return [String]
|
|
23
|
+
required :guide_id, String
|
|
24
|
+
|
|
25
|
+
# @!attribute guide_key
|
|
26
|
+
# The key of the guide.
|
|
27
|
+
#
|
|
28
|
+
# @return [String]
|
|
29
|
+
required :guide_key, String
|
|
30
|
+
|
|
31
|
+
# @!attribute guide_step_ref
|
|
32
|
+
# The step reference of the guide.
|
|
33
|
+
#
|
|
34
|
+
# @return [String]
|
|
35
|
+
required :guide_step_ref, String
|
|
36
|
+
|
|
37
|
+
# @!attribute data
|
|
38
|
+
# The data of the guide.
|
|
39
|
+
#
|
|
40
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
41
|
+
optional :data, Knockapi::Internal::Type::HashOf[Knockapi::Internal::Type::Unknown]
|
|
42
|
+
|
|
43
|
+
# @!attribute tenant
|
|
44
|
+
# The tenant ID of the guide.
|
|
45
|
+
#
|
|
46
|
+
# @return [String, nil]
|
|
47
|
+
optional :tenant, String
|
|
48
|
+
|
|
49
|
+
# @!method initialize(channel_id:, content:, guide_id:, guide_key:, guide_step_ref:, data: nil, tenant: nil)
|
|
50
|
+
# A request to mark a guide as seen.
|
|
51
|
+
#
|
|
52
|
+
# @param channel_id [String] The unique identifier for the channel.
|
|
53
|
+
#
|
|
54
|
+
# @param content [Hash{Symbol=>Object}] The content of the guide.
|
|
55
|
+
#
|
|
56
|
+
# @param guide_id [String] The unique identifier for the guide.
|
|
57
|
+
#
|
|
58
|
+
# @param guide_key [String] The key of the guide.
|
|
59
|
+
#
|
|
60
|
+
# @param guide_step_ref [String] The step reference of the guide.
|
|
61
|
+
#
|
|
62
|
+
# @param data [Hash{Symbol=>Object}] The data of the guide.
|
|
63
|
+
#
|
|
64
|
+
# @param tenant [String] The tenant ID of the guide.
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Knockapi
|
|
4
|
+
module Models
|
|
5
|
+
module Users
|
|
6
|
+
# @see Knockapi::Resources::Users::Guides#unarchive_guide_message
|
|
7
|
+
class GuideUnarchiveGuideMessageParams < Knockapi::Internal::Type::BaseModel
|
|
8
|
+
extend Knockapi::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Knockapi::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute user_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :user_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute guide_key
|
|
17
|
+
# The key of the guide.
|
|
18
|
+
#
|
|
19
|
+
# @return [String]
|
|
20
|
+
required :guide_key, String
|
|
21
|
+
|
|
22
|
+
# @!attribute tenant
|
|
23
|
+
# The tenant ID of the guide.
|
|
24
|
+
#
|
|
25
|
+
# @return [String, nil]
|
|
26
|
+
optional :tenant, String
|
|
27
|
+
|
|
28
|
+
# @!method initialize(user_id:, guide_key:, tenant: nil, request_options: {})
|
|
29
|
+
# @param user_id [String]
|
|
30
|
+
#
|
|
31
|
+
# @param guide_key [String] The key of the guide.
|
|
32
|
+
#
|
|
33
|
+
# @param tenant [String] The tenant ID of the guide.
|
|
34
|
+
#
|
|
35
|
+
# @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}]
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Knockapi
|
|
4
|
+
module Models
|
|
5
|
+
module Users
|
|
6
|
+
class PreferenceCenterBrandingConfig < Knockapi::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute icon_url
|
|
8
|
+
# The icon URL for the preference center. Must point to a valid image with an
|
|
9
|
+
# image MIME type.
|
|
10
|
+
#
|
|
11
|
+
# @return [String, nil]
|
|
12
|
+
optional :icon_url, String, nil?: true
|
|
13
|
+
|
|
14
|
+
# @!attribute logo_url
|
|
15
|
+
# The logo URL for the preference center. Must point to a valid image with an
|
|
16
|
+
# image MIME type.
|
|
17
|
+
#
|
|
18
|
+
# @return [String, nil]
|
|
19
|
+
optional :logo_url, String, nil?: true
|
|
20
|
+
|
|
21
|
+
# @!attribute primary_color
|
|
22
|
+
# The primary color for the preference center, provided as a hex value.
|
|
23
|
+
#
|
|
24
|
+
# @return [String, nil]
|
|
25
|
+
optional :primary_color, String, nil?: true
|
|
26
|
+
|
|
27
|
+
# @!attribute primary_color_contrast
|
|
28
|
+
# The primary color contrast for the preference center, provided as a hex value.
|
|
29
|
+
#
|
|
30
|
+
# @return [String, nil]
|
|
31
|
+
optional :primary_color_contrast, String, nil?: true
|
|
32
|
+
|
|
33
|
+
# @!method initialize(icon_url: nil, logo_url: nil, primary_color: nil, primary_color_contrast: nil)
|
|
34
|
+
# Some parameter documentations has been truncated, see
|
|
35
|
+
# {Knockapi::Models::Users::PreferenceCenterBrandingConfig} for more details.
|
|
36
|
+
#
|
|
37
|
+
# The branding for the preference center, sourced from public environment
|
|
38
|
+
# variables.
|
|
39
|
+
#
|
|
40
|
+
# @param icon_url [String, nil] The icon URL for the preference center. Must point to a valid image with an imag
|
|
41
|
+
#
|
|
42
|
+
# @param logo_url [String, nil] The logo URL for the preference center. Must point to a valid image with an imag
|
|
43
|
+
#
|
|
44
|
+
# @param primary_color [String, nil] The primary color for the preference center, provided as a hex value.
|
|
45
|
+
#
|
|
46
|
+
# @param primary_color_contrast [String, nil] The primary color contrast for the preference center, provided as a hex value.
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Knockapi
|
|
4
|
+
module Models
|
|
5
|
+
module Users
|
|
6
|
+
# @see Knockapi::Resources::Users::PreferenceCenter#generate_signed_url
|
|
7
|
+
class PreferenceCenterGenerateSignedURLParams < Knockapi::Internal::Type::BaseModel
|
|
8
|
+
extend Knockapi::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Knockapi::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute user_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :user_id, String
|
|
15
|
+
|
|
16
|
+
# @!method initialize(user_id:, request_options: {})
|
|
17
|
+
# @param user_id [String]
|
|
18
|
+
# @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Knockapi
|
|
4
|
+
module Models
|
|
5
|
+
module Users
|
|
6
|
+
# @see Knockapi::Resources::Users::PreferenceCenter#generate_signed_url
|
|
7
|
+
class PreferenceCenterGenerateSignedURLResponse < Knockapi::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute token
|
|
9
|
+
# The signed JWT token for the preference center, usable as the `/p/{token}` path
|
|
10
|
+
# segment.
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :token, String
|
|
14
|
+
|
|
15
|
+
# @!attribute url
|
|
16
|
+
# The full URL to the preference center for the user.
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :url, String
|
|
20
|
+
|
|
21
|
+
# @!method initialize(token:, url:)
|
|
22
|
+
# Some parameter documentations has been truncated, see
|
|
23
|
+
# {Knockapi::Models::Users::PreferenceCenterGenerateSignedURLResponse} for more
|
|
24
|
+
# details.
|
|
25
|
+
#
|
|
26
|
+
# A signed preference center URL and token for a user.
|
|
27
|
+
#
|
|
28
|
+
# @param token [String] The signed JWT token for the preference center, usable as the `/p/{token}` path
|
|
29
|
+
#
|
|
30
|
+
# @param url [String] The full URL to the preference center for the user.
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Knockapi
|
|
4
|
+
module Models
|
|
5
|
+
module Users
|
|
6
|
+
# @see Knockapi::Resources::Users::PreferenceCenter#get_config
|
|
7
|
+
class PreferenceCenterGetConfigParams < Knockapi::Internal::Type::BaseModel
|
|
8
|
+
extend Knockapi::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Knockapi::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute user_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :user_id, String
|
|
15
|
+
|
|
16
|
+
# @!method initialize(user_id:, request_options: {})
|
|
17
|
+
# @param user_id [String]
|
|
18
|
+
# @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Knockapi
|
|
4
|
+
module Models
|
|
5
|
+
module Users
|
|
6
|
+
# @see Knockapi::Resources::Users::PreferenceCenter#get_config
|
|
7
|
+
class PreferenceCenterGetConfigResponse < Knockapi::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute account_name
|
|
9
|
+
# The name of the account that the preference center is associated with.
|
|
10
|
+
#
|
|
11
|
+
# @return [String, nil]
|
|
12
|
+
required :account_name, String, nil?: true
|
|
13
|
+
|
|
14
|
+
# @!attribute branding
|
|
15
|
+
# The branding for the preference center, sourced from public environment
|
|
16
|
+
# variables.
|
|
17
|
+
#
|
|
18
|
+
# @return [Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Branding]
|
|
19
|
+
required :branding, -> { Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Branding }
|
|
20
|
+
|
|
21
|
+
# @!attribute config
|
|
22
|
+
# The preference center configuration data containing the rows to display.
|
|
23
|
+
#
|
|
24
|
+
# @return [Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config]
|
|
25
|
+
required :config, -> { Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config }
|
|
26
|
+
|
|
27
|
+
# @!attribute enabled
|
|
28
|
+
# Whether the preference center is enabled for this environment.
|
|
29
|
+
#
|
|
30
|
+
# @return [Boolean]
|
|
31
|
+
required :enabled, Knockapi::Internal::Type::Boolean
|
|
32
|
+
|
|
33
|
+
# @!attribute user_email
|
|
34
|
+
# A display label for the user that the preference center is associated with,
|
|
35
|
+
# resolved as email, then user id.
|
|
36
|
+
#
|
|
37
|
+
# @return [String, nil]
|
|
38
|
+
required :user_email, String, nil?: true
|
|
39
|
+
|
|
40
|
+
# @!attribute knock_branding_required
|
|
41
|
+
# Whether Knock branding is required in the preference center.
|
|
42
|
+
#
|
|
43
|
+
# @return [Boolean, nil]
|
|
44
|
+
optional :knock_branding_required, Knockapi::Internal::Type::Boolean
|
|
45
|
+
|
|
46
|
+
# @!method initialize(account_name:, branding:, config:, enabled:, user_email:, knock_branding_required: nil)
|
|
47
|
+
# Some parameter documentations has been truncated, see
|
|
48
|
+
# {Knockapi::Models::Users::PreferenceCenterGetConfigResponse} for more details.
|
|
49
|
+
#
|
|
50
|
+
# The preference center configuration for an environment. Controls whether the
|
|
51
|
+
# preference center is enabled and defines the rows displayed in the UI.
|
|
52
|
+
#
|
|
53
|
+
# @param account_name [String, nil] The name of the account that the preference center is associated with.
|
|
54
|
+
#
|
|
55
|
+
# @param branding [Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Branding] The branding for the preference center, sourced from public environment variable
|
|
56
|
+
#
|
|
57
|
+
# @param config [Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config] The preference center configuration data containing the rows to display.
|
|
58
|
+
#
|
|
59
|
+
# @param enabled [Boolean] Whether the preference center is enabled for this environment.
|
|
60
|
+
#
|
|
61
|
+
# @param user_email [String, nil] A display label for the user that the preference center is associated with, reso
|
|
62
|
+
#
|
|
63
|
+
# @param knock_branding_required [Boolean] Whether Knock branding is required in the preference center.
|
|
64
|
+
|
|
65
|
+
# @see Knockapi::Models::Users::PreferenceCenterGetConfigResponse#branding
|
|
66
|
+
class Branding < Knockapi::Models::Users::PreferenceCenterBrandingConfig
|
|
67
|
+
# @!attribute dark
|
|
68
|
+
# The branding for the preference center, sourced from public environment
|
|
69
|
+
# variables.
|
|
70
|
+
#
|
|
71
|
+
# @return [Knockapi::Models::Users::PreferenceCenterBrandingConfig, nil]
|
|
72
|
+
optional :dark, -> { Knockapi::Users::PreferenceCenterBrandingConfig }
|
|
73
|
+
|
|
74
|
+
# @!method initialize(dark: nil)
|
|
75
|
+
# Some parameter documentations has been truncated, see
|
|
76
|
+
# {Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Branding} for more
|
|
77
|
+
# details.
|
|
78
|
+
#
|
|
79
|
+
# The branding for the preference center, sourced from public environment
|
|
80
|
+
# variables.
|
|
81
|
+
#
|
|
82
|
+
# @param dark [Knockapi::Models::Users::PreferenceCenterBrandingConfig] The branding for the preference center, sourced from public environment variable
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# @see Knockapi::Models::Users::PreferenceCenterGetConfigResponse#config
|
|
86
|
+
class Config < Knockapi::Internal::Type::BaseModel
|
|
87
|
+
# @!attribute body
|
|
88
|
+
# The body text displayed below the title.
|
|
89
|
+
#
|
|
90
|
+
# @return [String]
|
|
91
|
+
required :body, String
|
|
92
|
+
|
|
93
|
+
# @!attribute rows
|
|
94
|
+
# An ordered list of rows to display in the preference center.
|
|
95
|
+
#
|
|
96
|
+
# @return [Array<Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row>]
|
|
97
|
+
required :rows,
|
|
98
|
+
-> { Knockapi::Internal::Type::ArrayOf[Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row] }
|
|
99
|
+
|
|
100
|
+
# @!attribute title
|
|
101
|
+
# The title displayed at the top of the preference center.
|
|
102
|
+
#
|
|
103
|
+
# @return [String]
|
|
104
|
+
required :title, String
|
|
105
|
+
|
|
106
|
+
# @!attribute show_account_name
|
|
107
|
+
# Whether the account name should be displayed in the preference center.
|
|
108
|
+
#
|
|
109
|
+
# @return [Boolean, nil]
|
|
110
|
+
optional :show_account_name, Knockapi::Internal::Type::Boolean
|
|
111
|
+
|
|
112
|
+
# @!method initialize(body:, rows:, title:, show_account_name: nil)
|
|
113
|
+
# The preference center configuration data containing the rows to display.
|
|
114
|
+
#
|
|
115
|
+
# @param body [String] The body text displayed below the title.
|
|
116
|
+
#
|
|
117
|
+
# @param rows [Array<Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row>] An ordered list of rows to display in the preference center.
|
|
118
|
+
#
|
|
119
|
+
# @param title [String] The title displayed at the top of the preference center.
|
|
120
|
+
#
|
|
121
|
+
# @param show_account_name [Boolean] Whether the account name should be displayed in the preference center.
|
|
122
|
+
|
|
123
|
+
class Row < Knockapi::Internal::Type::BaseModel
|
|
124
|
+
# @!attribute name
|
|
125
|
+
# The display name of the preference row.
|
|
126
|
+
#
|
|
127
|
+
# @return [String]
|
|
128
|
+
required :name, String
|
|
129
|
+
|
|
130
|
+
# @!attribute type
|
|
131
|
+
# The type of this preference row. `workflow` targets a workflow, `channel`
|
|
132
|
+
# targets a specific channel, `category` targets a workflow category,
|
|
133
|
+
# `channel_types` controls per-channel-type opt-in/out, and
|
|
134
|
+
# `commercial_subscribed` is the commercial notification toggle.
|
|
135
|
+
#
|
|
136
|
+
# @return [Symbol, Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::Type]
|
|
137
|
+
required :type, enum: -> { Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::Type }
|
|
138
|
+
|
|
139
|
+
# @!attribute channel_types
|
|
140
|
+
# The list of channel types this preference is scoped to. An empty list (or
|
|
141
|
+
# `null`) means the preference applies to all channel types. Present for
|
|
142
|
+
# `workflow`, `category`, and `channel_types` types.
|
|
143
|
+
#
|
|
144
|
+
# @return [Array<Symbol, Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::ChannelType>, nil]
|
|
145
|
+
optional :channel_types,
|
|
146
|
+
-> { Knockapi::Internal::Type::ArrayOf[enum: Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::ChannelType] },
|
|
147
|
+
nil?: true
|
|
148
|
+
|
|
149
|
+
# @!attribute description
|
|
150
|
+
# A description shown below the preference row name.
|
|
151
|
+
#
|
|
152
|
+
# @return [String, nil]
|
|
153
|
+
optional :description, String
|
|
154
|
+
|
|
155
|
+
# @!attribute identifier
|
|
156
|
+
# The category name, workflow key, or channel ID this row controls (e.g.
|
|
157
|
+
# `marketing`, `new-project-mentions`, or a channel UUID). Present for `workflow`,
|
|
158
|
+
# `channel`, and `category` types.
|
|
159
|
+
#
|
|
160
|
+
# @return [String, nil]
|
|
161
|
+
optional :identifier, String, nil?: true
|
|
162
|
+
|
|
163
|
+
# @!method initialize(name:, type:, channel_types: nil, description: nil, identifier: nil)
|
|
164
|
+
# Some parameter documentations has been truncated, see
|
|
165
|
+
# {Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row} for
|
|
166
|
+
# more details.
|
|
167
|
+
#
|
|
168
|
+
# A preference row in the preference center configuration.
|
|
169
|
+
#
|
|
170
|
+
# @param name [String] The display name of the preference row.
|
|
171
|
+
#
|
|
172
|
+
# @param type [Symbol, Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::Type] The type of this preference row. `workflow` targets a workflow, `channel` target
|
|
173
|
+
#
|
|
174
|
+
# @param channel_types [Array<Symbol, Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row::ChannelType>, nil] The list of channel types this preference is scoped to. An empty list (or `null`
|
|
175
|
+
#
|
|
176
|
+
# @param description [String] A description shown below the preference row name.
|
|
177
|
+
#
|
|
178
|
+
# @param identifier [String, nil] The category name, workflow key, or channel ID this row controls (e.g. `marketin
|
|
179
|
+
|
|
180
|
+
# The type of this preference row. `workflow` targets a workflow, `channel`
|
|
181
|
+
# targets a specific channel, `category` targets a workflow category,
|
|
182
|
+
# `channel_types` controls per-channel-type opt-in/out, and
|
|
183
|
+
# `commercial_subscribed` is the commercial notification toggle.
|
|
184
|
+
#
|
|
185
|
+
# @see Knockapi::Models::Users::PreferenceCenterGetConfigResponse::Config::Row#type
|
|
186
|
+
module Type
|
|
187
|
+
extend Knockapi::Internal::Type::Enum
|
|
188
|
+
|
|
189
|
+
WORKFLOW = :workflow
|
|
190
|
+
CHANNEL = :channel
|
|
191
|
+
CATEGORY = :category
|
|
192
|
+
CHANNEL_TYPES = :channel_types
|
|
193
|
+
COMMERCIAL_SUBSCRIBED = :commercial_subscribed
|
|
194
|
+
|
|
195
|
+
# @!method self.values
|
|
196
|
+
# @return [Array<Symbol>]
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
module ChannelType
|
|
200
|
+
extend Knockapi::Internal::Type::Enum
|
|
201
|
+
|
|
202
|
+
EMAIL = :email
|
|
203
|
+
IN_APP = :in_app
|
|
204
|
+
IN_APP_FEED = :in_app_feed
|
|
205
|
+
IN_APP_GUIDE = :in_app_guide
|
|
206
|
+
SMS = :sms
|
|
207
|
+
PUSH = :push
|
|
208
|
+
CHAT = :chat
|
|
209
|
+
HTTP = :http
|
|
210
|
+
LOG = :log
|
|
211
|
+
DEFERRED_LOG = :deferred_log
|
|
212
|
+
|
|
213
|
+
# @!method self.values
|
|
214
|
+
# @return [Array<Symbol>]
|
|
215
|
+
end
|
|
216
|
+
end
|
|
217
|
+
end
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
end
|
data/lib/knockapi/models.rb
CHANGED
|
@@ -47,6 +47,8 @@ module Knockapi
|
|
|
47
47
|
|
|
48
48
|
AudienceMember = Knockapi::Models::AudienceMember
|
|
49
49
|
|
|
50
|
+
AudienceMemberRequest = Knockapi::Models::AudienceMemberRequest
|
|
51
|
+
|
|
50
52
|
AudienceRemoveMembersParams = Knockapi::Models::AudienceRemoveMembersParams
|
|
51
53
|
|
|
52
54
|
BulkOperation = Knockapi::Models::BulkOperation
|
|
@@ -67,10 +69,18 @@ module Knockapi
|
|
|
67
69
|
|
|
68
70
|
Integrations = Knockapi::Models::Integrations
|
|
69
71
|
|
|
72
|
+
ListMessagesResponse = Knockapi::Models::ListMessagesResponse
|
|
73
|
+
|
|
74
|
+
ListSchedulesResponse = Knockapi::Models::ListSchedulesResponse
|
|
75
|
+
|
|
76
|
+
ListSubscriptionsResponse = Knockapi::Models::ListSubscriptionsResponse
|
|
77
|
+
|
|
70
78
|
Message = Knockapi::Models::Message
|
|
71
79
|
|
|
72
80
|
MessageArchiveParams = Knockapi::Models::MessageArchiveParams
|
|
73
81
|
|
|
82
|
+
MessageContents = Knockapi::Models::MessageContents
|
|
83
|
+
|
|
74
84
|
MessageDeliveryLog = Knockapi::Models::MessageDeliveryLog
|
|
75
85
|
|
|
76
86
|
MessageEvent = Knockapi::Models::MessageEvent
|
|
@@ -79,6 +89,10 @@ module Knockapi
|
|
|
79
89
|
|
|
80
90
|
MessageGetParams = Knockapi::Models::MessageGetParams
|
|
81
91
|
|
|
92
|
+
MessageInAppFeedButtonSetBlock = Knockapi::Models::MessageInAppFeedButtonSetBlock
|
|
93
|
+
|
|
94
|
+
MessageInAppFeedContentBlock = Knockapi::Models::MessageInAppFeedContentBlock
|
|
95
|
+
|
|
82
96
|
MessageListActivitiesParams = Knockapi::Models::MessageListActivitiesParams
|
|
83
97
|
|
|
84
98
|
MessageListDeliveryLogsParams = Knockapi::Models::MessageListDeliveryLogsParams
|
|
@@ -139,6 +153,8 @@ module Knockapi
|
|
|
139
153
|
|
|
140
154
|
PageInfo = Knockapi::Models::PageInfo
|
|
141
155
|
|
|
156
|
+
PreferenceSetCommercialSubscribedSetting = Knockapi::Models::PreferenceSetCommercialSubscribedSetting
|
|
157
|
+
|
|
142
158
|
Providers = Knockapi::Models::Providers
|
|
143
159
|
|
|
144
160
|
Recipient = Knockapi::Models::Recipient
|
|
@@ -13,7 +13,7 @@ module Knockapi
|
|
|
13
13
|
#
|
|
14
14
|
# @param key [String] Path param: The key of the audience.
|
|
15
15
|
#
|
|
16
|
-
# @param members [Array<Knockapi::Models::
|
|
16
|
+
# @param members [Array<Knockapi::Models::AudienceMemberRequest>] Body param: A list of audience members to add. You can add up to 1,000 members p
|
|
17
17
|
#
|
|
18
18
|
# @param create_audience [Boolean] Query param: Create the audience if it does not exist.
|
|
19
19
|
#
|
|
@@ -65,7 +65,7 @@ module Knockapi
|
|
|
65
65
|
#
|
|
66
66
|
# @param key [String] The key of the audience.
|
|
67
67
|
#
|
|
68
|
-
# @param members [Array<Knockapi::Models::
|
|
68
|
+
# @param members [Array<Knockapi::Models::AudienceMemberRequest>] A list of audience members to remove. You can remove up to 1,000 members per req
|
|
69
69
|
#
|
|
70
70
|
# @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
71
71
|
#
|
|
@@ -36,7 +36,7 @@ module Knockapi
|
|
|
36
36
|
#
|
|
37
37
|
# @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
38
38
|
#
|
|
39
|
-
# @return [Array<Knockapi::Models::
|
|
39
|
+
# @return [Array<Knockapi::Models::MessageContents>]
|
|
40
40
|
#
|
|
41
41
|
# @see Knockapi::Models::Messages::BatchGetContentParams
|
|
42
42
|
def get_content(params)
|
|
@@ -46,7 +46,7 @@ module Knockapi
|
|
|
46
46
|
method: :get,
|
|
47
47
|
path: "v1/messages/batch/content",
|
|
48
48
|
query: query,
|
|
49
|
-
model: Knockapi::Internal::Type::ArrayOf[Knockapi::
|
|
49
|
+
model: Knockapi::Internal::Type::ArrayOf[Knockapi::MessageContents],
|
|
50
50
|
options: options
|
|
51
51
|
)
|
|
52
52
|
end
|