trycourier 4.21.0 → 4.23.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 +24 -0
- data/lib/courier/client.rb +43 -0
- data/lib/courier/models/automations/invoke_invoke_ad_hoc_params.rb +13 -1
- data/lib/courier/models/automations/invoke_invoke_by_template_params.rb +13 -1
- data/lib/courier/models/brand_create_params.rb +13 -1
- data/lib/courier/models/broadcast.rb +132 -0
- data/lib/courier/models/broadcast_archive_params.rb +20 -0
- data/lib/courier/models/broadcast_cancel_params.rb +20 -0
- data/lib/courier/models/broadcast_create_params.rb +14 -0
- data/lib/courier/models/broadcast_duplicate_params.rb +20 -0
- data/lib/courier/models/broadcast_list_params.rb +30 -0
- data/lib/courier/models/broadcast_list_response.rb +24 -0
- data/lib/courier/models/broadcast_put_content_params.rb +20 -0
- data/lib/courier/models/broadcast_retrieve_content_params.rb +33 -0
- data/lib/courier/models/broadcast_retrieve_params.rb +20 -0
- data/lib/courier/models/broadcast_schedule.rb +59 -0
- data/lib/courier/models/broadcast_schedule_params.rb +20 -0
- data/lib/courier/models/broadcast_send_params.rb +20 -0
- data/lib/courier/models/broadcast_update_params.rb +20 -0
- data/lib/courier/models/create_broadcast_request.rb +43 -0
- data/lib/courier/models/inbox/message_delete_params.rb +22 -0
- data/lib/courier/models/inbox/message_restore_params.rb +22 -0
- data/lib/courier/models/journey_cancel_params.rb +13 -1
- data/lib/courier/models/journey_create_params.rb +13 -1
- data/lib/courier/models/journey_invoke_params.rb +13 -1
- data/lib/courier/models/journey_publish_params.rb +13 -1
- data/lib/courier/models/journeys/template_create_params.rb +13 -1
- data/lib/courier/models/journeys/template_publish_params.rb +13 -1
- data/lib/courier/models/lists/subscription_add_params.rb +13 -1
- data/lib/courier/models/notification_create_params.rb +13 -1
- data/lib/courier/models/notification_publish_params.rb +13 -1
- data/lib/courier/models/profile_create_params.rb +13 -1
- data/lib/courier/models/profiles/list_subscribe_params.rb +13 -1
- data/lib/courier/models/provider_create_params.rb +15 -1
- data/lib/courier/models/routing_strategy_create_params.rb +13 -1
- data/lib/courier/models/schedule_broadcast_request.rb +59 -0
- data/lib/courier/models/send_broadcast_request.rb +39 -0
- data/lib/courier/models/send_message_params.rb +15 -1
- data/lib/courier/models/update_broadcast_request.rb +18 -0
- data/lib/courier/models/users/preference_bulk_update_params.rb +15 -1
- data/lib/courier/models/users/preference_update_or_create_topic_params.rb +14 -4
- data/lib/courier/models/users/topic_preference.rb +21 -7
- data/lib/courier/models/workspace_preference_create_params.rb +13 -1
- data/lib/courier/models/workspace_preference_publish_params.rb +13 -1
- data/lib/courier/models/workspace_preferences/topic_create_params.rb +13 -1
- data/lib/courier/models.rb +38 -0
- data/lib/courier/resources/audiences.rb +12 -5
- data/lib/courier/resources/audit_events.rb +5 -2
- data/lib/courier/resources/auth.rb +5 -1
- data/lib/courier/resources/automations/invoke.rb +47 -23
- data/lib/courier/resources/automations.rb +6 -1
- data/lib/courier/resources/brands.rb +38 -12
- data/lib/courier/resources/broadcasts.rb +290 -0
- data/lib/courier/resources/digests/schedules.rb +4 -3
- data/lib/courier/resources/digests.rb +2 -0
- data/lib/courier/resources/inbound.rb +3 -1
- data/lib/courier/resources/inbox/messages.rb +58 -0
- data/lib/courier/resources/inbox.rb +19 -0
- data/lib/courier/resources/journeys/templates.rb +43 -25
- data/lib/courier/resources/journeys.rb +73 -44
- data/lib/courier/resources/lists/subscriptions.rb +22 -8
- data/lib/courier/resources/lists.rb +14 -5
- data/lib/courier/resources/messages.rb +14 -14
- data/lib/courier/resources/notifications/checks.rb +8 -3
- data/lib/courier/resources/notifications.rb +48 -30
- data/lib/courier/resources/profiles/lists.rb +19 -8
- data/lib/courier/resources/profiles.rb +25 -14
- data/lib/courier/resources/providers/catalog.rb +4 -4
- data/lib/courier/resources/providers.rb +27 -18
- data/lib/courier/resources/requests.rb +4 -1
- data/lib/courier/resources/routing_strategies.rb +24 -12
- data/lib/courier/resources/send.rb +14 -4
- data/lib/courier/resources/tenants/preferences/items.rb +6 -2
- data/lib/courier/resources/tenants/preferences.rb +2 -0
- data/lib/courier/resources/tenants/templates/versions.rb +4 -7
- data/lib/courier/resources/tenants/templates.rb +14 -19
- data/lib/courier/resources/tenants.rb +14 -5
- data/lib/courier/resources/translations.rb +6 -2
- data/lib/courier/resources/users/preferences.rb +23 -42
- data/lib/courier/resources/users/tenants.rb +12 -10
- data/lib/courier/resources/users/tokens.rb +14 -6
- data/lib/courier/resources/users.rb +6 -0
- data/lib/courier/resources/workspace_preferences/topics.rb +27 -19
- data/lib/courier/resources/workspace_preferences.rb +40 -20
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +24 -1
- data/rbi/courier/client.rbi +41 -0
- data/rbi/courier/models/automations/invoke_invoke_ad_hoc_params.rbi +18 -0
- data/rbi/courier/models/automations/invoke_invoke_by_template_params.rbi +18 -0
- data/rbi/courier/models/brand_create_params.rbi +18 -0
- data/rbi/courier/models/broadcast.rbi +164 -0
- data/rbi/courier/models/broadcast_archive_params.rbi +35 -0
- data/rbi/courier/models/broadcast_cancel_params.rbi +35 -0
- data/rbi/courier/models/broadcast_create_params.rbi +27 -0
- data/rbi/courier/models/broadcast_duplicate_params.rbi +35 -0
- data/rbi/courier/models/broadcast_list_params.rbi +54 -0
- data/rbi/courier/models/broadcast_list_response.rbi +39 -0
- data/rbi/courier/models/broadcast_put_content_params.rbi +35 -0
- data/rbi/courier/models/broadcast_retrieve_content_params.rbi +57 -0
- data/rbi/courier/models/broadcast_retrieve_params.rbi +35 -0
- data/rbi/courier/models/broadcast_schedule.rbi +92 -0
- data/rbi/courier/models/broadcast_schedule_params.rbi +35 -0
- data/rbi/courier/models/broadcast_send_params.rbi +35 -0
- data/rbi/courier/models/broadcast_update_params.rbi +35 -0
- data/rbi/courier/models/create_broadcast_request.rbi +81 -0
- data/rbi/courier/models/inbox/message_delete_params.rbi +40 -0
- data/rbi/courier/models/inbox/message_restore_params.rbi +40 -0
- data/rbi/courier/models/journey_cancel_params.rbi +31 -5
- data/rbi/courier/models/journey_create_params.rbi +31 -5
- data/rbi/courier/models/journey_invoke_params.rbi +26 -2
- data/rbi/courier/models/journey_publish_params.rbi +26 -2
- data/rbi/courier/models/journeys/template_create_params.rbi +26 -2
- data/rbi/courier/models/journeys/template_publish_params.rbi +23 -1
- data/rbi/courier/models/lists/subscription_add_params.rbi +23 -1
- data/rbi/courier/models/notification_create_params.rbi +31 -5
- data/rbi/courier/models/notification_publish_params.rbi +26 -2
- data/rbi/courier/models/profile_create_params.rbi +23 -1
- data/rbi/courier/models/profiles/list_subscribe_params.rbi +23 -1
- data/rbi/courier/models/provider_create_params.rbi +18 -0
- data/rbi/courier/models/routing_strategy_create_params.rbi +31 -5
- data/rbi/courier/models/schedule_broadcast_request.rbi +103 -0
- data/rbi/courier/models/send_broadcast_request.rbi +77 -0
- data/rbi/courier/models/send_message_params.rbi +18 -0
- data/rbi/courier/models/update_broadcast_request.rbi +28 -0
- data/rbi/courier/models/users/preference_bulk_update_params.rbi +18 -0
- data/rbi/courier/models/users/preference_update_or_create_topic_params.rbi +14 -2
- data/rbi/courier/models/users/topic_preference.rbi +24 -2
- data/rbi/courier/models/workspace_preference_create_params.rbi +31 -5
- data/rbi/courier/models/workspace_preference_publish_params.rbi +31 -5
- data/rbi/courier/models/workspace_preferences/topic_create_params.rbi +26 -2
- data/rbi/courier/models.rbi +39 -0
- data/rbi/courier/resources/audiences.rbi +12 -5
- data/rbi/courier/resources/audit_events.rbi +5 -2
- data/rbi/courier/resources/auth.rbi +5 -1
- data/rbi/courier/resources/automations/invoke.rbi +48 -7
- data/rbi/courier/resources/automations.rbi +6 -1
- data/rbi/courier/resources/brands.rbi +37 -7
- data/rbi/courier/resources/broadcasts.rbi +199 -0
- data/rbi/courier/resources/digests/schedules.rbi +4 -3
- data/rbi/courier/resources/digests.rbi +2 -0
- data/rbi/courier/resources/inbound.rbi +3 -1
- data/rbi/courier/resources/inbox/messages.rbi +44 -0
- data/rbi/courier/resources/inbox.rbi +16 -0
- data/rbi/courier/resources/journeys/templates.rbi +47 -17
- data/rbi/courier/resources/journeys.rbi +93 -39
- data/rbi/courier/resources/lists/subscriptions.rbi +24 -5
- data/rbi/courier/resources/lists.rbi +14 -5
- data/rbi/courier/resources/messages.rbi +14 -14
- data/rbi/courier/resources/notifications/checks.rbi +8 -3
- data/rbi/courier/resources/notifications.rbi +58 -28
- data/rbi/courier/resources/profiles/lists.rbi +25 -6
- data/rbi/courier/resources/profiles.rbi +31 -11
- data/rbi/courier/resources/providers/catalog.rbi +4 -4
- data/rbi/courier/resources/providers.rbi +35 -19
- data/rbi/courier/resources/requests.rbi +4 -1
- data/rbi/courier/resources/routing_strategies.rbi +26 -10
- data/rbi/courier/resources/send.rbi +20 -3
- data/rbi/courier/resources/tenants/preferences/items.rbi +6 -2
- data/rbi/courier/resources/tenants/preferences.rbi +2 -0
- data/rbi/courier/resources/tenants/templates/versions.rbi +4 -7
- data/rbi/courier/resources/tenants/templates.rbi +14 -19
- data/rbi/courier/resources/tenants.rbi +14 -5
- data/rbi/courier/resources/translations.rbi +6 -2
- data/rbi/courier/resources/users/preferences.rbi +28 -40
- data/rbi/courier/resources/users/tenants.rbi +12 -10
- data/rbi/courier/resources/users/tokens.rbi +14 -6
- data/rbi/courier/resources/users.rbi +6 -0
- data/rbi/courier/resources/workspace_preferences/topics.rbi +37 -18
- data/rbi/courier/resources/workspace_preferences.rbi +51 -17
- data/sig/courier/client.rbs +4 -0
- data/sig/courier/models/automations/invoke_invoke_ad_hoc_params.rbs +15 -1
- data/sig/courier/models/automations/invoke_invoke_by_template_params.rbs +15 -1
- data/sig/courier/models/brand_create_params.rbs +15 -1
- data/sig/courier/models/broadcast.rbs +98 -0
- data/sig/courier/models/broadcast_archive_params.rbs +23 -0
- data/sig/courier/models/broadcast_cancel_params.rbs +23 -0
- data/sig/courier/models/broadcast_create_params.rbs +15 -0
- data/sig/courier/models/broadcast_duplicate_params.rbs +23 -0
- data/sig/courier/models/broadcast_list_params.rbs +30 -0
- data/sig/courier/models/broadcast_list_response.rbs +22 -0
- data/sig/courier/models/broadcast_put_content_params.rbs +25 -0
- data/sig/courier/models/broadcast_retrieve_content_params.rbs +30 -0
- data/sig/courier/models/broadcast_retrieve_params.rbs +23 -0
- data/sig/courier/models/broadcast_schedule.rbs +46 -0
- data/sig/courier/models/broadcast_schedule_params.rbs +25 -0
- data/sig/courier/models/broadcast_send_params.rbs +25 -0
- data/sig/courier/models/broadcast_update_params.rbs +25 -0
- data/sig/courier/models/create_broadcast_request.rbs +40 -0
- data/sig/courier/models/inbox/message_delete_params.rbs +25 -0
- data/sig/courier/models/inbox/message_restore_params.rbs +25 -0
- data/sig/courier/models/journey_cancel_params.rbs +20 -3
- data/sig/courier/models/journey_create_params.rbs +20 -3
- data/sig/courier/models/journey_invoke_params.rbs +18 -1
- data/sig/courier/models/journey_publish_params.rbs +18 -1
- data/sig/courier/models/journeys/template_create_params.rbs +18 -1
- data/sig/courier/models/journeys/template_publish_params.rbs +18 -1
- data/sig/courier/models/lists/subscription_add_params.rbs +15 -1
- data/sig/courier/models/notification_create_params.rbs +20 -3
- data/sig/courier/models/notification_publish_params.rbs +18 -2
- data/sig/courier/models/profile_create_params.rbs +18 -1
- data/sig/courier/models/profiles/list_subscribe_params.rbs +15 -1
- data/sig/courier/models/provider_create_params.rbs +15 -1
- data/sig/courier/models/routing_strategy_create_params.rbs +20 -3
- data/sig/courier/models/schedule_broadcast_request.rbs +48 -0
- data/sig/courier/models/send_broadcast_request.rbs +36 -0
- data/sig/courier/models/send_message_params.rbs +17 -1
- data/sig/courier/models/update_broadcast_request.rbs +13 -0
- data/sig/courier/models/users/preference_bulk_update_params.rbs +15 -1
- data/sig/courier/models/workspace_preference_create_params.rbs +20 -3
- data/sig/courier/models/workspace_preference_publish_params.rbs +20 -3
- data/sig/courier/models/workspace_preferences/topic_create_params.rbs +18 -1
- data/sig/courier/models.rbs +38 -0
- data/sig/courier/resources/automations/invoke.rbs +4 -0
- data/sig/courier/resources/brands.rbs +2 -0
- data/sig/courier/resources/broadcasts.rbs +74 -0
- data/sig/courier/resources/inbox/messages.rbs +19 -0
- data/sig/courier/resources/inbox.rbs +9 -0
- data/sig/courier/resources/journeys/templates.rbs +4 -0
- data/sig/courier/resources/journeys.rbs +8 -0
- data/sig/courier/resources/lists/subscriptions.rbs +2 -0
- data/sig/courier/resources/notifications.rbs +4 -0
- data/sig/courier/resources/profiles/lists.rbs +2 -0
- data/sig/courier/resources/profiles.rbs +2 -0
- data/sig/courier/resources/providers.rbs +2 -0
- data/sig/courier/resources/routing_strategies.rbs +2 -0
- data/sig/courier/resources/send.rbs +2 -0
- data/sig/courier/resources/users/preferences.rbs +2 -0
- data/sig/courier/resources/workspace_preferences/topics.rbs +2 -0
- data/sig/courier/resources/workspace_preferences.rbs +4 -0
- metadata +71 -2
|
@@ -5,27 +5,36 @@ module Courier
|
|
|
5
5
|
module Users
|
|
6
6
|
class TopicPreference < Courier::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute default_status
|
|
8
|
+
# The topic's default status, returned on reads. It applies whenever the user has
|
|
9
|
+
# no override of their own (status equals this value).
|
|
8
10
|
#
|
|
9
11
|
# @return [Symbol, Courier::Models::PreferenceStatus]
|
|
10
12
|
required :default_status, enum: -> { Courier::PreferenceStatus }
|
|
11
13
|
|
|
12
14
|
# @!attribute status
|
|
15
|
+
# The user's subscription status for this topic. OPTED_IN or OPTED_OUT reflect the
|
|
16
|
+
# user's own choice; REQUIRED is a topic-level default set in the preferences
|
|
17
|
+
# editor, not a user choice.
|
|
13
18
|
#
|
|
14
19
|
# @return [Symbol, Courier::Models::PreferenceStatus]
|
|
15
20
|
required :status, enum: -> { Courier::PreferenceStatus }
|
|
16
21
|
|
|
17
22
|
# @!attribute topic_id
|
|
23
|
+
# The unique identifier of the subscription topic this preference applies to.
|
|
18
24
|
#
|
|
19
25
|
# @return [String]
|
|
20
26
|
required :topic_id, String
|
|
21
27
|
|
|
22
28
|
# @!attribute topic_name
|
|
29
|
+
# The display name of the subscription topic, returned on reads.
|
|
23
30
|
#
|
|
24
31
|
# @return [String]
|
|
25
32
|
required :topic_name, String
|
|
26
33
|
|
|
27
34
|
# @!attribute custom_routing
|
|
28
|
-
# The
|
|
35
|
+
# The channels the user has chosen to receive this topic on, present only when
|
|
36
|
+
# has_custom_routing is true. One or more of: direct_message, email, push, sms,
|
|
37
|
+
# webhook, inbox.
|
|
29
38
|
#
|
|
30
39
|
# @return [Array<Symbol, Courier::Models::ChannelClassification>, nil]
|
|
31
40
|
optional :custom_routing,
|
|
@@ -33,22 +42,27 @@ module Courier
|
|
|
33
42
|
nil?: true
|
|
34
43
|
|
|
35
44
|
# @!attribute has_custom_routing
|
|
45
|
+
# Whether the user has chosen specific delivery channels for this topic (listed in
|
|
46
|
+
# custom_routing) rather than the topic's default routing.
|
|
36
47
|
#
|
|
37
48
|
# @return [Boolean, nil]
|
|
38
49
|
optional :has_custom_routing, Courier::Internal::Type::Boolean, nil?: true
|
|
39
50
|
|
|
40
51
|
# @!method initialize(default_status:, status:, topic_id:, topic_name:, custom_routing: nil, has_custom_routing: nil)
|
|
41
|
-
#
|
|
52
|
+
# Some parameter documentations has been truncated, see
|
|
53
|
+
# {Courier::Models::Users::TopicPreference} for more details.
|
|
42
54
|
#
|
|
43
|
-
# @param
|
|
55
|
+
# @param default_status [Symbol, Courier::Models::PreferenceStatus] The topic's default status, returned on reads. It applies whenever the user has
|
|
44
56
|
#
|
|
45
|
-
# @param
|
|
57
|
+
# @param status [Symbol, Courier::Models::PreferenceStatus] The user's subscription status for this topic. OPTED_IN or OPTED_OUT reflect the
|
|
46
58
|
#
|
|
47
|
-
# @param
|
|
59
|
+
# @param topic_id [String] The unique identifier of the subscription topic this preference applies to.
|
|
48
60
|
#
|
|
49
|
-
# @param
|
|
61
|
+
# @param topic_name [String] The display name of the subscription topic, returned on reads.
|
|
50
62
|
#
|
|
51
|
-
# @param
|
|
63
|
+
# @param custom_routing [Array<Symbol, Courier::Models::ChannelClassification>, nil] The channels the user has chosen to receive this topic on, present only when has
|
|
64
|
+
#
|
|
65
|
+
# @param has_custom_routing [Boolean, nil] Whether the user has chosen specific delivery channels for this topic (listed in
|
|
52
66
|
end
|
|
53
67
|
end
|
|
54
68
|
end
|
|
@@ -7,7 +7,19 @@ module Courier
|
|
|
7
7
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Courier::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!
|
|
10
|
+
# @!attribute idempotency_key
|
|
11
|
+
#
|
|
12
|
+
# @return [String, nil]
|
|
13
|
+
optional :idempotency_key, String
|
|
14
|
+
|
|
15
|
+
# @!attribute x_idempotency_expiration
|
|
16
|
+
#
|
|
17
|
+
# @return [String, nil]
|
|
18
|
+
optional :x_idempotency_expiration, String
|
|
19
|
+
|
|
20
|
+
# @!method initialize(idempotency_key: nil, x_idempotency_expiration: nil, request_options: {})
|
|
21
|
+
# @param idempotency_key [String]
|
|
22
|
+
# @param x_idempotency_expiration [String]
|
|
11
23
|
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
12
24
|
end
|
|
13
25
|
end
|
|
@@ -7,7 +7,19 @@ module Courier
|
|
|
7
7
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Courier::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!
|
|
10
|
+
# @!attribute idempotency_key
|
|
11
|
+
#
|
|
12
|
+
# @return [String, nil]
|
|
13
|
+
optional :idempotency_key, String
|
|
14
|
+
|
|
15
|
+
# @!attribute x_idempotency_expiration
|
|
16
|
+
#
|
|
17
|
+
# @return [String, nil]
|
|
18
|
+
optional :x_idempotency_expiration, String
|
|
19
|
+
|
|
20
|
+
# @!method initialize(idempotency_key: nil, x_idempotency_expiration: nil, request_options: {})
|
|
21
|
+
# @param idempotency_key [String]
|
|
22
|
+
# @param x_idempotency_expiration [String]
|
|
11
23
|
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
12
24
|
end
|
|
13
25
|
end
|
|
@@ -13,8 +13,20 @@ module Courier
|
|
|
13
13
|
# @return [String]
|
|
14
14
|
required :section_id, String
|
|
15
15
|
|
|
16
|
-
# @!
|
|
16
|
+
# @!attribute idempotency_key
|
|
17
|
+
#
|
|
18
|
+
# @return [String, nil]
|
|
19
|
+
optional :idempotency_key, String
|
|
20
|
+
|
|
21
|
+
# @!attribute x_idempotency_expiration
|
|
22
|
+
#
|
|
23
|
+
# @return [String, nil]
|
|
24
|
+
optional :x_idempotency_expiration, String
|
|
25
|
+
|
|
26
|
+
# @!method initialize(section_id:, idempotency_key: nil, x_idempotency_expiration: nil, request_options: {})
|
|
17
27
|
# @param section_id [String]
|
|
28
|
+
# @param idempotency_key [String]
|
|
29
|
+
# @param x_idempotency_expiration [String]
|
|
18
30
|
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
19
31
|
end
|
|
20
32
|
end
|
data/lib/courier/models.rb
CHANGED
|
@@ -113,6 +113,34 @@ module Courier
|
|
|
113
113
|
|
|
114
114
|
BrandUpdateParams = Courier::Models::BrandUpdateParams
|
|
115
115
|
|
|
116
|
+
Broadcast = Courier::Models::Broadcast
|
|
117
|
+
|
|
118
|
+
BroadcastArchiveParams = Courier::Models::BroadcastArchiveParams
|
|
119
|
+
|
|
120
|
+
BroadcastCancelParams = Courier::Models::BroadcastCancelParams
|
|
121
|
+
|
|
122
|
+
BroadcastCreateParams = Courier::Models::BroadcastCreateParams
|
|
123
|
+
|
|
124
|
+
BroadcastDuplicateParams = Courier::Models::BroadcastDuplicateParams
|
|
125
|
+
|
|
126
|
+
BroadcastListParams = Courier::Models::BroadcastListParams
|
|
127
|
+
|
|
128
|
+
BroadcastListResponse = Courier::Models::BroadcastListResponse
|
|
129
|
+
|
|
130
|
+
BroadcastPutContentParams = Courier::Models::BroadcastPutContentParams
|
|
131
|
+
|
|
132
|
+
BroadcastRetrieveContentParams = Courier::Models::BroadcastRetrieveContentParams
|
|
133
|
+
|
|
134
|
+
BroadcastRetrieveParams = Courier::Models::BroadcastRetrieveParams
|
|
135
|
+
|
|
136
|
+
BroadcastSchedule = Courier::Models::BroadcastSchedule
|
|
137
|
+
|
|
138
|
+
BroadcastScheduleParams = Courier::Models::BroadcastScheduleParams
|
|
139
|
+
|
|
140
|
+
BroadcastSendParams = Courier::Models::BroadcastSendParams
|
|
141
|
+
|
|
142
|
+
BroadcastUpdateParams = Courier::Models::BroadcastUpdateParams
|
|
143
|
+
|
|
116
144
|
CancelJourneyRequest = Courier::Models::CancelJourneyRequest
|
|
117
145
|
|
|
118
146
|
CancelJourneyResponse = Courier::Models::CancelJourneyResponse
|
|
@@ -127,6 +155,8 @@ module Courier
|
|
|
127
155
|
|
|
128
156
|
Check = Courier::Models::Check
|
|
129
157
|
|
|
158
|
+
CreateBroadcastRequest = Courier::Models::CreateBroadcastRequest
|
|
159
|
+
|
|
130
160
|
CreateJourneyRequest = Courier::Models::CreateJourneyRequest
|
|
131
161
|
|
|
132
162
|
DefaultPreferences = Courier::Models::DefaultPreferences
|
|
@@ -185,6 +215,8 @@ module Courier
|
|
|
185
215
|
|
|
186
216
|
InboundTrackEventParams = Courier::Models::InboundTrackEventParams
|
|
187
217
|
|
|
218
|
+
Inbox = Courier::Models::Inbox
|
|
219
|
+
|
|
188
220
|
Intercom = Courier::Models::Intercom
|
|
189
221
|
|
|
190
222
|
IntercomRecipient = Courier::Models::IntercomRecipient
|
|
@@ -472,6 +504,10 @@ module Courier
|
|
|
472
504
|
|
|
473
505
|
Rule = Courier::Models::Rule
|
|
474
506
|
|
|
507
|
+
ScheduleBroadcastRequest = Courier::Models::ScheduleBroadcastRequest
|
|
508
|
+
|
|
509
|
+
SendBroadcastRequest = Courier::Models::SendBroadcastRequest
|
|
510
|
+
|
|
475
511
|
SendDirectMessage = Courier::Models::SendDirectMessage
|
|
476
512
|
|
|
477
513
|
SendMessageParams = Courier::Models::SendMessageParams
|
|
@@ -534,6 +570,8 @@ module Courier
|
|
|
534
570
|
|
|
535
571
|
TranslationUpdateParams = Courier::Models::TranslationUpdateParams
|
|
536
572
|
|
|
573
|
+
UpdateBroadcastRequest = Courier::Models::UpdateBroadcastRequest
|
|
574
|
+
|
|
537
575
|
UserProfile = Courier::Models::UserProfile
|
|
538
576
|
|
|
539
577
|
UserProfileFirebaseToken = Courier::Models::UserProfileFirebaseToken
|
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Resources
|
|
5
|
+
# Define filter-based groups whose membership Courier recalculates as user
|
|
6
|
+
# profiles change.
|
|
5
7
|
class Audiences
|
|
6
|
-
# Returns the
|
|
8
|
+
# Returns one audience with its name, description, and the filter and AND or OR
|
|
9
|
+
# operator that decide which users belong to it.
|
|
7
10
|
#
|
|
8
11
|
# @overload retrieve(audience_id, request_options: {})
|
|
9
12
|
#
|
|
@@ -26,7 +29,8 @@ module Courier
|
|
|
26
29
|
# Some parameter documentations has been truncated, see
|
|
27
30
|
# {Courier::Models::AudienceUpdateParams} for more details.
|
|
28
31
|
#
|
|
29
|
-
# Creates or
|
|
32
|
+
# Creates or replaces an audience from a filter and an AND or OR operator.
|
|
33
|
+
# Membership recalculates automatically as profiles change.
|
|
30
34
|
#
|
|
31
35
|
# @overload update(audience_id, description: nil, filter: nil, name: nil, operator: nil, request_options: {})
|
|
32
36
|
#
|
|
@@ -56,7 +60,8 @@ module Courier
|
|
|
56
60
|
)
|
|
57
61
|
end
|
|
58
62
|
|
|
59
|
-
#
|
|
63
|
+
# Returns the audiences in the workspace with paging. Audiences are filter-based
|
|
64
|
+
# groups that recalculate as user profiles change.
|
|
60
65
|
#
|
|
61
66
|
# @overload list(cursor: nil, request_options: {})
|
|
62
67
|
#
|
|
@@ -79,7 +84,8 @@ module Courier
|
|
|
79
84
|
)
|
|
80
85
|
end
|
|
81
86
|
|
|
82
|
-
# Deletes
|
|
87
|
+
# Deletes an audience permanently, so update any caller sending to it by audience
|
|
88
|
+
# id first. Those sends fail once the audience is gone.
|
|
83
89
|
#
|
|
84
90
|
# @overload delete(audience_id, request_options: {})
|
|
85
91
|
#
|
|
@@ -99,7 +105,8 @@ module Courier
|
|
|
99
105
|
)
|
|
100
106
|
end
|
|
101
107
|
|
|
102
|
-
#
|
|
108
|
+
# Returns the users currently matching an audience filter, with paging. Membership
|
|
109
|
+
# is recalculated, so results shift as profiles change.
|
|
103
110
|
#
|
|
104
111
|
# @overload list_members(audience_id, cursor: nil, request_options: {})
|
|
105
112
|
#
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Resources
|
|
5
|
+
# Read the audit trail of configuration and access changes in your workspace.
|
|
5
6
|
class AuditEvents
|
|
6
|
-
#
|
|
7
|
+
# Returns one audit event by id, including the actor who performed it, the target
|
|
8
|
+
# they changed, the source, the event type, and a timestamp.
|
|
7
9
|
#
|
|
8
10
|
# @overload retrieve(audit_event_id, request_options: {})
|
|
9
11
|
#
|
|
@@ -23,7 +25,8 @@ module Courier
|
|
|
23
25
|
)
|
|
24
26
|
end
|
|
25
27
|
|
|
26
|
-
#
|
|
28
|
+
# Returns the workspace's audit event log with cursor paging. Each event records
|
|
29
|
+
# the actor, target, source, type, and timestamp of a change.
|
|
27
30
|
#
|
|
28
31
|
# @overload list(cursor: nil, request_options: {})
|
|
29
32
|
#
|
|
@@ -2,11 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Resources
|
|
5
|
+
# Issue scoped, short-lived JWTs so client-side SDKs — Inbox, Preferences, and the
|
|
6
|
+
# embedded designer — can call Courier as a single user. Server-side requests
|
|
7
|
+
# authenticate with your workspace API key instead.
|
|
5
8
|
class Auth
|
|
6
9
|
# Some parameter documentations has been truncated, see
|
|
7
10
|
# {Courier::Models::AuthIssueTokenParams} for more details.
|
|
8
11
|
#
|
|
9
|
-
# Returns a
|
|
12
|
+
# Returns a JWT for authenticating client-side SDKs such as the Inbox. You supply
|
|
13
|
+
# the scope and an expires_in duration, both required.
|
|
10
14
|
#
|
|
11
15
|
# @overload issue_token(expires_in:, scope:, request_options: {})
|
|
12
16
|
#
|
|
@@ -3,20 +3,33 @@
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Resources
|
|
5
5
|
class Automations
|
|
6
|
+
# Invoke a stored automation template or an ad hoc automation defined in the
|
|
7
|
+
# request.
|
|
6
8
|
class Invoke
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
-
#
|
|
14
|
-
#
|
|
15
|
-
# @param
|
|
16
|
-
#
|
|
17
|
-
# @param
|
|
18
|
-
#
|
|
19
|
-
# @param
|
|
9
|
+
# Some parameter documentations has been truncated, see
|
|
10
|
+
# {Courier::Models::Automations::InvokeInvokeAdHocParams} for more details.
|
|
11
|
+
#
|
|
12
|
+
# Runs a series of automation steps supplied inline, without a saved template, and
|
|
13
|
+
# returns a runId.
|
|
14
|
+
#
|
|
15
|
+
# @overload invoke_ad_hoc(automation:, brand: nil, data: nil, profile: nil, recipient: nil, template: nil, idempotency_key: nil, x_idempotency_expiration: nil, request_options: {})
|
|
16
|
+
#
|
|
17
|
+
# @param automation [Courier::Models::Automations::InvokeInvokeAdHocParams::Automation] Body param
|
|
18
|
+
#
|
|
19
|
+
# @param brand [String, nil] Body param
|
|
20
|
+
#
|
|
21
|
+
# @param data [Hash{Symbol=>Object}, nil] Body param
|
|
22
|
+
#
|
|
23
|
+
# @param profile [Hash{Symbol=>Object}, nil] Body param
|
|
24
|
+
#
|
|
25
|
+
# @param recipient [String, nil] Body param
|
|
26
|
+
#
|
|
27
|
+
# @param template [String, nil] Body param
|
|
28
|
+
#
|
|
29
|
+
# @param idempotency_key [String] Header param: A unique key that makes this request idempotent. If Courier receiv
|
|
30
|
+
#
|
|
31
|
+
# @param x_idempotency_expiration [String] Header param: How long the idempotency key remains valid, as a Unix epoch timest
|
|
32
|
+
#
|
|
20
33
|
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
21
34
|
#
|
|
22
35
|
# @return [Courier::Models::AutomationInvokeResponse]
|
|
@@ -24,10 +37,13 @@ module Courier
|
|
|
24
37
|
# @see Courier::Models::Automations::InvokeInvokeAdHocParams
|
|
25
38
|
def invoke_ad_hoc(params)
|
|
26
39
|
parsed, options = Courier::Automations::InvokeInvokeAdHocParams.dump_request(params)
|
|
40
|
+
header_params =
|
|
41
|
+
{idempotency_key: "idempotency-key", x_idempotency_expiration: "x-idempotency-expiration"}
|
|
27
42
|
@client.request(
|
|
28
43
|
method: :post,
|
|
29
44
|
path: "automations/invoke",
|
|
30
|
-
|
|
45
|
+
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
46
|
+
body: parsed.except(*header_params.keys),
|
|
31
47
|
model: Courier::AutomationInvokeResponse,
|
|
32
48
|
options: options
|
|
33
49
|
)
|
|
@@ -36,21 +52,26 @@ module Courier
|
|
|
36
52
|
# Some parameter documentations has been truncated, see
|
|
37
53
|
# {Courier::Models::Automations::InvokeInvokeByTemplateParams} for more details.
|
|
38
54
|
#
|
|
39
|
-
#
|
|
55
|
+
# Starts an automation run from a saved template for one recipient, with optional
|
|
56
|
+
# data and profile, and returns a runId.
|
|
57
|
+
#
|
|
58
|
+
# @overload invoke_by_template(template_id, recipient:, brand: nil, data: nil, profile: nil, template: nil, idempotency_key: nil, x_idempotency_expiration: nil, request_options: {})
|
|
59
|
+
#
|
|
60
|
+
# @param template_id [String] Path param: A unique identifier representing the automation template to be invok
|
|
40
61
|
#
|
|
41
|
-
# @
|
|
62
|
+
# @param recipient [String, nil] Body param
|
|
42
63
|
#
|
|
43
|
-
# @param
|
|
64
|
+
# @param brand [String, nil] Body param
|
|
44
65
|
#
|
|
45
|
-
# @param
|
|
66
|
+
# @param data [Hash{Symbol=>Object}, nil] Body param
|
|
46
67
|
#
|
|
47
|
-
# @param
|
|
68
|
+
# @param profile [Hash{Symbol=>Object}, nil] Body param
|
|
48
69
|
#
|
|
49
|
-
# @param
|
|
70
|
+
# @param template [String, nil] Body param
|
|
50
71
|
#
|
|
51
|
-
# @param
|
|
72
|
+
# @param idempotency_key [String] Header param: A unique key that makes this request idempotent. If Courier receiv
|
|
52
73
|
#
|
|
53
|
-
# @param
|
|
74
|
+
# @param x_idempotency_expiration [String] Header param: How long the idempotency key remains valid, as a Unix epoch timest
|
|
54
75
|
#
|
|
55
76
|
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
56
77
|
#
|
|
@@ -59,10 +80,13 @@ module Courier
|
|
|
59
80
|
# @see Courier::Models::Automations::InvokeInvokeByTemplateParams
|
|
60
81
|
def invoke_by_template(template_id, params)
|
|
61
82
|
parsed, options = Courier::Automations::InvokeInvokeByTemplateParams.dump_request(params)
|
|
83
|
+
header_params =
|
|
84
|
+
{idempotency_key: "idempotency-key", x_idempotency_expiration: "x-idempotency-expiration"}
|
|
62
85
|
@client.request(
|
|
63
86
|
method: :post,
|
|
64
87
|
path: ["automations/%1$s/invoke", template_id],
|
|
65
|
-
|
|
88
|
+
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
89
|
+
body: parsed.except(*header_params.keys),
|
|
66
90
|
model: Courier::AutomationInvokeResponse,
|
|
67
91
|
options: options
|
|
68
92
|
)
|
|
@@ -2,14 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Resources
|
|
5
|
+
# Invoke a stored automation template or an ad hoc automation defined in the
|
|
6
|
+
# request.
|
|
5
7
|
class Automations
|
|
8
|
+
# Invoke a stored automation template or an ad hoc automation defined in the
|
|
9
|
+
# request.
|
|
6
10
|
# @return [Courier::Resources::Automations::Invoke]
|
|
7
11
|
attr_reader :invoke
|
|
8
12
|
|
|
9
13
|
# Some parameter documentations has been truncated, see
|
|
10
14
|
# {Courier::Models::AutomationListParams} for more details.
|
|
11
15
|
#
|
|
12
|
-
#
|
|
16
|
+
# Lists the workspace's saved automation templates, each with its id and a cursor
|
|
17
|
+
# for paging to the next page of results.
|
|
13
18
|
#
|
|
14
19
|
# @overload list(cursor: nil, version: nil, request_options: {})
|
|
15
20
|
#
|
|
@@ -2,16 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Resources
|
|
5
|
+
# Manage the logos, colors, and layout that give the templates you send a
|
|
6
|
+
# consistent look.
|
|
5
7
|
class Brands
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
+
# Some parameter documentations has been truncated, see
|
|
9
|
+
# {Courier::Models::BrandCreateParams} for more details.
|
|
8
10
|
#
|
|
9
|
-
#
|
|
11
|
+
# Creates a brand from a name and settings, including primary and secondary
|
|
12
|
+
# colors. Brands supply the logo, colors, and styling that templates render with.
|
|
13
|
+
#
|
|
14
|
+
# @overload create(name:, settings:, id: nil, snippets: nil, idempotency_key: nil, x_idempotency_expiration: nil, request_options: {})
|
|
15
|
+
#
|
|
16
|
+
# @param name [String] Body param
|
|
17
|
+
#
|
|
18
|
+
# @param settings [Courier::Models::BrandSettings] Body param
|
|
19
|
+
#
|
|
20
|
+
# @param id [String, nil] Body param
|
|
21
|
+
#
|
|
22
|
+
# @param snippets [Courier::Models::BrandSnippets, nil] Body param
|
|
23
|
+
#
|
|
24
|
+
# @param idempotency_key [String] Header param: A unique key that makes this request idempotent. If Courier receiv
|
|
25
|
+
#
|
|
26
|
+
# @param x_idempotency_expiration [String] Header param: How long the idempotency key remains valid, as a Unix epoch timest
|
|
10
27
|
#
|
|
11
|
-
# @param name [String]
|
|
12
|
-
# @param settings [Courier::Models::BrandSettings]
|
|
13
|
-
# @param id [String, nil]
|
|
14
|
-
# @param snippets [Courier::Models::BrandSnippets, nil]
|
|
15
28
|
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
16
29
|
#
|
|
17
30
|
# @return [Courier::Models::Brand]
|
|
@@ -19,10 +32,20 @@ module Courier
|
|
|
19
32
|
# @see Courier::Models::BrandCreateParams
|
|
20
33
|
def create(params)
|
|
21
34
|
parsed, options = Courier::BrandCreateParams.dump_request(params)
|
|
22
|
-
|
|
35
|
+
header_params =
|
|
36
|
+
{idempotency_key: "idempotency-key", x_idempotency_expiration: "x-idempotency-expiration"}
|
|
37
|
+
@client.request(
|
|
38
|
+
method: :post,
|
|
39
|
+
path: "brands",
|
|
40
|
+
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
41
|
+
body: parsed.except(*header_params.keys),
|
|
42
|
+
model: Courier::Brand,
|
|
43
|
+
options: options
|
|
44
|
+
)
|
|
23
45
|
end
|
|
24
46
|
|
|
25
|
-
#
|
|
47
|
+
# Returns one brand by id, including its colors, logo and styling settings,
|
|
48
|
+
# Handlebars snippets, and published version.
|
|
26
49
|
#
|
|
27
50
|
# @overload retrieve(brand_id, request_options: {})
|
|
28
51
|
#
|
|
@@ -42,7 +65,8 @@ module Courier
|
|
|
42
65
|
)
|
|
43
66
|
end
|
|
44
67
|
|
|
45
|
-
#
|
|
68
|
+
# Replaces a brand with the values you supply, so send the complete settings and
|
|
69
|
+
# snippets rather than only the fields you want changed.
|
|
46
70
|
#
|
|
47
71
|
# @overload update(brand_id, name:, settings: nil, snippets: nil, request_options: {})
|
|
48
72
|
#
|
|
@@ -70,7 +94,8 @@ module Courier
|
|
|
70
94
|
)
|
|
71
95
|
end
|
|
72
96
|
|
|
73
|
-
#
|
|
97
|
+
# Lists the workspace's brands. Every entry carries its name, styling settings,
|
|
98
|
+
# snippets, and published version.
|
|
74
99
|
#
|
|
75
100
|
# @overload list(cursor: nil, request_options: {})
|
|
76
101
|
#
|
|
@@ -93,7 +118,8 @@ module Courier
|
|
|
93
118
|
)
|
|
94
119
|
end
|
|
95
120
|
|
|
96
|
-
#
|
|
121
|
+
# Deletes a brand by id. Reassign any template or tenant that references it before
|
|
122
|
+
# deleting to keep their styling intact.
|
|
97
123
|
#
|
|
98
124
|
# @overload delete(brand_id, request_options: {})
|
|
99
125
|
#
|