trycourier 4.21.0 → 4.23.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 (231) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/lib/courier/client.rb +43 -0
  4. data/lib/courier/models/automations/invoke_invoke_ad_hoc_params.rb +13 -1
  5. data/lib/courier/models/automations/invoke_invoke_by_template_params.rb +13 -1
  6. data/lib/courier/models/brand_create_params.rb +13 -1
  7. data/lib/courier/models/broadcast.rb +132 -0
  8. data/lib/courier/models/broadcast_archive_params.rb +20 -0
  9. data/lib/courier/models/broadcast_cancel_params.rb +20 -0
  10. data/lib/courier/models/broadcast_create_params.rb +14 -0
  11. data/lib/courier/models/broadcast_duplicate_params.rb +20 -0
  12. data/lib/courier/models/broadcast_list_params.rb +30 -0
  13. data/lib/courier/models/broadcast_list_response.rb +24 -0
  14. data/lib/courier/models/broadcast_put_content_params.rb +20 -0
  15. data/lib/courier/models/broadcast_retrieve_content_params.rb +33 -0
  16. data/lib/courier/models/broadcast_retrieve_params.rb +20 -0
  17. data/lib/courier/models/broadcast_schedule.rb +59 -0
  18. data/lib/courier/models/broadcast_schedule_params.rb +20 -0
  19. data/lib/courier/models/broadcast_send_params.rb +20 -0
  20. data/lib/courier/models/broadcast_update_params.rb +20 -0
  21. data/lib/courier/models/create_broadcast_request.rb +43 -0
  22. data/lib/courier/models/inbox/message_delete_params.rb +22 -0
  23. data/lib/courier/models/inbox/message_restore_params.rb +22 -0
  24. data/lib/courier/models/journey_cancel_params.rb +13 -1
  25. data/lib/courier/models/journey_create_params.rb +13 -1
  26. data/lib/courier/models/journey_invoke_params.rb +13 -1
  27. data/lib/courier/models/journey_publish_params.rb +13 -1
  28. data/lib/courier/models/journeys/template_create_params.rb +13 -1
  29. data/lib/courier/models/journeys/template_publish_params.rb +13 -1
  30. data/lib/courier/models/lists/subscription_add_params.rb +13 -1
  31. data/lib/courier/models/notification_create_params.rb +13 -1
  32. data/lib/courier/models/notification_publish_params.rb +13 -1
  33. data/lib/courier/models/profile_create_params.rb +13 -1
  34. data/lib/courier/models/profiles/list_subscribe_params.rb +13 -1
  35. data/lib/courier/models/provider_create_params.rb +15 -1
  36. data/lib/courier/models/routing_strategy_create_params.rb +13 -1
  37. data/lib/courier/models/schedule_broadcast_request.rb +59 -0
  38. data/lib/courier/models/send_broadcast_request.rb +39 -0
  39. data/lib/courier/models/send_message_params.rb +15 -1
  40. data/lib/courier/models/update_broadcast_request.rb +18 -0
  41. data/lib/courier/models/users/preference_bulk_update_params.rb +15 -1
  42. data/lib/courier/models/users/preference_update_or_create_topic_params.rb +14 -4
  43. data/lib/courier/models/users/topic_preference.rb +21 -7
  44. data/lib/courier/models/workspace_preference_create_params.rb +13 -1
  45. data/lib/courier/models/workspace_preference_publish_params.rb +13 -1
  46. data/lib/courier/models/workspace_preferences/topic_create_params.rb +13 -1
  47. data/lib/courier/models.rb +38 -0
  48. data/lib/courier/resources/audiences.rb +12 -5
  49. data/lib/courier/resources/audit_events.rb +5 -2
  50. data/lib/courier/resources/auth.rb +5 -1
  51. data/lib/courier/resources/automations/invoke.rb +47 -23
  52. data/lib/courier/resources/automations.rb +6 -1
  53. data/lib/courier/resources/brands.rb +38 -12
  54. data/lib/courier/resources/broadcasts.rb +290 -0
  55. data/lib/courier/resources/digests/schedules.rb +4 -3
  56. data/lib/courier/resources/digests.rb +2 -0
  57. data/lib/courier/resources/inbound.rb +3 -1
  58. data/lib/courier/resources/inbox/messages.rb +58 -0
  59. data/lib/courier/resources/inbox.rb +19 -0
  60. data/lib/courier/resources/journeys/templates.rb +43 -25
  61. data/lib/courier/resources/journeys.rb +73 -44
  62. data/lib/courier/resources/lists/subscriptions.rb +22 -8
  63. data/lib/courier/resources/lists.rb +14 -5
  64. data/lib/courier/resources/messages.rb +14 -14
  65. data/lib/courier/resources/notifications/checks.rb +8 -3
  66. data/lib/courier/resources/notifications.rb +48 -30
  67. data/lib/courier/resources/profiles/lists.rb +19 -8
  68. data/lib/courier/resources/profiles.rb +25 -14
  69. data/lib/courier/resources/providers/catalog.rb +4 -4
  70. data/lib/courier/resources/providers.rb +27 -18
  71. data/lib/courier/resources/requests.rb +4 -1
  72. data/lib/courier/resources/routing_strategies.rb +24 -12
  73. data/lib/courier/resources/send.rb +14 -4
  74. data/lib/courier/resources/tenants/preferences/items.rb +6 -2
  75. data/lib/courier/resources/tenants/preferences.rb +2 -0
  76. data/lib/courier/resources/tenants/templates/versions.rb +4 -7
  77. data/lib/courier/resources/tenants/templates.rb +14 -19
  78. data/lib/courier/resources/tenants.rb +14 -5
  79. data/lib/courier/resources/translations.rb +6 -2
  80. data/lib/courier/resources/users/preferences.rb +23 -42
  81. data/lib/courier/resources/users/tenants.rb +12 -10
  82. data/lib/courier/resources/users/tokens.rb +14 -6
  83. data/lib/courier/resources/users.rb +6 -0
  84. data/lib/courier/resources/workspace_preferences/topics.rb +27 -19
  85. data/lib/courier/resources/workspace_preferences.rb +40 -20
  86. data/lib/courier/version.rb +1 -1
  87. data/lib/courier.rb +24 -1
  88. data/rbi/courier/client.rbi +41 -0
  89. data/rbi/courier/models/automations/invoke_invoke_ad_hoc_params.rbi +18 -0
  90. data/rbi/courier/models/automations/invoke_invoke_by_template_params.rbi +18 -0
  91. data/rbi/courier/models/brand_create_params.rbi +18 -0
  92. data/rbi/courier/models/broadcast.rbi +164 -0
  93. data/rbi/courier/models/broadcast_archive_params.rbi +35 -0
  94. data/rbi/courier/models/broadcast_cancel_params.rbi +35 -0
  95. data/rbi/courier/models/broadcast_create_params.rbi +27 -0
  96. data/rbi/courier/models/broadcast_duplicate_params.rbi +35 -0
  97. data/rbi/courier/models/broadcast_list_params.rbi +54 -0
  98. data/rbi/courier/models/broadcast_list_response.rbi +39 -0
  99. data/rbi/courier/models/broadcast_put_content_params.rbi +35 -0
  100. data/rbi/courier/models/broadcast_retrieve_content_params.rbi +57 -0
  101. data/rbi/courier/models/broadcast_retrieve_params.rbi +35 -0
  102. data/rbi/courier/models/broadcast_schedule.rbi +92 -0
  103. data/rbi/courier/models/broadcast_schedule_params.rbi +35 -0
  104. data/rbi/courier/models/broadcast_send_params.rbi +35 -0
  105. data/rbi/courier/models/broadcast_update_params.rbi +35 -0
  106. data/rbi/courier/models/create_broadcast_request.rbi +81 -0
  107. data/rbi/courier/models/inbox/message_delete_params.rbi +40 -0
  108. data/rbi/courier/models/inbox/message_restore_params.rbi +40 -0
  109. data/rbi/courier/models/journey_cancel_params.rbi +31 -5
  110. data/rbi/courier/models/journey_create_params.rbi +31 -5
  111. data/rbi/courier/models/journey_invoke_params.rbi +26 -2
  112. data/rbi/courier/models/journey_publish_params.rbi +26 -2
  113. data/rbi/courier/models/journeys/template_create_params.rbi +26 -2
  114. data/rbi/courier/models/journeys/template_publish_params.rbi +23 -1
  115. data/rbi/courier/models/lists/subscription_add_params.rbi +23 -1
  116. data/rbi/courier/models/notification_create_params.rbi +31 -5
  117. data/rbi/courier/models/notification_publish_params.rbi +26 -2
  118. data/rbi/courier/models/profile_create_params.rbi +23 -1
  119. data/rbi/courier/models/profiles/list_subscribe_params.rbi +23 -1
  120. data/rbi/courier/models/provider_create_params.rbi +18 -0
  121. data/rbi/courier/models/routing_strategy_create_params.rbi +31 -5
  122. data/rbi/courier/models/schedule_broadcast_request.rbi +103 -0
  123. data/rbi/courier/models/send_broadcast_request.rbi +77 -0
  124. data/rbi/courier/models/send_message_params.rbi +18 -0
  125. data/rbi/courier/models/update_broadcast_request.rbi +28 -0
  126. data/rbi/courier/models/users/preference_bulk_update_params.rbi +18 -0
  127. data/rbi/courier/models/users/preference_update_or_create_topic_params.rbi +14 -2
  128. data/rbi/courier/models/users/topic_preference.rbi +24 -2
  129. data/rbi/courier/models/workspace_preference_create_params.rbi +31 -5
  130. data/rbi/courier/models/workspace_preference_publish_params.rbi +31 -5
  131. data/rbi/courier/models/workspace_preferences/topic_create_params.rbi +26 -2
  132. data/rbi/courier/models.rbi +39 -0
  133. data/rbi/courier/resources/audiences.rbi +12 -5
  134. data/rbi/courier/resources/audit_events.rbi +5 -2
  135. data/rbi/courier/resources/auth.rbi +5 -1
  136. data/rbi/courier/resources/automations/invoke.rbi +48 -7
  137. data/rbi/courier/resources/automations.rbi +6 -1
  138. data/rbi/courier/resources/brands.rbi +37 -7
  139. data/rbi/courier/resources/broadcasts.rbi +199 -0
  140. data/rbi/courier/resources/digests/schedules.rbi +4 -3
  141. data/rbi/courier/resources/digests.rbi +2 -0
  142. data/rbi/courier/resources/inbound.rbi +3 -1
  143. data/rbi/courier/resources/inbox/messages.rbi +44 -0
  144. data/rbi/courier/resources/inbox.rbi +16 -0
  145. data/rbi/courier/resources/journeys/templates.rbi +47 -17
  146. data/rbi/courier/resources/journeys.rbi +93 -39
  147. data/rbi/courier/resources/lists/subscriptions.rbi +24 -5
  148. data/rbi/courier/resources/lists.rbi +14 -5
  149. data/rbi/courier/resources/messages.rbi +14 -14
  150. data/rbi/courier/resources/notifications/checks.rbi +8 -3
  151. data/rbi/courier/resources/notifications.rbi +58 -28
  152. data/rbi/courier/resources/profiles/lists.rbi +25 -6
  153. data/rbi/courier/resources/profiles.rbi +31 -11
  154. data/rbi/courier/resources/providers/catalog.rbi +4 -4
  155. data/rbi/courier/resources/providers.rbi +35 -19
  156. data/rbi/courier/resources/requests.rbi +4 -1
  157. data/rbi/courier/resources/routing_strategies.rbi +26 -10
  158. data/rbi/courier/resources/send.rbi +20 -3
  159. data/rbi/courier/resources/tenants/preferences/items.rbi +6 -2
  160. data/rbi/courier/resources/tenants/preferences.rbi +2 -0
  161. data/rbi/courier/resources/tenants/templates/versions.rbi +4 -7
  162. data/rbi/courier/resources/tenants/templates.rbi +14 -19
  163. data/rbi/courier/resources/tenants.rbi +14 -5
  164. data/rbi/courier/resources/translations.rbi +6 -2
  165. data/rbi/courier/resources/users/preferences.rbi +28 -40
  166. data/rbi/courier/resources/users/tenants.rbi +12 -10
  167. data/rbi/courier/resources/users/tokens.rbi +14 -6
  168. data/rbi/courier/resources/users.rbi +6 -0
  169. data/rbi/courier/resources/workspace_preferences/topics.rbi +37 -18
  170. data/rbi/courier/resources/workspace_preferences.rbi +51 -17
  171. data/sig/courier/client.rbs +4 -0
  172. data/sig/courier/models/automations/invoke_invoke_ad_hoc_params.rbs +15 -1
  173. data/sig/courier/models/automations/invoke_invoke_by_template_params.rbs +15 -1
  174. data/sig/courier/models/brand_create_params.rbs +15 -1
  175. data/sig/courier/models/broadcast.rbs +98 -0
  176. data/sig/courier/models/broadcast_archive_params.rbs +23 -0
  177. data/sig/courier/models/broadcast_cancel_params.rbs +23 -0
  178. data/sig/courier/models/broadcast_create_params.rbs +15 -0
  179. data/sig/courier/models/broadcast_duplicate_params.rbs +23 -0
  180. data/sig/courier/models/broadcast_list_params.rbs +30 -0
  181. data/sig/courier/models/broadcast_list_response.rbs +22 -0
  182. data/sig/courier/models/broadcast_put_content_params.rbs +25 -0
  183. data/sig/courier/models/broadcast_retrieve_content_params.rbs +30 -0
  184. data/sig/courier/models/broadcast_retrieve_params.rbs +23 -0
  185. data/sig/courier/models/broadcast_schedule.rbs +46 -0
  186. data/sig/courier/models/broadcast_schedule_params.rbs +25 -0
  187. data/sig/courier/models/broadcast_send_params.rbs +25 -0
  188. data/sig/courier/models/broadcast_update_params.rbs +25 -0
  189. data/sig/courier/models/create_broadcast_request.rbs +40 -0
  190. data/sig/courier/models/inbox/message_delete_params.rbs +25 -0
  191. data/sig/courier/models/inbox/message_restore_params.rbs +25 -0
  192. data/sig/courier/models/journey_cancel_params.rbs +20 -3
  193. data/sig/courier/models/journey_create_params.rbs +20 -3
  194. data/sig/courier/models/journey_invoke_params.rbs +18 -1
  195. data/sig/courier/models/journey_publish_params.rbs +18 -1
  196. data/sig/courier/models/journeys/template_create_params.rbs +18 -1
  197. data/sig/courier/models/journeys/template_publish_params.rbs +18 -1
  198. data/sig/courier/models/lists/subscription_add_params.rbs +15 -1
  199. data/sig/courier/models/notification_create_params.rbs +20 -3
  200. data/sig/courier/models/notification_publish_params.rbs +18 -2
  201. data/sig/courier/models/profile_create_params.rbs +18 -1
  202. data/sig/courier/models/profiles/list_subscribe_params.rbs +15 -1
  203. data/sig/courier/models/provider_create_params.rbs +15 -1
  204. data/sig/courier/models/routing_strategy_create_params.rbs +20 -3
  205. data/sig/courier/models/schedule_broadcast_request.rbs +48 -0
  206. data/sig/courier/models/send_broadcast_request.rbs +36 -0
  207. data/sig/courier/models/send_message_params.rbs +17 -1
  208. data/sig/courier/models/update_broadcast_request.rbs +13 -0
  209. data/sig/courier/models/users/preference_bulk_update_params.rbs +15 -1
  210. data/sig/courier/models/workspace_preference_create_params.rbs +20 -3
  211. data/sig/courier/models/workspace_preference_publish_params.rbs +20 -3
  212. data/sig/courier/models/workspace_preferences/topic_create_params.rbs +18 -1
  213. data/sig/courier/models.rbs +38 -0
  214. data/sig/courier/resources/automations/invoke.rbs +4 -0
  215. data/sig/courier/resources/brands.rbs +2 -0
  216. data/sig/courier/resources/broadcasts.rbs +74 -0
  217. data/sig/courier/resources/inbox/messages.rbs +19 -0
  218. data/sig/courier/resources/inbox.rbs +9 -0
  219. data/sig/courier/resources/journeys/templates.rbs +4 -0
  220. data/sig/courier/resources/journeys.rbs +8 -0
  221. data/sig/courier/resources/lists/subscriptions.rbs +2 -0
  222. data/sig/courier/resources/notifications.rbs +4 -0
  223. data/sig/courier/resources/profiles/lists.rbs +2 -0
  224. data/sig/courier/resources/profiles.rbs +2 -0
  225. data/sig/courier/resources/providers.rbs +2 -0
  226. data/sig/courier/resources/routing_strategies.rbs +2 -0
  227. data/sig/courier/resources/send.rbs +2 -0
  228. data/sig/courier/resources/users/preferences.rbs +2 -0
  229. data/sig/courier/resources/workspace_preferences/topics.rbs +2 -0
  230. data/sig/courier/resources/workspace_preferences.rbs +4 -0
  231. metadata +71 -2
@@ -0,0 +1,22 @@
1
+ module Courier
2
+ module Models
3
+ type broadcast_list_response =
4
+ { paging: Courier::Paging, results: ::Array[Courier::Broadcast] }
5
+
6
+ class BroadcastListResponse < Courier::Internal::Type::BaseModel
7
+ attr_accessor paging: Courier::Paging
8
+
9
+ attr_accessor results: ::Array[Courier::Broadcast]
10
+
11
+ def initialize: (
12
+ paging: Courier::Paging,
13
+ results: ::Array[Courier::Broadcast]
14
+ ) -> void
15
+
16
+ def to_hash: -> {
17
+ paging: Courier::Paging,
18
+ results: ::Array[Courier::Broadcast]
19
+ }
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,25 @@
1
+ module Courier
2
+ module Models
3
+ type broadcast_put_content_params =
4
+ { broadcast_id: String } & Courier::Internal::Type::request_parameters
5
+
6
+ class BroadcastPutContentParams < Courier::Models::NotificationContentPutRequest
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ def broadcast_id: -> String
11
+
12
+ def broadcast_id=: (String _) -> String
13
+
14
+ def initialize: (
15
+ broadcast_id: String,
16
+ ?request_options: Courier::request_opts
17
+ ) -> void
18
+
19
+ def to_hash: -> {
20
+ broadcast_id: String,
21
+ request_options: Courier::RequestOptions
22
+ }
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,30 @@
1
+ module Courier
2
+ module Models
3
+ type broadcast_retrieve_content_params =
4
+ { broadcast_id: String, version: String }
5
+ & Courier::Internal::Type::request_parameters
6
+
7
+ class BroadcastRetrieveContentParams < Courier::Internal::Type::BaseModel
8
+ extend Courier::Internal::Type::RequestParameters::Converter
9
+ include Courier::Internal::Type::RequestParameters
10
+
11
+ attr_accessor broadcast_id: String
12
+
13
+ attr_reader version: String?
14
+
15
+ def version=: (String) -> String
16
+
17
+ def initialize: (
18
+ broadcast_id: String,
19
+ ?version: String,
20
+ ?request_options: Courier::request_opts
21
+ ) -> void
22
+
23
+ def to_hash: -> {
24
+ broadcast_id: String,
25
+ version: String,
26
+ request_options: Courier::RequestOptions
27
+ }
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,23 @@
1
+ module Courier
2
+ module Models
3
+ type broadcast_retrieve_params =
4
+ { broadcast_id: String } & Courier::Internal::Type::request_parameters
5
+
6
+ class BroadcastRetrieveParams < Courier::Internal::Type::BaseModel
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ attr_accessor broadcast_id: String
11
+
12
+ def initialize: (
13
+ broadcast_id: String,
14
+ ?request_options: Courier::request_opts
15
+ ) -> void
16
+
17
+ def to_hash: -> {
18
+ broadcast_id: String,
19
+ request_options: Courier::RequestOptions
20
+ }
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,46 @@
1
+ module Courier
2
+ module Models
3
+ type broadcast_schedule =
4
+ {
5
+ recipient_id: String,
6
+ recipient_type: Courier::Models::BroadcastSchedule::recipient_type,
7
+ scheduled_to: String?,
8
+ timezone: String?
9
+ }
10
+
11
+ class BroadcastSchedule < Courier::Internal::Type::BaseModel
12
+ attr_accessor recipient_id: String
13
+
14
+ attr_accessor recipient_type: Courier::Models::BroadcastSchedule::recipient_type
15
+
16
+ attr_accessor scheduled_to: String?
17
+
18
+ attr_accessor timezone: String?
19
+
20
+ def initialize: (
21
+ recipient_id: String,
22
+ recipient_type: Courier::Models::BroadcastSchedule::recipient_type,
23
+ ?scheduled_to: String?,
24
+ ?timezone: String?
25
+ ) -> void
26
+
27
+ def to_hash: -> {
28
+ recipient_id: String,
29
+ recipient_type: Courier::Models::BroadcastSchedule::recipient_type,
30
+ scheduled_to: String?,
31
+ timezone: String?
32
+ }
33
+
34
+ type recipient_type = :list | :audience
35
+
36
+ module RecipientType
37
+ extend Courier::Internal::Type::Enum
38
+
39
+ LIST: :list
40
+ AUDIENCE: :audience
41
+
42
+ def self?.values: -> ::Array[Courier::Models::BroadcastSchedule::recipient_type]
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,25 @@
1
+ module Courier
2
+ module Models
3
+ type broadcast_schedule_params =
4
+ { broadcast_id: String } & Courier::Internal::Type::request_parameters
5
+
6
+ class BroadcastScheduleParams < Courier::Models::ScheduleBroadcastRequest
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ def broadcast_id: -> String
11
+
12
+ def broadcast_id=: (String _) -> String
13
+
14
+ def initialize: (
15
+ broadcast_id: String,
16
+ ?request_options: Courier::request_opts
17
+ ) -> void
18
+
19
+ def to_hash: -> {
20
+ broadcast_id: String,
21
+ request_options: Courier::RequestOptions
22
+ }
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,25 @@
1
+ module Courier
2
+ module Models
3
+ type broadcast_send_params =
4
+ { broadcast_id: String } & Courier::Internal::Type::request_parameters
5
+
6
+ class BroadcastSendParams < Courier::Models::SendBroadcastRequest
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ def broadcast_id: -> String
11
+
12
+ def broadcast_id=: (String _) -> String
13
+
14
+ def initialize: (
15
+ broadcast_id: String,
16
+ ?request_options: Courier::request_opts
17
+ ) -> void
18
+
19
+ def to_hash: -> {
20
+ broadcast_id: String,
21
+ request_options: Courier::RequestOptions
22
+ }
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,25 @@
1
+ module Courier
2
+ module Models
3
+ type broadcast_update_params =
4
+ { broadcast_id: String } & Courier::Internal::Type::request_parameters
5
+
6
+ class BroadcastUpdateParams < Courier::Models::UpdateBroadcastRequest
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ def broadcast_id: -> String
11
+
12
+ def broadcast_id=: (String _) -> String
13
+
14
+ def initialize: (
15
+ broadcast_id: String,
16
+ ?request_options: Courier::request_opts
17
+ ) -> void
18
+
19
+ def to_hash: -> {
20
+ broadcast_id: String,
21
+ request_options: Courier::RequestOptions
22
+ }
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,40 @@
1
+ module Courier
2
+ module Models
3
+ type create_broadcast_request =
4
+ {
5
+ channel: Courier::Models::CreateBroadcastRequest::channel,
6
+ name: String
7
+ }
8
+
9
+ class CreateBroadcastRequest < Courier::Internal::Type::BaseModel
10
+ attr_accessor channel: Courier::Models::CreateBroadcastRequest::channel
11
+
12
+ attr_accessor name: String
13
+
14
+ def initialize: (
15
+ channel: Courier::Models::CreateBroadcastRequest::channel,
16
+ name: String
17
+ ) -> void
18
+
19
+ def to_hash: -> {
20
+ channel: Courier::Models::CreateBroadcastRequest::channel,
21
+ name: String
22
+ }
23
+
24
+ type channel = :email | :sms | :push | :inbox | :slack | :msteams
25
+
26
+ module Channel
27
+ extend Courier::Internal::Type::Enum
28
+
29
+ EMAIL: :email
30
+ SMS: :sms
31
+ PUSH: :push
32
+ INBOX: :inbox
33
+ SLACK: :slack
34
+ MSTEAMS: :msteams
35
+
36
+ def self?.values: -> ::Array[Courier::Models::CreateBroadcastRequest::channel]
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,25 @@
1
+ module Courier
2
+ module Models
3
+ module Inbox
4
+ type message_delete_params =
5
+ { message_id: String } & Courier::Internal::Type::request_parameters
6
+
7
+ class MessageDeleteParams < Courier::Internal::Type::BaseModel
8
+ extend Courier::Internal::Type::RequestParameters::Converter
9
+ include Courier::Internal::Type::RequestParameters
10
+
11
+ attr_accessor message_id: String
12
+
13
+ def initialize: (
14
+ message_id: String,
15
+ ?request_options: Courier::request_opts
16
+ ) -> void
17
+
18
+ def to_hash: -> {
19
+ message_id: String,
20
+ request_options: Courier::RequestOptions
21
+ }
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,25 @@
1
+ module Courier
2
+ module Models
3
+ module Inbox
4
+ type message_restore_params =
5
+ { message_id: String } & Courier::Internal::Type::request_parameters
6
+
7
+ class MessageRestoreParams < Courier::Internal::Type::BaseModel
8
+ extend Courier::Internal::Type::RequestParameters::Converter
9
+ include Courier::Internal::Type::RequestParameters
10
+
11
+ attr_accessor message_id: String
12
+
13
+ def initialize: (
14
+ message_id: String,
15
+ ?request_options: Courier::request_opts
16
+ ) -> void
17
+
18
+ def to_hash: -> {
19
+ message_id: String,
20
+ request_options: Courier::RequestOptions
21
+ }
22
+ end
23
+ end
24
+ end
25
+ end
@@ -1,15 +1,32 @@
1
1
  module Courier
2
2
  module Models
3
3
  type journey_cancel_params =
4
- { } & Courier::Internal::Type::request_parameters
4
+ { idempotency_key: String, x_idempotency_expiration: String }
5
+ & Courier::Internal::Type::request_parameters
5
6
 
6
7
  class JourneyCancelParams < Courier::Internal::Type::BaseModel
7
8
  extend Courier::Internal::Type::RequestParameters::Converter
8
9
  include Courier::Internal::Type::RequestParameters
9
10
 
10
- def initialize: (?request_options: Courier::request_opts) -> void
11
+ attr_reader idempotency_key: String?
11
12
 
12
- def to_hash: -> { request_options: Courier::RequestOptions }
13
+ def idempotency_key=: (String) -> String
14
+
15
+ attr_reader x_idempotency_expiration: String?
16
+
17
+ def x_idempotency_expiration=: (String) -> String
18
+
19
+ def initialize: (
20
+ ?idempotency_key: String,
21
+ ?x_idempotency_expiration: String,
22
+ ?request_options: Courier::request_opts
23
+ ) -> void
24
+
25
+ def to_hash: -> {
26
+ idempotency_key: String,
27
+ x_idempotency_expiration: String,
28
+ request_options: Courier::RequestOptions
29
+ }
13
30
  end
14
31
  end
15
32
  end
@@ -1,15 +1,32 @@
1
1
  module Courier
2
2
  module Models
3
3
  type journey_create_params =
4
- { } & Courier::Internal::Type::request_parameters
4
+ { idempotency_key: String, x_idempotency_expiration: String }
5
+ & Courier::Internal::Type::request_parameters
5
6
 
6
7
  class JourneyCreateParams < Courier::Models::CreateJourneyRequest
7
8
  extend Courier::Internal::Type::RequestParameters::Converter
8
9
  include Courier::Internal::Type::RequestParameters
9
10
 
10
- def initialize: (?request_options: Courier::request_opts) -> void
11
+ def idempotency_key: -> String?
11
12
 
12
- def to_hash: -> { request_options: Courier::RequestOptions }
13
+ def idempotency_key=: (String _) -> String
14
+
15
+ def x_idempotency_expiration: -> String?
16
+
17
+ def x_idempotency_expiration=: (String _) -> String
18
+
19
+ def initialize: (
20
+ ?idempotency_key: String,
21
+ ?x_idempotency_expiration: String,
22
+ ?request_options: Courier::request_opts
23
+ ) -> void
24
+
25
+ def to_hash: -> {
26
+ idempotency_key: String,
27
+ x_idempotency_expiration: String,
28
+ request_options: Courier::RequestOptions
29
+ }
13
30
  end
14
31
  end
15
32
  end
@@ -1,7 +1,12 @@
1
1
  module Courier
2
2
  module Models
3
3
  type journey_invoke_params =
4
- { template_id: String } & Courier::Internal::Type::request_parameters
4
+ {
5
+ template_id: String,
6
+ idempotency_key: String,
7
+ x_idempotency_expiration: String
8
+ }
9
+ & Courier::Internal::Type::request_parameters
5
10
 
6
11
  class JourneyInvokeParams < Courier::Models::JourneysInvokeRequest
7
12
  extend Courier::Internal::Type::RequestParameters::Converter
@@ -11,13 +16,25 @@ module Courier
11
16
 
12
17
  def template_id=: (String _) -> String
13
18
 
19
+ def idempotency_key: -> String?
20
+
21
+ def idempotency_key=: (String _) -> String
22
+
23
+ def x_idempotency_expiration: -> String?
24
+
25
+ def x_idempotency_expiration=: (String _) -> String
26
+
14
27
  def initialize: (
15
28
  template_id: String,
29
+ ?idempotency_key: String,
30
+ ?x_idempotency_expiration: String,
16
31
  ?request_options: Courier::request_opts
17
32
  ) -> void
18
33
 
19
34
  def to_hash: -> {
20
35
  template_id: String,
36
+ idempotency_key: String,
37
+ x_idempotency_expiration: String,
21
38
  request_options: Courier::RequestOptions
22
39
  }
23
40
  end
@@ -1,7 +1,12 @@
1
1
  module Courier
2
2
  module Models
3
3
  type journey_publish_params =
4
- { template_id: String } & Courier::Internal::Type::request_parameters
4
+ {
5
+ template_id: String,
6
+ idempotency_key: String,
7
+ x_idempotency_expiration: String
8
+ }
9
+ & Courier::Internal::Type::request_parameters
5
10
 
6
11
  class JourneyPublishParams < Courier::Models::JourneyPublishRequest
7
12
  extend Courier::Internal::Type::RequestParameters::Converter
@@ -11,13 +16,25 @@ module Courier
11
16
 
12
17
  def template_id=: (String _) -> String
13
18
 
19
+ def idempotency_key: -> String?
20
+
21
+ def idempotency_key=: (String _) -> String
22
+
23
+ def x_idempotency_expiration: -> String?
24
+
25
+ def x_idempotency_expiration=: (String _) -> String
26
+
14
27
  def initialize: (
15
28
  template_id: String,
29
+ ?idempotency_key: String,
30
+ ?x_idempotency_expiration: String,
16
31
  ?request_options: Courier::request_opts
17
32
  ) -> void
18
33
 
19
34
  def to_hash: -> {
20
35
  template_id: String,
36
+ idempotency_key: String,
37
+ x_idempotency_expiration: String,
21
38
  request_options: Courier::RequestOptions
22
39
  }
23
40
  end
@@ -2,7 +2,12 @@ module Courier
2
2
  module Models
3
3
  module Journeys
4
4
  type template_create_params =
5
- { template_id: String } & Courier::Internal::Type::request_parameters
5
+ {
6
+ template_id: String,
7
+ idempotency_key: String,
8
+ x_idempotency_expiration: String
9
+ }
10
+ & Courier::Internal::Type::request_parameters
6
11
 
7
12
  class TemplateCreateParams < Courier::Models::JourneyTemplateCreateRequest
8
13
  extend Courier::Internal::Type::RequestParameters::Converter
@@ -12,13 +17,25 @@ module Courier
12
17
 
13
18
  def template_id=: (String _) -> String
14
19
 
20
+ def idempotency_key: -> String?
21
+
22
+ def idempotency_key=: (String _) -> String
23
+
24
+ def x_idempotency_expiration: -> String?
25
+
26
+ def x_idempotency_expiration=: (String _) -> String
27
+
15
28
  def initialize: (
16
29
  template_id: String,
30
+ ?idempotency_key: String,
31
+ ?x_idempotency_expiration: String,
17
32
  ?request_options: Courier::request_opts
18
33
  ) -> void
19
34
 
20
35
  def to_hash: -> {
21
36
  template_id: String,
37
+ idempotency_key: String,
38
+ x_idempotency_expiration: String,
22
39
  request_options: Courier::RequestOptions
23
40
  }
24
41
  end
@@ -2,7 +2,12 @@ module Courier
2
2
  module Models
3
3
  module Journeys
4
4
  type template_publish_params =
5
- { template_id: String, notification_id: String }
5
+ {
6
+ template_id: String,
7
+ notification_id: String,
8
+ idempotency_key: String,
9
+ x_idempotency_expiration: String
10
+ }
6
11
  & Courier::Internal::Type::request_parameters
7
12
 
8
13
  class TemplatePublishParams < Courier::Models::JourneyTemplatePublishRequest
@@ -17,15 +22,27 @@ module Courier
17
22
 
18
23
  def notification_id=: (String _) -> String
19
24
 
25
+ def idempotency_key: -> String?
26
+
27
+ def idempotency_key=: (String _) -> String
28
+
29
+ def x_idempotency_expiration: -> String?
30
+
31
+ def x_idempotency_expiration=: (String _) -> String
32
+
20
33
  def initialize: (
21
34
  template_id: String,
22
35
  notification_id: String,
36
+ ?idempotency_key: String,
37
+ ?x_idempotency_expiration: String,
23
38
  ?request_options: Courier::request_opts
24
39
  ) -> void
25
40
 
26
41
  def to_hash: -> {
27
42
  template_id: String,
28
43
  notification_id: String,
44
+ idempotency_key: String,
45
+ x_idempotency_expiration: String,
29
46
  request_options: Courier::RequestOptions
30
47
  }
31
48
  end
@@ -4,7 +4,9 @@ module Courier
4
4
  type subscription_add_params =
5
5
  {
6
6
  list_id: String,
7
- recipients: ::Array[Courier::PutSubscriptionsRecipient]
7
+ recipients: ::Array[Courier::PutSubscriptionsRecipient],
8
+ idempotency_key: String,
9
+ x_idempotency_expiration: String
8
10
  }
9
11
  & Courier::Internal::Type::request_parameters
10
12
 
@@ -16,15 +18,27 @@ module Courier
16
18
 
17
19
  attr_accessor recipients: ::Array[Courier::PutSubscriptionsRecipient]
18
20
 
21
+ attr_reader idempotency_key: String?
22
+
23
+ def idempotency_key=: (String) -> String
24
+
25
+ attr_reader x_idempotency_expiration: String?
26
+
27
+ def x_idempotency_expiration=: (String) -> String
28
+
19
29
  def initialize: (
20
30
  list_id: String,
21
31
  recipients: ::Array[Courier::PutSubscriptionsRecipient],
32
+ ?idempotency_key: String,
33
+ ?x_idempotency_expiration: String,
22
34
  ?request_options: Courier::request_opts
23
35
  ) -> void
24
36
 
25
37
  def to_hash: -> {
26
38
  list_id: String,
27
39
  recipients: ::Array[Courier::PutSubscriptionsRecipient],
40
+ idempotency_key: String,
41
+ x_idempotency_expiration: String,
28
42
  request_options: Courier::RequestOptions
29
43
  }
30
44
  end
@@ -1,15 +1,32 @@
1
1
  module Courier
2
2
  module Models
3
3
  type notification_create_params =
4
- { } & Courier::Internal::Type::request_parameters
4
+ { idempotency_key: String, x_idempotency_expiration: String }
5
+ & Courier::Internal::Type::request_parameters
5
6
 
6
7
  class NotificationCreateParams < Courier::Models::NotificationTemplateCreateRequest
7
8
  extend Courier::Internal::Type::RequestParameters::Converter
8
9
  include Courier::Internal::Type::RequestParameters
9
10
 
10
- def initialize: (?request_options: Courier::request_opts) -> void
11
+ def idempotency_key: -> String?
11
12
 
12
- def to_hash: -> { request_options: Courier::RequestOptions }
13
+ def idempotency_key=: (String _) -> String
14
+
15
+ def x_idempotency_expiration: -> String?
16
+
17
+ def x_idempotency_expiration=: (String _) -> String
18
+
19
+ def initialize: (
20
+ ?idempotency_key: String,
21
+ ?x_idempotency_expiration: String,
22
+ ?request_options: Courier::request_opts
23
+ ) -> void
24
+
25
+ def to_hash: -> {
26
+ idempotency_key: String,
27
+ x_idempotency_expiration: String,
28
+ request_options: Courier::RequestOptions
29
+ }
13
30
  end
14
31
  end
15
32
  end
@@ -1,7 +1,8 @@
1
1
  module Courier
2
2
  module Models
3
3
  type notification_publish_params =
4
- { id: String } & Courier::Internal::Type::request_parameters
4
+ { id: String, idempotency_key: String, x_idempotency_expiration: String }
5
+ & Courier::Internal::Type::request_parameters
5
6
 
6
7
  class NotificationPublishParams < Courier::Models::NotificationTemplatePublishRequest
7
8
  extend Courier::Internal::Type::RequestParameters::Converter
@@ -11,12 +12,27 @@ module Courier
11
12
 
12
13
  def id=: (String _) -> String
13
14
 
15
+ def idempotency_key: -> String?
16
+
17
+ def idempotency_key=: (String _) -> String
18
+
19
+ def x_idempotency_expiration: -> String?
20
+
21
+ def x_idempotency_expiration=: (String _) -> String
22
+
14
23
  def initialize: (
15
24
  id: String,
25
+ ?idempotency_key: String,
26
+ ?x_idempotency_expiration: String,
16
27
  ?request_options: Courier::request_opts
17
28
  ) -> void
18
29
 
19
- def to_hash: -> { id: String, request_options: Courier::RequestOptions }
30
+ def to_hash: -> {
31
+ id: String,
32
+ idempotency_key: String,
33
+ x_idempotency_expiration: String,
34
+ request_options: Courier::RequestOptions
35
+ }
20
36
  end
21
37
  end
22
38
  end