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
@@ -1,16 +1,24 @@
1
1
  # typed: strong
2
2
 
3
3
  module Trycourier
4
+ AirshipProfile = Trycourier::Models::AirshipProfile
5
+
6
+ AirshipProfileAudience = Trycourier::Models::AirshipProfileAudience
7
+
4
8
  Alignment = Trycourier::Models::Alignment
5
9
 
6
10
  Audience = Trycourier::Models::Audience
7
11
 
8
12
  AudienceDeleteParams = Trycourier::Models::AudienceDeleteParams
9
13
 
14
+ AudienceFilter = Trycourier::Models::AudienceFilter
15
+
10
16
  AudienceListMembersParams = Trycourier::Models::AudienceListMembersParams
11
17
 
12
18
  AudienceListParams = Trycourier::Models::AudienceListParams
13
19
 
20
+ AudienceRecipient = Trycourier::Models::AudienceRecipient
21
+
14
22
  AudienceRetrieveParams = Trycourier::Models::AudienceRetrieveParams
15
23
 
16
24
  AudienceUpdateParams = Trycourier::Models::AudienceUpdateParams
@@ -76,6 +84,10 @@ module Trycourier
76
84
 
77
85
  DefaultPreferences = Trycourier::Models::DefaultPreferences
78
86
 
87
+ DeviceType = Trycourier::Models::DeviceType
88
+
89
+ Discord = Trycourier::Models::Discord
90
+
79
91
  ElementalActionNodeWithType = Trycourier::Models::ElementalActionNodeWithType
80
92
 
81
93
  ElementalBaseNode = Trycourier::Models::ElementalBaseNode
@@ -108,6 +120,8 @@ module Trycourier
108
120
 
109
121
  EmailHeader = Trycourier::Models::EmailHeader
110
122
 
123
+ Expo = Trycourier::Models::Expo
124
+
111
125
  Filter = Trycourier::Models::Filter
112
126
 
113
127
  FilterConfig = Trycourier::Models::FilterConfig
@@ -120,10 +134,20 @@ module Trycourier
120
134
 
121
135
  InboundTrackEventParams = Trycourier::Models::InboundTrackEventParams
122
136
 
137
+ Intercom = Trycourier::Models::Intercom
138
+
139
+ IntercomRecipient = Trycourier::Models::IntercomRecipient
140
+
123
141
  ListDeleteParams = Trycourier::Models::ListDeleteParams
124
142
 
143
+ ListFilter = Trycourier::Models::ListFilter
144
+
125
145
  ListListParams = Trycourier::Models::ListListParams
126
146
 
147
+ ListPatternRecipient = Trycourier::Models::ListPatternRecipient
148
+
149
+ ListRecipient = Trycourier::Models::ListRecipient
150
+
127
151
  ListRestoreParams = Trycourier::Models::ListRestoreParams
128
152
 
129
153
  ListRetrieveParams = Trycourier::Models::ListRetrieveParams
@@ -152,6 +176,16 @@ module Trycourier
152
176
 
153
177
  MessageRoutingChannel = Trycourier::Models::MessageRoutingChannel
154
178
 
179
+ MsTeams = Trycourier::Models::MsTeams
180
+
181
+ MsTeamsBaseProperties = Trycourier::Models::MsTeamsBaseProperties
182
+
183
+ MsTeamsRecipient = Trycourier::Models::MsTeamsRecipient
184
+
185
+ MultipleTokens = Trycourier::Models::MultipleTokens
186
+
187
+ NestedFilterConfig = Trycourier::Models::NestedFilterConfig
188
+
155
189
  NotificationGetContent = Trycourier::Models::NotificationGetContent
156
190
 
157
191
  NotificationListParams = Trycourier::Models::NotificationListParams
@@ -164,6 +198,10 @@ module Trycourier
164
198
 
165
199
  Notifications = Trycourier::Models::Notifications
166
200
 
201
+ Pagerduty = Trycourier::Models::Pagerduty
202
+
203
+ PagerdutyRecipient = Trycourier::Models::PagerdutyRecipient
204
+
167
205
  Paging = Trycourier::Models::Paging
168
206
 
169
207
  Preference = Trycourier::Models::Preference
@@ -184,16 +222,42 @@ module Trycourier
184
222
 
185
223
  PutSubscriptionsRecipient = Trycourier::Models::PutSubscriptionsRecipient
186
224
 
187
- Recipient = Trycourier::Models::Recipient
188
-
189
225
  RecipientPreferences = Trycourier::Models::RecipientPreferences
190
226
 
191
227
  RequestArchiveParams = Trycourier::Models::RequestArchiveParams
192
228
 
193
229
  Rule = Trycourier::Models::Rule
194
230
 
231
+ SendDirectMessage = Trycourier::Models::SendDirectMessage
232
+
195
233
  SendMessageParams = Trycourier::Models::SendMessageParams
196
234
 
235
+ SendToChannel = Trycourier::Models::SendToChannel
236
+
237
+ SendToMsTeamsChannelID = Trycourier::Models::SendToMsTeamsChannelID
238
+
239
+ SendToMsTeamsChannelName = Trycourier::Models::SendToMsTeamsChannelName
240
+
241
+ SendToMsTeamsConversationID = Trycourier::Models::SendToMsTeamsConversationID
242
+
243
+ SendToMsTeamsEmail = Trycourier::Models::SendToMsTeamsEmail
244
+
245
+ SendToMsTeamsUserID = Trycourier::Models::SendToMsTeamsUserID
246
+
247
+ SendToSlackChannel = Trycourier::Models::SendToSlackChannel
248
+
249
+ SendToSlackEmail = Trycourier::Models::SendToSlackEmail
250
+
251
+ SendToSlackUserID = Trycourier::Models::SendToSlackUserID
252
+
253
+ SingleFilterConfig = Trycourier::Models::SingleFilterConfig
254
+
255
+ Slack = Trycourier::Models::Slack
256
+
257
+ SlackBaseProperties = Trycourier::Models::SlackBaseProperties
258
+
259
+ SlackRecipient = Trycourier::Models::SlackRecipient
260
+
197
261
  SubscribeToListsRequestItem = Trycourier::Models::SubscribeToListsRequestItem
198
262
 
199
263
  SubscriptionList = Trycourier::Models::SubscriptionList
@@ -218,15 +282,33 @@ module Trycourier
218
282
 
219
283
  TextStyle = Trycourier::Models::TextStyle
220
284
 
285
+ Token = Trycourier::Models::Token
286
+
221
287
  TranslationRetrieveParams = Trycourier::Models::TranslationRetrieveParams
222
288
 
223
289
  TranslationUpdateParams = Trycourier::Models::TranslationUpdateParams
224
290
 
291
+ UserProfile = Trycourier::Models::UserProfile
292
+
293
+ UserProfileFirebaseToken = Trycourier::Models::UserProfileFirebaseToken
294
+
225
295
  UserRecipient = Trycourier::Models::UserRecipient
226
296
 
227
297
  Users = Trycourier::Models::Users
228
298
 
229
299
  Utm = Trycourier::Models::Utm
230
300
 
301
+ WebhookAuthentication = Trycourier::Models::WebhookAuthentication
302
+
303
+ WebhookAuthMode = Trycourier::Models::WebhookAuthMode
304
+
305
+ WebhookMethod = Trycourier::Models::WebhookMethod
306
+
307
+ WebhookProfile = Trycourier::Models::WebhookProfile
308
+
309
+ WebhookProfileType = Trycourier::Models::WebhookProfileType
310
+
311
+ WebhookRecipient = Trycourier::Models::WebhookRecipient
312
+
231
313
  WidgetBackground = Trycourier::Models::WidgetBackground
232
314
  end
@@ -22,7 +22,13 @@ module Trycourier
22
22
  params(
23
23
  audience_id: String,
24
24
  description: T.nilable(String),
25
- filter: T.nilable(Trycourier::Filter::OrHash),
25
+ filter:
26
+ T.nilable(
27
+ T.any(
28
+ Trycourier::SingleFilterConfig::OrHash,
29
+ Trycourier::NestedFilterConfig::OrHash
30
+ )
31
+ ),
26
32
  name: T.nilable(String),
27
33
  request_options: Trycourier::RequestOptions::OrHash
28
34
  ).returns(Trycourier::Models::AudienceUpdateResponse)
@@ -0,0 +1,25 @@
1
+ module Trycourier
2
+ module Models
3
+ type airship_profile =
4
+ {
5
+ audience: Trycourier::AirshipProfileAudience,
6
+ device_types: ::Array[String]
7
+ }
8
+
9
+ class AirshipProfile < Trycourier::Internal::Type::BaseModel
10
+ attr_accessor audience: Trycourier::AirshipProfileAudience
11
+
12
+ attr_accessor device_types: ::Array[String]
13
+
14
+ def initialize: (
15
+ audience: Trycourier::AirshipProfileAudience,
16
+ device_types: ::Array[String]
17
+ ) -> void
18
+
19
+ def to_hash: -> {
20
+ audience: Trycourier::AirshipProfileAudience,
21
+ device_types: ::Array[String]
22
+ }
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,13 @@
1
+ module Trycourier
2
+ module Models
3
+ type airship_profile_audience = { named_user: String }
4
+
5
+ class AirshipProfileAudience < Trycourier::Internal::Type::BaseModel
6
+ attr_accessor named_user: String
7
+
8
+ def initialize: (named_user: String) -> void
9
+
10
+ def to_hash: -> { named_user: String }
11
+ end
12
+ end
13
+ end
@@ -5,7 +5,7 @@ module Trycourier
5
5
  id: String,
6
6
  created_at: String,
7
7
  description: String,
8
- filter: Trycourier::Filter,
8
+ filter: Trycourier::Models::filter,
9
9
  name: String,
10
10
  updated_at: String
11
11
  }
@@ -17,7 +17,7 @@ module Trycourier
17
17
 
18
18
  attr_accessor description: String
19
19
 
20
- attr_accessor filter: Trycourier::Filter
20
+ attr_accessor filter: Trycourier::Models::filter
21
21
 
22
22
  attr_accessor name: String
23
23
 
@@ -27,7 +27,7 @@ module Trycourier
27
27
  id: String,
28
28
  created_at: String,
29
29
  description: String,
30
- filter: Trycourier::Filter,
30
+ filter: Trycourier::Models::filter,
31
31
  name: String,
32
32
  updated_at: String
33
33
  ) -> void
@@ -36,7 +36,7 @@ module Trycourier
36
36
  id: String,
37
37
  created_at: String,
38
38
  description: String,
39
- filter: Trycourier::Filter,
39
+ filter: Trycourier::Models::filter,
40
40
  name: String,
41
41
  updated_at: String
42
42
  }
@@ -0,0 +1,50 @@
1
+ module Trycourier
2
+ module Models
3
+ type audience_filter =
4
+ {
5
+ operator: Trycourier::Models::AudienceFilter::operator,
6
+ path: Trycourier::Models::AudienceFilter::path,
7
+ value: String
8
+ }
9
+
10
+ class AudienceFilter < Trycourier::Internal::Type::BaseModel
11
+ attr_accessor operator: Trycourier::Models::AudienceFilter::operator
12
+
13
+ attr_accessor path: Trycourier::Models::AudienceFilter::path
14
+
15
+ attr_accessor value: String
16
+
17
+ def initialize: (
18
+ operator: Trycourier::Models::AudienceFilter::operator,
19
+ path: Trycourier::Models::AudienceFilter::path,
20
+ value: String
21
+ ) -> void
22
+
23
+ def to_hash: -> {
24
+ operator: Trycourier::Models::AudienceFilter::operator,
25
+ path: Trycourier::Models::AudienceFilter::path,
26
+ value: String
27
+ }
28
+
29
+ type operator = :MEMBER_OF
30
+
31
+ module Operator
32
+ extend Trycourier::Internal::Type::Enum
33
+
34
+ MEMBER_OF: :MEMBER_OF
35
+
36
+ def self?.values: -> ::Array[Trycourier::Models::AudienceFilter::operator]
37
+ end
38
+
39
+ type path = :account_id
40
+
41
+ module Path
42
+ extend Trycourier::Internal::Type::Enum
43
+
44
+ ACCOUNT_ID: :account_id
45
+
46
+ def self?.values: -> ::Array[Trycourier::Models::AudienceFilter::path]
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,30 @@
1
+ module Trycourier
2
+ module Models
3
+ type audience_recipient =
4
+ {
5
+ audience_id: String,
6
+ data: ::Hash[Symbol, top]?,
7
+ filters: ::Array[Trycourier::AudienceFilter]?
8
+ }
9
+
10
+ class AudienceRecipient < Trycourier::Internal::Type::BaseModel
11
+ attr_accessor audience_id: String
12
+
13
+ attr_accessor data: ::Hash[Symbol, top]?
14
+
15
+ attr_accessor filters: ::Array[Trycourier::AudienceFilter]?
16
+
17
+ def initialize: (
18
+ audience_id: String,
19
+ ?data: ::Hash[Symbol, top]?,
20
+ ?filters: ::Array[Trycourier::AudienceFilter]?
21
+ ) -> void
22
+
23
+ def to_hash: -> {
24
+ audience_id: String,
25
+ data: ::Hash[Symbol, top]?,
26
+ filters: ::Array[Trycourier::AudienceFilter]?
27
+ }
28
+ end
29
+ end
30
+ end
@@ -1,7 +1,11 @@
1
1
  module Trycourier
2
2
  module Models
3
3
  type audience_update_params =
4
- { description: String?, filter: Trycourier::Filter?, name: String? }
4
+ {
5
+ description: String?,
6
+ filter: Trycourier::Models::filter?,
7
+ name: String?
8
+ }
5
9
  & Trycourier::Internal::Type::request_parameters
6
10
 
7
11
  class AudienceUpdateParams < Trycourier::Internal::Type::BaseModel
@@ -10,20 +14,20 @@ module Trycourier
10
14
 
11
15
  attr_accessor description: String?
12
16
 
13
- attr_accessor filter: Trycourier::Filter?
17
+ attr_accessor filter: Trycourier::Models::filter?
14
18
 
15
19
  attr_accessor name: String?
16
20
 
17
21
  def initialize: (
18
22
  ?description: String?,
19
- ?filter: Trycourier::Filter?,
23
+ ?filter: Trycourier::Models::filter?,
20
24
  ?name: String?,
21
25
  ?request_options: Trycourier::request_opts
22
26
  ) -> void
23
27
 
24
28
  def to_hash: -> {
25
29
  description: String?,
26
- filter: Trycourier::Filter?,
30
+ filter: Trycourier::Models::filter?,
27
31
  name: String?,
28
32
  request_options: Trycourier::RequestOptions
29
33
  }
@@ -0,0 +1,5 @@
1
+ module Trycourier
2
+ module Models
3
+ class DeviceType = String
4
+ end
5
+ end
@@ -0,0 +1,11 @@
1
+ module Trycourier
2
+ module Models
3
+ type discord = Trycourier::SendToChannel | Trycourier::SendDirectMessage
4
+
5
+ module Discord
6
+ extend Trycourier::Internal::Type::Union
7
+
8
+ def self?.variants: -> ::Array[Trycourier::Models::discord]
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module Trycourier
2
+ module Models
3
+ type expo = Trycourier::Token | Trycourier::MultipleTokens
4
+
5
+ module Expo
6
+ extend Trycourier::Internal::Type::Union
7
+
8
+ def self?.variants: -> ::Array[Trycourier::Models::expo]
9
+ end
10
+ end
11
+ end
@@ -1,69 +1,12 @@
1
1
  module Trycourier
2
2
  module Models
3
3
  type filter =
4
- {
5
- operator: Trycourier::Models::Filter::operator,
6
- path: String,
7
- value: String
8
- }
4
+ Trycourier::SingleFilterConfig | Trycourier::NestedFilterConfig
9
5
 
10
- class Filter < Trycourier::Internal::Type::BaseModel
11
- attr_accessor operator: Trycourier::Models::Filter::operator
6
+ module Filter
7
+ extend Trycourier::Internal::Type::Union
12
8
 
13
- attr_accessor path: String
14
-
15
- attr_accessor value: String
16
-
17
- def initialize: (
18
- operator: Trycourier::Models::Filter::operator,
19
- path: String,
20
- value: String
21
- ) -> void
22
-
23
- def to_hash: -> {
24
- operator: Trycourier::Models::Filter::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::Filter::operator]
66
- end
9
+ def self?.variants: -> ::Array[Trycourier::Models::filter]
67
10
  end
68
11
  end
69
12
  end
@@ -1,69 +1,12 @@
1
1
  module Trycourier
2
2
  module Models
3
3
  type filter_config =
4
- {
5
- operator: Trycourier::Models::FilterConfig::operator,
6
- path: String,
7
- value: String
8
- }
4
+ Trycourier::SingleFilterConfig | Trycourier::NestedFilterConfig
9
5
 
10
- class FilterConfig < Trycourier::Internal::Type::BaseModel
11
- attr_accessor operator: Trycourier::Models::FilterConfig::operator
6
+ module FilterConfig
7
+ extend Trycourier::Internal::Type::Union
12
8
 
13
- attr_accessor path: String
14
-
15
- attr_accessor value: String
16
-
17
- def initialize: (
18
- operator: Trycourier::Models::FilterConfig::operator,
19
- path: String,
20
- value: String
21
- ) -> void
22
-
23
- def to_hash: -> {
24
- operator: Trycourier::Models::FilterConfig::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::FilterConfig::operator]
66
- end
9
+ def self?.variants: -> ::Array[Trycourier::Models::filter_config]
67
10
  end
68
11
  end
69
12
  end
@@ -0,0 +1,15 @@
1
+ module Trycourier
2
+ module Models
3
+ type intercom = { from: String, to: Trycourier::IntercomRecipient }
4
+
5
+ class Intercom < Trycourier::Internal::Type::BaseModel
6
+ attr_accessor from: String
7
+
8
+ attr_accessor to: Trycourier::IntercomRecipient
9
+
10
+ def initialize: (from: String, to: Trycourier::IntercomRecipient) -> void
11
+
12
+ def to_hash: -> { from: String, to: Trycourier::IntercomRecipient }
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,13 @@
1
+ module Trycourier
2
+ module Models
3
+ type intercom_recipient = { id: String }
4
+
5
+ class IntercomRecipient < Trycourier::Internal::Type::BaseModel
6
+ attr_accessor id: String
7
+
8
+ def initialize: (id: String) -> void
9
+
10
+ def to_hash: -> { id: String }
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,50 @@
1
+ module Trycourier
2
+ module Models
3
+ type list_filter =
4
+ {
5
+ operator: Trycourier::Models::ListFilter::operator,
6
+ path: Trycourier::Models::ListFilter::path,
7
+ value: String
8
+ }
9
+
10
+ class ListFilter < Trycourier::Internal::Type::BaseModel
11
+ attr_accessor operator: Trycourier::Models::ListFilter::operator
12
+
13
+ attr_accessor path: Trycourier::Models::ListFilter::path
14
+
15
+ attr_accessor value: String
16
+
17
+ def initialize: (
18
+ operator: Trycourier::Models::ListFilter::operator,
19
+ path: Trycourier::Models::ListFilter::path,
20
+ value: String
21
+ ) -> void
22
+
23
+ def to_hash: -> {
24
+ operator: Trycourier::Models::ListFilter::operator,
25
+ path: Trycourier::Models::ListFilter::path,
26
+ value: String
27
+ }
28
+
29
+ type operator = :MEMBER_OF
30
+
31
+ module Operator
32
+ extend Trycourier::Internal::Type::Enum
33
+
34
+ MEMBER_OF: :MEMBER_OF
35
+
36
+ def self?.values: -> ::Array[Trycourier::Models::ListFilter::operator]
37
+ end
38
+
39
+ type path = :account_id
40
+
41
+ module Path
42
+ extend Trycourier::Internal::Type::Enum
43
+
44
+ ACCOUNT_ID: :account_id
45
+
46
+ def self?.values: -> ::Array[Trycourier::Models::ListFilter::path]
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,19 @@
1
+ module Trycourier
2
+ module Models
3
+ type list_pattern_recipient =
4
+ { data: ::Hash[Symbol, top]?, list_pattern: String? }
5
+
6
+ class ListPatternRecipient < Trycourier::Internal::Type::BaseModel
7
+ attr_accessor data: ::Hash[Symbol, top]?
8
+
9
+ attr_accessor list_pattern: String?
10
+
11
+ def initialize: (
12
+ ?data: ::Hash[Symbol, top]?,
13
+ ?list_pattern: String?
14
+ ) -> void
15
+
16
+ def to_hash: -> { data: ::Hash[Symbol, top]?, list_pattern: String? }
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,30 @@
1
+ module Trycourier
2
+ module Models
3
+ type list_recipient =
4
+ {
5
+ data: ::Hash[Symbol, top]?,
6
+ filters: ::Array[Trycourier::ListFilter]?,
7
+ list_id: String?
8
+ }
9
+
10
+ class ListRecipient < Trycourier::Internal::Type::BaseModel
11
+ attr_accessor data: ::Hash[Symbol, top]?
12
+
13
+ attr_accessor filters: ::Array[Trycourier::ListFilter]?
14
+
15
+ attr_accessor list_id: String?
16
+
17
+ def initialize: (
18
+ ?data: ::Hash[Symbol, top]?,
19
+ ?filters: ::Array[Trycourier::ListFilter]?,
20
+ ?list_id: String?
21
+ ) -> void
22
+
23
+ def to_hash: -> {
24
+ data: ::Hash[Symbol, top]?,
25
+ filters: ::Array[Trycourier::ListFilter]?,
26
+ list_id: String?
27
+ }
28
+ end
29
+ end
30
+ end