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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f0b22ca9267f965731c89199aa8d49077c5ac53f12c307946893c67a9ee7896
4
- data.tar.gz: abeea8195ccb031cebe6a83096665851ee7d6bae0e2743e2d7a3504af35b8f47
3
+ metadata.gz: 77a40579016778bf7fd2be413c80a59a514bda2c1a2a6de1f6c1649cd6f28ce4
4
+ data.tar.gz: 071bdbb767a79675af2f55eaaeec7ad23ef5bac415f5d9f9eac2311407ae2a2a
5
5
  SHA512:
6
- metadata.gz: 6c81dbe75df19bf95658f341e62e7475db0007be7ead3a8f822e3e8ce9a8c7424dcaefe76ee629c47bc798211e49e574a81d55b62426fd46a0d022ec61122fa3
7
- data.tar.gz: 14dfa346c595b581a2ebbe8467e5452af68d04a64638b7347139287f79e05417394ae5ae5508634e209d2618bd821b00b688ecdc1320c6146e6e5587599a4e28
6
+ metadata.gz: 0c5d00663ef98a7494db3b618a08b2f9a103355077cfa7e77def4b9f63686c46bbdbb487d7e9184507bb7b5a95bfb739c38864884736aeca01a56a3fd18069db
7
+ data.tar.gz: 2c2acf11904f5f0234aefbb0f5867ebef9e39787fe16aa5238495e1e221adf39087e62a1d6cd5db185c5810d701feeb7c64434e735830af86657915b02b2a448
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [6.4.0](https://github.com/trycourier/courier-ruby/compare/v6.3.0...v6.4.0) (2026-08-28)
4
+
5
+
6
+ ### Features
7
+
8
+ * **api:** document channel on journey send nodes [C-20309] ([#138](https://github.com/trycourier/courier-ruby/issues/138)) ([f758237](https://github.com/trycourier/courier-ruby/commit/f75823779abef7a0df0d9927d3aae98696eff79a))
9
+
10
+ ## [6.3.0](https://github.com/trycourier/courier-ruby/compare/v6.2.0...v6.3.0) (2026-08-27)
11
+
12
+
13
+ ### Features
14
+
15
+ * **api:** document Slack and MS Teams on journey send nodes, and fix over-strict MsTeams tenant requirements [C-20302] ([#136](https://github.com/trycourier/courier-ruby/issues/136)) ([2d63cc0](https://github.com/trycourier/courier-ruby/commit/2d63cc0ab0e936625484ed6610e423e1ff04e8b5))
16
+
3
17
  ## [6.2.0](https://github.com/trycourier/courier-ruby/compare/v6.1.0...v6.2.0) (2026-08-26)
4
18
 
5
19
 
data/README.md CHANGED
@@ -9,7 +9,7 @@ Add the gem to your `Gemfile`:
9
9
  <!-- x-release-please-start-version -->
10
10
 
11
11
  ```ruby
12
- gem "trycourier", "~> 6.2.0"
12
+ gem "trycourier", "~> 6.4.0"
13
13
  ```
14
14
 
15
15
  <!-- x-release-please-end -->
@@ -18,6 +18,15 @@ module Courier
18
18
  # @return [String, nil]
19
19
  optional :id, String
20
20
 
21
+ # @!attribute channel
22
+ # The channel this node sends through. Optional — when omitted, the field is
23
+ # absent from the node, including on `GET`; nodes created before this field
24
+ # existed have it unset. Setting it makes the node's channel explicit to any
25
+ # client reading the journey.
26
+ #
27
+ # @return [Symbol, Courier::Models::JourneySendNode::Channel, nil]
28
+ optional :channel, enum: -> { Courier::JourneySendNode::Channel }
29
+
21
30
  # @!attribute conditions
22
31
  # Condition spec for a journey node. Accepts a single condition atom, an AND/OR
23
32
  # group, or an AND/OR nested group. Omit the `conditions` property entirely to
@@ -34,7 +43,7 @@ module Courier
34
43
  # @return [Courier::Models::JourneyExperiment, nil]
35
44
  optional :experiment, -> { Courier::JourneyExperiment }
36
45
 
37
- # @!method initialize(message:, type:, id: nil, conditions: nil, experiment: nil)
46
+ # @!method initialize(message:, type:, id: nil, channel: nil, conditions: nil, experiment: nil)
38
47
  # Some parameter documentations has been truncated, see
39
48
  # {Courier::Models::JourneySendNode} for more details.
40
49
  #
@@ -50,6 +59,8 @@ module Courier
50
59
  #
51
60
  # @param id [String]
52
61
  #
62
+ # @param channel [Symbol, Courier::Models::JourneySendNode::Channel] The channel this node sends through. Optional — when omitted, the field is absen
63
+ #
53
64
  # @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
65
  #
55
66
  # @param experiment [Courier::Models::JourneyExperiment] A/B experiment config for a send node. The recipient is deterministically bucket
@@ -79,6 +90,9 @@ module Courier
79
90
  optional :template, String
80
91
 
81
92
  # @!attribute to
93
+ # Recipient override for this send. Provide exactly one of `email_override`,
94
+ # `phone_number_override`, `user_id_override`, `slack`, or `ms_teams` — not a
95
+ # combination.
82
96
  #
83
97
  # @return [Courier::Models::JourneySendNode::Message::To, nil]
84
98
  optional :to, -> { Courier::JourneySendNode::Message::To }
@@ -95,7 +109,7 @@ module Courier
95
109
  #
96
110
  # @param template [String]
97
111
  #
98
- # @param to [Courier::Models::JourneySendNode::Message::To]
112
+ # @param to [Courier::Models::JourneySendNode::Message::To] Recipient override for this send. Provide exactly one of `email_override`, `phon
99
113
 
100
114
  # @see Courier::Models::JourneySendNode::Message#context
101
115
  class Context < Courier::Internal::Type::BaseModel
@@ -149,19 +163,52 @@ module Courier
149
163
  # @return [String, nil]
150
164
  optional :email_override, String
151
165
 
166
+ # @!attribute ms_teams
167
+ # Send to a Microsoft Teams address directly, bypassing the recipient's stored
168
+ # profile. Requires exactly one target: `channel_id`, `channel_name` (with
169
+ # `team_id`), `user_id`, or `email`. `channel_name`, `user_id`, and `email` also
170
+ # need at least one of `service_url` or `tenant_id` — if you provide both, they
171
+ # must agree. `channel_id` doesn't require tenant context to publish, but provide
172
+ # `service_url` or `tenant_id` anyway: sends without either have failed at
173
+ # delivery in testing. `conversation_id` and `reply_to_activity_id`, available on
174
+ # the send API's `MsTeams` profile, aren't supported here yet.
175
+ #
176
+ # @return [Courier::Models::JourneySendNodeToMsTeams, nil]
177
+ optional :ms_teams, -> { Courier::JourneySendNodeToMsTeams }
178
+
152
179
  # @!attribute phone_number_override
153
180
  #
154
181
  # @return [String, nil]
155
182
  optional :phone_number_override, String
156
183
 
184
+ # @!attribute slack
185
+ # Send to a Slack address directly, bypassing the recipient's stored profile.
186
+ # Requires exactly one of `channel`, `user_id`, or `email`.
187
+ #
188
+ # @return [Courier::Models::JourneySendNodeToSlackChannel, Courier::Models::JourneySendNodeToSlackUserID, Courier::Models::JourneySendNodeToSlackEmail, nil]
189
+ optional :slack, union: -> { Courier::JourneySendNodeToSlack }
190
+
157
191
  # @!attribute user_id_override
158
192
  #
159
193
  # @return [String, nil]
160
194
  optional :user_id_override, String
161
195
 
162
- # @!method initialize(email_override: nil, phone_number_override: nil, user_id_override: nil)
196
+ # @!method initialize(email_override: nil, ms_teams: nil, phone_number_override: nil, slack: nil, user_id_override: nil)
197
+ # Some parameter documentations has been truncated, see
198
+ # {Courier::Models::JourneySendNode::Message::To} for more details.
199
+ #
200
+ # Recipient override for this send. Provide exactly one of `email_override`,
201
+ # `phone_number_override`, `user_id_override`, `slack`, or `ms_teams` — not a
202
+ # combination.
203
+ #
163
204
  # @param email_override [String]
205
+ #
206
+ # @param ms_teams [Courier::Models::JourneySendNodeToMsTeams] Send to a Microsoft Teams address directly, bypassing the recipient's stored pro
207
+ #
164
208
  # @param phone_number_override [String]
209
+ #
210
+ # @param slack [Courier::Models::JourneySendNodeToSlackChannel, Courier::Models::JourneySendNodeToSlackUserID, Courier::Models::JourneySendNodeToSlackEmail] Send to a Slack address directly, bypassing the recipient's stored profile. Requ
211
+ #
165
212
  # @param user_id_override [String]
166
213
  end
167
214
  end
@@ -175,6 +222,26 @@ module Courier
175
222
  # @!method self.values
176
223
  # @return [Array<Symbol>]
177
224
  end
225
+
226
+ # The channel this node sends through. Optional — when omitted, the field is
227
+ # absent from the node, including on `GET`; nodes created before this field
228
+ # existed have it unset. Setting it makes the node's channel explicit to any
229
+ # client reading the journey.
230
+ #
231
+ # @see Courier::Models::JourneySendNode#channel
232
+ module Channel
233
+ extend Courier::Internal::Type::Enum
234
+
235
+ EMAIL = :email
236
+ SMS = :sms
237
+ PUSH = :push
238
+ INBOX = :inbox
239
+ SLACK = :slack
240
+ MSTEAMS = :msteams
241
+
242
+ # @!method self.values
243
+ # @return [Array<Symbol>]
244
+ end
178
245
  end
179
246
  end
180
247
  end
@@ -0,0 +1,81 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class JourneySendNodeToMsTeams < Courier::Internal::Type::BaseModel
6
+ # @!attribute channel_id
7
+ # Bot Framework channel ID to send to.
8
+ #
9
+ # @return [String, nil]
10
+ optional :channel_id, String
11
+
12
+ # @!attribute channel_name
13
+ # Teams channel name to send to. Requires `team_id`.
14
+ #
15
+ # @return [String, nil]
16
+ optional :channel_name, String
17
+
18
+ # @!attribute email
19
+ # Email address of the Teams user to send to.
20
+ #
21
+ # @return [String, nil]
22
+ optional :email, String
23
+
24
+ # @!attribute service_url
25
+ # The regional Bot Framework host for this conversation, e.g.
26
+ # `https://smba.trafficmanager.net/amer`. A path segment naming the Microsoft
27
+ # tenant may follow it and is used to derive `tenant_id` when it is not supplied
28
+ # directly.
29
+ #
30
+ # @return [String, nil]
31
+ optional :service_url, String
32
+
33
+ # @!attribute team_id
34
+ # Microsoft Teams team ID. Required alongside `channel_name`.
35
+ #
36
+ # @return [String, nil]
37
+ optional :team_id, String
38
+
39
+ # @!attribute tenant_id
40
+ # The Microsoft (Azure AD) tenant this send targets or authenticates against.
41
+ # Unrelated to `message.context.tenant_id`, which is the Courier customer's own
42
+ # multi-tenant context.
43
+ #
44
+ # @return [String, nil]
45
+ optional :tenant_id, String
46
+
47
+ # @!attribute user_id
48
+ # Microsoft Teams user ID to send to.
49
+ #
50
+ # @return [String, nil]
51
+ optional :user_id, String
52
+
53
+ # @!method initialize(channel_id: nil, channel_name: nil, email: nil, service_url: nil, team_id: nil, tenant_id: nil, user_id: nil)
54
+ # Some parameter documentations has been truncated, see
55
+ # {Courier::Models::JourneySendNodeToMsTeams} for more details.
56
+ #
57
+ # Send to a Microsoft Teams address directly, bypassing the recipient's stored
58
+ # profile. Requires exactly one target: `channel_id`, `channel_name` (with
59
+ # `team_id`), `user_id`, or `email`. `channel_name`, `user_id`, and `email` also
60
+ # need at least one of `service_url` or `tenant_id` — if you provide both, they
61
+ # must agree. `channel_id` doesn't require tenant context to publish, but provide
62
+ # `service_url` or `tenant_id` anyway: sends without either have failed at
63
+ # delivery in testing. `conversation_id` and `reply_to_activity_id`, available on
64
+ # the send API's `MsTeams` profile, aren't supported here yet.
65
+ #
66
+ # @param channel_id [String] Bot Framework channel ID to send to.
67
+ #
68
+ # @param channel_name [String] Teams channel name to send to. Requires `team_id`.
69
+ #
70
+ # @param email [String] Email address of the Teams user to send to.
71
+ #
72
+ # @param service_url [String] The regional Bot Framework host for this conversation, e.g. `https://smba.traffi
73
+ #
74
+ # @param team_id [String] Microsoft Teams team ID. Required alongside `channel_name`.
75
+ #
76
+ # @param tenant_id [String] The Microsoft (Azure AD) tenant this send targets or authenticates against. Unre
77
+ #
78
+ # @param user_id [String] Microsoft Teams user ID to send to.
79
+ end
80
+ end
81
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ # Send to a Slack address directly, bypassing the recipient's stored profile.
6
+ # Requires exactly one of `channel`, `user_id`, or `email`.
7
+ module JourneySendNodeToSlack
8
+ extend Courier::Internal::Type::Union
9
+
10
+ variant -> { Courier::JourneySendNodeToSlackChannel }
11
+
12
+ variant -> { Courier::JourneySendNodeToSlackUserID }
13
+
14
+ variant -> { Courier::JourneySendNodeToSlackEmail }
15
+
16
+ # @!method self.variants
17
+ # @return [Array(Courier::Models::JourneySendNodeToSlackChannel, Courier::Models::JourneySendNodeToSlackUserID, Courier::Models::JourneySendNodeToSlackEmail)]
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class JourneySendNodeToSlackChannel < Courier::Internal::Type::BaseModel
6
+ # @!attribute channel
7
+ # Slack channel to send to, by name or ID.
8
+ #
9
+ # @return [String]
10
+ required :channel, String
11
+
12
+ # @!attribute access_token
13
+ # A runtime reference to a Slack access token, such as `{{data.slack_token}}`.
14
+ # Literal values are rejected — they'd be stored permanently with no way to rotate
15
+ # them. Omit to use the token on the recipient's stored Slack profile.
16
+ #
17
+ # @return [String, nil]
18
+ optional :access_token, String
19
+
20
+ # @!method initialize(channel:, access_token: nil)
21
+ # Some parameter documentations has been truncated, see
22
+ # {Courier::Models::JourneySendNodeToSlackChannel} for more details.
23
+ #
24
+ # @param channel [String] Slack channel to send to, by name or ID.
25
+ #
26
+ # @param access_token [String] A runtime reference to a Slack access token, such as `{{data.slack_token}}`. Lit
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class JourneySendNodeToSlackEmail < Courier::Internal::Type::BaseModel
6
+ # @!attribute email
7
+ # Email address of the Slack user to send to, resolved via the workspace
8
+ # directory.
9
+ #
10
+ # @return [String]
11
+ required :email, String
12
+
13
+ # @!attribute access_token
14
+ # A runtime reference to a Slack access token, such as `{{data.slack_token}}`.
15
+ # Literal values are rejected — they'd be stored permanently with no way to rotate
16
+ # them. Omit to use the token on the recipient's stored Slack profile.
17
+ #
18
+ # @return [String, nil]
19
+ optional :access_token, String
20
+
21
+ # @!method initialize(email:, access_token: nil)
22
+ # Some parameter documentations has been truncated, see
23
+ # {Courier::Models::JourneySendNodeToSlackEmail} for more details.
24
+ #
25
+ # @param email [String] Email address of the Slack user to send to, resolved via the workspace directory
26
+ #
27
+ # @param access_token [String] A runtime reference to a Slack access token, such as `{{data.slack_token}}`. Lit
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class JourneySendNodeToSlackUserID < Courier::Internal::Type::BaseModel
6
+ # @!attribute user_id
7
+ # Slack user ID to send to.
8
+ #
9
+ # @return [String]
10
+ required :user_id, String
11
+
12
+ # @!attribute access_token
13
+ # A runtime reference to a Slack access token, such as `{{data.slack_token}}`.
14
+ # Literal values are rejected — they'd be stored permanently with no way to rotate
15
+ # them. Omit to use the token on the recipient's stored Slack profile.
16
+ #
17
+ # @return [String, nil]
18
+ optional :access_token, String
19
+
20
+ # @!method initialize(user_id:, access_token: nil)
21
+ # Some parameter documentations has been truncated, see
22
+ # {Courier::Models::JourneySendNodeToSlackUserID} for more details.
23
+ #
24
+ # @param user_id [String] Slack user ID to send to.
25
+ #
26
+ # @param access_token [String] A runtime reference to a Slack access token, such as `{{data.slack_token}}`. Lit
27
+ end
28
+ end
29
+ end
@@ -2,17 +2,23 @@
2
2
 
3
3
  module Courier
4
4
  module Models
5
+ # Provide at least one of `tenant_id` or `service_url`. If you provide both, they
6
+ # must agree.
5
7
  module MsTeams
6
8
  extend Courier::Internal::Type::Union
7
9
 
10
+ # Provide at least one of `tenant_id` or `service_url`. If you provide both, they must agree.
8
11
  variant -> { Courier::SendToMsTeamsUserID }
9
12
 
13
+ # Provide at least one of `tenant_id` or `service_url`. If you provide both, they must agree.
10
14
  variant -> { Courier::SendToMsTeamsEmail }
11
15
 
16
+ # Sends directly to a Microsoft Teams channel by its Bot Framework ID. Still provide at least one of `tenant_id` or `service_url` — sends without either have failed Bot Framework authentication in testing.
12
17
  variant -> { Courier::SendToMsTeamsChannelID }
13
18
 
14
19
  variant -> { Courier::SendToMsTeamsConversationID }
15
20
 
21
+ # `team_id` is required alongside `channel_name`. Also provide at least one of `tenant_id` or `service_url`; if you provide both, they must agree.
16
22
  variant -> { Courier::SendToMsTeamsChannelName }
17
23
 
18
24
  # @!method self.variants
@@ -5,15 +5,20 @@ module Courier
5
5
  class MsTeamsBaseProperties < Courier::Internal::Type::BaseModel
6
6
  # @!attribute service_url
7
7
  #
8
- # @return [String]
9
- required :service_url, String
8
+ # @return [String, nil]
9
+ optional :service_url, String
10
10
 
11
11
  # @!attribute tenant_id
12
12
  #
13
- # @return [String]
14
- required :tenant_id, String
13
+ # @return [String, nil]
14
+ optional :tenant_id, String
15
15
 
16
- # @!method initialize(service_url:, tenant_id:)
16
+ # @!method initialize(service_url: nil, tenant_id: nil)
17
+ # Tenant context shared by every MS Teams send variant. Provide at least one of
18
+ # `tenant_id` or `service_url`. If you provide both, they must agree — a
19
+ # `service_url` pointing at a different Microsoft tenant than `tenant_id` is
20
+ # rejected.
21
+ #
17
22
  # @param service_url [String]
18
23
  # @param tenant_id [String]
19
24
  end
@@ -4,14 +4,19 @@ module Courier
4
4
  module Models
5
5
  class MsTeamsRecipient < Courier::Internal::Type::BaseModel
6
6
  # @!attribute ms_teams
7
+ # Provide at least one of `tenant_id` or `service_url`. If you provide both, they
8
+ # must agree.
7
9
  #
8
10
  # @return [Courier::Models::SendToMsTeamsUserID, Courier::Models::SendToMsTeamsEmail, Courier::Models::SendToMsTeamsChannelID, Courier::Models::SendToMsTeamsConversationID, Courier::Models::SendToMsTeamsChannelName]
9
11
  required :ms_teams, union: -> { Courier::MsTeams }
10
12
 
11
13
  # @!method initialize(ms_teams:)
14
+ # Some parameter documentations has been truncated, see
15
+ # {Courier::Models::MsTeamsRecipient} for more details.
16
+ #
12
17
  # Send via Microsoft Teams
13
18
  #
14
- # @param ms_teams [Courier::Models::SendToMsTeamsUserID, Courier::Models::SendToMsTeamsEmail, Courier::Models::SendToMsTeamsChannelID, Courier::Models::SendToMsTeamsConversationID, Courier::Models::SendToMsTeamsChannelName]
19
+ # @param ms_teams [Courier::Models::SendToMsTeamsUserID, Courier::Models::SendToMsTeamsEmail, Courier::Models::SendToMsTeamsChannelID, Courier::Models::SendToMsTeamsConversationID, Courier::Models::SendToMsTeamsChannelName] Provide at least one of `tenant_id` or `service_url`. If you provide both, they
15
20
  end
16
21
  end
17
22
  end
@@ -10,15 +10,19 @@ module Courier
10
10
 
11
11
  # @!attribute service_url
12
12
  #
13
- # @return [String]
14
- required :service_url, String
13
+ # @return [String, nil]
14
+ optional :service_url, String
15
15
 
16
16
  # @!attribute tenant_id
17
17
  #
18
- # @return [String]
19
- required :tenant_id, String
18
+ # @return [String, nil]
19
+ optional :tenant_id, String
20
20
 
21
- # @!method initialize(channel_id:, service_url:, tenant_id:)
21
+ # @!method initialize(channel_id:, service_url: nil, tenant_id: nil)
22
+ # Sends directly to a Microsoft Teams channel by its Bot Framework ID. Still
23
+ # provide at least one of `tenant_id` or `service_url` — sends without either have
24
+ # failed Bot Framework authentication in testing.
25
+ #
22
26
  # @param channel_id [String]
23
27
  # @param service_url [String]
24
28
  # @param tenant_id [String]
@@ -8,25 +8,28 @@ module Courier
8
8
  # @return [String]
9
9
  required :channel_name, String
10
10
 
11
- # @!attribute service_url
12
- #
13
- # @return [String]
14
- required :service_url, String
15
-
16
11
  # @!attribute team_id
17
12
  #
18
13
  # @return [String]
19
14
  required :team_id, String
20
15
 
16
+ # @!attribute service_url
17
+ #
18
+ # @return [String, nil]
19
+ optional :service_url, String
20
+
21
21
  # @!attribute tenant_id
22
22
  #
23
- # @return [String]
24
- required :tenant_id, String
23
+ # @return [String, nil]
24
+ optional :tenant_id, String
25
25
 
26
- # @!method initialize(channel_name:, service_url:, team_id:, tenant_id:)
26
+ # @!method initialize(channel_name:, team_id:, service_url: nil, tenant_id: nil)
27
+ # `team_id` is required alongside `channel_name`. Also provide at least one of
28
+ # `tenant_id` or `service_url`; if you provide both, they must agree.
29
+ #
27
30
  # @param channel_name [String]
28
- # @param service_url [String]
29
31
  # @param team_id [String]
32
+ # @param service_url [String]
30
33
  # @param tenant_id [String]
31
34
  end
32
35
  end
@@ -10,15 +10,18 @@ module Courier
10
10
 
11
11
  # @!attribute service_url
12
12
  #
13
- # @return [String]
14
- required :service_url, String
13
+ # @return [String, nil]
14
+ optional :service_url, String
15
15
 
16
16
  # @!attribute tenant_id
17
17
  #
18
- # @return [String]
19
- required :tenant_id, String
18
+ # @return [String, nil]
19
+ optional :tenant_id, String
20
20
 
21
- # @!method initialize(email:, service_url:, tenant_id:)
21
+ # @!method initialize(email:, service_url: nil, tenant_id: nil)
22
+ # Provide at least one of `tenant_id` or `service_url`. If you provide both, they
23
+ # must agree.
24
+ #
22
25
  # @param email [String]
23
26
  # @param service_url [String]
24
27
  # @param tenant_id [String]
@@ -3,25 +3,28 @@
3
3
  module Courier
4
4
  module Models
5
5
  class SendToMsTeamsUserID < Courier::Internal::Type::BaseModel
6
- # @!attribute service_url
6
+ # @!attribute user_id
7
7
  #
8
8
  # @return [String]
9
- required :service_url, String
9
+ required :user_id, String
10
10
 
11
- # @!attribute tenant_id
11
+ # @!attribute service_url
12
12
  #
13
- # @return [String]
14
- required :tenant_id, String
13
+ # @return [String, nil]
14
+ optional :service_url, String
15
15
 
16
- # @!attribute user_id
16
+ # @!attribute tenant_id
17
17
  #
18
- # @return [String]
19
- required :user_id, String
18
+ # @return [String, nil]
19
+ optional :tenant_id, String
20
20
 
21
- # @!method initialize(service_url:, tenant_id:, user_id:)
21
+ # @!method initialize(user_id:, service_url: nil, tenant_id: nil)
22
+ # Provide at least one of `tenant_id` or `service_url`. If you provide both, they
23
+ # must agree.
24
+ #
25
+ # @param user_id [String]
22
26
  # @param service_url [String]
23
27
  # @param tenant_id [String]
24
- # @param user_id [String]
25
28
  end
26
29
  end
27
30
  end
@@ -106,6 +106,8 @@ module Courier
106
106
  optional :middle_name, String, nil?: true
107
107
 
108
108
  # @!attribute ms_teams
109
+ # Provide at least one of `tenant_id` or `service_url`. If you provide both, they
110
+ # must agree.
109
111
  #
110
112
  # @return [Courier::Models::SendToMsTeamsUserID, Courier::Models::SendToMsTeamsEmail, Courier::Models::SendToMsTeamsChannelID, Courier::Models::SendToMsTeamsConversationID, Courier::Models::SendToMsTeamsChannelName, nil]
111
113
  optional :ms_teams, union: -> { Courier::MsTeams }, nil?: true
@@ -210,7 +212,7 @@ module Courier
210
212
  #
211
213
  # @param middle_name [String, nil]
212
214
  #
213
- # @param ms_teams [Courier::Models::SendToMsTeamsUserID, Courier::Models::SendToMsTeamsEmail, Courier::Models::SendToMsTeamsChannelID, Courier::Models::SendToMsTeamsConversationID, Courier::Models::SendToMsTeamsChannelName, nil]
215
+ # @param ms_teams [Courier::Models::SendToMsTeamsUserID, Courier::Models::SendToMsTeamsEmail, Courier::Models::SendToMsTeamsChannelID, Courier::Models::SendToMsTeamsConversationID, Courier::Models::SendToMsTeamsChannelName, nil] Provide at least one of `tenant_id` or `service_url`. If you provide both, they
214
216
  #
215
217
  # @param name [String, nil]
216
218
  #
@@ -320,6 +320,16 @@ module Courier
320
320
 
321
321
  JourneySendNode = Courier::Models::JourneySendNode
322
322
 
323
+ JourneySendNodeToMsTeams = Courier::Models::JourneySendNodeToMsTeams
324
+
325
+ JourneySendNodeToSlack = Courier::Models::JourneySendNodeToSlack
326
+
327
+ JourneySendNodeToSlackChannel = Courier::Models::JourneySendNodeToSlackChannel
328
+
329
+ JourneySendNodeToSlackEmail = Courier::Models::JourneySendNodeToSlackEmail
330
+
331
+ JourneySendNodeToSlackUserID = Courier::Models::JourneySendNodeToSlackUserID
332
+
323
333
  JourneysInvokeRequest = Courier::Models::JourneysInvokeRequest
324
334
 
325
335
  JourneysInvokeResponse = Courier::Models::JourneysInvokeResponse
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Courier
4
- VERSION = "6.2.0"
4
+ VERSION = "6.4.0"
5
5
  end
data/lib/courier.rb CHANGED
@@ -244,6 +244,11 @@ require_relative "courier/models/journeys/template_retrieve_content_params"
244
244
  require_relative "courier/models/journeys/template_retrieve_params"
245
245
  require_relative "courier/models/journey_segment_trigger_node"
246
246
  require_relative "courier/models/journey_send_node"
247
+ require_relative "courier/models/journey_send_node_to_ms_teams"
248
+ require_relative "courier/models/journey_send_node_to_slack"
249
+ require_relative "courier/models/journey_send_node_to_slack_channel"
250
+ require_relative "courier/models/journey_send_node_to_slack_email"
251
+ require_relative "courier/models/journey_send_node_to_slack_user_id"
247
252
  require_relative "courier/models/journeys_invoke_response"
248
253
  require_relative "courier/models/journeys_list_response"
249
254
  require_relative "courier/models/journey_state"