trycourier 6.11.2 → 6.12.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 +21 -0
- data/README.md +1 -1
- data/lib/courier/models/journey_ai_node.rb +6 -1
- data/lib/courier/models/notification_template_email.rb +50 -0
- data/lib/courier/models/notification_template_payload.rb +20 -1
- data/lib/courier/models/provider.rb +8 -2
- data/lib/courier/models/provider_create_params.rb +11 -1
- data/lib/courier/models/provider_patch_params.rb +61 -0
- data/lib/courier/models/provider_update_params.rb +10 -1
- data/lib/courier/models.rb +4 -0
- data/lib/courier/resources/providers.rb +35 -0
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +2 -0
- data/rbi/courier/models/journey_ai_node.rbi +10 -0
- data/rbi/courier/models/notification_template_email.rbi +82 -0
- data/rbi/courier/models/notification_template_payload.rbi +34 -3
- data/rbi/courier/models/provider.rbi +8 -2
- data/rbi/courier/models/provider_create_params.rbi +22 -2
- data/rbi/courier/models/provider_patch_params.rbi +92 -0
- data/rbi/courier/models/provider_update_params.rbi +20 -2
- data/rbi/courier/models.rbi +4 -0
- data/rbi/courier/resources/providers.rbi +54 -2
- data/sig/courier/models/notification_template_email.rbs +43 -0
- data/sig/courier/models/notification_template_payload.rbs +8 -3
- data/sig/courier/models/provider_patch_params.rbs +52 -0
- data/sig/courier/models.rbs +4 -0
- data/sig/courier/resources/providers.rbs +9 -0
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 26943393679593de932be9962339164bdfdd09c63642b7d27a6f38ee061c8bfd
|
|
4
|
+
data.tar.gz: b8ddcc3c806c9ffa4246f53f8dd533a284214be239995b02acd7b1be6c2cbb36
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b80eb41483e2b7f9d19780b0468709eed4c1ed590264cec819ef26ad25cdae82a82674551d83b404de8876b30e73671bcc649ac03729a867b1231b7dc8c30d10
|
|
7
|
+
data.tar.gz: f3659cecd8aca744f5d4e4b5831bbc64fd44b65f86f379a5e261d12245f4ba51e624b600ced5f69433890c89a30bdb9a1b9b1645ac217f43cb3e73d559c5f844
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [6.12.0](https://github.com/trycourier/courier-ruby/compare/v6.11.3...v6.12.0) (2026-10-21)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **api:** add PATCH /providers/{id} for partial provider updates [C-21790] ([#177](https://github.com/trycourier/courier-ruby/issues/177)) ([caf13e0](https://github.com/trycourier/courier-ruby/commit/caf13e064a109dc25acafab3b780f4410e141292))
|
|
9
|
+
* **api:** expose email From, Reply-to, CC and BCC on notification templates [C-21709] ([#176](https://github.com/trycourier/courier-ruby/issues/176)) ([47e58ba](https://github.com/trycourier/courier-ruby/commit/47e58baa17aa96893a9f78ca59b67954a3644c6b))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Documentation
|
|
13
|
+
|
|
14
|
+
* **api:** describe the AI node model constraint [C-21614] ([#173](https://github.com/trycourier/courier-ruby/issues/173)) ([bf4895f](https://github.com/trycourier/courier-ruby/commit/bf4895fd98558354eadbd01128e53dc32bc9c2a4))
|
|
15
|
+
* **api:** document provider settings.rate_limit [C-21732] ([#175](https://github.com/trycourier/courier-ruby/issues/175)) ([d7b4ff9](https://github.com/trycourier/courier-ruby/commit/d7b4ff9f3e8d533d3d4e452d8f080cbb5f4b4823))
|
|
16
|
+
|
|
17
|
+
## [6.11.3](https://github.com/trycourier/courier-ruby/compare/v6.11.2...v6.11.3) (2026-09-30)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Documentation
|
|
21
|
+
|
|
22
|
+
* **api:** remove the plan gate from the bulk preferences replace errors [C-21256] ([#171](https://github.com/trycourier/courier-ruby/issues/171)) ([f2b3213](https://github.com/trycourier/courier-ruby/commit/f2b3213389e70c2acd6eaa1e0930595740fa9860))
|
|
23
|
+
|
|
3
24
|
## [6.11.2](https://github.com/trycourier/courier-ruby/compare/v6.11.1...v6.11.2) (2026-09-24)
|
|
4
25
|
|
|
5
26
|
|
data/README.md
CHANGED
|
@@ -28,6 +28,11 @@ module Courier
|
|
|
28
28
|
optional :conditions, union: -> { Courier::JourneyConditionsField }
|
|
29
29
|
|
|
30
30
|
# @!attribute model
|
|
31
|
+
# A supported AI model id. Requests with an unknown id may be rejected with a 400
|
|
32
|
+
# that lists the supported ids. Supported ids: `claude-fable-5-1`,
|
|
33
|
+
# `claude-opus-5-5`, `claude-sonnet-5-5`, `claude-haiku-5-5`, `gpt-6-astra`,
|
|
34
|
+
# `gpt-5.5`, `gpt-5.4`, `gpt-6.1-sol`, `gpt-5.4-mini`, `gpt-5.4-nano`,
|
|
35
|
+
# `gpt-6-luna`.
|
|
31
36
|
#
|
|
32
37
|
# @return [String, nil]
|
|
33
38
|
optional :model, String
|
|
@@ -57,7 +62,7 @@ module Courier
|
|
|
57
62
|
#
|
|
58
63
|
# @param conditions [Array<String>, Courier::Models::JourneyConditionGroup, Courier::Models::JourneyConditionNestedGroup] Condition spec for a journey node. Accepts a single condition atom, an AND/OR gr
|
|
59
64
|
#
|
|
60
|
-
# @param model [String]
|
|
65
|
+
# @param model [String] A supported AI model id. Requests with an unknown id may be rejected with a 400
|
|
61
66
|
#
|
|
62
67
|
# @param user_prompt [String]
|
|
63
68
|
#
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class NotificationTemplateEmail < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute bcc
|
|
7
|
+
# BCC addresses.
|
|
8
|
+
#
|
|
9
|
+
# @return [Array<String>, nil]
|
|
10
|
+
optional :bcc, Courier::Internal::Type::ArrayOf[String]
|
|
11
|
+
|
|
12
|
+
# @!attribute cc
|
|
13
|
+
# CC addresses.
|
|
14
|
+
#
|
|
15
|
+
# @return [Array<String>, nil]
|
|
16
|
+
optional :cc, Courier::Internal::Type::ArrayOf[String]
|
|
17
|
+
|
|
18
|
+
# @!attribute from
|
|
19
|
+
# The From address.
|
|
20
|
+
#
|
|
21
|
+
# @return [String, nil]
|
|
22
|
+
optional :from, String
|
|
23
|
+
|
|
24
|
+
# @!attribute reply_to
|
|
25
|
+
# The Reply-to address.
|
|
26
|
+
#
|
|
27
|
+
# @return [String, nil]
|
|
28
|
+
optional :reply_to, String
|
|
29
|
+
|
|
30
|
+
# @!method initialize(bcc: nil, cc: nil, from: nil, reply_to: nil)
|
|
31
|
+
# Email header fields for the template's email channel: the From, Reply-to, CC and
|
|
32
|
+
# BCC values set in the Studio email channel settings. Each value may use template
|
|
33
|
+
# variables, such as `{{data.cc}}`, which are resolved at send time. Reads omit
|
|
34
|
+
# `email` when no header is set, and omit each unset field. Writes treat it as
|
|
35
|
+
# optional, with three meanings. Omit it to keep the stored headers. Send null to
|
|
36
|
+
# clear all four. Send an object to replace all four: a field the object leaves
|
|
37
|
+
# out is cleared. Other email channel settings, such as the subject, are kept
|
|
38
|
+
# either way. Headers only apply while `content` has an email channel; with no
|
|
39
|
+
# email channel they are not stored.
|
|
40
|
+
#
|
|
41
|
+
# @param bcc [Array<String>] BCC addresses.
|
|
42
|
+
#
|
|
43
|
+
# @param cc [Array<String>] CC addresses.
|
|
44
|
+
#
|
|
45
|
+
# @param from [String] The From address.
|
|
46
|
+
#
|
|
47
|
+
# @param reply_to [String] The Reply-to address.
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -39,7 +39,24 @@ module Courier
|
|
|
39
39
|
# @return [Array<String>]
|
|
40
40
|
required :tags, Courier::Internal::Type::ArrayOf[String]
|
|
41
41
|
|
|
42
|
-
# @!
|
|
42
|
+
# @!attribute email
|
|
43
|
+
# Email header fields for the template's email channel: the From, Reply-to, CC and
|
|
44
|
+
# BCC values set in the Studio email channel settings. Each value may use template
|
|
45
|
+
# variables, such as `{{data.cc}}`, which are resolved at send time. Reads omit
|
|
46
|
+
# `email` when no header is set, and omit each unset field. Writes treat it as
|
|
47
|
+
# optional, with three meanings. Omit it to keep the stored headers. Send null to
|
|
48
|
+
# clear all four. Send an object to replace all four: a field the object leaves
|
|
49
|
+
# out is cleared. Other email channel settings, such as the subject, are kept
|
|
50
|
+
# either way. Headers only apply while `content` has an email channel; with no
|
|
51
|
+
# email channel they are not stored.
|
|
52
|
+
#
|
|
53
|
+
# @return [Courier::Models::NotificationTemplateEmail, nil]
|
|
54
|
+
optional :email, -> { Courier::NotificationTemplateEmail }, nil?: true
|
|
55
|
+
|
|
56
|
+
# @!method initialize(brand:, content:, name:, routing:, subscription:, tags:, email: nil)
|
|
57
|
+
# Some parameter documentations has been truncated, see
|
|
58
|
+
# {Courier::Models::NotificationTemplatePayload} for more details.
|
|
59
|
+
#
|
|
43
60
|
# Core template fields used in POST and PUT request bodies (nested under a
|
|
44
61
|
# `notification` key) and returned at the top level in responses.
|
|
45
62
|
#
|
|
@@ -54,6 +71,8 @@ module Courier
|
|
|
54
71
|
# @param subscription [Courier::Models::NotificationTemplatePayload::Subscription, nil] Subscription topic reference, or null for none.
|
|
55
72
|
#
|
|
56
73
|
# @param tags [Array<String>] Tags for categorization. Send empty array for none.
|
|
74
|
+
#
|
|
75
|
+
# @param email [Courier::Models::NotificationTemplateEmail, nil] Email header fields for the template's email channel: the From, Reply-to, CC and
|
|
57
76
|
|
|
58
77
|
# @see Courier::Models::NotificationTemplatePayload#brand
|
|
59
78
|
class Brand < Courier::Internal::Type::BaseModel
|
|
@@ -23,7 +23,10 @@ module Courier
|
|
|
23
23
|
required :provider, String
|
|
24
24
|
|
|
25
25
|
# @!attribute settings
|
|
26
|
-
# Provider-specific settings (snake_case keys on the wire).
|
|
26
|
+
# Provider-specific settings (snake_case keys on the wire). `rate_limit` is this
|
|
27
|
+
# configuration's send rate limit,
|
|
28
|
+
# `{ "rate": number, "period": "second" | "minute" | "hour" }`, or null for no
|
|
29
|
+
# limit.
|
|
27
30
|
#
|
|
28
31
|
# @return [Hash{Symbol=>Object}]
|
|
29
32
|
required :settings, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown]
|
|
@@ -47,6 +50,9 @@ module Courier
|
|
|
47
50
|
optional :updated, Integer, nil?: true
|
|
48
51
|
|
|
49
52
|
# @!method initialize(id:, created:, provider:, settings:, title:, alias_: nil, updated: nil)
|
|
53
|
+
# Some parameter documentations has been truncated, see
|
|
54
|
+
# {Courier::Models::Provider} for more details.
|
|
55
|
+
#
|
|
50
56
|
# A configured provider in the workspace.
|
|
51
57
|
#
|
|
52
58
|
# @param id [String] A unique identifier for the provider configuration.
|
|
@@ -55,7 +61,7 @@ module Courier
|
|
|
55
61
|
#
|
|
56
62
|
# @param provider [String] The provider key (e.g. "sendgrid", "twilio", "slack").
|
|
57
63
|
#
|
|
58
|
-
# @param settings [Hash{Symbol=>Object}] Provider-specific settings (snake_case keys on the wire).
|
|
64
|
+
# @param settings [Hash{Symbol=>Object}] Provider-specific settings (snake_case keys on the wire). `rate_limit` is this c
|
|
59
65
|
#
|
|
60
66
|
# @param title [String] Display title. Defaults to "Default Configuration" when not explicitly set.
|
|
61
67
|
#
|
|
@@ -23,7 +23,17 @@ module Courier
|
|
|
23
23
|
# @!attribute settings
|
|
24
24
|
# Provider-specific settings (snake_case keys). Defaults to an empty object when
|
|
25
25
|
# omitted. Use the catalog endpoint to discover required fields for a given
|
|
26
|
-
# provider — omitting a required field returns a 400 validation error.
|
|
26
|
+
# provider — omitting a required field returns a 400 validation error. Set
|
|
27
|
+
# `rate_limit` to cap this configuration's send rate:
|
|
28
|
+
# `{ "rate": <number greater than 0>, "period": "second" | "minute" | "hour" }`,
|
|
29
|
+
# e.g. `{ "rate": 0.5, "period": "minute" }` for one send every 2 minutes. The
|
|
30
|
+
# interval between sends (`period` divided by `rate`) must be from 1 millisecond
|
|
31
|
+
# to 12 hours, otherwise the request returns a 400 `InvalidRateLimit` error. The
|
|
32
|
+
# limit applies per configuration and per environment (a test-environment
|
|
33
|
+
# configuration has its own limit). Sends above the rate are queued, not dropped,
|
|
34
|
+
# and changes take up to 60 seconds to apply. It has no effect on observability or
|
|
35
|
+
# CDP integrations, which do not send messages. Omit it or set it to null for no
|
|
36
|
+
# limit.
|
|
27
37
|
#
|
|
28
38
|
# @return [Hash{Symbol=>Object}, nil]
|
|
29
39
|
optional :settings, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown]
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::Providers#patch
|
|
6
|
+
class ProviderPatchParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :id, String
|
|
14
|
+
|
|
15
|
+
# @!attribute alias_
|
|
16
|
+
# Updated alias. Set to null to clear it.
|
|
17
|
+
#
|
|
18
|
+
# @return [String, nil]
|
|
19
|
+
optional :alias_, String, api_name: :alias, nil?: true
|
|
20
|
+
|
|
21
|
+
# @!attribute provider
|
|
22
|
+
# The provider key identifying the type. Optional. When sent, it must match the
|
|
23
|
+
# stored provider, otherwise the request returns a 400.
|
|
24
|
+
#
|
|
25
|
+
# @return [String, nil]
|
|
26
|
+
optional :provider, String
|
|
27
|
+
|
|
28
|
+
# @!attribute settings
|
|
29
|
+
# Provider-specific settings (snake_case keys) to merge into the stored settings,
|
|
30
|
+
# using JSON Merge Patch (RFC 7396). Each key you send replaces the stored value,
|
|
31
|
+
# a key set to null is removed, nested objects merge recursively, and arrays
|
|
32
|
+
# replace the stored value. Keys you omit keep their stored values. Set
|
|
33
|
+
# `rate_limit` to null to remove this configuration's send rate limit.
|
|
34
|
+
#
|
|
35
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
36
|
+
optional :settings, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown]
|
|
37
|
+
|
|
38
|
+
# @!attribute title
|
|
39
|
+
# Updated display title.
|
|
40
|
+
#
|
|
41
|
+
# @return [String, nil]
|
|
42
|
+
optional :title, String
|
|
43
|
+
|
|
44
|
+
# @!method initialize(id:, alias_: nil, provider: nil, settings: nil, title: nil, request_options: {})
|
|
45
|
+
# Some parameter documentations has been truncated, see
|
|
46
|
+
# {Courier::Models::ProviderPatchParams} for more details.
|
|
47
|
+
#
|
|
48
|
+
# @param id [String]
|
|
49
|
+
#
|
|
50
|
+
# @param alias_ [String, nil] Updated alias. Set to null to clear it.
|
|
51
|
+
#
|
|
52
|
+
# @param provider [String] The provider key identifying the type. Optional. When sent, it must match the st
|
|
53
|
+
#
|
|
54
|
+
# @param settings [Hash{Symbol=>Object}] Provider-specific settings (snake_case keys) to merge into the stored settings,
|
|
55
|
+
#
|
|
56
|
+
# @param title [String] Updated display title.
|
|
57
|
+
#
|
|
58
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
@@ -28,7 +28,16 @@ module Courier
|
|
|
28
28
|
# @!attribute settings
|
|
29
29
|
# Provider-specific settings (snake_case keys). Replaces the full settings object
|
|
30
30
|
# — omitted settings fields are removed. Use the catalog endpoint to check
|
|
31
|
-
# required fields.
|
|
31
|
+
# required fields. Set `rate_limit` to cap this configuration's send rate:
|
|
32
|
+
# `{ "rate": <number greater than 0>, "period": "second" | "minute" | "hour" }`,
|
|
33
|
+
# e.g. `{ "rate": 0.5, "period": "minute" }` for one send every 2 minutes. The
|
|
34
|
+
# interval between sends (`period` divided by `rate`) must be from 1 millisecond
|
|
35
|
+
# to 12 hours, otherwise the request returns a 400 `InvalidRateLimit` error. The
|
|
36
|
+
# limit applies per configuration and per environment (a test-environment
|
|
37
|
+
# configuration has its own limit). Sends above the rate are queued, not dropped,
|
|
38
|
+
# and changes take up to 60 seconds to apply. It has no effect on observability or
|
|
39
|
+
# CDP integrations, which do not send messages. Omitting `rate_limit` or setting
|
|
40
|
+
# it to null removes any existing limit, including one set in Studio.
|
|
32
41
|
#
|
|
33
42
|
# @return [Hash{Symbol=>Object}, nil]
|
|
34
43
|
optional :settings, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown]
|
data/lib/courier/models.rb
CHANGED
|
@@ -495,6 +495,8 @@ module Courier
|
|
|
495
495
|
|
|
496
496
|
NotificationTemplateCreateRequest = Courier::Models::NotificationTemplateCreateRequest
|
|
497
497
|
|
|
498
|
+
NotificationTemplateEmail = Courier::Models::NotificationTemplateEmail
|
|
499
|
+
|
|
498
500
|
NotificationTemplatePayload = Courier::Models::NotificationTemplatePayload
|
|
499
501
|
|
|
500
502
|
NotificationTemplatePublishRequest = Courier::Models::NotificationTemplatePublishRequest
|
|
@@ -567,6 +569,8 @@ module Courier
|
|
|
567
569
|
|
|
568
570
|
ProviderListParams = Courier::Models::ProviderListParams
|
|
569
571
|
|
|
572
|
+
ProviderPatchParams = Courier::Models::ProviderPatchParams
|
|
573
|
+
|
|
570
574
|
ProviderRetrieveParams = Courier::Models::ProviderRetrieveParams
|
|
571
575
|
|
|
572
576
|
Providers = Courier::Models::Providers
|
|
@@ -149,6 +149,41 @@ module Courier
|
|
|
149
149
|
)
|
|
150
150
|
end
|
|
151
151
|
|
|
152
|
+
# Some parameter documentations has been truncated, see
|
|
153
|
+
# {Courier::Models::ProviderPatchParams} for more details.
|
|
154
|
+
#
|
|
155
|
+
# Updates part of a provider's configuration and keeps every field you omit.
|
|
156
|
+
# Settings merge into the stored settings key by key, and a setting sent as null
|
|
157
|
+
# is removed.
|
|
158
|
+
#
|
|
159
|
+
# @overload patch(id, alias_: nil, provider: nil, settings: nil, title: nil, request_options: {})
|
|
160
|
+
#
|
|
161
|
+
# @param id [String] A unique identifier of the provider configuration to update.
|
|
162
|
+
#
|
|
163
|
+
# @param alias_ [String, nil] Updated alias. Set to null to clear it.
|
|
164
|
+
#
|
|
165
|
+
# @param provider [String] The provider key identifying the type. Optional. When sent, it must match the st
|
|
166
|
+
#
|
|
167
|
+
# @param settings [Hash{Symbol=>Object}] Provider-specific settings (snake_case keys) to merge into the stored settings,
|
|
168
|
+
#
|
|
169
|
+
# @param title [String] Updated display title.
|
|
170
|
+
#
|
|
171
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
172
|
+
#
|
|
173
|
+
# @return [Courier::Models::Provider]
|
|
174
|
+
#
|
|
175
|
+
# @see Courier::Models::ProviderPatchParams
|
|
176
|
+
def patch(id, params = {})
|
|
177
|
+
parsed, options = Courier::ProviderPatchParams.dump_request(params)
|
|
178
|
+
@client.request(
|
|
179
|
+
method: :patch,
|
|
180
|
+
path: ["providers/%1$s", id],
|
|
181
|
+
body: parsed,
|
|
182
|
+
model: Courier::Provider,
|
|
183
|
+
options: options
|
|
184
|
+
)
|
|
185
|
+
end
|
|
186
|
+
|
|
152
187
|
# @api private
|
|
153
188
|
#
|
|
154
189
|
# @param client [Courier::Client]
|
data/lib/courier/version.rb
CHANGED
data/lib/courier.rb
CHANGED
|
@@ -348,6 +348,7 @@ require_relative "courier/models/notifications/previews/run_create_params"
|
|
|
348
348
|
require_relative "courier/models/notifications/previews/run_list_params"
|
|
349
349
|
require_relative "courier/models/notifications/previews/run_retrieve_params"
|
|
350
350
|
require_relative "courier/models/notification_template_alias"
|
|
351
|
+
require_relative "courier/models/notification_template_email"
|
|
351
352
|
require_relative "courier/models/notification_template_response"
|
|
352
353
|
require_relative "courier/models/notification_template_state"
|
|
353
354
|
require_relative "courier/models/notification_template_summary"
|
|
@@ -389,6 +390,7 @@ require_relative "courier/models/provider_create_params"
|
|
|
389
390
|
require_relative "courier/models/provider_delete_params"
|
|
390
391
|
require_relative "courier/models/provider_list_params"
|
|
391
392
|
require_relative "courier/models/provider_list_response"
|
|
393
|
+
require_relative "courier/models/provider_patch_params"
|
|
392
394
|
require_relative "courier/models/provider_retrieve_params"
|
|
393
395
|
require_relative "courier/models/providers/catalog_list_params"
|
|
394
396
|
require_relative "courier/models/providers/catalog_list_response"
|
|
@@ -49,6 +49,11 @@ module Courier
|
|
|
49
49
|
end
|
|
50
50
|
attr_writer :conditions
|
|
51
51
|
|
|
52
|
+
# A supported AI model id. Requests with an unknown id may be rejected with a 400
|
|
53
|
+
# that lists the supported ids. Supported ids: `claude-fable-5-1`,
|
|
54
|
+
# `claude-opus-5-5`, `claude-sonnet-5-5`, `claude-haiku-5-5`, `gpt-6-astra`,
|
|
55
|
+
# `gpt-5.5`, `gpt-5.4`, `gpt-6.1-sol`, `gpt-5.4-mini`, `gpt-5.4-nano`,
|
|
56
|
+
# `gpt-6-luna`.
|
|
52
57
|
sig { returns(T.nilable(String)) }
|
|
53
58
|
attr_reader :model
|
|
54
59
|
|
|
@@ -94,6 +99,11 @@ module Courier
|
|
|
94
99
|
# group, or an AND/OR nested group. Omit the `conditions` property entirely to
|
|
95
100
|
# express "no conditions".
|
|
96
101
|
conditions: nil,
|
|
102
|
+
# A supported AI model id. Requests with an unknown id may be rejected with a 400
|
|
103
|
+
# that lists the supported ids. Supported ids: `claude-fable-5-1`,
|
|
104
|
+
# `claude-opus-5-5`, `claude-sonnet-5-5`, `claude-haiku-5-5`, `gpt-6-astra`,
|
|
105
|
+
# `gpt-5.5`, `gpt-5.4`, `gpt-6.1-sol`, `gpt-5.4-mini`, `gpt-5.4-nano`,
|
|
106
|
+
# `gpt-6-luna`.
|
|
97
107
|
model: nil,
|
|
98
108
|
user_prompt: nil,
|
|
99
109
|
web_search: nil
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class NotificationTemplateEmail < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Courier::NotificationTemplateEmail, Courier::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# BCC addresses.
|
|
12
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
13
|
+
attr_reader :bcc
|
|
14
|
+
|
|
15
|
+
sig { params(bcc: T::Array[String]).void }
|
|
16
|
+
attr_writer :bcc
|
|
17
|
+
|
|
18
|
+
# CC addresses.
|
|
19
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
20
|
+
attr_reader :cc
|
|
21
|
+
|
|
22
|
+
sig { params(cc: T::Array[String]).void }
|
|
23
|
+
attr_writer :cc
|
|
24
|
+
|
|
25
|
+
# The From address.
|
|
26
|
+
sig { returns(T.nilable(String)) }
|
|
27
|
+
attr_reader :from
|
|
28
|
+
|
|
29
|
+
sig { params(from: String).void }
|
|
30
|
+
attr_writer :from
|
|
31
|
+
|
|
32
|
+
# The Reply-to address.
|
|
33
|
+
sig { returns(T.nilable(String)) }
|
|
34
|
+
attr_reader :reply_to
|
|
35
|
+
|
|
36
|
+
sig { params(reply_to: String).void }
|
|
37
|
+
attr_writer :reply_to
|
|
38
|
+
|
|
39
|
+
# Email header fields for the template's email channel: the From, Reply-to, CC and
|
|
40
|
+
# BCC values set in the Studio email channel settings. Each value may use template
|
|
41
|
+
# variables, such as `{{data.cc}}`, which are resolved at send time. Reads omit
|
|
42
|
+
# `email` when no header is set, and omit each unset field. Writes treat it as
|
|
43
|
+
# optional, with three meanings. Omit it to keep the stored headers. Send null to
|
|
44
|
+
# clear all four. Send an object to replace all four: a field the object leaves
|
|
45
|
+
# out is cleared. Other email channel settings, such as the subject, are kept
|
|
46
|
+
# either way. Headers only apply while `content` has an email channel; with no
|
|
47
|
+
# email channel they are not stored.
|
|
48
|
+
sig do
|
|
49
|
+
params(
|
|
50
|
+
bcc: T::Array[String],
|
|
51
|
+
cc: T::Array[String],
|
|
52
|
+
from: String,
|
|
53
|
+
reply_to: String
|
|
54
|
+
).returns(T.attached_class)
|
|
55
|
+
end
|
|
56
|
+
def self.new(
|
|
57
|
+
# BCC addresses.
|
|
58
|
+
bcc: nil,
|
|
59
|
+
# CC addresses.
|
|
60
|
+
cc: nil,
|
|
61
|
+
# The From address.
|
|
62
|
+
from: nil,
|
|
63
|
+
# The Reply-to address.
|
|
64
|
+
reply_to: nil
|
|
65
|
+
)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
sig do
|
|
69
|
+
override.returns(
|
|
70
|
+
{
|
|
71
|
+
bcc: T::Array[String],
|
|
72
|
+
cc: T::Array[String],
|
|
73
|
+
from: String,
|
|
74
|
+
reply_to: String
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
end
|
|
78
|
+
def to_hash
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
@@ -65,6 +65,25 @@ module Courier
|
|
|
65
65
|
sig { returns(T::Array[String]) }
|
|
66
66
|
attr_accessor :tags
|
|
67
67
|
|
|
68
|
+
# Email header fields for the template's email channel: the From, Reply-to, CC and
|
|
69
|
+
# BCC values set in the Studio email channel settings. Each value may use template
|
|
70
|
+
# variables, such as `{{data.cc}}`, which are resolved at send time. Reads omit
|
|
71
|
+
# `email` when no header is set, and omit each unset field. Writes treat it as
|
|
72
|
+
# optional, with three meanings. Omit it to keep the stored headers. Send null to
|
|
73
|
+
# clear all four. Send an object to replace all four: a field the object leaves
|
|
74
|
+
# out is cleared. Other email channel settings, such as the subject, are kept
|
|
75
|
+
# either way. Headers only apply while `content` has an email channel; with no
|
|
76
|
+
# email channel they are not stored.
|
|
77
|
+
sig { returns(T.nilable(Courier::NotificationTemplateEmail)) }
|
|
78
|
+
attr_reader :email
|
|
79
|
+
|
|
80
|
+
sig do
|
|
81
|
+
params(
|
|
82
|
+
email: T.nilable(Courier::NotificationTemplateEmail::OrHash)
|
|
83
|
+
).void
|
|
84
|
+
end
|
|
85
|
+
attr_writer :email
|
|
86
|
+
|
|
68
87
|
# Core template fields used in POST and PUT request bodies (nested under a
|
|
69
88
|
# `notification` key) and returned at the top level in responses.
|
|
70
89
|
sig do
|
|
@@ -78,7 +97,8 @@ module Courier
|
|
|
78
97
|
T.nilable(
|
|
79
98
|
Courier::NotificationTemplatePayload::Subscription::OrHash
|
|
80
99
|
),
|
|
81
|
-
tags: T::Array[String]
|
|
100
|
+
tags: T::Array[String],
|
|
101
|
+
email: T.nilable(Courier::NotificationTemplateEmail::OrHash)
|
|
82
102
|
).returns(T.attached_class)
|
|
83
103
|
end
|
|
84
104
|
def self.new(
|
|
@@ -93,7 +113,17 @@ module Courier
|
|
|
93
113
|
# Subscription topic reference, or null for none.
|
|
94
114
|
subscription:,
|
|
95
115
|
# Tags for categorization. Send empty array for none.
|
|
96
|
-
tags
|
|
116
|
+
tags:,
|
|
117
|
+
# Email header fields for the template's email channel: the From, Reply-to, CC and
|
|
118
|
+
# BCC values set in the Studio email channel settings. Each value may use template
|
|
119
|
+
# variables, such as `{{data.cc}}`, which are resolved at send time. Reads omit
|
|
120
|
+
# `email` when no header is set, and omit each unset field. Writes treat it as
|
|
121
|
+
# optional, with three meanings. Omit it to keep the stored headers. Send null to
|
|
122
|
+
# clear all four. Send an object to replace all four: a field the object leaves
|
|
123
|
+
# out is cleared. Other email channel settings, such as the subject, are kept
|
|
124
|
+
# either way. Headers only apply while `content` has an email channel; with no
|
|
125
|
+
# email channel they are not stored.
|
|
126
|
+
email: nil
|
|
97
127
|
)
|
|
98
128
|
end
|
|
99
129
|
|
|
@@ -106,7 +136,8 @@ module Courier
|
|
|
106
136
|
routing: T.nilable(Courier::NotificationTemplatePayload::Routing),
|
|
107
137
|
subscription:
|
|
108
138
|
T.nilable(Courier::NotificationTemplatePayload::Subscription),
|
|
109
|
-
tags: T::Array[String]
|
|
139
|
+
tags: T::Array[String],
|
|
140
|
+
email: T.nilable(Courier::NotificationTemplateEmail)
|
|
110
141
|
}
|
|
111
142
|
)
|
|
112
143
|
end
|
|
@@ -18,7 +18,10 @@ module Courier
|
|
|
18
18
|
sig { returns(String) }
|
|
19
19
|
attr_accessor :provider
|
|
20
20
|
|
|
21
|
-
# Provider-specific settings (snake_case keys on the wire).
|
|
21
|
+
# Provider-specific settings (snake_case keys on the wire). `rate_limit` is this
|
|
22
|
+
# configuration's send rate limit,
|
|
23
|
+
# `{ "rate": number, "period": "second" | "minute" | "hour" }`, or null for no
|
|
24
|
+
# limit.
|
|
22
25
|
sig { returns(T::Hash[Symbol, T.anything]) }
|
|
23
26
|
attr_accessor :settings
|
|
24
27
|
|
|
@@ -56,7 +59,10 @@ module Courier
|
|
|
56
59
|
created:,
|
|
57
60
|
# The provider key (e.g. "sendgrid", "twilio", "slack").
|
|
58
61
|
provider:,
|
|
59
|
-
# Provider-specific settings (snake_case keys on the wire).
|
|
62
|
+
# Provider-specific settings (snake_case keys on the wire). `rate_limit` is this
|
|
63
|
+
# configuration's send rate limit,
|
|
64
|
+
# `{ "rate": number, "period": "second" | "minute" | "hour" }`, or null for no
|
|
65
|
+
# limit.
|
|
60
66
|
settings:,
|
|
61
67
|
# Display title. Defaults to "Default Configuration" when not explicitly set.
|
|
62
68
|
title:,
|
|
@@ -25,7 +25,17 @@ module Courier
|
|
|
25
25
|
|
|
26
26
|
# Provider-specific settings (snake_case keys). Defaults to an empty object when
|
|
27
27
|
# omitted. Use the catalog endpoint to discover required fields for a given
|
|
28
|
-
# provider — omitting a required field returns a 400 validation error.
|
|
28
|
+
# provider — omitting a required field returns a 400 validation error. Set
|
|
29
|
+
# `rate_limit` to cap this configuration's send rate:
|
|
30
|
+
# `{ "rate": <number greater than 0>, "period": "second" | "minute" | "hour" }`,
|
|
31
|
+
# e.g. `{ "rate": 0.5, "period": "minute" }` for one send every 2 minutes. The
|
|
32
|
+
# interval between sends (`period` divided by `rate`) must be from 1 millisecond
|
|
33
|
+
# to 12 hours, otherwise the request returns a 400 `InvalidRateLimit` error. The
|
|
34
|
+
# limit applies per configuration and per environment (a test-environment
|
|
35
|
+
# configuration has its own limit). Sends above the rate are queued, not dropped,
|
|
36
|
+
# and changes take up to 60 seconds to apply. It has no effect on observability or
|
|
37
|
+
# CDP integrations, which do not send messages. Omit it or set it to null for no
|
|
38
|
+
# limit.
|
|
29
39
|
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
30
40
|
attr_reader :settings
|
|
31
41
|
|
|
@@ -70,7 +80,17 @@ module Courier
|
|
|
70
80
|
alias_: nil,
|
|
71
81
|
# Provider-specific settings (snake_case keys). Defaults to an empty object when
|
|
72
82
|
# omitted. Use the catalog endpoint to discover required fields for a given
|
|
73
|
-
# provider — omitting a required field returns a 400 validation error.
|
|
83
|
+
# provider — omitting a required field returns a 400 validation error. Set
|
|
84
|
+
# `rate_limit` to cap this configuration's send rate:
|
|
85
|
+
# `{ "rate": <number greater than 0>, "period": "second" | "minute" | "hour" }`,
|
|
86
|
+
# e.g. `{ "rate": 0.5, "period": "minute" }` for one send every 2 minutes. The
|
|
87
|
+
# interval between sends (`period` divided by `rate`) must be from 1 millisecond
|
|
88
|
+
# to 12 hours, otherwise the request returns a 400 `InvalidRateLimit` error. The
|
|
89
|
+
# limit applies per configuration and per environment (a test-environment
|
|
90
|
+
# configuration has its own limit). Sends above the rate are queued, not dropped,
|
|
91
|
+
# and changes take up to 60 seconds to apply. It has no effect on observability or
|
|
92
|
+
# CDP integrations, which do not send messages. Omit it or set it to null for no
|
|
93
|
+
# limit.
|
|
74
94
|
settings: nil,
|
|
75
95
|
# Optional display title. Omit to use "Default Configuration".
|
|
76
96
|
title: nil,
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class ProviderPatchParams < Courier::Internal::Type::BaseModel
|
|
6
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Courier::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(Courier::ProviderPatchParams, Courier::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :id
|
|
16
|
+
|
|
17
|
+
# Updated alias. Set to null to clear it.
|
|
18
|
+
sig { returns(T.nilable(String)) }
|
|
19
|
+
attr_accessor :alias_
|
|
20
|
+
|
|
21
|
+
# The provider key identifying the type. Optional. When sent, it must match the
|
|
22
|
+
# stored provider, otherwise the request returns a 400.
|
|
23
|
+
sig { returns(T.nilable(String)) }
|
|
24
|
+
attr_reader :provider
|
|
25
|
+
|
|
26
|
+
sig { params(provider: String).void }
|
|
27
|
+
attr_writer :provider
|
|
28
|
+
|
|
29
|
+
# Provider-specific settings (snake_case keys) to merge into the stored settings,
|
|
30
|
+
# using JSON Merge Patch (RFC 7396). Each key you send replaces the stored value,
|
|
31
|
+
# a key set to null is removed, nested objects merge recursively, and arrays
|
|
32
|
+
# replace the stored value. Keys you omit keep their stored values. Set
|
|
33
|
+
# `rate_limit` to null to remove this configuration's send rate limit.
|
|
34
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
35
|
+
attr_reader :settings
|
|
36
|
+
|
|
37
|
+
sig { params(settings: T::Hash[Symbol, T.anything]).void }
|
|
38
|
+
attr_writer :settings
|
|
39
|
+
|
|
40
|
+
# Updated display title.
|
|
41
|
+
sig { returns(T.nilable(String)) }
|
|
42
|
+
attr_reader :title
|
|
43
|
+
|
|
44
|
+
sig { params(title: String).void }
|
|
45
|
+
attr_writer :title
|
|
46
|
+
|
|
47
|
+
sig do
|
|
48
|
+
params(
|
|
49
|
+
id: String,
|
|
50
|
+
alias_: T.nilable(String),
|
|
51
|
+
provider: String,
|
|
52
|
+
settings: T::Hash[Symbol, T.anything],
|
|
53
|
+
title: String,
|
|
54
|
+
request_options: Courier::RequestOptions::OrHash
|
|
55
|
+
).returns(T.attached_class)
|
|
56
|
+
end
|
|
57
|
+
def self.new(
|
|
58
|
+
id:,
|
|
59
|
+
# Updated alias. Set to null to clear it.
|
|
60
|
+
alias_: nil,
|
|
61
|
+
# The provider key identifying the type. Optional. When sent, it must match the
|
|
62
|
+
# stored provider, otherwise the request returns a 400.
|
|
63
|
+
provider: nil,
|
|
64
|
+
# Provider-specific settings (snake_case keys) to merge into the stored settings,
|
|
65
|
+
# using JSON Merge Patch (RFC 7396). Each key you send replaces the stored value,
|
|
66
|
+
# a key set to null is removed, nested objects merge recursively, and arrays
|
|
67
|
+
# replace the stored value. Keys you omit keep their stored values. Set
|
|
68
|
+
# `rate_limit` to null to remove this configuration's send rate limit.
|
|
69
|
+
settings: nil,
|
|
70
|
+
# Updated display title.
|
|
71
|
+
title: nil,
|
|
72
|
+
request_options: {}
|
|
73
|
+
)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
sig do
|
|
77
|
+
override.returns(
|
|
78
|
+
{
|
|
79
|
+
id: String,
|
|
80
|
+
alias_: T.nilable(String),
|
|
81
|
+
provider: String,
|
|
82
|
+
settings: T::Hash[Symbol, T.anything],
|
|
83
|
+
title: String,
|
|
84
|
+
request_options: Courier::RequestOptions
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
end
|
|
88
|
+
def to_hash
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
@@ -28,7 +28,16 @@ module Courier
|
|
|
28
28
|
|
|
29
29
|
# Provider-specific settings (snake_case keys). Replaces the full settings object
|
|
30
30
|
# — omitted settings fields are removed. Use the catalog endpoint to check
|
|
31
|
-
# required fields.
|
|
31
|
+
# required fields. Set `rate_limit` to cap this configuration's send rate:
|
|
32
|
+
# `{ "rate": <number greater than 0>, "period": "second" | "minute" | "hour" }`,
|
|
33
|
+
# e.g. `{ "rate": 0.5, "period": "minute" }` for one send every 2 minutes. The
|
|
34
|
+
# interval between sends (`period` divided by `rate`) must be from 1 millisecond
|
|
35
|
+
# to 12 hours, otherwise the request returns a 400 `InvalidRateLimit` error. The
|
|
36
|
+
# limit applies per configuration and per environment (a test-environment
|
|
37
|
+
# configuration has its own limit). Sends above the rate are queued, not dropped,
|
|
38
|
+
# and changes take up to 60 seconds to apply. It has no effect on observability or
|
|
39
|
+
# CDP integrations, which do not send messages. Omitting `rate_limit` or setting
|
|
40
|
+
# it to null removes any existing limit, including one set in Studio.
|
|
32
41
|
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
33
42
|
attr_reader :settings
|
|
34
43
|
|
|
@@ -61,7 +70,16 @@ module Courier
|
|
|
61
70
|
alias_: nil,
|
|
62
71
|
# Provider-specific settings (snake_case keys). Replaces the full settings object
|
|
63
72
|
# — omitted settings fields are removed. Use the catalog endpoint to check
|
|
64
|
-
# required fields.
|
|
73
|
+
# required fields. Set `rate_limit` to cap this configuration's send rate:
|
|
74
|
+
# `{ "rate": <number greater than 0>, "period": "second" | "minute" | "hour" }`,
|
|
75
|
+
# e.g. `{ "rate": 0.5, "period": "minute" }` for one send every 2 minutes. The
|
|
76
|
+
# interval between sends (`period` divided by `rate`) must be from 1 millisecond
|
|
77
|
+
# to 12 hours, otherwise the request returns a 400 `InvalidRateLimit` error. The
|
|
78
|
+
# limit applies per configuration and per environment (a test-environment
|
|
79
|
+
# configuration has its own limit). Sends above the rate are queued, not dropped,
|
|
80
|
+
# and changes take up to 60 seconds to apply. It has no effect on observability or
|
|
81
|
+
# CDP integrations, which do not send messages. Omitting `rate_limit` or setting
|
|
82
|
+
# it to null removes any existing limit, including one set in Studio.
|
|
65
83
|
settings: nil,
|
|
66
84
|
# Updated display title.
|
|
67
85
|
title: nil,
|
data/rbi/courier/models.rbi
CHANGED
|
@@ -467,6 +467,8 @@ module Courier
|
|
|
467
467
|
NotificationTemplateCreateRequest =
|
|
468
468
|
Courier::Models::NotificationTemplateCreateRequest
|
|
469
469
|
|
|
470
|
+
NotificationTemplateEmail = Courier::Models::NotificationTemplateEmail
|
|
471
|
+
|
|
470
472
|
NotificationTemplatePayload = Courier::Models::NotificationTemplatePayload
|
|
471
473
|
|
|
472
474
|
NotificationTemplatePublishRequest =
|
|
@@ -546,6 +548,8 @@ module Courier
|
|
|
546
548
|
|
|
547
549
|
ProviderListParams = Courier::Models::ProviderListParams
|
|
548
550
|
|
|
551
|
+
ProviderPatchParams = Courier::Models::ProviderPatchParams
|
|
552
|
+
|
|
549
553
|
ProviderRetrieveParams = Courier::Models::ProviderRetrieveParams
|
|
550
554
|
|
|
551
555
|
Providers = Courier::Models::Providers
|
|
@@ -31,7 +31,17 @@ module Courier
|
|
|
31
31
|
alias_: nil,
|
|
32
32
|
# Body param: Provider-specific settings (snake_case keys). Defaults to an empty
|
|
33
33
|
# object when omitted. Use the catalog endpoint to discover required fields for a
|
|
34
|
-
# given provider — omitting a required field returns a 400 validation error.
|
|
34
|
+
# given provider — omitting a required field returns a 400 validation error. Set
|
|
35
|
+
# `rate_limit` to cap this configuration's send rate:
|
|
36
|
+
# `{ "rate": <number greater than 0>, "period": "second" | "minute" | "hour" }`,
|
|
37
|
+
# e.g. `{ "rate": 0.5, "period": "minute" }` for one send every 2 minutes. The
|
|
38
|
+
# interval between sends (`period` divided by `rate`) must be from 1 millisecond
|
|
39
|
+
# to 12 hours, otherwise the request returns a 400 `InvalidRateLimit` error. The
|
|
40
|
+
# limit applies per configuration and per environment (a test-environment
|
|
41
|
+
# configuration has its own limit). Sends above the rate are queued, not dropped,
|
|
42
|
+
# and changes take up to 60 seconds to apply. It has no effect on observability or
|
|
43
|
+
# CDP integrations, which do not send messages. Omit it or set it to null for no
|
|
44
|
+
# limit.
|
|
35
45
|
settings: nil,
|
|
36
46
|
# Body param: Optional display title. Omit to use "Default Configuration".
|
|
37
47
|
title: nil,
|
|
@@ -88,7 +98,16 @@ module Courier
|
|
|
88
98
|
alias_: nil,
|
|
89
99
|
# Provider-specific settings (snake_case keys). Replaces the full settings object
|
|
90
100
|
# — omitted settings fields are removed. Use the catalog endpoint to check
|
|
91
|
-
# required fields.
|
|
101
|
+
# required fields. Set `rate_limit` to cap this configuration's send rate:
|
|
102
|
+
# `{ "rate": <number greater than 0>, "period": "second" | "minute" | "hour" }`,
|
|
103
|
+
# e.g. `{ "rate": 0.5, "period": "minute" }` for one send every 2 minutes. The
|
|
104
|
+
# interval between sends (`period` divided by `rate`) must be from 1 millisecond
|
|
105
|
+
# to 12 hours, otherwise the request returns a 400 `InvalidRateLimit` error. The
|
|
106
|
+
# limit applies per configuration and per environment (a test-environment
|
|
107
|
+
# configuration has its own limit). Sends above the rate are queued, not dropped,
|
|
108
|
+
# and changes take up to 60 seconds to apply. It has no effect on observability or
|
|
109
|
+
# CDP integrations, which do not send messages. Omitting `rate_limit` or setting
|
|
110
|
+
# it to null removes any existing limit, including one set in Studio.
|
|
92
111
|
settings: nil,
|
|
93
112
|
# Updated display title.
|
|
94
113
|
title: nil,
|
|
@@ -126,6 +145,39 @@ module Courier
|
|
|
126
145
|
)
|
|
127
146
|
end
|
|
128
147
|
|
|
148
|
+
# Updates part of a provider's configuration and keeps every field you omit.
|
|
149
|
+
# Settings merge into the stored settings key by key, and a setting sent as null
|
|
150
|
+
# is removed.
|
|
151
|
+
sig do
|
|
152
|
+
params(
|
|
153
|
+
id: String,
|
|
154
|
+
alias_: T.nilable(String),
|
|
155
|
+
provider: String,
|
|
156
|
+
settings: T::Hash[Symbol, T.anything],
|
|
157
|
+
title: String,
|
|
158
|
+
request_options: Courier::RequestOptions::OrHash
|
|
159
|
+
).returns(Courier::Provider)
|
|
160
|
+
end
|
|
161
|
+
def patch(
|
|
162
|
+
# A unique identifier of the provider configuration to update.
|
|
163
|
+
id,
|
|
164
|
+
# Updated alias. Set to null to clear it.
|
|
165
|
+
alias_: nil,
|
|
166
|
+
# The provider key identifying the type. Optional. When sent, it must match the
|
|
167
|
+
# stored provider, otherwise the request returns a 400.
|
|
168
|
+
provider: nil,
|
|
169
|
+
# Provider-specific settings (snake_case keys) to merge into the stored settings,
|
|
170
|
+
# using JSON Merge Patch (RFC 7396). Each key you send replaces the stored value,
|
|
171
|
+
# a key set to null is removed, nested objects merge recursively, and arrays
|
|
172
|
+
# replace the stored value. Keys you omit keep their stored values. Set
|
|
173
|
+
# `rate_limit` to null to remove this configuration's send rate limit.
|
|
174
|
+
settings: nil,
|
|
175
|
+
# Updated display title.
|
|
176
|
+
title: nil,
|
|
177
|
+
request_options: {}
|
|
178
|
+
)
|
|
179
|
+
end
|
|
180
|
+
|
|
129
181
|
# @api private
|
|
130
182
|
sig { params(client: Courier::Client).returns(T.attached_class) }
|
|
131
183
|
def self.new(client:)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type notification_template_email =
|
|
4
|
+
{
|
|
5
|
+
bcc: ::Array[String],
|
|
6
|
+
cc: ::Array[String],
|
|
7
|
+
from: String,
|
|
8
|
+
reply_to: String
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class NotificationTemplateEmail < Courier::Internal::Type::BaseModel
|
|
12
|
+
attr_reader bcc: ::Array[String]?
|
|
13
|
+
|
|
14
|
+
def bcc=: (::Array[String]) -> ::Array[String]
|
|
15
|
+
|
|
16
|
+
attr_reader cc: ::Array[String]?
|
|
17
|
+
|
|
18
|
+
def cc=: (::Array[String]) -> ::Array[String]
|
|
19
|
+
|
|
20
|
+
attr_reader from: String?
|
|
21
|
+
|
|
22
|
+
def from=: (String) -> String
|
|
23
|
+
|
|
24
|
+
attr_reader reply_to: String?
|
|
25
|
+
|
|
26
|
+
def reply_to=: (String) -> String
|
|
27
|
+
|
|
28
|
+
def initialize: (
|
|
29
|
+
?bcc: ::Array[String],
|
|
30
|
+
?cc: ::Array[String],
|
|
31
|
+
?from: String,
|
|
32
|
+
?reply_to: String
|
|
33
|
+
) -> void
|
|
34
|
+
|
|
35
|
+
def to_hash: -> {
|
|
36
|
+
bcc: ::Array[String],
|
|
37
|
+
cc: ::Array[String],
|
|
38
|
+
from: String,
|
|
39
|
+
reply_to: String
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -7,7 +7,8 @@ module Courier
|
|
|
7
7
|
name: String,
|
|
8
8
|
routing: Courier::NotificationTemplatePayload::Routing?,
|
|
9
9
|
subscription: Courier::NotificationTemplatePayload::Subscription?,
|
|
10
|
-
tags: ::Array[String]
|
|
10
|
+
tags: ::Array[String],
|
|
11
|
+
email: Courier::NotificationTemplateEmail?
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
class NotificationTemplatePayload < Courier::Internal::Type::BaseModel
|
|
@@ -23,13 +24,16 @@ module Courier
|
|
|
23
24
|
|
|
24
25
|
attr_accessor tags: ::Array[String]
|
|
25
26
|
|
|
27
|
+
attr_accessor email: Courier::NotificationTemplateEmail?
|
|
28
|
+
|
|
26
29
|
def initialize: (
|
|
27
30
|
brand: Courier::NotificationTemplatePayload::Brand?,
|
|
28
31
|
content: Courier::ElementalContent,
|
|
29
32
|
name: String,
|
|
30
33
|
routing: Courier::NotificationTemplatePayload::Routing?,
|
|
31
34
|
subscription: Courier::NotificationTemplatePayload::Subscription?,
|
|
32
|
-
tags: ::Array[String]
|
|
35
|
+
tags: ::Array[String],
|
|
36
|
+
?email: Courier::NotificationTemplateEmail?
|
|
33
37
|
) -> void
|
|
34
38
|
|
|
35
39
|
def to_hash: -> {
|
|
@@ -38,7 +42,8 @@ module Courier
|
|
|
38
42
|
name: String,
|
|
39
43
|
routing: Courier::NotificationTemplatePayload::Routing?,
|
|
40
44
|
subscription: Courier::NotificationTemplatePayload::Subscription?,
|
|
41
|
-
tags: ::Array[String]
|
|
45
|
+
tags: ::Array[String],
|
|
46
|
+
email: Courier::NotificationTemplateEmail?
|
|
42
47
|
}
|
|
43
48
|
|
|
44
49
|
type brand = { id: String }
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type provider_patch_params =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
alias_: String?,
|
|
7
|
+
provider: String,
|
|
8
|
+
settings: ::Hash[Symbol, top],
|
|
9
|
+
title: String
|
|
10
|
+
}
|
|
11
|
+
& Courier::Internal::Type::request_parameters
|
|
12
|
+
|
|
13
|
+
class ProviderPatchParams < Courier::Internal::Type::BaseModel
|
|
14
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
15
|
+
include Courier::Internal::Type::RequestParameters
|
|
16
|
+
|
|
17
|
+
attr_accessor id: String
|
|
18
|
+
|
|
19
|
+
attr_accessor alias_: String?
|
|
20
|
+
|
|
21
|
+
attr_reader provider: String?
|
|
22
|
+
|
|
23
|
+
def provider=: (String) -> String
|
|
24
|
+
|
|
25
|
+
attr_reader settings: ::Hash[Symbol, top]?
|
|
26
|
+
|
|
27
|
+
def settings=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
|
|
28
|
+
|
|
29
|
+
attr_reader title: String?
|
|
30
|
+
|
|
31
|
+
def title=: (String) -> String
|
|
32
|
+
|
|
33
|
+
def initialize: (
|
|
34
|
+
id: String,
|
|
35
|
+
?alias_: String?,
|
|
36
|
+
?provider: String,
|
|
37
|
+
?settings: ::Hash[Symbol, top],
|
|
38
|
+
?title: String,
|
|
39
|
+
?request_options: Courier::request_opts
|
|
40
|
+
) -> void
|
|
41
|
+
|
|
42
|
+
def to_hash: -> {
|
|
43
|
+
id: String,
|
|
44
|
+
alias_: String?,
|
|
45
|
+
provider: String,
|
|
46
|
+
settings: ::Hash[Symbol, top],
|
|
47
|
+
title: String,
|
|
48
|
+
request_options: Courier::RequestOptions
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
data/sig/courier/models.rbs
CHANGED
|
@@ -451,6 +451,8 @@ module Courier
|
|
|
451
451
|
|
|
452
452
|
class NotificationTemplateCreateRequest = Courier::Models::NotificationTemplateCreateRequest
|
|
453
453
|
|
|
454
|
+
class NotificationTemplateEmail = Courier::Models::NotificationTemplateEmail
|
|
455
|
+
|
|
454
456
|
class NotificationTemplatePayload = Courier::Models::NotificationTemplatePayload
|
|
455
457
|
|
|
456
458
|
class NotificationTemplatePublishRequest = Courier::Models::NotificationTemplatePublishRequest
|
|
@@ -523,6 +525,8 @@ module Courier
|
|
|
523
525
|
|
|
524
526
|
class ProviderListParams = Courier::Models::ProviderListParams
|
|
525
527
|
|
|
528
|
+
class ProviderPatchParams = Courier::Models::ProviderPatchParams
|
|
529
|
+
|
|
526
530
|
class ProviderRetrieveParams = Courier::Models::ProviderRetrieveParams
|
|
527
531
|
|
|
528
532
|
module Providers = Courier::Models::Providers
|
|
@@ -34,6 +34,15 @@ module Courier
|
|
|
34
34
|
|
|
35
35
|
def delete: (String id, ?request_options: Courier::request_opts) -> nil
|
|
36
36
|
|
|
37
|
+
def patch: (
|
|
38
|
+
String id,
|
|
39
|
+
?alias_: String?,
|
|
40
|
+
?provider: String,
|
|
41
|
+
?settings: ::Hash[Symbol, top],
|
|
42
|
+
?title: String,
|
|
43
|
+
?request_options: Courier::request_opts
|
|
44
|
+
) -> Courier::Provider
|
|
45
|
+
|
|
37
46
|
def initialize: (client: Courier::Client) -> void
|
|
38
47
|
end
|
|
39
48
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: trycourier
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.
|
|
4
|
+
version: 6.12.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Courier
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-10-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: connection_pool
|
|
@@ -318,6 +318,7 @@ files:
|
|
|
318
318
|
- lib/courier/models/notification_retrieve_params.rb
|
|
319
319
|
- lib/courier/models/notification_template_alias.rb
|
|
320
320
|
- lib/courier/models/notification_template_create_request.rb
|
|
321
|
+
- lib/courier/models/notification_template_email.rb
|
|
321
322
|
- lib/courier/models/notification_template_payload.rb
|
|
322
323
|
- lib/courier/models/notification_template_publish_request.rb
|
|
323
324
|
- lib/courier/models/notification_template_response.rb
|
|
@@ -380,6 +381,7 @@ files:
|
|
|
380
381
|
- lib/courier/models/provider_delete_params.rb
|
|
381
382
|
- lib/courier/models/provider_list_params.rb
|
|
382
383
|
- lib/courier/models/provider_list_response.rb
|
|
384
|
+
- lib/courier/models/provider_patch_params.rb
|
|
383
385
|
- lib/courier/models/provider_retrieve_params.rb
|
|
384
386
|
- lib/courier/models/provider_update_params.rb
|
|
385
387
|
- lib/courier/models/providers/catalog_list_params.rb
|
|
@@ -845,6 +847,7 @@ files:
|
|
|
845
847
|
- rbi/courier/models/notification_retrieve_params.rbi
|
|
846
848
|
- rbi/courier/models/notification_template_alias.rbi
|
|
847
849
|
- rbi/courier/models/notification_template_create_request.rbi
|
|
850
|
+
- rbi/courier/models/notification_template_email.rbi
|
|
848
851
|
- rbi/courier/models/notification_template_payload.rbi
|
|
849
852
|
- rbi/courier/models/notification_template_publish_request.rbi
|
|
850
853
|
- rbi/courier/models/notification_template_response.rbi
|
|
@@ -907,6 +910,7 @@ files:
|
|
|
907
910
|
- rbi/courier/models/provider_delete_params.rbi
|
|
908
911
|
- rbi/courier/models/provider_list_params.rbi
|
|
909
912
|
- rbi/courier/models/provider_list_response.rbi
|
|
913
|
+
- rbi/courier/models/provider_patch_params.rbi
|
|
910
914
|
- rbi/courier/models/provider_retrieve_params.rbi
|
|
911
915
|
- rbi/courier/models/provider_update_params.rbi
|
|
912
916
|
- rbi/courier/models/providers/catalog_list_params.rbi
|
|
@@ -1371,6 +1375,7 @@ files:
|
|
|
1371
1375
|
- sig/courier/models/notification_retrieve_params.rbs
|
|
1372
1376
|
- sig/courier/models/notification_template_alias.rbs
|
|
1373
1377
|
- sig/courier/models/notification_template_create_request.rbs
|
|
1378
|
+
- sig/courier/models/notification_template_email.rbs
|
|
1374
1379
|
- sig/courier/models/notification_template_payload.rbs
|
|
1375
1380
|
- sig/courier/models/notification_template_publish_request.rbs
|
|
1376
1381
|
- sig/courier/models/notification_template_response.rbs
|
|
@@ -1433,6 +1438,7 @@ files:
|
|
|
1433
1438
|
- sig/courier/models/provider_delete_params.rbs
|
|
1434
1439
|
- sig/courier/models/provider_list_params.rbs
|
|
1435
1440
|
- sig/courier/models/provider_list_response.rbs
|
|
1441
|
+
- sig/courier/models/provider_patch_params.rbs
|
|
1436
1442
|
- sig/courier/models/provider_retrieve_params.rbs
|
|
1437
1443
|
- sig/courier/models/provider_update_params.rbs
|
|
1438
1444
|
- sig/courier/models/providers/catalog_list_params.rbs
|