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.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +31 -0
  3. data/lib/courier/client.rb +3 -3
  4. data/lib/courier/models/cancel_journey_request.rb +39 -0
  5. data/lib/courier/models/cancel_journey_response.rb +55 -0
  6. data/lib/courier/models/{preference_section_list_params.rb → journey_cancel_params.rb} +2 -2
  7. data/lib/courier/models/journey_experiment.rb +49 -0
  8. data/lib/courier/models/journey_experiment_variant.rb +44 -0
  9. data/lib/courier/models/journey_node.rb +1 -1
  10. data/lib/courier/models/journey_send_node.rb +23 -10
  11. data/lib/courier/models/publish_preferences_response.rb +1 -1
  12. data/lib/courier/models/{preference_section_archive_params.rb → workspace_preference_archive_params.rb} +2 -2
  13. data/lib/courier/models/workspace_preference_create_params.rb +14 -0
  14. data/lib/courier/models/{preference_section_create_request.rb → workspace_preference_create_request.rb} +8 -8
  15. data/lib/courier/models/{preference_section_get_response.rb → workspace_preference_get_response.rb} +15 -15
  16. data/lib/courier/models/{preference_section_publish_params.rb → workspace_preference_list_params.rb} +2 -2
  17. data/lib/courier/models/workspace_preference_list_response.rb +18 -0
  18. data/lib/courier/models/{preference_section_create_params.rb → workspace_preference_publish_params.rb} +2 -2
  19. data/lib/courier/models/{preference_section_replace_params.rb → workspace_preference_replace_params.rb} +2 -2
  20. data/lib/courier/models/{preference_section_replace_request.rb → workspace_preference_replace_request.rb} +8 -8
  21. data/lib/courier/models/{preference_section_retrieve_params.rb → workspace_preference_retrieve_params.rb} +2 -2
  22. data/lib/courier/models/{preference_topic_create_request.rb → workspace_preference_topic_create_request.rb} +9 -9
  23. data/lib/courier/models/{preference_topic_get_response.rb → workspace_preference_topic_get_response.rb} +8 -8
  24. data/lib/courier/models/workspace_preference_topic_list_response.rb +17 -0
  25. data/lib/courier/models/{preference_topic_replace_request.rb → workspace_preference_topic_replace_request.rb} +8 -8
  26. data/lib/courier/models/{preference_sections → workspace_preferences}/topic_archive_params.rb +2 -2
  27. data/lib/courier/models/{preference_sections → workspace_preferences}/topic_create_params.rb +3 -3
  28. data/lib/courier/models/{preference_sections → workspace_preferences}/topic_list_params.rb +2 -2
  29. data/lib/courier/models/{preference_sections → workspace_preferences}/topic_replace_params.rb +3 -3
  30. data/lib/courier/models/{preference_sections → workspace_preferences}/topic_retrieve_params.rb +2 -2
  31. data/lib/courier/models.rb +40 -30
  32. data/lib/courier/resources/journeys.rb +30 -0
  33. data/lib/courier/resources/notifications/checks.rb +3 -3
  34. data/lib/courier/resources/{preference_sections → workspace_preferences}/topics.rb +40 -37
  35. data/lib/courier/resources/{preference_sections.rb → workspace_preferences.rb} +40 -40
  36. data/lib/courier/version.rb +1 -1
  37. data/lib/courier.rb +26 -21
  38. data/rbi/courier/client.rbi +2 -2
  39. data/rbi/courier/models/cancel_journey_request.rbi +68 -0
  40. data/rbi/courier/models/cancel_journey_response.rbi +81 -0
  41. data/rbi/courier/models/journey_cancel_params.rbi +27 -0
  42. data/rbi/courier/models/journey_experiment.rbi +74 -0
  43. data/rbi/courier/models/journey_experiment_variant.rbi +61 -0
  44. data/rbi/courier/models/journey_send_node.rbi +32 -11
  45. data/rbi/courier/models/{preference_section_retrieve_params.rbi → workspace_preference_archive_params.rbi} +2 -2
  46. data/rbi/courier/models/{preference_section_create_params.rbi → workspace_preference_create_params.rbi} +2 -2
  47. data/rbi/courier/models/{preference_section_create_request.rbi → workspace_preference_create_request.rbi} +9 -9
  48. data/rbi/courier/models/{preference_section_get_response.rbi → workspace_preference_get_response.rbi} +17 -16
  49. data/rbi/courier/models/{preference_section_list_params.rbi → workspace_preference_list_params.rbi} +2 -2
  50. data/rbi/courier/models/{preference_topic_list_response.rbi → workspace_preference_list_response.rbi} +6 -6
  51. data/rbi/courier/models/{preference_section_publish_params.rbi → workspace_preference_publish_params.rbi} +2 -2
  52. data/rbi/courier/models/{preference_section_replace_params.rbi → workspace_preference_replace_params.rbi} +2 -2
  53. data/rbi/courier/models/{preference_section_replace_request.rbi → workspace_preference_replace_request.rbi} +9 -9
  54. data/rbi/courier/models/{preference_section_archive_params.rbi → workspace_preference_retrieve_params.rbi} +2 -2
  55. data/rbi/courier/models/{preference_topic_create_request.rbi → workspace_preference_topic_create_request.rbi} +22 -17
  56. data/rbi/courier/models/{preference_topic_get_response.rbi → workspace_preference_topic_get_response.rbi} +23 -17
  57. data/rbi/courier/models/workspace_preference_topic_list_response.rbi +36 -0
  58. data/rbi/courier/models/{preference_topic_replace_request.rbi → workspace_preference_topic_replace_request.rbi} +22 -17
  59. data/rbi/courier/models/{preference_sections → workspace_preferences}/topic_archive_params.rbi +2 -2
  60. data/rbi/courier/models/{preference_sections → workspace_preferences}/topic_create_params.rbi +3 -3
  61. data/rbi/courier/models/{preference_sections → workspace_preferences}/topic_list_params.rbi +2 -2
  62. data/rbi/courier/models/{preference_sections → workspace_preferences}/topic_replace_params.rbi +3 -3
  63. data/rbi/courier/models/{preference_sections → workspace_preferences}/topic_retrieve_params.rbi +2 -2
  64. data/rbi/courier/models.rbi +53 -36
  65. data/rbi/courier/resources/journeys.rbi +25 -0
  66. data/rbi/courier/resources/notifications/checks.rbi +3 -3
  67. data/rbi/courier/resources/{preference_sections → workspace_preferences}/topics.rbi +25 -22
  68. data/rbi/courier/resources/{preference_sections.rbi → workspace_preferences.rbi} +27 -27
  69. data/sig/courier/client.rbs +1 -1
  70. data/sig/courier/models/cancel_journey_request.rbs +33 -0
  71. data/sig/courier/models/cancel_journey_response.rbs +35 -0
  72. data/sig/courier/models/{preference_section_list_params.rbs → journey_cancel_params.rbs} +2 -2
  73. data/sig/courier/models/journey_experiment.rbs +39 -0
  74. data/sig/courier/models/journey_experiment_variant.rbs +32 -0
  75. data/sig/courier/models/journey_send_node.rbs +19 -8
  76. data/sig/courier/models/{preference_section_retrieve_params.rbs → workspace_preference_archive_params.rbs} +2 -2
  77. data/sig/courier/models/workspace_preference_create_params.rbs +15 -0
  78. data/sig/courier/models/{preference_section_replace_request.rbs → workspace_preference_create_request.rbs} +2 -2
  79. data/sig/courier/models/{preference_section_get_response.rbs → workspace_preference_get_response.rbs} +6 -6
  80. data/sig/courier/models/{preference_section_publish_params.rbs → workspace_preference_list_params.rbs} +2 -2
  81. data/sig/courier/models/workspace_preference_list_response.rbs +18 -0
  82. data/sig/courier/models/{preference_section_create_params.rbs → workspace_preference_publish_params.rbs} +2 -2
  83. data/sig/courier/models/{preference_section_replace_params.rbs → workspace_preference_replace_params.rbs} +2 -2
  84. data/sig/courier/models/{preference_section_create_request.rbs → workspace_preference_replace_request.rbs} +2 -2
  85. data/sig/courier/models/{preference_section_archive_params.rbs → workspace_preference_retrieve_params.rbs} +2 -2
  86. data/sig/courier/models/{preference_topic_create_request.rbs → workspace_preference_topic_create_request.rbs} +12 -12
  87. data/sig/courier/models/{preference_topic_get_response.rbs → workspace_preference_topic_get_response.rbs} +12 -12
  88. data/sig/courier/models/workspace_preference_topic_list_response.rbs +18 -0
  89. data/sig/courier/models/{preference_topic_replace_request.rbs → workspace_preference_topic_replace_request.rbs} +12 -12
  90. data/sig/courier/models/{preference_sections → workspace_preferences}/topic_archive_params.rbs +1 -1
  91. data/sig/courier/models/{preference_sections → workspace_preferences}/topic_create_params.rbs +2 -2
  92. data/sig/courier/models/{preference_sections → workspace_preferences}/topic_list_params.rbs +1 -1
  93. data/sig/courier/models/{preference_sections → workspace_preferences}/topic_replace_params.rbs +2 -2
  94. data/sig/courier/models/{preference_sections → workspace_preferences}/topic_retrieve_params.rbs +1 -1
  95. data/sig/courier/models.rbs +40 -30
  96. data/sig/courier/resources/journeys.rbs +5 -0
  97. data/sig/courier/resources/{preference_sections → workspace_preferences}/topics.rbs +9 -9
  98. data/sig/courier/resources/{preference_sections.rbs → workspace_preferences.rbs} +6 -6
  99. metadata +80 -65
  100. data/lib/courier/models/preference_section_list_response.rb +0 -18
  101. data/lib/courier/models/preference_topic_list_response.rb +0 -17
  102. data/rbi/courier/models/preference_section_list_response.rbi +0 -35
  103. data/sig/courier/models/preference_section_list_response.rbs +0 -18
  104. data/sig/courier/models/preference_topic_list_response.rbs +0 -16
@@ -2,20 +2,21 @@
2
2
 
3
3
  module Courier
4
4
  module Resources
5
- class PreferenceSections
5
+ class WorkspacePreferences
6
6
  class Topics
7
- # Create a subscription preference topic inside a section. Fails with 404 if the
8
- # section does not exist. The topic id is generated and returned.
7
+ # Create a subscription preference topic inside a workspace preference. Fails with
8
+ # 404 if the workspace preference does not exist. The topic id is generated and
9
+ # returned.
9
10
  sig do
10
11
  params(
11
12
  section_id: String,
12
13
  default_status:
13
- Courier::PreferenceTopicCreateRequest::DefaultStatus::OrSymbol,
14
+ Courier::WorkspacePreferenceTopicCreateRequest::DefaultStatus::OrSymbol,
14
15
  name: String,
15
16
  allowed_preferences:
16
17
  T.nilable(
17
18
  T::Array[
18
- Courier::PreferenceTopicCreateRequest::AllowedPreference::OrSymbol
19
+ Courier::WorkspacePreferenceTopicCreateRequest::AllowedPreference::OrSymbol
19
20
  ]
20
21
  ),
21
22
  include_unsubscribe_header: T.nilable(T::Boolean),
@@ -23,10 +24,10 @@ module Courier
23
24
  T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]),
24
25
  topic_data: T.nilable(T::Hash[Symbol, T.anything]),
25
26
  request_options: Courier::RequestOptions::OrHash
26
- ).returns(Courier::PreferenceTopicGetResponse)
27
+ ).returns(Courier::WorkspacePreferenceTopicGetResponse)
27
28
  end
28
29
  def create(
29
- # Id of the preference section to create the topic in.
30
+ # Id of the workspace preference to create the topic in.
30
31
  section_id,
31
32
  # The default subscription status applied when a recipient has not set their own.
32
33
  default_status:,
@@ -45,39 +46,41 @@ module Courier
45
46
  )
46
47
  end
47
48
 
48
- # Retrieve a topic within a section. Returns 404 if the section does not exist,
49
- # the topic does not exist, or the topic belongs to a different section.
49
+ # Retrieve a topic within a workspace preference. Returns 404 if the workspace
50
+ # preference does not exist, the topic does not exist, or the topic belongs to a
51
+ # different workspace preference.
50
52
  sig do
51
53
  params(
52
54
  topic_id: String,
53
55
  section_id: String,
54
56
  request_options: Courier::RequestOptions::OrHash
55
- ).returns(Courier::PreferenceTopicGetResponse)
57
+ ).returns(Courier::WorkspacePreferenceTopicGetResponse)
56
58
  end
57
59
  def retrieve(
58
60
  # Id of the subscription preference topic.
59
61
  topic_id,
60
- # Id of the preference section.
62
+ # Id of the workspace preference.
61
63
  section_id:,
62
64
  request_options: {}
63
65
  )
64
66
  end
65
67
 
66
- # List the topics in a preference section.
68
+ # List the topics in a workspace preference.
67
69
  sig do
68
70
  params(
69
71
  section_id: String,
70
72
  request_options: Courier::RequestOptions::OrHash
71
- ).returns(Courier::PreferenceTopicListResponse)
73
+ ).returns(Courier::WorkspacePreferenceTopicListResponse)
72
74
  end
73
75
  def list(
74
- # Id of the preference section.
76
+ # Id of the workspace preference.
75
77
  section_id,
76
78
  request_options: {}
77
79
  )
78
80
  end
79
81
 
80
- # Archive a topic and remove it from its section. Same 404 rules as GET.
82
+ # Archive a topic and remove it from its workspace preference. Same 404 rules as
83
+ # GET.
81
84
  sig do
82
85
  params(
83
86
  topic_id: String,
@@ -88,25 +91,25 @@ module Courier
88
91
  def archive(
89
92
  # Id of the subscription preference topic.
90
93
  topic_id,
91
- # Id of the preference section.
94
+ # Id of the workspace preference.
92
95
  section_id:,
93
96
  request_options: {}
94
97
  )
95
98
  end
96
99
 
97
- # Replace a topic within a section. Full document replacement; missing optional
98
- # fields are cleared. Same 404 rules as GET.
100
+ # Replace a topic within a workspace preference. Full document replacement;
101
+ # missing optional fields are cleared. Same 404 rules as GET.
99
102
  sig do
100
103
  params(
101
104
  topic_id: String,
102
105
  section_id: String,
103
106
  default_status:
104
- Courier::PreferenceTopicReplaceRequest::DefaultStatus::OrSymbol,
107
+ Courier::WorkspacePreferenceTopicReplaceRequest::DefaultStatus::OrSymbol,
105
108
  name: String,
106
109
  allowed_preferences:
107
110
  T.nilable(
108
111
  T::Array[
109
- Courier::PreferenceTopicReplaceRequest::AllowedPreference::OrSymbol
112
+ Courier::WorkspacePreferenceTopicReplaceRequest::AllowedPreference::OrSymbol
110
113
  ]
111
114
  ),
112
115
  include_unsubscribe_header: T.nilable(T::Boolean),
@@ -114,12 +117,12 @@ module Courier
114
117
  T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]),
115
118
  topic_data: T.nilable(T::Hash[Symbol, T.anything]),
116
119
  request_options: Courier::RequestOptions::OrHash
117
- ).returns(Courier::PreferenceTopicGetResponse)
120
+ ).returns(Courier::WorkspacePreferenceTopicGetResponse)
118
121
  end
119
122
  def replace(
120
123
  # Path param: Id of the subscription preference topic.
121
124
  topic_id,
122
- # Path param: Id of the preference section.
125
+ # Path param: Id of the workspace preference.
123
126
  section_id:,
124
127
  # Body param: The default subscription status applied when a recipient has not set
125
128
  # their own.
@@ -2,12 +2,12 @@
2
2
 
3
3
  module Courier
4
4
  module Resources
5
- class PreferenceSections
6
- sig { returns(Courier::Resources::PreferenceSections::Topics) }
5
+ class WorkspacePreferences
6
+ sig { returns(Courier::Resources::WorkspacePreferences::Topics) }
7
7
  attr_reader :topics
8
8
 
9
- # Create a preference section in your workspace. The section id is generated and
10
- # returned. Topics are created inside a section via POST
9
+ # Create a workspace preference. The workspace preference id is generated and
10
+ # returned. Topics are created inside a workspace preference via POST
11
11
  # /preferences/sections/{section_id}/topics.
12
12
  sig do
13
13
  params(
@@ -16,45 +16,45 @@ module Courier
16
16
  routing_options:
17
17
  T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]),
18
18
  request_options: Courier::RequestOptions::OrHash
19
- ).returns(Courier::PreferenceSectionGetResponse)
19
+ ).returns(Courier::WorkspacePreferenceGetResponse)
20
20
  end
21
21
  def create(
22
- # Human-readable name for the section.
22
+ # Human-readable name for the workspace preference.
23
23
  name:,
24
- # Whether the section defines custom routing for its topics.
24
+ # Whether the workspace preference defines custom routing for its topics.
25
25
  has_custom_routing: nil,
26
- # Default channels for the section. Defaults to empty if omitted.
26
+ # Default channels for the workspace preference. Defaults to empty if omitted.
27
27
  routing_options: nil,
28
28
  request_options: {}
29
29
  )
30
30
  end
31
31
 
32
- # Retrieve a preference section by id, including its topics.
32
+ # Retrieve a workspace preference by id, including its topics.
33
33
  sig do
34
34
  params(
35
35
  section_id: String,
36
36
  request_options: Courier::RequestOptions::OrHash
37
- ).returns(Courier::PreferenceSectionGetResponse)
37
+ ).returns(Courier::WorkspacePreferenceGetResponse)
38
38
  end
39
39
  def retrieve(
40
- # Id of the preference section.
40
+ # Id of the workspace preference.
41
41
  section_id,
42
42
  request_options: {}
43
43
  )
44
44
  end
45
45
 
46
- # List the workspace's preference sections. Each section embeds its topics. Scoped
47
- # to the workspace of the API key.
46
+ # List the workspace's preferences. Each workspace preference embeds its topics.
47
+ # Scoped to the workspace of the API key.
48
48
  sig do
49
49
  params(request_options: Courier::RequestOptions::OrHash).returns(
50
- Courier::PreferenceSectionListResponse
50
+ Courier::WorkspacePreferenceListResponse
51
51
  )
52
52
  end
53
53
  def list(request_options: {})
54
54
  end
55
55
 
56
- # Archive a preference section. The section must be empty: delete its topics
57
- # first, otherwise the request fails with 409.
56
+ # Archive a workspace preference. The workspace preference must be empty: delete
57
+ # its topics first, otherwise the request fails with 409.
58
58
  sig do
59
59
  params(
60
60
  section_id: String,
@@ -62,15 +62,15 @@ module Courier
62
62
  ).void
63
63
  end
64
64
  def archive(
65
- # Id of the preference section.
65
+ # Id of the workspace preference.
66
66
  section_id,
67
67
  request_options: {}
68
68
  )
69
69
  end
70
70
 
71
- # Publish the workspace's preferences page. Takes a snapshot of every section with
72
- # its topics under a new published version, making the current state visible on
73
- # the hosted preferences page (non-draft).
71
+ # Publish the workspace's preferences page. Takes a snapshot of every workspace
72
+ # preference with its topics under a new published version, making the current
73
+ # state visible on the hosted preferences page (non-draft).
74
74
  sig do
75
75
  params(request_options: Courier::RequestOptions::OrHash).returns(
76
76
  Courier::PublishPreferencesResponse
@@ -79,8 +79,8 @@ module Courier
79
79
  def publish(request_options: {})
80
80
  end
81
81
 
82
- # Replace a preference section. Full document replacement; missing optional fields
83
- # are cleared. Topics attached to the section are unaffected.
82
+ # Replace a workspace preference. Full document replacement; missing optional
83
+ # fields are cleared. Topics attached to the workspace preference are unaffected.
84
84
  sig do
85
85
  params(
86
86
  section_id: String,
@@ -89,16 +89,16 @@ module Courier
89
89
  routing_options:
90
90
  T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]),
91
91
  request_options: Courier::RequestOptions::OrHash
92
- ).returns(Courier::PreferenceSectionGetResponse)
92
+ ).returns(Courier::WorkspacePreferenceGetResponse)
93
93
  end
94
94
  def replace(
95
- # Id of the preference section.
95
+ # Id of the workspace preference.
96
96
  section_id,
97
- # Human-readable name for the section.
97
+ # Human-readable name for the workspace preference.
98
98
  name:,
99
- # Whether the section defines custom routing for its topics.
99
+ # Whether the workspace preference defines custom routing for its topics.
100
100
  has_custom_routing: nil,
101
- # Default channels for the section. Omit to clear.
101
+ # Default channels for the workspace preference. Omit to clear.
102
102
  routing_options: nil,
103
103
  request_options: {}
104
104
  )
@@ -42,7 +42,7 @@ module Courier
42
42
 
43
43
  attr_reader routing_strategies: Courier::Resources::RoutingStrategies
44
44
 
45
- attr_reader preference_sections: Courier::Resources::PreferenceSections
45
+ attr_reader workspace_preferences: Courier::Resources::WorkspacePreferences
46
46
 
47
47
  attr_reader profiles: Courier::Resources::Profiles
48
48
 
@@ -0,0 +1,33 @@
1
+ module Courier
2
+ module Models
3
+ type cancel_journey_request =
4
+ Courier::CancelJourneyRequest::ByCancelationToken
5
+ | Courier::CancelJourneyRequest::ByRunID
6
+
7
+ module CancelJourneyRequest
8
+ extend Courier::Internal::Type::Union
9
+
10
+ type by_cancelation_token = { cancelation_token: String }
11
+
12
+ class ByCancelationToken < Courier::Internal::Type::BaseModel
13
+ attr_accessor cancelation_token: String
14
+
15
+ def initialize: (cancelation_token: String) -> void
16
+
17
+ def to_hash: -> { cancelation_token: String }
18
+ end
19
+
20
+ type by_run_id = { run_id: String }
21
+
22
+ class ByRunID < Courier::Internal::Type::BaseModel
23
+ attr_accessor run_id: String
24
+
25
+ def initialize: (run_id: String) -> void
26
+
27
+ def to_hash: -> { run_id: String }
28
+ end
29
+
30
+ def self?.variants: -> ::Array[Courier::Models::cancel_journey_request]
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,35 @@
1
+ module Courier
2
+ module Models
3
+ type cancel_journey_response =
4
+ Courier::CancelJourneyResponse::TokenBranch
5
+ | Courier::CancelJourneyResponse::RunIDBranch
6
+
7
+ module CancelJourneyResponse
8
+ extend Courier::Internal::Type::Union
9
+
10
+ type token_branch = { cancelation_token: String }
11
+
12
+ class TokenBranch < Courier::Internal::Type::BaseModel
13
+ attr_accessor cancelation_token: String
14
+
15
+ def initialize: (cancelation_token: String) -> void
16
+
17
+ def to_hash: -> { cancelation_token: String }
18
+ end
19
+
20
+ type run_id_branch = { run_id: String, status: String }
21
+
22
+ class RunIDBranch < Courier::Internal::Type::BaseModel
23
+ attr_accessor run_id: String
24
+
25
+ attr_accessor status: String
26
+
27
+ def initialize: (run_id: String, status: String) -> void
28
+
29
+ def to_hash: -> { run_id: String, status: String }
30
+ end
31
+
32
+ def self?.variants: -> ::Array[Courier::Models::cancel_journey_response]
33
+ end
34
+ end
35
+ end
@@ -1,9 +1,9 @@
1
1
  module Courier
2
2
  module Models
3
- type preference_section_list_params =
3
+ type journey_cancel_params =
4
4
  { } & Courier::Internal::Type::request_parameters
5
5
 
6
- class PreferenceSectionListParams < Courier::Internal::Type::BaseModel
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,39 @@
1
+ module Courier
2
+ module Models
3
+ type journey_experiment =
4
+ {
5
+ bucketing_key: String,
6
+ variants: ::Array[Courier::JourneyExperimentVariant],
7
+ id: String,
8
+ name: String
9
+ }
10
+
11
+ class JourneyExperiment < Courier::Internal::Type::BaseModel
12
+ attr_accessor bucketing_key: String
13
+
14
+ attr_accessor variants: ::Array[Courier::JourneyExperimentVariant]
15
+
16
+ attr_reader id: String?
17
+
18
+ def id=: (String) -> String
19
+
20
+ attr_reader name: String?
21
+
22
+ def name=: (String) -> String
23
+
24
+ def initialize: (
25
+ bucketing_key: String,
26
+ variants: ::Array[Courier::JourneyExperimentVariant],
27
+ ?id: String,
28
+ ?name: String
29
+ ) -> void
30
+
31
+ def to_hash: -> {
32
+ bucketing_key: String,
33
+ variants: ::Array[Courier::JourneyExperimentVariant],
34
+ id: String,
35
+ name: String
36
+ }
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,32 @@
1
+ module Courier
2
+ module Models
3
+ type journey_experiment_variant =
4
+ { id: String, template_id: String, weight: Float, name: String }
5
+
6
+ class JourneyExperimentVariant < Courier::Internal::Type::BaseModel
7
+ attr_accessor id: String
8
+
9
+ attr_accessor template_id: String
10
+
11
+ attr_accessor weight: Float
12
+
13
+ attr_reader name: String?
14
+
15
+ def name=: (String) -> String
16
+
17
+ def initialize: (
18
+ id: String,
19
+ template_id: String,
20
+ weight: Float,
21
+ ?name: String
22
+ ) -> void
23
+
24
+ def to_hash: -> {
25
+ id: String,
26
+ template_id: String,
27
+ weight: Float,
28
+ name: String
29
+ }
30
+ end
31
+ end
32
+ end
@@ -5,7 +5,8 @@ module Courier
5
5
  message: Courier::JourneySendNode::Message,
6
6
  type: Courier::Models::JourneySendNode::type_,
7
7
  id: String,
8
- conditions: Courier::Models::journey_conditions_field
8
+ conditions: Courier::Models::journey_conditions_field,
9
+ experiment: Courier::JourneyExperiment
9
10
  }
10
11
 
11
12
  class JourneySendNode < Courier::Internal::Type::BaseModel
@@ -23,31 +24,37 @@ module Courier
23
24
  Courier::Models::journey_conditions_field
24
25
  ) -> Courier::Models::journey_conditions_field
25
26
 
27
+ attr_reader experiment: Courier::JourneyExperiment?
28
+
29
+ def experiment=: (
30
+ Courier::JourneyExperiment
31
+ ) -> Courier::JourneyExperiment
32
+
26
33
  def initialize: (
27
34
  message: Courier::JourneySendNode::Message,
28
35
  type: Courier::Models::JourneySendNode::type_,
29
36
  ?id: String,
30
- ?conditions: Courier::Models::journey_conditions_field
37
+ ?conditions: Courier::Models::journey_conditions_field,
38
+ ?experiment: Courier::JourneyExperiment
31
39
  ) -> void
32
40
 
33
41
  def to_hash: -> {
34
42
  message: Courier::JourneySendNode::Message,
35
43
  type: Courier::Models::JourneySendNode::type_,
36
44
  id: String,
37
- conditions: Courier::Models::journey_conditions_field
45
+ conditions: Courier::Models::journey_conditions_field,
46
+ experiment: Courier::JourneyExperiment
38
47
  }
39
48
 
40
49
  type message =
41
50
  {
42
- template: String,
43
51
  data: ::Hash[Symbol, top],
44
52
  delay: Courier::JourneySendNode::Message::Delay,
53
+ template: String,
45
54
  to: Courier::JourneySendNode::Message::To
46
55
  }
47
56
 
48
57
  class Message < Courier::Internal::Type::BaseModel
49
- attr_accessor template: String
50
-
51
58
  attr_reader data: ::Hash[Symbol, top]?
52
59
 
53
60
  def data=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
@@ -58,6 +65,10 @@ module Courier
58
65
  Courier::JourneySendNode::Message::Delay
59
66
  ) -> Courier::JourneySendNode::Message::Delay
60
67
 
68
+ attr_reader template: String?
69
+
70
+ def template=: (String) -> String
71
+
61
72
  attr_reader to: Courier::JourneySendNode::Message::To?
62
73
 
63
74
  def to=: (
@@ -65,16 +76,16 @@ module Courier
65
76
  ) -> Courier::JourneySendNode::Message::To
66
77
 
67
78
  def initialize: (
68
- template: String,
69
79
  ?data: ::Hash[Symbol, top],
70
80
  ?delay: Courier::JourneySendNode::Message::Delay,
81
+ ?template: String,
71
82
  ?to: Courier::JourneySendNode::Message::To
72
83
  ) -> void
73
84
 
74
85
  def to_hash: -> {
75
- template: String,
76
86
  data: ::Hash[Symbol, top],
77
87
  delay: Courier::JourneySendNode::Message::Delay,
88
+ template: String,
78
89
  to: Courier::JourneySendNode::Message::To
79
90
  }
80
91
 
@@ -1,9 +1,9 @@
1
1
  module Courier
2
2
  module Models
3
- type preference_section_retrieve_params =
3
+ type workspace_preference_archive_params =
4
4
  { section_id: String } & Courier::Internal::Type::request_parameters
5
5
 
6
- class PreferenceSectionRetrieveParams < Courier::Internal::Type::BaseModel
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,15 @@
1
+ module Courier
2
+ module Models
3
+ type workspace_preference_create_params =
4
+ { } & Courier::Internal::Type::request_parameters
5
+
6
+ class WorkspacePreferenceCreateParams < Courier::Models::WorkspacePreferenceCreateRequest
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ def initialize: (?request_options: Courier::request_opts) -> void
11
+
12
+ def to_hash: -> { request_options: Courier::RequestOptions }
13
+ end
14
+ end
15
+ end
@@ -1,13 +1,13 @@
1
1
  module Courier
2
2
  module Models
3
- type preference_section_replace_request =
3
+ type workspace_preference_create_request =
4
4
  {
5
5
  name: String,
6
6
  has_custom_routing: bool?,
7
7
  routing_options: ::Array[Courier::Models::channel_classification]?
8
8
  }
9
9
 
10
- class PreferenceSectionReplaceRequest < Courier::Internal::Type::BaseModel
10
+ class WorkspacePreferenceCreateRequest < Courier::Internal::Type::BaseModel
11
11
  attr_accessor name: String
12
12
 
13
13
  attr_accessor has_custom_routing: bool?
@@ -1,19 +1,19 @@
1
1
  module Courier
2
2
  module Models
3
- type preference_section_get_response =
3
+ type workspace_preference_get_response =
4
4
  {
5
5
  id: String,
6
6
  created: String,
7
7
  has_custom_routing: bool,
8
8
  name: String,
9
9
  routing_options: ::Array[Courier::Models::channel_classification],
10
- topics: ::Array[Courier::PreferenceTopicGetResponse],
10
+ topics: ::Array[Courier::WorkspacePreferenceTopicGetResponse],
11
11
  creator: String?,
12
12
  updated: String?,
13
13
  updater: String?
14
14
  }
15
15
 
16
- class PreferenceSectionGetResponse < Courier::Internal::Type::BaseModel
16
+ class WorkspacePreferenceGetResponse < Courier::Internal::Type::BaseModel
17
17
  attr_accessor id: String
18
18
 
19
19
  attr_accessor created: String
@@ -24,7 +24,7 @@ module Courier
24
24
 
25
25
  attr_accessor routing_options: ::Array[Courier::Models::channel_classification]
26
26
 
27
- attr_accessor topics: ::Array[Courier::PreferenceTopicGetResponse]
27
+ attr_accessor topics: ::Array[Courier::WorkspacePreferenceTopicGetResponse]
28
28
 
29
29
  attr_accessor creator: String?
30
30
 
@@ -38,7 +38,7 @@ module Courier
38
38
  has_custom_routing: bool,
39
39
  name: String,
40
40
  routing_options: ::Array[Courier::Models::channel_classification],
41
- topics: ::Array[Courier::PreferenceTopicGetResponse],
41
+ topics: ::Array[Courier::WorkspacePreferenceTopicGetResponse],
42
42
  ?creator: String?,
43
43
  ?updated: String?,
44
44
  ?updater: String?
@@ -50,7 +50,7 @@ module Courier
50
50
  has_custom_routing: bool,
51
51
  name: String,
52
52
  routing_options: ::Array[Courier::Models::channel_classification],
53
- topics: ::Array[Courier::PreferenceTopicGetResponse],
53
+ topics: ::Array[Courier::WorkspacePreferenceTopicGetResponse],
54
54
  creator: String?,
55
55
  updated: String?,
56
56
  updater: String?
@@ -1,9 +1,9 @@
1
1
  module Courier
2
2
  module Models
3
- type preference_section_publish_params =
3
+ type workspace_preference_list_params =
4
4
  { } & Courier::Internal::Type::request_parameters
5
5
 
6
- class PreferenceSectionPublishParams < Courier::Internal::Type::BaseModel
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
+ module Courier
2
+ module Models
3
+ type workspace_preference_list_response =
4
+ { results: ::Array[Courier::WorkspacePreferenceGetResponse] }
5
+
6
+ class WorkspacePreferenceListResponse < Courier::Internal::Type::BaseModel
7
+ attr_accessor results: ::Array[Courier::WorkspacePreferenceGetResponse]
8
+
9
+ def initialize: (
10
+ results: ::Array[Courier::WorkspacePreferenceGetResponse]
11
+ ) -> void
12
+
13
+ def to_hash: -> {
14
+ results: ::Array[Courier::WorkspacePreferenceGetResponse]
15
+ }
16
+ end
17
+ end
18
+ end
@@ -1,9 +1,9 @@
1
1
  module Courier
2
2
  module Models
3
- type preference_section_create_params =
3
+ type workspace_preference_publish_params =
4
4
  { } & Courier::Internal::Type::request_parameters
5
5
 
6
- class PreferenceSectionCreateParams < Courier::Models::PreferenceSectionCreateRequest
6
+ class WorkspacePreferencePublishParams < Courier::Internal::Type::BaseModel
7
7
  extend Courier::Internal::Type::RequestParameters::Converter
8
8
  include Courier::Internal::Type::RequestParameters
9
9
 
@@ -1,9 +1,9 @@
1
1
  module Courier
2
2
  module Models
3
- type preference_section_replace_params =
3
+ type workspace_preference_replace_params =
4
4
  { section_id: String } & Courier::Internal::Type::request_parameters
5
5
 
6
- class PreferenceSectionReplaceParams < Courier::Models::PreferenceSectionReplaceRequest
6
+ class WorkspacePreferenceReplaceParams < Courier::Models::WorkspacePreferenceReplaceRequest
7
7
  extend Courier::Internal::Type::RequestParameters::Converter
8
8
  include Courier::Internal::Type::RequestParameters
9
9