trycourier 4.4.0 → 4.6.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 (172) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/README.md +9 -9
  4. data/lib/trycourier/internal/transport/pooled_net_requester.rb +12 -10
  5. data/lib/trycourier/internal/type/base_model.rb +4 -3
  6. data/lib/trycourier/internal/type/union.rb +7 -9
  7. data/lib/trycourier/internal/util.rb +7 -2
  8. data/lib/trycourier/models/airship_profile.rb +21 -0
  9. data/lib/trycourier/models/airship_profile_audience.rb +15 -0
  10. data/lib/trycourier/models/audience.rb +3 -3
  11. data/lib/trycourier/models/audience_filter.rb +52 -0
  12. data/lib/trycourier/models/audience_recipient.rb +36 -0
  13. data/lib/trycourier/models/audience_update_params.rb +3 -3
  14. data/lib/trycourier/models/automation_list_params.rb +47 -0
  15. data/lib/trycourier/models/automation_template.rb +61 -0
  16. data/lib/trycourier/models/automation_template_list_response.rb +24 -0
  17. data/lib/trycourier/models/device_type.rb +7 -0
  18. data/lib/trycourier/models/discord.rb +16 -0
  19. data/lib/trycourier/models/expo.rb +16 -0
  20. data/lib/trycourier/models/filter.rb +8 -51
  21. data/lib/trycourier/models/filter_config.rb +8 -51
  22. data/lib/trycourier/models/intercom.rb +21 -0
  23. data/lib/trycourier/models/intercom_recipient.rb +15 -0
  24. data/lib/trycourier/models/list_filter.rb +52 -0
  25. data/lib/trycourier/models/list_pattern_recipient.rb +23 -0
  26. data/lib/trycourier/models/list_recipient.rb +29 -0
  27. data/lib/trycourier/models/ms_teams.rb +22 -0
  28. data/lib/trycourier/models/ms_teams_base_properties.rb +21 -0
  29. data/lib/trycourier/models/ms_teams_recipient.rb +17 -0
  30. data/lib/trycourier/models/multiple_tokens.rb +15 -0
  31. data/lib/trycourier/models/nested_filter_config.rb +49 -0
  32. data/lib/trycourier/models/pagerduty.rb +33 -0
  33. data/lib/trycourier/models/pagerduty_recipient.rb +17 -0
  34. data/lib/trycourier/models/send_direct_message.rb +15 -0
  35. data/lib/trycourier/models/send_message_params.rb +24 -7
  36. data/lib/trycourier/models/send_to_channel.rb +15 -0
  37. data/lib/trycourier/models/send_to_ms_teams_channel_id.rb +27 -0
  38. data/lib/trycourier/models/send_to_ms_teams_channel_name.rb +33 -0
  39. data/lib/trycourier/models/send_to_ms_teams_conversation_id.rb +27 -0
  40. data/lib/trycourier/models/send_to_ms_teams_email.rb +27 -0
  41. data/lib/trycourier/models/send_to_ms_teams_user_id.rb +27 -0
  42. data/lib/trycourier/models/send_to_slack_channel.rb +21 -0
  43. data/lib/trycourier/models/send_to_slack_email.rb +21 -0
  44. data/lib/trycourier/models/send_to_slack_user_id.rb +21 -0
  45. data/lib/trycourier/models/single_filter_config.rb +62 -0
  46. data/lib/trycourier/models/slack.rb +18 -0
  47. data/lib/trycourier/models/slack_base_properties.rb +15 -0
  48. data/lib/trycourier/models/slack_recipient.rb +17 -0
  49. data/lib/trycourier/models/token.rb +15 -0
  50. data/lib/trycourier/models/user_profile.rb +274 -0
  51. data/lib/trycourier/models/user_profile_firebase_token.rb +19 -0
  52. data/lib/trycourier/models/webhook_auth_mode.rb +16 -0
  53. data/lib/trycourier/models/webhook_authentication.rb +40 -0
  54. data/lib/trycourier/models/webhook_method.rb +15 -0
  55. data/lib/trycourier/models/webhook_profile.rb +53 -0
  56. data/lib/trycourier/models/webhook_profile_type.rb +15 -0
  57. data/lib/trycourier/models/webhook_recipient.rb +17 -0
  58. data/lib/trycourier/models.rb +90 -2
  59. data/lib/trycourier/resources/audiences.rb +1 -1
  60. data/lib/trycourier/resources/automations.rb +27 -0
  61. data/lib/trycourier/version.rb +1 -1
  62. data/lib/trycourier.rb +45 -1
  63. data/rbi/trycourier/models/airship_profile.rbi +41 -0
  64. data/rbi/trycourier/models/airship_profile_audience.rbi +26 -0
  65. data/rbi/trycourier/models/audience.rbi +8 -7
  66. data/rbi/trycourier/models/audience_filter.rbi +88 -0
  67. data/rbi/trycourier/models/audience_recipient.rbi +52 -0
  68. data/rbi/trycourier/models/audience_update_params.rbi +25 -7
  69. data/rbi/trycourier/models/automation_list_params.rbi +95 -0
  70. data/rbi/trycourier/models/automation_template.rbi +102 -0
  71. data/rbi/trycourier/models/automation_template_list_response.rbi +54 -0
  72. data/rbi/trycourier/models/device_type.rbi +7 -0
  73. data/rbi/trycourier/models/discord.rbi +18 -0
  74. data/rbi/trycourier/models/expo.rbi +16 -0
  75. data/rbi/trycourier/models/filter.rbi +8 -78
  76. data/rbi/trycourier/models/filter_config.rbi +8 -83
  77. data/rbi/trycourier/models/intercom.rbi +35 -0
  78. data/rbi/trycourier/models/intercom_recipient.rbi +23 -0
  79. data/rbi/trycourier/models/list_filter.rbi +86 -0
  80. data/rbi/trycourier/models/list_pattern_recipient.rbi +39 -0
  81. data/rbi/trycourier/models/list_recipient.rbi +44 -0
  82. data/rbi/trycourier/models/ms_teams.rbi +24 -0
  83. data/rbi/trycourier/models/ms_teams_base_properties.rbi +31 -0
  84. data/rbi/trycourier/models/ms_teams_recipient.rbi +58 -0
  85. data/rbi/trycourier/models/multiple_tokens.rbi +27 -0
  86. data/rbi/trycourier/models/nested_filter_config.rbi +104 -0
  87. data/rbi/trycourier/models/pagerduty.rbi +53 -0
  88. data/rbi/trycourier/models/pagerduty_recipient.rbi +31 -0
  89. data/rbi/trycourier/models/send_direct_message.rbi +23 -0
  90. data/rbi/trycourier/models/send_message_params.rbi +34 -10
  91. data/rbi/trycourier/models/send_to_channel.rbi +23 -0
  92. data/rbi/trycourier/models/send_to_ms_teams_channel_id.rbi +42 -0
  93. data/rbi/trycourier/models/send_to_ms_teams_channel_name.rbi +51 -0
  94. data/rbi/trycourier/models/send_to_ms_teams_conversation_id.rbi +42 -0
  95. data/rbi/trycourier/models/send_to_ms_teams_email.rbi +37 -0
  96. data/rbi/trycourier/models/send_to_ms_teams_user_id.rbi +37 -0
  97. data/rbi/trycourier/models/send_to_slack_channel.rbi +28 -0
  98. data/rbi/trycourier/models/send_to_slack_email.rbi +28 -0
  99. data/rbi/trycourier/models/send_to_slack_user_id.rbi +28 -0
  100. data/rbi/trycourier/models/single_filter_config.rbi +116 -0
  101. data/rbi/trycourier/models/slack.rbi +22 -0
  102. data/rbi/trycourier/models/slack_base_properties.rbi +23 -0
  103. data/rbi/trycourier/models/slack_recipient.rbi +52 -0
  104. data/rbi/trycourier/models/token.rbi +21 -0
  105. data/rbi/trycourier/models/user_profile.rbi +377 -0
  106. data/rbi/trycourier/models/user_profile_firebase_token.rbi +25 -0
  107. data/rbi/trycourier/models/webhook_auth_mode.rbi +22 -0
  108. data/rbi/trycourier/models/webhook_authentication.rbi +64 -0
  109. data/rbi/trycourier/models/webhook_method.rbi +21 -0
  110. data/rbi/trycourier/models/webhook_profile.rbi +80 -0
  111. data/rbi/trycourier/models/webhook_profile_type.rbi +22 -0
  112. data/rbi/trycourier/models/webhook_recipient.rbi +31 -0
  113. data/rbi/trycourier/models.rbi +91 -2
  114. data/rbi/trycourier/resources/audiences.rbi +7 -1
  115. data/rbi/trycourier/resources/automations.rbi +19 -0
  116. data/sig/trycourier/models/airship_profile.rbs +25 -0
  117. data/sig/trycourier/models/airship_profile_audience.rbs +13 -0
  118. data/sig/trycourier/models/audience.rbs +4 -4
  119. data/sig/trycourier/models/audience_filter.rbs +50 -0
  120. data/sig/trycourier/models/audience_recipient.rbs +30 -0
  121. data/sig/trycourier/models/audience_update_params.rbs +8 -4
  122. data/sig/trycourier/models/automation_list_params.rbs +48 -0
  123. data/sig/trycourier/models/automation_template.rbs +55 -0
  124. data/sig/trycourier/models/automation_template_list_response.rbs +28 -0
  125. data/sig/trycourier/models/device_type.rbs +5 -0
  126. data/sig/trycourier/models/discord.rbs +11 -0
  127. data/sig/trycourier/models/expo.rbs +11 -0
  128. data/sig/trycourier/models/filter.rbs +4 -61
  129. data/sig/trycourier/models/filter_config.rbs +4 -61
  130. data/sig/trycourier/models/intercom.rbs +15 -0
  131. data/sig/trycourier/models/intercom_recipient.rbs +13 -0
  132. data/sig/trycourier/models/list_filter.rbs +50 -0
  133. data/sig/trycourier/models/list_pattern_recipient.rbs +19 -0
  134. data/sig/trycourier/models/list_recipient.rbs +30 -0
  135. data/sig/trycourier/models/ms_teams.rbs +16 -0
  136. data/sig/trycourier/models/ms_teams_base_properties.rbs +15 -0
  137. data/sig/trycourier/models/ms_teams_recipient.rbs +13 -0
  138. data/sig/trycourier/models/multiple_tokens.rbs +13 -0
  139. data/sig/trycourier/models/nested_filter_config.rbs +64 -0
  140. data/sig/trycourier/models/pagerduty.rbs +35 -0
  141. data/sig/trycourier/models/pagerduty_recipient.rbs +13 -0
  142. data/sig/trycourier/models/send_direct_message.rbs +13 -0
  143. data/sig/trycourier/models/send_message_params.rbs +9 -3
  144. data/sig/trycourier/models/send_to_channel.rbs +13 -0
  145. data/sig/trycourier/models/send_to_ms_teams_channel_id.rbs +26 -0
  146. data/sig/trycourier/models/send_to_ms_teams_channel_name.rbs +35 -0
  147. data/sig/trycourier/models/send_to_ms_teams_conversation_id.rbs +26 -0
  148. data/sig/trycourier/models/send_to_ms_teams_email.rbs +22 -0
  149. data/sig/trycourier/models/send_to_ms_teams_user_id.rbs +26 -0
  150. data/sig/trycourier/models/send_to_slack_channel.rbs +15 -0
  151. data/sig/trycourier/models/send_to_slack_email.rbs +15 -0
  152. data/sig/trycourier/models/send_to_slack_user_id.rbs +15 -0
  153. data/sig/trycourier/models/single_filter_config.rbs +69 -0
  154. data/sig/trycourier/models/slack.rbs +14 -0
  155. data/sig/trycourier/models/slack_base_properties.rbs +13 -0
  156. data/sig/trycourier/models/slack_recipient.rbs +13 -0
  157. data/sig/trycourier/models/token.rbs +13 -0
  158. data/sig/trycourier/models/user_profile.rbs +212 -0
  159. data/sig/trycourier/models/user_profile_firebase_token.rbs +13 -0
  160. data/sig/trycourier/models/webhook_auth_mode.rbs +15 -0
  161. data/sig/trycourier/models/webhook_authentication.rbs +35 -0
  162. data/sig/trycourier/models/webhook_method.rbs +14 -0
  163. data/sig/trycourier/models/webhook_profile.rbs +40 -0
  164. data/sig/trycourier/models/webhook_profile_type.rbs +14 -0
  165. data/sig/trycourier/models/webhook_recipient.rbs +13 -0
  166. data/sig/trycourier/models.rbs +92 -4
  167. data/sig/trycourier/resources/audiences.rbs +1 -1
  168. data/sig/trycourier/resources/automations.rbs +6 -0
  169. metadata +137 -5
  170. data/lib/trycourier/models/recipient.rb +0 -113
  171. data/rbi/trycourier/models/recipient.rbi +0 -161
  172. data/sig/trycourier/models/recipient.rbs +0 -92
@@ -0,0 +1,44 @@
1
+ # typed: strong
2
+
3
+ module Trycourier
4
+ module Models
5
+ class ListRecipient < Trycourier::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Trycourier::ListRecipient, Trycourier::Internal::AnyHash)
9
+ end
10
+
11
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
12
+ attr_accessor :data
13
+
14
+ sig { returns(T.nilable(T::Array[Trycourier::ListFilter])) }
15
+ attr_accessor :filters
16
+
17
+ sig { returns(T.nilable(String)) }
18
+ attr_accessor :list_id
19
+
20
+ # Send to all users in a specific list
21
+ sig do
22
+ params(
23
+ data: T.nilable(T::Hash[Symbol, T.anything]),
24
+ filters: T.nilable(T::Array[Trycourier::ListFilter::OrHash]),
25
+ list_id: T.nilable(String)
26
+ ).returns(T.attached_class)
27
+ end
28
+ def self.new(data: nil, filters: nil, list_id: nil)
29
+ end
30
+
31
+ sig do
32
+ override.returns(
33
+ {
34
+ data: T.nilable(T::Hash[Symbol, T.anything]),
35
+ filters: T.nilable(T::Array[Trycourier::ListFilter]),
36
+ list_id: T.nilable(String)
37
+ }
38
+ )
39
+ end
40
+ def to_hash
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,24 @@
1
+ # typed: strong
2
+
3
+ module Trycourier
4
+ module Models
5
+ module MsTeams
6
+ extend Trycourier::Internal::Type::Union
7
+
8
+ Variants =
9
+ T.type_alias do
10
+ T.any(
11
+ Trycourier::SendToMsTeamsUserID,
12
+ Trycourier::SendToMsTeamsEmail,
13
+ Trycourier::SendToMsTeamsChannelID,
14
+ Trycourier::SendToMsTeamsConversationID,
15
+ Trycourier::SendToMsTeamsChannelName
16
+ )
17
+ end
18
+
19
+ sig { override.returns(T::Array[Trycourier::MsTeams::Variants]) }
20
+ def self.variants
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,31 @@
1
+ # typed: strong
2
+
3
+ module Trycourier
4
+ module Models
5
+ class MsTeamsBaseProperties < Trycourier::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Trycourier::MsTeamsBaseProperties,
10
+ Trycourier::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ sig { returns(String) }
15
+ attr_accessor :service_url
16
+
17
+ sig { returns(String) }
18
+ attr_accessor :tenant_id
19
+
20
+ sig do
21
+ params(service_url: String, tenant_id: String).returns(T.attached_class)
22
+ end
23
+ def self.new(service_url:, tenant_id:)
24
+ end
25
+
26
+ sig { override.returns({ service_url: String, tenant_id: String }) }
27
+ def to_hash
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,58 @@
1
+ # typed: strong
2
+
3
+ module Trycourier
4
+ module Models
5
+ class MsTeamsRecipient < Trycourier::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Trycourier::MsTeamsRecipient, Trycourier::Internal::AnyHash)
9
+ end
10
+
11
+ sig do
12
+ returns(
13
+ T.any(
14
+ Trycourier::SendToMsTeamsUserID,
15
+ Trycourier::SendToMsTeamsEmail,
16
+ Trycourier::SendToMsTeamsChannelID,
17
+ Trycourier::SendToMsTeamsConversationID,
18
+ Trycourier::SendToMsTeamsChannelName
19
+ )
20
+ )
21
+ end
22
+ attr_accessor :ms_teams
23
+
24
+ # Send via Microsoft Teams
25
+ sig do
26
+ params(
27
+ ms_teams:
28
+ T.any(
29
+ Trycourier::SendToMsTeamsUserID::OrHash,
30
+ Trycourier::SendToMsTeamsEmail::OrHash,
31
+ Trycourier::SendToMsTeamsChannelID::OrHash,
32
+ Trycourier::SendToMsTeamsConversationID::OrHash,
33
+ Trycourier::SendToMsTeamsChannelName::OrHash
34
+ )
35
+ ).returns(T.attached_class)
36
+ end
37
+ def self.new(ms_teams:)
38
+ end
39
+
40
+ sig do
41
+ override.returns(
42
+ {
43
+ ms_teams:
44
+ T.any(
45
+ Trycourier::SendToMsTeamsUserID,
46
+ Trycourier::SendToMsTeamsEmail,
47
+ Trycourier::SendToMsTeamsChannelID,
48
+ Trycourier::SendToMsTeamsConversationID,
49
+ Trycourier::SendToMsTeamsChannelName
50
+ )
51
+ }
52
+ )
53
+ end
54
+ def to_hash
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,27 @@
1
+ # typed: strong
2
+
3
+ module Trycourier
4
+ module Models
5
+ class MultipleTokens < Trycourier::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Trycourier::MultipleTokens, Trycourier::Internal::AnyHash)
9
+ end
10
+
11
+ sig { returns(T::Array[Trycourier::Token]) }
12
+ attr_accessor :tokens
13
+
14
+ sig do
15
+ params(tokens: T::Array[Trycourier::Token::OrHash]).returns(
16
+ T.attached_class
17
+ )
18
+ end
19
+ def self.new(tokens:)
20
+ end
21
+
22
+ sig { override.returns({ tokens: T::Array[Trycourier::Token] }) }
23
+ def to_hash
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,104 @@
1
+ # typed: strong
2
+
3
+ module Trycourier
4
+ module Models
5
+ class NestedFilterConfig < Trycourier::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Trycourier::NestedFilterConfig, Trycourier::Internal::AnyHash)
9
+ end
10
+
11
+ # The operator to use for filtering
12
+ sig { returns(Trycourier::NestedFilterConfig::Operator::OrSymbol) }
13
+ attr_accessor :operator
14
+
15
+ sig { returns(T::Array[Trycourier::FilterConfig]) }
16
+ attr_accessor :rules
17
+
18
+ sig do
19
+ params(
20
+ operator: Trycourier::NestedFilterConfig::Operator::OrSymbol,
21
+ rules: T::Array[Trycourier::FilterConfig]
22
+ ).returns(T.attached_class)
23
+ end
24
+ def self.new(
25
+ # The operator to use for filtering
26
+ operator:,
27
+ rules:
28
+ )
29
+ end
30
+
31
+ sig do
32
+ override.returns(
33
+ {
34
+ operator: Trycourier::NestedFilterConfig::Operator::OrSymbol,
35
+ rules: T::Array[Trycourier::FilterConfig]
36
+ }
37
+ )
38
+ end
39
+ def to_hash
40
+ end
41
+
42
+ # The operator to use for filtering
43
+ module Operator
44
+ extend Trycourier::Internal::Type::Enum
45
+
46
+ TaggedSymbol =
47
+ T.type_alias do
48
+ T.all(Symbol, Trycourier::NestedFilterConfig::Operator)
49
+ end
50
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
51
+
52
+ ENDS_WITH =
53
+ T.let(
54
+ :ENDS_WITH,
55
+ Trycourier::NestedFilterConfig::Operator::TaggedSymbol
56
+ )
57
+ EQ = T.let(:EQ, Trycourier::NestedFilterConfig::Operator::TaggedSymbol)
58
+ EXISTS =
59
+ T.let(:EXISTS, Trycourier::NestedFilterConfig::Operator::TaggedSymbol)
60
+ GT = T.let(:GT, Trycourier::NestedFilterConfig::Operator::TaggedSymbol)
61
+ GTE =
62
+ T.let(:GTE, Trycourier::NestedFilterConfig::Operator::TaggedSymbol)
63
+ INCLUDES =
64
+ T.let(
65
+ :INCLUDES,
66
+ Trycourier::NestedFilterConfig::Operator::TaggedSymbol
67
+ )
68
+ IS_AFTER =
69
+ T.let(
70
+ :IS_AFTER,
71
+ Trycourier::NestedFilterConfig::Operator::TaggedSymbol
72
+ )
73
+ IS_BEFORE =
74
+ T.let(
75
+ :IS_BEFORE,
76
+ Trycourier::NestedFilterConfig::Operator::TaggedSymbol
77
+ )
78
+ LT = T.let(:LT, Trycourier::NestedFilterConfig::Operator::TaggedSymbol)
79
+ LTE =
80
+ T.let(:LTE, Trycourier::NestedFilterConfig::Operator::TaggedSymbol)
81
+ NEQ =
82
+ T.let(:NEQ, Trycourier::NestedFilterConfig::Operator::TaggedSymbol)
83
+ OMIT =
84
+ T.let(:OMIT, Trycourier::NestedFilterConfig::Operator::TaggedSymbol)
85
+ STARTS_WITH =
86
+ T.let(
87
+ :STARTS_WITH,
88
+ Trycourier::NestedFilterConfig::Operator::TaggedSymbol
89
+ )
90
+ AND =
91
+ T.let(:AND, Trycourier::NestedFilterConfig::Operator::TaggedSymbol)
92
+ OR = T.let(:OR, Trycourier::NestedFilterConfig::Operator::TaggedSymbol)
93
+
94
+ sig do
95
+ override.returns(
96
+ T::Array[Trycourier::NestedFilterConfig::Operator::TaggedSymbol]
97
+ )
98
+ end
99
+ def self.values
100
+ end
101
+ end
102
+ end
103
+ end
104
+ end
@@ -0,0 +1,53 @@
1
+ # typed: strong
2
+
3
+ module Trycourier
4
+ module Models
5
+ class Pagerduty < Trycourier::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Trycourier::Pagerduty, Trycourier::Internal::AnyHash)
9
+ end
10
+
11
+ sig { returns(T.nilable(String)) }
12
+ attr_accessor :event_action
13
+
14
+ sig { returns(T.nilable(String)) }
15
+ attr_accessor :routing_key
16
+
17
+ sig { returns(T.nilable(String)) }
18
+ attr_accessor :severity
19
+
20
+ sig { returns(T.nilable(String)) }
21
+ attr_accessor :source
22
+
23
+ sig do
24
+ params(
25
+ event_action: T.nilable(String),
26
+ routing_key: T.nilable(String),
27
+ severity: T.nilable(String),
28
+ source: T.nilable(String)
29
+ ).returns(T.attached_class)
30
+ end
31
+ def self.new(
32
+ event_action: nil,
33
+ routing_key: nil,
34
+ severity: nil,
35
+ source: nil
36
+ )
37
+ end
38
+
39
+ sig do
40
+ override.returns(
41
+ {
42
+ event_action: T.nilable(String),
43
+ routing_key: T.nilable(String),
44
+ severity: T.nilable(String),
45
+ source: T.nilable(String)
46
+ }
47
+ )
48
+ end
49
+ def to_hash
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,31 @@
1
+ # typed: strong
2
+
3
+ module Trycourier
4
+ module Models
5
+ class PagerdutyRecipient < Trycourier::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Trycourier::PagerdutyRecipient, Trycourier::Internal::AnyHash)
9
+ end
10
+
11
+ sig { returns(Trycourier::Pagerduty) }
12
+ attr_reader :pagerduty
13
+
14
+ sig { params(pagerduty: Trycourier::Pagerduty::OrHash).void }
15
+ attr_writer :pagerduty
16
+
17
+ # Send via PagerDuty
18
+ sig do
19
+ params(pagerduty: Trycourier::Pagerduty::OrHash).returns(
20
+ T.attached_class
21
+ )
22
+ end
23
+ def self.new(pagerduty:)
24
+ end
25
+
26
+ sig { override.returns({ pagerduty: Trycourier::Pagerduty }) }
27
+ def to_hash
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,23 @@
1
+ # typed: strong
2
+
3
+ module Trycourier
4
+ module Models
5
+ class SendDirectMessage < Trycourier::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Trycourier::SendDirectMessage, Trycourier::Internal::AnyHash)
9
+ end
10
+
11
+ sig { returns(String) }
12
+ attr_accessor :user_id
13
+
14
+ sig { params(user_id: String).returns(T.attached_class) }
15
+ def self.new(user_id:)
16
+ end
17
+
18
+ sig { override.returns({ user_id: String }) }
19
+ def to_hash
20
+ end
21
+ end
22
+ end
23
+ end
@@ -206,7 +206,16 @@ module Trycourier
206
206
  sig do
207
207
  returns(
208
208
  T.nilable(
209
- T.any(Trycourier::UserRecipient, T::Array[Trycourier::Recipient])
209
+ T.any(
210
+ Trycourier::UserRecipient,
211
+ Trycourier::AudienceRecipient,
212
+ Trycourier::ListRecipient,
213
+ Trycourier::ListPatternRecipient,
214
+ Trycourier::SlackRecipient,
215
+ Trycourier::MsTeamsRecipient,
216
+ Trycourier::PagerdutyRecipient,
217
+ Trycourier::WebhookRecipient
218
+ )
210
219
  )
211
220
  )
212
221
  end
@@ -263,7 +272,13 @@ module Trycourier
263
272
  T.nilable(
264
273
  T.any(
265
274
  Trycourier::UserRecipient::OrHash,
266
- T::Array[Trycourier::Recipient::OrHash]
275
+ Trycourier::AudienceRecipient::OrHash,
276
+ Trycourier::ListRecipient::OrHash,
277
+ Trycourier::ListPatternRecipient::OrHash,
278
+ Trycourier::SlackRecipient::OrHash,
279
+ Trycourier::MsTeamsRecipient::OrHash,
280
+ Trycourier::PagerdutyRecipient::OrHash,
281
+ Trycourier::WebhookRecipient::OrHash
267
282
  )
268
283
  )
269
284
  ).returns(T.attached_class)
@@ -332,7 +347,13 @@ module Trycourier
332
347
  T.nilable(
333
348
  T.any(
334
349
  Trycourier::UserRecipient,
335
- T::Array[Trycourier::Recipient]
350
+ Trycourier::AudienceRecipient,
351
+ Trycourier::ListRecipient,
352
+ Trycourier::ListPatternRecipient,
353
+ Trycourier::SlackRecipient,
354
+ Trycourier::MsTeamsRecipient,
355
+ Trycourier::PagerdutyRecipient,
356
+ Trycourier::WebhookRecipient
336
357
  )
337
358
  )
338
359
  }
@@ -1099,7 +1120,16 @@ module Trycourier
1099
1120
 
1100
1121
  Variants =
1101
1122
  T.type_alias do
1102
- T.any(Trycourier::UserRecipient, T::Array[Trycourier::Recipient])
1123
+ T.any(
1124
+ Trycourier::UserRecipient,
1125
+ Trycourier::AudienceRecipient,
1126
+ Trycourier::ListRecipient,
1127
+ Trycourier::ListPatternRecipient,
1128
+ Trycourier::SlackRecipient,
1129
+ Trycourier::MsTeamsRecipient,
1130
+ Trycourier::PagerdutyRecipient,
1131
+ Trycourier::WebhookRecipient
1132
+ )
1103
1133
  end
1104
1134
 
1105
1135
  sig do
@@ -1109,12 +1139,6 @@ module Trycourier
1109
1139
  end
1110
1140
  def self.variants
1111
1141
  end
1112
-
1113
- RecipientArray =
1114
- T.let(
1115
- Trycourier::Internal::Type::ArrayOf[Trycourier::Recipient],
1116
- Trycourier::Internal::Type::Converter
1117
- )
1118
1142
  end
1119
1143
  end
1120
1144
  end
@@ -0,0 +1,23 @@
1
+ # typed: strong
2
+
3
+ module Trycourier
4
+ module Models
5
+ class SendToChannel < Trycourier::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Trycourier::SendToChannel, Trycourier::Internal::AnyHash)
9
+ end
10
+
11
+ sig { returns(String) }
12
+ attr_accessor :channel_id
13
+
14
+ sig { params(channel_id: String).returns(T.attached_class) }
15
+ def self.new(channel_id:)
16
+ end
17
+
18
+ sig { override.returns({ channel_id: String }) }
19
+ def to_hash
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,42 @@
1
+ # typed: strong
2
+
3
+ module Trycourier
4
+ module Models
5
+ class SendToMsTeamsChannelID < Trycourier::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Trycourier::SendToMsTeamsChannelID,
10
+ Trycourier::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ sig { returns(String) }
15
+ attr_accessor :channel_id
16
+
17
+ sig { returns(String) }
18
+ attr_accessor :service_url
19
+
20
+ sig { returns(String) }
21
+ attr_accessor :tenant_id
22
+
23
+ sig do
24
+ params(
25
+ channel_id: String,
26
+ service_url: String,
27
+ tenant_id: String
28
+ ).returns(T.attached_class)
29
+ end
30
+ def self.new(channel_id:, service_url:, tenant_id:)
31
+ end
32
+
33
+ sig do
34
+ override.returns(
35
+ { channel_id: String, service_url: String, tenant_id: String }
36
+ )
37
+ end
38
+ def to_hash
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,51 @@
1
+ # typed: strong
2
+
3
+ module Trycourier
4
+ module Models
5
+ class SendToMsTeamsChannelName < Trycourier::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Trycourier::SendToMsTeamsChannelName,
10
+ Trycourier::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ sig { returns(String) }
15
+ attr_accessor :channel_name
16
+
17
+ sig { returns(String) }
18
+ attr_accessor :service_url
19
+
20
+ sig { returns(String) }
21
+ attr_accessor :team_id
22
+
23
+ sig { returns(String) }
24
+ attr_accessor :tenant_id
25
+
26
+ sig do
27
+ params(
28
+ channel_name: String,
29
+ service_url: String,
30
+ team_id: String,
31
+ tenant_id: String
32
+ ).returns(T.attached_class)
33
+ end
34
+ def self.new(channel_name:, service_url:, team_id:, tenant_id:)
35
+ end
36
+
37
+ sig do
38
+ override.returns(
39
+ {
40
+ channel_name: String,
41
+ service_url: String,
42
+ team_id: String,
43
+ tenant_id: String
44
+ }
45
+ )
46
+ end
47
+ def to_hash
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,42 @@
1
+ # typed: strong
2
+
3
+ module Trycourier
4
+ module Models
5
+ class SendToMsTeamsConversationID < Trycourier::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Trycourier::SendToMsTeamsConversationID,
10
+ Trycourier::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ sig { returns(String) }
15
+ attr_accessor :conversation_id
16
+
17
+ sig { returns(String) }
18
+ attr_accessor :service_url
19
+
20
+ sig { returns(String) }
21
+ attr_accessor :tenant_id
22
+
23
+ sig do
24
+ params(
25
+ conversation_id: String,
26
+ service_url: String,
27
+ tenant_id: String
28
+ ).returns(T.attached_class)
29
+ end
30
+ def self.new(conversation_id:, service_url:, tenant_id:)
31
+ end
32
+
33
+ sig do
34
+ override.returns(
35
+ { conversation_id: String, service_url: String, tenant_id: String }
36
+ )
37
+ end
38
+ def to_hash
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,37 @@
1
+ # typed: strong
2
+
3
+ module Trycourier
4
+ module Models
5
+ class SendToMsTeamsEmail < Trycourier::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Trycourier::SendToMsTeamsEmail, Trycourier::Internal::AnyHash)
9
+ end
10
+
11
+ sig { returns(String) }
12
+ attr_accessor :email
13
+
14
+ sig { returns(String) }
15
+ attr_accessor :service_url
16
+
17
+ sig { returns(String) }
18
+ attr_accessor :tenant_id
19
+
20
+ sig do
21
+ params(email: String, service_url: String, tenant_id: String).returns(
22
+ T.attached_class
23
+ )
24
+ end
25
+ def self.new(email:, service_url:, tenant_id:)
26
+ end
27
+
28
+ sig do
29
+ override.returns(
30
+ { email: String, service_url: String, tenant_id: String }
31
+ )
32
+ end
33
+ def to_hash
34
+ end
35
+ end
36
+ end
37
+ end