trycourier 4.3.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 (175) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +23 -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/bulk_create_job_params.rb +12 -3
  15. data/lib/trycourier/models/bulk_retrieve_job_response.rb +15 -3
  16. data/lib/trycourier/models/device_type.rb +7 -0
  17. data/lib/trycourier/models/discord.rb +16 -0
  18. data/lib/trycourier/models/expo.rb +16 -0
  19. data/lib/trycourier/models/filter.rb +8 -51
  20. data/lib/trycourier/models/filter_config.rb +8 -51
  21. data/lib/trycourier/models/inbound_bulk_message.rb +79 -113
  22. data/lib/trycourier/models/inbound_bulk_message_user.rb +21 -6
  23. data/lib/trycourier/models/intercom.rb +21 -0
  24. data/lib/trycourier/models/intercom_recipient.rb +15 -0
  25. data/lib/trycourier/models/list_filter.rb +52 -0
  26. data/lib/trycourier/models/list_pattern_recipient.rb +23 -0
  27. data/lib/trycourier/models/list_recipient.rb +29 -0
  28. data/lib/trycourier/models/ms_teams.rb +22 -0
  29. data/lib/trycourier/models/ms_teams_base_properties.rb +21 -0
  30. data/lib/trycourier/models/ms_teams_recipient.rb +17 -0
  31. data/lib/trycourier/models/multiple_tokens.rb +15 -0
  32. data/lib/trycourier/models/nested_filter_config.rb +49 -0
  33. data/lib/trycourier/models/pagerduty.rb +33 -0
  34. data/lib/trycourier/models/pagerduty_recipient.rb +17 -0
  35. data/lib/trycourier/models/send_direct_message.rb +15 -0
  36. data/lib/trycourier/models/send_message_params.rb +38 -8
  37. data/lib/trycourier/models/send_to_channel.rb +15 -0
  38. data/lib/trycourier/models/send_to_ms_teams_channel_id.rb +27 -0
  39. data/lib/trycourier/models/send_to_ms_teams_channel_name.rb +33 -0
  40. data/lib/trycourier/models/send_to_ms_teams_conversation_id.rb +27 -0
  41. data/lib/trycourier/models/send_to_ms_teams_email.rb +27 -0
  42. data/lib/trycourier/models/send_to_ms_teams_user_id.rb +27 -0
  43. data/lib/trycourier/models/send_to_slack_channel.rb +21 -0
  44. data/lib/trycourier/models/send_to_slack_email.rb +21 -0
  45. data/lib/trycourier/models/send_to_slack_user_id.rb +21 -0
  46. data/lib/trycourier/models/single_filter_config.rb +62 -0
  47. data/lib/trycourier/models/slack.rb +18 -0
  48. data/lib/trycourier/models/slack_base_properties.rb +15 -0
  49. data/lib/trycourier/models/slack_recipient.rb +17 -0
  50. data/lib/trycourier/models/token.rb +15 -0
  51. data/lib/trycourier/models/user_profile.rb +274 -0
  52. data/lib/trycourier/models/user_profile_firebase_token.rb +19 -0
  53. data/lib/trycourier/models/webhook_auth_mode.rb +16 -0
  54. data/lib/trycourier/models/webhook_authentication.rb +40 -0
  55. data/lib/trycourier/models/webhook_method.rb +15 -0
  56. data/lib/trycourier/models/webhook_profile.rb +53 -0
  57. data/lib/trycourier/models/webhook_profile_type.rb +15 -0
  58. data/lib/trycourier/models/webhook_recipient.rb +17 -0
  59. data/lib/trycourier/models.rb +84 -2
  60. data/lib/trycourier/resources/audiences.rb +1 -1
  61. data/lib/trycourier/resources/bulk.rb +17 -3
  62. data/lib/trycourier/version.rb +1 -1
  63. data/lib/trycourier.rb +42 -1
  64. data/rbi/trycourier/models/airship_profile.rbi +41 -0
  65. data/rbi/trycourier/models/airship_profile_audience.rbi +26 -0
  66. data/rbi/trycourier/models/audience.rbi +8 -7
  67. data/rbi/trycourier/models/audience_filter.rbi +88 -0
  68. data/rbi/trycourier/models/audience_recipient.rbi +52 -0
  69. data/rbi/trycourier/models/audience_update_params.rbi +25 -7
  70. data/rbi/trycourier/models/bulk_create_job_params.rbi +21 -20
  71. data/rbi/trycourier/models/bulk_retrieve_job_response.rbi +24 -9
  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/inbound_bulk_message.rbi +97 -153
  78. data/rbi/trycourier/models/inbound_bulk_message_user.rbi +20 -7
  79. data/rbi/trycourier/models/intercom.rbi +35 -0
  80. data/rbi/trycourier/models/intercom_recipient.rbi +23 -0
  81. data/rbi/trycourier/models/list_filter.rbi +86 -0
  82. data/rbi/trycourier/models/list_pattern_recipient.rbi +39 -0
  83. data/rbi/trycourier/models/list_recipient.rbi +44 -0
  84. data/rbi/trycourier/models/ms_teams.rbi +24 -0
  85. data/rbi/trycourier/models/ms_teams_base_properties.rbi +31 -0
  86. data/rbi/trycourier/models/ms_teams_recipient.rbi +58 -0
  87. data/rbi/trycourier/models/multiple_tokens.rbi +27 -0
  88. data/rbi/trycourier/models/nested_filter_config.rbi +104 -0
  89. data/rbi/trycourier/models/pagerduty.rbi +53 -0
  90. data/rbi/trycourier/models/pagerduty_recipient.rbi +31 -0
  91. data/rbi/trycourier/models/send_direct_message.rbi +23 -0
  92. data/rbi/trycourier/models/send_message_params.rbi +50 -11
  93. data/rbi/trycourier/models/send_to_channel.rbi +23 -0
  94. data/rbi/trycourier/models/send_to_ms_teams_channel_id.rbi +42 -0
  95. data/rbi/trycourier/models/send_to_ms_teams_channel_name.rbi +51 -0
  96. data/rbi/trycourier/models/send_to_ms_teams_conversation_id.rbi +42 -0
  97. data/rbi/trycourier/models/send_to_ms_teams_email.rbi +37 -0
  98. data/rbi/trycourier/models/send_to_ms_teams_user_id.rbi +37 -0
  99. data/rbi/trycourier/models/send_to_slack_channel.rbi +28 -0
  100. data/rbi/trycourier/models/send_to_slack_email.rbi +28 -0
  101. data/rbi/trycourier/models/send_to_slack_user_id.rbi +28 -0
  102. data/rbi/trycourier/models/single_filter_config.rbi +116 -0
  103. data/rbi/trycourier/models/slack.rbi +22 -0
  104. data/rbi/trycourier/models/slack_base_properties.rbi +23 -0
  105. data/rbi/trycourier/models/slack_recipient.rbi +52 -0
  106. data/rbi/trycourier/models/token.rbi +21 -0
  107. data/rbi/trycourier/models/user_profile.rbi +377 -0
  108. data/rbi/trycourier/models/user_profile_firebase_token.rbi +25 -0
  109. data/rbi/trycourier/models/webhook_auth_mode.rbi +22 -0
  110. data/rbi/trycourier/models/webhook_authentication.rbi +64 -0
  111. data/rbi/trycourier/models/webhook_method.rbi +21 -0
  112. data/rbi/trycourier/models/webhook_profile.rbi +80 -0
  113. data/rbi/trycourier/models/webhook_profile_type.rbi +22 -0
  114. data/rbi/trycourier/models/webhook_recipient.rbi +31 -0
  115. data/rbi/trycourier/models.rbi +84 -2
  116. data/rbi/trycourier/resources/audiences.rbi +7 -1
  117. data/rbi/trycourier/resources/bulk.rbi +22 -8
  118. data/sig/trycourier/models/airship_profile.rbs +25 -0
  119. data/sig/trycourier/models/airship_profile_audience.rbs +13 -0
  120. data/sig/trycourier/models/audience.rbs +4 -4
  121. data/sig/trycourier/models/audience_filter.rbs +50 -0
  122. data/sig/trycourier/models/audience_recipient.rbs +30 -0
  123. data/sig/trycourier/models/audience_update_params.rbs +8 -4
  124. data/sig/trycourier/models/bulk_create_job_params.rbs +4 -4
  125. data/sig/trycourier/models/bulk_retrieve_job_response.rbs +4 -4
  126. data/sig/trycourier/models/device_type.rbs +5 -0
  127. data/sig/trycourier/models/discord.rbs +11 -0
  128. data/sig/trycourier/models/expo.rbs +11 -0
  129. data/sig/trycourier/models/filter.rbs +4 -61
  130. data/sig/trycourier/models/filter_config.rbs +4 -61
  131. data/sig/trycourier/models/inbound_bulk_message.rbs +52 -99
  132. data/sig/trycourier/models/inbound_bulk_message_user.rbs +4 -6
  133. data/sig/trycourier/models/intercom.rbs +15 -0
  134. data/sig/trycourier/models/intercom_recipient.rbs +13 -0
  135. data/sig/trycourier/models/list_filter.rbs +50 -0
  136. data/sig/trycourier/models/list_pattern_recipient.rbs +19 -0
  137. data/sig/trycourier/models/list_recipient.rbs +30 -0
  138. data/sig/trycourier/models/ms_teams.rbs +16 -0
  139. data/sig/trycourier/models/ms_teams_base_properties.rbs +15 -0
  140. data/sig/trycourier/models/ms_teams_recipient.rbs +13 -0
  141. data/sig/trycourier/models/multiple_tokens.rbs +13 -0
  142. data/sig/trycourier/models/nested_filter_config.rbs +64 -0
  143. data/sig/trycourier/models/pagerduty.rbs +35 -0
  144. data/sig/trycourier/models/pagerduty_recipient.rbs +13 -0
  145. data/sig/trycourier/models/send_direct_message.rbs +13 -0
  146. data/sig/trycourier/models/send_message_params.rbs +22 -6
  147. data/sig/trycourier/models/send_to_channel.rbs +13 -0
  148. data/sig/trycourier/models/send_to_ms_teams_channel_id.rbs +26 -0
  149. data/sig/trycourier/models/send_to_ms_teams_channel_name.rbs +35 -0
  150. data/sig/trycourier/models/send_to_ms_teams_conversation_id.rbs +26 -0
  151. data/sig/trycourier/models/send_to_ms_teams_email.rbs +22 -0
  152. data/sig/trycourier/models/send_to_ms_teams_user_id.rbs +26 -0
  153. data/sig/trycourier/models/send_to_slack_channel.rbs +15 -0
  154. data/sig/trycourier/models/send_to_slack_email.rbs +15 -0
  155. data/sig/trycourier/models/send_to_slack_user_id.rbs +15 -0
  156. data/sig/trycourier/models/single_filter_config.rbs +69 -0
  157. data/sig/trycourier/models/slack.rbs +14 -0
  158. data/sig/trycourier/models/slack_base_properties.rbs +13 -0
  159. data/sig/trycourier/models/slack_recipient.rbs +13 -0
  160. data/sig/trycourier/models/token.rbs +13 -0
  161. data/sig/trycourier/models/user_profile.rbs +212 -0
  162. data/sig/trycourier/models/user_profile_firebase_token.rbs +13 -0
  163. data/sig/trycourier/models/webhook_auth_mode.rbs +15 -0
  164. data/sig/trycourier/models/webhook_authentication.rbs +35 -0
  165. data/sig/trycourier/models/webhook_method.rbs +14 -0
  166. data/sig/trycourier/models/webhook_profile.rbs +40 -0
  167. data/sig/trycourier/models/webhook_profile_type.rbs +14 -0
  168. data/sig/trycourier/models/webhook_recipient.rbs +13 -0
  169. data/sig/trycourier/models.rbs +87 -5
  170. data/sig/trycourier/resources/audiences.rbs +1 -1
  171. data/sig/trycourier/resources/bulk.rbs +1 -1
  172. metadata +128 -5
  173. data/lib/trycourier/models/recipient.rb +0 -113
  174. data/rbi/trycourier/models/recipient.rbi +0 -161
  175. data/sig/trycourier/models/recipient.rbs +0 -92
@@ -100,7 +100,7 @@ module Trycourier
100
100
  # @!attribute to
101
101
  # The recipient or a list of recipients of the message
102
102
  #
103
- # @return [Trycourier::Models::UserRecipient, Array<Trycourier::Models::Recipient>, nil]
103
+ # @return [Trycourier::Models::UserRecipient, Trycourier::Models::AudienceRecipient, Trycourier::Models::ListRecipient, Trycourier::Models::ListPatternRecipient, Trycourier::Models::SlackRecipient, Trycourier::Models::MsTeamsRecipient, Trycourier::Models::PagerdutyRecipient, Trycourier::Models::WebhookRecipient, nil]
104
104
  optional :to, union: -> { Trycourier::SendMessageParams::Message::To }, nil?: true
105
105
 
106
106
  # @!method initialize(brand_id: nil, channels: nil, content: nil, context: nil, data: nil, delay: nil, expiry: nil, metadata: nil, preferences: nil, providers: nil, routing: nil, template: nil, timeout: nil, to: nil)
@@ -136,7 +136,7 @@ module Trycourier
136
136
  #
137
137
  # @param timeout [Trycourier::Models::SendMessageParams::Message::Timeout, nil]
138
138
  #
139
- # @param to [Trycourier::Models::UserRecipient, Array<Trycourier::Models::Recipient>, nil] The recipient or a list of recipients of the message
139
+ # @param to [Trycourier::Models::UserRecipient, Trycourier::Models::AudienceRecipient, Trycourier::Models::ListRecipient, Trycourier::Models::ListPatternRecipient, Trycourier::Models::SlackRecipient, Trycourier::Models::MsTeamsRecipient, Trycourier::Models::PagerdutyRecipient, Trycourier::Models::WebhookRecipient, nil] The recipient or a list of recipients of the message
140
140
 
141
141
  class Channel < Trycourier::Internal::Type::BaseModel
142
142
  # @!attribute brand_id
@@ -264,15 +264,28 @@ module Trycourier
264
264
  # @return [Integer, nil]
265
265
  optional :duration, Integer, nil?: true
266
266
 
267
+ # @!attribute timezone
268
+ # IANA timezone identifier (e.g., "America/Los_Angeles", "UTC"). Used when
269
+ # resolving opening hours expressions. Takes precedence over user profile timezone
270
+ # settings.
271
+ #
272
+ # @return [String, nil]
273
+ optional :timezone, String, nil?: true
274
+
267
275
  # @!attribute until_
268
276
  # ISO 8601 timestamp or opening_hours-like format.
269
277
  #
270
278
  # @return [String, nil]
271
279
  optional :until_, String, api_name: :until, nil?: true
272
280
 
273
- # @!method initialize(duration: nil, until_: nil)
281
+ # @!method initialize(duration: nil, timezone: nil, until_: nil)
282
+ # Some parameter documentations has been truncated, see
283
+ # {Trycourier::Models::SendMessageParams::Message::Delay} for more details.
284
+ #
274
285
  # @param duration [Integer, nil] The duration of the delay in milliseconds.
275
286
  #
287
+ # @param timezone [String, nil] IANA timezone identifier (e.g., "America/Los_Angeles", "UTC"). Used when resolvi
288
+ #
276
289
  # @param until_ [String, nil] ISO 8601 timestamp or opening_hours-like format.
277
290
  end
278
291
 
@@ -491,15 +504,32 @@ module Trycourier
491
504
  module To
492
505
  extend Trycourier::Internal::Type::Union
493
506
 
507
+ # Send to a specific user by user_id, email, phone_number, or list_id
494
508
  variant -> { Trycourier::UserRecipient }
495
509
 
496
- variant -> { Trycourier::Models::SendMessageParams::Message::To::RecipientArray }
510
+ # Send to all users in an audience
511
+ variant -> { Trycourier::AudienceRecipient }
497
512
 
498
- # @!method self.variants
499
- # @return [Array(Trycourier::Models::UserRecipient, Array<Trycourier::Models::Recipient>)]
513
+ # Send to all users in a specific list
514
+ variant -> { Trycourier::ListRecipient }
500
515
 
501
- # @type [Trycourier::Internal::Type::Converter]
502
- RecipientArray = Trycourier::Internal::Type::ArrayOf[-> { Trycourier::Recipient }]
516
+ # Send to users in lists matching a pattern
517
+ variant -> { Trycourier::ListPatternRecipient }
518
+
519
+ # Send via Slack (channel, email, or user_id)
520
+ variant -> { Trycourier::SlackRecipient }
521
+
522
+ # Send via Microsoft Teams
523
+ variant -> { Trycourier::MsTeamsRecipient }
524
+
525
+ # Send via PagerDuty
526
+ variant -> { Trycourier::PagerdutyRecipient }
527
+
528
+ # Send via webhook
529
+ variant -> { Trycourier::WebhookRecipient }
530
+
531
+ # @!method self.variants
532
+ # @return [Array(Trycourier::Models::UserRecipient, Trycourier::Models::AudienceRecipient, Trycourier::Models::ListRecipient, Trycourier::Models::ListPatternRecipient, Trycourier::Models::SlackRecipient, Trycourier::Models::MsTeamsRecipient, Trycourier::Models::PagerdutyRecipient, Trycourier::Models::WebhookRecipient)]
503
533
  end
504
534
  end
505
535
  end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ class SendToChannel < Trycourier::Internal::Type::BaseModel
6
+ # @!attribute channel_id
7
+ #
8
+ # @return [String]
9
+ required :channel_id, String
10
+
11
+ # @!method initialize(channel_id:)
12
+ # @param channel_id [String]
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ class SendToMsTeamsChannelID < Trycourier::Internal::Type::BaseModel
6
+ # @!attribute channel_id
7
+ #
8
+ # @return [String]
9
+ required :channel_id, String
10
+
11
+ # @!attribute service_url
12
+ #
13
+ # @return [String]
14
+ required :service_url, String
15
+
16
+ # @!attribute tenant_id
17
+ #
18
+ # @return [String]
19
+ required :tenant_id, String
20
+
21
+ # @!method initialize(channel_id:, service_url:, tenant_id:)
22
+ # @param channel_id [String]
23
+ # @param service_url [String]
24
+ # @param tenant_id [String]
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ class SendToMsTeamsChannelName < Trycourier::Internal::Type::BaseModel
6
+ # @!attribute channel_name
7
+ #
8
+ # @return [String]
9
+ required :channel_name, String
10
+
11
+ # @!attribute service_url
12
+ #
13
+ # @return [String]
14
+ required :service_url, String
15
+
16
+ # @!attribute team_id
17
+ #
18
+ # @return [String]
19
+ required :team_id, String
20
+
21
+ # @!attribute tenant_id
22
+ #
23
+ # @return [String]
24
+ required :tenant_id, String
25
+
26
+ # @!method initialize(channel_name:, service_url:, team_id:, tenant_id:)
27
+ # @param channel_name [String]
28
+ # @param service_url [String]
29
+ # @param team_id [String]
30
+ # @param tenant_id [String]
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ class SendToMsTeamsConversationID < Trycourier::Internal::Type::BaseModel
6
+ # @!attribute conversation_id
7
+ #
8
+ # @return [String]
9
+ required :conversation_id, String
10
+
11
+ # @!attribute service_url
12
+ #
13
+ # @return [String]
14
+ required :service_url, String
15
+
16
+ # @!attribute tenant_id
17
+ #
18
+ # @return [String]
19
+ required :tenant_id, String
20
+
21
+ # @!method initialize(conversation_id:, service_url:, tenant_id:)
22
+ # @param conversation_id [String]
23
+ # @param service_url [String]
24
+ # @param tenant_id [String]
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ class SendToMsTeamsEmail < Trycourier::Internal::Type::BaseModel
6
+ # @!attribute email
7
+ #
8
+ # @return [String]
9
+ required :email, String
10
+
11
+ # @!attribute service_url
12
+ #
13
+ # @return [String]
14
+ required :service_url, String
15
+
16
+ # @!attribute tenant_id
17
+ #
18
+ # @return [String]
19
+ required :tenant_id, String
20
+
21
+ # @!method initialize(email:, service_url:, tenant_id:)
22
+ # @param email [String]
23
+ # @param service_url [String]
24
+ # @param tenant_id [String]
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ class SendToMsTeamsUserID < Trycourier::Internal::Type::BaseModel
6
+ # @!attribute service_url
7
+ #
8
+ # @return [String]
9
+ required :service_url, String
10
+
11
+ # @!attribute tenant_id
12
+ #
13
+ # @return [String]
14
+ required :tenant_id, String
15
+
16
+ # @!attribute user_id
17
+ #
18
+ # @return [String]
19
+ required :user_id, String
20
+
21
+ # @!method initialize(service_url:, tenant_id:, user_id:)
22
+ # @param service_url [String]
23
+ # @param tenant_id [String]
24
+ # @param user_id [String]
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ class SendToSlackChannel < Trycourier::Internal::Type::BaseModel
6
+ # @!attribute access_token
7
+ #
8
+ # @return [String]
9
+ required :access_token, String
10
+
11
+ # @!attribute channel
12
+ #
13
+ # @return [String]
14
+ required :channel, String
15
+
16
+ # @!method initialize(access_token:, channel:)
17
+ # @param access_token [String]
18
+ # @param channel [String]
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ class SendToSlackEmail < Trycourier::Internal::Type::BaseModel
6
+ # @!attribute access_token
7
+ #
8
+ # @return [String]
9
+ required :access_token, String
10
+
11
+ # @!attribute email
12
+ #
13
+ # @return [String]
14
+ required :email, String
15
+
16
+ # @!method initialize(access_token:, email:)
17
+ # @param access_token [String]
18
+ # @param email [String]
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ class SendToSlackUserID < Trycourier::Internal::Type::BaseModel
6
+ # @!attribute access_token
7
+ #
8
+ # @return [String]
9
+ required :access_token, String
10
+
11
+ # @!attribute user_id
12
+ #
13
+ # @return [String]
14
+ required :user_id, String
15
+
16
+ # @!method initialize(access_token:, user_id:)
17
+ # @param access_token [String]
18
+ # @param user_id [String]
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ class SingleFilterConfig < Trycourier::Internal::Type::BaseModel
6
+ # @!attribute operator
7
+ # The operator to use for filtering
8
+ #
9
+ # @return [Symbol, Trycourier::Models::SingleFilterConfig::Operator]
10
+ required :operator, enum: -> { Trycourier::SingleFilterConfig::Operator }
11
+
12
+ # @!attribute path
13
+ # The attribe name from profile whose value will be operated against the filter
14
+ # value
15
+ #
16
+ # @return [String]
17
+ required :path, String
18
+
19
+ # @!attribute value
20
+ # The value to use for filtering
21
+ #
22
+ # @return [String]
23
+ required :value, String
24
+
25
+ # @!method initialize(operator:, path:, value:)
26
+ # Some parameter documentations has been truncated, see
27
+ # {Trycourier::Models::SingleFilterConfig} for more details.
28
+ #
29
+ # @param operator [Symbol, Trycourier::Models::SingleFilterConfig::Operator] The operator to use for filtering
30
+ #
31
+ # @param path [String] The attribe name from profile whose value will be operated against the filter va
32
+ #
33
+ # @param value [String] The value to use for filtering
34
+
35
+ # The operator to use for filtering
36
+ #
37
+ # @see Trycourier::Models::SingleFilterConfig#operator
38
+ module Operator
39
+ extend Trycourier::Internal::Type::Enum
40
+
41
+ ENDS_WITH = :ENDS_WITH
42
+ EQ = :EQ
43
+ EXISTS = :EXISTS
44
+ GT = :GT
45
+ GTE = :GTE
46
+ INCLUDES = :INCLUDES
47
+ IS_AFTER = :IS_AFTER
48
+ IS_BEFORE = :IS_BEFORE
49
+ LT = :LT
50
+ LTE = :LTE
51
+ NEQ = :NEQ
52
+ OMIT = :OMIT
53
+ STARTS_WITH = :STARTS_WITH
54
+ AND = :AND
55
+ OR = :OR
56
+
57
+ # @!method self.values
58
+ # @return [Array<Symbol>]
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ module Slack
6
+ extend Trycourier::Internal::Type::Union
7
+
8
+ variant -> { Trycourier::SendToSlackChannel }
9
+
10
+ variant -> { Trycourier::SendToSlackEmail }
11
+
12
+ variant -> { Trycourier::SendToSlackUserID }
13
+
14
+ # @!method self.variants
15
+ # @return [Array(Trycourier::Models::SendToSlackChannel, Trycourier::Models::SendToSlackEmail, Trycourier::Models::SendToSlackUserID)]
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ class SlackBaseProperties < Trycourier::Internal::Type::BaseModel
6
+ # @!attribute access_token
7
+ #
8
+ # @return [String]
9
+ required :access_token, String
10
+
11
+ # @!method initialize(access_token:)
12
+ # @param access_token [String]
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ class SlackRecipient < Trycourier::Internal::Type::BaseModel
6
+ # @!attribute slack
7
+ #
8
+ # @return [Trycourier::Models::SendToSlackChannel, Trycourier::Models::SendToSlackEmail, Trycourier::Models::SendToSlackUserID]
9
+ required :slack, union: -> { Trycourier::Slack }
10
+
11
+ # @!method initialize(slack:)
12
+ # Send via Slack (channel, email, or user_id)
13
+ #
14
+ # @param slack [Trycourier::Models::SendToSlackChannel, Trycourier::Models::SendToSlackEmail, Trycourier::Models::SendToSlackUserID]
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ class Token < Trycourier::Internal::Type::BaseModel
6
+ # @!attribute token
7
+ #
8
+ # @return [String]
9
+ required :token, String
10
+
11
+ # @!method initialize(token:)
12
+ # @param token [String]
13
+ end
14
+ end
15
+ end