trycourier 4.17.0 → 4.18.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 +31 -0
- data/lib/courier/client.rb +3 -3
- data/lib/courier/models/cancel_journey_request.rb +39 -0
- data/lib/courier/models/cancel_journey_response.rb +55 -0
- data/lib/courier/models/{preference_section_list_params.rb → journey_cancel_params.rb} +2 -2
- data/lib/courier/models/journey_experiment.rb +49 -0
- data/lib/courier/models/journey_experiment_variant.rb +44 -0
- data/lib/courier/models/journey_node.rb +1 -1
- data/lib/courier/models/journey_send_node.rb +23 -10
- data/lib/courier/models/publish_preferences_response.rb +1 -1
- data/lib/courier/models/{preference_section_archive_params.rb → workspace_preference_archive_params.rb} +2 -2
- data/lib/courier/models/workspace_preference_create_params.rb +14 -0
- data/lib/courier/models/{preference_section_create_request.rb → workspace_preference_create_request.rb} +8 -8
- data/lib/courier/models/{preference_section_get_response.rb → workspace_preference_get_response.rb} +15 -15
- data/lib/courier/models/{preference_section_publish_params.rb → workspace_preference_list_params.rb} +2 -2
- data/lib/courier/models/workspace_preference_list_response.rb +18 -0
- data/lib/courier/models/{preference_section_create_params.rb → workspace_preference_publish_params.rb} +2 -2
- data/lib/courier/models/{preference_section_replace_params.rb → workspace_preference_replace_params.rb} +2 -2
- data/lib/courier/models/{preference_section_replace_request.rb → workspace_preference_replace_request.rb} +8 -8
- data/lib/courier/models/{preference_section_retrieve_params.rb → workspace_preference_retrieve_params.rb} +2 -2
- data/lib/courier/models/{preference_topic_create_request.rb → workspace_preference_topic_create_request.rb} +9 -9
- data/lib/courier/models/{preference_topic_get_response.rb → workspace_preference_topic_get_response.rb} +8 -8
- data/lib/courier/models/workspace_preference_topic_list_response.rb +17 -0
- data/lib/courier/models/{preference_topic_replace_request.rb → workspace_preference_topic_replace_request.rb} +8 -8
- data/lib/courier/models/{preference_sections → workspace_preferences}/topic_archive_params.rb +2 -2
- data/lib/courier/models/{preference_sections → workspace_preferences}/topic_create_params.rb +3 -3
- data/lib/courier/models/{preference_sections → workspace_preferences}/topic_list_params.rb +2 -2
- data/lib/courier/models/{preference_sections → workspace_preferences}/topic_replace_params.rb +3 -3
- data/lib/courier/models/{preference_sections → workspace_preferences}/topic_retrieve_params.rb +2 -2
- data/lib/courier/models.rb +40 -30
- data/lib/courier/resources/journeys.rb +30 -0
- data/lib/courier/resources/notifications/checks.rb +3 -3
- data/lib/courier/resources/{preference_sections → workspace_preferences}/topics.rb +40 -37
- data/lib/courier/resources/{preference_sections.rb → workspace_preferences.rb} +40 -40
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +26 -21
- data/rbi/courier/client.rbi +2 -2
- data/rbi/courier/models/cancel_journey_request.rbi +68 -0
- data/rbi/courier/models/cancel_journey_response.rbi +81 -0
- data/rbi/courier/models/journey_cancel_params.rbi +27 -0
- data/rbi/courier/models/journey_experiment.rbi +74 -0
- data/rbi/courier/models/journey_experiment_variant.rbi +61 -0
- data/rbi/courier/models/journey_send_node.rbi +32 -11
- data/rbi/courier/models/{preference_section_retrieve_params.rbi → workspace_preference_archive_params.rbi} +2 -2
- data/rbi/courier/models/{preference_section_create_params.rbi → workspace_preference_create_params.rbi} +2 -2
- data/rbi/courier/models/{preference_section_create_request.rbi → workspace_preference_create_request.rbi} +9 -9
- data/rbi/courier/models/{preference_section_get_response.rbi → workspace_preference_get_response.rbi} +17 -16
- data/rbi/courier/models/{preference_section_list_params.rbi → workspace_preference_list_params.rbi} +2 -2
- data/rbi/courier/models/{preference_topic_list_response.rbi → workspace_preference_list_response.rbi} +6 -6
- data/rbi/courier/models/{preference_section_publish_params.rbi → workspace_preference_publish_params.rbi} +2 -2
- data/rbi/courier/models/{preference_section_replace_params.rbi → workspace_preference_replace_params.rbi} +2 -2
- data/rbi/courier/models/{preference_section_replace_request.rbi → workspace_preference_replace_request.rbi} +9 -9
- data/rbi/courier/models/{preference_section_archive_params.rbi → workspace_preference_retrieve_params.rbi} +2 -2
- data/rbi/courier/models/{preference_topic_create_request.rbi → workspace_preference_topic_create_request.rbi} +22 -17
- data/rbi/courier/models/{preference_topic_get_response.rbi → workspace_preference_topic_get_response.rbi} +23 -17
- data/rbi/courier/models/workspace_preference_topic_list_response.rbi +36 -0
- data/rbi/courier/models/{preference_topic_replace_request.rbi → workspace_preference_topic_replace_request.rbi} +22 -17
- data/rbi/courier/models/{preference_sections → workspace_preferences}/topic_archive_params.rbi +2 -2
- data/rbi/courier/models/{preference_sections → workspace_preferences}/topic_create_params.rbi +3 -3
- data/rbi/courier/models/{preference_sections → workspace_preferences}/topic_list_params.rbi +2 -2
- data/rbi/courier/models/{preference_sections → workspace_preferences}/topic_replace_params.rbi +3 -3
- data/rbi/courier/models/{preference_sections → workspace_preferences}/topic_retrieve_params.rbi +2 -2
- data/rbi/courier/models.rbi +53 -36
- data/rbi/courier/resources/journeys.rbi +25 -0
- data/rbi/courier/resources/notifications/checks.rbi +3 -3
- data/rbi/courier/resources/{preference_sections → workspace_preferences}/topics.rbi +25 -22
- data/rbi/courier/resources/{preference_sections.rbi → workspace_preferences.rbi} +27 -27
- data/sig/courier/client.rbs +1 -1
- data/sig/courier/models/cancel_journey_request.rbs +33 -0
- data/sig/courier/models/cancel_journey_response.rbs +35 -0
- data/sig/courier/models/{preference_section_list_params.rbs → journey_cancel_params.rbs} +2 -2
- data/sig/courier/models/journey_experiment.rbs +39 -0
- data/sig/courier/models/journey_experiment_variant.rbs +32 -0
- data/sig/courier/models/journey_send_node.rbs +19 -8
- data/sig/courier/models/{preference_section_retrieve_params.rbs → workspace_preference_archive_params.rbs} +2 -2
- data/sig/courier/models/workspace_preference_create_params.rbs +15 -0
- data/sig/courier/models/{preference_section_replace_request.rbs → workspace_preference_create_request.rbs} +2 -2
- data/sig/courier/models/{preference_section_get_response.rbs → workspace_preference_get_response.rbs} +6 -6
- data/sig/courier/models/{preference_section_publish_params.rbs → workspace_preference_list_params.rbs} +2 -2
- data/sig/courier/models/workspace_preference_list_response.rbs +18 -0
- data/sig/courier/models/{preference_section_create_params.rbs → workspace_preference_publish_params.rbs} +2 -2
- data/sig/courier/models/{preference_section_replace_params.rbs → workspace_preference_replace_params.rbs} +2 -2
- data/sig/courier/models/{preference_section_create_request.rbs → workspace_preference_replace_request.rbs} +2 -2
- data/sig/courier/models/{preference_section_archive_params.rbs → workspace_preference_retrieve_params.rbs} +2 -2
- data/sig/courier/models/{preference_topic_create_request.rbs → workspace_preference_topic_create_request.rbs} +12 -12
- data/sig/courier/models/{preference_topic_get_response.rbs → workspace_preference_topic_get_response.rbs} +12 -12
- data/sig/courier/models/workspace_preference_topic_list_response.rbs +18 -0
- data/sig/courier/models/{preference_topic_replace_request.rbs → workspace_preference_topic_replace_request.rbs} +12 -12
- data/sig/courier/models/{preference_sections → workspace_preferences}/topic_archive_params.rbs +1 -1
- data/sig/courier/models/{preference_sections → workspace_preferences}/topic_create_params.rbs +2 -2
- data/sig/courier/models/{preference_sections → workspace_preferences}/topic_list_params.rbs +1 -1
- data/sig/courier/models/{preference_sections → workspace_preferences}/topic_replace_params.rbs +2 -2
- data/sig/courier/models/{preference_sections → workspace_preferences}/topic_retrieve_params.rbs +1 -1
- data/sig/courier/models.rbs +40 -30
- data/sig/courier/resources/journeys.rbs +5 -0
- data/sig/courier/resources/{preference_sections → workspace_preferences}/topics.rbs +9 -9
- data/sig/courier/resources/{preference_sections.rbs → workspace_preferences.rbs} +6 -6
- metadata +80 -65
- data/lib/courier/models/preference_section_list_response.rb +0 -18
- data/lib/courier/models/preference_topic_list_response.rb +0 -17
- data/rbi/courier/models/preference_section_list_response.rbi +0 -35
- data/sig/courier/models/preference_section_list_response.rbs +0 -18
- data/sig/courier/models/preference_topic_list_response.rbs +0 -16
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f8dd821714bcedfb9a48185d8a9c04f669568f2fdd560bcbd58a7c21acf43be3
|
|
4
|
+
data.tar.gz: c8730971ee6d6fbb0e38a4f3a6a213c0a9fed7aca628d5ebc3e490c8c585d362
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1c3bdee713e6ac20200c2c35ac993a34a07b52b3e4c1bc9422e0074aeffe344b39962d7703463de38d80f00ba1ecc56e5ea839654ac0a45c6c51400fc996849b
|
|
7
|
+
data.tar.gz: 07535c3b636a1462811bd7f00685dbc3738c3ce589cc0f963baf898a2895f543c48a8e12e39135c6bebccdbabc3fb85388dea03af2aff3d0bcf6758c4ef2309e
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.18.0 (2026-07-06)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v4.17.1...v4.18.0](https://github.com/trycourier/courier-ruby/compare/v4.17.1...v4.18.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **openapi:** Journeys cancel-by-token endpoint + send-node experiments (C-18986) ([12613c6](https://github.com/trycourier/courier-ruby/commit/12613c65e9b4facc19f7fa23cc92fac0b2ea8684))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Chores
|
|
13
|
+
|
|
14
|
+
* **internal:** bound formatter parallelism to CPU count ([192d613](https://github.com/trycourier/courier-ruby/commit/192d6133c29e2ae7bfcd7c54bd1c244894f01b94))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Documentation
|
|
18
|
+
|
|
19
|
+
* **openapi:** reword Cancel journey runs 400 description (re-trigger deploy) ([89ceaab](https://github.com/trycourier/courier-ruby/commit/89ceaab2e20d45c3dd807427f5e4d248ba94cc8a))
|
|
20
|
+
* **openapi:** reword Cancel journey runs description (re-trigger deploy) ([ccce802](https://github.com/trycourier/courier-ruby/commit/ccce8027d4279de031ff2f7e95a250e512dbfbed))
|
|
21
|
+
* **openapi:** tighten Journeys cancel/experiment copy (C-19177) ([10c4f1d](https://github.com/trycourier/courier-ruby/commit/10c4f1d3ca27c525ec5d75d49f4bb30cc0d6180d))
|
|
22
|
+
|
|
23
|
+
## 4.17.1 (2026-06-25)
|
|
24
|
+
|
|
25
|
+
Full Changelog: [v4.17.0...v4.17.1](https://github.com/trycourier/courier-ruby/compare/v4.17.0...v4.17.1)
|
|
26
|
+
|
|
27
|
+
### Documentation
|
|
28
|
+
|
|
29
|
+
* **openapi:** add full response examples to every endpoint ([be9724a](https://github.com/trycourier/courier-ruby/commit/be9724a3a5d7317bd31d99160414959b58d1e5bb))
|
|
30
|
+
* **openapi:** reword Cancel Submission description ([68565aa](https://github.com/trycourier/courier-ruby/commit/68565aa1f8de141d9780a390da4b48aeb178624e))
|
|
31
|
+
* **openapi:** reword Get Submission Checks description ([94541e4](https://github.com/trycourier/courier-ruby/commit/94541e4aaebbf1ac567e1047d2ce84e5ad97741b))
|
|
32
|
+
* **openapi:** reword Replace Submission Checks description ([7aa63c1](https://github.com/trycourier/courier-ruby/commit/7aa63c14c83b9585ec963d426f47b2720b5b04cc))
|
|
33
|
+
|
|
3
34
|
## 4.17.0 (2026-06-24)
|
|
4
35
|
|
|
5
36
|
Full Changelog: [v4.16.0...v4.17.0](https://github.com/trycourier/courier-ruby/compare/v4.16.0...v4.17.0)
|
data/lib/courier/client.rb
CHANGED
|
@@ -66,8 +66,8 @@ module Courier
|
|
|
66
66
|
# @return [Courier::Resources::RoutingStrategies]
|
|
67
67
|
attr_reader :routing_strategies
|
|
68
68
|
|
|
69
|
-
# @return [Courier::Resources::
|
|
70
|
-
attr_reader :
|
|
69
|
+
# @return [Courier::Resources::WorkspacePreferences]
|
|
70
|
+
attr_reader :workspace_preferences
|
|
71
71
|
|
|
72
72
|
# @return [Courier::Resources::Profiles]
|
|
73
73
|
attr_reader :profiles
|
|
@@ -158,7 +158,7 @@ module Courier
|
|
|
158
158
|
@requests = Courier::Resources::Requests.new(client: self)
|
|
159
159
|
@notifications = Courier::Resources::Notifications.new(client: self)
|
|
160
160
|
@routing_strategies = Courier::Resources::RoutingStrategies.new(client: self)
|
|
161
|
-
@
|
|
161
|
+
@workspace_preferences = Courier::Resources::WorkspacePreferences.new(client: self)
|
|
162
162
|
@profiles = Courier::Resources::Profiles.new(client: self)
|
|
163
163
|
@tenants = Courier::Resources::Tenants.new(client: self)
|
|
164
164
|
@translations = Courier::Resources::Translations.new(client: self)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# Request body for `POST /journeys/cancel`. Provide EXACTLY ONE of
|
|
6
|
+
# `cancelation_token` (cancels every run associated with the token) or `run_id`
|
|
7
|
+
# (cancels a single tenant-scoped run).
|
|
8
|
+
module CancelJourneyRequest
|
|
9
|
+
extend Courier::Internal::Type::Union
|
|
10
|
+
|
|
11
|
+
variant -> { Courier::CancelJourneyRequest::ByCancelationToken }
|
|
12
|
+
|
|
13
|
+
variant -> { Courier::CancelJourneyRequest::ByRunID }
|
|
14
|
+
|
|
15
|
+
class ByCancelationToken < Courier::Internal::Type::BaseModel
|
|
16
|
+
# @!attribute cancelation_token
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :cancelation_token, String
|
|
20
|
+
|
|
21
|
+
# @!method initialize(cancelation_token:)
|
|
22
|
+
# @param cancelation_token [String]
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
class ByRunID < Courier::Internal::Type::BaseModel
|
|
26
|
+
# @!attribute run_id
|
|
27
|
+
#
|
|
28
|
+
# @return [String]
|
|
29
|
+
required :run_id, String
|
|
30
|
+
|
|
31
|
+
# @!method initialize(run_id:)
|
|
32
|
+
# @param run_id [String]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# @!method self.variants
|
|
36
|
+
# @return [Array(Courier::Models::CancelJourneyRequest::ByCancelationToken, Courier::Models::CancelJourneyRequest::ByRunID)]
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# `202 Accepted` body for `POST /journeys/cancel`, returning the submitted
|
|
6
|
+
# identifier. When called with `cancelation_token`, returns
|
|
7
|
+
# `{ cancelation_token }`; when called with `run_id`, returns
|
|
8
|
+
# `{ run_id, status }`.
|
|
9
|
+
#
|
|
10
|
+
# @see Courier::Resources::Journeys#cancel
|
|
11
|
+
module CancelJourneyResponse
|
|
12
|
+
extend Courier::Internal::Type::Union
|
|
13
|
+
|
|
14
|
+
variant -> { Courier::CancelJourneyResponse::TokenBranch }
|
|
15
|
+
|
|
16
|
+
variant -> { Courier::CancelJourneyResponse::RunIDBranch }
|
|
17
|
+
|
|
18
|
+
class TokenBranch < Courier::Internal::Type::BaseModel
|
|
19
|
+
# @!attribute cancelation_token
|
|
20
|
+
#
|
|
21
|
+
# @return [String]
|
|
22
|
+
required :cancelation_token, String
|
|
23
|
+
|
|
24
|
+
# @!method initialize(cancelation_token:)
|
|
25
|
+
# @param cancelation_token [String]
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
class RunIDBranch < Courier::Internal::Type::BaseModel
|
|
29
|
+
# @!attribute run_id
|
|
30
|
+
#
|
|
31
|
+
# @return [String]
|
|
32
|
+
required :run_id, String
|
|
33
|
+
|
|
34
|
+
# @!attribute status
|
|
35
|
+
# The run's resulting status. `CANCELED` when the run was active and has been
|
|
36
|
+
# canceled; `PROCESSED` or `ERROR` when the run had already finished and was left
|
|
37
|
+
# unchanged; `CANCELED` for an already-canceled run.
|
|
38
|
+
#
|
|
39
|
+
# @return [String]
|
|
40
|
+
required :status, String
|
|
41
|
+
|
|
42
|
+
# @!method initialize(run_id:, status:)
|
|
43
|
+
# Some parameter documentations has been truncated, see
|
|
44
|
+
# {Courier::Models::CancelJourneyResponse::RunIDBranch} for more details.
|
|
45
|
+
#
|
|
46
|
+
# @param run_id [String]
|
|
47
|
+
#
|
|
48
|
+
# @param status [String] The run's resulting status. `CANCELED` when the run was active and has been canc
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# @!method self.variants
|
|
52
|
+
# @return [Array(Courier::Models::CancelJourneyResponse::TokenBranch, Courier::Models::CancelJourneyResponse::RunIDBranch)]
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
# @see Courier::Resources::
|
|
6
|
-
class
|
|
5
|
+
# @see Courier::Resources::Journeys#cancel
|
|
6
|
+
class JourneyCancelParams < Courier::Internal::Type::BaseModel
|
|
7
7
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Courier::Internal::Type::RequestParameters
|
|
9
9
|
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class JourneyExperiment < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute bucketing_key
|
|
7
|
+
# The value used to deterministically assign a recipient to a variant. Must be
|
|
8
|
+
# non-empty with no leading or trailing whitespace.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :bucketing_key, String, api_name: :bucketingKey
|
|
12
|
+
|
|
13
|
+
# @!attribute variants
|
|
14
|
+
# Between 2 and 10 weighted template variants.
|
|
15
|
+
#
|
|
16
|
+
# @return [Array<Courier::Models::JourneyExperimentVariant>]
|
|
17
|
+
required :variants, -> { Courier::Internal::Type::ArrayOf[Courier::JourneyExperimentVariant] }
|
|
18
|
+
|
|
19
|
+
# @!attribute id
|
|
20
|
+
# Unique experiment id (prefixed `exp_`). Omit to have one generated
|
|
21
|
+
# automatically; when supplied it must be a valid `exp_` id.
|
|
22
|
+
#
|
|
23
|
+
# @return [String, nil]
|
|
24
|
+
optional :id, String
|
|
25
|
+
|
|
26
|
+
# @!attribute name
|
|
27
|
+
# Optional display name for the experiment.
|
|
28
|
+
#
|
|
29
|
+
# @return [String, nil]
|
|
30
|
+
optional :name, String
|
|
31
|
+
|
|
32
|
+
# @!method initialize(bucketing_key:, variants:, id: nil, name: nil)
|
|
33
|
+
# Some parameter documentations has been truncated, see
|
|
34
|
+
# {Courier::Models::JourneyExperiment} for more details.
|
|
35
|
+
#
|
|
36
|
+
# A/B experiment config for a send node. The recipient is deterministically
|
|
37
|
+
# bucketed by `bucketingKey` and routed to one of the `variants` in proportion to
|
|
38
|
+
# its `weight`. Present on a send node INSTEAD OF `message.template`.
|
|
39
|
+
#
|
|
40
|
+
# @param bucketing_key [String] The value used to deterministically assign a recipient to a variant. Must be non
|
|
41
|
+
#
|
|
42
|
+
# @param variants [Array<Courier::Models::JourneyExperimentVariant>] Between 2 and 10 weighted template variants.
|
|
43
|
+
#
|
|
44
|
+
# @param id [String] Unique experiment id (prefixed `exp_`). Omit to have one generated automatically
|
|
45
|
+
#
|
|
46
|
+
# @param name [String] Optional display name for the experiment.
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class JourneyExperimentVariant < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute id
|
|
7
|
+
#
|
|
8
|
+
# @return [String]
|
|
9
|
+
required :id, String
|
|
10
|
+
|
|
11
|
+
# @!attribute template_id
|
|
12
|
+
# The notification template sent for this variant.
|
|
13
|
+
#
|
|
14
|
+
# @return [String]
|
|
15
|
+
required :template_id, String, api_name: :templateId
|
|
16
|
+
|
|
17
|
+
# @!attribute weight
|
|
18
|
+
# Relative routing weight. Must be non-negative.
|
|
19
|
+
#
|
|
20
|
+
# @return [Float]
|
|
21
|
+
required :weight, Float
|
|
22
|
+
|
|
23
|
+
# @!attribute name
|
|
24
|
+
# Optional display name for the variant.
|
|
25
|
+
#
|
|
26
|
+
# @return [String, nil]
|
|
27
|
+
optional :name, String
|
|
28
|
+
|
|
29
|
+
# @!method initialize(id:, template_id:, weight:, name: nil)
|
|
30
|
+
# A single weighted variant of an experiment. Variant ids must be unique within
|
|
31
|
+
# the experiment and the sum of all variant weights must be greater than 0.
|
|
32
|
+
# Weights are relative (no sum-to-100 requirement) — routing normalizes them
|
|
33
|
+
# proportionally.
|
|
34
|
+
#
|
|
35
|
+
# @param id [String]
|
|
36
|
+
#
|
|
37
|
+
# @param template_id [String] The notification template sent for this variant.
|
|
38
|
+
#
|
|
39
|
+
# @param weight [Float] Relative routing weight. Must be non-negative.
|
|
40
|
+
#
|
|
41
|
+
# @param name [String] Optional display name for the variant.
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -14,7 +14,7 @@ module Courier
|
|
|
14
14
|
# Trigger fired by a segment event (`identify`, `group`, or `track`).
|
|
15
15
|
variant -> { Courier::JourneySegmentTriggerNode }
|
|
16
16
|
|
|
17
|
-
# Send a notification template
|
|
17
|
+
# Send to the recipient. A send node sources its content from EXACTLY ONE of `message.template` (a single notification template) or `experiment` (an A/B split across weighted template variants) — supplying both, or neither, is rejected. Optionally override the recipient address, delay the send, or attach `data`.
|
|
18
18
|
variant -> { Courier::JourneySendNode }
|
|
19
19
|
|
|
20
20
|
# Pause the journey run for a fixed `duration`.
|
|
@@ -26,12 +26,23 @@ module Courier
|
|
|
26
26
|
# @return [Array<String>, Courier::Models::JourneyConditionGroup, Courier::Models::JourneyConditionNestedGroup, nil]
|
|
27
27
|
optional :conditions, union: -> { Courier::JourneyConditionsField }
|
|
28
28
|
|
|
29
|
-
# @!
|
|
29
|
+
# @!attribute experiment
|
|
30
|
+
# A/B experiment config for a send node. The recipient is deterministically
|
|
31
|
+
# bucketed by `bucketingKey` and routed to one of the `variants` in proportion to
|
|
32
|
+
# its `weight`. Present on a send node INSTEAD OF `message.template`.
|
|
33
|
+
#
|
|
34
|
+
# @return [Courier::Models::JourneyExperiment, nil]
|
|
35
|
+
optional :experiment, -> { Courier::JourneyExperiment }
|
|
36
|
+
|
|
37
|
+
# @!method initialize(message:, type:, id: nil, conditions: nil, experiment: nil)
|
|
30
38
|
# Some parameter documentations has been truncated, see
|
|
31
39
|
# {Courier::Models::JourneySendNode} for more details.
|
|
32
40
|
#
|
|
33
|
-
# Send
|
|
34
|
-
#
|
|
41
|
+
# Send to the recipient. A send node sources its content from EXACTLY ONE of
|
|
42
|
+
# `message.template` (a single notification template) or `experiment` (an A/B
|
|
43
|
+
# split across weighted template variants) — supplying both, or neither, is
|
|
44
|
+
# rejected. Optionally override the recipient address, delay the send, or attach
|
|
45
|
+
# `data`.
|
|
35
46
|
#
|
|
36
47
|
# @param message [Courier::Models::JourneySendNode::Message]
|
|
37
48
|
#
|
|
@@ -40,14 +51,11 @@ module Courier
|
|
|
40
51
|
# @param id [String]
|
|
41
52
|
#
|
|
42
53
|
# @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
|
|
54
|
+
#
|
|
55
|
+
# @param experiment [Courier::Models::JourneyExperiment] A/B experiment config for a send node. The recipient is deterministically bucket
|
|
43
56
|
|
|
44
57
|
# @see Courier::Models::JourneySendNode#message
|
|
45
58
|
class Message < Courier::Internal::Type::BaseModel
|
|
46
|
-
# @!attribute template
|
|
47
|
-
#
|
|
48
|
-
# @return [String]
|
|
49
|
-
required :template, String
|
|
50
|
-
|
|
51
59
|
# @!attribute data
|
|
52
60
|
#
|
|
53
61
|
# @return [Hash{Symbol=>Object}, nil]
|
|
@@ -58,15 +66,20 @@ module Courier
|
|
|
58
66
|
# @return [Courier::Models::JourneySendNode::Message::Delay, nil]
|
|
59
67
|
optional :delay, -> { Courier::JourneySendNode::Message::Delay }
|
|
60
68
|
|
|
69
|
+
# @!attribute template
|
|
70
|
+
#
|
|
71
|
+
# @return [String, nil]
|
|
72
|
+
optional :template, String
|
|
73
|
+
|
|
61
74
|
# @!attribute to
|
|
62
75
|
#
|
|
63
76
|
# @return [Courier::Models::JourneySendNode::Message::To, nil]
|
|
64
77
|
optional :to, -> { Courier::JourneySendNode::Message::To }
|
|
65
78
|
|
|
66
|
-
# @!method initialize(
|
|
67
|
-
# @param template [String]
|
|
79
|
+
# @!method initialize(data: nil, delay: nil, template: nil, to: nil)
|
|
68
80
|
# @param data [Hash{Symbol=>Object}]
|
|
69
81
|
# @param delay [Courier::Models::JourneySendNode::Message::Delay]
|
|
82
|
+
# @param template [String]
|
|
70
83
|
# @param to [Courier::Models::JourneySendNode::Message::To]
|
|
71
84
|
|
|
72
85
|
# @see Courier::Models::JourneySendNode::Message#delay
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
# @see Courier::Resources::
|
|
5
|
+
# @see Courier::Resources::WorkspacePreferences#publish
|
|
6
6
|
class PublishPreferencesResponse < Courier::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute page_id
|
|
8
8
|
# Id of the published page snapshot.
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
# @see Courier::Resources::
|
|
6
|
-
class
|
|
5
|
+
# @see Courier::Resources::WorkspacePreferences#archive
|
|
6
|
+
class WorkspacePreferenceArchiveParams < Courier::Internal::Type::BaseModel
|
|
7
7
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Courier::Internal::Type::RequestParameters
|
|
9
9
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::WorkspacePreferences#create
|
|
6
|
+
class WorkspacePreferenceCreateParams < Courier::Models::WorkspacePreferenceCreateRequest
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
class
|
|
5
|
+
class WorkspacePreferenceCreateRequest < Courier::Internal::Type::BaseModel
|
|
6
6
|
# @!attribute name
|
|
7
|
-
# Human-readable name for the
|
|
7
|
+
# Human-readable name for the workspace preference.
|
|
8
8
|
#
|
|
9
9
|
# @return [String]
|
|
10
10
|
required :name, String
|
|
11
11
|
|
|
12
12
|
# @!attribute has_custom_routing
|
|
13
|
-
# Whether the
|
|
13
|
+
# Whether the workspace preference defines custom routing for its topics.
|
|
14
14
|
#
|
|
15
15
|
# @return [Boolean, nil]
|
|
16
16
|
optional :has_custom_routing, Courier::Internal::Type::Boolean, nil?: true
|
|
17
17
|
|
|
18
18
|
# @!attribute routing_options
|
|
19
|
-
# Default channels for the
|
|
19
|
+
# Default channels for the workspace preference. Defaults to empty if omitted.
|
|
20
20
|
#
|
|
21
21
|
# @return [Array<Symbol, Courier::Models::ChannelClassification>, nil]
|
|
22
22
|
optional :routing_options,
|
|
@@ -24,13 +24,13 @@ module Courier
|
|
|
24
24
|
nil?: true
|
|
25
25
|
|
|
26
26
|
# @!method initialize(name:, has_custom_routing: nil, routing_options: nil)
|
|
27
|
-
# Request body for creating a preference
|
|
27
|
+
# Request body for creating a workspace preference.
|
|
28
28
|
#
|
|
29
|
-
# @param name [String] Human-readable name for the
|
|
29
|
+
# @param name [String] Human-readable name for the workspace preference.
|
|
30
30
|
#
|
|
31
|
-
# @param has_custom_routing [Boolean, nil] Whether the
|
|
31
|
+
# @param has_custom_routing [Boolean, nil] Whether the workspace preference defines custom routing for its topics.
|
|
32
32
|
#
|
|
33
|
-
# @param routing_options [Array<Symbol, Courier::Models::ChannelClassification>, nil] Default channels for the
|
|
33
|
+
# @param routing_options [Array<Symbol, Courier::Models::ChannelClassification>, nil] Default channels for the workspace preference. Defaults to empty if omitted.
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
36
|
end
|
data/lib/courier/models/{preference_section_get_response.rb → workspace_preference_get_response.rb}
RENAMED
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
# @see Courier::Resources::
|
|
6
|
-
class
|
|
5
|
+
# @see Courier::Resources::WorkspacePreferences#create
|
|
6
|
+
class WorkspacePreferenceGetResponse < Courier::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute id
|
|
8
|
-
# The preference
|
|
8
|
+
# The workspace preference id.
|
|
9
9
|
#
|
|
10
10
|
# @return [String]
|
|
11
11
|
required :id, String
|
|
12
12
|
|
|
13
13
|
# @!attribute created
|
|
14
|
-
# ISO-8601 timestamp of when the
|
|
14
|
+
# ISO-8601 timestamp of when the workspace preference was created.
|
|
15
15
|
#
|
|
16
16
|
# @return [String]
|
|
17
17
|
required :created, String
|
|
18
18
|
|
|
19
19
|
# @!attribute has_custom_routing
|
|
20
|
-
# Whether the
|
|
20
|
+
# Whether the workspace preference defines custom routing for its topics.
|
|
21
21
|
#
|
|
22
22
|
# @return [Boolean]
|
|
23
23
|
required :has_custom_routing, Courier::Internal::Type::Boolean
|
|
@@ -29,16 +29,16 @@ module Courier
|
|
|
29
29
|
required :name, String
|
|
30
30
|
|
|
31
31
|
# @!attribute routing_options
|
|
32
|
-
# Default channels for the
|
|
32
|
+
# Default channels for the workspace preference. May be empty.
|
|
33
33
|
#
|
|
34
34
|
# @return [Array<Symbol, Courier::Models::ChannelClassification>]
|
|
35
35
|
required :routing_options, -> { Courier::Internal::Type::ArrayOf[enum: Courier::ChannelClassification] }
|
|
36
36
|
|
|
37
37
|
# @!attribute topics
|
|
38
|
-
# The topics contained in this
|
|
38
|
+
# The topics contained in this workspace preference.
|
|
39
39
|
#
|
|
40
|
-
# @return [Array<Courier::Models::
|
|
41
|
-
required :topics, -> { Courier::Internal::Type::ArrayOf[Courier::
|
|
40
|
+
# @return [Array<Courier::Models::WorkspacePreferenceTopicGetResponse>]
|
|
41
|
+
required :topics, -> { Courier::Internal::Type::ArrayOf[Courier::WorkspacePreferenceTopicGetResponse] }
|
|
42
42
|
|
|
43
43
|
# @!attribute creator
|
|
44
44
|
# Id of the creator.
|
|
@@ -59,19 +59,19 @@ module Courier
|
|
|
59
59
|
optional :updater, String, nil?: true
|
|
60
60
|
|
|
61
61
|
# @!method initialize(id:, created:, has_custom_routing:, name:, routing_options:, topics:, creator: nil, updated: nil, updater: nil)
|
|
62
|
-
# A preference
|
|
62
|
+
# A workspace preference in your workspace, including its topics.
|
|
63
63
|
#
|
|
64
|
-
# @param id [String] The preference
|
|
64
|
+
# @param id [String] The workspace preference id.
|
|
65
65
|
#
|
|
66
|
-
# @param created [String] ISO-8601 timestamp of when the
|
|
66
|
+
# @param created [String] ISO-8601 timestamp of when the workspace preference was created.
|
|
67
67
|
#
|
|
68
|
-
# @param has_custom_routing [Boolean] Whether the
|
|
68
|
+
# @param has_custom_routing [Boolean] Whether the workspace preference defines custom routing for its topics.
|
|
69
69
|
#
|
|
70
70
|
# @param name [String] Human-readable name.
|
|
71
71
|
#
|
|
72
|
-
# @param routing_options [Array<Symbol, Courier::Models::ChannelClassification>] Default channels for the
|
|
72
|
+
# @param routing_options [Array<Symbol, Courier::Models::ChannelClassification>] Default channels for the workspace preference. May be empty.
|
|
73
73
|
#
|
|
74
|
-
# @param topics [Array<Courier::Models::
|
|
74
|
+
# @param topics [Array<Courier::Models::WorkspacePreferenceTopicGetResponse>] The topics contained in this workspace preference.
|
|
75
75
|
#
|
|
76
76
|
# @param creator [String, nil] Id of the creator.
|
|
77
77
|
#
|
data/lib/courier/models/{preference_section_publish_params.rb → workspace_preference_list_params.rb}
RENAMED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
# @see Courier::Resources::
|
|
6
|
-
class
|
|
5
|
+
# @see Courier::Resources::WorkspacePreferences#list
|
|
6
|
+
class WorkspacePreferenceListParams < Courier::Internal::Type::BaseModel
|
|
7
7
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Courier::Internal::Type::RequestParameters
|
|
9
9
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::WorkspacePreferences#list
|
|
6
|
+
class WorkspacePreferenceListResponse < Courier::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute results
|
|
8
|
+
#
|
|
9
|
+
# @return [Array<Courier::Models::WorkspacePreferenceGetResponse>]
|
|
10
|
+
required :results, -> { Courier::Internal::Type::ArrayOf[Courier::WorkspacePreferenceGetResponse] }
|
|
11
|
+
|
|
12
|
+
# @!method initialize(results:)
|
|
13
|
+
# The workspace's preferences, each with its topics.
|
|
14
|
+
#
|
|
15
|
+
# @param results [Array<Courier::Models::WorkspacePreferenceGetResponse>]
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
# @see Courier::Resources::
|
|
6
|
-
class
|
|
5
|
+
# @see Courier::Resources::WorkspacePreferences#publish
|
|
6
|
+
class WorkspacePreferencePublishParams < Courier::Internal::Type::BaseModel
|
|
7
7
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Courier::Internal::Type::RequestParameters
|
|
9
9
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
# @see Courier::Resources::
|
|
6
|
-
class
|
|
5
|
+
# @see Courier::Resources::WorkspacePreferences#replace
|
|
6
|
+
class WorkspacePreferenceReplaceParams < Courier::Models::WorkspacePreferenceReplaceRequest
|
|
7
7
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Courier::Internal::Type::RequestParameters
|
|
9
9
|
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
class
|
|
5
|
+
class WorkspacePreferenceReplaceRequest < Courier::Internal::Type::BaseModel
|
|
6
6
|
# @!attribute name
|
|
7
|
-
# Human-readable name for the
|
|
7
|
+
# Human-readable name for the workspace preference.
|
|
8
8
|
#
|
|
9
9
|
# @return [String]
|
|
10
10
|
required :name, String
|
|
11
11
|
|
|
12
12
|
# @!attribute has_custom_routing
|
|
13
|
-
# Whether the
|
|
13
|
+
# Whether the workspace preference defines custom routing for its topics.
|
|
14
14
|
#
|
|
15
15
|
# @return [Boolean, nil]
|
|
16
16
|
optional :has_custom_routing, Courier::Internal::Type::Boolean, nil?: true
|
|
17
17
|
|
|
18
18
|
# @!attribute routing_options
|
|
19
|
-
# Default channels for the
|
|
19
|
+
# Default channels for the workspace preference. Omit to clear.
|
|
20
20
|
#
|
|
21
21
|
# @return [Array<Symbol, Courier::Models::ChannelClassification>, nil]
|
|
22
22
|
optional :routing_options,
|
|
@@ -24,14 +24,14 @@ module Courier
|
|
|
24
24
|
nil?: true
|
|
25
25
|
|
|
26
26
|
# @!method initialize(name:, has_custom_routing: nil, routing_options: nil)
|
|
27
|
-
# Request body for replacing a preference
|
|
27
|
+
# Request body for replacing a workspace preference. Full document replacement;
|
|
28
28
|
# missing optional fields are cleared.
|
|
29
29
|
#
|
|
30
|
-
# @param name [String] Human-readable name for the
|
|
30
|
+
# @param name [String] Human-readable name for the workspace preference.
|
|
31
31
|
#
|
|
32
|
-
# @param has_custom_routing [Boolean, nil] Whether the
|
|
32
|
+
# @param has_custom_routing [Boolean, nil] Whether the workspace preference defines custom routing for its topics.
|
|
33
33
|
#
|
|
34
|
-
# @param routing_options [Array<Symbol, Courier::Models::ChannelClassification>, nil] Default channels for the
|
|
34
|
+
# @param routing_options [Array<Symbol, Courier::Models::ChannelClassification>, nil] Default channels for the workspace preference. Omit to clear.
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
end
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
# @see Courier::Resources::
|
|
6
|
-
class
|
|
5
|
+
# @see Courier::Resources::WorkspacePreferences#retrieve
|
|
6
|
+
class WorkspacePreferenceRetrieveParams < Courier::Internal::Type::BaseModel
|
|
7
7
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Courier::Internal::Type::RequestParameters
|
|
9
9
|
|