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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
5
|
module Users
|
|
6
|
-
class TokenAddSingleParams < Courier::
|
|
6
|
+
class TokenAddSingleParams < Courier::Internal::Type::BaseModel
|
|
7
7
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Courier::Internal::Type::RequestParameters
|
|
9
9
|
|
|
@@ -18,22 +18,309 @@ module Courier
|
|
|
18
18
|
sig { returns(String) }
|
|
19
19
|
attr_accessor :user_id
|
|
20
20
|
|
|
21
|
+
sig { returns(String) }
|
|
22
|
+
attr_accessor :token
|
|
23
|
+
|
|
24
|
+
sig do
|
|
25
|
+
returns(Courier::Users::TokenAddSingleParams::ProviderKey::OrSymbol)
|
|
26
|
+
end
|
|
27
|
+
attr_accessor :provider_key
|
|
28
|
+
|
|
29
|
+
# Information about the device the token came from.
|
|
30
|
+
sig { returns(T.nilable(Courier::Users::TokenAddSingleParams::Device)) }
|
|
31
|
+
attr_reader :device
|
|
32
|
+
|
|
33
|
+
sig do
|
|
34
|
+
params(
|
|
35
|
+
device:
|
|
36
|
+
T.nilable(Courier::Users::TokenAddSingleParams::Device::OrHash)
|
|
37
|
+
).void
|
|
38
|
+
end
|
|
39
|
+
attr_writer :device
|
|
40
|
+
|
|
41
|
+
# ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
|
|
42
|
+
# disable expiration.
|
|
43
|
+
sig do
|
|
44
|
+
returns(
|
|
45
|
+
T.nilable(
|
|
46
|
+
Courier::Users::TokenAddSingleParams::ExpiryDate::Variants
|
|
47
|
+
)
|
|
48
|
+
)
|
|
49
|
+
end
|
|
50
|
+
attr_accessor :expiry_date
|
|
51
|
+
|
|
52
|
+
# Properties about the token.
|
|
53
|
+
sig { returns(T.nilable(T.anything)) }
|
|
54
|
+
attr_reader :properties
|
|
55
|
+
|
|
56
|
+
sig { params(properties: T.anything).void }
|
|
57
|
+
attr_writer :properties
|
|
58
|
+
|
|
59
|
+
# Tracking information about the device the token came from.
|
|
60
|
+
sig do
|
|
61
|
+
returns(T.nilable(Courier::Users::TokenAddSingleParams::Tracking))
|
|
62
|
+
end
|
|
63
|
+
attr_reader :tracking
|
|
64
|
+
|
|
65
|
+
sig do
|
|
66
|
+
params(
|
|
67
|
+
tracking:
|
|
68
|
+
T.nilable(Courier::Users::TokenAddSingleParams::Tracking::OrHash)
|
|
69
|
+
).void
|
|
70
|
+
end
|
|
71
|
+
attr_writer :tracking
|
|
72
|
+
|
|
21
73
|
sig do
|
|
22
74
|
params(
|
|
23
75
|
user_id: String,
|
|
76
|
+
token: String,
|
|
77
|
+
provider_key:
|
|
78
|
+
Courier::Users::TokenAddSingleParams::ProviderKey::OrSymbol,
|
|
79
|
+
device:
|
|
80
|
+
T.nilable(Courier::Users::TokenAddSingleParams::Device::OrHash),
|
|
81
|
+
expiry_date:
|
|
82
|
+
T.nilable(
|
|
83
|
+
Courier::Users::TokenAddSingleParams::ExpiryDate::Variants
|
|
84
|
+
),
|
|
85
|
+
properties: T.anything,
|
|
86
|
+
tracking:
|
|
87
|
+
T.nilable(Courier::Users::TokenAddSingleParams::Tracking::OrHash),
|
|
24
88
|
request_options: Courier::RequestOptions::OrHash
|
|
25
89
|
).returns(T.attached_class)
|
|
26
90
|
end
|
|
27
|
-
def self.new(
|
|
91
|
+
def self.new(
|
|
92
|
+
user_id:,
|
|
93
|
+
token:,
|
|
94
|
+
provider_key:,
|
|
95
|
+
# Information about the device the token came from.
|
|
96
|
+
device: nil,
|
|
97
|
+
# ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
|
|
98
|
+
# disable expiration.
|
|
99
|
+
expiry_date: nil,
|
|
100
|
+
# Properties about the token.
|
|
101
|
+
properties: nil,
|
|
102
|
+
# Tracking information about the device the token came from.
|
|
103
|
+
tracking: nil,
|
|
104
|
+
request_options: {}
|
|
105
|
+
)
|
|
28
106
|
end
|
|
29
107
|
|
|
30
108
|
sig do
|
|
31
109
|
override.returns(
|
|
32
|
-
{
|
|
110
|
+
{
|
|
111
|
+
user_id: String,
|
|
112
|
+
token: String,
|
|
113
|
+
provider_key:
|
|
114
|
+
Courier::Users::TokenAddSingleParams::ProviderKey::OrSymbol,
|
|
115
|
+
device: T.nilable(Courier::Users::TokenAddSingleParams::Device),
|
|
116
|
+
expiry_date:
|
|
117
|
+
T.nilable(
|
|
118
|
+
Courier::Users::TokenAddSingleParams::ExpiryDate::Variants
|
|
119
|
+
),
|
|
120
|
+
properties: T.anything,
|
|
121
|
+
tracking:
|
|
122
|
+
T.nilable(Courier::Users::TokenAddSingleParams::Tracking),
|
|
123
|
+
request_options: Courier::RequestOptions
|
|
124
|
+
}
|
|
33
125
|
)
|
|
34
126
|
end
|
|
35
127
|
def to_hash
|
|
36
128
|
end
|
|
129
|
+
|
|
130
|
+
module ProviderKey
|
|
131
|
+
extend Courier::Internal::Type::Enum
|
|
132
|
+
|
|
133
|
+
TaggedSymbol =
|
|
134
|
+
T.type_alias do
|
|
135
|
+
T.all(Symbol, Courier::Users::TokenAddSingleParams::ProviderKey)
|
|
136
|
+
end
|
|
137
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
138
|
+
|
|
139
|
+
FIREBASE_FCM =
|
|
140
|
+
T.let(
|
|
141
|
+
:"firebase-fcm",
|
|
142
|
+
Courier::Users::TokenAddSingleParams::ProviderKey::TaggedSymbol
|
|
143
|
+
)
|
|
144
|
+
APN =
|
|
145
|
+
T.let(
|
|
146
|
+
:apn,
|
|
147
|
+
Courier::Users::TokenAddSingleParams::ProviderKey::TaggedSymbol
|
|
148
|
+
)
|
|
149
|
+
EXPO =
|
|
150
|
+
T.let(
|
|
151
|
+
:expo,
|
|
152
|
+
Courier::Users::TokenAddSingleParams::ProviderKey::TaggedSymbol
|
|
153
|
+
)
|
|
154
|
+
ONESIGNAL =
|
|
155
|
+
T.let(
|
|
156
|
+
:onesignal,
|
|
157
|
+
Courier::Users::TokenAddSingleParams::ProviderKey::TaggedSymbol
|
|
158
|
+
)
|
|
159
|
+
|
|
160
|
+
sig do
|
|
161
|
+
override.returns(
|
|
162
|
+
T::Array[
|
|
163
|
+
Courier::Users::TokenAddSingleParams::ProviderKey::TaggedSymbol
|
|
164
|
+
]
|
|
165
|
+
)
|
|
166
|
+
end
|
|
167
|
+
def self.values
|
|
168
|
+
end
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
class Device < Courier::Internal::Type::BaseModel
|
|
172
|
+
OrHash =
|
|
173
|
+
T.type_alias do
|
|
174
|
+
T.any(
|
|
175
|
+
Courier::Users::TokenAddSingleParams::Device,
|
|
176
|
+
Courier::Internal::AnyHash
|
|
177
|
+
)
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Id of the advertising identifier
|
|
181
|
+
sig { returns(T.nilable(String)) }
|
|
182
|
+
attr_accessor :ad_id
|
|
183
|
+
|
|
184
|
+
# Id of the application the token is used for
|
|
185
|
+
sig { returns(T.nilable(String)) }
|
|
186
|
+
attr_accessor :app_id
|
|
187
|
+
|
|
188
|
+
# Id of the device the token is associated with
|
|
189
|
+
sig { returns(T.nilable(String)) }
|
|
190
|
+
attr_accessor :device_id
|
|
191
|
+
|
|
192
|
+
# The device manufacturer
|
|
193
|
+
sig { returns(T.nilable(String)) }
|
|
194
|
+
attr_accessor :manufacturer
|
|
195
|
+
|
|
196
|
+
# The device model
|
|
197
|
+
sig { returns(T.nilable(String)) }
|
|
198
|
+
attr_accessor :model
|
|
199
|
+
|
|
200
|
+
# The device platform i.e. android, ios, web
|
|
201
|
+
sig { returns(T.nilable(String)) }
|
|
202
|
+
attr_accessor :platform
|
|
203
|
+
|
|
204
|
+
# Information about the device the token came from.
|
|
205
|
+
sig do
|
|
206
|
+
params(
|
|
207
|
+
ad_id: T.nilable(String),
|
|
208
|
+
app_id: T.nilable(String),
|
|
209
|
+
device_id: T.nilable(String),
|
|
210
|
+
manufacturer: T.nilable(String),
|
|
211
|
+
model: T.nilable(String),
|
|
212
|
+
platform: T.nilable(String)
|
|
213
|
+
).returns(T.attached_class)
|
|
214
|
+
end
|
|
215
|
+
def self.new(
|
|
216
|
+
# Id of the advertising identifier
|
|
217
|
+
ad_id: nil,
|
|
218
|
+
# Id of the application the token is used for
|
|
219
|
+
app_id: nil,
|
|
220
|
+
# Id of the device the token is associated with
|
|
221
|
+
device_id: nil,
|
|
222
|
+
# The device manufacturer
|
|
223
|
+
manufacturer: nil,
|
|
224
|
+
# The device model
|
|
225
|
+
model: nil,
|
|
226
|
+
# The device platform i.e. android, ios, web
|
|
227
|
+
platform: nil
|
|
228
|
+
)
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
sig do
|
|
232
|
+
override.returns(
|
|
233
|
+
{
|
|
234
|
+
ad_id: T.nilable(String),
|
|
235
|
+
app_id: T.nilable(String),
|
|
236
|
+
device_id: T.nilable(String),
|
|
237
|
+
manufacturer: T.nilable(String),
|
|
238
|
+
model: T.nilable(String),
|
|
239
|
+
platform: T.nilable(String)
|
|
240
|
+
}
|
|
241
|
+
)
|
|
242
|
+
end
|
|
243
|
+
def to_hash
|
|
244
|
+
end
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
# ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
|
|
248
|
+
# disable expiration.
|
|
249
|
+
module ExpiryDate
|
|
250
|
+
extend Courier::Internal::Type::Union
|
|
251
|
+
|
|
252
|
+
Variants = T.type_alias { T.any(String, T::Boolean) }
|
|
253
|
+
|
|
254
|
+
sig do
|
|
255
|
+
override.returns(
|
|
256
|
+
T::Array[
|
|
257
|
+
Courier::Users::TokenAddSingleParams::ExpiryDate::Variants
|
|
258
|
+
]
|
|
259
|
+
)
|
|
260
|
+
end
|
|
261
|
+
def self.variants
|
|
262
|
+
end
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
class Tracking < Courier::Internal::Type::BaseModel
|
|
266
|
+
OrHash =
|
|
267
|
+
T.type_alias do
|
|
268
|
+
T.any(
|
|
269
|
+
Courier::Users::TokenAddSingleParams::Tracking,
|
|
270
|
+
Courier::Internal::AnyHash
|
|
271
|
+
)
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
# The IP address of the device
|
|
275
|
+
sig { returns(T.nilable(String)) }
|
|
276
|
+
attr_accessor :ip
|
|
277
|
+
|
|
278
|
+
# The latitude of the device
|
|
279
|
+
sig { returns(T.nilable(String)) }
|
|
280
|
+
attr_accessor :lat
|
|
281
|
+
|
|
282
|
+
# The longitude of the device
|
|
283
|
+
sig { returns(T.nilable(String)) }
|
|
284
|
+
attr_accessor :long
|
|
285
|
+
|
|
286
|
+
# The operating system version
|
|
287
|
+
sig { returns(T.nilable(String)) }
|
|
288
|
+
attr_accessor :os_version
|
|
289
|
+
|
|
290
|
+
# Tracking information about the device the token came from.
|
|
291
|
+
sig do
|
|
292
|
+
params(
|
|
293
|
+
ip: T.nilable(String),
|
|
294
|
+
lat: T.nilable(String),
|
|
295
|
+
long: T.nilable(String),
|
|
296
|
+
os_version: T.nilable(String)
|
|
297
|
+
).returns(T.attached_class)
|
|
298
|
+
end
|
|
299
|
+
def self.new(
|
|
300
|
+
# The IP address of the device
|
|
301
|
+
ip: nil,
|
|
302
|
+
# The latitude of the device
|
|
303
|
+
lat: nil,
|
|
304
|
+
# The longitude of the device
|
|
305
|
+
long: nil,
|
|
306
|
+
# The operating system version
|
|
307
|
+
os_version: nil
|
|
308
|
+
)
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
sig do
|
|
312
|
+
override.returns(
|
|
313
|
+
{
|
|
314
|
+
ip: T.nilable(String),
|
|
315
|
+
lat: T.nilable(String),
|
|
316
|
+
long: T.nilable(String),
|
|
317
|
+
os_version: T.nilable(String)
|
|
318
|
+
}
|
|
319
|
+
)
|
|
320
|
+
end
|
|
321
|
+
def to_hash
|
|
322
|
+
end
|
|
323
|
+
end
|
|
37
324
|
end
|
|
38
325
|
end
|
|
39
326
|
end
|
|
@@ -15,18 +15,26 @@ module Courier
|
|
|
15
15
|
sig { returns(String) }
|
|
16
16
|
attr_accessor :user_id
|
|
17
17
|
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :token
|
|
20
|
+
|
|
18
21
|
sig do
|
|
19
22
|
params(
|
|
20
23
|
user_id: String,
|
|
24
|
+
token: String,
|
|
21
25
|
request_options: Courier::RequestOptions::OrHash
|
|
22
26
|
).returns(T.attached_class)
|
|
23
27
|
end
|
|
24
|
-
def self.new(user_id:, request_options: {})
|
|
28
|
+
def self.new(user_id:, token:, request_options: {})
|
|
25
29
|
end
|
|
26
30
|
|
|
27
31
|
sig do
|
|
28
32
|
override.returns(
|
|
29
|
-
{
|
|
33
|
+
{
|
|
34
|
+
user_id: String,
|
|
35
|
+
token: String,
|
|
36
|
+
request_options: Courier::RequestOptions
|
|
37
|
+
}
|
|
30
38
|
)
|
|
31
39
|
end
|
|
32
40
|
def to_hash
|
|
@@ -12,15 +12,23 @@ module Courier
|
|
|
12
12
|
T.any(Courier::Users::TokenListParams, Courier::Internal::AnyHash)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :user_id
|
|
17
|
+
|
|
15
18
|
sig do
|
|
16
|
-
params(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
params(
|
|
20
|
+
user_id: String,
|
|
21
|
+
request_options: Courier::RequestOptions::OrHash
|
|
22
|
+
).returns(T.attached_class)
|
|
19
23
|
end
|
|
20
|
-
def self.new(request_options: {})
|
|
24
|
+
def self.new(user_id:, request_options: {})
|
|
21
25
|
end
|
|
22
26
|
|
|
23
|
-
sig
|
|
27
|
+
sig do
|
|
28
|
+
override.returns(
|
|
29
|
+
{ user_id: String, request_options: Courier::RequestOptions }
|
|
30
|
+
)
|
|
31
|
+
end
|
|
24
32
|
def to_hash
|
|
25
33
|
end
|
|
26
34
|
end
|
|
@@ -18,18 +18,26 @@ module Courier
|
|
|
18
18
|
sig { returns(String) }
|
|
19
19
|
attr_accessor :user_id
|
|
20
20
|
|
|
21
|
+
sig { returns(String) }
|
|
22
|
+
attr_accessor :token
|
|
23
|
+
|
|
21
24
|
sig do
|
|
22
25
|
params(
|
|
23
26
|
user_id: String,
|
|
27
|
+
token: String,
|
|
24
28
|
request_options: Courier::RequestOptions::OrHash
|
|
25
29
|
).returns(T.attached_class)
|
|
26
30
|
end
|
|
27
|
-
def self.new(user_id:, request_options: {})
|
|
31
|
+
def self.new(user_id:, token:, request_options: {})
|
|
28
32
|
end
|
|
29
33
|
|
|
30
34
|
sig do
|
|
31
35
|
override.returns(
|
|
32
|
-
{
|
|
36
|
+
{
|
|
37
|
+
user_id: String,
|
|
38
|
+
token: String,
|
|
39
|
+
request_options: Courier::RequestOptions
|
|
40
|
+
}
|
|
33
41
|
)
|
|
34
42
|
end
|
|
35
43
|
def to_hash
|
|
@@ -15,23 +15,28 @@ module Courier
|
|
|
15
15
|
sig { returns(String) }
|
|
16
16
|
attr_accessor :user_id
|
|
17
17
|
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :token
|
|
20
|
+
|
|
18
21
|
sig { returns(T::Array[Courier::Users::TokenUpdateParams::Patch]) }
|
|
19
22
|
attr_accessor :patch
|
|
20
23
|
|
|
21
24
|
sig do
|
|
22
25
|
params(
|
|
23
26
|
user_id: String,
|
|
27
|
+
token: String,
|
|
24
28
|
patch: T::Array[Courier::Users::TokenUpdateParams::Patch::OrHash],
|
|
25
29
|
request_options: Courier::RequestOptions::OrHash
|
|
26
30
|
).returns(T.attached_class)
|
|
27
31
|
end
|
|
28
|
-
def self.new(user_id:, patch:, request_options: {})
|
|
32
|
+
def self.new(user_id:, token:, patch:, request_options: {})
|
|
29
33
|
end
|
|
30
34
|
|
|
31
35
|
sig do
|
|
32
36
|
override.returns(
|
|
33
37
|
{
|
|
34
38
|
user_id: String,
|
|
39
|
+
token: String,
|
|
35
40
|
patch: T::Array[Courier::Users::TokenUpdateParams::Patch],
|
|
36
41
|
request_options: Courier::RequestOptions
|
|
37
42
|
}
|
data/rbi/courier/models.rbi
CHANGED
|
@@ -142,6 +142,18 @@ module Courier
|
|
|
142
142
|
|
|
143
143
|
IntercomRecipient = Courier::Models::IntercomRecipient
|
|
144
144
|
|
|
145
|
+
Journey = Courier::Models::Journey
|
|
146
|
+
|
|
147
|
+
JourneyInvokeParams = Courier::Models::JourneyInvokeParams
|
|
148
|
+
|
|
149
|
+
JourneyListParams = Courier::Models::JourneyListParams
|
|
150
|
+
|
|
151
|
+
JourneysInvokeRequest = Courier::Models::JourneysInvokeRequest
|
|
152
|
+
|
|
153
|
+
JourneysInvokeResponse = Courier::Models::JourneysInvokeResponse
|
|
154
|
+
|
|
155
|
+
JourneysListResponse = Courier::Models::JourneysListResponse
|
|
156
|
+
|
|
145
157
|
ListDeleteParams = Courier::Models::ListDeleteParams
|
|
146
158
|
|
|
147
159
|
ListFilter = Courier::Models::ListFilter
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Resources
|
|
5
|
+
class Journeys
|
|
6
|
+
# Get the list of journeys.
|
|
7
|
+
sig do
|
|
8
|
+
params(
|
|
9
|
+
cursor: String,
|
|
10
|
+
version: Courier::JourneyListParams::Version::OrSymbol,
|
|
11
|
+
request_options: Courier::RequestOptions::OrHash
|
|
12
|
+
).returns(Courier::JourneysListResponse)
|
|
13
|
+
end
|
|
14
|
+
def list(
|
|
15
|
+
# A cursor token for pagination. Use the cursor from the previous response to
|
|
16
|
+
# fetch the next page of results.
|
|
17
|
+
cursor: nil,
|
|
18
|
+
# The version of journeys to retrieve. Accepted values are published (for
|
|
19
|
+
# published journeys) or draft (for draft journeys). Defaults to published.
|
|
20
|
+
version: nil,
|
|
21
|
+
request_options: {}
|
|
22
|
+
)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Invoke a journey run from a journey template.
|
|
26
|
+
sig do
|
|
27
|
+
params(
|
|
28
|
+
template_id: String,
|
|
29
|
+
data: T::Hash[Symbol, T.anything],
|
|
30
|
+
profile: T::Hash[Symbol, T.anything],
|
|
31
|
+
user_id: String,
|
|
32
|
+
request_options: Courier::RequestOptions::OrHash
|
|
33
|
+
).returns(Courier::JourneysInvokeResponse)
|
|
34
|
+
end
|
|
35
|
+
def invoke(
|
|
36
|
+
# A unique identifier representing the journey template to be invoked. This could
|
|
37
|
+
# be the Journey Template ID or the Journey Template Alias.
|
|
38
|
+
template_id,
|
|
39
|
+
# Data payload passed to the journey. The expected shape can be predefined using
|
|
40
|
+
# the schema builder in the journey editor. This data is available in journey
|
|
41
|
+
# steps for condition evaluation and template variable interpolation. Can also
|
|
42
|
+
# contain user identifiers (user_id, userId, anonymousId) if not provided
|
|
43
|
+
# elsewhere.
|
|
44
|
+
data: nil,
|
|
45
|
+
# Profile data for the user. Can contain contact information (email,
|
|
46
|
+
# phone_number), user identifiers (user_id, userId, anonymousId), or any custom
|
|
47
|
+
# profile fields. Profile fields are merged with any existing stored profile for
|
|
48
|
+
# the user. Include context.tenant_id to load a tenant-scoped profile for
|
|
49
|
+
# multi-tenant scenarios.
|
|
50
|
+
profile: nil,
|
|
51
|
+
# A unique identifier for the user. If not provided, the system will attempt to
|
|
52
|
+
# resolve the user identifier from profile or data objects.
|
|
53
|
+
user_id: nil,
|
|
54
|
+
request_options: {}
|
|
55
|
+
)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# @api private
|
|
59
|
+
sig { params(client: Courier::Client).returns(T.attached_class) }
|
|
60
|
+
def self.new(client:)
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
@@ -89,25 +89,27 @@ module Courier
|
|
|
89
89
|
# Adds a single token to a user and overwrites a matching existing token.
|
|
90
90
|
sig do
|
|
91
91
|
params(
|
|
92
|
-
|
|
92
|
+
token: String,
|
|
93
93
|
user_id: String,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
device:
|
|
94
|
+
provider_key:
|
|
95
|
+
Courier::Users::TokenAddSingleParams::ProviderKey::OrSymbol,
|
|
96
|
+
device:
|
|
97
|
+
T.nilable(Courier::Users::TokenAddSingleParams::Device::OrHash),
|
|
97
98
|
expiry_date:
|
|
98
|
-
T.nilable(
|
|
99
|
+
T.nilable(
|
|
100
|
+
Courier::Users::TokenAddSingleParams::ExpiryDate::Variants
|
|
101
|
+
),
|
|
99
102
|
properties: T.anything,
|
|
100
|
-
tracking:
|
|
103
|
+
tracking:
|
|
104
|
+
T.nilable(Courier::Users::TokenAddSingleParams::Tracking::OrHash),
|
|
101
105
|
request_options: Courier::RequestOptions::OrHash
|
|
102
106
|
).void
|
|
103
107
|
end
|
|
104
108
|
def add_single(
|
|
105
109
|
# Path param: The full token string.
|
|
106
|
-
|
|
110
|
+
token,
|
|
107
111
|
# Path param: The user's ID. This can be any uniquely identifiable string.
|
|
108
112
|
user_id:,
|
|
109
|
-
# Body param: Full body of the token. Must match token in URL path parameter.
|
|
110
|
-
body_token:,
|
|
111
113
|
# Body param
|
|
112
114
|
provider_key:,
|
|
113
115
|
# Body param: Information about the device the token came from.
|
data/sig/courier/client.rbs
CHANGED
|
@@ -106,6 +106,16 @@ module Courier
|
|
|
106
106
|
JSON_CONTENT: Regexp
|
|
107
107
|
JSONL_CONTENT: Regexp
|
|
108
108
|
|
|
109
|
+
def encode_query_params: (
|
|
110
|
+
::Hash[Symbol, top] query
|
|
111
|
+
) -> ::Hash[Symbol, top]
|
|
112
|
+
|
|
113
|
+
private def write_query_param_element!: (
|
|
114
|
+
::Hash[Symbol, top] collection,
|
|
115
|
+
String key,
|
|
116
|
+
top element
|
|
117
|
+
) -> nil
|
|
118
|
+
|
|
109
119
|
def self?.write_multipart_content: (
|
|
110
120
|
Enumerator::Yielder y,
|
|
111
121
|
val: top,
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
module Courier
|
|
2
2
|
module Models
|
|
3
3
|
type audience_delete_params =
|
|
4
|
-
{
|
|
4
|
+
{ audience_id: String } & Courier::Internal::Type::request_parameters
|
|
5
5
|
|
|
6
6
|
class AudienceDeleteParams < Courier::Internal::Type::BaseModel
|
|
7
7
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Courier::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
attr_accessor audience_id: String
|
|
11
11
|
|
|
12
|
-
def
|
|
12
|
+
def initialize: (
|
|
13
|
+
audience_id: String,
|
|
14
|
+
?request_options: Courier::request_opts
|
|
15
|
+
) -> void
|
|
16
|
+
|
|
17
|
+
def to_hash: -> {
|
|
18
|
+
audience_id: String,
|
|
19
|
+
request_options: Courier::RequestOptions
|
|
20
|
+
}
|
|
13
21
|
end
|
|
14
22
|
end
|
|
15
23
|
end
|
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
module Courier
|
|
2
2
|
module Models
|
|
3
3
|
type audience_list_members_params =
|
|
4
|
-
{ cursor: String? }
|
|
4
|
+
{ audience_id: String, cursor: String? }
|
|
5
|
+
& Courier::Internal::Type::request_parameters
|
|
5
6
|
|
|
6
7
|
class AudienceListMembersParams < Courier::Internal::Type::BaseModel
|
|
7
8
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
9
|
include Courier::Internal::Type::RequestParameters
|
|
9
10
|
|
|
11
|
+
attr_accessor audience_id: String
|
|
12
|
+
|
|
10
13
|
attr_accessor cursor: String?
|
|
11
14
|
|
|
12
15
|
def initialize: (
|
|
16
|
+
audience_id: String,
|
|
13
17
|
?cursor: String?,
|
|
14
18
|
?request_options: Courier::request_opts
|
|
15
19
|
) -> void
|
|
16
20
|
|
|
17
21
|
def to_hash: -> {
|
|
22
|
+
audience_id: String,
|
|
18
23
|
cursor: String?,
|
|
19
24
|
request_options: Courier::RequestOptions
|
|
20
25
|
}
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
module Courier
|
|
2
2
|
module Models
|
|
3
3
|
type audience_retrieve_params =
|
|
4
|
-
{
|
|
4
|
+
{ audience_id: String } & Courier::Internal::Type::request_parameters
|
|
5
5
|
|
|
6
6
|
class AudienceRetrieveParams < Courier::Internal::Type::BaseModel
|
|
7
7
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Courier::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
attr_accessor audience_id: String
|
|
11
11
|
|
|
12
|
-
def
|
|
12
|
+
def initialize: (
|
|
13
|
+
audience_id: String,
|
|
14
|
+
?request_options: Courier::request_opts
|
|
15
|
+
) -> void
|
|
16
|
+
|
|
17
|
+
def to_hash: -> {
|
|
18
|
+
audience_id: String,
|
|
19
|
+
request_options: Courier::RequestOptions
|
|
20
|
+
}
|
|
13
21
|
end
|
|
14
22
|
end
|
|
15
23
|
end
|