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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +30 -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/notification_list_response.rb +8 -8
- data/lib/courier/models/notification_template_create_request.rb +3 -3
- data/lib/courier/models/notification_template_payload.rb +2 -2
- data/lib/courier/models/notification_template_response.rb +71 -0
- data/lib/courier/models/notification_template_update_request.rb +3 -3
- data/lib/courier/models/tenants/template_delete_params.rb +28 -0
- data/lib/courier/models.rb +75 -2
- data/lib/courier/resources/journeys/templates.rb +224 -0
- data/lib/courier/resources/journeys.rb +167 -2
- data/lib/courier/resources/notifications/checks.rb +16 -6
- data/lib/courier/resources/notifications.rb +8 -8
- data/lib/courier/resources/tenants/templates.rb +32 -0
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +45 -1
- 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/notification_list_response.rbi +9 -6
- data/rbi/courier/models/notification_template_create_request.rbi +4 -4
- data/rbi/courier/models/notification_template_payload.rbi +2 -2
- data/rbi/courier/models/notification_template_response.rbi +120 -0
- data/rbi/courier/models/notification_template_update_request.rbi +4 -4
- data/rbi/courier/models/tenants/template_delete_params.rbi +48 -0
- data/rbi/courier/models.rbi +78 -3
- data/rbi/courier/resources/journeys/templates.rbi +160 -0
- data/rbi/courier/resources/journeys.rbi +156 -3
- data/rbi/courier/resources/notifications/checks.rbi +19 -4
- data/rbi/courier/resources/notifications.rbi +7 -7
- 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/notification_list_response.rbs +7 -5
- data/sig/courier/models/notification_template_response.rbs +70 -0
- data/sig/courier/models/tenants/template_delete_params.rbs +30 -0
- data/sig/courier/models.rbs +74 -2
- data/sig/courier/resources/journeys/templates.rbs +58 -0
- data/sig/courier/resources/journeys.rbs +41 -0
- data/sig/courier/resources/notifications.rbs +3 -3
- data/sig/courier/resources/tenants/templates.rbs +6 -0
- metadata +137 -5
- data/lib/courier/models/notification_template_get_response.rb +0 -92
- data/rbi/courier/models/notification_template_get_response.rbi +0 -162
- data/sig/courier/models/notification_template_get_response.rbs +0 -72
|
@@ -4,6 +4,7 @@ module Courier
|
|
|
4
4
|
module Resources
|
|
5
5
|
class Notifications
|
|
6
6
|
class Checks
|
|
7
|
+
# Replace the checks for a notification template submission.
|
|
7
8
|
sig do
|
|
8
9
|
params(
|
|
9
10
|
submission_id: String,
|
|
@@ -13,9 +14,9 @@ module Courier
|
|
|
13
14
|
).returns(Courier::Models::Notifications::CheckUpdateResponse)
|
|
14
15
|
end
|
|
15
16
|
def update(
|
|
16
|
-
# Path param
|
|
17
|
+
# Path param: Submission ID.
|
|
17
18
|
submission_id,
|
|
18
|
-
# Path param
|
|
19
|
+
# Path param: Notification template ID.
|
|
19
20
|
id:,
|
|
20
21
|
# Body param
|
|
21
22
|
checks:,
|
|
@@ -23,6 +24,7 @@ module Courier
|
|
|
23
24
|
)
|
|
24
25
|
end
|
|
25
26
|
|
|
27
|
+
# Retrieve the checks for a notification template submission.
|
|
26
28
|
sig do
|
|
27
29
|
params(
|
|
28
30
|
submission_id: String,
|
|
@@ -30,9 +32,16 @@ module Courier
|
|
|
30
32
|
request_options: Courier::RequestOptions::OrHash
|
|
31
33
|
).returns(Courier::Models::Notifications::CheckListResponse)
|
|
32
34
|
end
|
|
33
|
-
def list(
|
|
35
|
+
def list(
|
|
36
|
+
# Submission ID.
|
|
37
|
+
submission_id,
|
|
38
|
+
# Notification template ID.
|
|
39
|
+
id:,
|
|
40
|
+
request_options: {}
|
|
41
|
+
)
|
|
34
42
|
end
|
|
35
43
|
|
|
44
|
+
# Cancel a notification template submission.
|
|
36
45
|
sig do
|
|
37
46
|
params(
|
|
38
47
|
submission_id: String,
|
|
@@ -40,7 +49,13 @@ module Courier
|
|
|
40
49
|
request_options: Courier::RequestOptions::OrHash
|
|
41
50
|
).void
|
|
42
51
|
end
|
|
43
|
-
def delete(
|
|
52
|
+
def delete(
|
|
53
|
+
# Submission ID.
|
|
54
|
+
submission_id,
|
|
55
|
+
# Notification template ID.
|
|
56
|
+
id:,
|
|
57
|
+
request_options: {}
|
|
58
|
+
)
|
|
44
59
|
end
|
|
45
60
|
|
|
46
61
|
# @api private
|
|
@@ -13,11 +13,11 @@ module Courier
|
|
|
13
13
|
notification: Courier::NotificationTemplatePayload::OrHash,
|
|
14
14
|
state: Courier::NotificationTemplateCreateRequest::State::OrSymbol,
|
|
15
15
|
request_options: Courier::RequestOptions::OrHash
|
|
16
|
-
).returns(Courier::
|
|
16
|
+
).returns(Courier::NotificationTemplateResponse)
|
|
17
17
|
end
|
|
18
18
|
def create(
|
|
19
|
-
#
|
|
20
|
-
#
|
|
19
|
+
# Core template fields used in POST and PUT request bodies (nested under a
|
|
20
|
+
# `notification` key) and returned at the top level in responses.
|
|
21
21
|
notification:,
|
|
22
22
|
# Template state after creation. Case-insensitive input, normalized to uppercase
|
|
23
23
|
# in the response. Defaults to "DRAFT".
|
|
@@ -33,7 +33,7 @@ module Courier
|
|
|
33
33
|
id: String,
|
|
34
34
|
version: String,
|
|
35
35
|
request_options: Courier::RequestOptions::OrHash
|
|
36
|
-
).returns(Courier::
|
|
36
|
+
).returns(Courier::NotificationTemplateResponse)
|
|
37
37
|
end
|
|
38
38
|
def retrieve(
|
|
39
39
|
# Template ID (nt\_ prefix).
|
|
@@ -211,13 +211,13 @@ module Courier
|
|
|
211
211
|
notification: Courier::NotificationTemplatePayload::OrHash,
|
|
212
212
|
state: Courier::NotificationTemplateUpdateRequest::State::OrSymbol,
|
|
213
213
|
request_options: Courier::RequestOptions::OrHash
|
|
214
|
-
).returns(Courier::
|
|
214
|
+
).returns(Courier::NotificationTemplateResponse)
|
|
215
215
|
end
|
|
216
216
|
def replace(
|
|
217
217
|
# Template ID (nt\_ prefix).
|
|
218
218
|
id,
|
|
219
|
-
#
|
|
220
|
-
#
|
|
219
|
+
# Core template fields used in POST and PUT request bodies (nested under a
|
|
220
|
+
# `notification` key) and returned at the top level in responses.
|
|
221
221
|
notification:,
|
|
222
222
|
# Template state after update. Case-insensitive input, normalized to uppercase in
|
|
223
223
|
# the response. Defaults to "DRAFT".
|
|
@@ -44,6 +44,28 @@ module Courier
|
|
|
44
44
|
)
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
+
# Deletes the tenant's notification template with the given `template_id`.
|
|
48
|
+
#
|
|
49
|
+
# Returns **204 No Content** with an empty body on success.
|
|
50
|
+
#
|
|
51
|
+
# Returns **404** if there is no template with this ID for the tenant, including a
|
|
52
|
+
# second `DELETE` after a successful removal.
|
|
53
|
+
sig do
|
|
54
|
+
params(
|
|
55
|
+
template_id: String,
|
|
56
|
+
tenant_id: String,
|
|
57
|
+
request_options: Courier::RequestOptions::OrHash
|
|
58
|
+
).void
|
|
59
|
+
end
|
|
60
|
+
def delete(
|
|
61
|
+
# Id of the template to remove from the tenant.
|
|
62
|
+
template_id,
|
|
63
|
+
# Id of the tenant that owns the template.
|
|
64
|
+
tenant_id:,
|
|
65
|
+
request_options: {}
|
|
66
|
+
)
|
|
67
|
+
end
|
|
68
|
+
|
|
47
69
|
# Publishes a specific version of a notification template for a tenant.
|
|
48
70
|
#
|
|
49
71
|
# The template must already exist in the tenant's notification map. If no version
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type create_journey_request =
|
|
4
|
+
{
|
|
5
|
+
name: String,
|
|
6
|
+
nodes: ::Array[Courier::Models::journey_node],
|
|
7
|
+
enabled: bool,
|
|
8
|
+
state: Courier::Models::journey_state
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class CreateJourneyRequest < Courier::Internal::Type::BaseModel
|
|
12
|
+
attr_accessor name: String
|
|
13
|
+
|
|
14
|
+
attr_accessor nodes: ::Array[Courier::Models::journey_node]
|
|
15
|
+
|
|
16
|
+
attr_reader enabled: bool?
|
|
17
|
+
|
|
18
|
+
def enabled=: (bool) -> bool
|
|
19
|
+
|
|
20
|
+
attr_reader state: Courier::Models::journey_state?
|
|
21
|
+
|
|
22
|
+
def state=: (
|
|
23
|
+
Courier::Models::journey_state
|
|
24
|
+
) -> Courier::Models::journey_state
|
|
25
|
+
|
|
26
|
+
def initialize: (
|
|
27
|
+
name: String,
|
|
28
|
+
nodes: ::Array[Courier::Models::journey_node],
|
|
29
|
+
?enabled: bool,
|
|
30
|
+
?state: Courier::Models::journey_state
|
|
31
|
+
) -> void
|
|
32
|
+
|
|
33
|
+
def to_hash: -> {
|
|
34
|
+
name: String,
|
|
35
|
+
nodes: ::Array[Courier::Models::journey_node],
|
|
36
|
+
enabled: bool,
|
|
37
|
+
state: Courier::Models::journey_state
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
module Courier
|
|
2
|
+
module Models
|
|
3
|
+
type journey_ai_node =
|
|
4
|
+
{
|
|
5
|
+
output_schema: ::Hash[Symbol, top],
|
|
6
|
+
type: Courier::Models::JourneyAINode::type_,
|
|
7
|
+
id: String,
|
|
8
|
+
conditions: Courier::Models::journey_conditions_field,
|
|
9
|
+
model: String,
|
|
10
|
+
user_prompt: String,
|
|
11
|
+
web_search: bool
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
class JourneyAINode < Courier::Internal::Type::BaseModel
|
|
15
|
+
attr_accessor output_schema: ::Hash[Symbol, top]
|
|
16
|
+
|
|
17
|
+
attr_accessor type: Courier::Models::JourneyAINode::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
|
+
attr_reader model: String?
|
|
30
|
+
|
|
31
|
+
def model=: (String) -> String
|
|
32
|
+
|
|
33
|
+
attr_reader user_prompt: String?
|
|
34
|
+
|
|
35
|
+
def user_prompt=: (String) -> String
|
|
36
|
+
|
|
37
|
+
attr_reader web_search: bool?
|
|
38
|
+
|
|
39
|
+
def web_search=: (bool) -> bool
|
|
40
|
+
|
|
41
|
+
def initialize: (
|
|
42
|
+
output_schema: ::Hash[Symbol, top],
|
|
43
|
+
type: Courier::Models::JourneyAINode::type_,
|
|
44
|
+
?id: String,
|
|
45
|
+
?conditions: Courier::Models::journey_conditions_field,
|
|
46
|
+
?model: String,
|
|
47
|
+
?user_prompt: String,
|
|
48
|
+
?web_search: bool
|
|
49
|
+
) -> void
|
|
50
|
+
|
|
51
|
+
def to_hash: -> {
|
|
52
|
+
output_schema: ::Hash[Symbol, top],
|
|
53
|
+
type: Courier::Models::JourneyAINode::type_,
|
|
54
|
+
id: String,
|
|
55
|
+
conditions: Courier::Models::journey_conditions_field,
|
|
56
|
+
model: String,
|
|
57
|
+
user_prompt: String,
|
|
58
|
+
web_search: bool
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
type type_ = :ai
|
|
62
|
+
|
|
63
|
+
module Type
|
|
64
|
+
extend Courier::Internal::Type::Enum
|
|
65
|
+
|
|
66
|
+
AI: :ai
|
|
67
|
+
|
|
68
|
+
def self?.values: -> ::Array[Courier::Models::JourneyAINode::type_]
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
@@ -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,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
|