trycourier 4.10.2 → 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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/lib/courier/client.rb +15 -1
- data/lib/courier/internal/transport/base_client.rb +2 -0
- data/lib/courier/models/create_journey_request.rb +39 -0
- data/lib/courier/models/journey_ai_node.rb +77 -0
- data/lib/courier/models/journey_api_invoke_trigger_node.rb +73 -0
- data/lib/courier/models/journey_archive_params.rb +20 -0
- data/lib/courier/models/journey_condition_atom.rb +8 -0
- data/lib/courier/models/journey_condition_group.rb +26 -0
- data/lib/courier/models/journey_condition_nested_group.rb +24 -0
- data/lib/courier/models/journey_conditions_field.rb +37 -0
- data/lib/courier/models/journey_create_params.rb +14 -0
- data/lib/courier/models/journey_delay_duration_node.rb +71 -0
- data/lib/courier/models/journey_delay_until_node.rb +71 -0
- data/lib/courier/models/journey_exit_node.rb +33 -0
- data/lib/courier/models/journey_fetch_get_delete_node.rb +103 -0
- data/lib/courier/models/journey_fetch_post_put_node.rb +110 -0
- data/lib/courier/models/journey_list_versions_params.rb +20 -0
- data/lib/courier/models/journey_merge_strategy.rb +18 -0
- data/lib/courier/models/journey_node.rb +139 -0
- data/lib/courier/models/journey_publish_params.rb +20 -0
- data/lib/courier/models/journey_publish_request.rb +18 -0
- data/lib/courier/models/journey_replace_params.rb +20 -0
- data/lib/courier/models/journey_response.rb +82 -0
- data/lib/courier/models/journey_retrieve_params.rb +29 -0
- data/lib/courier/models/journey_segment_trigger_node.rb +90 -0
- data/lib/courier/models/journey_send_node.rb +124 -0
- data/lib/courier/models/journey_state.rb +16 -0
- data/lib/courier/models/journey_template_create_request.rb +138 -0
- data/lib/courier/models/journey_template_get_response.rb +154 -0
- data/lib/courier/models/journey_template_list_response.rb +23 -0
- data/lib/courier/models/journey_template_publish_request.rb +18 -0
- data/lib/courier/models/journey_template_replace_request.rb +126 -0
- data/lib/courier/models/journey_template_summary.rb +60 -0
- data/lib/courier/models/journey_throttle_dynamic_node.rb +86 -0
- data/lib/courier/models/journey_throttle_static_node.rb +80 -0
- data/lib/courier/models/journey_version_item.rb +41 -0
- data/lib/courier/models/journey_versions_list_response.rb +24 -0
- data/lib/courier/models/journeys/template_archive_params.rb +28 -0
- data/lib/courier/models/journeys/template_create_params.rb +22 -0
- data/lib/courier/models/journeys/template_list_params.rb +39 -0
- data/lib/courier/models/journeys/template_list_versions_params.rb +28 -0
- data/lib/courier/models/journeys/template_publish_params.rb +28 -0
- data/lib/courier/models/journeys/template_replace_params.rb +28 -0
- data/lib/courier/models/journeys/template_retrieve_params.rb +28 -0
- data/lib/courier/models/tenants/template_delete_params.rb +28 -0
- data/lib/courier/models.rb +73 -0
- data/lib/courier/resources/journeys/templates.rb +224 -0
- data/lib/courier/resources/journeys.rb +167 -2
- data/lib/courier/resources/tenants/templates.rb +32 -0
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +44 -0
- data/rbi/courier/models/create_journey_request.rbi +113 -0
- data/rbi/courier/models/journey_ai_node.rbi +141 -0
- data/rbi/courier/models/journey_api_invoke_trigger_node.rbi +164 -0
- data/rbi/courier/models/journey_archive_params.rbi +35 -0
- data/rbi/courier/models/journey_condition_atom.rbi +11 -0
- data/rbi/courier/models/journey_condition_group.rbi +43 -0
- data/rbi/courier/models/journey_condition_nested_group.rbi +51 -0
- data/rbi/courier/models/journey_conditions_field.rbi +27 -0
- data/rbi/courier/models/journey_create_params.rbi +27 -0
- data/rbi/courier/models/journey_delay_duration_node.rbi +146 -0
- data/rbi/courier/models/journey_delay_until_node.rbi +139 -0
- data/rbi/courier/models/journey_exit_node.rbi +57 -0
- data/rbi/courier/models/journey_fetch_get_delete_node.rbi +186 -0
- data/rbi/courier/models/journey_fetch_post_put_node.rbi +190 -0
- data/rbi/courier/models/journey_list_versions_params.rbi +35 -0
- data/rbi/courier/models/journey_merge_strategy.rbi +26 -0
- data/rbi/courier/models/journey_node.rbi +227 -0
- data/rbi/courier/models/journey_publish_params.rbi +35 -0
- data/rbi/courier/models/journey_publish_request.rbi +28 -0
- data/rbi/courier/models/journey_replace_params.rbi +35 -0
- data/rbi/courier/models/journey_response.rbi +108 -0
- data/rbi/courier/models/journey_retrieve_params.rbi +52 -0
- data/rbi/courier/models/journey_segment_trigger_node.rbi +200 -0
- data/rbi/courier/models/journey_send_node.rbi +254 -0
- data/rbi/courier/models/journey_state.rbi +20 -0
- data/rbi/courier/models/journey_template_create_request.rbi +381 -0
- data/rbi/courier/models/journey_template_get_response.rbi +334 -0
- data/rbi/courier/models/journey_template_list_response.rbi +45 -0
- data/rbi/courier/models/journey_template_publish_request.rbi +31 -0
- data/rbi/courier/models/journey_template_replace_request.rbi +368 -0
- data/rbi/courier/models/journey_template_summary.rbi +85 -0
- data/rbi/courier/models/journey_throttle_dynamic_node.rbi +162 -0
- data/rbi/courier/models/journey_throttle_static_node.rbi +158 -0
- data/rbi/courier/models/journey_version_item.rbi +54 -0
- data/rbi/courier/models/journey_versions_list_response.rbi +45 -0
- data/rbi/courier/models/journeys/template_archive_params.rbi +48 -0
- data/rbi/courier/models/journeys/template_create_params.rbi +40 -0
- data/rbi/courier/models/journeys/template_list_params.rbi +68 -0
- data/rbi/courier/models/journeys/template_list_versions_params.rbi +48 -0
- data/rbi/courier/models/journeys/template_publish_params.rbi +48 -0
- data/rbi/courier/models/journeys/template_replace_params.rbi +48 -0
- data/rbi/courier/models/journeys/template_retrieve_params.rbi +48 -0
- data/rbi/courier/models/tenants/template_delete_params.rbi +48 -0
- data/rbi/courier/models.rbi +76 -0
- data/rbi/courier/resources/journeys/templates.rbi +160 -0
- data/rbi/courier/resources/journeys.rbi +156 -3
- data/rbi/courier/resources/tenants/templates.rbi +22 -0
- data/sig/courier/models/create_journey_request.rbs +41 -0
- data/sig/courier/models/journey_ai_node.rbs +72 -0
- data/sig/courier/models/journey_api_invoke_trigger_node.rbs +68 -0
- data/sig/courier/models/journey_archive_params.rbs +23 -0
- data/sig/courier/models/journey_condition_atom.rbs +7 -0
- data/sig/courier/models/journey_condition_group.rbs +33 -0
- data/sig/courier/models/journey_condition_nested_group.rbs +33 -0
- data/sig/courier/models/journey_conditions_field.rbs +14 -0
- data/sig/courier/models/journey_create_params.rbs +15 -0
- data/sig/courier/models/journey_delay_duration_node.rbs +66 -0
- data/sig/courier/models/journey_delay_until_node.rbs +66 -0
- data/sig/courier/models/journey_exit_node.rbs +34 -0
- data/sig/courier/models/journey_fetch_get_delete_node.rbs +93 -0
- data/sig/courier/models/journey_fetch_post_put_node.rbs +100 -0
- data/sig/courier/models/journey_list_versions_params.rbs +23 -0
- data/sig/courier/models/journey_merge_strategy.rbs +16 -0
- data/sig/courier/models/journey_node.rbs +117 -0
- data/sig/courier/models/journey_publish_params.rbs +25 -0
- data/sig/courier/models/journey_publish_request.rbs +15 -0
- data/sig/courier/models/journey_replace_params.rbs +25 -0
- data/sig/courier/models/journey_response.rbs +65 -0
- data/sig/courier/models/journey_retrieve_params.rbs +30 -0
- data/sig/courier/models/journey_segment_trigger_node.rbs +85 -0
- data/sig/courier/models/journey_send_node.rbs +140 -0
- data/sig/courier/models/journey_state.rbs +14 -0
- data/sig/courier/models/journey_template_create_request.rbs +148 -0
- data/sig/courier/models/journey_template_get_response.rbs +157 -0
- data/sig/courier/models/journey_template_list_response.rbs +25 -0
- data/sig/courier/models/journey_template_publish_request.rbs +15 -0
- data/sig/courier/models/journey_template_replace_request.rbs +136 -0
- data/sig/courier/models/journey_template_summary.rbs +59 -0
- data/sig/courier/models/journey_throttle_dynamic_node.rbs +76 -0
- data/sig/courier/models/journey_throttle_static_node.rbs +72 -0
- data/sig/courier/models/journey_version_item.rbs +40 -0
- data/sig/courier/models/journey_versions_list_response.rbs +22 -0
- data/sig/courier/models/journeys/template_archive_params.rbs +30 -0
- data/sig/courier/models/journeys/template_create_params.rbs +27 -0
- data/sig/courier/models/journeys/template_list_params.rbs +38 -0
- data/sig/courier/models/journeys/template_list_versions_params.rbs +30 -0
- data/sig/courier/models/journeys/template_publish_params.rbs +34 -0
- data/sig/courier/models/journeys/template_replace_params.rbs +34 -0
- data/sig/courier/models/journeys/template_retrieve_params.rbs +30 -0
- data/sig/courier/models/tenants/template_delete_params.rbs +30 -0
- data/sig/courier/models.rbs +72 -0
- data/sig/courier/resources/journeys/templates.rbs +58 -0
- data/sig/courier/resources/journeys.rbs +41 -0
- data/sig/courier/resources/tenants/templates.rbs +6 -0
- metadata +134 -2
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type journey_response =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
created: Integer?,
|
|
7
|
+
creator: String?,
|
|
8
|
+
enabled: bool,
|
|
9
|
+
name: String,
|
|
10
|
+
nodes: ::Array[Courier::Models::journey_node],
|
|
11
|
+
published: Integer?,
|
|
12
|
+
state: Courier::Models::journey_state,
|
|
13
|
+
updated: Integer?,
|
|
14
|
+
updater: String?
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
class JourneyResponse < Courier::Internal::Type::BaseModel
|
|
18
|
+
attr_accessor id: String
|
|
19
|
+
|
|
20
|
+
attr_accessor created: Integer?
|
|
21
|
+
|
|
22
|
+
attr_accessor creator: String?
|
|
23
|
+
|
|
24
|
+
attr_accessor enabled: bool
|
|
25
|
+
|
|
26
|
+
attr_accessor name: String
|
|
27
|
+
|
|
28
|
+
attr_accessor nodes: ::Array[Courier::Models::journey_node]
|
|
29
|
+
|
|
30
|
+
attr_accessor published: Integer?
|
|
31
|
+
|
|
32
|
+
attr_accessor state: Courier::Models::journey_state
|
|
33
|
+
|
|
34
|
+
attr_accessor updated: Integer?
|
|
35
|
+
|
|
36
|
+
attr_accessor updater: String?
|
|
37
|
+
|
|
38
|
+
def initialize: (
|
|
39
|
+
id: String,
|
|
40
|
+
created: Integer?,
|
|
41
|
+
creator: String?,
|
|
42
|
+
enabled: bool,
|
|
43
|
+
name: String,
|
|
44
|
+
nodes: ::Array[Courier::Models::journey_node],
|
|
45
|
+
published: Integer?,
|
|
46
|
+
state: Courier::Models::journey_state,
|
|
47
|
+
updated: Integer?,
|
|
48
|
+
updater: String?
|
|
49
|
+
) -> void
|
|
50
|
+
|
|
51
|
+
def to_hash: -> {
|
|
52
|
+
id: String,
|
|
53
|
+
created: Integer?,
|
|
54
|
+
creator: String?,
|
|
55
|
+
enabled: bool,
|
|
56
|
+
name: String,
|
|
57
|
+
nodes: ::Array[Courier::Models::journey_node],
|
|
58
|
+
published: Integer?,
|
|
59
|
+
state: Courier::Models::journey_state,
|
|
60
|
+
updated: Integer?,
|
|
61
|
+
updater: String?
|
|
62
|
+
}
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type journey_retrieve_params =
|
|
4
|
+
{ template_id: String, version: String }
|
|
5
|
+
& Courier::Internal::Type::request_parameters
|
|
6
|
+
|
|
7
|
+
class JourneyRetrieveParams < Courier::Internal::Type::BaseModel
|
|
8
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Courier::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
attr_accessor template_id: String
|
|
12
|
+
|
|
13
|
+
attr_reader version: String?
|
|
14
|
+
|
|
15
|
+
def version=: (String) -> String
|
|
16
|
+
|
|
17
|
+
def initialize: (
|
|
18
|
+
template_id: String,
|
|
19
|
+
?version: String,
|
|
20
|
+
?request_options: Courier::request_opts
|
|
21
|
+
) -> void
|
|
22
|
+
|
|
23
|
+
def to_hash: -> {
|
|
24
|
+
template_id: String,
|
|
25
|
+
version: String,
|
|
26
|
+
request_options: Courier::RequestOptions
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type journey_segment_trigger_node =
|
|
4
|
+
{
|
|
5
|
+
request_type: Courier::Models::JourneySegmentTriggerNode::request_type,
|
|
6
|
+
trigger_type: Courier::Models::JourneySegmentTriggerNode::trigger_type,
|
|
7
|
+
type: Courier::Models::JourneySegmentTriggerNode::type_,
|
|
8
|
+
id: String,
|
|
9
|
+
conditions: Courier::Models::journey_conditions_field,
|
|
10
|
+
event_id: String
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
class JourneySegmentTriggerNode < Courier::Internal::Type::BaseModel
|
|
14
|
+
attr_accessor request_type: Courier::Models::JourneySegmentTriggerNode::request_type
|
|
15
|
+
|
|
16
|
+
attr_accessor trigger_type: Courier::Models::JourneySegmentTriggerNode::trigger_type
|
|
17
|
+
|
|
18
|
+
attr_accessor type: Courier::Models::JourneySegmentTriggerNode::type_
|
|
19
|
+
|
|
20
|
+
attr_reader id: String?
|
|
21
|
+
|
|
22
|
+
def id=: (String) -> String
|
|
23
|
+
|
|
24
|
+
attr_reader conditions: Courier::Models::journey_conditions_field?
|
|
25
|
+
|
|
26
|
+
def conditions=: (
|
|
27
|
+
Courier::Models::journey_conditions_field
|
|
28
|
+
) -> Courier::Models::journey_conditions_field
|
|
29
|
+
|
|
30
|
+
attr_reader event_id: String?
|
|
31
|
+
|
|
32
|
+
def event_id=: (String) -> String
|
|
33
|
+
|
|
34
|
+
def initialize: (
|
|
35
|
+
request_type: Courier::Models::JourneySegmentTriggerNode::request_type,
|
|
36
|
+
trigger_type: Courier::Models::JourneySegmentTriggerNode::trigger_type,
|
|
37
|
+
type: Courier::Models::JourneySegmentTriggerNode::type_,
|
|
38
|
+
?id: String,
|
|
39
|
+
?conditions: Courier::Models::journey_conditions_field,
|
|
40
|
+
?event_id: String
|
|
41
|
+
) -> void
|
|
42
|
+
|
|
43
|
+
def to_hash: -> {
|
|
44
|
+
request_type: Courier::Models::JourneySegmentTriggerNode::request_type,
|
|
45
|
+
trigger_type: Courier::Models::JourneySegmentTriggerNode::trigger_type,
|
|
46
|
+
type: Courier::Models::JourneySegmentTriggerNode::type_,
|
|
47
|
+
id: String,
|
|
48
|
+
conditions: Courier::Models::journey_conditions_field,
|
|
49
|
+
event_id: String
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
type request_type = :identify | :group | :track
|
|
53
|
+
|
|
54
|
+
module RequestType
|
|
55
|
+
extend Courier::Internal::Type::Enum
|
|
56
|
+
|
|
57
|
+
IDENTIFY: :identify
|
|
58
|
+
GROUP: :group
|
|
59
|
+
TRACK: :track
|
|
60
|
+
|
|
61
|
+
def self?.values: -> ::Array[Courier::Models::JourneySegmentTriggerNode::request_type]
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
type trigger_type = :segment
|
|
65
|
+
|
|
66
|
+
module TriggerType
|
|
67
|
+
extend Courier::Internal::Type::Enum
|
|
68
|
+
|
|
69
|
+
SEGMENT: :segment
|
|
70
|
+
|
|
71
|
+
def self?.values: -> ::Array[Courier::Models::JourneySegmentTriggerNode::trigger_type]
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
type type_ = :trigger
|
|
75
|
+
|
|
76
|
+
module Type
|
|
77
|
+
extend Courier::Internal::Type::Enum
|
|
78
|
+
|
|
79
|
+
TRIGGER: :trigger
|
|
80
|
+
|
|
81
|
+
def self?.values: -> ::Array[Courier::Models::JourneySegmentTriggerNode::type_]
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type journey_send_node =
|
|
4
|
+
{
|
|
5
|
+
message: Courier::JourneySendNode::Message,
|
|
6
|
+
type: Courier::Models::JourneySendNode::type_,
|
|
7
|
+
id: String,
|
|
8
|
+
conditions: Courier::Models::journey_conditions_field
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class JourneySendNode < Courier::Internal::Type::BaseModel
|
|
12
|
+
attr_accessor message: Courier::JourneySendNode::Message
|
|
13
|
+
|
|
14
|
+
attr_accessor type: Courier::Models::JourneySendNode::type_
|
|
15
|
+
|
|
16
|
+
attr_reader id: String?
|
|
17
|
+
|
|
18
|
+
def id=: (String) -> String
|
|
19
|
+
|
|
20
|
+
attr_reader conditions: Courier::Models::journey_conditions_field?
|
|
21
|
+
|
|
22
|
+
def conditions=: (
|
|
23
|
+
Courier::Models::journey_conditions_field
|
|
24
|
+
) -> Courier::Models::journey_conditions_field
|
|
25
|
+
|
|
26
|
+
def initialize: (
|
|
27
|
+
message: Courier::JourneySendNode::Message,
|
|
28
|
+
type: Courier::Models::JourneySendNode::type_,
|
|
29
|
+
?id: String,
|
|
30
|
+
?conditions: Courier::Models::journey_conditions_field
|
|
31
|
+
) -> void
|
|
32
|
+
|
|
33
|
+
def to_hash: -> {
|
|
34
|
+
message: Courier::JourneySendNode::Message,
|
|
35
|
+
type: Courier::Models::JourneySendNode::type_,
|
|
36
|
+
id: String,
|
|
37
|
+
conditions: Courier::Models::journey_conditions_field
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
type message =
|
|
41
|
+
{
|
|
42
|
+
template: String,
|
|
43
|
+
data: ::Hash[Symbol, top],
|
|
44
|
+
delay: Courier::JourneySendNode::Message::Delay,
|
|
45
|
+
to: Courier::JourneySendNode::Message::To
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
class Message < Courier::Internal::Type::BaseModel
|
|
49
|
+
attr_accessor template: String
|
|
50
|
+
|
|
51
|
+
attr_reader data: ::Hash[Symbol, top]?
|
|
52
|
+
|
|
53
|
+
def data=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
|
|
54
|
+
|
|
55
|
+
attr_reader delay: Courier::JourneySendNode::Message::Delay?
|
|
56
|
+
|
|
57
|
+
def delay=: (
|
|
58
|
+
Courier::JourneySendNode::Message::Delay
|
|
59
|
+
) -> Courier::JourneySendNode::Message::Delay
|
|
60
|
+
|
|
61
|
+
attr_reader to: Courier::JourneySendNode::Message::To?
|
|
62
|
+
|
|
63
|
+
def to=: (
|
|
64
|
+
Courier::JourneySendNode::Message::To
|
|
65
|
+
) -> Courier::JourneySendNode::Message::To
|
|
66
|
+
|
|
67
|
+
def initialize: (
|
|
68
|
+
template: String,
|
|
69
|
+
?data: ::Hash[Symbol, top],
|
|
70
|
+
?delay: Courier::JourneySendNode::Message::Delay,
|
|
71
|
+
?to: Courier::JourneySendNode::Message::To
|
|
72
|
+
) -> void
|
|
73
|
+
|
|
74
|
+
def to_hash: -> {
|
|
75
|
+
template: String,
|
|
76
|
+
data: ::Hash[Symbol, top],
|
|
77
|
+
delay: Courier::JourneySendNode::Message::Delay,
|
|
78
|
+
to: Courier::JourneySendNode::Message::To
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
type delay = { until_: String, timezone: String }
|
|
82
|
+
|
|
83
|
+
class Delay < Courier::Internal::Type::BaseModel
|
|
84
|
+
attr_accessor until_: String
|
|
85
|
+
|
|
86
|
+
attr_reader timezone: String?
|
|
87
|
+
|
|
88
|
+
def timezone=: (String) -> String
|
|
89
|
+
|
|
90
|
+
def initialize: (until_: String, ?timezone: String) -> void
|
|
91
|
+
|
|
92
|
+
def to_hash: -> { until_: String, timezone: String }
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
type to =
|
|
96
|
+
{
|
|
97
|
+
email_override: String,
|
|
98
|
+
phone_number_override: String,
|
|
99
|
+
user_id_override: String
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
class To < Courier::Internal::Type::BaseModel
|
|
103
|
+
attr_reader email_override: String?
|
|
104
|
+
|
|
105
|
+
def email_override=: (String) -> String
|
|
106
|
+
|
|
107
|
+
attr_reader phone_number_override: String?
|
|
108
|
+
|
|
109
|
+
def phone_number_override=: (String) -> String
|
|
110
|
+
|
|
111
|
+
attr_reader user_id_override: String?
|
|
112
|
+
|
|
113
|
+
def user_id_override=: (String) -> String
|
|
114
|
+
|
|
115
|
+
def initialize: (
|
|
116
|
+
?email_override: String,
|
|
117
|
+
?phone_number_override: String,
|
|
118
|
+
?user_id_override: String
|
|
119
|
+
) -> void
|
|
120
|
+
|
|
121
|
+
def to_hash: -> {
|
|
122
|
+
email_override: String,
|
|
123
|
+
phone_number_override: String,
|
|
124
|
+
user_id_override: String
|
|
125
|
+
}
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
type type_ = :send
|
|
130
|
+
|
|
131
|
+
module Type
|
|
132
|
+
extend Courier::Internal::Type::Enum
|
|
133
|
+
|
|
134
|
+
SEND: :send
|
|
135
|
+
|
|
136
|
+
def self?.values: -> ::Array[Courier::Models::JourneySendNode::type_]
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type journey_state = :DRAFT | :PUBLISHED
|
|
4
|
+
|
|
5
|
+
module JourneyState
|
|
6
|
+
extend Courier::Internal::Type::Enum
|
|
7
|
+
|
|
8
|
+
DRAFT: :DRAFT
|
|
9
|
+
PUBLISHED: :PUBLISHED
|
|
10
|
+
|
|
11
|
+
def self?.values: -> ::Array[Courier::Models::journey_state]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type journey_template_create_request =
|
|
4
|
+
{
|
|
5
|
+
channel: String,
|
|
6
|
+
notification: Courier::JourneyTemplateCreateRequest::Notification,
|
|
7
|
+
provider_key: String,
|
|
8
|
+
state: String
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class JourneyTemplateCreateRequest < Courier::Internal::Type::BaseModel
|
|
12
|
+
attr_accessor channel: String
|
|
13
|
+
|
|
14
|
+
attr_accessor notification: Courier::JourneyTemplateCreateRequest::Notification
|
|
15
|
+
|
|
16
|
+
attr_reader provider_key: String?
|
|
17
|
+
|
|
18
|
+
def provider_key=: (String) -> String
|
|
19
|
+
|
|
20
|
+
attr_reader state: String?
|
|
21
|
+
|
|
22
|
+
def state=: (String) -> String
|
|
23
|
+
|
|
24
|
+
def initialize: (
|
|
25
|
+
channel: String,
|
|
26
|
+
notification: Courier::JourneyTemplateCreateRequest::Notification,
|
|
27
|
+
?provider_key: String,
|
|
28
|
+
?state: String
|
|
29
|
+
) -> void
|
|
30
|
+
|
|
31
|
+
def to_hash: -> {
|
|
32
|
+
channel: String,
|
|
33
|
+
notification: Courier::JourneyTemplateCreateRequest::Notification,
|
|
34
|
+
provider_key: String,
|
|
35
|
+
state: String
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
type notification =
|
|
39
|
+
{
|
|
40
|
+
brand: Courier::JourneyTemplateCreateRequest::Notification::Brand?,
|
|
41
|
+
content: Courier::JourneyTemplateCreateRequest::Notification::Content,
|
|
42
|
+
name: String,
|
|
43
|
+
subscription: Courier::JourneyTemplateCreateRequest::Notification::Subscription?,
|
|
44
|
+
tags: ::Array[String]
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
class Notification < Courier::Internal::Type::BaseModel
|
|
48
|
+
attr_accessor brand: Courier::JourneyTemplateCreateRequest::Notification::Brand?
|
|
49
|
+
|
|
50
|
+
attr_accessor content: Courier::JourneyTemplateCreateRequest::Notification::Content
|
|
51
|
+
|
|
52
|
+
attr_accessor name: String
|
|
53
|
+
|
|
54
|
+
attr_accessor subscription: Courier::JourneyTemplateCreateRequest::Notification::Subscription?
|
|
55
|
+
|
|
56
|
+
attr_accessor tags: ::Array[String]
|
|
57
|
+
|
|
58
|
+
def initialize: (
|
|
59
|
+
brand: Courier::JourneyTemplateCreateRequest::Notification::Brand?,
|
|
60
|
+
content: Courier::JourneyTemplateCreateRequest::Notification::Content,
|
|
61
|
+
name: String,
|
|
62
|
+
subscription: Courier::JourneyTemplateCreateRequest::Notification::Subscription?,
|
|
63
|
+
tags: ::Array[String]
|
|
64
|
+
) -> void
|
|
65
|
+
|
|
66
|
+
def to_hash: -> {
|
|
67
|
+
brand: Courier::JourneyTemplateCreateRequest::Notification::Brand?,
|
|
68
|
+
content: Courier::JourneyTemplateCreateRequest::Notification::Content,
|
|
69
|
+
name: String,
|
|
70
|
+
subscription: Courier::JourneyTemplateCreateRequest::Notification::Subscription?,
|
|
71
|
+
tags: ::Array[String]
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
type brand = { id: String }
|
|
75
|
+
|
|
76
|
+
class Brand < Courier::Internal::Type::BaseModel
|
|
77
|
+
attr_accessor id: String
|
|
78
|
+
|
|
79
|
+
def initialize: (id: String) -> void
|
|
80
|
+
|
|
81
|
+
def to_hash: -> { id: String }
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
type content =
|
|
85
|
+
{
|
|
86
|
+
elements: ::Array[Courier::Models::elemental_node],
|
|
87
|
+
version: Courier::Models::JourneyTemplateCreateRequest::Notification::Content::version,
|
|
88
|
+
scope: Courier::Models::JourneyTemplateCreateRequest::Notification::Content::scope
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
class Content < Courier::Internal::Type::BaseModel
|
|
92
|
+
attr_accessor elements: ::Array[Courier::Models::elemental_node]
|
|
93
|
+
|
|
94
|
+
attr_accessor version: Courier::Models::JourneyTemplateCreateRequest::Notification::Content::version
|
|
95
|
+
|
|
96
|
+
attr_reader scope: Courier::Models::JourneyTemplateCreateRequest::Notification::Content::scope?
|
|
97
|
+
|
|
98
|
+
def scope=: (
|
|
99
|
+
Courier::Models::JourneyTemplateCreateRequest::Notification::Content::scope
|
|
100
|
+
) -> Courier::Models::JourneyTemplateCreateRequest::Notification::Content::scope
|
|
101
|
+
|
|
102
|
+
def initialize: (
|
|
103
|
+
elements: ::Array[Courier::Models::elemental_node],
|
|
104
|
+
version: Courier::Models::JourneyTemplateCreateRequest::Notification::Content::version,
|
|
105
|
+
?scope: Courier::Models::JourneyTemplateCreateRequest::Notification::Content::scope
|
|
106
|
+
) -> void
|
|
107
|
+
|
|
108
|
+
def to_hash: -> {
|
|
109
|
+
elements: ::Array[Courier::Models::elemental_node],
|
|
110
|
+
version: Courier::Models::JourneyTemplateCreateRequest::Notification::Content::version,
|
|
111
|
+
scope: Courier::Models::JourneyTemplateCreateRequest::Notification::Content::scope
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
type version = :"2022-01-01"
|
|
115
|
+
|
|
116
|
+
module Version
|
|
117
|
+
extend Courier::Internal::Type::Enum
|
|
118
|
+
|
|
119
|
+
VERSION_2022_01_01: :"2022-01-01"
|
|
120
|
+
|
|
121
|
+
def self?.values: -> ::Array[Courier::Models::JourneyTemplateCreateRequest::Notification::Content::version]
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
type scope = :default | :strict
|
|
125
|
+
|
|
126
|
+
module Scope
|
|
127
|
+
extend Courier::Internal::Type::Enum
|
|
128
|
+
|
|
129
|
+
DEFAULT: :default
|
|
130
|
+
STRICT: :strict
|
|
131
|
+
|
|
132
|
+
def self?.values: -> ::Array[Courier::Models::JourneyTemplateCreateRequest::Notification::Content::scope]
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
type subscription = { topic_id: String }
|
|
137
|
+
|
|
138
|
+
class Subscription < Courier::Internal::Type::BaseModel
|
|
139
|
+
attr_accessor topic_id: String
|
|
140
|
+
|
|
141
|
+
def initialize: (topic_id: String) -> void
|
|
142
|
+
|
|
143
|
+
def to_hash: -> { topic_id: String }
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
end
|
|
148
|
+
end
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type journey_template_get_response =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
brand: Courier::JourneyTemplateGetResponse::Brand?,
|
|
7
|
+
content: Courier::JourneyTemplateGetResponse::Content,
|
|
8
|
+
created: Integer,
|
|
9
|
+
creator: String,
|
|
10
|
+
name: String,
|
|
11
|
+
state: Courier::Models::JourneyTemplateGetResponse::state,
|
|
12
|
+
subscription: Courier::JourneyTemplateGetResponse::Subscription?,
|
|
13
|
+
tags: ::Array[String],
|
|
14
|
+
updated: Integer,
|
|
15
|
+
updater: String
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
class JourneyTemplateGetResponse < Courier::Internal::Type::BaseModel
|
|
19
|
+
attr_accessor id: String
|
|
20
|
+
|
|
21
|
+
attr_accessor brand: Courier::JourneyTemplateGetResponse::Brand?
|
|
22
|
+
|
|
23
|
+
attr_accessor content: Courier::JourneyTemplateGetResponse::Content
|
|
24
|
+
|
|
25
|
+
attr_accessor created: Integer
|
|
26
|
+
|
|
27
|
+
attr_accessor creator: String
|
|
28
|
+
|
|
29
|
+
attr_accessor name: String
|
|
30
|
+
|
|
31
|
+
attr_accessor state: Courier::Models::JourneyTemplateGetResponse::state
|
|
32
|
+
|
|
33
|
+
attr_accessor subscription: Courier::JourneyTemplateGetResponse::Subscription?
|
|
34
|
+
|
|
35
|
+
attr_accessor tags: ::Array[String]
|
|
36
|
+
|
|
37
|
+
attr_reader updated: Integer?
|
|
38
|
+
|
|
39
|
+
def updated=: (Integer) -> Integer
|
|
40
|
+
|
|
41
|
+
attr_reader updater: String?
|
|
42
|
+
|
|
43
|
+
def updater=: (String) -> String
|
|
44
|
+
|
|
45
|
+
def initialize: (
|
|
46
|
+
id: String,
|
|
47
|
+
brand: Courier::JourneyTemplateGetResponse::Brand?,
|
|
48
|
+
content: Courier::JourneyTemplateGetResponse::Content,
|
|
49
|
+
created: Integer,
|
|
50
|
+
creator: String,
|
|
51
|
+
name: String,
|
|
52
|
+
state: Courier::Models::JourneyTemplateGetResponse::state,
|
|
53
|
+
subscription: Courier::JourneyTemplateGetResponse::Subscription?,
|
|
54
|
+
tags: ::Array[String],
|
|
55
|
+
?updated: Integer,
|
|
56
|
+
?updater: String
|
|
57
|
+
) -> void
|
|
58
|
+
|
|
59
|
+
def to_hash: -> {
|
|
60
|
+
id: String,
|
|
61
|
+
brand: Courier::JourneyTemplateGetResponse::Brand?,
|
|
62
|
+
content: Courier::JourneyTemplateGetResponse::Content,
|
|
63
|
+
created: Integer,
|
|
64
|
+
creator: String,
|
|
65
|
+
name: String,
|
|
66
|
+
state: Courier::Models::JourneyTemplateGetResponse::state,
|
|
67
|
+
subscription: Courier::JourneyTemplateGetResponse::Subscription?,
|
|
68
|
+
tags: ::Array[String],
|
|
69
|
+
updated: Integer,
|
|
70
|
+
updater: String
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
type brand = { id: String }
|
|
74
|
+
|
|
75
|
+
class Brand < Courier::Internal::Type::BaseModel
|
|
76
|
+
attr_accessor id: String
|
|
77
|
+
|
|
78
|
+
def initialize: (id: String) -> void
|
|
79
|
+
|
|
80
|
+
def to_hash: -> { id: String }
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
type content =
|
|
84
|
+
{
|
|
85
|
+
elements: ::Array[Courier::Models::elemental_node],
|
|
86
|
+
version: Courier::Models::JourneyTemplateGetResponse::Content::version,
|
|
87
|
+
scope: Courier::Models::JourneyTemplateGetResponse::Content::scope
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
class Content < Courier::Internal::Type::BaseModel
|
|
91
|
+
attr_accessor elements: ::Array[Courier::Models::elemental_node]
|
|
92
|
+
|
|
93
|
+
attr_accessor version: Courier::Models::JourneyTemplateGetResponse::Content::version
|
|
94
|
+
|
|
95
|
+
attr_reader scope: Courier::Models::JourneyTemplateGetResponse::Content::scope?
|
|
96
|
+
|
|
97
|
+
def scope=: (
|
|
98
|
+
Courier::Models::JourneyTemplateGetResponse::Content::scope
|
|
99
|
+
) -> Courier::Models::JourneyTemplateGetResponse::Content::scope
|
|
100
|
+
|
|
101
|
+
def initialize: (
|
|
102
|
+
elements: ::Array[Courier::Models::elemental_node],
|
|
103
|
+
version: Courier::Models::JourneyTemplateGetResponse::Content::version,
|
|
104
|
+
?scope: Courier::Models::JourneyTemplateGetResponse::Content::scope
|
|
105
|
+
) -> void
|
|
106
|
+
|
|
107
|
+
def to_hash: -> {
|
|
108
|
+
elements: ::Array[Courier::Models::elemental_node],
|
|
109
|
+
version: Courier::Models::JourneyTemplateGetResponse::Content::version,
|
|
110
|
+
scope: Courier::Models::JourneyTemplateGetResponse::Content::scope
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
type version = :"2022-01-01"
|
|
114
|
+
|
|
115
|
+
module Version
|
|
116
|
+
extend Courier::Internal::Type::Enum
|
|
117
|
+
|
|
118
|
+
VERSION_2022_01_01: :"2022-01-01"
|
|
119
|
+
|
|
120
|
+
def self?.values: -> ::Array[Courier::Models::JourneyTemplateGetResponse::Content::version]
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
type scope = :default | :strict
|
|
124
|
+
|
|
125
|
+
module Scope
|
|
126
|
+
extend Courier::Internal::Type::Enum
|
|
127
|
+
|
|
128
|
+
DEFAULT: :default
|
|
129
|
+
STRICT: :strict
|
|
130
|
+
|
|
131
|
+
def self?.values: -> ::Array[Courier::Models::JourneyTemplateGetResponse::Content::scope]
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
type state = :DRAFT | :PUBLISHED
|
|
136
|
+
|
|
137
|
+
module State
|
|
138
|
+
extend Courier::Internal::Type::Enum
|
|
139
|
+
|
|
140
|
+
DRAFT: :DRAFT
|
|
141
|
+
PUBLISHED: :PUBLISHED
|
|
142
|
+
|
|
143
|
+
def self?.values: -> ::Array[Courier::Models::JourneyTemplateGetResponse::state]
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
type subscription = { topic_id: String }
|
|
147
|
+
|
|
148
|
+
class Subscription < Courier::Internal::Type::BaseModel
|
|
149
|
+
attr_accessor topic_id: String
|
|
150
|
+
|
|
151
|
+
def initialize: (topic_id: String) -> void
|
|
152
|
+
|
|
153
|
+
def to_hash: -> { topic_id: String }
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type journey_template_list_response =
|
|
4
|
+
{
|
|
5
|
+
paging: Courier::Paging,
|
|
6
|
+
results: ::Array[Courier::JourneyTemplateSummary]
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
class JourneyTemplateListResponse < Courier::Internal::Type::BaseModel
|
|
10
|
+
attr_accessor paging: Courier::Paging
|
|
11
|
+
|
|
12
|
+
attr_accessor results: ::Array[Courier::JourneyTemplateSummary]
|
|
13
|
+
|
|
14
|
+
def initialize: (
|
|
15
|
+
paging: Courier::Paging,
|
|
16
|
+
results: ::Array[Courier::JourneyTemplateSummary]
|
|
17
|
+
) -> void
|
|
18
|
+
|
|
19
|
+
def to_hash: -> {
|
|
20
|
+
paging: Courier::Paging,
|
|
21
|
+
results: ::Array[Courier::JourneyTemplateSummary]
|
|
22
|
+
}
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type journey_template_publish_request = { version: String }
|
|
4
|
+
|
|
5
|
+
class JourneyTemplatePublishRequest < Courier::Internal::Type::BaseModel
|
|
6
|
+
attr_reader version: String?
|
|
7
|
+
|
|
8
|
+
def version=: (String) -> String
|
|
9
|
+
|
|
10
|
+
def initialize: (?version: String) -> void
|
|
11
|
+
|
|
12
|
+
def to_hash: -> { version: String }
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|