trycourier 4.10.2 → 4.12.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 (154) 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/brand_create_params.rb +7 -7
  6. data/lib/courier/models/create_journey_request.rb +39 -0
  7. data/lib/courier/models/journey_ai_node.rb +77 -0
  8. data/lib/courier/models/journey_api_invoke_trigger_node.rb +73 -0
  9. data/lib/courier/models/journey_archive_params.rb +20 -0
  10. data/lib/courier/models/journey_condition_atom.rb +8 -0
  11. data/lib/courier/models/journey_condition_group.rb +26 -0
  12. data/lib/courier/models/journey_condition_nested_group.rb +24 -0
  13. data/lib/courier/models/journey_conditions_field.rb +37 -0
  14. data/lib/courier/models/journey_create_params.rb +14 -0
  15. data/lib/courier/models/journey_delay_duration_node.rb +71 -0
  16. data/lib/courier/models/journey_delay_until_node.rb +71 -0
  17. data/lib/courier/models/journey_exit_node.rb +33 -0
  18. data/lib/courier/models/journey_fetch_get_delete_node.rb +103 -0
  19. data/lib/courier/models/journey_fetch_post_put_node.rb +110 -0
  20. data/lib/courier/models/journey_list_versions_params.rb +20 -0
  21. data/lib/courier/models/journey_merge_strategy.rb +18 -0
  22. data/lib/courier/models/journey_node.rb +295 -0
  23. data/lib/courier/models/journey_publish_params.rb +20 -0
  24. data/lib/courier/models/journey_publish_request.rb +18 -0
  25. data/lib/courier/models/journey_replace_params.rb +20 -0
  26. data/lib/courier/models/journey_response.rb +82 -0
  27. data/lib/courier/models/journey_retrieve_params.rb +29 -0
  28. data/lib/courier/models/journey_segment_trigger_node.rb +90 -0
  29. data/lib/courier/models/journey_send_node.rb +124 -0
  30. data/lib/courier/models/journey_state.rb +16 -0
  31. data/lib/courier/models/journey_template_create_request.rb +138 -0
  32. data/lib/courier/models/journey_template_get_response.rb +154 -0
  33. data/lib/courier/models/journey_template_list_response.rb +23 -0
  34. data/lib/courier/models/journey_template_publish_request.rb +18 -0
  35. data/lib/courier/models/journey_template_replace_request.rb +126 -0
  36. data/lib/courier/models/journey_template_summary.rb +60 -0
  37. data/lib/courier/models/journey_throttle_dynamic_node.rb +86 -0
  38. data/lib/courier/models/journey_throttle_static_node.rb +80 -0
  39. data/lib/courier/models/journey_version_item.rb +41 -0
  40. data/lib/courier/models/journey_versions_list_response.rb +24 -0
  41. data/lib/courier/models/journeys/template_archive_params.rb +28 -0
  42. data/lib/courier/models/journeys/template_create_params.rb +22 -0
  43. data/lib/courier/models/journeys/template_list_params.rb +39 -0
  44. data/lib/courier/models/journeys/template_list_versions_params.rb +28 -0
  45. data/lib/courier/models/journeys/template_publish_params.rb +28 -0
  46. data/lib/courier/models/journeys/template_replace_params.rb +28 -0
  47. data/lib/courier/models/journeys/template_retrieve_params.rb +28 -0
  48. data/lib/courier/models/tenants/template_delete_params.rb +28 -0
  49. data/lib/courier/models.rb +73 -0
  50. data/lib/courier/resources/brands.rb +4 -3
  51. data/lib/courier/resources/journeys/templates.rb +224 -0
  52. data/lib/courier/resources/journeys.rb +167 -2
  53. data/lib/courier/resources/tenants/templates.rb +32 -0
  54. data/lib/courier/version.rb +1 -1
  55. data/lib/courier.rb +44 -0
  56. data/rbi/courier/models/brand_create_params.rbi +8 -8
  57. data/rbi/courier/models/create_journey_request.rbi +116 -0
  58. data/rbi/courier/models/journey_ai_node.rbi +141 -0
  59. data/rbi/courier/models/journey_api_invoke_trigger_node.rbi +164 -0
  60. data/rbi/courier/models/journey_archive_params.rbi +35 -0
  61. data/rbi/courier/models/journey_condition_atom.rbi +11 -0
  62. data/rbi/courier/models/journey_condition_group.rbi +43 -0
  63. data/rbi/courier/models/journey_condition_nested_group.rbi +51 -0
  64. data/rbi/courier/models/journey_conditions_field.rbi +27 -0
  65. data/rbi/courier/models/journey_create_params.rbi +27 -0
  66. data/rbi/courier/models/journey_delay_duration_node.rbi +146 -0
  67. data/rbi/courier/models/journey_delay_until_node.rbi +139 -0
  68. data/rbi/courier/models/journey_exit_node.rbi +57 -0
  69. data/rbi/courier/models/journey_fetch_get_delete_node.rbi +186 -0
  70. data/rbi/courier/models/journey_fetch_post_put_node.rbi +190 -0
  71. data/rbi/courier/models/journey_list_versions_params.rbi +35 -0
  72. data/rbi/courier/models/journey_merge_strategy.rbi +26 -0
  73. data/rbi/courier/models/journey_node.rbi +542 -0
  74. data/rbi/courier/models/journey_publish_params.rbi +35 -0
  75. data/rbi/courier/models/journey_publish_request.rbi +28 -0
  76. data/rbi/courier/models/journey_replace_params.rbi +35 -0
  77. data/rbi/courier/models/journey_response.rbi +109 -0
  78. data/rbi/courier/models/journey_retrieve_params.rbi +52 -0
  79. data/rbi/courier/models/journey_segment_trigger_node.rbi +200 -0
  80. data/rbi/courier/models/journey_send_node.rbi +254 -0
  81. data/rbi/courier/models/journey_state.rbi +20 -0
  82. data/rbi/courier/models/journey_template_create_request.rbi +381 -0
  83. data/rbi/courier/models/journey_template_get_response.rbi +334 -0
  84. data/rbi/courier/models/journey_template_list_response.rbi +45 -0
  85. data/rbi/courier/models/journey_template_publish_request.rbi +31 -0
  86. data/rbi/courier/models/journey_template_replace_request.rbi +368 -0
  87. data/rbi/courier/models/journey_template_summary.rbi +85 -0
  88. data/rbi/courier/models/journey_throttle_dynamic_node.rbi +162 -0
  89. data/rbi/courier/models/journey_throttle_static_node.rbi +158 -0
  90. data/rbi/courier/models/journey_version_item.rbi +54 -0
  91. data/rbi/courier/models/journey_versions_list_response.rbi +45 -0
  92. data/rbi/courier/models/journeys/template_archive_params.rbi +48 -0
  93. data/rbi/courier/models/journeys/template_create_params.rbi +40 -0
  94. data/rbi/courier/models/journeys/template_list_params.rbi +68 -0
  95. data/rbi/courier/models/journeys/template_list_versions_params.rbi +48 -0
  96. data/rbi/courier/models/journeys/template_publish_params.rbi +48 -0
  97. data/rbi/courier/models/journeys/template_replace_params.rbi +48 -0
  98. data/rbi/courier/models/journeys/template_retrieve_params.rbi +48 -0
  99. data/rbi/courier/models/tenants/template_delete_params.rbi +48 -0
  100. data/rbi/courier/models.rbi +76 -0
  101. data/rbi/courier/resources/brands.rbi +4 -9
  102. data/rbi/courier/resources/journeys/templates.rbi +160 -0
  103. data/rbi/courier/resources/journeys.rbi +158 -3
  104. data/rbi/courier/resources/tenants/templates.rbi +22 -0
  105. data/sig/courier/models/brand_create_params.rbs +5 -5
  106. data/sig/courier/models/create_journey_request.rbs +41 -0
  107. data/sig/courier/models/journey_ai_node.rbs +72 -0
  108. data/sig/courier/models/journey_api_invoke_trigger_node.rbs +68 -0
  109. data/sig/courier/models/journey_archive_params.rbs +23 -0
  110. data/sig/courier/models/journey_condition_atom.rbs +7 -0
  111. data/sig/courier/models/journey_condition_group.rbs +33 -0
  112. data/sig/courier/models/journey_condition_nested_group.rbs +33 -0
  113. data/sig/courier/models/journey_conditions_field.rbs +14 -0
  114. data/sig/courier/models/journey_create_params.rbs +15 -0
  115. data/sig/courier/models/journey_delay_duration_node.rbs +66 -0
  116. data/sig/courier/models/journey_delay_until_node.rbs +66 -0
  117. data/sig/courier/models/journey_exit_node.rbs +34 -0
  118. data/sig/courier/models/journey_fetch_get_delete_node.rbs +93 -0
  119. data/sig/courier/models/journey_fetch_post_put_node.rbs +100 -0
  120. data/sig/courier/models/journey_list_versions_params.rbs +23 -0
  121. data/sig/courier/models/journey_merge_strategy.rbs +16 -0
  122. data/sig/courier/models/journey_node.rbs +247 -0
  123. data/sig/courier/models/journey_publish_params.rbs +25 -0
  124. data/sig/courier/models/journey_publish_request.rbs +15 -0
  125. data/sig/courier/models/journey_replace_params.rbs +25 -0
  126. data/sig/courier/models/journey_response.rbs +65 -0
  127. data/sig/courier/models/journey_retrieve_params.rbs +30 -0
  128. data/sig/courier/models/journey_segment_trigger_node.rbs +85 -0
  129. data/sig/courier/models/journey_send_node.rbs +140 -0
  130. data/sig/courier/models/journey_state.rbs +14 -0
  131. data/sig/courier/models/journey_template_create_request.rbs +148 -0
  132. data/sig/courier/models/journey_template_get_response.rbs +157 -0
  133. data/sig/courier/models/journey_template_list_response.rbs +25 -0
  134. data/sig/courier/models/journey_template_publish_request.rbs +15 -0
  135. data/sig/courier/models/journey_template_replace_request.rbs +136 -0
  136. data/sig/courier/models/journey_template_summary.rbs +59 -0
  137. data/sig/courier/models/journey_throttle_dynamic_node.rbs +76 -0
  138. data/sig/courier/models/journey_throttle_static_node.rbs +72 -0
  139. data/sig/courier/models/journey_version_item.rbs +40 -0
  140. data/sig/courier/models/journey_versions_list_response.rbs +22 -0
  141. data/sig/courier/models/journeys/template_archive_params.rbs +30 -0
  142. data/sig/courier/models/journeys/template_create_params.rbs +27 -0
  143. data/sig/courier/models/journeys/template_list_params.rbs +38 -0
  144. data/sig/courier/models/journeys/template_list_versions_params.rbs +30 -0
  145. data/sig/courier/models/journeys/template_publish_params.rbs +34 -0
  146. data/sig/courier/models/journeys/template_replace_params.rbs +34 -0
  147. data/sig/courier/models/journeys/template_retrieve_params.rbs +30 -0
  148. data/sig/courier/models/tenants/template_delete_params.rbs +30 -0
  149. data/sig/courier/models.rbs +72 -0
  150. data/sig/courier/resources/brands.rbs +1 -1
  151. data/sig/courier/resources/journeys/templates.rbs +58 -0
  152. data/sig/courier/resources/journeys.rbs +41 -0
  153. data/sig/courier/resources/tenants/templates.rbs +6 -0
  154. metadata +134 -2
@@ -0,0 +1,68 @@
1
+ module Courier
2
+ module Models
3
+ type journey_api_invoke_trigger_node =
4
+ {
5
+ trigger_type: Courier::Models::JourneyAPIInvokeTriggerNode::trigger_type,
6
+ type: Courier::Models::JourneyAPIInvokeTriggerNode::type_,
7
+ id: String,
8
+ conditions: Courier::Models::journey_conditions_field,
9
+ schema: ::Hash[Symbol, top]
10
+ }
11
+
12
+ class JourneyAPIInvokeTriggerNode < Courier::Internal::Type::BaseModel
13
+ attr_accessor trigger_type: Courier::Models::JourneyAPIInvokeTriggerNode::trigger_type
14
+
15
+ attr_accessor type: Courier::Models::JourneyAPIInvokeTriggerNode::type_
16
+
17
+ attr_reader id: String?
18
+
19
+ def id=: (String) -> String
20
+
21
+ attr_reader conditions: Courier::Models::journey_conditions_field?
22
+
23
+ def conditions=: (
24
+ Courier::Models::journey_conditions_field
25
+ ) -> Courier::Models::journey_conditions_field
26
+
27
+ attr_reader schema: ::Hash[Symbol, top]?
28
+
29
+ def schema=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
30
+
31
+ def initialize: (
32
+ trigger_type: Courier::Models::JourneyAPIInvokeTriggerNode::trigger_type,
33
+ type: Courier::Models::JourneyAPIInvokeTriggerNode::type_,
34
+ ?id: String,
35
+ ?conditions: Courier::Models::journey_conditions_field,
36
+ ?schema: ::Hash[Symbol, top]
37
+ ) -> void
38
+
39
+ def to_hash: -> {
40
+ trigger_type: Courier::Models::JourneyAPIInvokeTriggerNode::trigger_type,
41
+ type: Courier::Models::JourneyAPIInvokeTriggerNode::type_,
42
+ id: String,
43
+ conditions: Courier::Models::journey_conditions_field,
44
+ schema: ::Hash[Symbol, top]
45
+ }
46
+
47
+ type trigger_type = :"api-invoke"
48
+
49
+ module TriggerType
50
+ extend Courier::Internal::Type::Enum
51
+
52
+ API_INVOKE: :"api-invoke"
53
+
54
+ def self?.values: -> ::Array[Courier::Models::JourneyAPIInvokeTriggerNode::trigger_type]
55
+ end
56
+
57
+ type type_ = :trigger
58
+
59
+ module Type
60
+ extend Courier::Internal::Type::Enum
61
+
62
+ TRIGGER: :trigger
63
+
64
+ def self?.values: -> ::Array[Courier::Models::JourneyAPIInvokeTriggerNode::type_]
65
+ end
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,23 @@
1
+ module Courier
2
+ module Models
3
+ type journey_archive_params =
4
+ { template_id: String } & Courier::Internal::Type::request_parameters
5
+
6
+ class JourneyArchiveParams < Courier::Internal::Type::BaseModel
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ attr_accessor template_id: String
11
+
12
+ def initialize: (
13
+ template_id: String,
14
+ ?request_options: Courier::request_opts
15
+ ) -> void
16
+
17
+ def to_hash: -> {
18
+ template_id: String,
19
+ request_options: Courier::RequestOptions
20
+ }
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,7 @@
1
+ module Courier
2
+ module Models
3
+ type journey_condition_atom = ::Array[String]
4
+
5
+ JourneyConditionAtom: Courier::Internal::Type::Converter
6
+ end
7
+ end
@@ -0,0 +1,33 @@
1
+ module Courier
2
+ module Models
3
+ type journey_condition_group =
4
+ {
5
+ and_: ::Array[Courier::Models::journey_condition_atom],
6
+ or_: ::Array[Courier::Models::journey_condition_atom]
7
+ }
8
+
9
+ class JourneyConditionGroup < Courier::Internal::Type::BaseModel
10
+ attr_reader and_: ::Array[Courier::Models::journey_condition_atom]?
11
+
12
+ def and_=: (
13
+ ::Array[Courier::Models::journey_condition_atom]
14
+ ) -> ::Array[Courier::Models::journey_condition_atom]
15
+
16
+ attr_reader or_: ::Array[Courier::Models::journey_condition_atom]?
17
+
18
+ def or_=: (
19
+ ::Array[Courier::Models::journey_condition_atom]
20
+ ) -> ::Array[Courier::Models::journey_condition_atom]
21
+
22
+ def initialize: (
23
+ ?and_: ::Array[Courier::Models::journey_condition_atom],
24
+ ?or_: ::Array[Courier::Models::journey_condition_atom]
25
+ ) -> void
26
+
27
+ def to_hash: -> {
28
+ and_: ::Array[Courier::Models::journey_condition_atom],
29
+ or_: ::Array[Courier::Models::journey_condition_atom]
30
+ }
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,33 @@
1
+ module Courier
2
+ module Models
3
+ type journey_condition_nested_group =
4
+ {
5
+ and_: ::Array[Courier::JourneyConditionGroup],
6
+ or_: ::Array[Courier::JourneyConditionGroup]
7
+ }
8
+
9
+ class JourneyConditionNestedGroup < Courier::Internal::Type::BaseModel
10
+ attr_reader and_: ::Array[Courier::JourneyConditionGroup]?
11
+
12
+ def and_=: (
13
+ ::Array[Courier::JourneyConditionGroup]
14
+ ) -> ::Array[Courier::JourneyConditionGroup]
15
+
16
+ attr_reader or_: ::Array[Courier::JourneyConditionGroup]?
17
+
18
+ def or_=: (
19
+ ::Array[Courier::JourneyConditionGroup]
20
+ ) -> ::Array[Courier::JourneyConditionGroup]
21
+
22
+ def initialize: (
23
+ ?and_: ::Array[Courier::JourneyConditionGroup],
24
+ ?or_: ::Array[Courier::JourneyConditionGroup]
25
+ ) -> void
26
+
27
+ def to_hash: -> {
28
+ and_: ::Array[Courier::JourneyConditionGroup],
29
+ or_: ::Array[Courier::JourneyConditionGroup]
30
+ }
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,14 @@
1
+ module Courier
2
+ module Models
3
+ type journey_conditions_field =
4
+ Courier::Models::journey_condition_atom
5
+ | Courier::JourneyConditionGroup
6
+ | Courier::JourneyConditionNestedGroup
7
+
8
+ module JourneyConditionsField
9
+ extend Courier::Internal::Type::Union
10
+
11
+ def self?.variants: -> ::Array[Courier::Models::journey_conditions_field]
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,15 @@
1
+ module Courier
2
+ module Models
3
+ type journey_create_params =
4
+ { } & Courier::Internal::Type::request_parameters
5
+
6
+ class JourneyCreateParams < Courier::Models::CreateJourneyRequest
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ def initialize: (?request_options: Courier::request_opts) -> void
11
+
12
+ def to_hash: -> { request_options: Courier::RequestOptions }
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,66 @@
1
+ module Courier
2
+ module Models
3
+ type journey_delay_duration_node =
4
+ {
5
+ duration: String,
6
+ mode: Courier::Models::JourneyDelayDurationNode::mode,
7
+ type: Courier::Models::JourneyDelayDurationNode::type_,
8
+ id: String,
9
+ conditions: Courier::Models::journey_conditions_field
10
+ }
11
+
12
+ class JourneyDelayDurationNode < Courier::Internal::Type::BaseModel
13
+ attr_accessor duration: String
14
+
15
+ attr_accessor mode: Courier::Models::JourneyDelayDurationNode::mode
16
+
17
+ attr_accessor type: Courier::Models::JourneyDelayDurationNode::type_
18
+
19
+ attr_reader id: String?
20
+
21
+ def id=: (String) -> String
22
+
23
+ attr_reader conditions: Courier::Models::journey_conditions_field?
24
+
25
+ def conditions=: (
26
+ Courier::Models::journey_conditions_field
27
+ ) -> Courier::Models::journey_conditions_field
28
+
29
+ def initialize: (
30
+ duration: String,
31
+ mode: Courier::Models::JourneyDelayDurationNode::mode,
32
+ type: Courier::Models::JourneyDelayDurationNode::type_,
33
+ ?id: String,
34
+ ?conditions: Courier::Models::journey_conditions_field
35
+ ) -> void
36
+
37
+ def to_hash: -> {
38
+ duration: String,
39
+ mode: Courier::Models::JourneyDelayDurationNode::mode,
40
+ type: Courier::Models::JourneyDelayDurationNode::type_,
41
+ id: String,
42
+ conditions: Courier::Models::journey_conditions_field
43
+ }
44
+
45
+ type mode = :duration
46
+
47
+ module Mode
48
+ extend Courier::Internal::Type::Enum
49
+
50
+ DURATION: :duration
51
+
52
+ def self?.values: -> ::Array[Courier::Models::JourneyDelayDurationNode::mode]
53
+ end
54
+
55
+ type type_ = :delay
56
+
57
+ module Type
58
+ extend Courier::Internal::Type::Enum
59
+
60
+ DELAY: :delay
61
+
62
+ def self?.values: -> ::Array[Courier::Models::JourneyDelayDurationNode::type_]
63
+ end
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,66 @@
1
+ module Courier
2
+ module Models
3
+ type journey_delay_until_node =
4
+ {
5
+ mode: Courier::Models::JourneyDelayUntilNode::mode,
6
+ type: Courier::Models::JourneyDelayUntilNode::type_,
7
+ until_: String,
8
+ id: String,
9
+ conditions: Courier::Models::journey_conditions_field
10
+ }
11
+
12
+ class JourneyDelayUntilNode < Courier::Internal::Type::BaseModel
13
+ attr_accessor mode: Courier::Models::JourneyDelayUntilNode::mode
14
+
15
+ attr_accessor type: Courier::Models::JourneyDelayUntilNode::type_
16
+
17
+ attr_accessor until_: String
18
+
19
+ attr_reader id: String?
20
+
21
+ def id=: (String) -> String
22
+
23
+ attr_reader conditions: Courier::Models::journey_conditions_field?
24
+
25
+ def conditions=: (
26
+ Courier::Models::journey_conditions_field
27
+ ) -> Courier::Models::journey_conditions_field
28
+
29
+ def initialize: (
30
+ mode: Courier::Models::JourneyDelayUntilNode::mode,
31
+ type: Courier::Models::JourneyDelayUntilNode::type_,
32
+ until_: String,
33
+ ?id: String,
34
+ ?conditions: Courier::Models::journey_conditions_field
35
+ ) -> void
36
+
37
+ def to_hash: -> {
38
+ mode: Courier::Models::JourneyDelayUntilNode::mode,
39
+ type: Courier::Models::JourneyDelayUntilNode::type_,
40
+ until_: String,
41
+ id: String,
42
+ conditions: Courier::Models::journey_conditions_field
43
+ }
44
+
45
+ type mode = :until
46
+
47
+ module Mode
48
+ extend Courier::Internal::Type::Enum
49
+
50
+ UNTIL: :until
51
+
52
+ def self?.values: -> ::Array[Courier::Models::JourneyDelayUntilNode::mode]
53
+ end
54
+
55
+ type type_ = :delay
56
+
57
+ module Type
58
+ extend Courier::Internal::Type::Enum
59
+
60
+ DELAY: :delay
61
+
62
+ def self?.values: -> ::Array[Courier::Models::JourneyDelayUntilNode::type_]
63
+ end
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,34 @@
1
+ module Courier
2
+ module Models
3
+ type journey_exit_node =
4
+ { type: Courier::Models::JourneyExitNode::type_, id: String }
5
+
6
+ class JourneyExitNode < Courier::Internal::Type::BaseModel
7
+ attr_accessor type: Courier::Models::JourneyExitNode::type_
8
+
9
+ attr_reader id: String?
10
+
11
+ def id=: (String) -> String
12
+
13
+ def initialize: (
14
+ type: Courier::Models::JourneyExitNode::type_,
15
+ ?id: String
16
+ ) -> void
17
+
18
+ def to_hash: -> {
19
+ type: Courier::Models::JourneyExitNode::type_,
20
+ id: String
21
+ }
22
+
23
+ type type_ = :exit
24
+
25
+ module Type
26
+ extend Courier::Internal::Type::Enum
27
+
28
+ EXIT: :exit
29
+
30
+ def self?.values: -> ::Array[Courier::Models::JourneyExitNode::type_]
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,93 @@
1
+ module Courier
2
+ module Models
3
+ type journey_fetch_get_delete_node =
4
+ {
5
+ merge_strategy: Courier::Models::journey_merge_strategy,
6
+ method_: Courier::Models::JourneyFetchGetDeleteNode::method_,
7
+ type: Courier::Models::JourneyFetchGetDeleteNode::type_,
8
+ url: String,
9
+ id: String,
10
+ conditions: Courier::Models::journey_conditions_field,
11
+ headers: ::Hash[Symbol, String],
12
+ query_params: ::Hash[Symbol, String],
13
+ response_schema: ::Hash[Symbol, top]
14
+ }
15
+
16
+ class JourneyFetchGetDeleteNode < Courier::Internal::Type::BaseModel
17
+ attr_accessor merge_strategy: Courier::Models::journey_merge_strategy
18
+
19
+ attr_accessor method_: Courier::Models::JourneyFetchGetDeleteNode::method_
20
+
21
+ attr_accessor type: Courier::Models::JourneyFetchGetDeleteNode::type_
22
+
23
+ attr_accessor url: String
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
+ attr_reader headers: ::Hash[Symbol, String]?
36
+
37
+ def headers=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
38
+
39
+ attr_reader query_params: ::Hash[Symbol, String]?
40
+
41
+ def query_params=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
42
+
43
+ attr_reader response_schema: ::Hash[Symbol, top]?
44
+
45
+ def response_schema=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
46
+
47
+ def initialize: (
48
+ merge_strategy: Courier::Models::journey_merge_strategy,
49
+ method_: Courier::Models::JourneyFetchGetDeleteNode::method_,
50
+ type: Courier::Models::JourneyFetchGetDeleteNode::type_,
51
+ url: String,
52
+ ?id: String,
53
+ ?conditions: Courier::Models::journey_conditions_field,
54
+ ?headers: ::Hash[Symbol, String],
55
+ ?query_params: ::Hash[Symbol, String],
56
+ ?response_schema: ::Hash[Symbol, top]
57
+ ) -> void
58
+
59
+ def to_hash: -> {
60
+ merge_strategy: Courier::Models::journey_merge_strategy,
61
+ method_: Courier::Models::JourneyFetchGetDeleteNode::method_,
62
+ type: Courier::Models::JourneyFetchGetDeleteNode::type_,
63
+ url: String,
64
+ id: String,
65
+ conditions: Courier::Models::journey_conditions_field,
66
+ headers: ::Hash[Symbol, String],
67
+ query_params: ::Hash[Symbol, String],
68
+ response_schema: ::Hash[Symbol, top]
69
+ }
70
+
71
+ type method_ = :get | :delete
72
+
73
+ module Method
74
+ extend Courier::Internal::Type::Enum
75
+
76
+ GET: :get
77
+ DELETE: :delete
78
+
79
+ def self?.values: -> ::Array[Courier::Models::JourneyFetchGetDeleteNode::method_]
80
+ end
81
+
82
+ type type_ = :fetch
83
+
84
+ module Type
85
+ extend Courier::Internal::Type::Enum
86
+
87
+ FETCH: :fetch
88
+
89
+ def self?.values: -> ::Array[Courier::Models::JourneyFetchGetDeleteNode::type_]
90
+ end
91
+ end
92
+ end
93
+ end
@@ -0,0 +1,100 @@
1
+ module Courier
2
+ module Models
3
+ type journey_fetch_post_put_node =
4
+ {
5
+ merge_strategy: Courier::Models::journey_merge_strategy,
6
+ method_: Courier::Models::JourneyFetchPostPutNode::method_,
7
+ type: Courier::Models::JourneyFetchPostPutNode::type_,
8
+ url: String,
9
+ id: String,
10
+ body: String,
11
+ conditions: Courier::Models::journey_conditions_field,
12
+ headers: ::Hash[Symbol, String],
13
+ query_params: ::Hash[Symbol, String],
14
+ response_schema: ::Hash[Symbol, top]
15
+ }
16
+
17
+ class JourneyFetchPostPutNode < Courier::Internal::Type::BaseModel
18
+ attr_accessor merge_strategy: Courier::Models::journey_merge_strategy
19
+
20
+ attr_accessor method_: Courier::Models::JourneyFetchPostPutNode::method_
21
+
22
+ attr_accessor type: Courier::Models::JourneyFetchPostPutNode::type_
23
+
24
+ attr_accessor url: String
25
+
26
+ attr_reader id: String?
27
+
28
+ def id=: (String) -> String
29
+
30
+ attr_reader body: String?
31
+
32
+ def body=: (String) -> String
33
+
34
+ attr_reader conditions: Courier::Models::journey_conditions_field?
35
+
36
+ def conditions=: (
37
+ Courier::Models::journey_conditions_field
38
+ ) -> Courier::Models::journey_conditions_field
39
+
40
+ attr_reader headers: ::Hash[Symbol, String]?
41
+
42
+ def headers=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
43
+
44
+ attr_reader query_params: ::Hash[Symbol, String]?
45
+
46
+ def query_params=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
47
+
48
+ attr_reader response_schema: ::Hash[Symbol, top]?
49
+
50
+ def response_schema=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
51
+
52
+ def initialize: (
53
+ merge_strategy: Courier::Models::journey_merge_strategy,
54
+ method_: Courier::Models::JourneyFetchPostPutNode::method_,
55
+ type: Courier::Models::JourneyFetchPostPutNode::type_,
56
+ url: String,
57
+ ?id: String,
58
+ ?body: String,
59
+ ?conditions: Courier::Models::journey_conditions_field,
60
+ ?headers: ::Hash[Symbol, String],
61
+ ?query_params: ::Hash[Symbol, String],
62
+ ?response_schema: ::Hash[Symbol, top]
63
+ ) -> void
64
+
65
+ def to_hash: -> {
66
+ merge_strategy: Courier::Models::journey_merge_strategy,
67
+ method_: Courier::Models::JourneyFetchPostPutNode::method_,
68
+ type: Courier::Models::JourneyFetchPostPutNode::type_,
69
+ url: String,
70
+ id: String,
71
+ body: String,
72
+ conditions: Courier::Models::journey_conditions_field,
73
+ headers: ::Hash[Symbol, String],
74
+ query_params: ::Hash[Symbol, String],
75
+ response_schema: ::Hash[Symbol, top]
76
+ }
77
+
78
+ type method_ = :post | :put
79
+
80
+ module Method
81
+ extend Courier::Internal::Type::Enum
82
+
83
+ POST: :post
84
+ PUT: :put
85
+
86
+ def self?.values: -> ::Array[Courier::Models::JourneyFetchPostPutNode::method_]
87
+ end
88
+
89
+ type type_ = :fetch
90
+
91
+ module Type
92
+ extend Courier::Internal::Type::Enum
93
+
94
+ FETCH: :fetch
95
+
96
+ def self?.values: -> ::Array[Courier::Models::JourneyFetchPostPutNode::type_]
97
+ end
98
+ end
99
+ end
100
+ end
@@ -0,0 +1,23 @@
1
+ module Courier
2
+ module Models
3
+ type journey_list_versions_params =
4
+ { template_id: String } & Courier::Internal::Type::request_parameters
5
+
6
+ class JourneyListVersionsParams < Courier::Internal::Type::BaseModel
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ attr_accessor template_id: String
11
+
12
+ def initialize: (
13
+ template_id: String,
14
+ ?request_options: Courier::request_opts
15
+ ) -> void
16
+
17
+ def to_hash: -> {
18
+ template_id: String,
19
+ request_options: Courier::RequestOptions
20
+ }
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,16 @@
1
+ module Courier
2
+ module Models
3
+ type journey_merge_strategy = :overwrite | :"soft-merge" | :replace | :none
4
+
5
+ module JourneyMergeStrategy
6
+ extend Courier::Internal::Type::Enum
7
+
8
+ OVERWRITE: :overwrite
9
+ SOFT_MERGE: :"soft-merge"
10
+ REPLACE: :replace
11
+ NONE: :none
12
+
13
+ def self?.values: -> ::Array[Courier::Models::journey_merge_strategy]
14
+ end
15
+ end
16
+ end