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
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module Courier
|
|
4
|
-
module Models
|
|
5
|
-
class NotificationTemplateGetResponse < Courier::Internal::Type::BaseModel
|
|
6
|
-
OrHash =
|
|
7
|
-
T.type_alias do
|
|
8
|
-
T.any(
|
|
9
|
-
Courier::NotificationTemplateGetResponse,
|
|
10
|
-
Courier::Internal::AnyHash
|
|
11
|
-
)
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
# Epoch milliseconds when the template was created.
|
|
15
|
-
sig { returns(Integer) }
|
|
16
|
-
attr_accessor :created
|
|
17
|
-
|
|
18
|
-
# User ID of the creator.
|
|
19
|
-
sig { returns(String) }
|
|
20
|
-
attr_accessor :creator
|
|
21
|
-
|
|
22
|
-
# Full document shape used in POST and PUT request bodies, and returned inside the
|
|
23
|
-
# GET response envelope.
|
|
24
|
-
sig { returns(Courier::NotificationTemplateGetResponse::Notification) }
|
|
25
|
-
attr_reader :notification
|
|
26
|
-
|
|
27
|
-
sig do
|
|
28
|
-
params(
|
|
29
|
-
notification:
|
|
30
|
-
Courier::NotificationTemplateGetResponse::Notification::OrHash
|
|
31
|
-
).void
|
|
32
|
-
end
|
|
33
|
-
attr_writer :notification
|
|
34
|
-
|
|
35
|
-
# The template state. Always uppercase.
|
|
36
|
-
sig do
|
|
37
|
-
returns(Courier::NotificationTemplateGetResponse::State::TaggedSymbol)
|
|
38
|
-
end
|
|
39
|
-
attr_accessor :state
|
|
40
|
-
|
|
41
|
-
# Epoch milliseconds of last update.
|
|
42
|
-
sig { returns(T.nilable(Integer)) }
|
|
43
|
-
attr_reader :updated
|
|
44
|
-
|
|
45
|
-
sig { params(updated: Integer).void }
|
|
46
|
-
attr_writer :updated
|
|
47
|
-
|
|
48
|
-
# User ID of the last updater.
|
|
49
|
-
sig { returns(T.nilable(String)) }
|
|
50
|
-
attr_reader :updater
|
|
51
|
-
|
|
52
|
-
sig { params(updater: String).void }
|
|
53
|
-
attr_writer :updater
|
|
54
|
-
|
|
55
|
-
# Envelope response for GET /notifications/{id}. The notification object mirrors
|
|
56
|
-
# the POST/PUT input shape. Nullable fields return null when unset.
|
|
57
|
-
sig do
|
|
58
|
-
params(
|
|
59
|
-
created: Integer,
|
|
60
|
-
creator: String,
|
|
61
|
-
notification:
|
|
62
|
-
Courier::NotificationTemplateGetResponse::Notification::OrHash,
|
|
63
|
-
state: Courier::NotificationTemplateGetResponse::State::OrSymbol,
|
|
64
|
-
updated: Integer,
|
|
65
|
-
updater: String
|
|
66
|
-
).returns(T.attached_class)
|
|
67
|
-
end
|
|
68
|
-
def self.new(
|
|
69
|
-
# Epoch milliseconds when the template was created.
|
|
70
|
-
created:,
|
|
71
|
-
# User ID of the creator.
|
|
72
|
-
creator:,
|
|
73
|
-
# Full document shape used in POST and PUT request bodies, and returned inside the
|
|
74
|
-
# GET response envelope.
|
|
75
|
-
notification:,
|
|
76
|
-
# The template state. Always uppercase.
|
|
77
|
-
state:,
|
|
78
|
-
# Epoch milliseconds of last update.
|
|
79
|
-
updated: nil,
|
|
80
|
-
# User ID of the last updater.
|
|
81
|
-
updater: nil
|
|
82
|
-
)
|
|
83
|
-
end
|
|
84
|
-
|
|
85
|
-
sig do
|
|
86
|
-
override.returns(
|
|
87
|
-
{
|
|
88
|
-
created: Integer,
|
|
89
|
-
creator: String,
|
|
90
|
-
notification:
|
|
91
|
-
Courier::NotificationTemplateGetResponse::Notification,
|
|
92
|
-
state:
|
|
93
|
-
Courier::NotificationTemplateGetResponse::State::TaggedSymbol,
|
|
94
|
-
updated: Integer,
|
|
95
|
-
updater: String
|
|
96
|
-
}
|
|
97
|
-
)
|
|
98
|
-
end
|
|
99
|
-
def to_hash
|
|
100
|
-
end
|
|
101
|
-
|
|
102
|
-
class Notification < Courier::Models::NotificationTemplatePayload
|
|
103
|
-
OrHash =
|
|
104
|
-
T.type_alias do
|
|
105
|
-
T.any(
|
|
106
|
-
Courier::NotificationTemplateGetResponse::Notification,
|
|
107
|
-
Courier::Internal::AnyHash
|
|
108
|
-
)
|
|
109
|
-
end
|
|
110
|
-
|
|
111
|
-
# The template ID.
|
|
112
|
-
sig { returns(String) }
|
|
113
|
-
attr_accessor :id
|
|
114
|
-
|
|
115
|
-
# Full document shape used in POST and PUT request bodies, and returned inside the
|
|
116
|
-
# GET response envelope.
|
|
117
|
-
sig { params(id: String).returns(T.attached_class) }
|
|
118
|
-
def self.new(
|
|
119
|
-
# The template ID.
|
|
120
|
-
id:
|
|
121
|
-
)
|
|
122
|
-
end
|
|
123
|
-
|
|
124
|
-
sig { override.returns({ id: String }) }
|
|
125
|
-
def to_hash
|
|
126
|
-
end
|
|
127
|
-
end
|
|
128
|
-
|
|
129
|
-
# The template state. Always uppercase.
|
|
130
|
-
module State
|
|
131
|
-
extend Courier::Internal::Type::Enum
|
|
132
|
-
|
|
133
|
-
TaggedSymbol =
|
|
134
|
-
T.type_alias do
|
|
135
|
-
T.all(Symbol, Courier::NotificationTemplateGetResponse::State)
|
|
136
|
-
end
|
|
137
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
138
|
-
|
|
139
|
-
DRAFT =
|
|
140
|
-
T.let(
|
|
141
|
-
:DRAFT,
|
|
142
|
-
Courier::NotificationTemplateGetResponse::State::TaggedSymbol
|
|
143
|
-
)
|
|
144
|
-
PUBLISHED =
|
|
145
|
-
T.let(
|
|
146
|
-
:PUBLISHED,
|
|
147
|
-
Courier::NotificationTemplateGetResponse::State::TaggedSymbol
|
|
148
|
-
)
|
|
149
|
-
|
|
150
|
-
sig do
|
|
151
|
-
override.returns(
|
|
152
|
-
T::Array[
|
|
153
|
-
Courier::NotificationTemplateGetResponse::State::TaggedSymbol
|
|
154
|
-
]
|
|
155
|
-
)
|
|
156
|
-
end
|
|
157
|
-
def self.values
|
|
158
|
-
end
|
|
159
|
-
end
|
|
160
|
-
end
|
|
161
|
-
end
|
|
162
|
-
end
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
module Courier
|
|
2
|
-
module Models
|
|
3
|
-
type notification_template_get_response =
|
|
4
|
-
{
|
|
5
|
-
created: Integer,
|
|
6
|
-
creator: String,
|
|
7
|
-
notification: Courier::NotificationTemplateGetResponse::Notification,
|
|
8
|
-
state: Courier::Models::NotificationTemplateGetResponse::state,
|
|
9
|
-
updated: Integer,
|
|
10
|
-
updater: String
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
class NotificationTemplateGetResponse < Courier::Internal::Type::BaseModel
|
|
14
|
-
attr_accessor created: Integer
|
|
15
|
-
|
|
16
|
-
attr_accessor creator: String
|
|
17
|
-
|
|
18
|
-
attr_accessor notification: Courier::NotificationTemplateGetResponse::Notification
|
|
19
|
-
|
|
20
|
-
attr_accessor state: Courier::Models::NotificationTemplateGetResponse::state
|
|
21
|
-
|
|
22
|
-
attr_reader updated: Integer?
|
|
23
|
-
|
|
24
|
-
def updated=: (Integer) -> Integer
|
|
25
|
-
|
|
26
|
-
attr_reader updater: String?
|
|
27
|
-
|
|
28
|
-
def updater=: (String) -> String
|
|
29
|
-
|
|
30
|
-
def initialize: (
|
|
31
|
-
created: Integer,
|
|
32
|
-
creator: String,
|
|
33
|
-
notification: Courier::NotificationTemplateGetResponse::Notification,
|
|
34
|
-
state: Courier::Models::NotificationTemplateGetResponse::state,
|
|
35
|
-
?updated: Integer,
|
|
36
|
-
?updater: String
|
|
37
|
-
) -> void
|
|
38
|
-
|
|
39
|
-
def to_hash: -> {
|
|
40
|
-
created: Integer,
|
|
41
|
-
creator: String,
|
|
42
|
-
notification: Courier::NotificationTemplateGetResponse::Notification,
|
|
43
|
-
state: Courier::Models::NotificationTemplateGetResponse::state,
|
|
44
|
-
updated: Integer,
|
|
45
|
-
updater: String
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
type notification = { id: String }
|
|
49
|
-
|
|
50
|
-
class Notification < Courier::Models::NotificationTemplatePayload
|
|
51
|
-
def id: -> String
|
|
52
|
-
|
|
53
|
-
def id=: (String _) -> String
|
|
54
|
-
|
|
55
|
-
def initialize: (id: String) -> void
|
|
56
|
-
|
|
57
|
-
def to_hash: -> { id: String }
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
type state = :DRAFT | :PUBLISHED
|
|
61
|
-
|
|
62
|
-
module State
|
|
63
|
-
extend Courier::Internal::Type::Enum
|
|
64
|
-
|
|
65
|
-
DRAFT: :DRAFT
|
|
66
|
-
PUBLISHED: :PUBLISHED
|
|
67
|
-
|
|
68
|
-
def self?.values: -> ::Array[Courier::Models::NotificationTemplateGetResponse::state]
|
|
69
|
-
end
|
|
70
|
-
end
|
|
71
|
-
end
|
|
72
|
-
end
|