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
|
@@ -21,14 +21,34 @@ module Courier
|
|
|
21
21
|
sig { returns(String) }
|
|
22
22
|
attr_accessor :notification_id
|
|
23
23
|
|
|
24
|
+
sig { returns(T.nilable(String)) }
|
|
25
|
+
attr_reader :idempotency_key
|
|
26
|
+
|
|
27
|
+
sig { params(idempotency_key: String).void }
|
|
28
|
+
attr_writer :idempotency_key
|
|
29
|
+
|
|
30
|
+
sig { returns(T.nilable(String)) }
|
|
31
|
+
attr_reader :x_idempotency_expiration
|
|
32
|
+
|
|
33
|
+
sig { params(x_idempotency_expiration: String).void }
|
|
34
|
+
attr_writer :x_idempotency_expiration
|
|
35
|
+
|
|
24
36
|
sig do
|
|
25
37
|
params(
|
|
26
38
|
template_id: String,
|
|
27
39
|
notification_id: String,
|
|
40
|
+
idempotency_key: String,
|
|
41
|
+
x_idempotency_expiration: String,
|
|
28
42
|
request_options: Courier::RequestOptions::OrHash
|
|
29
43
|
).returns(T.attached_class)
|
|
30
44
|
end
|
|
31
|
-
def self.new(
|
|
45
|
+
def self.new(
|
|
46
|
+
template_id:,
|
|
47
|
+
notification_id:,
|
|
48
|
+
idempotency_key: nil,
|
|
49
|
+
x_idempotency_expiration: nil,
|
|
50
|
+
request_options: {}
|
|
51
|
+
)
|
|
32
52
|
end
|
|
33
53
|
|
|
34
54
|
sig do
|
|
@@ -36,6 +56,8 @@ module Courier
|
|
|
36
56
|
{
|
|
37
57
|
template_id: String,
|
|
38
58
|
notification_id: String,
|
|
59
|
+
idempotency_key: String,
|
|
60
|
+
x_idempotency_expiration: String,
|
|
39
61
|
request_options: Courier::RequestOptions
|
|
40
62
|
}
|
|
41
63
|
)
|
|
@@ -21,14 +21,34 @@ module Courier
|
|
|
21
21
|
sig { returns(T::Array[Courier::PutSubscriptionsRecipient]) }
|
|
22
22
|
attr_accessor :recipients
|
|
23
23
|
|
|
24
|
+
sig { returns(T.nilable(String)) }
|
|
25
|
+
attr_reader :idempotency_key
|
|
26
|
+
|
|
27
|
+
sig { params(idempotency_key: String).void }
|
|
28
|
+
attr_writer :idempotency_key
|
|
29
|
+
|
|
30
|
+
sig { returns(T.nilable(String)) }
|
|
31
|
+
attr_reader :x_idempotency_expiration
|
|
32
|
+
|
|
33
|
+
sig { params(x_idempotency_expiration: String).void }
|
|
34
|
+
attr_writer :x_idempotency_expiration
|
|
35
|
+
|
|
24
36
|
sig do
|
|
25
37
|
params(
|
|
26
38
|
list_id: String,
|
|
27
39
|
recipients: T::Array[Courier::PutSubscriptionsRecipient::OrHash],
|
|
40
|
+
idempotency_key: String,
|
|
41
|
+
x_idempotency_expiration: String,
|
|
28
42
|
request_options: Courier::RequestOptions::OrHash
|
|
29
43
|
).returns(T.attached_class)
|
|
30
44
|
end
|
|
31
|
-
def self.new(
|
|
45
|
+
def self.new(
|
|
46
|
+
list_id:,
|
|
47
|
+
recipients:,
|
|
48
|
+
idempotency_key: nil,
|
|
49
|
+
x_idempotency_expiration: nil,
|
|
50
|
+
request_options: {}
|
|
51
|
+
)
|
|
32
52
|
end
|
|
33
53
|
|
|
34
54
|
sig do
|
|
@@ -36,6 +56,8 @@ module Courier
|
|
|
36
56
|
{
|
|
37
57
|
list_id: String,
|
|
38
58
|
recipients: T::Array[Courier::PutSubscriptionsRecipient],
|
|
59
|
+
idempotency_key: String,
|
|
60
|
+
x_idempotency_expiration: String,
|
|
39
61
|
request_options: Courier::RequestOptions
|
|
40
62
|
}
|
|
41
63
|
)
|
|
@@ -11,15 +11,41 @@ module Courier
|
|
|
11
11
|
T.any(Courier::NotificationCreateParams, Courier::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
sig { returns(T.nilable(String)) }
|
|
15
|
+
attr_reader :idempotency_key
|
|
16
|
+
|
|
17
|
+
sig { params(idempotency_key: String).void }
|
|
18
|
+
attr_writer :idempotency_key
|
|
19
|
+
|
|
20
|
+
sig { returns(T.nilable(String)) }
|
|
21
|
+
attr_reader :x_idempotency_expiration
|
|
22
|
+
|
|
23
|
+
sig { params(x_idempotency_expiration: String).void }
|
|
24
|
+
attr_writer :x_idempotency_expiration
|
|
25
|
+
|
|
14
26
|
sig do
|
|
15
|
-
params(
|
|
16
|
-
|
|
17
|
-
|
|
27
|
+
params(
|
|
28
|
+
idempotency_key: String,
|
|
29
|
+
x_idempotency_expiration: String,
|
|
30
|
+
request_options: Courier::RequestOptions::OrHash
|
|
31
|
+
).returns(T.attached_class)
|
|
18
32
|
end
|
|
19
|
-
def self.new(
|
|
33
|
+
def self.new(
|
|
34
|
+
idempotency_key: nil,
|
|
35
|
+
x_idempotency_expiration: nil,
|
|
36
|
+
request_options: {}
|
|
37
|
+
)
|
|
20
38
|
end
|
|
21
39
|
|
|
22
|
-
sig
|
|
40
|
+
sig do
|
|
41
|
+
override.returns(
|
|
42
|
+
{
|
|
43
|
+
idempotency_key: String,
|
|
44
|
+
x_idempotency_expiration: String,
|
|
45
|
+
request_options: Courier::RequestOptions
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
end
|
|
23
49
|
def to_hash
|
|
24
50
|
end
|
|
25
51
|
end
|
|
@@ -14,18 +14,42 @@ module Courier
|
|
|
14
14
|
sig { returns(String) }
|
|
15
15
|
attr_accessor :id
|
|
16
16
|
|
|
17
|
+
sig { returns(T.nilable(String)) }
|
|
18
|
+
attr_reader :idempotency_key
|
|
19
|
+
|
|
20
|
+
sig { params(idempotency_key: String).void }
|
|
21
|
+
attr_writer :idempotency_key
|
|
22
|
+
|
|
23
|
+
sig { returns(T.nilable(String)) }
|
|
24
|
+
attr_reader :x_idempotency_expiration
|
|
25
|
+
|
|
26
|
+
sig { params(x_idempotency_expiration: String).void }
|
|
27
|
+
attr_writer :x_idempotency_expiration
|
|
28
|
+
|
|
17
29
|
sig do
|
|
18
30
|
params(
|
|
19
31
|
id: String,
|
|
32
|
+
idempotency_key: String,
|
|
33
|
+
x_idempotency_expiration: String,
|
|
20
34
|
request_options: Courier::RequestOptions::OrHash
|
|
21
35
|
).returns(T.attached_class)
|
|
22
36
|
end
|
|
23
|
-
def self.new(
|
|
37
|
+
def self.new(
|
|
38
|
+
id:,
|
|
39
|
+
idempotency_key: nil,
|
|
40
|
+
x_idempotency_expiration: nil,
|
|
41
|
+
request_options: {}
|
|
42
|
+
)
|
|
24
43
|
end
|
|
25
44
|
|
|
26
45
|
sig do
|
|
27
46
|
override.returns(
|
|
28
|
-
{
|
|
47
|
+
{
|
|
48
|
+
id: String,
|
|
49
|
+
idempotency_key: String,
|
|
50
|
+
x_idempotency_expiration: String,
|
|
51
|
+
request_options: Courier::RequestOptions
|
|
52
|
+
}
|
|
29
53
|
)
|
|
30
54
|
end
|
|
31
55
|
def to_hash
|
|
@@ -17,14 +17,34 @@ module Courier
|
|
|
17
17
|
sig { returns(T::Hash[Symbol, T.anything]) }
|
|
18
18
|
attr_accessor :profile
|
|
19
19
|
|
|
20
|
+
sig { returns(T.nilable(String)) }
|
|
21
|
+
attr_reader :idempotency_key
|
|
22
|
+
|
|
23
|
+
sig { params(idempotency_key: String).void }
|
|
24
|
+
attr_writer :idempotency_key
|
|
25
|
+
|
|
26
|
+
sig { returns(T.nilable(String)) }
|
|
27
|
+
attr_reader :x_idempotency_expiration
|
|
28
|
+
|
|
29
|
+
sig { params(x_idempotency_expiration: String).void }
|
|
30
|
+
attr_writer :x_idempotency_expiration
|
|
31
|
+
|
|
20
32
|
sig do
|
|
21
33
|
params(
|
|
22
34
|
user_id: String,
|
|
23
35
|
profile: T::Hash[Symbol, T.anything],
|
|
36
|
+
idempotency_key: String,
|
|
37
|
+
x_idempotency_expiration: String,
|
|
24
38
|
request_options: Courier::RequestOptions::OrHash
|
|
25
39
|
).returns(T.attached_class)
|
|
26
40
|
end
|
|
27
|
-
def self.new(
|
|
41
|
+
def self.new(
|
|
42
|
+
user_id:,
|
|
43
|
+
profile:,
|
|
44
|
+
idempotency_key: nil,
|
|
45
|
+
x_idempotency_expiration: nil,
|
|
46
|
+
request_options: {}
|
|
47
|
+
)
|
|
28
48
|
end
|
|
29
49
|
|
|
30
50
|
sig do
|
|
@@ -32,6 +52,8 @@ module Courier
|
|
|
32
52
|
{
|
|
33
53
|
user_id: String,
|
|
34
54
|
profile: T::Hash[Symbol, T.anything],
|
|
55
|
+
idempotency_key: String,
|
|
56
|
+
x_idempotency_expiration: String,
|
|
35
57
|
request_options: Courier::RequestOptions
|
|
36
58
|
}
|
|
37
59
|
)
|
|
@@ -21,14 +21,34 @@ module Courier
|
|
|
21
21
|
sig { returns(T::Array[Courier::SubscribeToListsRequestItem]) }
|
|
22
22
|
attr_accessor :lists
|
|
23
23
|
|
|
24
|
+
sig { returns(T.nilable(String)) }
|
|
25
|
+
attr_reader :idempotency_key
|
|
26
|
+
|
|
27
|
+
sig { params(idempotency_key: String).void }
|
|
28
|
+
attr_writer :idempotency_key
|
|
29
|
+
|
|
30
|
+
sig { returns(T.nilable(String)) }
|
|
31
|
+
attr_reader :x_idempotency_expiration
|
|
32
|
+
|
|
33
|
+
sig { params(x_idempotency_expiration: String).void }
|
|
34
|
+
attr_writer :x_idempotency_expiration
|
|
35
|
+
|
|
24
36
|
sig do
|
|
25
37
|
params(
|
|
26
38
|
user_id: String,
|
|
27
39
|
lists: T::Array[Courier::SubscribeToListsRequestItem::OrHash],
|
|
40
|
+
idempotency_key: String,
|
|
41
|
+
x_idempotency_expiration: String,
|
|
28
42
|
request_options: Courier::RequestOptions::OrHash
|
|
29
43
|
).returns(T.attached_class)
|
|
30
44
|
end
|
|
31
|
-
def self.new(
|
|
45
|
+
def self.new(
|
|
46
|
+
user_id:,
|
|
47
|
+
lists:,
|
|
48
|
+
idempotency_key: nil,
|
|
49
|
+
x_idempotency_expiration: nil,
|
|
50
|
+
request_options: {}
|
|
51
|
+
)
|
|
32
52
|
end
|
|
33
53
|
|
|
34
54
|
sig do
|
|
@@ -36,6 +56,8 @@ module Courier
|
|
|
36
56
|
{
|
|
37
57
|
user_id: String,
|
|
38
58
|
lists: T::Array[Courier::SubscribeToListsRequestItem],
|
|
59
|
+
idempotency_key: String,
|
|
60
|
+
x_idempotency_expiration: String,
|
|
39
61
|
request_options: Courier::RequestOptions
|
|
40
62
|
}
|
|
41
63
|
)
|
|
@@ -39,12 +39,26 @@ module Courier
|
|
|
39
39
|
sig { params(title: String).void }
|
|
40
40
|
attr_writer :title
|
|
41
41
|
|
|
42
|
+
sig { returns(T.nilable(String)) }
|
|
43
|
+
attr_reader :idempotency_key
|
|
44
|
+
|
|
45
|
+
sig { params(idempotency_key: String).void }
|
|
46
|
+
attr_writer :idempotency_key
|
|
47
|
+
|
|
48
|
+
sig { returns(T.nilable(String)) }
|
|
49
|
+
attr_reader :x_idempotency_expiration
|
|
50
|
+
|
|
51
|
+
sig { params(x_idempotency_expiration: String).void }
|
|
52
|
+
attr_writer :x_idempotency_expiration
|
|
53
|
+
|
|
42
54
|
sig do
|
|
43
55
|
params(
|
|
44
56
|
provider: String,
|
|
45
57
|
alias_: String,
|
|
46
58
|
settings: T::Hash[Symbol, T.anything],
|
|
47
59
|
title: String,
|
|
60
|
+
idempotency_key: String,
|
|
61
|
+
x_idempotency_expiration: String,
|
|
48
62
|
request_options: Courier::RequestOptions::OrHash
|
|
49
63
|
).returns(T.attached_class)
|
|
50
64
|
end
|
|
@@ -60,6 +74,8 @@ module Courier
|
|
|
60
74
|
settings: nil,
|
|
61
75
|
# Optional display title. Omit to use "Default Configuration".
|
|
62
76
|
title: nil,
|
|
77
|
+
idempotency_key: nil,
|
|
78
|
+
x_idempotency_expiration: nil,
|
|
63
79
|
request_options: {}
|
|
64
80
|
)
|
|
65
81
|
end
|
|
@@ -71,6 +87,8 @@ module Courier
|
|
|
71
87
|
alias_: String,
|
|
72
88
|
settings: T::Hash[Symbol, T.anything],
|
|
73
89
|
title: String,
|
|
90
|
+
idempotency_key: String,
|
|
91
|
+
x_idempotency_expiration: String,
|
|
74
92
|
request_options: Courier::RequestOptions
|
|
75
93
|
}
|
|
76
94
|
)
|
|
@@ -14,15 +14,41 @@ module Courier
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
sig { returns(T.nilable(String)) }
|
|
18
|
+
attr_reader :idempotency_key
|
|
19
|
+
|
|
20
|
+
sig { params(idempotency_key: String).void }
|
|
21
|
+
attr_writer :idempotency_key
|
|
22
|
+
|
|
23
|
+
sig { returns(T.nilable(String)) }
|
|
24
|
+
attr_reader :x_idempotency_expiration
|
|
25
|
+
|
|
26
|
+
sig { params(x_idempotency_expiration: String).void }
|
|
27
|
+
attr_writer :x_idempotency_expiration
|
|
28
|
+
|
|
17
29
|
sig do
|
|
18
|
-
params(
|
|
19
|
-
|
|
20
|
-
|
|
30
|
+
params(
|
|
31
|
+
idempotency_key: String,
|
|
32
|
+
x_idempotency_expiration: String,
|
|
33
|
+
request_options: Courier::RequestOptions::OrHash
|
|
34
|
+
).returns(T.attached_class)
|
|
21
35
|
end
|
|
22
|
-
def self.new(
|
|
36
|
+
def self.new(
|
|
37
|
+
idempotency_key: nil,
|
|
38
|
+
x_idempotency_expiration: nil,
|
|
39
|
+
request_options: {}
|
|
40
|
+
)
|
|
23
41
|
end
|
|
24
42
|
|
|
25
|
-
sig
|
|
43
|
+
sig do
|
|
44
|
+
override.returns(
|
|
45
|
+
{
|
|
46
|
+
idempotency_key: String,
|
|
47
|
+
x_idempotency_expiration: String,
|
|
48
|
+
request_options: Courier::RequestOptions
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
end
|
|
26
52
|
def to_hash
|
|
27
53
|
end
|
|
28
54
|
end
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class ScheduleBroadcastRequest < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Courier::ScheduleBroadcastRequest, Courier::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# ID of the target list or audience.
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
attr_accessor :recipient_id
|
|
14
|
+
|
|
15
|
+
# Whether the broadcast targets a list or an audience.
|
|
16
|
+
sig do
|
|
17
|
+
returns(Courier::ScheduleBroadcastRequest::RecipientType::OrSymbol)
|
|
18
|
+
end
|
|
19
|
+
attr_accessor :recipient_type
|
|
20
|
+
|
|
21
|
+
# Wall-clock timestamp of the future send, no timezone offset (e.g.
|
|
22
|
+
# "2026-07-21T20:00:00"). The zone is given by `timezone`.
|
|
23
|
+
sig { returns(String) }
|
|
24
|
+
attr_accessor :scheduled_to
|
|
25
|
+
|
|
26
|
+
# IANA timezone for the scheduled send (e.g. America/New_York).
|
|
27
|
+
sig { returns(T.nilable(String)) }
|
|
28
|
+
attr_reader :timezone
|
|
29
|
+
|
|
30
|
+
sig { params(timezone: String).void }
|
|
31
|
+
attr_writer :timezone
|
|
32
|
+
|
|
33
|
+
# Request body for scheduling a broadcast for a future send.
|
|
34
|
+
sig do
|
|
35
|
+
params(
|
|
36
|
+
recipient_id: String,
|
|
37
|
+
recipient_type:
|
|
38
|
+
Courier::ScheduleBroadcastRequest::RecipientType::OrSymbol,
|
|
39
|
+
scheduled_to: String,
|
|
40
|
+
timezone: String
|
|
41
|
+
).returns(T.attached_class)
|
|
42
|
+
end
|
|
43
|
+
def self.new(
|
|
44
|
+
# ID of the target list or audience.
|
|
45
|
+
recipient_id:,
|
|
46
|
+
# Whether the broadcast targets a list or an audience.
|
|
47
|
+
recipient_type:,
|
|
48
|
+
# Wall-clock timestamp of the future send, no timezone offset (e.g.
|
|
49
|
+
# "2026-07-21T20:00:00"). The zone is given by `timezone`.
|
|
50
|
+
scheduled_to:,
|
|
51
|
+
# IANA timezone for the scheduled send (e.g. America/New_York).
|
|
52
|
+
timezone: nil
|
|
53
|
+
)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
sig do
|
|
57
|
+
override.returns(
|
|
58
|
+
{
|
|
59
|
+
recipient_id: String,
|
|
60
|
+
recipient_type:
|
|
61
|
+
Courier::ScheduleBroadcastRequest::RecipientType::OrSymbol,
|
|
62
|
+
scheduled_to: String,
|
|
63
|
+
timezone: String
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
end
|
|
67
|
+
def to_hash
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Whether the broadcast targets a list or an audience.
|
|
71
|
+
module RecipientType
|
|
72
|
+
extend Courier::Internal::Type::Enum
|
|
73
|
+
|
|
74
|
+
TaggedSymbol =
|
|
75
|
+
T.type_alias do
|
|
76
|
+
T.all(Symbol, Courier::ScheduleBroadcastRequest::RecipientType)
|
|
77
|
+
end
|
|
78
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
79
|
+
|
|
80
|
+
LIST =
|
|
81
|
+
T.let(
|
|
82
|
+
:list,
|
|
83
|
+
Courier::ScheduleBroadcastRequest::RecipientType::TaggedSymbol
|
|
84
|
+
)
|
|
85
|
+
AUDIENCE =
|
|
86
|
+
T.let(
|
|
87
|
+
:audience,
|
|
88
|
+
Courier::ScheduleBroadcastRequest::RecipientType::TaggedSymbol
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
sig do
|
|
92
|
+
override.returns(
|
|
93
|
+
T::Array[
|
|
94
|
+
Courier::ScheduleBroadcastRequest::RecipientType::TaggedSymbol
|
|
95
|
+
]
|
|
96
|
+
)
|
|
97
|
+
end
|
|
98
|
+
def self.values
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class SendBroadcastRequest < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Courier::SendBroadcastRequest, Courier::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# ID of the target list or audience.
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
attr_accessor :recipient_id
|
|
14
|
+
|
|
15
|
+
# Whether the broadcast targets a list or an audience.
|
|
16
|
+
sig { returns(Courier::SendBroadcastRequest::RecipientType::OrSymbol) }
|
|
17
|
+
attr_accessor :recipient_type
|
|
18
|
+
|
|
19
|
+
# Request body for sending a broadcast immediately.
|
|
20
|
+
sig do
|
|
21
|
+
params(
|
|
22
|
+
recipient_id: String,
|
|
23
|
+
recipient_type: Courier::SendBroadcastRequest::RecipientType::OrSymbol
|
|
24
|
+
).returns(T.attached_class)
|
|
25
|
+
end
|
|
26
|
+
def self.new(
|
|
27
|
+
# ID of the target list or audience.
|
|
28
|
+
recipient_id:,
|
|
29
|
+
# Whether the broadcast targets a list or an audience.
|
|
30
|
+
recipient_type:
|
|
31
|
+
)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
sig do
|
|
35
|
+
override.returns(
|
|
36
|
+
{
|
|
37
|
+
recipient_id: String,
|
|
38
|
+
recipient_type:
|
|
39
|
+
Courier::SendBroadcastRequest::RecipientType::OrSymbol
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
def to_hash
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Whether the broadcast targets a list or an audience.
|
|
47
|
+
module RecipientType
|
|
48
|
+
extend Courier::Internal::Type::Enum
|
|
49
|
+
|
|
50
|
+
TaggedSymbol =
|
|
51
|
+
T.type_alias do
|
|
52
|
+
T.all(Symbol, Courier::SendBroadcastRequest::RecipientType)
|
|
53
|
+
end
|
|
54
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
55
|
+
|
|
56
|
+
LIST =
|
|
57
|
+
T.let(
|
|
58
|
+
:list,
|
|
59
|
+
Courier::SendBroadcastRequest::RecipientType::TaggedSymbol
|
|
60
|
+
)
|
|
61
|
+
AUDIENCE =
|
|
62
|
+
T.let(
|
|
63
|
+
:audience,
|
|
64
|
+
Courier::SendBroadcastRequest::RecipientType::TaggedSymbol
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
sig do
|
|
68
|
+
override.returns(
|
|
69
|
+
T::Array[Courier::SendBroadcastRequest::RecipientType::TaggedSymbol]
|
|
70
|
+
)
|
|
71
|
+
end
|
|
72
|
+
def self.values
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -19,9 +19,23 @@ module Courier
|
|
|
19
19
|
sig { params(message: Courier::SendMessageParams::Message::OrHash).void }
|
|
20
20
|
attr_writer :message
|
|
21
21
|
|
|
22
|
+
sig { returns(T.nilable(String)) }
|
|
23
|
+
attr_reader :idempotency_key
|
|
24
|
+
|
|
25
|
+
sig { params(idempotency_key: String).void }
|
|
26
|
+
attr_writer :idempotency_key
|
|
27
|
+
|
|
28
|
+
sig { returns(T.nilable(String)) }
|
|
29
|
+
attr_reader :x_idempotency_expiration
|
|
30
|
+
|
|
31
|
+
sig { params(x_idempotency_expiration: String).void }
|
|
32
|
+
attr_writer :x_idempotency_expiration
|
|
33
|
+
|
|
22
34
|
sig do
|
|
23
35
|
params(
|
|
24
36
|
message: Courier::SendMessageParams::Message::OrHash,
|
|
37
|
+
idempotency_key: String,
|
|
38
|
+
x_idempotency_expiration: String,
|
|
25
39
|
request_options: Courier::RequestOptions::OrHash
|
|
26
40
|
).returns(T.attached_class)
|
|
27
41
|
end
|
|
@@ -29,6 +43,8 @@ module Courier
|
|
|
29
43
|
# The message property has the following primary top-level properties. They define
|
|
30
44
|
# the destination and content of the message.
|
|
31
45
|
message:,
|
|
46
|
+
idempotency_key: nil,
|
|
47
|
+
x_idempotency_expiration: nil,
|
|
32
48
|
request_options: {}
|
|
33
49
|
)
|
|
34
50
|
end
|
|
@@ -37,6 +53,8 @@ module Courier
|
|
|
37
53
|
override.returns(
|
|
38
54
|
{
|
|
39
55
|
message: Courier::SendMessageParams::Message,
|
|
56
|
+
idempotency_key: String,
|
|
57
|
+
x_idempotency_expiration: String,
|
|
40
58
|
request_options: Courier::RequestOptions
|
|
41
59
|
}
|
|
42
60
|
)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class UpdateBroadcastRequest < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Courier::UpdateBroadcastRequest, Courier::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# New human-readable name.
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
attr_accessor :name
|
|
14
|
+
|
|
15
|
+
# Request body for updating a broadcast. Only the name is mutable.
|
|
16
|
+
sig { params(name: String).returns(T.attached_class) }
|
|
17
|
+
def self.new(
|
|
18
|
+
# New human-readable name.
|
|
19
|
+
name:
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
sig { override.returns({ name: String }) }
|
|
24
|
+
def to_hash
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -29,6 +29,18 @@ module Courier
|
|
|
29
29
|
sig { returns(T.nilable(String)) }
|
|
30
30
|
attr_accessor :tenant_id
|
|
31
31
|
|
|
32
|
+
sig { returns(T.nilable(String)) }
|
|
33
|
+
attr_reader :idempotency_key
|
|
34
|
+
|
|
35
|
+
sig { params(idempotency_key: String).void }
|
|
36
|
+
attr_writer :idempotency_key
|
|
37
|
+
|
|
38
|
+
sig { returns(T.nilable(String)) }
|
|
39
|
+
attr_reader :x_idempotency_expiration
|
|
40
|
+
|
|
41
|
+
sig { params(x_idempotency_expiration: String).void }
|
|
42
|
+
attr_writer :x_idempotency_expiration
|
|
43
|
+
|
|
32
44
|
sig do
|
|
33
45
|
params(
|
|
34
46
|
user_id: String,
|
|
@@ -37,6 +49,8 @@ module Courier
|
|
|
37
49
|
Courier::Users::PreferenceBulkUpdateParams::Topic::OrHash
|
|
38
50
|
],
|
|
39
51
|
tenant_id: T.nilable(String),
|
|
52
|
+
idempotency_key: String,
|
|
53
|
+
x_idempotency_expiration: String,
|
|
40
54
|
request_options: Courier::RequestOptions::OrHash
|
|
41
55
|
).returns(T.attached_class)
|
|
42
56
|
end
|
|
@@ -47,6 +61,8 @@ module Courier
|
|
|
47
61
|
topics:,
|
|
48
62
|
# Update the preferences of a user for this specific tenant context.
|
|
49
63
|
tenant_id: nil,
|
|
64
|
+
idempotency_key: nil,
|
|
65
|
+
x_idempotency_expiration: nil,
|
|
50
66
|
request_options: {}
|
|
51
67
|
)
|
|
52
68
|
end
|
|
@@ -58,6 +74,8 @@ module Courier
|
|
|
58
74
|
topics:
|
|
59
75
|
T::Array[Courier::Users::PreferenceBulkUpdateParams::Topic],
|
|
60
76
|
tenant_id: T.nilable(String),
|
|
77
|
+
idempotency_key: String,
|
|
78
|
+
x_idempotency_expiration: String,
|
|
61
79
|
request_options: Courier::RequestOptions
|
|
62
80
|
}
|
|
63
81
|
)
|