trycourier 4.4.0 → 4.5.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 (160) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +1 -1
  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/device_type.rb +7 -0
  15. data/lib/trycourier/models/discord.rb +16 -0
  16. data/lib/trycourier/models/expo.rb +16 -0
  17. data/lib/trycourier/models/filter.rb +8 -51
  18. data/lib/trycourier/models/filter_config.rb +8 -51
  19. data/lib/trycourier/models/intercom.rb +21 -0
  20. data/lib/trycourier/models/intercom_recipient.rb +15 -0
  21. data/lib/trycourier/models/list_filter.rb +52 -0
  22. data/lib/trycourier/models/list_pattern_recipient.rb +23 -0
  23. data/lib/trycourier/models/list_recipient.rb +29 -0
  24. data/lib/trycourier/models/ms_teams.rb +22 -0
  25. data/lib/trycourier/models/ms_teams_base_properties.rb +21 -0
  26. data/lib/trycourier/models/ms_teams_recipient.rb +17 -0
  27. data/lib/trycourier/models/multiple_tokens.rb +15 -0
  28. data/lib/trycourier/models/nested_filter_config.rb +49 -0
  29. data/lib/trycourier/models/pagerduty.rb +33 -0
  30. data/lib/trycourier/models/pagerduty_recipient.rb +17 -0
  31. data/lib/trycourier/models/send_direct_message.rb +15 -0
  32. data/lib/trycourier/models/send_message_params.rb +24 -7
  33. data/lib/trycourier/models/send_to_channel.rb +15 -0
  34. data/lib/trycourier/models/send_to_ms_teams_channel_id.rb +27 -0
  35. data/lib/trycourier/models/send_to_ms_teams_channel_name.rb +33 -0
  36. data/lib/trycourier/models/send_to_ms_teams_conversation_id.rb +27 -0
  37. data/lib/trycourier/models/send_to_ms_teams_email.rb +27 -0
  38. data/lib/trycourier/models/send_to_ms_teams_user_id.rb +27 -0
  39. data/lib/trycourier/models/send_to_slack_channel.rb +21 -0
  40. data/lib/trycourier/models/send_to_slack_email.rb +21 -0
  41. data/lib/trycourier/models/send_to_slack_user_id.rb +21 -0
  42. data/lib/trycourier/models/single_filter_config.rb +62 -0
  43. data/lib/trycourier/models/slack.rb +18 -0
  44. data/lib/trycourier/models/slack_base_properties.rb +15 -0
  45. data/lib/trycourier/models/slack_recipient.rb +17 -0
  46. data/lib/trycourier/models/token.rb +15 -0
  47. data/lib/trycourier/models/user_profile.rb +274 -0
  48. data/lib/trycourier/models/user_profile_firebase_token.rb +19 -0
  49. data/lib/trycourier/models/webhook_auth_mode.rb +16 -0
  50. data/lib/trycourier/models/webhook_authentication.rb +40 -0
  51. data/lib/trycourier/models/webhook_method.rb +15 -0
  52. data/lib/trycourier/models/webhook_profile.rb +53 -0
  53. data/lib/trycourier/models/webhook_profile_type.rb +15 -0
  54. data/lib/trycourier/models/webhook_recipient.rb +17 -0
  55. data/lib/trycourier/models.rb +84 -2
  56. data/lib/trycourier/resources/audiences.rb +1 -1
  57. data/lib/trycourier/version.rb +1 -1
  58. data/lib/trycourier.rb +42 -1
  59. data/rbi/trycourier/models/airship_profile.rbi +41 -0
  60. data/rbi/trycourier/models/airship_profile_audience.rbi +26 -0
  61. data/rbi/trycourier/models/audience.rbi +8 -7
  62. data/rbi/trycourier/models/audience_filter.rbi +88 -0
  63. data/rbi/trycourier/models/audience_recipient.rbi +52 -0
  64. data/rbi/trycourier/models/audience_update_params.rbi +25 -7
  65. data/rbi/trycourier/models/device_type.rbi +7 -0
  66. data/rbi/trycourier/models/discord.rbi +18 -0
  67. data/rbi/trycourier/models/expo.rbi +16 -0
  68. data/rbi/trycourier/models/filter.rbi +8 -78
  69. data/rbi/trycourier/models/filter_config.rbi +8 -83
  70. data/rbi/trycourier/models/intercom.rbi +35 -0
  71. data/rbi/trycourier/models/intercom_recipient.rbi +23 -0
  72. data/rbi/trycourier/models/list_filter.rbi +86 -0
  73. data/rbi/trycourier/models/list_pattern_recipient.rbi +39 -0
  74. data/rbi/trycourier/models/list_recipient.rbi +44 -0
  75. data/rbi/trycourier/models/ms_teams.rbi +24 -0
  76. data/rbi/trycourier/models/ms_teams_base_properties.rbi +31 -0
  77. data/rbi/trycourier/models/ms_teams_recipient.rbi +58 -0
  78. data/rbi/trycourier/models/multiple_tokens.rbi +27 -0
  79. data/rbi/trycourier/models/nested_filter_config.rbi +104 -0
  80. data/rbi/trycourier/models/pagerduty.rbi +53 -0
  81. data/rbi/trycourier/models/pagerduty_recipient.rbi +31 -0
  82. data/rbi/trycourier/models/send_direct_message.rbi +23 -0
  83. data/rbi/trycourier/models/send_message_params.rbi +34 -10
  84. data/rbi/trycourier/models/send_to_channel.rbi +23 -0
  85. data/rbi/trycourier/models/send_to_ms_teams_channel_id.rbi +42 -0
  86. data/rbi/trycourier/models/send_to_ms_teams_channel_name.rbi +51 -0
  87. data/rbi/trycourier/models/send_to_ms_teams_conversation_id.rbi +42 -0
  88. data/rbi/trycourier/models/send_to_ms_teams_email.rbi +37 -0
  89. data/rbi/trycourier/models/send_to_ms_teams_user_id.rbi +37 -0
  90. data/rbi/trycourier/models/send_to_slack_channel.rbi +28 -0
  91. data/rbi/trycourier/models/send_to_slack_email.rbi +28 -0
  92. data/rbi/trycourier/models/send_to_slack_user_id.rbi +28 -0
  93. data/rbi/trycourier/models/single_filter_config.rbi +116 -0
  94. data/rbi/trycourier/models/slack.rbi +22 -0
  95. data/rbi/trycourier/models/slack_base_properties.rbi +23 -0
  96. data/rbi/trycourier/models/slack_recipient.rbi +52 -0
  97. data/rbi/trycourier/models/token.rbi +21 -0
  98. data/rbi/trycourier/models/user_profile.rbi +377 -0
  99. data/rbi/trycourier/models/user_profile_firebase_token.rbi +25 -0
  100. data/rbi/trycourier/models/webhook_auth_mode.rbi +22 -0
  101. data/rbi/trycourier/models/webhook_authentication.rbi +64 -0
  102. data/rbi/trycourier/models/webhook_method.rbi +21 -0
  103. data/rbi/trycourier/models/webhook_profile.rbi +80 -0
  104. data/rbi/trycourier/models/webhook_profile_type.rbi +22 -0
  105. data/rbi/trycourier/models/webhook_recipient.rbi +31 -0
  106. data/rbi/trycourier/models.rbi +84 -2
  107. data/rbi/trycourier/resources/audiences.rbi +7 -1
  108. data/sig/trycourier/models/airship_profile.rbs +25 -0
  109. data/sig/trycourier/models/airship_profile_audience.rbs +13 -0
  110. data/sig/trycourier/models/audience.rbs +4 -4
  111. data/sig/trycourier/models/audience_filter.rbs +50 -0
  112. data/sig/trycourier/models/audience_recipient.rbs +30 -0
  113. data/sig/trycourier/models/audience_update_params.rbs +8 -4
  114. data/sig/trycourier/models/device_type.rbs +5 -0
  115. data/sig/trycourier/models/discord.rbs +11 -0
  116. data/sig/trycourier/models/expo.rbs +11 -0
  117. data/sig/trycourier/models/filter.rbs +4 -61
  118. data/sig/trycourier/models/filter_config.rbs +4 -61
  119. data/sig/trycourier/models/intercom.rbs +15 -0
  120. data/sig/trycourier/models/intercom_recipient.rbs +13 -0
  121. data/sig/trycourier/models/list_filter.rbs +50 -0
  122. data/sig/trycourier/models/list_pattern_recipient.rbs +19 -0
  123. data/sig/trycourier/models/list_recipient.rbs +30 -0
  124. data/sig/trycourier/models/ms_teams.rbs +16 -0
  125. data/sig/trycourier/models/ms_teams_base_properties.rbs +15 -0
  126. data/sig/trycourier/models/ms_teams_recipient.rbs +13 -0
  127. data/sig/trycourier/models/multiple_tokens.rbs +13 -0
  128. data/sig/trycourier/models/nested_filter_config.rbs +64 -0
  129. data/sig/trycourier/models/pagerduty.rbs +35 -0
  130. data/sig/trycourier/models/pagerduty_recipient.rbs +13 -0
  131. data/sig/trycourier/models/send_direct_message.rbs +13 -0
  132. data/sig/trycourier/models/send_message_params.rbs +9 -3
  133. data/sig/trycourier/models/send_to_channel.rbs +13 -0
  134. data/sig/trycourier/models/send_to_ms_teams_channel_id.rbs +26 -0
  135. data/sig/trycourier/models/send_to_ms_teams_channel_name.rbs +35 -0
  136. data/sig/trycourier/models/send_to_ms_teams_conversation_id.rbs +26 -0
  137. data/sig/trycourier/models/send_to_ms_teams_email.rbs +22 -0
  138. data/sig/trycourier/models/send_to_ms_teams_user_id.rbs +26 -0
  139. data/sig/trycourier/models/send_to_slack_channel.rbs +15 -0
  140. data/sig/trycourier/models/send_to_slack_email.rbs +15 -0
  141. data/sig/trycourier/models/send_to_slack_user_id.rbs +15 -0
  142. data/sig/trycourier/models/single_filter_config.rbs +69 -0
  143. data/sig/trycourier/models/slack.rbs +14 -0
  144. data/sig/trycourier/models/slack_base_properties.rbs +13 -0
  145. data/sig/trycourier/models/slack_recipient.rbs +13 -0
  146. data/sig/trycourier/models/token.rbs +13 -0
  147. data/sig/trycourier/models/user_profile.rbs +212 -0
  148. data/sig/trycourier/models/user_profile_firebase_token.rbs +13 -0
  149. data/sig/trycourier/models/webhook_auth_mode.rbs +15 -0
  150. data/sig/trycourier/models/webhook_authentication.rbs +35 -0
  151. data/sig/trycourier/models/webhook_method.rbs +14 -0
  152. data/sig/trycourier/models/webhook_profile.rbs +40 -0
  153. data/sig/trycourier/models/webhook_profile_type.rbs +14 -0
  154. data/sig/trycourier/models/webhook_recipient.rbs +13 -0
  155. data/sig/trycourier/models.rbs +86 -4
  156. data/sig/trycourier/resources/audiences.rbs +1 -1
  157. metadata +128 -5
  158. data/lib/trycourier/models/recipient.rb +0 -113
  159. data/rbi/trycourier/models/recipient.rbi +0 -161
  160. data/sig/trycourier/models/recipient.rbs +0 -92
@@ -0,0 +1,16 @@
1
+ module Trycourier
2
+ module Models
3
+ type ms_teams =
4
+ Trycourier::SendToMsTeamsUserID
5
+ | Trycourier::SendToMsTeamsEmail
6
+ | Trycourier::SendToMsTeamsChannelID
7
+ | Trycourier::SendToMsTeamsConversationID
8
+ | Trycourier::SendToMsTeamsChannelName
9
+
10
+ module MsTeams
11
+ extend Trycourier::Internal::Type::Union
12
+
13
+ def self?.variants: -> ::Array[Trycourier::Models::ms_teams]
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,15 @@
1
+ module Trycourier
2
+ module Models
3
+ type ms_teams_base_properties = { service_url: String, tenant_id: String }
4
+
5
+ class MsTeamsBaseProperties < Trycourier::Internal::Type::BaseModel
6
+ attr_accessor service_url: String
7
+
8
+ attr_accessor tenant_id: String
9
+
10
+ def initialize: (service_url: String, tenant_id: String) -> void
11
+
12
+ def to_hash: -> { service_url: String, tenant_id: String }
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,13 @@
1
+ module Trycourier
2
+ module Models
3
+ type ms_teams_recipient = { ms_teams: Trycourier::Models::ms_teams }
4
+
5
+ class MsTeamsRecipient < Trycourier::Internal::Type::BaseModel
6
+ attr_accessor ms_teams: Trycourier::Models::ms_teams
7
+
8
+ def initialize: (ms_teams: Trycourier::Models::ms_teams) -> void
9
+
10
+ def to_hash: -> { ms_teams: Trycourier::Models::ms_teams }
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Trycourier
2
+ module Models
3
+ type multiple_tokens = { tokens: ::Array[Trycourier::Token] }
4
+
5
+ class MultipleTokens < Trycourier::Internal::Type::BaseModel
6
+ attr_accessor tokens: ::Array[Trycourier::Token]
7
+
8
+ def initialize: (tokens: ::Array[Trycourier::Token]) -> void
9
+
10
+ def to_hash: -> { tokens: ::Array[Trycourier::Token] }
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,64 @@
1
+ module Trycourier
2
+ module Models
3
+ type nested_filter_config =
4
+ {
5
+ operator: Trycourier::Models::NestedFilterConfig::operator,
6
+ rules: ::Array[Trycourier::Models::filter_config]
7
+ }
8
+
9
+ class NestedFilterConfig < Trycourier::Internal::Type::BaseModel
10
+ attr_accessor operator: Trycourier::Models::NestedFilterConfig::operator
11
+
12
+ attr_accessor rules: ::Array[Trycourier::Models::filter_config]
13
+
14
+ def initialize: (
15
+ operator: Trycourier::Models::NestedFilterConfig::operator,
16
+ rules: ::Array[Trycourier::Models::filter_config]
17
+ ) -> void
18
+
19
+ def to_hash: -> {
20
+ operator: Trycourier::Models::NestedFilterConfig::operator,
21
+ rules: ::Array[Trycourier::Models::filter_config]
22
+ }
23
+
24
+ type operator =
25
+ :ENDS_WITH
26
+ | :EQ
27
+ | :EXISTS
28
+ | :GT
29
+ | :GTE
30
+ | :INCLUDES
31
+ | :IS_AFTER
32
+ | :IS_BEFORE
33
+ | :LT
34
+ | :LTE
35
+ | :NEQ
36
+ | :OMIT
37
+ | :STARTS_WITH
38
+ | :AND
39
+ | :OR
40
+
41
+ module Operator
42
+ extend Trycourier::Internal::Type::Enum
43
+
44
+ ENDS_WITH: :ENDS_WITH
45
+ EQ: :EQ
46
+ EXISTS: :EXISTS
47
+ GT: :GT
48
+ GTE: :GTE
49
+ INCLUDES: :INCLUDES
50
+ IS_AFTER: :IS_AFTER
51
+ IS_BEFORE: :IS_BEFORE
52
+ LT: :LT
53
+ LTE: :LTE
54
+ NEQ: :NEQ
55
+ OMIT: :OMIT
56
+ STARTS_WITH: :STARTS_WITH
57
+ AND: :AND
58
+ OR: :OR
59
+
60
+ def self?.values: -> ::Array[Trycourier::Models::NestedFilterConfig::operator]
61
+ end
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,35 @@
1
+ module Trycourier
2
+ module Models
3
+ type pagerduty =
4
+ {
5
+ event_action: String?,
6
+ routing_key: String?,
7
+ severity: String?,
8
+ source: String?
9
+ }
10
+
11
+ class Pagerduty < Trycourier::Internal::Type::BaseModel
12
+ attr_accessor event_action: String?
13
+
14
+ attr_accessor routing_key: String?
15
+
16
+ attr_accessor severity: String?
17
+
18
+ attr_accessor source: String?
19
+
20
+ def initialize: (
21
+ ?event_action: String?,
22
+ ?routing_key: String?,
23
+ ?severity: String?,
24
+ ?source: String?
25
+ ) -> void
26
+
27
+ def to_hash: -> {
28
+ event_action: String?,
29
+ routing_key: String?,
30
+ severity: String?,
31
+ source: String?
32
+ }
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,13 @@
1
+ module Trycourier
2
+ module Models
3
+ type pagerduty_recipient = { pagerduty: Trycourier::Pagerduty }
4
+
5
+ class PagerdutyRecipient < Trycourier::Internal::Type::BaseModel
6
+ attr_accessor pagerduty: Trycourier::Pagerduty
7
+
8
+ def initialize: (pagerduty: Trycourier::Pagerduty) -> void
9
+
10
+ def to_hash: -> { pagerduty: Trycourier::Pagerduty }
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Trycourier
2
+ module Models
3
+ type send_direct_message = { user_id: String }
4
+
5
+ class SendDirectMessage < Trycourier::Internal::Type::BaseModel
6
+ attr_accessor user_id: String
7
+
8
+ def initialize: (user_id: String) -> void
9
+
10
+ def to_hash: -> { user_id: String }
11
+ end
12
+ end
13
+ end
@@ -413,14 +413,20 @@ module Trycourier
413
413
  end
414
414
  end
415
415
 
416
- type to = Trycourier::UserRecipient | ::Array[Trycourier::Recipient]
416
+ type to =
417
+ Trycourier::UserRecipient
418
+ | Trycourier::AudienceRecipient
419
+ | Trycourier::ListRecipient
420
+ | Trycourier::ListPatternRecipient
421
+ | Trycourier::SlackRecipient
422
+ | Trycourier::MsTeamsRecipient
423
+ | Trycourier::PagerdutyRecipient
424
+ | Trycourier::WebhookRecipient
417
425
 
418
426
  module To
419
427
  extend Trycourier::Internal::Type::Union
420
428
 
421
429
  def self?.variants: -> ::Array[Trycourier::Models::SendMessageParams::Message::to]
422
-
423
- RecipientArray: Trycourier::Internal::Type::Converter
424
430
  end
425
431
  end
426
432
  end
@@ -0,0 +1,13 @@
1
+ module Trycourier
2
+ module Models
3
+ type send_to_channel = { channel_id: String }
4
+
5
+ class SendToChannel < Trycourier::Internal::Type::BaseModel
6
+ attr_accessor channel_id: String
7
+
8
+ def initialize: (channel_id: String) -> void
9
+
10
+ def to_hash: -> { channel_id: String }
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,26 @@
1
+ module Trycourier
2
+ module Models
3
+ type send_to_ms_teams_channel_id =
4
+ { channel_id: String, service_url: String, tenant_id: String }
5
+
6
+ class SendToMsTeamsChannelID < Trycourier::Internal::Type::BaseModel
7
+ attr_accessor channel_id: String
8
+
9
+ attr_accessor service_url: String
10
+
11
+ attr_accessor tenant_id: String
12
+
13
+ def initialize: (
14
+ channel_id: String,
15
+ service_url: String,
16
+ tenant_id: String
17
+ ) -> void
18
+
19
+ def to_hash: -> {
20
+ channel_id: String,
21
+ service_url: String,
22
+ tenant_id: String
23
+ }
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,35 @@
1
+ module Trycourier
2
+ module Models
3
+ type send_to_ms_teams_channel_name =
4
+ {
5
+ channel_name: String,
6
+ service_url: String,
7
+ team_id: String,
8
+ tenant_id: String
9
+ }
10
+
11
+ class SendToMsTeamsChannelName < Trycourier::Internal::Type::BaseModel
12
+ attr_accessor channel_name: String
13
+
14
+ attr_accessor service_url: String
15
+
16
+ attr_accessor team_id: String
17
+
18
+ attr_accessor tenant_id: String
19
+
20
+ def initialize: (
21
+ channel_name: String,
22
+ service_url: String,
23
+ team_id: String,
24
+ tenant_id: String
25
+ ) -> void
26
+
27
+ def to_hash: -> {
28
+ channel_name: String,
29
+ service_url: String,
30
+ team_id: String,
31
+ tenant_id: String
32
+ }
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,26 @@
1
+ module Trycourier
2
+ module Models
3
+ type send_to_ms_teams_conversation_id =
4
+ { conversation_id: String, service_url: String, tenant_id: String }
5
+
6
+ class SendToMsTeamsConversationID < Trycourier::Internal::Type::BaseModel
7
+ attr_accessor conversation_id: String
8
+
9
+ attr_accessor service_url: String
10
+
11
+ attr_accessor tenant_id: String
12
+
13
+ def initialize: (
14
+ conversation_id: String,
15
+ service_url: String,
16
+ tenant_id: String
17
+ ) -> void
18
+
19
+ def to_hash: -> {
20
+ conversation_id: String,
21
+ service_url: String,
22
+ tenant_id: String
23
+ }
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,22 @@
1
+ module Trycourier
2
+ module Models
3
+ type send_to_ms_teams_email =
4
+ { email: String, service_url: String, tenant_id: String }
5
+
6
+ class SendToMsTeamsEmail < Trycourier::Internal::Type::BaseModel
7
+ attr_accessor email: String
8
+
9
+ attr_accessor service_url: String
10
+
11
+ attr_accessor tenant_id: String
12
+
13
+ def initialize: (
14
+ email: String,
15
+ service_url: String,
16
+ tenant_id: String
17
+ ) -> void
18
+
19
+ def to_hash: -> { email: String, service_url: String, tenant_id: String }
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,26 @@
1
+ module Trycourier
2
+ module Models
3
+ type send_to_ms_teams_user_id =
4
+ { service_url: String, tenant_id: String, user_id: String }
5
+
6
+ class SendToMsTeamsUserID < Trycourier::Internal::Type::BaseModel
7
+ attr_accessor service_url: String
8
+
9
+ attr_accessor tenant_id: String
10
+
11
+ attr_accessor user_id: String
12
+
13
+ def initialize: (
14
+ service_url: String,
15
+ tenant_id: String,
16
+ user_id: String
17
+ ) -> void
18
+
19
+ def to_hash: -> {
20
+ service_url: String,
21
+ tenant_id: String,
22
+ user_id: String
23
+ }
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,15 @@
1
+ module Trycourier
2
+ module Models
3
+ type send_to_slack_channel = { access_token: String, channel: String }
4
+
5
+ class SendToSlackChannel < Trycourier::Internal::Type::BaseModel
6
+ attr_accessor access_token: String
7
+
8
+ attr_accessor channel: String
9
+
10
+ def initialize: (access_token: String, channel: String) -> void
11
+
12
+ def to_hash: -> { access_token: String, channel: String }
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ module Trycourier
2
+ module Models
3
+ type send_to_slack_email = { access_token: String, email: String }
4
+
5
+ class SendToSlackEmail < Trycourier::Internal::Type::BaseModel
6
+ attr_accessor access_token: String
7
+
8
+ attr_accessor email: String
9
+
10
+ def initialize: (access_token: String, email: String) -> void
11
+
12
+ def to_hash: -> { access_token: String, email: String }
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ module Trycourier
2
+ module Models
3
+ type send_to_slack_user_id = { access_token: String, user_id: String }
4
+
5
+ class SendToSlackUserID < Trycourier::Internal::Type::BaseModel
6
+ attr_accessor access_token: String
7
+
8
+ attr_accessor user_id: String
9
+
10
+ def initialize: (access_token: String, user_id: String) -> void
11
+
12
+ def to_hash: -> { access_token: String, user_id: String }
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,69 @@
1
+ module Trycourier
2
+ module Models
3
+ type single_filter_config =
4
+ {
5
+ operator: Trycourier::Models::SingleFilterConfig::operator,
6
+ path: String,
7
+ value: String
8
+ }
9
+
10
+ class SingleFilterConfig < Trycourier::Internal::Type::BaseModel
11
+ attr_accessor operator: Trycourier::Models::SingleFilterConfig::operator
12
+
13
+ attr_accessor path: String
14
+
15
+ attr_accessor value: String
16
+
17
+ def initialize: (
18
+ operator: Trycourier::Models::SingleFilterConfig::operator,
19
+ path: String,
20
+ value: String
21
+ ) -> void
22
+
23
+ def to_hash: -> {
24
+ operator: Trycourier::Models::SingleFilterConfig::operator,
25
+ path: String,
26
+ value: String
27
+ }
28
+
29
+ type operator =
30
+ :ENDS_WITH
31
+ | :EQ
32
+ | :EXISTS
33
+ | :GT
34
+ | :GTE
35
+ | :INCLUDES
36
+ | :IS_AFTER
37
+ | :IS_BEFORE
38
+ | :LT
39
+ | :LTE
40
+ | :NEQ
41
+ | :OMIT
42
+ | :STARTS_WITH
43
+ | :AND
44
+ | :OR
45
+
46
+ module Operator
47
+ extend Trycourier::Internal::Type::Enum
48
+
49
+ ENDS_WITH: :ENDS_WITH
50
+ EQ: :EQ
51
+ EXISTS: :EXISTS
52
+ GT: :GT
53
+ GTE: :GTE
54
+ INCLUDES: :INCLUDES
55
+ IS_AFTER: :IS_AFTER
56
+ IS_BEFORE: :IS_BEFORE
57
+ LT: :LT
58
+ LTE: :LTE
59
+ NEQ: :NEQ
60
+ OMIT: :OMIT
61
+ STARTS_WITH: :STARTS_WITH
62
+ AND: :AND
63
+ OR: :OR
64
+
65
+ def self?.values: -> ::Array[Trycourier::Models::SingleFilterConfig::operator]
66
+ end
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,14 @@
1
+ module Trycourier
2
+ module Models
3
+ type slack =
4
+ Trycourier::SendToSlackChannel
5
+ | Trycourier::SendToSlackEmail
6
+ | Trycourier::SendToSlackUserID
7
+
8
+ module Slack
9
+ extend Trycourier::Internal::Type::Union
10
+
11
+ def self?.variants: -> ::Array[Trycourier::Models::slack]
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,13 @@
1
+ module Trycourier
2
+ module Models
3
+ type slack_base_properties = { access_token: String }
4
+
5
+ class SlackBaseProperties < Trycourier::Internal::Type::BaseModel
6
+ attr_accessor access_token: String
7
+
8
+ def initialize: (access_token: String) -> void
9
+
10
+ def to_hash: -> { access_token: String }
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Trycourier
2
+ module Models
3
+ type slack_recipient = { slack: Trycourier::Models::slack }
4
+
5
+ class SlackRecipient < Trycourier::Internal::Type::BaseModel
6
+ attr_accessor slack: Trycourier::Models::slack
7
+
8
+ def initialize: (slack: Trycourier::Models::slack) -> void
9
+
10
+ def to_hash: -> { slack: Trycourier::Models::slack }
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Trycourier
2
+ module Models
3
+ type token = { token: String }
4
+
5
+ class Token < Trycourier::Internal::Type::BaseModel
6
+ attr_accessor token: String
7
+
8
+ def initialize: (token: String) -> void
9
+
10
+ def to_hash: -> { token: String }
11
+ end
12
+ end
13
+ end