trycourier 4.7.0 → 4.8.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 +39 -0
- data/README.md +25 -235
- data/lib/courier/client.rb +4 -0
- data/lib/courier/internal/util.rb +32 -1
- data/lib/courier/models/audience_delete_params.rb +7 -1
- data/lib/courier/models/audience_list_members_params.rb +8 -1
- data/lib/courier/models/audience_retrieve_params.rb +7 -1
- data/lib/courier/models/audience_update_params.rb +8 -1
- data/lib/courier/models/audit_event_retrieve_params.rb +7 -1
- data/lib/courier/models/automations/invoke_invoke_by_template_params.rb +7 -1
- data/lib/courier/models/brand_delete_params.rb +7 -1
- data/lib/courier/models/brand_retrieve_params.rb +7 -1
- data/lib/courier/models/brand_update_params.rb +8 -1
- data/lib/courier/models/bulk_add_users_params.rb +7 -1
- data/lib/courier/models/bulk_list_users_params.rb +8 -1
- data/lib/courier/models/bulk_retrieve_job_params.rb +7 -1
- data/lib/courier/models/bulk_run_job_params.rb +7 -1
- data/lib/courier/models/elemental_content.rb +1 -8
- data/lib/courier/models/journey.rb +63 -0
- data/lib/courier/models/journey_invoke_params.rb +20 -0
- data/lib/courier/models/journey_list_params.rb +47 -0
- data/lib/courier/models/journeys_invoke_request.rb +49 -0
- data/lib/courier/models/journeys_invoke_response.rb +17 -0
- data/lib/courier/models/journeys_list_response.rb +24 -0
- data/lib/courier/models/list_delete_params.rb +7 -1
- data/lib/courier/models/list_restore_params.rb +7 -1
- data/lib/courier/models/list_retrieve_params.rb +7 -1
- data/lib/courier/models/list_update_params.rb +7 -1
- data/lib/courier/models/lists/subscription_add_params.rb +7 -1
- data/lib/courier/models/lists/subscription_list_params.rb +8 -1
- data/lib/courier/models/lists/subscription_subscribe_params.rb +7 -1
- data/lib/courier/models/lists/subscription_subscribe_user_params.rb +7 -1
- data/lib/courier/models/lists/subscription_unsubscribe_user_params.rb +7 -1
- data/lib/courier/models/message_cancel_params.rb +7 -1
- data/lib/courier/models/message_content_params.rb +7 -1
- data/lib/courier/models/message_details.rb +37 -37
- data/lib/courier/models/message_history_params.rb +8 -1
- data/lib/courier/models/message_retrieve_params.rb +7 -1
- data/lib/courier/models/notification_retrieve_content_params.rb +7 -1
- data/lib/courier/models/notifications/check_delete_params.rb +7 -1
- data/lib/courier/models/notifications/check_list_params.rb +7 -1
- data/lib/courier/models/notifications/check_update_params.rb +7 -1
- data/lib/courier/models/notifications/draft_retrieve_content_params.rb +7 -1
- data/lib/courier/models/profile_create_params.rb +7 -1
- data/lib/courier/models/profile_delete_params.rb +7 -1
- data/lib/courier/models/profile_replace_params.rb +7 -1
- data/lib/courier/models/profile_retrieve_params.rb +7 -1
- data/lib/courier/models/profile_update_params.rb +8 -1
- data/lib/courier/models/profiles/list_delete_params.rb +7 -1
- data/lib/courier/models/profiles/list_retrieve_params.rb +8 -1
- data/lib/courier/models/profiles/list_subscribe_params.rb +7 -1
- data/lib/courier/models/request_archive_params.rb +7 -1
- data/lib/courier/models/tenant_delete_params.rb +7 -1
- data/lib/courier/models/tenant_list_users_params.rb +8 -1
- data/lib/courier/models/tenant_retrieve_params.rb +7 -1
- data/lib/courier/models/tenant_update_params.rb +8 -1
- data/lib/courier/models/tenants/preferences/item_delete_params.rb +7 -1
- data/lib/courier/models/tenants/preferences/item_update_params.rb +7 -1
- data/lib/courier/models/tenants/template_list_params.rb +8 -1
- data/lib/courier/models/tenants/template_publish_params.rb +7 -1
- data/lib/courier/models/tenants/template_replace_params.rb +7 -1
- data/lib/courier/models/tenants/template_retrieve_params.rb +7 -1
- data/lib/courier/models/tenants/templates/version_retrieve_params.rb +7 -1
- data/lib/courier/models/translation_retrieve_params.rb +7 -1
- data/lib/courier/models/translation_update_params.rb +7 -1
- data/lib/courier/models/users/preference_retrieve_params.rb +8 -1
- data/lib/courier/models/users/preference_retrieve_topic_params.rb +8 -1
- data/lib/courier/models/users/preference_update_or_create_topic_params.rb +8 -1
- data/lib/courier/models/users/tenant_add_multiple_params.rb +7 -1
- data/lib/courier/models/users/tenant_add_single_params.rb +7 -1
- data/lib/courier/models/users/tenant_list_params.rb +8 -1
- data/lib/courier/models/users/tenant_remove_all_params.rb +7 -1
- data/lib/courier/models/users/tenant_remove_single_params.rb +7 -1
- data/lib/courier/models/users/token_add_multiple_params.rb +7 -1
- data/lib/courier/models/users/token_add_single_params.rb +168 -2
- data/lib/courier/models/users/token_delete_params.rb +7 -1
- data/lib/courier/models/users/token_list_params.rb +7 -1
- data/lib/courier/models/users/token_retrieve_params.rb +7 -1
- data/lib/courier/models/users/token_update_params.rb +7 -1
- data/lib/courier/models.rb +12 -0
- data/lib/courier/resources/audiences.rb +4 -2
- data/lib/courier/resources/audit_events.rb +2 -1
- data/lib/courier/resources/automations.rb +2 -1
- data/lib/courier/resources/brands.rb +2 -1
- data/lib/courier/resources/bulk.rb +2 -1
- data/lib/courier/resources/journeys.rb +73 -0
- data/lib/courier/resources/lists/subscriptions.rb +2 -1
- data/lib/courier/resources/lists.rb +2 -1
- data/lib/courier/resources/messages.rb +4 -2
- data/lib/courier/resources/notifications.rb +2 -1
- data/lib/courier/resources/profiles/lists.rb +2 -1
- data/lib/courier/resources/tenants/templates.rb +2 -1
- data/lib/courier/resources/tenants.rb +4 -2
- data/lib/courier/resources/users/preferences.rb +7 -4
- data/lib/courier/resources/users/tenants.rb +2 -1
- data/lib/courier/resources/users/tokens.rb +7 -9
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +7 -0
- data/rbi/courier/client.rbi +3 -0
- data/rbi/courier/internal/util.rbi +21 -1
- data/rbi/courier/models/audience_delete_params.rbi +13 -5
- data/rbi/courier/models/audience_list_members_params.rbi +6 -0
- data/rbi/courier/models/audience_retrieve_params.rbi +13 -5
- data/rbi/courier/models/audience_update_params.rbi +6 -0
- data/rbi/courier/models/audit_event_retrieve_params.rbi +13 -5
- data/rbi/courier/models/automations/invoke_invoke_by_template_params.rbi +6 -0
- data/rbi/courier/models/brand_delete_params.rbi +13 -5
- data/rbi/courier/models/brand_retrieve_params.rbi +13 -5
- data/rbi/courier/models/brand_update_params.rbi +6 -0
- data/rbi/courier/models/bulk_add_users_params.rbi +6 -1
- data/rbi/courier/models/bulk_list_users_params.rbi +6 -0
- data/rbi/courier/models/bulk_retrieve_job_params.rbi +13 -5
- data/rbi/courier/models/bulk_run_job_params.rbi +13 -5
- data/rbi/courier/models/elemental_content.rbi +3 -9
- data/rbi/courier/models/journey.rbi +91 -0
- data/rbi/courier/models/journey_invoke_params.rbi +35 -0
- data/rbi/courier/models/journey_list_params.rbi +85 -0
- data/rbi/courier/models/journeys_invoke_request.rbi +84 -0
- data/rbi/courier/models/journeys_invoke_response.rbi +27 -0
- data/rbi/courier/models/journeys_list_response.rbi +46 -0
- data/rbi/courier/models/list_delete_params.rbi +13 -5
- data/rbi/courier/models/list_restore_params.rbi +13 -5
- data/rbi/courier/models/list_retrieve_params.rbi +13 -5
- data/rbi/courier/models/list_update_params.rbi +6 -1
- data/rbi/courier/models/lists/subscription_add_params.rbi +6 -1
- data/rbi/courier/models/lists/subscription_list_params.rbi +6 -0
- data/rbi/courier/models/lists/subscription_subscribe_params.rbi +6 -1
- data/rbi/courier/models/lists/subscription_subscribe_user_params.rbi +6 -1
- data/rbi/courier/models/lists/subscription_unsubscribe_user_params.rbi +10 -2
- data/rbi/courier/models/message_cancel_params.rbi +13 -5
- data/rbi/courier/models/message_content_params.rbi +13 -5
- data/rbi/courier/models/message_details.rbi +55 -43
- data/rbi/courier/models/message_history_params.rbi +10 -1
- data/rbi/courier/models/message_retrieve_params.rbi +13 -5
- data/rbi/courier/models/notification_retrieve_content_params.rbi +13 -5
- data/rbi/courier/models/notifications/check_delete_params.rbi +10 -2
- data/rbi/courier/models/notifications/check_list_params.rbi +10 -2
- data/rbi/courier/models/notifications/check_update_params.rbi +6 -1
- data/rbi/courier/models/notifications/draft_retrieve_content_params.rbi +13 -5
- data/rbi/courier/models/profile_create_params.rbi +6 -1
- data/rbi/courier/models/profile_delete_params.rbi +13 -5
- data/rbi/courier/models/profile_replace_params.rbi +6 -1
- data/rbi/courier/models/profile_retrieve_params.rbi +13 -5
- data/rbi/courier/models/profile_update_params.rbi +6 -0
- data/rbi/courier/models/profiles/list_delete_params.rbi +13 -5
- data/rbi/courier/models/profiles/list_retrieve_params.rbi +6 -0
- data/rbi/courier/models/profiles/list_subscribe_params.rbi +6 -1
- data/rbi/courier/models/request_archive_params.rbi +13 -5
- data/rbi/courier/models/tenant_delete_params.rbi +13 -5
- data/rbi/courier/models/tenant_list_users_params.rbi +6 -0
- data/rbi/courier/models/tenant_retrieve_params.rbi +13 -5
- data/rbi/courier/models/tenant_update_params.rbi +6 -0
- data/rbi/courier/models/tenants/preferences/item_delete_params.rbi +10 -2
- data/rbi/courier/models/tenants/preferences/item_update_params.rbi +10 -2
- data/rbi/courier/models/tenants/template_list_params.rbi +6 -0
- data/rbi/courier/models/tenants/template_publish_params.rbi +10 -2
- data/rbi/courier/models/tenants/template_replace_params.rbi +10 -2
- data/rbi/courier/models/tenants/template_retrieve_params.rbi +10 -2
- data/rbi/courier/models/tenants/templates/version_retrieve_params.rbi +6 -1
- data/rbi/courier/models/translation_retrieve_params.rbi +10 -2
- data/rbi/courier/models/translation_update_params.rbi +6 -1
- data/rbi/courier/models/users/preference_retrieve_params.rbi +6 -0
- data/rbi/courier/models/users/preference_retrieve_topic_params.rbi +6 -0
- data/rbi/courier/models/users/preference_update_or_create_topic_params.rbi +6 -0
- data/rbi/courier/models/users/tenant_add_multiple_params.rbi +6 -1
- data/rbi/courier/models/users/tenant_add_single_params.rbi +6 -1
- data/rbi/courier/models/users/tenant_list_params.rbi +6 -0
- data/rbi/courier/models/users/tenant_remove_all_params.rbi +13 -5
- data/rbi/courier/models/users/tenant_remove_single_params.rbi +10 -2
- data/rbi/courier/models/users/token_add_multiple_params.rbi +13 -5
- data/rbi/courier/models/users/token_add_single_params.rbi +290 -3
- data/rbi/courier/models/users/token_delete_params.rbi +10 -2
- data/rbi/courier/models/users/token_list_params.rbi +13 -5
- data/rbi/courier/models/users/token_retrieve_params.rbi +10 -2
- data/rbi/courier/models/users/token_update_params.rbi +6 -1
- data/rbi/courier/models.rbi +12 -0
- data/rbi/courier/resources/journeys.rbi +64 -0
- data/rbi/courier/resources/users/tokens.rbi +11 -9
- data/sig/courier/client.rbs +2 -0
- data/sig/courier/internal/util.rbs +10 -0
- data/sig/courier/models/audience_delete_params.rbs +11 -3
- data/sig/courier/models/audience_list_members_params.rbs +6 -1
- data/sig/courier/models/audience_retrieve_params.rbs +11 -3
- data/sig/courier/models/audience_update_params.rbs +5 -0
- data/sig/courier/models/audit_event_retrieve_params.rbs +11 -3
- data/sig/courier/models/automations/invoke_invoke_by_template_params.rbs +5 -0
- data/sig/courier/models/brand_delete_params.rbs +11 -3
- data/sig/courier/models/brand_retrieve_params.rbs +11 -3
- data/sig/courier/models/brand_update_params.rbs +5 -0
- data/sig/courier/models/bulk_add_users_params.rbs +5 -1
- data/sig/courier/models/bulk_list_users_params.rbs +6 -1
- data/sig/courier/models/bulk_retrieve_job_params.rbs +11 -3
- data/sig/courier/models/bulk_run_job_params.rbs +11 -3
- data/sig/courier/models/elemental_content.rbs +3 -11
- data/sig/courier/models/journey.rbs +55 -0
- data/sig/courier/models/journey_invoke_params.rbs +25 -0
- data/sig/courier/models/journey_list_params.rbs +45 -0
- data/sig/courier/models/journeys_invoke_request.rbs +36 -0
- data/sig/courier/models/journeys_invoke_response.rbs +13 -0
- data/sig/courier/models/journeys_list_response.rbs +23 -0
- data/sig/courier/models/list_delete_params.rbs +12 -3
- data/sig/courier/models/list_restore_params.rbs +11 -3
- data/sig/courier/models/list_retrieve_params.rbs +11 -3
- data/sig/courier/models/list_update_params.rbs +9 -1
- data/sig/courier/models/lists/subscription_add_params.rbs +8 -1
- data/sig/courier/models/lists/subscription_list_params.rbs +6 -1
- data/sig/courier/models/lists/subscription_subscribe_params.rbs +8 -1
- data/sig/courier/models/lists/subscription_subscribe_user_params.rbs +9 -1
- data/sig/courier/models/lists/subscription_unsubscribe_user_params.rbs +6 -1
- data/sig/courier/models/message_cancel_params.rbs +11 -3
- data/sig/courier/models/message_content_params.rbs +11 -3
- data/sig/courier/models/message_details.rbs +31 -23
- data/sig/courier/models/message_history_params.rbs +6 -1
- data/sig/courier/models/message_retrieve_params.rbs +11 -3
- data/sig/courier/models/notification_retrieve_content_params.rbs +8 -3
- data/sig/courier/models/notifications/check_delete_params.rbs +10 -2
- data/sig/courier/models/notifications/check_list_params.rbs +10 -2
- data/sig/courier/models/notifications/check_update_params.rbs +9 -1
- data/sig/courier/models/notifications/draft_retrieve_content_params.rbs +8 -3
- data/sig/courier/models/profile_create_params.rbs +5 -1
- data/sig/courier/models/profile_delete_params.rbs +11 -3
- data/sig/courier/models/profile_replace_params.rbs +5 -1
- data/sig/courier/models/profile_retrieve_params.rbs +11 -3
- data/sig/courier/models/profile_update_params.rbs +5 -1
- data/sig/courier/models/profiles/list_delete_params.rbs +11 -3
- data/sig/courier/models/profiles/list_retrieve_params.rbs +6 -1
- data/sig/courier/models/profiles/list_subscribe_params.rbs +8 -1
- data/sig/courier/models/request_archive_params.rbs +11 -3
- data/sig/courier/models/tenant_delete_params.rbs +11 -3
- data/sig/courier/models/tenant_list_users_params.rbs +5 -1
- data/sig/courier/models/tenant_retrieve_params.rbs +11 -3
- data/sig/courier/models/tenant_update_params.rbs +5 -0
- data/sig/courier/models/tenants/preferences/item_delete_params.rbs +6 -1
- data/sig/courier/models/tenants/preferences/item_update_params.rbs +8 -1
- data/sig/courier/models/tenants/template_list_params.rbs +5 -1
- data/sig/courier/models/tenants/template_publish_params.rbs +8 -1
- data/sig/courier/models/tenants/template_replace_params.rbs +8 -1
- data/sig/courier/models/tenants/template_retrieve_params.rbs +6 -1
- data/sig/courier/models/tenants/templates/version_retrieve_params.rbs +5 -1
- data/sig/courier/models/translation_retrieve_params.rbs +6 -1
- data/sig/courier/models/translation_update_params.rbs +5 -1
- data/sig/courier/models/users/preference_retrieve_params.rbs +6 -1
- data/sig/courier/models/users/preference_retrieve_topic_params.rbs +5 -1
- data/sig/courier/models/users/preference_update_or_create_topic_params.rbs +5 -0
- data/sig/courier/models/users/tenant_add_multiple_params.rbs +5 -1
- data/sig/courier/models/users/tenant_add_single_params.rbs +5 -1
- data/sig/courier/models/users/tenant_list_params.rbs +5 -1
- data/sig/courier/models/users/tenant_remove_all_params.rbs +11 -3
- data/sig/courier/models/users/tenant_remove_single_params.rbs +6 -1
- data/sig/courier/models/users/token_add_multiple_params.rbs +11 -3
- data/sig/courier/models/users/token_add_single_params.rbs +127 -4
- data/sig/courier/models/users/token_delete_params.rbs +6 -1
- data/sig/courier/models/users/token_list_params.rbs +11 -3
- data/sig/courier/models/users/token_retrieve_params.rbs +6 -1
- data/sig/courier/models/users/token_update_params.rbs +5 -0
- data/sig/courier/models.rbs +12 -0
- data/sig/courier/resources/journeys.rbs +21 -0
- data/sig/courier/resources/users/tokens.rbs +5 -6
- metadata +23 -2
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class JourneyListParams < Courier::Internal::Type::BaseModel
|
|
6
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Courier::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(Courier::JourneyListParams, Courier::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# A cursor token for pagination. Use the cursor from the previous response to
|
|
15
|
+
# fetch the next page of results.
|
|
16
|
+
sig { returns(T.nilable(String)) }
|
|
17
|
+
attr_reader :cursor
|
|
18
|
+
|
|
19
|
+
sig { params(cursor: String).void }
|
|
20
|
+
attr_writer :cursor
|
|
21
|
+
|
|
22
|
+
# The version of journeys to retrieve. Accepted values are published (for
|
|
23
|
+
# published journeys) or draft (for draft journeys). Defaults to published.
|
|
24
|
+
sig { returns(T.nilable(Courier::JourneyListParams::Version::OrSymbol)) }
|
|
25
|
+
attr_reader :version
|
|
26
|
+
|
|
27
|
+
sig do
|
|
28
|
+
params(version: Courier::JourneyListParams::Version::OrSymbol).void
|
|
29
|
+
end
|
|
30
|
+
attr_writer :version
|
|
31
|
+
|
|
32
|
+
sig do
|
|
33
|
+
params(
|
|
34
|
+
cursor: String,
|
|
35
|
+
version: Courier::JourneyListParams::Version::OrSymbol,
|
|
36
|
+
request_options: Courier::RequestOptions::OrHash
|
|
37
|
+
).returns(T.attached_class)
|
|
38
|
+
end
|
|
39
|
+
def self.new(
|
|
40
|
+
# A cursor token for pagination. Use the cursor from the previous response to
|
|
41
|
+
# fetch the next page of results.
|
|
42
|
+
cursor: nil,
|
|
43
|
+
# The version of journeys to retrieve. Accepted values are published (for
|
|
44
|
+
# published journeys) or draft (for draft journeys). Defaults to published.
|
|
45
|
+
version: nil,
|
|
46
|
+
request_options: {}
|
|
47
|
+
)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
sig do
|
|
51
|
+
override.returns(
|
|
52
|
+
{
|
|
53
|
+
cursor: String,
|
|
54
|
+
version: Courier::JourneyListParams::Version::OrSymbol,
|
|
55
|
+
request_options: Courier::RequestOptions
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
end
|
|
59
|
+
def to_hash
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# The version of journeys to retrieve. Accepted values are published (for
|
|
63
|
+
# published journeys) or draft (for draft journeys). Defaults to published.
|
|
64
|
+
module Version
|
|
65
|
+
extend Courier::Internal::Type::Enum
|
|
66
|
+
|
|
67
|
+
TaggedSymbol =
|
|
68
|
+
T.type_alias { T.all(Symbol, Courier::JourneyListParams::Version) }
|
|
69
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
70
|
+
|
|
71
|
+
PUBLISHED =
|
|
72
|
+
T.let(:published, Courier::JourneyListParams::Version::TaggedSymbol)
|
|
73
|
+
DRAFT = T.let(:draft, Courier::JourneyListParams::Version::TaggedSymbol)
|
|
74
|
+
|
|
75
|
+
sig do
|
|
76
|
+
override.returns(
|
|
77
|
+
T::Array[Courier::JourneyListParams::Version::TaggedSymbol]
|
|
78
|
+
)
|
|
79
|
+
end
|
|
80
|
+
def self.values
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class JourneysInvokeRequest < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Courier::JourneysInvokeRequest, Courier::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# Data payload passed to the journey. The expected shape can be predefined using
|
|
12
|
+
# the schema builder in the journey editor. This data is available in journey
|
|
13
|
+
# steps for condition evaluation and template variable interpolation. Can also
|
|
14
|
+
# contain user identifiers (user_id, userId, anonymousId) if not provided
|
|
15
|
+
# elsewhere.
|
|
16
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
17
|
+
attr_reader :data
|
|
18
|
+
|
|
19
|
+
sig { params(data: T::Hash[Symbol, T.anything]).void }
|
|
20
|
+
attr_writer :data
|
|
21
|
+
|
|
22
|
+
# Profile data for the user. Can contain contact information (email,
|
|
23
|
+
# phone_number), user identifiers (user_id, userId, anonymousId), or any custom
|
|
24
|
+
# profile fields. Profile fields are merged with any existing stored profile for
|
|
25
|
+
# the user. Include context.tenant_id to load a tenant-scoped profile for
|
|
26
|
+
# multi-tenant scenarios.
|
|
27
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
28
|
+
attr_reader :profile
|
|
29
|
+
|
|
30
|
+
sig { params(profile: T::Hash[Symbol, T.anything]).void }
|
|
31
|
+
attr_writer :profile
|
|
32
|
+
|
|
33
|
+
# A unique identifier for the user. If not provided, the system will attempt to
|
|
34
|
+
# resolve the user identifier from profile or data objects.
|
|
35
|
+
sig { returns(T.nilable(String)) }
|
|
36
|
+
attr_reader :user_id
|
|
37
|
+
|
|
38
|
+
sig { params(user_id: String).void }
|
|
39
|
+
attr_writer :user_id
|
|
40
|
+
|
|
41
|
+
# Request body for invoking a journey. Requires either a user identifier or a
|
|
42
|
+
# profile with contact information. User identifiers can be provided via user_id
|
|
43
|
+
# field, or resolved from profile/data objects (user_id, userId, or anonymousId
|
|
44
|
+
# fields).
|
|
45
|
+
sig do
|
|
46
|
+
params(
|
|
47
|
+
data: T::Hash[Symbol, T.anything],
|
|
48
|
+
profile: T::Hash[Symbol, T.anything],
|
|
49
|
+
user_id: String
|
|
50
|
+
).returns(T.attached_class)
|
|
51
|
+
end
|
|
52
|
+
def self.new(
|
|
53
|
+
# Data payload passed to the journey. The expected shape can be predefined using
|
|
54
|
+
# the schema builder in the journey editor. This data is available in journey
|
|
55
|
+
# steps for condition evaluation and template variable interpolation. Can also
|
|
56
|
+
# contain user identifiers (user_id, userId, anonymousId) if not provided
|
|
57
|
+
# elsewhere.
|
|
58
|
+
data: nil,
|
|
59
|
+
# Profile data for the user. Can contain contact information (email,
|
|
60
|
+
# phone_number), user identifiers (user_id, userId, anonymousId), or any custom
|
|
61
|
+
# profile fields. Profile fields are merged with any existing stored profile for
|
|
62
|
+
# the user. Include context.tenant_id to load a tenant-scoped profile for
|
|
63
|
+
# multi-tenant scenarios.
|
|
64
|
+
profile: nil,
|
|
65
|
+
# A unique identifier for the user. If not provided, the system will attempt to
|
|
66
|
+
# resolve the user identifier from profile or data objects.
|
|
67
|
+
user_id: nil
|
|
68
|
+
)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
sig do
|
|
72
|
+
override.returns(
|
|
73
|
+
{
|
|
74
|
+
data: T::Hash[Symbol, T.anything],
|
|
75
|
+
profile: T::Hash[Symbol, T.anything],
|
|
76
|
+
user_id: String
|
|
77
|
+
}
|
|
78
|
+
)
|
|
79
|
+
end
|
|
80
|
+
def to_hash
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class JourneysInvokeResponse < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Courier::JourneysInvokeResponse, Courier::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# A unique identifier for the journey run that was created.
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
attr_accessor :run_id
|
|
14
|
+
|
|
15
|
+
sig { params(run_id: String).returns(T.attached_class) }
|
|
16
|
+
def self.new(
|
|
17
|
+
# A unique identifier for the journey run that was created.
|
|
18
|
+
run_id:
|
|
19
|
+
)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
sig { override.returns({ run_id: String }) }
|
|
23
|
+
def to_hash
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class JourneysListResponse < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Courier::JourneysListResponse, Courier::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# A cursor token for pagination. Present when there are more results available.
|
|
12
|
+
sig { returns(T.nilable(String)) }
|
|
13
|
+
attr_reader :cursor
|
|
14
|
+
|
|
15
|
+
sig { params(cursor: String).void }
|
|
16
|
+
attr_writer :cursor
|
|
17
|
+
|
|
18
|
+
sig { returns(T.nilable(T::Array[Courier::Journey])) }
|
|
19
|
+
attr_reader :templates
|
|
20
|
+
|
|
21
|
+
sig { params(templates: T::Array[Courier::Journey::OrHash]).void }
|
|
22
|
+
attr_writer :templates
|
|
23
|
+
|
|
24
|
+
sig do
|
|
25
|
+
params(
|
|
26
|
+
cursor: String,
|
|
27
|
+
templates: T::Array[Courier::Journey::OrHash]
|
|
28
|
+
).returns(T.attached_class)
|
|
29
|
+
end
|
|
30
|
+
def self.new(
|
|
31
|
+
# A cursor token for pagination. Present when there are more results available.
|
|
32
|
+
cursor: nil,
|
|
33
|
+
templates: nil
|
|
34
|
+
)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
sig do
|
|
38
|
+
override.returns(
|
|
39
|
+
{ cursor: String, templates: T::Array[Courier::Journey] }
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
def to_hash
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -11,15 +11,23 @@ module Courier
|
|
|
11
11
|
T.any(Courier::ListDeleteParams, Courier::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :list_id
|
|
16
|
+
|
|
14
17
|
sig do
|
|
15
|
-
params(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
params(
|
|
19
|
+
list_id: String,
|
|
20
|
+
request_options: Courier::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
18
22
|
end
|
|
19
|
-
def self.new(request_options: {})
|
|
23
|
+
def self.new(list_id:, request_options: {})
|
|
20
24
|
end
|
|
21
25
|
|
|
22
|
-
sig
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ list_id: String, request_options: Courier::RequestOptions }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
23
31
|
def to_hash
|
|
24
32
|
end
|
|
25
33
|
end
|
|
@@ -11,15 +11,23 @@ module Courier
|
|
|
11
11
|
T.any(Courier::ListRestoreParams, Courier::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :list_id
|
|
16
|
+
|
|
14
17
|
sig do
|
|
15
|
-
params(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
params(
|
|
19
|
+
list_id: String,
|
|
20
|
+
request_options: Courier::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
18
22
|
end
|
|
19
|
-
def self.new(request_options: {})
|
|
23
|
+
def self.new(list_id:, request_options: {})
|
|
20
24
|
end
|
|
21
25
|
|
|
22
|
-
sig
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ list_id: String, request_options: Courier::RequestOptions }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
23
31
|
def to_hash
|
|
24
32
|
end
|
|
25
33
|
end
|
|
@@ -11,15 +11,23 @@ module Courier
|
|
|
11
11
|
T.any(Courier::ListRetrieveParams, Courier::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :list_id
|
|
16
|
+
|
|
14
17
|
sig do
|
|
15
|
-
params(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
params(
|
|
19
|
+
list_id: String,
|
|
20
|
+
request_options: Courier::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
18
22
|
end
|
|
19
|
-
def self.new(request_options: {})
|
|
23
|
+
def self.new(list_id:, request_options: {})
|
|
20
24
|
end
|
|
21
25
|
|
|
22
|
-
sig
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ list_id: String, request_options: Courier::RequestOptions }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
23
31
|
def to_hash
|
|
24
32
|
end
|
|
25
33
|
end
|
|
@@ -11,6 +11,9 @@ module Courier
|
|
|
11
11
|
T.any(Courier::ListUpdateParams, Courier::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :list_id
|
|
16
|
+
|
|
14
17
|
sig { returns(String) }
|
|
15
18
|
attr_accessor :name
|
|
16
19
|
|
|
@@ -26,17 +29,19 @@ module Courier
|
|
|
26
29
|
|
|
27
30
|
sig do
|
|
28
31
|
params(
|
|
32
|
+
list_id: String,
|
|
29
33
|
name: String,
|
|
30
34
|
preferences: T.nilable(Courier::RecipientPreferences::OrHash),
|
|
31
35
|
request_options: Courier::RequestOptions::OrHash
|
|
32
36
|
).returns(T.attached_class)
|
|
33
37
|
end
|
|
34
|
-
def self.new(name:, preferences: nil, request_options: {})
|
|
38
|
+
def self.new(list_id:, name:, preferences: nil, request_options: {})
|
|
35
39
|
end
|
|
36
40
|
|
|
37
41
|
sig do
|
|
38
42
|
override.returns(
|
|
39
43
|
{
|
|
44
|
+
list_id: String,
|
|
40
45
|
name: String,
|
|
41
46
|
preferences: T.nilable(Courier::RecipientPreferences),
|
|
42
47
|
request_options: Courier::RequestOptions
|
|
@@ -15,21 +15,26 @@ module Courier
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :list_id
|
|
20
|
+
|
|
18
21
|
sig { returns(T::Array[Courier::PutSubscriptionsRecipient]) }
|
|
19
22
|
attr_accessor :recipients
|
|
20
23
|
|
|
21
24
|
sig do
|
|
22
25
|
params(
|
|
26
|
+
list_id: String,
|
|
23
27
|
recipients: T::Array[Courier::PutSubscriptionsRecipient::OrHash],
|
|
24
28
|
request_options: Courier::RequestOptions::OrHash
|
|
25
29
|
).returns(T.attached_class)
|
|
26
30
|
end
|
|
27
|
-
def self.new(recipients:, request_options: {})
|
|
31
|
+
def self.new(list_id:, recipients:, request_options: {})
|
|
28
32
|
end
|
|
29
33
|
|
|
30
34
|
sig do
|
|
31
35
|
override.returns(
|
|
32
36
|
{
|
|
37
|
+
list_id: String,
|
|
33
38
|
recipients: T::Array[Courier::PutSubscriptionsRecipient],
|
|
34
39
|
request_options: Courier::RequestOptions
|
|
35
40
|
}
|
|
@@ -15,17 +15,22 @@ module Courier
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :list_id
|
|
20
|
+
|
|
18
21
|
# A unique identifier that allows for fetching the next set of list subscriptions
|
|
19
22
|
sig { returns(T.nilable(String)) }
|
|
20
23
|
attr_accessor :cursor
|
|
21
24
|
|
|
22
25
|
sig do
|
|
23
26
|
params(
|
|
27
|
+
list_id: String,
|
|
24
28
|
cursor: T.nilable(String),
|
|
25
29
|
request_options: Courier::RequestOptions::OrHash
|
|
26
30
|
).returns(T.attached_class)
|
|
27
31
|
end
|
|
28
32
|
def self.new(
|
|
33
|
+
list_id:,
|
|
29
34
|
# A unique identifier that allows for fetching the next set of list subscriptions
|
|
30
35
|
cursor: nil,
|
|
31
36
|
request_options: {}
|
|
@@ -35,6 +40,7 @@ module Courier
|
|
|
35
40
|
sig do
|
|
36
41
|
override.returns(
|
|
37
42
|
{
|
|
43
|
+
list_id: String,
|
|
38
44
|
cursor: T.nilable(String),
|
|
39
45
|
request_options: Courier::RequestOptions
|
|
40
46
|
}
|
|
@@ -15,21 +15,26 @@ module Courier
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :list_id
|
|
20
|
+
|
|
18
21
|
sig { returns(T::Array[Courier::PutSubscriptionsRecipient]) }
|
|
19
22
|
attr_accessor :recipients
|
|
20
23
|
|
|
21
24
|
sig do
|
|
22
25
|
params(
|
|
26
|
+
list_id: String,
|
|
23
27
|
recipients: T::Array[Courier::PutSubscriptionsRecipient::OrHash],
|
|
24
28
|
request_options: Courier::RequestOptions::OrHash
|
|
25
29
|
).returns(T.attached_class)
|
|
26
30
|
end
|
|
27
|
-
def self.new(recipients:, request_options: {})
|
|
31
|
+
def self.new(list_id:, recipients:, request_options: {})
|
|
28
32
|
end
|
|
29
33
|
|
|
30
34
|
sig do
|
|
31
35
|
override.returns(
|
|
32
36
|
{
|
|
37
|
+
list_id: String,
|
|
33
38
|
recipients: T::Array[Courier::PutSubscriptionsRecipient],
|
|
34
39
|
request_options: Courier::RequestOptions
|
|
35
40
|
}
|
|
@@ -18,6 +18,9 @@ module Courier
|
|
|
18
18
|
sig { returns(String) }
|
|
19
19
|
attr_accessor :list_id
|
|
20
20
|
|
|
21
|
+
sig { returns(String) }
|
|
22
|
+
attr_accessor :user_id
|
|
23
|
+
|
|
21
24
|
sig { returns(T.nilable(Courier::RecipientPreferences)) }
|
|
22
25
|
attr_reader :preferences
|
|
23
26
|
|
|
@@ -31,17 +34,19 @@ module Courier
|
|
|
31
34
|
sig do
|
|
32
35
|
params(
|
|
33
36
|
list_id: String,
|
|
37
|
+
user_id: String,
|
|
34
38
|
preferences: T.nilable(Courier::RecipientPreferences::OrHash),
|
|
35
39
|
request_options: Courier::RequestOptions::OrHash
|
|
36
40
|
).returns(T.attached_class)
|
|
37
41
|
end
|
|
38
|
-
def self.new(list_id:, preferences: nil, request_options: {})
|
|
42
|
+
def self.new(list_id:, user_id:, preferences: nil, request_options: {})
|
|
39
43
|
end
|
|
40
44
|
|
|
41
45
|
sig do
|
|
42
46
|
override.returns(
|
|
43
47
|
{
|
|
44
48
|
list_id: String,
|
|
49
|
+
user_id: String,
|
|
45
50
|
preferences: T.nilable(Courier::RecipientPreferences),
|
|
46
51
|
request_options: Courier::RequestOptions
|
|
47
52
|
}
|
|
@@ -18,18 +18,26 @@ module Courier
|
|
|
18
18
|
sig { returns(String) }
|
|
19
19
|
attr_accessor :list_id
|
|
20
20
|
|
|
21
|
+
sig { returns(String) }
|
|
22
|
+
attr_accessor :user_id
|
|
23
|
+
|
|
21
24
|
sig do
|
|
22
25
|
params(
|
|
23
26
|
list_id: String,
|
|
27
|
+
user_id: String,
|
|
24
28
|
request_options: Courier::RequestOptions::OrHash
|
|
25
29
|
).returns(T.attached_class)
|
|
26
30
|
end
|
|
27
|
-
def self.new(list_id:, request_options: {})
|
|
31
|
+
def self.new(list_id:, user_id:, request_options: {})
|
|
28
32
|
end
|
|
29
33
|
|
|
30
34
|
sig do
|
|
31
35
|
override.returns(
|
|
32
|
-
{
|
|
36
|
+
{
|
|
37
|
+
list_id: String,
|
|
38
|
+
user_id: String,
|
|
39
|
+
request_options: Courier::RequestOptions
|
|
40
|
+
}
|
|
33
41
|
)
|
|
34
42
|
end
|
|
35
43
|
def to_hash
|
|
@@ -11,15 +11,23 @@ module Courier
|
|
|
11
11
|
T.any(Courier::MessageCancelParams, Courier::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :message_id
|
|
16
|
+
|
|
14
17
|
sig do
|
|
15
|
-
params(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
params(
|
|
19
|
+
message_id: String,
|
|
20
|
+
request_options: Courier::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
18
22
|
end
|
|
19
|
-
def self.new(request_options: {})
|
|
23
|
+
def self.new(message_id:, request_options: {})
|
|
20
24
|
end
|
|
21
25
|
|
|
22
|
-
sig
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ message_id: String, request_options: Courier::RequestOptions }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
23
31
|
def to_hash
|
|
24
32
|
end
|
|
25
33
|
end
|
|
@@ -11,15 +11,23 @@ module Courier
|
|
|
11
11
|
T.any(Courier::MessageContentParams, Courier::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :message_id
|
|
16
|
+
|
|
14
17
|
sig do
|
|
15
|
-
params(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
params(
|
|
19
|
+
message_id: String,
|
|
20
|
+
request_options: Courier::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
18
22
|
end
|
|
19
|
-
def self.new(request_options: {})
|
|
23
|
+
def self.new(message_id:, request_options: {})
|
|
20
24
|
end
|
|
21
25
|
|
|
22
|
-
sig
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ message_id: String, request_options: Courier::RequestOptions }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
23
31
|
def to_hash
|
|
24
32
|
end
|
|
25
33
|
end
|