trycourier 4.10.1 → 4.11.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 (168) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +30 -0
  3. data/lib/courier/client.rb +15 -1
  4. data/lib/courier/internal/transport/base_client.rb +2 -0
  5. data/lib/courier/models/create_journey_request.rb +39 -0
  6. data/lib/courier/models/journey_ai_node.rb +77 -0
  7. data/lib/courier/models/journey_api_invoke_trigger_node.rb +73 -0
  8. data/lib/courier/models/journey_archive_params.rb +20 -0
  9. data/lib/courier/models/journey_condition_atom.rb +8 -0
  10. data/lib/courier/models/journey_condition_group.rb +26 -0
  11. data/lib/courier/models/journey_condition_nested_group.rb +24 -0
  12. data/lib/courier/models/journey_conditions_field.rb +37 -0
  13. data/lib/courier/models/journey_create_params.rb +14 -0
  14. data/lib/courier/models/journey_delay_duration_node.rb +71 -0
  15. data/lib/courier/models/journey_delay_until_node.rb +71 -0
  16. data/lib/courier/models/journey_exit_node.rb +33 -0
  17. data/lib/courier/models/journey_fetch_get_delete_node.rb +103 -0
  18. data/lib/courier/models/journey_fetch_post_put_node.rb +110 -0
  19. data/lib/courier/models/journey_list_versions_params.rb +20 -0
  20. data/lib/courier/models/journey_merge_strategy.rb +18 -0
  21. data/lib/courier/models/journey_node.rb +139 -0
  22. data/lib/courier/models/journey_publish_params.rb +20 -0
  23. data/lib/courier/models/journey_publish_request.rb +18 -0
  24. data/lib/courier/models/journey_replace_params.rb +20 -0
  25. data/lib/courier/models/journey_response.rb +82 -0
  26. data/lib/courier/models/journey_retrieve_params.rb +29 -0
  27. data/lib/courier/models/journey_segment_trigger_node.rb +90 -0
  28. data/lib/courier/models/journey_send_node.rb +124 -0
  29. data/lib/courier/models/journey_state.rb +16 -0
  30. data/lib/courier/models/journey_template_create_request.rb +138 -0
  31. data/lib/courier/models/journey_template_get_response.rb +154 -0
  32. data/lib/courier/models/journey_template_list_response.rb +23 -0
  33. data/lib/courier/models/journey_template_publish_request.rb +18 -0
  34. data/lib/courier/models/journey_template_replace_request.rb +126 -0
  35. data/lib/courier/models/journey_template_summary.rb +60 -0
  36. data/lib/courier/models/journey_throttle_dynamic_node.rb +86 -0
  37. data/lib/courier/models/journey_throttle_static_node.rb +80 -0
  38. data/lib/courier/models/journey_version_item.rb +41 -0
  39. data/lib/courier/models/journey_versions_list_response.rb +24 -0
  40. data/lib/courier/models/journeys/template_archive_params.rb +28 -0
  41. data/lib/courier/models/journeys/template_create_params.rb +22 -0
  42. data/lib/courier/models/journeys/template_list_params.rb +39 -0
  43. data/lib/courier/models/journeys/template_list_versions_params.rb +28 -0
  44. data/lib/courier/models/journeys/template_publish_params.rb +28 -0
  45. data/lib/courier/models/journeys/template_replace_params.rb +28 -0
  46. data/lib/courier/models/journeys/template_retrieve_params.rb +28 -0
  47. data/lib/courier/models/notification_list_response.rb +8 -8
  48. data/lib/courier/models/notification_template_create_request.rb +3 -3
  49. data/lib/courier/models/notification_template_payload.rb +2 -2
  50. data/lib/courier/models/notification_template_response.rb +71 -0
  51. data/lib/courier/models/notification_template_update_request.rb +3 -3
  52. data/lib/courier/models/tenants/template_delete_params.rb +28 -0
  53. data/lib/courier/models.rb +75 -2
  54. data/lib/courier/resources/journeys/templates.rb +224 -0
  55. data/lib/courier/resources/journeys.rb +167 -2
  56. data/lib/courier/resources/notifications/checks.rb +16 -6
  57. data/lib/courier/resources/notifications.rb +8 -8
  58. data/lib/courier/resources/tenants/templates.rb +32 -0
  59. data/lib/courier/version.rb +1 -1
  60. data/lib/courier.rb +45 -1
  61. data/rbi/courier/models/create_journey_request.rbi +113 -0
  62. data/rbi/courier/models/journey_ai_node.rbi +141 -0
  63. data/rbi/courier/models/journey_api_invoke_trigger_node.rbi +164 -0
  64. data/rbi/courier/models/journey_archive_params.rbi +35 -0
  65. data/rbi/courier/models/journey_condition_atom.rbi +11 -0
  66. data/rbi/courier/models/journey_condition_group.rbi +43 -0
  67. data/rbi/courier/models/journey_condition_nested_group.rbi +51 -0
  68. data/rbi/courier/models/journey_conditions_field.rbi +27 -0
  69. data/rbi/courier/models/journey_create_params.rbi +27 -0
  70. data/rbi/courier/models/journey_delay_duration_node.rbi +146 -0
  71. data/rbi/courier/models/journey_delay_until_node.rbi +139 -0
  72. data/rbi/courier/models/journey_exit_node.rbi +57 -0
  73. data/rbi/courier/models/journey_fetch_get_delete_node.rbi +186 -0
  74. data/rbi/courier/models/journey_fetch_post_put_node.rbi +190 -0
  75. data/rbi/courier/models/journey_list_versions_params.rbi +35 -0
  76. data/rbi/courier/models/journey_merge_strategy.rbi +26 -0
  77. data/rbi/courier/models/journey_node.rbi +227 -0
  78. data/rbi/courier/models/journey_publish_params.rbi +35 -0
  79. data/rbi/courier/models/journey_publish_request.rbi +28 -0
  80. data/rbi/courier/models/journey_replace_params.rbi +35 -0
  81. data/rbi/courier/models/journey_response.rbi +108 -0
  82. data/rbi/courier/models/journey_retrieve_params.rbi +52 -0
  83. data/rbi/courier/models/journey_segment_trigger_node.rbi +200 -0
  84. data/rbi/courier/models/journey_send_node.rbi +254 -0
  85. data/rbi/courier/models/journey_state.rbi +20 -0
  86. data/rbi/courier/models/journey_template_create_request.rbi +381 -0
  87. data/rbi/courier/models/journey_template_get_response.rbi +334 -0
  88. data/rbi/courier/models/journey_template_list_response.rbi +45 -0
  89. data/rbi/courier/models/journey_template_publish_request.rbi +31 -0
  90. data/rbi/courier/models/journey_template_replace_request.rbi +368 -0
  91. data/rbi/courier/models/journey_template_summary.rbi +85 -0
  92. data/rbi/courier/models/journey_throttle_dynamic_node.rbi +162 -0
  93. data/rbi/courier/models/journey_throttle_static_node.rbi +158 -0
  94. data/rbi/courier/models/journey_version_item.rbi +54 -0
  95. data/rbi/courier/models/journey_versions_list_response.rbi +45 -0
  96. data/rbi/courier/models/journeys/template_archive_params.rbi +48 -0
  97. data/rbi/courier/models/journeys/template_create_params.rbi +40 -0
  98. data/rbi/courier/models/journeys/template_list_params.rbi +68 -0
  99. data/rbi/courier/models/journeys/template_list_versions_params.rbi +48 -0
  100. data/rbi/courier/models/journeys/template_publish_params.rbi +48 -0
  101. data/rbi/courier/models/journeys/template_replace_params.rbi +48 -0
  102. data/rbi/courier/models/journeys/template_retrieve_params.rbi +48 -0
  103. data/rbi/courier/models/notification_list_response.rbi +9 -6
  104. data/rbi/courier/models/notification_template_create_request.rbi +4 -4
  105. data/rbi/courier/models/notification_template_payload.rbi +2 -2
  106. data/rbi/courier/models/notification_template_response.rbi +120 -0
  107. data/rbi/courier/models/notification_template_update_request.rbi +4 -4
  108. data/rbi/courier/models/tenants/template_delete_params.rbi +48 -0
  109. data/rbi/courier/models.rbi +78 -3
  110. data/rbi/courier/resources/journeys/templates.rbi +160 -0
  111. data/rbi/courier/resources/journeys.rbi +156 -3
  112. data/rbi/courier/resources/notifications/checks.rbi +19 -4
  113. data/rbi/courier/resources/notifications.rbi +7 -7
  114. data/rbi/courier/resources/tenants/templates.rbi +22 -0
  115. data/sig/courier/models/create_journey_request.rbs +41 -0
  116. data/sig/courier/models/journey_ai_node.rbs +72 -0
  117. data/sig/courier/models/journey_api_invoke_trigger_node.rbs +68 -0
  118. data/sig/courier/models/journey_archive_params.rbs +23 -0
  119. data/sig/courier/models/journey_condition_atom.rbs +7 -0
  120. data/sig/courier/models/journey_condition_group.rbs +33 -0
  121. data/sig/courier/models/journey_condition_nested_group.rbs +33 -0
  122. data/sig/courier/models/journey_conditions_field.rbs +14 -0
  123. data/sig/courier/models/journey_create_params.rbs +15 -0
  124. data/sig/courier/models/journey_delay_duration_node.rbs +66 -0
  125. data/sig/courier/models/journey_delay_until_node.rbs +66 -0
  126. data/sig/courier/models/journey_exit_node.rbs +34 -0
  127. data/sig/courier/models/journey_fetch_get_delete_node.rbs +93 -0
  128. data/sig/courier/models/journey_fetch_post_put_node.rbs +100 -0
  129. data/sig/courier/models/journey_list_versions_params.rbs +23 -0
  130. data/sig/courier/models/journey_merge_strategy.rbs +16 -0
  131. data/sig/courier/models/journey_node.rbs +117 -0
  132. data/sig/courier/models/journey_publish_params.rbs +25 -0
  133. data/sig/courier/models/journey_publish_request.rbs +15 -0
  134. data/sig/courier/models/journey_replace_params.rbs +25 -0
  135. data/sig/courier/models/journey_response.rbs +65 -0
  136. data/sig/courier/models/journey_retrieve_params.rbs +30 -0
  137. data/sig/courier/models/journey_segment_trigger_node.rbs +85 -0
  138. data/sig/courier/models/journey_send_node.rbs +140 -0
  139. data/sig/courier/models/journey_state.rbs +14 -0
  140. data/sig/courier/models/journey_template_create_request.rbs +148 -0
  141. data/sig/courier/models/journey_template_get_response.rbs +157 -0
  142. data/sig/courier/models/journey_template_list_response.rbs +25 -0
  143. data/sig/courier/models/journey_template_publish_request.rbs +15 -0
  144. data/sig/courier/models/journey_template_replace_request.rbs +136 -0
  145. data/sig/courier/models/journey_template_summary.rbs +59 -0
  146. data/sig/courier/models/journey_throttle_dynamic_node.rbs +76 -0
  147. data/sig/courier/models/journey_throttle_static_node.rbs +72 -0
  148. data/sig/courier/models/journey_version_item.rbs +40 -0
  149. data/sig/courier/models/journey_versions_list_response.rbs +22 -0
  150. data/sig/courier/models/journeys/template_archive_params.rbs +30 -0
  151. data/sig/courier/models/journeys/template_create_params.rbs +27 -0
  152. data/sig/courier/models/journeys/template_list_params.rbs +38 -0
  153. data/sig/courier/models/journeys/template_list_versions_params.rbs +30 -0
  154. data/sig/courier/models/journeys/template_publish_params.rbs +34 -0
  155. data/sig/courier/models/journeys/template_replace_params.rbs +34 -0
  156. data/sig/courier/models/journeys/template_retrieve_params.rbs +30 -0
  157. data/sig/courier/models/notification_list_response.rbs +7 -5
  158. data/sig/courier/models/notification_template_response.rbs +70 -0
  159. data/sig/courier/models/tenants/template_delete_params.rbs +30 -0
  160. data/sig/courier/models.rbs +74 -2
  161. data/sig/courier/resources/journeys/templates.rbs +58 -0
  162. data/sig/courier/resources/journeys.rbs +41 -0
  163. data/sig/courier/resources/notifications.rbs +3 -3
  164. data/sig/courier/resources/tenants/templates.rbs +6 -0
  165. metadata +137 -5
  166. data/lib/courier/models/notification_template_get_response.rb +0 -92
  167. data/rbi/courier/models/notification_template_get_response.rbi +0 -162
  168. data/sig/courier/models/notification_template_get_response.rbs +0 -72
@@ -0,0 +1,76 @@
1
+ module Courier
2
+ module Models
3
+ type journey_throttle_dynamic_node =
4
+ {
5
+ max_allowed: Integer,
6
+ period: String,
7
+ scope: Courier::Models::JourneyThrottleDynamicNode::scope,
8
+ throttle_key: String,
9
+ type: Courier::Models::JourneyThrottleDynamicNode::type_,
10
+ id: String,
11
+ conditions: Courier::Models::journey_conditions_field
12
+ }
13
+
14
+ class JourneyThrottleDynamicNode < Courier::Internal::Type::BaseModel
15
+ attr_accessor max_allowed: Integer
16
+
17
+ attr_accessor period: String
18
+
19
+ attr_accessor scope: Courier::Models::JourneyThrottleDynamicNode::scope
20
+
21
+ attr_accessor throttle_key: String
22
+
23
+ attr_accessor type: Courier::Models::JourneyThrottleDynamicNode::type_
24
+
25
+ attr_reader id: String?
26
+
27
+ def id=: (String) -> String
28
+
29
+ attr_reader conditions: Courier::Models::journey_conditions_field?
30
+
31
+ def conditions=: (
32
+ Courier::Models::journey_conditions_field
33
+ ) -> Courier::Models::journey_conditions_field
34
+
35
+ def initialize: (
36
+ max_allowed: Integer,
37
+ period: String,
38
+ scope: Courier::Models::JourneyThrottleDynamicNode::scope,
39
+ throttle_key: String,
40
+ type: Courier::Models::JourneyThrottleDynamicNode::type_,
41
+ ?id: String,
42
+ ?conditions: Courier::Models::journey_conditions_field
43
+ ) -> void
44
+
45
+ def to_hash: -> {
46
+ max_allowed: Integer,
47
+ period: String,
48
+ scope: Courier::Models::JourneyThrottleDynamicNode::scope,
49
+ throttle_key: String,
50
+ type: Courier::Models::JourneyThrottleDynamicNode::type_,
51
+ id: String,
52
+ conditions: Courier::Models::journey_conditions_field
53
+ }
54
+
55
+ type scope = :dynamic
56
+
57
+ module Scope
58
+ extend Courier::Internal::Type::Enum
59
+
60
+ DYNAMIC: :dynamic
61
+
62
+ def self?.values: -> ::Array[Courier::Models::JourneyThrottleDynamicNode::scope]
63
+ end
64
+
65
+ type type_ = :throttle
66
+
67
+ module Type
68
+ extend Courier::Internal::Type::Enum
69
+
70
+ THROTTLE: :throttle
71
+
72
+ def self?.values: -> ::Array[Courier::Models::JourneyThrottleDynamicNode::type_]
73
+ end
74
+ end
75
+ end
76
+ end
@@ -0,0 +1,72 @@
1
+ module Courier
2
+ module Models
3
+ type journey_throttle_static_node =
4
+ {
5
+ max_allowed: Integer,
6
+ period: String,
7
+ scope: Courier::Models::JourneyThrottleStaticNode::scope,
8
+ type: Courier::Models::JourneyThrottleStaticNode::type_,
9
+ id: String,
10
+ conditions: Courier::Models::journey_conditions_field
11
+ }
12
+
13
+ class JourneyThrottleStaticNode < Courier::Internal::Type::BaseModel
14
+ attr_accessor max_allowed: Integer
15
+
16
+ attr_accessor period: String
17
+
18
+ attr_accessor scope: Courier::Models::JourneyThrottleStaticNode::scope
19
+
20
+ attr_accessor type: Courier::Models::JourneyThrottleStaticNode::type_
21
+
22
+ attr_reader id: String?
23
+
24
+ def id=: (String) -> String
25
+
26
+ attr_reader conditions: Courier::Models::journey_conditions_field?
27
+
28
+ def conditions=: (
29
+ Courier::Models::journey_conditions_field
30
+ ) -> Courier::Models::journey_conditions_field
31
+
32
+ def initialize: (
33
+ max_allowed: Integer,
34
+ period: String,
35
+ scope: Courier::Models::JourneyThrottleStaticNode::scope,
36
+ type: Courier::Models::JourneyThrottleStaticNode::type_,
37
+ ?id: String,
38
+ ?conditions: Courier::Models::journey_conditions_field
39
+ ) -> void
40
+
41
+ def to_hash: -> {
42
+ max_allowed: Integer,
43
+ period: String,
44
+ scope: Courier::Models::JourneyThrottleStaticNode::scope,
45
+ type: Courier::Models::JourneyThrottleStaticNode::type_,
46
+ id: String,
47
+ conditions: Courier::Models::journey_conditions_field
48
+ }
49
+
50
+ type scope = :user | :global
51
+
52
+ module Scope
53
+ extend Courier::Internal::Type::Enum
54
+
55
+ USER: :user
56
+ GLOBAL: :global
57
+
58
+ def self?.values: -> ::Array[Courier::Models::JourneyThrottleStaticNode::scope]
59
+ end
60
+
61
+ type type_ = :throttle
62
+
63
+ module Type
64
+ extend Courier::Internal::Type::Enum
65
+
66
+ THROTTLE: :throttle
67
+
68
+ def self?.values: -> ::Array[Courier::Models::JourneyThrottleStaticNode::type_]
69
+ end
70
+ end
71
+ end
72
+ end
@@ -0,0 +1,40 @@
1
+ module Courier
2
+ module Models
3
+ type journey_version_item =
4
+ {
5
+ created: Integer?,
6
+ creator: String?,
7
+ name: String,
8
+ published: Integer?,
9
+ version: String
10
+ }
11
+
12
+ class JourneyVersionItem < Courier::Internal::Type::BaseModel
13
+ attr_accessor created: Integer?
14
+
15
+ attr_accessor creator: String?
16
+
17
+ attr_accessor name: String
18
+
19
+ attr_accessor published: Integer?
20
+
21
+ attr_accessor version: String
22
+
23
+ def initialize: (
24
+ created: Integer?,
25
+ creator: String?,
26
+ name: String,
27
+ published: Integer?,
28
+ version: String
29
+ ) -> void
30
+
31
+ def to_hash: -> {
32
+ created: Integer?,
33
+ creator: String?,
34
+ name: String,
35
+ published: Integer?,
36
+ version: String
37
+ }
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,22 @@
1
+ module Courier
2
+ module Models
3
+ type journey_versions_list_response =
4
+ { paging: Courier::Paging, results: ::Array[Courier::JourneyVersionItem] }
5
+
6
+ class JourneyVersionsListResponse < Courier::Internal::Type::BaseModel
7
+ attr_accessor paging: Courier::Paging
8
+
9
+ attr_accessor results: ::Array[Courier::JourneyVersionItem]
10
+
11
+ def initialize: (
12
+ paging: Courier::Paging,
13
+ results: ::Array[Courier::JourneyVersionItem]
14
+ ) -> void
15
+
16
+ def to_hash: -> {
17
+ paging: Courier::Paging,
18
+ results: ::Array[Courier::JourneyVersionItem]
19
+ }
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,30 @@
1
+ module Courier
2
+ module Models
3
+ module Journeys
4
+ type template_archive_params =
5
+ { template_id: String, notification_id: String }
6
+ & Courier::Internal::Type::request_parameters
7
+
8
+ class TemplateArchiveParams < Courier::Internal::Type::BaseModel
9
+ extend Courier::Internal::Type::RequestParameters::Converter
10
+ include Courier::Internal::Type::RequestParameters
11
+
12
+ attr_accessor template_id: String
13
+
14
+ attr_accessor notification_id: String
15
+
16
+ def initialize: (
17
+ template_id: String,
18
+ notification_id: String,
19
+ ?request_options: Courier::request_opts
20
+ ) -> void
21
+
22
+ def to_hash: -> {
23
+ template_id: String,
24
+ notification_id: String,
25
+ request_options: Courier::RequestOptions
26
+ }
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,27 @@
1
+ module Courier
2
+ module Models
3
+ module Journeys
4
+ type template_create_params =
5
+ { template_id: String } & Courier::Internal::Type::request_parameters
6
+
7
+ class TemplateCreateParams < Courier::Models::JourneyTemplateCreateRequest
8
+ extend Courier::Internal::Type::RequestParameters::Converter
9
+ include Courier::Internal::Type::RequestParameters
10
+
11
+ def template_id: -> String
12
+
13
+ def template_id=: (String _) -> String
14
+
15
+ def initialize: (
16
+ template_id: String,
17
+ ?request_options: Courier::request_opts
18
+ ) -> void
19
+
20
+ def to_hash: -> {
21
+ template_id: String,
22
+ request_options: Courier::RequestOptions
23
+ }
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,38 @@
1
+ module Courier
2
+ module Models
3
+ module Journeys
4
+ type template_list_params =
5
+ { template_id: String, cursor: String, limit: Integer }
6
+ & Courier::Internal::Type::request_parameters
7
+
8
+ class TemplateListParams < Courier::Internal::Type::BaseModel
9
+ extend Courier::Internal::Type::RequestParameters::Converter
10
+ include Courier::Internal::Type::RequestParameters
11
+
12
+ attr_accessor template_id: String
13
+
14
+ attr_reader cursor: String?
15
+
16
+ def cursor=: (String) -> String
17
+
18
+ attr_reader limit: Integer?
19
+
20
+ def limit=: (Integer) -> Integer
21
+
22
+ def initialize: (
23
+ template_id: String,
24
+ ?cursor: String,
25
+ ?limit: Integer,
26
+ ?request_options: Courier::request_opts
27
+ ) -> void
28
+
29
+ def to_hash: -> {
30
+ template_id: String,
31
+ cursor: String,
32
+ limit: Integer,
33
+ request_options: Courier::RequestOptions
34
+ }
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,30 @@
1
+ module Courier
2
+ module Models
3
+ module Journeys
4
+ type template_list_versions_params =
5
+ { template_id: String, notification_id: String }
6
+ & Courier::Internal::Type::request_parameters
7
+
8
+ class TemplateListVersionsParams < Courier::Internal::Type::BaseModel
9
+ extend Courier::Internal::Type::RequestParameters::Converter
10
+ include Courier::Internal::Type::RequestParameters
11
+
12
+ attr_accessor template_id: String
13
+
14
+ attr_accessor notification_id: String
15
+
16
+ def initialize: (
17
+ template_id: String,
18
+ notification_id: String,
19
+ ?request_options: Courier::request_opts
20
+ ) -> void
21
+
22
+ def to_hash: -> {
23
+ template_id: String,
24
+ notification_id: String,
25
+ request_options: Courier::RequestOptions
26
+ }
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,34 @@
1
+ module Courier
2
+ module Models
3
+ module Journeys
4
+ type template_publish_params =
5
+ { template_id: String, notification_id: String }
6
+ & Courier::Internal::Type::request_parameters
7
+
8
+ class TemplatePublishParams < Courier::Models::JourneyTemplatePublishRequest
9
+ extend Courier::Internal::Type::RequestParameters::Converter
10
+ include Courier::Internal::Type::RequestParameters
11
+
12
+ def template_id: -> String
13
+
14
+ def template_id=: (String _) -> String
15
+
16
+ def notification_id: -> String
17
+
18
+ def notification_id=: (String _) -> String
19
+
20
+ def initialize: (
21
+ template_id: String,
22
+ notification_id: String,
23
+ ?request_options: Courier::request_opts
24
+ ) -> void
25
+
26
+ def to_hash: -> {
27
+ template_id: String,
28
+ notification_id: String,
29
+ request_options: Courier::RequestOptions
30
+ }
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,34 @@
1
+ module Courier
2
+ module Models
3
+ module Journeys
4
+ type template_replace_params =
5
+ { template_id: String, notification_id: String }
6
+ & Courier::Internal::Type::request_parameters
7
+
8
+ class TemplateReplaceParams < Courier::Models::JourneyTemplateReplaceRequest
9
+ extend Courier::Internal::Type::RequestParameters::Converter
10
+ include Courier::Internal::Type::RequestParameters
11
+
12
+ def template_id: -> String
13
+
14
+ def template_id=: (String _) -> String
15
+
16
+ def notification_id: -> String
17
+
18
+ def notification_id=: (String _) -> String
19
+
20
+ def initialize: (
21
+ template_id: String,
22
+ notification_id: String,
23
+ ?request_options: Courier::request_opts
24
+ ) -> void
25
+
26
+ def to_hash: -> {
27
+ template_id: String,
28
+ notification_id: String,
29
+ request_options: Courier::RequestOptions
30
+ }
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,30 @@
1
+ module Courier
2
+ module Models
3
+ module Journeys
4
+ type template_retrieve_params =
5
+ { template_id: String, notification_id: String }
6
+ & Courier::Internal::Type::request_parameters
7
+
8
+ class TemplateRetrieveParams < Courier::Internal::Type::BaseModel
9
+ extend Courier::Internal::Type::RequestParameters::Converter
10
+ include Courier::Internal::Type::RequestParameters
11
+
12
+ attr_accessor template_id: String
13
+
14
+ attr_accessor notification_id: String
15
+
16
+ def initialize: (
17
+ template_id: String,
18
+ notification_id: String,
19
+ ?request_options: Courier::request_opts
20
+ ) -> void
21
+
22
+ def to_hash: -> {
23
+ template_id: String,
24
+ notification_id: String,
25
+ request_options: Courier::RequestOptions
26
+ }
27
+ end
28
+ end
29
+ end
30
+ end
@@ -33,10 +33,10 @@ module Courier
33
33
  id: String,
34
34
  created_at: Integer,
35
35
  event_ids: ::Array[String],
36
- note: String,
37
36
  routing: Courier::MessageRouting,
38
37
  topic_id: String,
39
38
  updated_at: Integer,
39
+ note: String,
40
40
  tags: Courier::Models::NotificationListResponse::Result::Notification::Tags?,
41
41
  title: String?
42
42
  }
@@ -48,14 +48,16 @@ module Courier
48
48
 
49
49
  attr_accessor event_ids: ::Array[String]
50
50
 
51
- attr_accessor note: String
52
-
53
51
  attr_accessor routing: Courier::MessageRouting
54
52
 
55
53
  attr_accessor topic_id: String
56
54
 
57
55
  attr_accessor updated_at: Integer
58
56
 
57
+ attr_reader note: String?
58
+
59
+ def note=: (String) -> String
60
+
59
61
  attr_accessor tags: Courier::Models::NotificationListResponse::Result::Notification::Tags?
60
62
 
61
63
  attr_accessor title: String?
@@ -64,10 +66,10 @@ module Courier
64
66
  id: String,
65
67
  created_at: Integer,
66
68
  event_ids: ::Array[String],
67
- note: String,
68
69
  routing: Courier::MessageRouting,
69
70
  topic_id: String,
70
71
  updated_at: Integer,
72
+ ?note: String,
71
73
  ?tags: Courier::Models::NotificationListResponse::Result::Notification::Tags?,
72
74
  ?title: String?
73
75
  ) -> void
@@ -76,10 +78,10 @@ module Courier
76
78
  id: String,
77
79
  created_at: Integer,
78
80
  event_ids: ::Array[String],
79
- note: String,
80
81
  routing: Courier::MessageRouting,
81
82
  topic_id: String,
82
83
  updated_at: Integer,
84
+ note: String,
83
85
  tags: Courier::Models::NotificationListResponse::Result::Notification::Tags?,
84
86
  title: String?
85
87
  }
@@ -0,0 +1,70 @@
1
+ module Courier
2
+ module Models
3
+ type notification_template_response =
4
+ {
5
+ id: String,
6
+ created: Integer,
7
+ creator: String,
8
+ state: Courier::Models::NotificationTemplateResponse::state,
9
+ updated: Integer,
10
+ updater: String
11
+ }
12
+
13
+ class NotificationTemplateResponse < Courier::Models::NotificationTemplatePayload
14
+ def id: -> String
15
+
16
+ def id=: (String _) -> String
17
+
18
+ def created: -> Integer
19
+
20
+ def created=: (Integer _) -> Integer
21
+
22
+ def creator: -> String
23
+
24
+ def creator=: (String _) -> String
25
+
26
+ def state: -> Courier::Models::NotificationTemplateResponse::state
27
+
28
+ def state=: (
29
+ Courier::Models::NotificationTemplateResponse::state _
30
+ ) -> Courier::Models::NotificationTemplateResponse::state
31
+
32
+ def updated: -> Integer?
33
+
34
+ def updated=: (Integer _) -> Integer
35
+
36
+ def updater: -> String?
37
+
38
+ def updater=: (String _) -> String
39
+
40
+ def initialize: (
41
+ id: String,
42
+ created: Integer,
43
+ creator: String,
44
+ state: Courier::Models::NotificationTemplateResponse::state,
45
+ ?updated: Integer,
46
+ ?updater: String
47
+ ) -> void
48
+
49
+ def to_hash: -> {
50
+ id: String,
51
+ created: Integer,
52
+ creator: String,
53
+ state: Courier::Models::NotificationTemplateResponse::state,
54
+ updated: Integer,
55
+ updater: String
56
+ }
57
+
58
+ type state = :DRAFT | :PUBLISHED
59
+
60
+ module State
61
+ extend Courier::Internal::Type::Enum
62
+
63
+ DRAFT: :DRAFT
64
+ PUBLISHED: :PUBLISHED
65
+
66
+ def self?.values: -> ::Array[Courier::Models::NotificationTemplateResponse::state]
67
+ end
68
+ end
69
+ end
70
+ end
@@ -0,0 +1,30 @@
1
+ module Courier
2
+ module Models
3
+ module Tenants
4
+ type template_delete_params =
5
+ { tenant_id: String, template_id: String }
6
+ & Courier::Internal::Type::request_parameters
7
+
8
+ class TemplateDeleteParams < Courier::Internal::Type::BaseModel
9
+ extend Courier::Internal::Type::RequestParameters::Converter
10
+ include Courier::Internal::Type::RequestParameters
11
+
12
+ attr_accessor tenant_id: String
13
+
14
+ attr_accessor template_id: String
15
+
16
+ def initialize: (
17
+ tenant_id: String,
18
+ template_id: String,
19
+ ?request_options: Courier::request_opts
20
+ ) -> void
21
+
22
+ def to_hash: -> {
23
+ tenant_id: String,
24
+ template_id: String,
25
+ request_options: Courier::RequestOptions
26
+ }
27
+ end
28
+ end
29
+ end
30
+ end