trycourier 6.2.0 → 6.4.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 (48) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +1 -1
  4. data/lib/courier/models/journey_send_node.rb +70 -3
  5. data/lib/courier/models/journey_send_node_to_ms_teams.rb +81 -0
  6. data/lib/courier/models/journey_send_node_to_slack.rb +20 -0
  7. data/lib/courier/models/journey_send_node_to_slack_channel.rb +29 -0
  8. data/lib/courier/models/journey_send_node_to_slack_email.rb +30 -0
  9. data/lib/courier/models/journey_send_node_to_slack_user_id.rb +29 -0
  10. data/lib/courier/models/ms_teams.rb +6 -0
  11. data/lib/courier/models/ms_teams_base_properties.rb +10 -5
  12. data/lib/courier/models/ms_teams_recipient.rb +6 -1
  13. data/lib/courier/models/send_to_ms_teams_channel_id.rb +9 -5
  14. data/lib/courier/models/send_to_ms_teams_channel_name.rb +12 -9
  15. data/lib/courier/models/send_to_ms_teams_email.rb +8 -5
  16. data/lib/courier/models/send_to_ms_teams_user_id.rb +13 -10
  17. data/lib/courier/models/user_profile.rb +3 -1
  18. data/lib/courier/models.rb +10 -0
  19. data/lib/courier/version.rb +1 -1
  20. data/lib/courier.rb +5 -0
  21. data/rbi/courier/models/journey_send_node.rbi +123 -0
  22. data/rbi/courier/models/journey_send_node_to_ms_teams.rbi +124 -0
  23. data/rbi/courier/models/journey_send_node_to_slack.rbi +26 -0
  24. data/rbi/courier/models/journey_send_node_to_slack_channel.rbi +45 -0
  25. data/rbi/courier/models/journey_send_node_to_slack_email.rbi +47 -0
  26. data/rbi/courier/models/journey_send_node_to_slack_user_id.rbi +45 -0
  27. data/rbi/courier/models/ms_teams.rbi +2 -0
  28. data/rbi/courier/models/ms_teams_base_properties.rbi +15 -5
  29. data/rbi/courier/models/ms_teams_recipient.rbi +7 -1
  30. data/rbi/courier/models/send_to_ms_teams_channel_id.rbi +14 -5
  31. data/rbi/courier/models/send_to_ms_teams_channel_name.rbi +16 -8
  32. data/rbi/courier/models/send_to_ms_teams_email.rbi +13 -5
  33. data/rbi/courier/models/send_to_ms_teams_user_id.rbi +16 -8
  34. data/rbi/courier/models/user_profile.rbi +4 -0
  35. data/rbi/courier/models.rbi +10 -0
  36. data/sig/courier/models/journey_send_node.rbs +42 -0
  37. data/sig/courier/models/journey_send_node_to_ms_teams.rbs +64 -0
  38. data/sig/courier/models/journey_send_node_to_slack.rbs +14 -0
  39. data/sig/courier/models/journey_send_node_to_slack_channel.rbs +18 -0
  40. data/sig/courier/models/journey_send_node_to_slack_email.rbs +18 -0
  41. data/sig/courier/models/journey_send_node_to_slack_user_id.rbs +18 -0
  42. data/sig/courier/models/ms_teams_base_properties.rbs +7 -3
  43. data/sig/courier/models/send_to_ms_teams_channel_id.rbs +8 -4
  44. data/sig/courier/models/send_to_ms_teams_channel_name.rbs +11 -7
  45. data/sig/courier/models/send_to_ms_teams_email.rbs +8 -4
  46. data/sig/courier/models/send_to_ms_teams_user_id.rbs +13 -9
  47. data/sig/courier/models.rbs +10 -0
  48. metadata +17 -2
@@ -9,25 +9,33 @@ module Courier
9
9
  end
10
10
 
11
11
  sig { returns(String) }
12
- attr_accessor :service_url
12
+ attr_accessor :user_id
13
13
 
14
- sig { returns(String) }
15
- attr_accessor :tenant_id
14
+ sig { returns(T.nilable(String)) }
15
+ attr_reader :service_url
16
16
 
17
- sig { returns(String) }
18
- attr_accessor :user_id
17
+ sig { params(service_url: String).void }
18
+ attr_writer :service_url
19
+
20
+ sig { returns(T.nilable(String)) }
21
+ attr_reader :tenant_id
22
+
23
+ sig { params(tenant_id: String).void }
24
+ attr_writer :tenant_id
19
25
 
26
+ # Provide at least one of `tenant_id` or `service_url`. If you provide both, they
27
+ # must agree.
20
28
  sig do
21
- params(service_url: String, tenant_id: String, user_id: String).returns(
29
+ params(user_id: String, service_url: String, tenant_id: String).returns(
22
30
  T.attached_class
23
31
  )
24
32
  end
25
- def self.new(service_url:, tenant_id:, user_id:)
33
+ def self.new(user_id:, service_url: nil, tenant_id: nil)
26
34
  end
27
35
 
28
36
  sig do
29
37
  override.returns(
30
- { service_url: String, tenant_id: String, user_id: String }
38
+ { user_id: String, service_url: String, tenant_id: String }
31
39
  )
32
40
  end
33
41
  def to_hash
@@ -87,6 +87,8 @@ module Courier
87
87
  sig { returns(T.nilable(String)) }
88
88
  attr_accessor :middle_name
89
89
 
90
+ # Provide at least one of `tenant_id` or `service_url`. If you provide both, they
91
+ # must agree.
90
92
  sig do
91
93
  returns(
92
94
  T.nilable(
@@ -240,6 +242,8 @@ module Courier
240
242
  intercom: nil,
241
243
  locale: nil,
242
244
  middle_name: nil,
245
+ # Provide at least one of `tenant_id` or `service_url`. If you provide both, they
246
+ # must agree.
243
247
  ms_teams: nil,
244
248
  name: nil,
245
249
  nickname: nil,
@@ -288,6 +288,16 @@ module Courier
288
288
 
289
289
  JourneySendNode = Courier::Models::JourneySendNode
290
290
 
291
+ JourneySendNodeToMsTeams = Courier::Models::JourneySendNodeToMsTeams
292
+
293
+ JourneySendNodeToSlack = Courier::Models::JourneySendNodeToSlack
294
+
295
+ JourneySendNodeToSlackChannel = Courier::Models::JourneySendNodeToSlackChannel
296
+
297
+ JourneySendNodeToSlackEmail = Courier::Models::JourneySendNodeToSlackEmail
298
+
299
+ JourneySendNodeToSlackUserID = Courier::Models::JourneySendNodeToSlackUserID
300
+
291
301
  JourneysInvokeRequest = Courier::Models::JourneysInvokeRequest
292
302
 
293
303
  JourneysInvokeResponse = Courier::Models::JourneysInvokeResponse
@@ -5,6 +5,7 @@ module Courier
5
5
  message: Courier::JourneySendNode::Message,
6
6
  type: Courier::Models::JourneySendNode::type_,
7
7
  id: String,
8
+ channel: Courier::Models::JourneySendNode::channel,
8
9
  conditions: Courier::Models::journey_conditions_field,
9
10
  experiment: Courier::JourneyExperiment
10
11
  }
@@ -18,6 +19,12 @@ module Courier
18
19
 
19
20
  def id=: (String) -> String
20
21
 
22
+ attr_reader channel: Courier::Models::JourneySendNode::channel?
23
+
24
+ def channel=: (
25
+ Courier::Models::JourneySendNode::channel
26
+ ) -> Courier::Models::JourneySendNode::channel
27
+
21
28
  attr_reader conditions: Courier::Models::journey_conditions_field?
22
29
 
23
30
  def conditions=: (
@@ -34,6 +41,7 @@ module Courier
34
41
  message: Courier::JourneySendNode::Message,
35
42
  type: Courier::Models::JourneySendNode::type_,
36
43
  ?id: String,
44
+ ?channel: Courier::Models::JourneySendNode::channel,
37
45
  ?conditions: Courier::Models::journey_conditions_field,
38
46
  ?experiment: Courier::JourneyExperiment
39
47
  ) -> void
@@ -42,6 +50,7 @@ module Courier
42
50
  message: Courier::JourneySendNode::Message,
43
51
  type: Courier::Models::JourneySendNode::type_,
44
52
  id: String,
53
+ channel: Courier::Models::JourneySendNode::channel,
45
54
  conditions: Courier::Models::journey_conditions_field,
46
55
  experiment: Courier::JourneyExperiment
47
56
  }
@@ -125,7 +134,9 @@ module Courier
125
134
  type to =
126
135
  {
127
136
  email_override: String,
137
+ ms_teams: Courier::JourneySendNodeToMsTeams,
128
138
  phone_number_override: String,
139
+ slack: Courier::Models::journey_send_node_to_slack,
129
140
  user_id_override: String
130
141
  }
131
142
 
@@ -134,23 +145,39 @@ module Courier
134
145
 
135
146
  def email_override=: (String) -> String
136
147
 
148
+ attr_reader ms_teams: Courier::JourneySendNodeToMsTeams?
149
+
150
+ def ms_teams=: (
151
+ Courier::JourneySendNodeToMsTeams
152
+ ) -> Courier::JourneySendNodeToMsTeams
153
+
137
154
  attr_reader phone_number_override: String?
138
155
 
139
156
  def phone_number_override=: (String) -> String
140
157
 
158
+ attr_reader slack: Courier::Models::journey_send_node_to_slack?
159
+
160
+ def slack=: (
161
+ Courier::Models::journey_send_node_to_slack
162
+ ) -> Courier::Models::journey_send_node_to_slack
163
+
141
164
  attr_reader user_id_override: String?
142
165
 
143
166
  def user_id_override=: (String) -> String
144
167
 
145
168
  def initialize: (
146
169
  ?email_override: String,
170
+ ?ms_teams: Courier::JourneySendNodeToMsTeams,
147
171
  ?phone_number_override: String,
172
+ ?slack: Courier::Models::journey_send_node_to_slack,
148
173
  ?user_id_override: String
149
174
  ) -> void
150
175
 
151
176
  def to_hash: -> {
152
177
  email_override: String,
178
+ ms_teams: Courier::JourneySendNodeToMsTeams,
153
179
  phone_number_override: String,
180
+ slack: Courier::Models::journey_send_node_to_slack,
154
181
  user_id_override: String
155
182
  }
156
183
  end
@@ -165,6 +192,21 @@ module Courier
165
192
 
166
193
  def self?.values: -> ::Array[Courier::Models::JourneySendNode::type_]
167
194
  end
195
+
196
+ type channel = :email | :sms | :push | :inbox | :slack | :msteams
197
+
198
+ module Channel
199
+ extend Courier::Internal::Type::Enum
200
+
201
+ EMAIL: :email
202
+ SMS: :sms
203
+ PUSH: :push
204
+ INBOX: :inbox
205
+ SLACK: :slack
206
+ MSTEAMS: :msteams
207
+
208
+ def self?.values: -> ::Array[Courier::Models::JourneySendNode::channel]
209
+ end
168
210
  end
169
211
  end
170
212
  end
@@ -0,0 +1,64 @@
1
+ module Courier
2
+ module Models
3
+ type journey_send_node_to_ms_teams =
4
+ {
5
+ channel_id: String,
6
+ channel_name: String,
7
+ email: String,
8
+ service_url: String,
9
+ team_id: String,
10
+ tenant_id: String,
11
+ user_id: String
12
+ }
13
+
14
+ class JourneySendNodeToMsTeams < Courier::Internal::Type::BaseModel
15
+ attr_reader channel_id: String?
16
+
17
+ def channel_id=: (String) -> String
18
+
19
+ attr_reader channel_name: String?
20
+
21
+ def channel_name=: (String) -> String
22
+
23
+ attr_reader email: String?
24
+
25
+ def email=: (String) -> String
26
+
27
+ attr_reader service_url: String?
28
+
29
+ def service_url=: (String) -> String
30
+
31
+ attr_reader team_id: String?
32
+
33
+ def team_id=: (String) -> String
34
+
35
+ attr_reader tenant_id: String?
36
+
37
+ def tenant_id=: (String) -> String
38
+
39
+ attr_reader user_id: String?
40
+
41
+ def user_id=: (String) -> String
42
+
43
+ def initialize: (
44
+ ?channel_id: String,
45
+ ?channel_name: String,
46
+ ?email: String,
47
+ ?service_url: String,
48
+ ?team_id: String,
49
+ ?tenant_id: String,
50
+ ?user_id: String
51
+ ) -> void
52
+
53
+ def to_hash: -> {
54
+ channel_id: String,
55
+ channel_name: String,
56
+ email: String,
57
+ service_url: String,
58
+ team_id: String,
59
+ tenant_id: String,
60
+ user_id: String
61
+ }
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,14 @@
1
+ module Courier
2
+ module Models
3
+ type journey_send_node_to_slack =
4
+ Courier::JourneySendNodeToSlackChannel
5
+ | Courier::JourneySendNodeToSlackUserID
6
+ | Courier::JourneySendNodeToSlackEmail
7
+
8
+ module JourneySendNodeToSlack
9
+ extend Courier::Internal::Type::Union
10
+
11
+ def self?.variants: -> ::Array[Courier::Models::journey_send_node_to_slack]
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,18 @@
1
+ module Courier
2
+ module Models
3
+ type journey_send_node_to_slack_channel =
4
+ { channel: String, access_token: String }
5
+
6
+ class JourneySendNodeToSlackChannel < Courier::Internal::Type::BaseModel
7
+ attr_accessor channel: String
8
+
9
+ attr_reader access_token: String?
10
+
11
+ def access_token=: (String) -> String
12
+
13
+ def initialize: (channel: String, ?access_token: String) -> void
14
+
15
+ def to_hash: -> { channel: String, access_token: String }
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,18 @@
1
+ module Courier
2
+ module Models
3
+ type journey_send_node_to_slack_email =
4
+ { email: String, access_token: String }
5
+
6
+ class JourneySendNodeToSlackEmail < Courier::Internal::Type::BaseModel
7
+ attr_accessor email: String
8
+
9
+ attr_reader access_token: String?
10
+
11
+ def access_token=: (String) -> String
12
+
13
+ def initialize: (email: String, ?access_token: String) -> void
14
+
15
+ def to_hash: -> { email: String, access_token: String }
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,18 @@
1
+ module Courier
2
+ module Models
3
+ type journey_send_node_to_slack_user_id =
4
+ { user_id: String, access_token: String }
5
+
6
+ class JourneySendNodeToSlackUserID < Courier::Internal::Type::BaseModel
7
+ attr_accessor user_id: String
8
+
9
+ attr_reader access_token: String?
10
+
11
+ def access_token=: (String) -> String
12
+
13
+ def initialize: (user_id: String, ?access_token: String) -> void
14
+
15
+ def to_hash: -> { user_id: String, access_token: String }
16
+ end
17
+ end
18
+ end
@@ -3,11 +3,15 @@ module Courier
3
3
  type ms_teams_base_properties = { service_url: String, tenant_id: String }
4
4
 
5
5
  class MsTeamsBaseProperties < Courier::Internal::Type::BaseModel
6
- attr_accessor service_url: String
6
+ attr_reader service_url: String?
7
7
 
8
- attr_accessor tenant_id: String
8
+ def service_url=: (String) -> String
9
9
 
10
- def initialize: (service_url: String, tenant_id: String) -> void
10
+ attr_reader tenant_id: String?
11
+
12
+ def tenant_id=: (String) -> String
13
+
14
+ def initialize: (?service_url: String, ?tenant_id: String) -> void
11
15
 
12
16
  def to_hash: -> { service_url: String, tenant_id: String }
13
17
  end
@@ -6,14 +6,18 @@ module Courier
6
6
  class SendToMsTeamsChannelID < Courier::Internal::Type::BaseModel
7
7
  attr_accessor channel_id: String
8
8
 
9
- attr_accessor service_url: String
9
+ attr_reader service_url: String?
10
10
 
11
- attr_accessor tenant_id: String
11
+ def service_url=: (String) -> String
12
+
13
+ attr_reader tenant_id: String?
14
+
15
+ def tenant_id=: (String) -> String
12
16
 
13
17
  def initialize: (
14
18
  channel_id: String,
15
- service_url: String,
16
- tenant_id: String
19
+ ?service_url: String,
20
+ ?tenant_id: String
17
21
  ) -> void
18
22
 
19
23
  def to_hash: -> {
@@ -3,31 +3,35 @@ module Courier
3
3
  type send_to_ms_teams_channel_name =
4
4
  {
5
5
  channel_name: String,
6
- service_url: String,
7
6
  team_id: String,
7
+ service_url: String,
8
8
  tenant_id: String
9
9
  }
10
10
 
11
11
  class SendToMsTeamsChannelName < Courier::Internal::Type::BaseModel
12
12
  attr_accessor channel_name: String
13
13
 
14
- attr_accessor service_url: String
15
-
16
14
  attr_accessor team_id: String
17
15
 
18
- attr_accessor tenant_id: String
16
+ attr_reader service_url: String?
17
+
18
+ def service_url=: (String) -> String
19
+
20
+ attr_reader tenant_id: String?
21
+
22
+ def tenant_id=: (String) -> String
19
23
 
20
24
  def initialize: (
21
25
  channel_name: String,
22
- service_url: String,
23
26
  team_id: String,
24
- tenant_id: String
27
+ ?service_url: String,
28
+ ?tenant_id: String
25
29
  ) -> void
26
30
 
27
31
  def to_hash: -> {
28
32
  channel_name: String,
29
- service_url: String,
30
33
  team_id: String,
34
+ service_url: String,
31
35
  tenant_id: String
32
36
  }
33
37
  end
@@ -6,14 +6,18 @@ module Courier
6
6
  class SendToMsTeamsEmail < Courier::Internal::Type::BaseModel
7
7
  attr_accessor email: String
8
8
 
9
- attr_accessor service_url: String
9
+ attr_reader service_url: String?
10
10
 
11
- attr_accessor tenant_id: String
11
+ def service_url=: (String) -> String
12
+
13
+ attr_reader tenant_id: String?
14
+
15
+ def tenant_id=: (String) -> String
12
16
 
13
17
  def initialize: (
14
18
  email: String,
15
- service_url: String,
16
- tenant_id: String
19
+ ?service_url: String,
20
+ ?tenant_id: String
17
21
  ) -> void
18
22
 
19
23
  def to_hash: -> { email: String, service_url: String, tenant_id: String }
@@ -1,25 +1,29 @@
1
1
  module Courier
2
2
  module Models
3
3
  type send_to_ms_teams_user_id =
4
- { service_url: String, tenant_id: String, user_id: String }
4
+ { user_id: String, service_url: String, tenant_id: String }
5
5
 
6
6
  class SendToMsTeamsUserID < Courier::Internal::Type::BaseModel
7
- attr_accessor service_url: String
7
+ attr_accessor user_id: String
8
8
 
9
- attr_accessor tenant_id: String
9
+ attr_reader service_url: String?
10
10
 
11
- attr_accessor user_id: String
11
+ def service_url=: (String) -> String
12
+
13
+ attr_reader tenant_id: String?
14
+
15
+ def tenant_id=: (String) -> String
12
16
 
13
17
  def initialize: (
14
- service_url: String,
15
- tenant_id: String,
16
- user_id: String
18
+ user_id: String,
19
+ ?service_url: String,
20
+ ?tenant_id: String
17
21
  ) -> void
18
22
 
19
23
  def to_hash: -> {
24
+ user_id: String,
20
25
  service_url: String,
21
- tenant_id: String,
22
- user_id: String
26
+ tenant_id: String
23
27
  }
24
28
  end
25
29
  end
@@ -279,6 +279,16 @@ module Courier
279
279
 
280
280
  class JourneySendNode = Courier::Models::JourneySendNode
281
281
 
282
+ class JourneySendNodeToMsTeams = Courier::Models::JourneySendNodeToMsTeams
283
+
284
+ module JourneySendNodeToSlack = Courier::Models::JourneySendNodeToSlack
285
+
286
+ class JourneySendNodeToSlackChannel = Courier::Models::JourneySendNodeToSlackChannel
287
+
288
+ class JourneySendNodeToSlackEmail = Courier::Models::JourneySendNodeToSlackEmail
289
+
290
+ class JourneySendNodeToSlackUserID = Courier::Models::JourneySendNodeToSlackUserID
291
+
282
292
  class JourneysInvokeRequest = Courier::Models::JourneysInvokeRequest
283
293
 
284
294
  class JourneysInvokeResponse = Courier::Models::JourneysInvokeResponse
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.2.0
4
+ version: 6.4.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-08-26 00:00:00.000000000 Z
11
+ date: 2026-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi
@@ -222,6 +222,11 @@ files:
222
222
  - lib/courier/models/journey_run_steps_response.rb
223
223
  - lib/courier/models/journey_segment_trigger_node.rb
224
224
  - lib/courier/models/journey_send_node.rb
225
+ - lib/courier/models/journey_send_node_to_ms_teams.rb
226
+ - lib/courier/models/journey_send_node_to_slack.rb
227
+ - lib/courier/models/journey_send_node_to_slack_channel.rb
228
+ - lib/courier/models/journey_send_node_to_slack_email.rb
229
+ - lib/courier/models/journey_send_node_to_slack_user_id.rb
225
230
  - lib/courier/models/journey_state.rb
226
231
  - lib/courier/models/journey_template_create_request.rb
227
232
  - lib/courier/models/journey_template_get_response.rb
@@ -695,6 +700,11 @@ files:
695
700
  - rbi/courier/models/journey_run_steps_response.rbi
696
701
  - rbi/courier/models/journey_segment_trigger_node.rbi
697
702
  - rbi/courier/models/journey_send_node.rbi
703
+ - rbi/courier/models/journey_send_node_to_ms_teams.rbi
704
+ - rbi/courier/models/journey_send_node_to_slack.rbi
705
+ - rbi/courier/models/journey_send_node_to_slack_channel.rbi
706
+ - rbi/courier/models/journey_send_node_to_slack_email.rbi
707
+ - rbi/courier/models/journey_send_node_to_slack_user_id.rbi
698
708
  - rbi/courier/models/journey_state.rbi
699
709
  - rbi/courier/models/journey_template_create_request.rbi
700
710
  - rbi/courier/models/journey_template_get_response.rbi
@@ -1167,6 +1177,11 @@ files:
1167
1177
  - sig/courier/models/journey_run_steps_response.rbs
1168
1178
  - sig/courier/models/journey_segment_trigger_node.rbs
1169
1179
  - sig/courier/models/journey_send_node.rbs
1180
+ - sig/courier/models/journey_send_node_to_ms_teams.rbs
1181
+ - sig/courier/models/journey_send_node_to_slack.rbs
1182
+ - sig/courier/models/journey_send_node_to_slack_channel.rbs
1183
+ - sig/courier/models/journey_send_node_to_slack_email.rbs
1184
+ - sig/courier/models/journey_send_node_to_slack_user_id.rbs
1170
1185
  - sig/courier/models/journey_state.rbs
1171
1186
  - sig/courier/models/journey_template_create_request.rbs
1172
1187
  - sig/courier/models/journey_template_get_response.rbs