trycourier 4.20.0 → 4.22.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 +39 -4
- 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/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/send_message_params.rb +15 -1
- 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 +2 -14
- 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/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 +4 -11
- data/rbi/courier/client.rbi +38 -3
- 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/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/send_message_params.rbi +18 -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 +2 -14
- 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/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 +2 -2
- 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/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/send_message_params.rbs +17 -1
- 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 +2 -14
- data/sig/courier/resources/automations/invoke.rbs +4 -0
- data/sig/courier/resources/brands.rbs +2 -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 +14 -35
- data/lib/courier/models/bulk_add_users_params.rb +0 -26
- data/lib/courier/models/bulk_create_job_params.rb +0 -29
- data/lib/courier/models/bulk_create_job_response.rb +0 -16
- data/lib/courier/models/bulk_list_users_params.rb +0 -33
- data/lib/courier/models/bulk_list_users_response.rb +0 -49
- data/lib/courier/models/bulk_retrieve_job_params.rb +0 -20
- data/lib/courier/models/bulk_retrieve_job_response.rb +0 -76
- data/lib/courier/models/bulk_run_job_params.rb +0 -20
- data/lib/courier/models/inbound_bulk_message.rb +0 -91
- data/lib/courier/models/inbound_bulk_message_user.rb +0 -54
- data/lib/courier/resources/bulk.rb +0 -141
- data/rbi/courier/models/bulk_add_users_params.rbi +0 -43
- data/rbi/courier/models/bulk_create_job_params.rbi +0 -54
- data/rbi/courier/models/bulk_create_job_response.rbi +0 -26
- data/rbi/courier/models/bulk_list_users_params.rbi +0 -51
- data/rbi/courier/models/bulk_list_users_response.rbi +0 -125
- data/rbi/courier/models/bulk_retrieve_job_params.rbi +0 -35
- data/rbi/courier/models/bulk_retrieve_job_response.rbi +0 -157
- data/rbi/courier/models/bulk_run_job_params.rbi +0 -35
- data/rbi/courier/models/inbound_bulk_message.rbi +0 -124
- data/rbi/courier/models/inbound_bulk_message_user.rbi +0 -88
- data/rbi/courier/resources/bulk.rbi +0 -102
- data/sig/courier/models/bulk_add_users_params.rbs +0 -28
- data/sig/courier/models/bulk_create_job_params.rbs +0 -24
- data/sig/courier/models/bulk_create_job_response.rbs +0 -13
- data/sig/courier/models/bulk_list_users_params.rbs +0 -28
- data/sig/courier/models/bulk_list_users_response.rbs +0 -65
- data/sig/courier/models/bulk_retrieve_job_params.rbs +0 -23
- data/sig/courier/models/bulk_retrieve_job_response.rbs +0 -66
- data/sig/courier/models/bulk_run_job_params.rbs +0 -23
- data/sig/courier/models/inbound_bulk_message.rbs +0 -58
- data/sig/courier/models/inbound_bulk_message_user.rbs +0 -42
- data/sig/courier/resources/bulk.rbs +0 -34
|
@@ -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
|
|
@@ -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
|
)
|
|
@@ -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
|
)
|
|
@@ -81,10 +81,14 @@ module Courier
|
|
|
81
81
|
)
|
|
82
82
|
end
|
|
83
83
|
|
|
84
|
+
# The subscription status to set: OPTED_IN or OPTED_OUT. REQUIRED is a topic-level
|
|
85
|
+
# default, not a user choice; the API rejects opting a user out of a REQUIRED
|
|
86
|
+
# topic.
|
|
84
87
|
sig { returns(Courier::PreferenceStatus::OrSymbol) }
|
|
85
88
|
attr_accessor :status
|
|
86
89
|
|
|
87
|
-
# The
|
|
90
|
+
# The channels to deliver this topic on when has_custom_routing is true. One or
|
|
91
|
+
# more of: direct_message, email, push, sms, webhook, inbox.
|
|
88
92
|
sig do
|
|
89
93
|
returns(
|
|
90
94
|
T.nilable(T::Array[Courier::ChannelClassification::OrSymbol])
|
|
@@ -92,6 +96,8 @@ module Courier
|
|
|
92
96
|
end
|
|
93
97
|
attr_accessor :custom_routing
|
|
94
98
|
|
|
99
|
+
# Set to true to route this topic to the channels in custom_routing instead of the
|
|
100
|
+
# topic's default routing.
|
|
95
101
|
sig { returns(T.nilable(T::Boolean)) }
|
|
96
102
|
attr_accessor :has_custom_routing
|
|
97
103
|
|
|
@@ -104,9 +110,15 @@ module Courier
|
|
|
104
110
|
).returns(T.attached_class)
|
|
105
111
|
end
|
|
106
112
|
def self.new(
|
|
113
|
+
# The subscription status to set: OPTED_IN or OPTED_OUT. REQUIRED is a topic-level
|
|
114
|
+
# default, not a user choice; the API rejects opting a user out of a REQUIRED
|
|
115
|
+
# topic.
|
|
107
116
|
status:,
|
|
108
|
-
# The
|
|
117
|
+
# The channels to deliver this topic on when has_custom_routing is true. One or
|
|
118
|
+
# more of: direct_message, email, push, sms, webhook, inbox.
|
|
109
119
|
custom_routing: nil,
|
|
120
|
+
# Set to true to route this topic to the channels in custom_routing instead of the
|
|
121
|
+
# topic's default routing.
|
|
110
122
|
has_custom_routing: nil
|
|
111
123
|
)
|
|
112
124
|
end
|
|
@@ -9,19 +9,28 @@ module Courier
|
|
|
9
9
|
T.any(Courier::Users::TopicPreference, Courier::Internal::AnyHash)
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
+
# The topic's default status, returned on reads. It applies whenever the user has
|
|
13
|
+
# no override of their own (status equals this value).
|
|
12
14
|
sig { returns(Courier::PreferenceStatus::TaggedSymbol) }
|
|
13
15
|
attr_accessor :default_status
|
|
14
16
|
|
|
17
|
+
# The user's subscription status for this topic. OPTED_IN or OPTED_OUT reflect the
|
|
18
|
+
# user's own choice; REQUIRED is a topic-level default set in the preferences
|
|
19
|
+
# editor, not a user choice.
|
|
15
20
|
sig { returns(Courier::PreferenceStatus::TaggedSymbol) }
|
|
16
21
|
attr_accessor :status
|
|
17
22
|
|
|
23
|
+
# The unique identifier of the subscription topic this preference applies to.
|
|
18
24
|
sig { returns(String) }
|
|
19
25
|
attr_accessor :topic_id
|
|
20
26
|
|
|
27
|
+
# The display name of the subscription topic, returned on reads.
|
|
21
28
|
sig { returns(String) }
|
|
22
29
|
attr_accessor :topic_name
|
|
23
30
|
|
|
24
|
-
# The
|
|
31
|
+
# The channels the user has chosen to receive this topic on, present only when
|
|
32
|
+
# has_custom_routing is true. One or more of: direct_message, email, push, sms,
|
|
33
|
+
# webhook, inbox.
|
|
25
34
|
sig do
|
|
26
35
|
returns(
|
|
27
36
|
T.nilable(T::Array[Courier::ChannelClassification::TaggedSymbol])
|
|
@@ -29,6 +38,8 @@ module Courier
|
|
|
29
38
|
end
|
|
30
39
|
attr_accessor :custom_routing
|
|
31
40
|
|
|
41
|
+
# Whether the user has chosen specific delivery channels for this topic (listed in
|
|
42
|
+
# custom_routing) rather than the topic's default routing.
|
|
32
43
|
sig { returns(T.nilable(T::Boolean)) }
|
|
33
44
|
attr_accessor :has_custom_routing
|
|
34
45
|
|
|
@@ -44,12 +55,23 @@ module Courier
|
|
|
44
55
|
).returns(T.attached_class)
|
|
45
56
|
end
|
|
46
57
|
def self.new(
|
|
58
|
+
# The topic's default status, returned on reads. It applies whenever the user has
|
|
59
|
+
# no override of their own (status equals this value).
|
|
47
60
|
default_status:,
|
|
61
|
+
# The user's subscription status for this topic. OPTED_IN or OPTED_OUT reflect the
|
|
62
|
+
# user's own choice; REQUIRED is a topic-level default set in the preferences
|
|
63
|
+
# editor, not a user choice.
|
|
48
64
|
status:,
|
|
65
|
+
# The unique identifier of the subscription topic this preference applies to.
|
|
49
66
|
topic_id:,
|
|
67
|
+
# The display name of the subscription topic, returned on reads.
|
|
50
68
|
topic_name:,
|
|
51
|
-
# The
|
|
69
|
+
# The channels the user has chosen to receive this topic on, present only when
|
|
70
|
+
# has_custom_routing is true. One or more of: direct_message, email, push, sms,
|
|
71
|
+
# webhook, inbox.
|
|
52
72
|
custom_routing: nil,
|
|
73
|
+
# Whether the user has chosen specific delivery channels for this topic (listed in
|
|
74
|
+
# custom_routing) rather than the topic's default routing.
|
|
53
75
|
has_custom_routing: nil
|
|
54
76
|
)
|
|
55
77
|
end
|
|
@@ -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
|
|
@@ -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
|
|
@@ -18,18 +18,42 @@ module Courier
|
|
|
18
18
|
sig { returns(String) }
|
|
19
19
|
attr_accessor :section_id
|
|
20
20
|
|
|
21
|
+
sig { returns(T.nilable(String)) }
|
|
22
|
+
attr_reader :idempotency_key
|
|
23
|
+
|
|
24
|
+
sig { params(idempotency_key: String).void }
|
|
25
|
+
attr_writer :idempotency_key
|
|
26
|
+
|
|
27
|
+
sig { returns(T.nilable(String)) }
|
|
28
|
+
attr_reader :x_idempotency_expiration
|
|
29
|
+
|
|
30
|
+
sig { params(x_idempotency_expiration: String).void }
|
|
31
|
+
attr_writer :x_idempotency_expiration
|
|
32
|
+
|
|
21
33
|
sig do
|
|
22
34
|
params(
|
|
23
35
|
section_id: String,
|
|
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
|
+
section_id:,
|
|
43
|
+
idempotency_key: nil,
|
|
44
|
+
x_idempotency_expiration: nil,
|
|
45
|
+
request_options: {}
|
|
46
|
+
)
|
|
28
47
|
end
|
|
29
48
|
|
|
30
49
|
sig do
|
|
31
50
|
override.returns(
|
|
32
|
-
{
|
|
51
|
+
{
|
|
52
|
+
section_id: String,
|
|
53
|
+
idempotency_key: String,
|
|
54
|
+
x_idempotency_expiration: String,
|
|
55
|
+
request_options: Courier::RequestOptions
|
|
56
|
+
}
|
|
33
57
|
)
|
|
34
58
|
end
|
|
35
59
|
def to_hash
|
data/rbi/courier/models.rbi
CHANGED
|
@@ -77,16 +77,6 @@ module Courier
|
|
|
77
77
|
|
|
78
78
|
BrandUpdateParams = Courier::Models::BrandUpdateParams
|
|
79
79
|
|
|
80
|
-
BulkAddUsersParams = Courier::Models::BulkAddUsersParams
|
|
81
|
-
|
|
82
|
-
BulkCreateJobParams = Courier::Models::BulkCreateJobParams
|
|
83
|
-
|
|
84
|
-
BulkListUsersParams = Courier::Models::BulkListUsersParams
|
|
85
|
-
|
|
86
|
-
BulkRetrieveJobParams = Courier::Models::BulkRetrieveJobParams
|
|
87
|
-
|
|
88
|
-
BulkRunJobParams = Courier::Models::BulkRunJobParams
|
|
89
|
-
|
|
90
80
|
CancelJourneyRequest = Courier::Models::CancelJourneyRequest
|
|
91
81
|
|
|
92
82
|
CancelJourneyResponse = Courier::Models::CancelJourneyResponse
|
|
@@ -157,12 +147,10 @@ module Courier
|
|
|
157
147
|
|
|
158
148
|
Icons = Courier::Models::Icons
|
|
159
149
|
|
|
160
|
-
InboundBulkMessage = Courier::Models::InboundBulkMessage
|
|
161
|
-
|
|
162
|
-
InboundBulkMessageUser = Courier::Models::InboundBulkMessageUser
|
|
163
|
-
|
|
164
150
|
InboundTrackEventParams = Courier::Models::InboundTrackEventParams
|
|
165
151
|
|
|
152
|
+
Inbox = Courier::Models::Inbox
|
|
153
|
+
|
|
166
154
|
Intercom = Courier::Models::Intercom
|
|
167
155
|
|
|
168
156
|
IntercomRecipient = Courier::Models::IntercomRecipient
|