trycourier 4.21.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 +16 -0
- data/lib/courier/client.rb +39 -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/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 -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/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 -0
- data/rbi/courier/client.rbi +38 -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/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 -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/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 -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/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 -0
- 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 -2
data/lib/courier/version.rb
CHANGED
data/lib/courier.rb
CHANGED
|
@@ -158,6 +158,8 @@ require_relative "courier/models/filter_config"
|
|
|
158
158
|
require_relative "courier/models/icons"
|
|
159
159
|
require_relative "courier/models/inbound_track_event_params"
|
|
160
160
|
require_relative "courier/models/inbound_track_event_response"
|
|
161
|
+
require_relative "courier/models/inbox/message_delete_params"
|
|
162
|
+
require_relative "courier/models/inbox/message_restore_params"
|
|
161
163
|
require_relative "courier/models/intercom"
|
|
162
164
|
require_relative "courier/models/intercom_recipient"
|
|
163
165
|
require_relative "courier/models/journey"
|
|
@@ -424,6 +426,8 @@ require_relative "courier/resources/brands"
|
|
|
424
426
|
require_relative "courier/resources/digests"
|
|
425
427
|
require_relative "courier/resources/digests/schedules"
|
|
426
428
|
require_relative "courier/resources/inbound"
|
|
429
|
+
require_relative "courier/resources/inbox"
|
|
430
|
+
require_relative "courier/resources/inbox/messages"
|
|
427
431
|
require_relative "courier/resources/journeys"
|
|
428
432
|
require_relative "courier/resources/journeys/templates"
|
|
429
433
|
require_relative "courier/resources/lists"
|
data/rbi/courier/client.rbi
CHANGED
|
@@ -13,60 +13,98 @@ module Courier
|
|
|
13
13
|
sig { returns(String) }
|
|
14
14
|
attr_reader :api_key
|
|
15
15
|
|
|
16
|
+
# Send a message to one or more recipients — users, lists, audiences, or tenants —
|
|
17
|
+
# across every channel you have configured.
|
|
16
18
|
sig { returns(Courier::Resources::Send) }
|
|
17
19
|
attr_reader :send_
|
|
18
20
|
|
|
21
|
+
# Define filter-based groups whose membership Courier recalculates as user
|
|
22
|
+
# profiles change.
|
|
19
23
|
sig { returns(Courier::Resources::Audiences) }
|
|
20
24
|
attr_reader :audiences
|
|
21
25
|
|
|
26
|
+
# Configure the channel providers Courier delivers through, and browse the
|
|
27
|
+
# provider types it supports.
|
|
22
28
|
sig { returns(Courier::Resources::Providers) }
|
|
23
29
|
attr_reader :providers
|
|
24
30
|
|
|
31
|
+
# Read the audit trail of configuration and access changes in your workspace.
|
|
25
32
|
sig { returns(Courier::Resources::AuditEvents) }
|
|
26
33
|
attr_reader :audit_events
|
|
27
34
|
|
|
35
|
+
# Issue scoped, short-lived JWTs so client-side SDKs — Inbox, Preferences, and the
|
|
36
|
+
# embedded designer — can call Courier as a single user. Server-side requests
|
|
37
|
+
# authenticate with your workspace API key instead.
|
|
28
38
|
sig { returns(Courier::Resources::Auth) }
|
|
29
39
|
attr_reader :auth
|
|
30
40
|
|
|
41
|
+
# Invoke a stored automation template or an ad hoc automation defined in the
|
|
42
|
+
# request.
|
|
31
43
|
sig { returns(Courier::Resources::Automations) }
|
|
32
44
|
attr_reader :automations
|
|
33
45
|
|
|
46
|
+
# Build, version, publish, invoke, and cancel multi-step notification workflows,
|
|
47
|
+
# along with the templates scoped to them.
|
|
34
48
|
sig { returns(Courier::Resources::Journeys) }
|
|
35
49
|
attr_reader :journeys
|
|
36
50
|
|
|
51
|
+
# Manage the logos, colors, and layout that give the templates you send a
|
|
52
|
+
# consistent look.
|
|
37
53
|
sig { returns(Courier::Resources::Brands) }
|
|
38
54
|
attr_reader :brands
|
|
39
55
|
|
|
40
56
|
sig { returns(Courier::Resources::Digests) }
|
|
41
57
|
attr_reader :digests
|
|
42
58
|
|
|
59
|
+
# Record an inbound event that triggers the journeys and automations mapped to it.
|
|
43
60
|
sig { returns(Courier::Resources::Inbound) }
|
|
44
61
|
attr_reader :inbound
|
|
45
62
|
|
|
63
|
+
# Manage static groups of users that you subscribe explicitly, and send to them by
|
|
64
|
+
# list id or list pattern.
|
|
46
65
|
sig { returns(Courier::Resources::Lists) }
|
|
47
66
|
attr_reader :lists
|
|
48
67
|
|
|
68
|
+
sig { returns(Courier::Resources::Inbox) }
|
|
69
|
+
attr_reader :inbox
|
|
70
|
+
|
|
71
|
+
# Look up the messages Courier has accepted, inspect their delivery history and
|
|
72
|
+
# rendered output, and cancel, resend, or archive them.
|
|
49
73
|
sig { returns(Courier::Resources::Messages) }
|
|
50
74
|
attr_reader :messages
|
|
51
75
|
|
|
76
|
+
# Look up the messages Courier has accepted, inspect their delivery history and
|
|
77
|
+
# rendered output, and cancel, resend, or archive them.
|
|
52
78
|
sig { returns(Courier::Resources::Requests) }
|
|
53
79
|
attr_reader :requests
|
|
54
80
|
|
|
81
|
+
# Create, update, version, publish, and localize notification templates and their
|
|
82
|
+
# content.
|
|
55
83
|
sig { returns(Courier::Resources::Notifications) }
|
|
56
84
|
attr_reader :notifications
|
|
57
85
|
|
|
86
|
+
# Define reusable channel routing and failover strategies, and see which templates
|
|
87
|
+
# use them.
|
|
58
88
|
sig { returns(Courier::Resources::RoutingStrategies) }
|
|
59
89
|
attr_reader :routing_strategies
|
|
60
90
|
|
|
91
|
+
# Manage the workspace catalog of subscription topics, the sections that group
|
|
92
|
+
# them, and publishing the preference page.
|
|
61
93
|
sig { returns(Courier::Resources::WorkspacePreferences) }
|
|
62
94
|
attr_reader :workspace_preferences
|
|
63
95
|
|
|
96
|
+
# Store the contact information Courier delivers to for each user — email, phone
|
|
97
|
+
# number, push tokens, and any custom data you send to.
|
|
64
98
|
sig { returns(Courier::Resources::Profiles) }
|
|
65
99
|
attr_reader :profiles
|
|
66
100
|
|
|
101
|
+
# Manage tenants — the organizations, teams, or accounts your users belong to —
|
|
102
|
+
# along with their users and default preferences.
|
|
67
103
|
sig { returns(Courier::Resources::Tenants) }
|
|
68
104
|
attr_reader :tenants
|
|
69
105
|
|
|
106
|
+
# Store and retrieve the translation strings Courier uses to render localized
|
|
107
|
+
# template content.
|
|
70
108
|
sig { returns(Courier::Resources::Translations) }
|
|
71
109
|
attr_reader :translations
|
|
72
110
|
|
|
@@ -43,6 +43,18 @@ module Courier
|
|
|
43
43
|
sig { returns(T.nilable(String)) }
|
|
44
44
|
attr_accessor :template
|
|
45
45
|
|
|
46
|
+
sig { returns(T.nilable(String)) }
|
|
47
|
+
attr_reader :idempotency_key
|
|
48
|
+
|
|
49
|
+
sig { params(idempotency_key: String).void }
|
|
50
|
+
attr_writer :idempotency_key
|
|
51
|
+
|
|
52
|
+
sig { returns(T.nilable(String)) }
|
|
53
|
+
attr_reader :x_idempotency_expiration
|
|
54
|
+
|
|
55
|
+
sig { params(x_idempotency_expiration: String).void }
|
|
56
|
+
attr_writer :x_idempotency_expiration
|
|
57
|
+
|
|
46
58
|
sig do
|
|
47
59
|
params(
|
|
48
60
|
automation:
|
|
@@ -52,6 +64,8 @@ module Courier
|
|
|
52
64
|
profile: T.nilable(T::Hash[Symbol, T.anything]),
|
|
53
65
|
recipient: T.nilable(String),
|
|
54
66
|
template: T.nilable(String),
|
|
67
|
+
idempotency_key: String,
|
|
68
|
+
x_idempotency_expiration: String,
|
|
55
69
|
request_options: Courier::RequestOptions::OrHash
|
|
56
70
|
).returns(T.attached_class)
|
|
57
71
|
end
|
|
@@ -62,6 +76,8 @@ module Courier
|
|
|
62
76
|
profile: nil,
|
|
63
77
|
recipient: nil,
|
|
64
78
|
template: nil,
|
|
79
|
+
idempotency_key: nil,
|
|
80
|
+
x_idempotency_expiration: nil,
|
|
65
81
|
request_options: {}
|
|
66
82
|
)
|
|
67
83
|
end
|
|
@@ -76,6 +92,8 @@ module Courier
|
|
|
76
92
|
profile: T.nilable(T::Hash[Symbol, T.anything]),
|
|
77
93
|
recipient: T.nilable(String),
|
|
78
94
|
template: T.nilable(String),
|
|
95
|
+
idempotency_key: String,
|
|
96
|
+
x_idempotency_expiration: String,
|
|
79
97
|
request_options: Courier::RequestOptions
|
|
80
98
|
}
|
|
81
99
|
)
|
|
@@ -33,6 +33,18 @@ module Courier
|
|
|
33
33
|
sig { returns(T.nilable(String)) }
|
|
34
34
|
attr_accessor :template
|
|
35
35
|
|
|
36
|
+
sig { returns(T.nilable(String)) }
|
|
37
|
+
attr_reader :idempotency_key
|
|
38
|
+
|
|
39
|
+
sig { params(idempotency_key: String).void }
|
|
40
|
+
attr_writer :idempotency_key
|
|
41
|
+
|
|
42
|
+
sig { returns(T.nilable(String)) }
|
|
43
|
+
attr_reader :x_idempotency_expiration
|
|
44
|
+
|
|
45
|
+
sig { params(x_idempotency_expiration: String).void }
|
|
46
|
+
attr_writer :x_idempotency_expiration
|
|
47
|
+
|
|
36
48
|
sig do
|
|
37
49
|
params(
|
|
38
50
|
template_id: String,
|
|
@@ -41,6 +53,8 @@ module Courier
|
|
|
41
53
|
data: T.nilable(T::Hash[Symbol, T.anything]),
|
|
42
54
|
profile: T.nilable(T::Hash[Symbol, T.anything]),
|
|
43
55
|
template: T.nilable(String),
|
|
56
|
+
idempotency_key: String,
|
|
57
|
+
x_idempotency_expiration: String,
|
|
44
58
|
request_options: Courier::RequestOptions::OrHash
|
|
45
59
|
).returns(T.attached_class)
|
|
46
60
|
end
|
|
@@ -51,6 +65,8 @@ module Courier
|
|
|
51
65
|
data: nil,
|
|
52
66
|
profile: nil,
|
|
53
67
|
template: nil,
|
|
68
|
+
idempotency_key: nil,
|
|
69
|
+
x_idempotency_expiration: nil,
|
|
54
70
|
request_options: {}
|
|
55
71
|
)
|
|
56
72
|
end
|
|
@@ -64,6 +80,8 @@ module Courier
|
|
|
64
80
|
data: T.nilable(T::Hash[Symbol, T.anything]),
|
|
65
81
|
profile: T.nilable(T::Hash[Symbol, T.anything]),
|
|
66
82
|
template: T.nilable(String),
|
|
83
|
+
idempotency_key: String,
|
|
84
|
+
x_idempotency_expiration: String,
|
|
67
85
|
request_options: Courier::RequestOptions
|
|
68
86
|
}
|
|
69
87
|
)
|
|
@@ -29,12 +29,26 @@ module Courier
|
|
|
29
29
|
sig { params(snippets: T.nilable(Courier::BrandSnippets::OrHash)).void }
|
|
30
30
|
attr_writer :snippets
|
|
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
|
name: String,
|
|
35
47
|
settings: Courier::BrandSettings::OrHash,
|
|
36
48
|
id: T.nilable(String),
|
|
37
49
|
snippets: T.nilable(Courier::BrandSnippets::OrHash),
|
|
50
|
+
idempotency_key: String,
|
|
51
|
+
x_idempotency_expiration: String,
|
|
38
52
|
request_options: Courier::RequestOptions::OrHash
|
|
39
53
|
).returns(T.attached_class)
|
|
40
54
|
end
|
|
@@ -43,6 +57,8 @@ module Courier
|
|
|
43
57
|
settings:,
|
|
44
58
|
id: nil,
|
|
45
59
|
snippets: nil,
|
|
60
|
+
idempotency_key: nil,
|
|
61
|
+
x_idempotency_expiration: nil,
|
|
46
62
|
request_options: {}
|
|
47
63
|
)
|
|
48
64
|
end
|
|
@@ -54,6 +70,8 @@ module Courier
|
|
|
54
70
|
settings: Courier::BrandSettings,
|
|
55
71
|
id: T.nilable(String),
|
|
56
72
|
snippets: T.nilable(Courier::BrandSnippets),
|
|
73
|
+
idempotency_key: String,
|
|
74
|
+
x_idempotency_expiration: String,
|
|
57
75
|
request_options: Courier::RequestOptions
|
|
58
76
|
}
|
|
59
77
|
)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
module Inbox
|
|
6
|
+
class MessageDeleteParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Courier::Inbox::MessageDeleteParams,
|
|
14
|
+
Courier::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :message_id
|
|
20
|
+
|
|
21
|
+
sig do
|
|
22
|
+
params(
|
|
23
|
+
message_id: String,
|
|
24
|
+
request_options: Courier::RequestOptions::OrHash
|
|
25
|
+
).returns(T.attached_class)
|
|
26
|
+
end
|
|
27
|
+
def self.new(message_id:, request_options: {})
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
sig do
|
|
31
|
+
override.returns(
|
|
32
|
+
{ message_id: String, request_options: Courier::RequestOptions }
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
def to_hash
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
module Inbox
|
|
6
|
+
class MessageRestoreParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Courier::Inbox::MessageRestoreParams,
|
|
14
|
+
Courier::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :message_id
|
|
20
|
+
|
|
21
|
+
sig do
|
|
22
|
+
params(
|
|
23
|
+
message_id: String,
|
|
24
|
+
request_options: Courier::RequestOptions::OrHash
|
|
25
|
+
).returns(T.attached_class)
|
|
26
|
+
end
|
|
27
|
+
def self.new(message_id:, request_options: {})
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
sig do
|
|
31
|
+
override.returns(
|
|
32
|
+
{ message_id: String, request_options: Courier::RequestOptions }
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
def to_hash
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -11,15 +11,41 @@ module Courier
|
|
|
11
11
|
T.any(Courier::JourneyCancelParams, 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
|
|
@@ -11,15 +11,41 @@ module Courier
|
|
|
11
11
|
T.any(Courier::JourneyCreateParams, 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 :template_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
|
template_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
|
+
template_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
|
+
template_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
|
|
@@ -14,18 +14,42 @@ module Courier
|
|
|
14
14
|
sig { returns(String) }
|
|
15
15
|
attr_accessor :template_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
|
template_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
|
+
template_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
|
+
template_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
|
|
@@ -18,18 +18,42 @@ module Courier
|
|
|
18
18
|
sig { returns(String) }
|
|
19
19
|
attr_accessor :template_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
|
template_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
|
+
template_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
|
+
template_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
|
|
@@ -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
|
)
|