trycourier 4.21.0 → 4.22.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 (174) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/lib/courier/client.rb +39 -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/inbox/message_delete_params.rb +22 -0
  8. data/lib/courier/models/inbox/message_restore_params.rb +22 -0
  9. data/lib/courier/models/journey_cancel_params.rb +13 -1
  10. data/lib/courier/models/journey_create_params.rb +13 -1
  11. data/lib/courier/models/journey_invoke_params.rb +13 -1
  12. data/lib/courier/models/journey_publish_params.rb +13 -1
  13. data/lib/courier/models/journeys/template_create_params.rb +13 -1
  14. data/lib/courier/models/journeys/template_publish_params.rb +13 -1
  15. data/lib/courier/models/lists/subscription_add_params.rb +13 -1
  16. data/lib/courier/models/notification_create_params.rb +13 -1
  17. data/lib/courier/models/notification_publish_params.rb +13 -1
  18. data/lib/courier/models/profile_create_params.rb +13 -1
  19. data/lib/courier/models/profiles/list_subscribe_params.rb +13 -1
  20. data/lib/courier/models/provider_create_params.rb +15 -1
  21. data/lib/courier/models/routing_strategy_create_params.rb +13 -1
  22. data/lib/courier/models/send_message_params.rb +15 -1
  23. data/lib/courier/models/users/preference_bulk_update_params.rb +15 -1
  24. data/lib/courier/models/users/preference_update_or_create_topic_params.rb +14 -4
  25. data/lib/courier/models/users/topic_preference.rb +21 -7
  26. data/lib/courier/models/workspace_preference_create_params.rb +13 -1
  27. data/lib/courier/models/workspace_preference_publish_params.rb +13 -1
  28. data/lib/courier/models/workspace_preferences/topic_create_params.rb +13 -1
  29. data/lib/courier/models.rb +2 -0
  30. data/lib/courier/resources/audiences.rb +12 -5
  31. data/lib/courier/resources/audit_events.rb +5 -2
  32. data/lib/courier/resources/auth.rb +5 -1
  33. data/lib/courier/resources/automations/invoke.rb +47 -23
  34. data/lib/courier/resources/automations.rb +6 -1
  35. data/lib/courier/resources/brands.rb +38 -12
  36. data/lib/courier/resources/digests/schedules.rb +4 -3
  37. data/lib/courier/resources/digests.rb +2 -0
  38. data/lib/courier/resources/inbound.rb +3 -1
  39. data/lib/courier/resources/inbox/messages.rb +58 -0
  40. data/lib/courier/resources/inbox.rb +19 -0
  41. data/lib/courier/resources/journeys/templates.rb +43 -25
  42. data/lib/courier/resources/journeys.rb +73 -44
  43. data/lib/courier/resources/lists/subscriptions.rb +22 -8
  44. data/lib/courier/resources/lists.rb +14 -5
  45. data/lib/courier/resources/messages.rb +14 -14
  46. data/lib/courier/resources/notifications/checks.rb +8 -3
  47. data/lib/courier/resources/notifications.rb +48 -30
  48. data/lib/courier/resources/profiles/lists.rb +19 -8
  49. data/lib/courier/resources/profiles.rb +25 -14
  50. data/lib/courier/resources/providers/catalog.rb +4 -4
  51. data/lib/courier/resources/providers.rb +27 -18
  52. data/lib/courier/resources/requests.rb +4 -1
  53. data/lib/courier/resources/routing_strategies.rb +24 -12
  54. data/lib/courier/resources/send.rb +14 -4
  55. data/lib/courier/resources/tenants/preferences/items.rb +6 -2
  56. data/lib/courier/resources/tenants/preferences.rb +2 -0
  57. data/lib/courier/resources/tenants/templates/versions.rb +4 -7
  58. data/lib/courier/resources/tenants/templates.rb +14 -19
  59. data/lib/courier/resources/tenants.rb +14 -5
  60. data/lib/courier/resources/translations.rb +6 -2
  61. data/lib/courier/resources/users/preferences.rb +23 -42
  62. data/lib/courier/resources/users/tenants.rb +12 -10
  63. data/lib/courier/resources/users/tokens.rb +14 -6
  64. data/lib/courier/resources/users.rb +6 -0
  65. data/lib/courier/resources/workspace_preferences/topics.rb +27 -19
  66. data/lib/courier/resources/workspace_preferences.rb +40 -20
  67. data/lib/courier/version.rb +1 -1
  68. data/lib/courier.rb +4 -0
  69. data/rbi/courier/client.rbi +38 -0
  70. data/rbi/courier/models/automations/invoke_invoke_ad_hoc_params.rbi +18 -0
  71. data/rbi/courier/models/automations/invoke_invoke_by_template_params.rbi +18 -0
  72. data/rbi/courier/models/brand_create_params.rbi +18 -0
  73. data/rbi/courier/models/inbox/message_delete_params.rbi +40 -0
  74. data/rbi/courier/models/inbox/message_restore_params.rbi +40 -0
  75. data/rbi/courier/models/journey_cancel_params.rbi +31 -5
  76. data/rbi/courier/models/journey_create_params.rbi +31 -5
  77. data/rbi/courier/models/journey_invoke_params.rbi +26 -2
  78. data/rbi/courier/models/journey_publish_params.rbi +26 -2
  79. data/rbi/courier/models/journeys/template_create_params.rbi +26 -2
  80. data/rbi/courier/models/journeys/template_publish_params.rbi +23 -1
  81. data/rbi/courier/models/lists/subscription_add_params.rbi +23 -1
  82. data/rbi/courier/models/notification_create_params.rbi +31 -5
  83. data/rbi/courier/models/notification_publish_params.rbi +26 -2
  84. data/rbi/courier/models/profile_create_params.rbi +23 -1
  85. data/rbi/courier/models/profiles/list_subscribe_params.rbi +23 -1
  86. data/rbi/courier/models/provider_create_params.rbi +18 -0
  87. data/rbi/courier/models/routing_strategy_create_params.rbi +31 -5
  88. data/rbi/courier/models/send_message_params.rbi +18 -0
  89. data/rbi/courier/models/users/preference_bulk_update_params.rbi +18 -0
  90. data/rbi/courier/models/users/preference_update_or_create_topic_params.rbi +14 -2
  91. data/rbi/courier/models/users/topic_preference.rbi +24 -2
  92. data/rbi/courier/models/workspace_preference_create_params.rbi +31 -5
  93. data/rbi/courier/models/workspace_preference_publish_params.rbi +31 -5
  94. data/rbi/courier/models/workspace_preferences/topic_create_params.rbi +26 -2
  95. data/rbi/courier/models.rbi +2 -0
  96. data/rbi/courier/resources/audiences.rbi +12 -5
  97. data/rbi/courier/resources/audit_events.rbi +5 -2
  98. data/rbi/courier/resources/auth.rbi +5 -1
  99. data/rbi/courier/resources/automations/invoke.rbi +48 -7
  100. data/rbi/courier/resources/automations.rbi +6 -1
  101. data/rbi/courier/resources/brands.rbi +37 -7
  102. data/rbi/courier/resources/digests/schedules.rbi +4 -3
  103. data/rbi/courier/resources/digests.rbi +2 -0
  104. data/rbi/courier/resources/inbound.rbi +3 -1
  105. data/rbi/courier/resources/inbox/messages.rbi +44 -0
  106. data/rbi/courier/resources/inbox.rbi +16 -0
  107. data/rbi/courier/resources/journeys/templates.rbi +47 -17
  108. data/rbi/courier/resources/journeys.rbi +93 -39
  109. data/rbi/courier/resources/lists/subscriptions.rbi +24 -5
  110. data/rbi/courier/resources/lists.rbi +14 -5
  111. data/rbi/courier/resources/messages.rbi +14 -14
  112. data/rbi/courier/resources/notifications/checks.rbi +8 -3
  113. data/rbi/courier/resources/notifications.rbi +58 -28
  114. data/rbi/courier/resources/profiles/lists.rbi +25 -6
  115. data/rbi/courier/resources/profiles.rbi +31 -11
  116. data/rbi/courier/resources/providers/catalog.rbi +4 -4
  117. data/rbi/courier/resources/providers.rbi +35 -19
  118. data/rbi/courier/resources/requests.rbi +4 -1
  119. data/rbi/courier/resources/routing_strategies.rbi +26 -10
  120. data/rbi/courier/resources/send.rbi +20 -3
  121. data/rbi/courier/resources/tenants/preferences/items.rbi +6 -2
  122. data/rbi/courier/resources/tenants/preferences.rbi +2 -0
  123. data/rbi/courier/resources/tenants/templates/versions.rbi +4 -7
  124. data/rbi/courier/resources/tenants/templates.rbi +14 -19
  125. data/rbi/courier/resources/tenants.rbi +14 -5
  126. data/rbi/courier/resources/translations.rbi +6 -2
  127. data/rbi/courier/resources/users/preferences.rbi +28 -40
  128. data/rbi/courier/resources/users/tenants.rbi +12 -10
  129. data/rbi/courier/resources/users/tokens.rbi +14 -6
  130. data/rbi/courier/resources/users.rbi +6 -0
  131. data/rbi/courier/resources/workspace_preferences/topics.rbi +37 -18
  132. data/rbi/courier/resources/workspace_preferences.rbi +51 -17
  133. data/sig/courier/client.rbs +2 -0
  134. data/sig/courier/models/automations/invoke_invoke_ad_hoc_params.rbs +15 -1
  135. data/sig/courier/models/automations/invoke_invoke_by_template_params.rbs +15 -1
  136. data/sig/courier/models/brand_create_params.rbs +15 -1
  137. data/sig/courier/models/inbox/message_delete_params.rbs +25 -0
  138. data/sig/courier/models/inbox/message_restore_params.rbs +25 -0
  139. data/sig/courier/models/journey_cancel_params.rbs +20 -3
  140. data/sig/courier/models/journey_create_params.rbs +20 -3
  141. data/sig/courier/models/journey_invoke_params.rbs +18 -1
  142. data/sig/courier/models/journey_publish_params.rbs +18 -1
  143. data/sig/courier/models/journeys/template_create_params.rbs +18 -1
  144. data/sig/courier/models/journeys/template_publish_params.rbs +18 -1
  145. data/sig/courier/models/lists/subscription_add_params.rbs +15 -1
  146. data/sig/courier/models/notification_create_params.rbs +20 -3
  147. data/sig/courier/models/notification_publish_params.rbs +18 -2
  148. data/sig/courier/models/profile_create_params.rbs +18 -1
  149. data/sig/courier/models/profiles/list_subscribe_params.rbs +15 -1
  150. data/sig/courier/models/provider_create_params.rbs +15 -1
  151. data/sig/courier/models/routing_strategy_create_params.rbs +20 -3
  152. data/sig/courier/models/send_message_params.rbs +17 -1
  153. data/sig/courier/models/users/preference_bulk_update_params.rbs +15 -1
  154. data/sig/courier/models/workspace_preference_create_params.rbs +20 -3
  155. data/sig/courier/models/workspace_preference_publish_params.rbs +20 -3
  156. data/sig/courier/models/workspace_preferences/topic_create_params.rbs +18 -1
  157. data/sig/courier/models.rbs +2 -0
  158. data/sig/courier/resources/automations/invoke.rbs +4 -0
  159. data/sig/courier/resources/brands.rbs +2 -0
  160. data/sig/courier/resources/inbox/messages.rbs +19 -0
  161. data/sig/courier/resources/inbox.rbs +9 -0
  162. data/sig/courier/resources/journeys/templates.rbs +4 -0
  163. data/sig/courier/resources/journeys.rbs +8 -0
  164. data/sig/courier/resources/lists/subscriptions.rbs +2 -0
  165. data/sig/courier/resources/notifications.rbs +4 -0
  166. data/sig/courier/resources/profiles/lists.rbs +2 -0
  167. data/sig/courier/resources/profiles.rbs +2 -0
  168. data/sig/courier/resources/providers.rbs +2 -0
  169. data/sig/courier/resources/routing_strategies.rbs +2 -0
  170. data/sig/courier/resources/send.rbs +2 -0
  171. data/sig/courier/resources/users/preferences.rbs +2 -0
  172. data/sig/courier/resources/workspace_preferences/topics.rbs +2 -0
  173. data/sig/courier/resources/workspace_preferences.rbs +4 -0
  174. metadata +14 -2
@@ -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
@@ -1,7 +1,12 @@
1
1
  module Courier
2
2
  module Models
3
3
  type profile_create_params =
4
- { user_id: String, profile: ::Hash[Symbol, top] }
4
+ {
5
+ user_id: String,
6
+ profile: ::Hash[Symbol, top],
7
+ idempotency_key: String,
8
+ x_idempotency_expiration: String
9
+ }
5
10
  & Courier::Internal::Type::request_parameters
6
11
 
7
12
  class ProfileCreateParams < Courier::Internal::Type::BaseModel
@@ -12,15 +17,27 @@ module Courier
12
17
 
13
18
  attr_accessor profile: ::Hash[Symbol, top]
14
19
 
20
+ attr_reader idempotency_key: String?
21
+
22
+ def idempotency_key=: (String) -> String
23
+
24
+ attr_reader x_idempotency_expiration: String?
25
+
26
+ def x_idempotency_expiration=: (String) -> String
27
+
15
28
  def initialize: (
16
29
  user_id: String,
17
30
  profile: ::Hash[Symbol, top],
31
+ ?idempotency_key: String,
32
+ ?x_idempotency_expiration: String,
18
33
  ?request_options: Courier::request_opts
19
34
  ) -> void
20
35
 
21
36
  def to_hash: -> {
22
37
  user_id: String,
23
38
  profile: ::Hash[Symbol, top],
39
+ idempotency_key: String,
40
+ x_idempotency_expiration: String,
24
41
  request_options: Courier::RequestOptions
25
42
  }
26
43
  end
@@ -4,7 +4,9 @@ module Courier
4
4
  type list_subscribe_params =
5
5
  {
6
6
  user_id: String,
7
- lists: ::Array[Courier::SubscribeToListsRequestItem]
7
+ lists: ::Array[Courier::SubscribeToListsRequestItem],
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 lists: ::Array[Courier::SubscribeToListsRequestItem]
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
  user_id: String,
21
31
  lists: ::Array[Courier::SubscribeToListsRequestItem],
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
  user_id: String,
27
39
  lists: ::Array[Courier::SubscribeToListsRequestItem],
40
+ idempotency_key: String,
41
+ x_idempotency_expiration: String,
28
42
  request_options: Courier::RequestOptions
29
43
  }
30
44
  end
@@ -5,7 +5,9 @@ module Courier
5
5
  provider: String,
6
6
  alias_: String,
7
7
  settings: ::Hash[Symbol, top],
8
- title: String
8
+ title: String,
9
+ idempotency_key: String,
10
+ x_idempotency_expiration: String
9
11
  }
10
12
  & Courier::Internal::Type::request_parameters
11
13
 
@@ -27,11 +29,21 @@ module Courier
27
29
 
28
30
  def title=: (String) -> String
29
31
 
32
+ attr_reader idempotency_key: String?
33
+
34
+ def idempotency_key=: (String) -> String
35
+
36
+ attr_reader x_idempotency_expiration: String?
37
+
38
+ def x_idempotency_expiration=: (String) -> String
39
+
30
40
  def initialize: (
31
41
  provider: String,
32
42
  ?alias_: String,
33
43
  ?settings: ::Hash[Symbol, top],
34
44
  ?title: String,
45
+ ?idempotency_key: String,
46
+ ?x_idempotency_expiration: String,
35
47
  ?request_options: Courier::request_opts
36
48
  ) -> void
37
49
 
@@ -40,6 +52,8 @@ module Courier
40
52
  alias_: String,
41
53
  settings: ::Hash[Symbol, top],
42
54
  title: String,
55
+ idempotency_key: String,
56
+ x_idempotency_expiration: String,
43
57
  request_options: Courier::RequestOptions
44
58
  }
45
59
  end
@@ -1,15 +1,32 @@
1
1
  module Courier
2
2
  module Models
3
3
  type routing_strategy_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 RoutingStrategyCreateParams < Courier::Models::RoutingStrategyCreateRequest
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,11 @@
1
1
  module Courier
2
2
  module Models
3
3
  type send_message_params =
4
- { message: Courier::SendMessageParams::Message }
4
+ {
5
+ message: Courier::SendMessageParams::Message,
6
+ idempotency_key: String,
7
+ x_idempotency_expiration: String
8
+ }
5
9
  & Courier::Internal::Type::request_parameters
6
10
 
7
11
  class SendMessageParams < Courier::Internal::Type::BaseModel
@@ -10,13 +14,25 @@ module Courier
10
14
 
11
15
  attr_accessor message: Courier::SendMessageParams::Message
12
16
 
17
+ attr_reader idempotency_key: String?
18
+
19
+ def idempotency_key=: (String) -> String
20
+
21
+ attr_reader x_idempotency_expiration: String?
22
+
23
+ def x_idempotency_expiration=: (String) -> String
24
+
13
25
  def initialize: (
14
26
  message: Courier::SendMessageParams::Message,
27
+ ?idempotency_key: String,
28
+ ?x_idempotency_expiration: String,
15
29
  ?request_options: Courier::request_opts
16
30
  ) -> void
17
31
 
18
32
  def to_hash: -> {
19
33
  message: Courier::SendMessageParams::Message,
34
+ idempotency_key: String,
35
+ x_idempotency_expiration: String,
20
36
  request_options: Courier::RequestOptions
21
37
  }
22
38
 
@@ -5,7 +5,9 @@ module Courier
5
5
  {
6
6
  user_id: String,
7
7
  topics: ::Array[Courier::Users::PreferenceBulkUpdateParams::Topic],
8
- tenant_id: String?
8
+ tenant_id: String?,
9
+ idempotency_key: String,
10
+ x_idempotency_expiration: String
9
11
  }
10
12
  & Courier::Internal::Type::request_parameters
11
13
 
@@ -19,10 +21,20 @@ module Courier
19
21
 
20
22
  attr_accessor tenant_id: String?
21
23
 
24
+ attr_reader idempotency_key: String?
25
+
26
+ def idempotency_key=: (String) -> String
27
+
28
+ attr_reader x_idempotency_expiration: String?
29
+
30
+ def x_idempotency_expiration=: (String) -> String
31
+
22
32
  def initialize: (
23
33
  user_id: String,
24
34
  topics: ::Array[Courier::Users::PreferenceBulkUpdateParams::Topic],
25
35
  ?tenant_id: String?,
36
+ ?idempotency_key: String,
37
+ ?x_idempotency_expiration: String,
26
38
  ?request_options: Courier::request_opts
27
39
  ) -> void
28
40
 
@@ -30,6 +42,8 @@ module Courier
30
42
  user_id: String,
31
43
  topics: ::Array[Courier::Users::PreferenceBulkUpdateParams::Topic],
32
44
  tenant_id: String?,
45
+ idempotency_key: String,
46
+ x_idempotency_expiration: String,
33
47
  request_options: Courier::RequestOptions
34
48
  }
35
49
 
@@ -1,15 +1,32 @@
1
1
  module Courier
2
2
  module Models
3
3
  type workspace_preference_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 WorkspacePreferenceCreateParams < Courier::Models::WorkspacePreferenceCreateRequest
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