trycourier 6.1.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 (57) 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 +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/notification_get_metrics_params.rb +83 -0
  14. data/lib/courier/models/notification_metrics_response.rb +165 -0
  15. data/lib/courier/models/send_to_ms_teams_channel_id.rb +9 -5
  16. data/lib/courier/models/send_to_ms_teams_channel_name.rb +12 -9
  17. data/lib/courier/models/send_to_ms_teams_email.rb +8 -5
  18. data/lib/courier/models/send_to_ms_teams_user_id.rb +13 -10
  19. data/lib/courier/models/user_profile.rb +3 -1
  20. data/lib/courier/models.rb +14 -0
  21. data/lib/courier/resources/notifications.rb +53 -0
  22. data/lib/courier/version.rb +1 -1
  23. data/lib/courier.rb +7 -0
  24. data/rbi/courier/models/journey_send_node.rbi +78 -0
  25. data/rbi/courier/models/journey_send_node_to_ms_teams.rbi +124 -0
  26. data/rbi/courier/models/journey_send_node_to_slack.rbi +26 -0
  27. data/rbi/courier/models/journey_send_node_to_slack_channel.rbi +45 -0
  28. data/rbi/courier/models/journey_send_node_to_slack_email.rbi +47 -0
  29. data/rbi/courier/models/journey_send_node_to_slack_user_id.rbi +45 -0
  30. data/rbi/courier/models/ms_teams.rbi +2 -0
  31. data/rbi/courier/models/ms_teams_base_properties.rbi +15 -5
  32. data/rbi/courier/models/ms_teams_recipient.rbi +7 -1
  33. data/rbi/courier/models/notification_get_metrics_params.rbi +167 -0
  34. data/rbi/courier/models/notification_metrics_response.rbi +269 -0
  35. data/rbi/courier/models/send_to_ms_teams_channel_id.rbi +14 -5
  36. data/rbi/courier/models/send_to_ms_teams_channel_name.rbi +16 -8
  37. data/rbi/courier/models/send_to_ms_teams_email.rbi +13 -5
  38. data/rbi/courier/models/send_to_ms_teams_user_id.rbi +16 -8
  39. data/rbi/courier/models/user_profile.rbi +4 -0
  40. data/rbi/courier/models.rbi +14 -0
  41. data/rbi/courier/resources/notifications.rbi +57 -0
  42. data/sig/courier/models/journey_send_node.rbs +18 -0
  43. data/sig/courier/models/journey_send_node_to_ms_teams.rbs +64 -0
  44. data/sig/courier/models/journey_send_node_to_slack.rbs +14 -0
  45. data/sig/courier/models/journey_send_node_to_slack_channel.rbs +18 -0
  46. data/sig/courier/models/journey_send_node_to_slack_email.rbs +18 -0
  47. data/sig/courier/models/journey_send_node_to_slack_user_id.rbs +18 -0
  48. data/sig/courier/models/ms_teams_base_properties.rbs +7 -3
  49. data/sig/courier/models/notification_get_metrics_params.rbs +69 -0
  50. data/sig/courier/models/notification_metrics_response.rbs +127 -0
  51. data/sig/courier/models/send_to_ms_teams_channel_id.rbs +8 -4
  52. data/sig/courier/models/send_to_ms_teams_channel_name.rbs +11 -7
  53. data/sig/courier/models/send_to_ms_teams_email.rbs +8 -4
  54. data/sig/courier/models/send_to_ms_teams_user_id.rbs +13 -9
  55. data/sig/courier/models.rbs +14 -0
  56. data/sig/courier/resources/notifications.rbs +9 -0
  57. metadata +23 -2
@@ -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
@@ -392,6 +402,8 @@ module Courier
392
402
 
393
403
  NotificationGetContent = Courier::Models::NotificationGetContent
394
404
 
405
+ NotificationGetMetricsParams = Courier::Models::NotificationGetMetricsParams
406
+
395
407
  NotificationListParams = Courier::Models::NotificationListParams
396
408
 
397
409
  NotificationListVersionsParams =
@@ -399,6 +411,8 @@ module Courier
399
411
 
400
412
  NotificationLocalePutRequest = Courier::Models::NotificationLocalePutRequest
401
413
 
414
+ NotificationMetricsResponse = Courier::Models::NotificationMetricsResponse
415
+
402
416
  NotificationPreferenceDetails = Courier::Models::NotificationPreferenceDetails
403
417
 
404
418
  NotificationPublishParams = Courier::Models::NotificationPublishParams
@@ -99,6 +99,63 @@ module Courier
99
99
  )
100
100
  end
101
101
 
102
+ # Fetch the delivery funnel for one Notification Template as a time series — sent,
103
+ # delivered, opened, clicked, errors, and undeliverable — broken out per provider
104
+ # and channel inside each bucket. Sum the entries in a bucket for its totals;
105
+ # there is no bucket-level total.
106
+ #
107
+ # Choose the window absolutely with `start` and `end`, or relatively with
108
+ # `lookback` (an ISO 8601 duration). `start` and `end` take precedence when both
109
+ # are supplied, and a request carrying neither defaults to `lookback=P30D`. The
110
+ # window is snapped outwards onto the `granularity` grid so every bucket it
111
+ # overlaps is returned whole, and the snapped boundaries come back as `start` and
112
+ # `end` — align a chart on those rather than on what was requested. Every boundary
113
+ # is UTC; there is no timezone support.
114
+ #
115
+ # Every bucket in the window is returned, including the quiet ones, whose `data`
116
+ # array is empty, so a series is directly plottable with no gap filling
117
+ # client-side. An unknown template id returns `200` with an all-empty series
118
+ # rather than `404`, and messages sent without a Notification Template never
119
+ # appear here.
120
+ #
121
+ # Available in the US region only.
122
+ sig do
123
+ params(
124
+ id: String,
125
+ end_: Time,
126
+ granularity:
127
+ Courier::NotificationGetMetricsParams::Granularity::OrSymbol,
128
+ lookback: String,
129
+ start: Time,
130
+ request_options: Courier::RequestOptions::OrHash
131
+ ).returns(Courier::NotificationMetricsResponse)
132
+ end
133
+ def get_metrics(
134
+ # The Notification Template to report on — its ID (`nt_` prefix) or an alias. Must
135
+ # not contain commas or whitespace.
136
+ id,
137
+ # The end of the window, as an ISO 8601 timestamp with an offset. Must be supplied
138
+ # together with `start`. An `end` in the future is accepted and not clamped — the
139
+ # trailing buckets come back empty.
140
+ end_: nil,
141
+ # The size of each bucket in the series. Defaults to `DAY`. `WEEK` buckets start
142
+ # on Sunday. A fine granularity caps the window it can cover: `HOUR` spans at most
143
+ # 7 days and `DAY` at most 90 days, and a wider window returns `400` — request a
144
+ # coarser granularity instead. `WEEK` and `MONTH` are uncapped, subject to the
145
+ # 1000-bucket limit on a single response.
146
+ granularity: nil,
147
+ # The length of the window, counted back from now, as an ISO 8601 duration
148
+ # (`P30D`, `P12W`, `PT12H`). Defaults to `P30D`, and is ignored when `start` and
149
+ # `end` are supplied. A malformed or non-positive duration returns `400`.
150
+ lookback: nil,
151
+ # The inclusive start of the window, as an ISO 8601 timestamp with an offset
152
+ # (`2026-04-01T00:00:00Z`). Must be supplied together with `end` and be earlier
153
+ # than it; either one alone returns `400`.
154
+ start: nil,
155
+ request_options: {}
156
+ )
157
+ end
158
+
102
159
  # Returns a notification template's published versions, most recent first, for
103
160
  # comparison or rollback. Paged.
104
161
  sig do
@@ -125,7 +125,9 @@ module Courier
125
125
  type to =
126
126
  {
127
127
  email_override: String,
128
+ ms_teams: Courier::JourneySendNodeToMsTeams,
128
129
  phone_number_override: String,
130
+ slack: Courier::Models::journey_send_node_to_slack,
129
131
  user_id_override: String
130
132
  }
131
133
 
@@ -134,23 +136,39 @@ module Courier
134
136
 
135
137
  def email_override=: (String) -> String
136
138
 
139
+ attr_reader ms_teams: Courier::JourneySendNodeToMsTeams?
140
+
141
+ def ms_teams=: (
142
+ Courier::JourneySendNodeToMsTeams
143
+ ) -> Courier::JourneySendNodeToMsTeams
144
+
137
145
  attr_reader phone_number_override: String?
138
146
 
139
147
  def phone_number_override=: (String) -> String
140
148
 
149
+ attr_reader slack: Courier::Models::journey_send_node_to_slack?
150
+
151
+ def slack=: (
152
+ Courier::Models::journey_send_node_to_slack
153
+ ) -> Courier::Models::journey_send_node_to_slack
154
+
141
155
  attr_reader user_id_override: String?
142
156
 
143
157
  def user_id_override=: (String) -> String
144
158
 
145
159
  def initialize: (
146
160
  ?email_override: String,
161
+ ?ms_teams: Courier::JourneySendNodeToMsTeams,
147
162
  ?phone_number_override: String,
163
+ ?slack: Courier::Models::journey_send_node_to_slack,
148
164
  ?user_id_override: String
149
165
  ) -> void
150
166
 
151
167
  def to_hash: -> {
152
168
  email_override: String,
169
+ ms_teams: Courier::JourneySendNodeToMsTeams,
153
170
  phone_number_override: String,
171
+ slack: Courier::Models::journey_send_node_to_slack,
154
172
  user_id_override: String
155
173
  }
156
174
  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
@@ -0,0 +1,69 @@
1
+ module Courier
2
+ module Models
3
+ type notification_get_metrics_params =
4
+ {
5
+ id: String,
6
+ end_: Time,
7
+ granularity: Courier::Models::NotificationGetMetricsParams::granularity,
8
+ lookback: String,
9
+ start: Time
10
+ }
11
+ & Courier::Internal::Type::request_parameters
12
+
13
+ class NotificationGetMetricsParams < Courier::Internal::Type::BaseModel
14
+ extend Courier::Internal::Type::RequestParameters::Converter
15
+ include Courier::Internal::Type::RequestParameters
16
+
17
+ attr_accessor id: String
18
+
19
+ attr_reader end_: Time?
20
+
21
+ def end_=: (Time) -> Time
22
+
23
+ attr_reader granularity: Courier::Models::NotificationGetMetricsParams::granularity?
24
+
25
+ def granularity=: (
26
+ Courier::Models::NotificationGetMetricsParams::granularity
27
+ ) -> Courier::Models::NotificationGetMetricsParams::granularity
28
+
29
+ attr_reader lookback: String?
30
+
31
+ def lookback=: (String) -> String
32
+
33
+ attr_reader start: Time?
34
+
35
+ def start=: (Time) -> Time
36
+
37
+ def initialize: (
38
+ id: String,
39
+ ?end_: Time,
40
+ ?granularity: Courier::Models::NotificationGetMetricsParams::granularity,
41
+ ?lookback: String,
42
+ ?start: Time,
43
+ ?request_options: Courier::request_opts
44
+ ) -> void
45
+
46
+ def to_hash: -> {
47
+ id: String,
48
+ end_: Time,
49
+ granularity: Courier::Models::NotificationGetMetricsParams::granularity,
50
+ lookback: String,
51
+ start: Time,
52
+ request_options: Courier::RequestOptions
53
+ }
54
+
55
+ type granularity = :HOUR | :DAY | :WEEK | :MONTH
56
+
57
+ module Granularity
58
+ extend Courier::Internal::Type::Enum
59
+
60
+ HOUR: :HOUR
61
+ DAY: :DAY
62
+ WEEK: :WEEK
63
+ MONTH: :MONTH
64
+
65
+ def self?.values: -> ::Array[Courier::Models::NotificationGetMetricsParams::granularity]
66
+ end
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,127 @@
1
+ module Courier
2
+ module Models
3
+ type notification_metrics_response =
4
+ {
5
+ end_: Time,
6
+ granularity: Courier::Models::NotificationMetricsResponse::granularity,
7
+ notification_id: String,
8
+ series: ::Array[Courier::NotificationMetricsResponse::Series],
9
+ start: Time
10
+ }
11
+
12
+ class NotificationMetricsResponse < Courier::Internal::Type::BaseModel
13
+ attr_accessor end_: Time
14
+
15
+ attr_accessor granularity: Courier::Models::NotificationMetricsResponse::granularity
16
+
17
+ attr_accessor notification_id: String
18
+
19
+ attr_accessor series: ::Array[Courier::NotificationMetricsResponse::Series]
20
+
21
+ attr_accessor start: Time
22
+
23
+ def initialize: (
24
+ end_: Time,
25
+ granularity: Courier::Models::NotificationMetricsResponse::granularity,
26
+ notification_id: String,
27
+ series: ::Array[Courier::NotificationMetricsResponse::Series],
28
+ start: Time
29
+ ) -> void
30
+
31
+ def to_hash: -> {
32
+ end_: Time,
33
+ granularity: Courier::Models::NotificationMetricsResponse::granularity,
34
+ notification_id: String,
35
+ series: ::Array[Courier::NotificationMetricsResponse::Series],
36
+ start: Time
37
+ }
38
+
39
+ type granularity = :HOUR | :DAY | :WEEK | :MONTH
40
+
41
+ module Granularity
42
+ extend Courier::Internal::Type::Enum
43
+
44
+ HOUR: :HOUR
45
+ DAY: :DAY
46
+ WEEK: :WEEK
47
+ MONTH: :MONTH
48
+
49
+ def self?.values: -> ::Array[Courier::Models::NotificationMetricsResponse::granularity]
50
+ end
51
+
52
+ type series =
53
+ {
54
+ data: ::Array[Courier::NotificationMetricsResponse::Series::Data],
55
+ period: Time
56
+ }
57
+
58
+ class Series < Courier::Internal::Type::BaseModel
59
+ attr_accessor data: ::Array[Courier::NotificationMetricsResponse::Series::Data]
60
+
61
+ attr_accessor period: Time
62
+
63
+ def initialize: (
64
+ data: ::Array[Courier::NotificationMetricsResponse::Series::Data],
65
+ period: Time
66
+ ) -> void
67
+
68
+ def to_hash: -> {
69
+ data: ::Array[Courier::NotificationMetricsResponse::Series::Data],
70
+ period: Time
71
+ }
72
+
73
+ type data =
74
+ {
75
+ channel: String,
76
+ clicked: Integer,
77
+ delivered: Integer,
78
+ errors: Integer,
79
+ opened: Integer,
80
+ provider: String,
81
+ sent: Integer,
82
+ undeliverable: Integer
83
+ }
84
+
85
+ class Data < Courier::Internal::Type::BaseModel
86
+ attr_accessor channel: String
87
+
88
+ attr_accessor clicked: Integer
89
+
90
+ attr_accessor delivered: Integer
91
+
92
+ attr_accessor errors: Integer
93
+
94
+ attr_accessor opened: Integer
95
+
96
+ attr_accessor provider: String
97
+
98
+ attr_accessor sent: Integer
99
+
100
+ attr_accessor undeliverable: Integer
101
+
102
+ def initialize: (
103
+ channel: String,
104
+ clicked: Integer,
105
+ delivered: Integer,
106
+ errors: Integer,
107
+ opened: Integer,
108
+ provider: String,
109
+ sent: Integer,
110
+ undeliverable: Integer
111
+ ) -> void
112
+
113
+ def to_hash: -> {
114
+ channel: String,
115
+ clicked: Integer,
116
+ delivered: Integer,
117
+ errors: Integer,
118
+ opened: Integer,
119
+ provider: String,
120
+ sent: Integer,
121
+ undeliverable: Integer
122
+ }
123
+ end
124
+ end
125
+ end
126
+ end
127
+ 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
@@ -379,12 +389,16 @@ module Courier
379
389
 
380
390
  class NotificationGetContent = Courier::Models::NotificationGetContent
381
391
 
392
+ class NotificationGetMetricsParams = Courier::Models::NotificationGetMetricsParams
393
+
382
394
  class NotificationListParams = Courier::Models::NotificationListParams
383
395
 
384
396
  class NotificationListVersionsParams = Courier::Models::NotificationListVersionsParams
385
397
 
386
398
  class NotificationLocalePutRequest = Courier::Models::NotificationLocalePutRequest
387
399
 
400
+ class NotificationMetricsResponse = Courier::Models::NotificationMetricsResponse
401
+
388
402
  class NotificationPreferenceDetails = Courier::Models::NotificationPreferenceDetails
389
403
 
390
404
  class NotificationPublishParams = Courier::Models::NotificationPublishParams
@@ -26,6 +26,15 @@ module Courier
26
26
 
27
27
  def archive: (String id, ?request_options: Courier::request_opts) -> nil
28
28
 
29
+ def get_metrics: (
30
+ String id,
31
+ ?end_: Time,
32
+ ?granularity: Courier::Models::NotificationGetMetricsParams::granularity,
33
+ ?lookback: String,
34
+ ?start: Time,
35
+ ?request_options: Courier::request_opts
36
+ ) -> Courier::NotificationMetricsResponse
37
+
29
38
  def list_versions: (
30
39
  String id,
31
40
  ?cursor: String,