trycourier 6.2.0 → 6.3.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 +7 -0
  3. data/README.md +1 -1
  4. data/lib/courier/models/journey_send_node.rb +38 -2
  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 +78 -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 +18 -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
@@ -151,6 +151,9 @@ module Courier
151
151
  sig { params(template: String).void }
152
152
  attr_writer :template
153
153
 
154
+ # Recipient override for this send. Provide exactly one of `email_override`,
155
+ # `phone_number_override`, `user_id_override`, `slack`, or `ms_teams` — not a
156
+ # combination.
154
157
  sig { returns(T.nilable(Courier::JourneySendNode::Message::To)) }
155
158
  attr_reader :to
156
159
 
@@ -173,6 +176,9 @@ module Courier
173
176
  data: nil,
174
177
  delay: nil,
175
178
  template: nil,
179
+ # Recipient override for this send. Provide exactly one of `email_override`,
180
+ # `phone_number_override`, `user_id_override`, `slack`, or `ms_teams` — not a
181
+ # combination.
176
182
  to: nil
177
183
  )
178
184
  end
@@ -282,28 +288,93 @@ module Courier
282
288
  sig { params(email_override: String).void }
283
289
  attr_writer :email_override
284
290
 
291
+ # Send to a Microsoft Teams address directly, bypassing the recipient's stored
292
+ # profile. Requires exactly one target: `channel_id`, `channel_name` (with
293
+ # `team_id`), `user_id`, or `email`. `channel_name`, `user_id`, and `email` also
294
+ # need at least one of `service_url` or `tenant_id` — if you provide both, they
295
+ # must agree. `channel_id` doesn't require tenant context to publish, but provide
296
+ # `service_url` or `tenant_id` anyway: sends without either have failed at
297
+ # delivery in testing. `conversation_id` and `reply_to_activity_id`, available on
298
+ # the send API's `MsTeams` profile, aren't supported here yet.
299
+ sig { returns(T.nilable(Courier::JourneySendNodeToMsTeams)) }
300
+ attr_reader :ms_teams
301
+
302
+ sig do
303
+ params(ms_teams: Courier::JourneySendNodeToMsTeams::OrHash).void
304
+ end
305
+ attr_writer :ms_teams
306
+
285
307
  sig { returns(T.nilable(String)) }
286
308
  attr_reader :phone_number_override
287
309
 
288
310
  sig { params(phone_number_override: String).void }
289
311
  attr_writer :phone_number_override
290
312
 
313
+ # Send to a Slack address directly, bypassing the recipient's stored profile.
314
+ # Requires exactly one of `channel`, `user_id`, or `email`.
315
+ sig do
316
+ returns(
317
+ T.nilable(
318
+ T.any(
319
+ Courier::JourneySendNodeToSlackChannel,
320
+ Courier::JourneySendNodeToSlackUserID,
321
+ Courier::JourneySendNodeToSlackEmail
322
+ )
323
+ )
324
+ )
325
+ end
326
+ attr_reader :slack
327
+
328
+ sig do
329
+ params(
330
+ slack:
331
+ T.any(
332
+ Courier::JourneySendNodeToSlackChannel::OrHash,
333
+ Courier::JourneySendNodeToSlackUserID::OrHash,
334
+ Courier::JourneySendNodeToSlackEmail::OrHash
335
+ )
336
+ ).void
337
+ end
338
+ attr_writer :slack
339
+
291
340
  sig { returns(T.nilable(String)) }
292
341
  attr_reader :user_id_override
293
342
 
294
343
  sig { params(user_id_override: String).void }
295
344
  attr_writer :user_id_override
296
345
 
346
+ # Recipient override for this send. Provide exactly one of `email_override`,
347
+ # `phone_number_override`, `user_id_override`, `slack`, or `ms_teams` — not a
348
+ # combination.
297
349
  sig do
298
350
  params(
299
351
  email_override: String,
352
+ ms_teams: Courier::JourneySendNodeToMsTeams::OrHash,
300
353
  phone_number_override: String,
354
+ slack:
355
+ T.any(
356
+ Courier::JourneySendNodeToSlackChannel::OrHash,
357
+ Courier::JourneySendNodeToSlackUserID::OrHash,
358
+ Courier::JourneySendNodeToSlackEmail::OrHash
359
+ ),
301
360
  user_id_override: String
302
361
  ).returns(T.attached_class)
303
362
  end
304
363
  def self.new(
305
364
  email_override: nil,
365
+ # Send to a Microsoft Teams address directly, bypassing the recipient's stored
366
+ # profile. Requires exactly one target: `channel_id`, `channel_name` (with
367
+ # `team_id`), `user_id`, or `email`. `channel_name`, `user_id`, and `email` also
368
+ # need at least one of `service_url` or `tenant_id` — if you provide both, they
369
+ # must agree. `channel_id` doesn't require tenant context to publish, but provide
370
+ # `service_url` or `tenant_id` anyway: sends without either have failed at
371
+ # delivery in testing. `conversation_id` and `reply_to_activity_id`, available on
372
+ # the send API's `MsTeams` profile, aren't supported here yet.
373
+ ms_teams: nil,
306
374
  phone_number_override: nil,
375
+ # Send to a Slack address directly, bypassing the recipient's stored profile.
376
+ # Requires exactly one of `channel`, `user_id`, or `email`.
377
+ slack: nil,
307
378
  user_id_override: nil
308
379
  )
309
380
  end
@@ -312,7 +383,14 @@ module Courier
312
383
  override.returns(
313
384
  {
314
385
  email_override: String,
386
+ ms_teams: Courier::JourneySendNodeToMsTeams,
315
387
  phone_number_override: String,
388
+ slack:
389
+ T.any(
390
+ Courier::JourneySendNodeToSlackChannel,
391
+ Courier::JourneySendNodeToSlackUserID,
392
+ Courier::JourneySendNodeToSlackEmail
393
+ ),
316
394
  user_id_override: String
317
395
  }
318
396
  )
@@ -0,0 +1,124 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ class JourneySendNodeToMsTeams < Courier::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Courier::JourneySendNodeToMsTeams, Courier::Internal::AnyHash)
9
+ end
10
+
11
+ # Bot Framework channel ID to send to.
12
+ sig { returns(T.nilable(String)) }
13
+ attr_reader :channel_id
14
+
15
+ sig { params(channel_id: String).void }
16
+ attr_writer :channel_id
17
+
18
+ # Teams channel name to send to. Requires `team_id`.
19
+ sig { returns(T.nilable(String)) }
20
+ attr_reader :channel_name
21
+
22
+ sig { params(channel_name: String).void }
23
+ attr_writer :channel_name
24
+
25
+ # Email address of the Teams user to send to.
26
+ sig { returns(T.nilable(String)) }
27
+ attr_reader :email
28
+
29
+ sig { params(email: String).void }
30
+ attr_writer :email
31
+
32
+ # The regional Bot Framework host for this conversation, e.g.
33
+ # `https://smba.trafficmanager.net/amer`. A path segment naming the Microsoft
34
+ # tenant may follow it and is used to derive `tenant_id` when it is not supplied
35
+ # directly.
36
+ sig { returns(T.nilable(String)) }
37
+ attr_reader :service_url
38
+
39
+ sig { params(service_url: String).void }
40
+ attr_writer :service_url
41
+
42
+ # Microsoft Teams team ID. Required alongside `channel_name`.
43
+ sig { returns(T.nilable(String)) }
44
+ attr_reader :team_id
45
+
46
+ sig { params(team_id: String).void }
47
+ attr_writer :team_id
48
+
49
+ # The Microsoft (Azure AD) tenant this send targets or authenticates against.
50
+ # Unrelated to `message.context.tenant_id`, which is the Courier customer's own
51
+ # multi-tenant context.
52
+ sig { returns(T.nilable(String)) }
53
+ attr_reader :tenant_id
54
+
55
+ sig { params(tenant_id: String).void }
56
+ attr_writer :tenant_id
57
+
58
+ # Microsoft Teams user ID to send to.
59
+ sig { returns(T.nilable(String)) }
60
+ attr_reader :user_id
61
+
62
+ sig { params(user_id: String).void }
63
+ attr_writer :user_id
64
+
65
+ # Send to a Microsoft Teams address directly, bypassing the recipient's stored
66
+ # profile. Requires exactly one target: `channel_id`, `channel_name` (with
67
+ # `team_id`), `user_id`, or `email`. `channel_name`, `user_id`, and `email` also
68
+ # need at least one of `service_url` or `tenant_id` — if you provide both, they
69
+ # must agree. `channel_id` doesn't require tenant context to publish, but provide
70
+ # `service_url` or `tenant_id` anyway: sends without either have failed at
71
+ # delivery in testing. `conversation_id` and `reply_to_activity_id`, available on
72
+ # the send API's `MsTeams` profile, aren't supported here yet.
73
+ sig do
74
+ params(
75
+ channel_id: String,
76
+ channel_name: String,
77
+ email: String,
78
+ service_url: String,
79
+ team_id: String,
80
+ tenant_id: String,
81
+ user_id: String
82
+ ).returns(T.attached_class)
83
+ end
84
+ def self.new(
85
+ # Bot Framework channel ID to send to.
86
+ channel_id: nil,
87
+ # Teams channel name to send to. Requires `team_id`.
88
+ channel_name: nil,
89
+ # Email address of the Teams user to send to.
90
+ email: nil,
91
+ # The regional Bot Framework host for this conversation, e.g.
92
+ # `https://smba.trafficmanager.net/amer`. A path segment naming the Microsoft
93
+ # tenant may follow it and is used to derive `tenant_id` when it is not supplied
94
+ # directly.
95
+ service_url: nil,
96
+ # Microsoft Teams team ID. Required alongside `channel_name`.
97
+ team_id: nil,
98
+ # The Microsoft (Azure AD) tenant this send targets or authenticates against.
99
+ # Unrelated to `message.context.tenant_id`, which is the Courier customer's own
100
+ # multi-tenant context.
101
+ tenant_id: nil,
102
+ # Microsoft Teams user ID to send to.
103
+ user_id: nil
104
+ )
105
+ end
106
+
107
+ sig do
108
+ override.returns(
109
+ {
110
+ channel_id: String,
111
+ channel_name: String,
112
+ email: String,
113
+ service_url: String,
114
+ team_id: String,
115
+ tenant_id: String,
116
+ user_id: String
117
+ }
118
+ )
119
+ end
120
+ def to_hash
121
+ end
122
+ end
123
+ end
124
+ end
@@ -0,0 +1,26 @@
1
+ # typed: strong
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
+ Variants =
11
+ T.type_alias do
12
+ T.any(
13
+ Courier::JourneySendNodeToSlackChannel,
14
+ Courier::JourneySendNodeToSlackUserID,
15
+ Courier::JourneySendNodeToSlackEmail
16
+ )
17
+ end
18
+
19
+ sig do
20
+ override.returns(T::Array[Courier::JourneySendNodeToSlack::Variants])
21
+ end
22
+ def self.variants
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,45 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ class JourneySendNodeToSlackChannel < Courier::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Courier::JourneySendNodeToSlackChannel,
10
+ Courier::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # Slack channel to send to, by name or ID.
15
+ sig { returns(String) }
16
+ attr_accessor :channel
17
+
18
+ # A runtime reference to a Slack access token, such as `{{data.slack_token}}`.
19
+ # Literal values are rejected — they'd be stored permanently with no way to rotate
20
+ # them. Omit to use the token on the recipient's stored Slack profile.
21
+ sig { returns(T.nilable(String)) }
22
+ attr_reader :access_token
23
+
24
+ sig { params(access_token: String).void }
25
+ attr_writer :access_token
26
+
27
+ sig do
28
+ params(channel: String, access_token: String).returns(T.attached_class)
29
+ end
30
+ def self.new(
31
+ # Slack channel to send to, by name or ID.
32
+ channel:,
33
+ # A runtime reference to a Slack access token, such as `{{data.slack_token}}`.
34
+ # Literal values are rejected — they'd be stored permanently with no way to rotate
35
+ # them. Omit to use the token on the recipient's stored Slack profile.
36
+ access_token: nil
37
+ )
38
+ end
39
+
40
+ sig { override.returns({ channel: String, access_token: String }) }
41
+ def to_hash
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,47 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ class JourneySendNodeToSlackEmail < Courier::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Courier::JourneySendNodeToSlackEmail,
10
+ Courier::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # Email address of the Slack user to send to, resolved via the workspace
15
+ # directory.
16
+ sig { returns(String) }
17
+ attr_accessor :email
18
+
19
+ # A runtime reference to a Slack access token, such as `{{data.slack_token}}`.
20
+ # Literal values are rejected — they'd be stored permanently with no way to rotate
21
+ # them. Omit to use the token on the recipient's stored Slack profile.
22
+ sig { returns(T.nilable(String)) }
23
+ attr_reader :access_token
24
+
25
+ sig { params(access_token: String).void }
26
+ attr_writer :access_token
27
+
28
+ sig do
29
+ params(email: String, access_token: String).returns(T.attached_class)
30
+ end
31
+ def self.new(
32
+ # Email address of the Slack user to send to, resolved via the workspace
33
+ # directory.
34
+ email:,
35
+ # A runtime reference to a Slack access token, such as `{{data.slack_token}}`.
36
+ # Literal values are rejected — they'd be stored permanently with no way to rotate
37
+ # them. Omit to use the token on the recipient's stored Slack profile.
38
+ access_token: nil
39
+ )
40
+ end
41
+
42
+ sig { override.returns({ email: String, access_token: String }) }
43
+ def to_hash
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,45 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ class JourneySendNodeToSlackUserID < Courier::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Courier::JourneySendNodeToSlackUserID,
10
+ Courier::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # Slack user ID to send to.
15
+ sig { returns(String) }
16
+ attr_accessor :user_id
17
+
18
+ # A runtime reference to a Slack access token, such as `{{data.slack_token}}`.
19
+ # Literal values are rejected — they'd be stored permanently with no way to rotate
20
+ # them. Omit to use the token on the recipient's stored Slack profile.
21
+ sig { returns(T.nilable(String)) }
22
+ attr_reader :access_token
23
+
24
+ sig { params(access_token: String).void }
25
+ attr_writer :access_token
26
+
27
+ sig do
28
+ params(user_id: String, access_token: String).returns(T.attached_class)
29
+ end
30
+ def self.new(
31
+ # Slack user ID to send to.
32
+ user_id:,
33
+ # A runtime reference to a Slack access token, such as `{{data.slack_token}}`.
34
+ # Literal values are rejected — they'd be stored permanently with no way to rotate
35
+ # them. Omit to use the token on the recipient's stored Slack profile.
36
+ access_token: nil
37
+ )
38
+ end
39
+
40
+ sig { override.returns({ user_id: String, access_token: String }) }
41
+ def to_hash
42
+ end
43
+ end
44
+ end
45
+ end
@@ -2,6 +2,8 @@
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
 
@@ -8,16 +8,26 @@ module Courier
8
8
  T.any(Courier::MsTeamsBaseProperties, Courier::Internal::AnyHash)
9
9
  end
10
10
 
11
- sig { returns(String) }
12
- attr_accessor :service_url
11
+ sig { returns(T.nilable(String)) }
12
+ attr_reader :service_url
13
13
 
14
- sig { returns(String) }
15
- attr_accessor :tenant_id
14
+ sig { params(service_url: String).void }
15
+ attr_writer :service_url
16
16
 
17
+ sig { returns(T.nilable(String)) }
18
+ attr_reader :tenant_id
19
+
20
+ sig { params(tenant_id: String).void }
21
+ attr_writer :tenant_id
22
+
23
+ # Tenant context shared by every MS Teams send variant. Provide at least one of
24
+ # `tenant_id` or `service_url`. If you provide both, they must agree — a
25
+ # `service_url` pointing at a different Microsoft tenant than `tenant_id` is
26
+ # rejected.
17
27
  sig do
18
28
  params(service_url: String, tenant_id: String).returns(T.attached_class)
19
29
  end
20
- def self.new(service_url:, tenant_id:)
30
+ def self.new(service_url: nil, tenant_id: nil)
21
31
  end
22
32
 
23
33
  sig { override.returns({ service_url: String, tenant_id: String }) }
@@ -8,6 +8,8 @@ module Courier
8
8
  T.any(Courier::MsTeamsRecipient, Courier::Internal::AnyHash)
9
9
  end
10
10
 
11
+ # Provide at least one of `tenant_id` or `service_url`. If you provide both, they
12
+ # must agree.
11
13
  sig do
12
14
  returns(
13
15
  T.any(
@@ -34,7 +36,11 @@ module Courier
34
36
  )
35
37
  ).returns(T.attached_class)
36
38
  end
37
- def self.new(ms_teams:)
39
+ def self.new(
40
+ # Provide at least one of `tenant_id` or `service_url`. If you provide both, they
41
+ # must agree.
42
+ ms_teams:
43
+ )
38
44
  end
39
45
 
40
46
  sig do
@@ -11,12 +11,21 @@ module Courier
11
11
  sig { returns(String) }
12
12
  attr_accessor :channel_id
13
13
 
14
- sig { returns(String) }
15
- attr_accessor :service_url
14
+ sig { returns(T.nilable(String)) }
15
+ attr_reader :service_url
16
16
 
17
- sig { returns(String) }
18
- attr_accessor :tenant_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
+ # Sends directly to a Microsoft Teams channel by its Bot Framework ID. Still
27
+ # provide at least one of `tenant_id` or `service_url` — sends without either have
28
+ # failed Bot Framework authentication in testing.
20
29
  sig do
21
30
  params(
22
31
  channel_id: String,
@@ -24,7 +33,7 @@ module Courier
24
33
  tenant_id: String
25
34
  ).returns(T.attached_class)
26
35
  end
27
- def self.new(channel_id:, service_url:, tenant_id:)
36
+ def self.new(channel_id:, service_url: nil, tenant_id: nil)
28
37
  end
29
38
 
30
39
  sig do
@@ -11,32 +11,40 @@ module Courier
11
11
  sig { returns(String) }
12
12
  attr_accessor :channel_name
13
13
 
14
- sig { returns(String) }
15
- attr_accessor :service_url
16
-
17
14
  sig { returns(String) }
18
15
  attr_accessor :team_id
19
16
 
20
- sig { returns(String) }
21
- attr_accessor :tenant_id
17
+ sig { returns(T.nilable(String)) }
18
+ attr_reader :service_url
19
+
20
+ sig { params(service_url: String).void }
21
+ attr_writer :service_url
22
+
23
+ sig { returns(T.nilable(String)) }
24
+ attr_reader :tenant_id
22
25
 
26
+ sig { params(tenant_id: String).void }
27
+ attr_writer :tenant_id
28
+
29
+ # `team_id` is required alongside `channel_name`. Also provide at least one of
30
+ # `tenant_id` or `service_url`; if you provide both, they must agree.
23
31
  sig do
24
32
  params(
25
33
  channel_name: String,
26
- service_url: String,
27
34
  team_id: String,
35
+ service_url: String,
28
36
  tenant_id: String
29
37
  ).returns(T.attached_class)
30
38
  end
31
- def self.new(channel_name:, service_url:, team_id:, tenant_id:)
39
+ def self.new(channel_name:, team_id:, service_url: nil, tenant_id: nil)
32
40
  end
33
41
 
34
42
  sig do
35
43
  override.returns(
36
44
  {
37
45
  channel_name: String,
38
- service_url: String,
39
46
  team_id: String,
47
+ service_url: String,
40
48
  tenant_id: String
41
49
  }
42
50
  )
@@ -11,18 +11,26 @@ module Courier
11
11
  sig { returns(String) }
12
12
  attr_accessor :email
13
13
 
14
- sig { returns(String) }
15
- attr_accessor :service_url
14
+ sig { returns(T.nilable(String)) }
15
+ attr_reader :service_url
16
16
 
17
- sig { returns(String) }
18
- attr_accessor :tenant_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
29
  params(email: String, service_url: String, tenant_id: String).returns(
22
30
  T.attached_class
23
31
  )
24
32
  end
25
- def self.new(email:, service_url:, tenant_id:)
33
+ def self.new(email:, service_url: nil, tenant_id: nil)
26
34
  end
27
35
 
28
36
  sig do
@@ -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