ark-email 0.9.0 → 0.10.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 +8 -0
- data/README.md +1 -1
- data/lib/ark_email/models/email_retrieve_deliveries_response.rb +148 -8
- data/lib/ark_email/resources/emails.rb +41 -3
- data/lib/ark_email/version.rb +1 -1
- data/rbi/ark_email/models/email_retrieve_deliveries_response.rbi +247 -10
- data/rbi/ark_email/resources/emails.rbi +45 -3
- data/sig/ark_email/models/email_retrieve_deliveries_response.rbs +85 -7
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a5bff73c450d51ba2c0214d2fa1a15c67c3252e32ba41754b22ba947d333c6c9
|
|
4
|
+
data.tar.gz: bef229fb5def2ff8711e410cb00e86e882828d4fa427b46f96c0d06155d0b48b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 70ebcf12bce9fc793a3c383f026a338cb896101ca7eebb1a912b6ca1fca41006dc30e2e68705c80d43d61792b1739d5f89249e9062266ea847ee0c11c40f1f3e
|
|
7
|
+
data.tar.gz: a14f81353ad5109090ebb94092fd81d378ebc374b24f9a202533510ab3515744487316aabcf11175f6ba042846fbd91a6bf87b5003d3e38b0112598a202652a3
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.0 (2026-01-22)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.9.0...v0.10.0](https://github.com/ArkHQ-io/ark-ruby/compare/v0.9.0...v0.10.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** improve GET delivery attempts ([863df8e](https://github.com/ArkHQ-io/ark-ruby/commit/863df8e1ca7e4e29f44fdd1ffb9583fc71e5245e))
|
|
10
|
+
|
|
3
11
|
## 0.9.0 (2026-01-21)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v0.8.0...v0.9.0](https://github.com/ArkHQ-io/ark-ruby/compare/v0.8.0...v0.9.0)
|
data/README.md
CHANGED
|
@@ -26,30 +26,72 @@ module ArkEmail
|
|
|
26
26
|
|
|
27
27
|
# @see ArkEmail::Models::EmailRetrieveDeliveriesResponse#data
|
|
28
28
|
class Data < ArkEmail::Internal::Type::BaseModel
|
|
29
|
+
# @!attribute can_retry_manually
|
|
30
|
+
# Whether the message can be manually retried via `POST /emails/{emailId}/retry`.
|
|
31
|
+
# `true` when the raw message content is still available (not expired). Messages
|
|
32
|
+
# older than the retention period cannot be retried.
|
|
33
|
+
#
|
|
34
|
+
# @return [Boolean]
|
|
35
|
+
required :can_retry_manually, ArkEmail::Internal::Type::Boolean, api_name: :canRetryManually
|
|
36
|
+
|
|
29
37
|
# @!attribute deliveries
|
|
38
|
+
# Chronological list of delivery attempts for this message. Each attempt includes
|
|
39
|
+
# SMTP response codes and timestamps.
|
|
30
40
|
#
|
|
31
41
|
# @return [Array<ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Delivery>]
|
|
32
42
|
required :deliveries,
|
|
33
43
|
-> { ArkEmail::Internal::Type::ArrayOf[ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Delivery] }
|
|
34
44
|
|
|
35
45
|
# @!attribute message_id
|
|
36
|
-
# Internal message ID
|
|
46
|
+
# Internal numeric message ID
|
|
37
47
|
#
|
|
38
|
-
# @return [
|
|
39
|
-
required :message_id,
|
|
48
|
+
# @return [Integer]
|
|
49
|
+
required :message_id, Integer, api_name: :messageId
|
|
40
50
|
|
|
41
51
|
# @!attribute message_token
|
|
42
|
-
#
|
|
52
|
+
# Unique message token for API references
|
|
43
53
|
#
|
|
44
54
|
# @return [String]
|
|
45
55
|
required :message_token, String, api_name: :messageToken
|
|
46
56
|
|
|
47
|
-
# @!
|
|
48
|
-
#
|
|
57
|
+
# @!attribute retry_state
|
|
58
|
+
# Information about the current retry state of a message that is queued for
|
|
59
|
+
# delivery. Only present when the message is in the delivery queue.
|
|
49
60
|
#
|
|
50
|
-
# @
|
|
61
|
+
# @return [ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::RetryState, nil]
|
|
62
|
+
required :retry_state,
|
|
63
|
+
-> { ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::RetryState },
|
|
64
|
+
api_name: :retryState,
|
|
65
|
+
nil?: true
|
|
66
|
+
|
|
67
|
+
# @!attribute status
|
|
68
|
+
# Current message status (lowercase). Possible values:
|
|
69
|
+
#
|
|
70
|
+
# - `pending` - Initial state, awaiting first delivery attempt
|
|
71
|
+
# - `sent` - Successfully delivered
|
|
72
|
+
# - `softfail` - Temporary failure, will retry automatically
|
|
73
|
+
# - `hardfail` - Permanent failure, will not retry
|
|
74
|
+
# - `held` - Held for manual review (suppression list, etc.)
|
|
75
|
+
# - `bounced` - Bounced by recipient server
|
|
51
76
|
#
|
|
52
|
-
# @
|
|
77
|
+
# @return [Symbol, ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Status]
|
|
78
|
+
required :status, enum: -> { ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Status }
|
|
79
|
+
|
|
80
|
+
# @!method initialize(can_retry_manually:, deliveries:, message_id:, message_token:, retry_state:, status:)
|
|
81
|
+
# Some parameter documentations has been truncated, see
|
|
82
|
+
# {ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data} for more details.
|
|
83
|
+
#
|
|
84
|
+
# @param can_retry_manually [Boolean] Whether the message can be manually retried via `POST /emails/{emailId}/retry`.
|
|
85
|
+
#
|
|
86
|
+
# @param deliveries [Array<ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Delivery>] Chronological list of delivery attempts for this message.
|
|
87
|
+
#
|
|
88
|
+
# @param message_id [Integer] Internal numeric message ID
|
|
89
|
+
#
|
|
90
|
+
# @param message_token [String] Unique message token for API references
|
|
91
|
+
#
|
|
92
|
+
# @param retry_state [ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::RetryState, nil] Information about the current retry state of a message that is queued for delive
|
|
93
|
+
#
|
|
94
|
+
# @param status [Symbol, ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Status] Current message status (lowercase). Possible values:
|
|
53
95
|
|
|
54
96
|
class Delivery < ArkEmail::Internal::Type::BaseModel
|
|
55
97
|
# @!attribute id
|
|
@@ -117,6 +159,104 @@ module ArkEmail
|
|
|
117
159
|
#
|
|
118
160
|
# @param sent_with_ssl [Boolean] Whether TLS was used
|
|
119
161
|
end
|
|
162
|
+
|
|
163
|
+
# @see ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data#retry_state
|
|
164
|
+
class RetryState < ArkEmail::Internal::Type::BaseModel
|
|
165
|
+
# @!attribute attempt
|
|
166
|
+
# Current attempt number (0-indexed). The first delivery attempt is 0, the first
|
|
167
|
+
# retry is 1, and so on.
|
|
168
|
+
#
|
|
169
|
+
# @return [Integer]
|
|
170
|
+
required :attempt, Integer
|
|
171
|
+
|
|
172
|
+
# @!attribute attempts_remaining
|
|
173
|
+
# Number of attempts remaining before the message is hard-failed. Calculated as
|
|
174
|
+
# `maxAttempts - attempt`.
|
|
175
|
+
#
|
|
176
|
+
# @return [Integer]
|
|
177
|
+
required :attempts_remaining, Integer, api_name: :attemptsRemaining
|
|
178
|
+
|
|
179
|
+
# @!attribute manual
|
|
180
|
+
# Whether this queue entry was created by a manual retry request. Manual retries
|
|
181
|
+
# bypass certain hold conditions like suppression lists.
|
|
182
|
+
#
|
|
183
|
+
# @return [Boolean]
|
|
184
|
+
required :manual, ArkEmail::Internal::Type::Boolean
|
|
185
|
+
|
|
186
|
+
# @!attribute max_attempts
|
|
187
|
+
# Maximum number of delivery attempts before the message is hard-failed.
|
|
188
|
+
# Configured at the server level.
|
|
189
|
+
#
|
|
190
|
+
# @return [Integer]
|
|
191
|
+
required :max_attempts, Integer, api_name: :maxAttempts
|
|
192
|
+
|
|
193
|
+
# @!attribute processing
|
|
194
|
+
# Whether the message is currently being processed by a delivery worker. When
|
|
195
|
+
# `true`, the message is actively being sent.
|
|
196
|
+
#
|
|
197
|
+
# @return [Boolean]
|
|
198
|
+
required :processing, ArkEmail::Internal::Type::Boolean
|
|
199
|
+
|
|
200
|
+
# @!attribute next_retry_at
|
|
201
|
+
# Unix timestamp of when the next retry attempt is scheduled. `null` if the
|
|
202
|
+
# message is ready for immediate processing or currently being processed.
|
|
203
|
+
#
|
|
204
|
+
# @return [Float, nil]
|
|
205
|
+
optional :next_retry_at, Float, api_name: :nextRetryAt, nil?: true
|
|
206
|
+
|
|
207
|
+
# @!attribute next_retry_at_iso
|
|
208
|
+
# ISO 8601 formatted timestamp of the next retry attempt. `null` if the message is
|
|
209
|
+
# ready for immediate processing.
|
|
210
|
+
#
|
|
211
|
+
# @return [Time, nil]
|
|
212
|
+
optional :next_retry_at_iso, Time, api_name: :nextRetryAtIso, nil?: true
|
|
213
|
+
|
|
214
|
+
# @!method initialize(attempt:, attempts_remaining:, manual:, max_attempts:, processing:, next_retry_at: nil, next_retry_at_iso: nil)
|
|
215
|
+
# Some parameter documentations has been truncated, see
|
|
216
|
+
# {ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::RetryState} for more
|
|
217
|
+
# details.
|
|
218
|
+
#
|
|
219
|
+
# Information about the current retry state of a message that is queued for
|
|
220
|
+
# delivery. Only present when the message is in the delivery queue.
|
|
221
|
+
#
|
|
222
|
+
# @param attempt [Integer] Current attempt number (0-indexed). The first delivery attempt is 0,
|
|
223
|
+
#
|
|
224
|
+
# @param attempts_remaining [Integer] Number of attempts remaining before the message is hard-failed.
|
|
225
|
+
#
|
|
226
|
+
# @param manual [Boolean] Whether this queue entry was created by a manual retry request.
|
|
227
|
+
#
|
|
228
|
+
# @param max_attempts [Integer] Maximum number of delivery attempts before the message is hard-failed.
|
|
229
|
+
#
|
|
230
|
+
# @param processing [Boolean] Whether the message is currently being processed by a delivery worker.
|
|
231
|
+
#
|
|
232
|
+
# @param next_retry_at [Float, nil] Unix timestamp of when the next retry attempt is scheduled.
|
|
233
|
+
#
|
|
234
|
+
# @param next_retry_at_iso [Time, nil] ISO 8601 formatted timestamp of the next retry attempt.
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Current message status (lowercase). Possible values:
|
|
238
|
+
#
|
|
239
|
+
# - `pending` - Initial state, awaiting first delivery attempt
|
|
240
|
+
# - `sent` - Successfully delivered
|
|
241
|
+
# - `softfail` - Temporary failure, will retry automatically
|
|
242
|
+
# - `hardfail` - Permanent failure, will not retry
|
|
243
|
+
# - `held` - Held for manual review (suppression list, etc.)
|
|
244
|
+
# - `bounced` - Bounced by recipient server
|
|
245
|
+
#
|
|
246
|
+
# @see ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data#status
|
|
247
|
+
module Status
|
|
248
|
+
extend ArkEmail::Internal::Type::Enum
|
|
249
|
+
|
|
250
|
+
PENDING = :pending
|
|
251
|
+
SENT = :sent
|
|
252
|
+
SOFTFAIL = :softfail
|
|
253
|
+
HARDFAIL = :hardfail
|
|
254
|
+
HELD = :held
|
|
255
|
+
BOUNCED = :bounced
|
|
256
|
+
|
|
257
|
+
# @!method self.values
|
|
258
|
+
# @return [Array<Symbol>]
|
|
259
|
+
end
|
|
120
260
|
end
|
|
121
261
|
end
|
|
122
262
|
end
|
|
@@ -82,12 +82,50 @@ module ArkEmail
|
|
|
82
82
|
)
|
|
83
83
|
end
|
|
84
84
|
|
|
85
|
-
#
|
|
86
|
-
#
|
|
85
|
+
# Some parameter documentations has been truncated, see
|
|
86
|
+
# {ArkEmail::Models::EmailRetrieveDeliveriesParams} for more details.
|
|
87
|
+
#
|
|
88
|
+
# Get the complete delivery history for an email, including SMTP response codes,
|
|
89
|
+
# timestamps, and current retry state.
|
|
90
|
+
#
|
|
91
|
+
# ## Response Fields
|
|
92
|
+
#
|
|
93
|
+
# ### Status
|
|
94
|
+
#
|
|
95
|
+
# The current status of the email:
|
|
96
|
+
#
|
|
97
|
+
# - `pending` - Awaiting first delivery attempt
|
|
98
|
+
# - `sent` - Successfully delivered to recipient server
|
|
99
|
+
# - `softfail` - Temporary failure, automatic retry scheduled
|
|
100
|
+
# - `hardfail` - Permanent failure, will not retry
|
|
101
|
+
# - `held` - Held for manual review
|
|
102
|
+
# - `bounced` - Bounced by recipient server
|
|
103
|
+
#
|
|
104
|
+
# ### Retry State
|
|
105
|
+
#
|
|
106
|
+
# When the email is in the delivery queue (`pending` or `softfail` status),
|
|
107
|
+
# `retryState` provides information about the retry schedule:
|
|
108
|
+
#
|
|
109
|
+
# - `attempt` - Current attempt number (0 = first attempt)
|
|
110
|
+
# - `maxAttempts` - Maximum attempts before hard-fail (typically 18)
|
|
111
|
+
# - `attemptsRemaining` - Attempts left before hard-fail
|
|
112
|
+
# - `nextRetryAt` - When the next retry is scheduled (Unix timestamp)
|
|
113
|
+
# - `processing` - Whether the email is currently being processed
|
|
114
|
+
# - `manual` - Whether this was triggered by a manual retry
|
|
115
|
+
#
|
|
116
|
+
# When the email has finished processing (`sent`, `hardfail`, `held`, `bounced`),
|
|
117
|
+
# `retryState` is `null`.
|
|
118
|
+
#
|
|
119
|
+
# ### Can Retry Manually
|
|
120
|
+
#
|
|
121
|
+
# Indicates whether you can call `POST /emails/{emailId}/retry` to manually retry
|
|
122
|
+
# the email. This is `true` when the raw message content is still available (not
|
|
123
|
+
# expired due to retention policy).
|
|
87
124
|
#
|
|
88
125
|
# @overload retrieve_deliveries(email_id, request_options: {})
|
|
89
126
|
#
|
|
90
|
-
# @param email_id [String]
|
|
127
|
+
# @param email_id [String] Email identifier. Accepts multiple formats:
|
|
128
|
+
#
|
|
91
129
|
# @param request_options [ArkEmail::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
92
130
|
#
|
|
93
131
|
# @return [ArkEmail::Models::EmailRetrieveDeliveriesResponse]
|
data/lib/ark_email/version.rb
CHANGED
|
@@ -61,6 +61,14 @@ module ArkEmail
|
|
|
61
61
|
)
|
|
62
62
|
end
|
|
63
63
|
|
|
64
|
+
# Whether the message can be manually retried via `POST /emails/{emailId}/retry`.
|
|
65
|
+
# `true` when the raw message content is still available (not expired). Messages
|
|
66
|
+
# older than the retention period cannot be retried.
|
|
67
|
+
sig { returns(T::Boolean) }
|
|
68
|
+
attr_accessor :can_retry_manually
|
|
69
|
+
|
|
70
|
+
# Chronological list of delivery attempts for this message. Each attempt includes
|
|
71
|
+
# SMTP response codes and timestamps.
|
|
64
72
|
sig do
|
|
65
73
|
returns(
|
|
66
74
|
T::Array[
|
|
@@ -70,42 +78,110 @@ module ArkEmail
|
|
|
70
78
|
end
|
|
71
79
|
attr_accessor :deliveries
|
|
72
80
|
|
|
73
|
-
# Internal message ID
|
|
74
|
-
sig { returns(
|
|
81
|
+
# Internal numeric message ID
|
|
82
|
+
sig { returns(Integer) }
|
|
75
83
|
attr_accessor :message_id
|
|
76
84
|
|
|
77
|
-
#
|
|
85
|
+
# Unique message token for API references
|
|
78
86
|
sig { returns(String) }
|
|
79
87
|
attr_accessor :message_token
|
|
80
88
|
|
|
89
|
+
# Information about the current retry state of a message that is queued for
|
|
90
|
+
# delivery. Only present when the message is in the delivery queue.
|
|
91
|
+
sig do
|
|
92
|
+
returns(
|
|
93
|
+
T.nilable(
|
|
94
|
+
ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::RetryState
|
|
95
|
+
)
|
|
96
|
+
)
|
|
97
|
+
end
|
|
98
|
+
attr_reader :retry_state
|
|
99
|
+
|
|
100
|
+
sig do
|
|
101
|
+
params(
|
|
102
|
+
retry_state:
|
|
103
|
+
T.nilable(
|
|
104
|
+
ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::RetryState::OrHash
|
|
105
|
+
)
|
|
106
|
+
).void
|
|
107
|
+
end
|
|
108
|
+
attr_writer :retry_state
|
|
109
|
+
|
|
110
|
+
# Current message status (lowercase). Possible values:
|
|
111
|
+
#
|
|
112
|
+
# - `pending` - Initial state, awaiting first delivery attempt
|
|
113
|
+
# - `sent` - Successfully delivered
|
|
114
|
+
# - `softfail` - Temporary failure, will retry automatically
|
|
115
|
+
# - `hardfail` - Permanent failure, will not retry
|
|
116
|
+
# - `held` - Held for manual review (suppression list, etc.)
|
|
117
|
+
# - `bounced` - Bounced by recipient server
|
|
118
|
+
sig do
|
|
119
|
+
returns(
|
|
120
|
+
ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Status::TaggedSymbol
|
|
121
|
+
)
|
|
122
|
+
end
|
|
123
|
+
attr_accessor :status
|
|
124
|
+
|
|
81
125
|
sig do
|
|
82
126
|
params(
|
|
127
|
+
can_retry_manually: T::Boolean,
|
|
83
128
|
deliveries:
|
|
84
129
|
T::Array[
|
|
85
130
|
ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Delivery::OrHash
|
|
86
131
|
],
|
|
87
|
-
message_id:
|
|
88
|
-
message_token: String
|
|
132
|
+
message_id: Integer,
|
|
133
|
+
message_token: String,
|
|
134
|
+
retry_state:
|
|
135
|
+
T.nilable(
|
|
136
|
+
ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::RetryState::OrHash
|
|
137
|
+
),
|
|
138
|
+
status:
|
|
139
|
+
ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Status::OrSymbol
|
|
89
140
|
).returns(T.attached_class)
|
|
90
141
|
end
|
|
91
142
|
def self.new(
|
|
143
|
+
# Whether the message can be manually retried via `POST /emails/{emailId}/retry`.
|
|
144
|
+
# `true` when the raw message content is still available (not expired). Messages
|
|
145
|
+
# older than the retention period cannot be retried.
|
|
146
|
+
can_retry_manually:,
|
|
147
|
+
# Chronological list of delivery attempts for this message. Each attempt includes
|
|
148
|
+
# SMTP response codes and timestamps.
|
|
92
149
|
deliveries:,
|
|
93
|
-
# Internal message ID
|
|
150
|
+
# Internal numeric message ID
|
|
94
151
|
message_id:,
|
|
95
|
-
#
|
|
96
|
-
message_token
|
|
152
|
+
# Unique message token for API references
|
|
153
|
+
message_token:,
|
|
154
|
+
# Information about the current retry state of a message that is queued for
|
|
155
|
+
# delivery. Only present when the message is in the delivery queue.
|
|
156
|
+
retry_state:,
|
|
157
|
+
# Current message status (lowercase). Possible values:
|
|
158
|
+
#
|
|
159
|
+
# - `pending` - Initial state, awaiting first delivery attempt
|
|
160
|
+
# - `sent` - Successfully delivered
|
|
161
|
+
# - `softfail` - Temporary failure, will retry automatically
|
|
162
|
+
# - `hardfail` - Permanent failure, will not retry
|
|
163
|
+
# - `held` - Held for manual review (suppression list, etc.)
|
|
164
|
+
# - `bounced` - Bounced by recipient server
|
|
165
|
+
status:
|
|
97
166
|
)
|
|
98
167
|
end
|
|
99
168
|
|
|
100
169
|
sig do
|
|
101
170
|
override.returns(
|
|
102
171
|
{
|
|
172
|
+
can_retry_manually: T::Boolean,
|
|
103
173
|
deliveries:
|
|
104
174
|
T::Array[
|
|
105
175
|
ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Delivery
|
|
106
176
|
],
|
|
107
|
-
message_id:
|
|
108
|
-
message_token: String
|
|
177
|
+
message_id: Integer,
|
|
178
|
+
message_token: String,
|
|
179
|
+
retry_state:
|
|
180
|
+
T.nilable(
|
|
181
|
+
ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::RetryState
|
|
182
|
+
),
|
|
183
|
+
status:
|
|
184
|
+
ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Status::TaggedSymbol
|
|
109
185
|
}
|
|
110
186
|
)
|
|
111
187
|
end
|
|
@@ -214,6 +290,167 @@ module ArkEmail
|
|
|
214
290
|
def to_hash
|
|
215
291
|
end
|
|
216
292
|
end
|
|
293
|
+
|
|
294
|
+
class RetryState < ArkEmail::Internal::Type::BaseModel
|
|
295
|
+
OrHash =
|
|
296
|
+
T.type_alias do
|
|
297
|
+
T.any(
|
|
298
|
+
ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::RetryState,
|
|
299
|
+
ArkEmail::Internal::AnyHash
|
|
300
|
+
)
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
# Current attempt number (0-indexed). The first delivery attempt is 0, the first
|
|
304
|
+
# retry is 1, and so on.
|
|
305
|
+
sig { returns(Integer) }
|
|
306
|
+
attr_accessor :attempt
|
|
307
|
+
|
|
308
|
+
# Number of attempts remaining before the message is hard-failed. Calculated as
|
|
309
|
+
# `maxAttempts - attempt`.
|
|
310
|
+
sig { returns(Integer) }
|
|
311
|
+
attr_accessor :attempts_remaining
|
|
312
|
+
|
|
313
|
+
# Whether this queue entry was created by a manual retry request. Manual retries
|
|
314
|
+
# bypass certain hold conditions like suppression lists.
|
|
315
|
+
sig { returns(T::Boolean) }
|
|
316
|
+
attr_accessor :manual
|
|
317
|
+
|
|
318
|
+
# Maximum number of delivery attempts before the message is hard-failed.
|
|
319
|
+
# Configured at the server level.
|
|
320
|
+
sig { returns(Integer) }
|
|
321
|
+
attr_accessor :max_attempts
|
|
322
|
+
|
|
323
|
+
# Whether the message is currently being processed by a delivery worker. When
|
|
324
|
+
# `true`, the message is actively being sent.
|
|
325
|
+
sig { returns(T::Boolean) }
|
|
326
|
+
attr_accessor :processing
|
|
327
|
+
|
|
328
|
+
# Unix timestamp of when the next retry attempt is scheduled. `null` if the
|
|
329
|
+
# message is ready for immediate processing or currently being processed.
|
|
330
|
+
sig { returns(T.nilable(Float)) }
|
|
331
|
+
attr_accessor :next_retry_at
|
|
332
|
+
|
|
333
|
+
# ISO 8601 formatted timestamp of the next retry attempt. `null` if the message is
|
|
334
|
+
# ready for immediate processing.
|
|
335
|
+
sig { returns(T.nilable(Time)) }
|
|
336
|
+
attr_accessor :next_retry_at_iso
|
|
337
|
+
|
|
338
|
+
# Information about the current retry state of a message that is queued for
|
|
339
|
+
# delivery. Only present when the message is in the delivery queue.
|
|
340
|
+
sig do
|
|
341
|
+
params(
|
|
342
|
+
attempt: Integer,
|
|
343
|
+
attempts_remaining: Integer,
|
|
344
|
+
manual: T::Boolean,
|
|
345
|
+
max_attempts: Integer,
|
|
346
|
+
processing: T::Boolean,
|
|
347
|
+
next_retry_at: T.nilable(Float),
|
|
348
|
+
next_retry_at_iso: T.nilable(Time)
|
|
349
|
+
).returns(T.attached_class)
|
|
350
|
+
end
|
|
351
|
+
def self.new(
|
|
352
|
+
# Current attempt number (0-indexed). The first delivery attempt is 0, the first
|
|
353
|
+
# retry is 1, and so on.
|
|
354
|
+
attempt:,
|
|
355
|
+
# Number of attempts remaining before the message is hard-failed. Calculated as
|
|
356
|
+
# `maxAttempts - attempt`.
|
|
357
|
+
attempts_remaining:,
|
|
358
|
+
# Whether this queue entry was created by a manual retry request. Manual retries
|
|
359
|
+
# bypass certain hold conditions like suppression lists.
|
|
360
|
+
manual:,
|
|
361
|
+
# Maximum number of delivery attempts before the message is hard-failed.
|
|
362
|
+
# Configured at the server level.
|
|
363
|
+
max_attempts:,
|
|
364
|
+
# Whether the message is currently being processed by a delivery worker. When
|
|
365
|
+
# `true`, the message is actively being sent.
|
|
366
|
+
processing:,
|
|
367
|
+
# Unix timestamp of when the next retry attempt is scheduled. `null` if the
|
|
368
|
+
# message is ready for immediate processing or currently being processed.
|
|
369
|
+
next_retry_at: nil,
|
|
370
|
+
# ISO 8601 formatted timestamp of the next retry attempt. `null` if the message is
|
|
371
|
+
# ready for immediate processing.
|
|
372
|
+
next_retry_at_iso: nil
|
|
373
|
+
)
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
sig do
|
|
377
|
+
override.returns(
|
|
378
|
+
{
|
|
379
|
+
attempt: Integer,
|
|
380
|
+
attempts_remaining: Integer,
|
|
381
|
+
manual: T::Boolean,
|
|
382
|
+
max_attempts: Integer,
|
|
383
|
+
processing: T::Boolean,
|
|
384
|
+
next_retry_at: T.nilable(Float),
|
|
385
|
+
next_retry_at_iso: T.nilable(Time)
|
|
386
|
+
}
|
|
387
|
+
)
|
|
388
|
+
end
|
|
389
|
+
def to_hash
|
|
390
|
+
end
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
# Current message status (lowercase). Possible values:
|
|
394
|
+
#
|
|
395
|
+
# - `pending` - Initial state, awaiting first delivery attempt
|
|
396
|
+
# - `sent` - Successfully delivered
|
|
397
|
+
# - `softfail` - Temporary failure, will retry automatically
|
|
398
|
+
# - `hardfail` - Permanent failure, will not retry
|
|
399
|
+
# - `held` - Held for manual review (suppression list, etc.)
|
|
400
|
+
# - `bounced` - Bounced by recipient server
|
|
401
|
+
module Status
|
|
402
|
+
extend ArkEmail::Internal::Type::Enum
|
|
403
|
+
|
|
404
|
+
TaggedSymbol =
|
|
405
|
+
T.type_alias do
|
|
406
|
+
T.all(
|
|
407
|
+
Symbol,
|
|
408
|
+
ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Status
|
|
409
|
+
)
|
|
410
|
+
end
|
|
411
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
412
|
+
|
|
413
|
+
PENDING =
|
|
414
|
+
T.let(
|
|
415
|
+
:pending,
|
|
416
|
+
ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Status::TaggedSymbol
|
|
417
|
+
)
|
|
418
|
+
SENT =
|
|
419
|
+
T.let(
|
|
420
|
+
:sent,
|
|
421
|
+
ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Status::TaggedSymbol
|
|
422
|
+
)
|
|
423
|
+
SOFTFAIL =
|
|
424
|
+
T.let(
|
|
425
|
+
:softfail,
|
|
426
|
+
ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Status::TaggedSymbol
|
|
427
|
+
)
|
|
428
|
+
HARDFAIL =
|
|
429
|
+
T.let(
|
|
430
|
+
:hardfail,
|
|
431
|
+
ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Status::TaggedSymbol
|
|
432
|
+
)
|
|
433
|
+
HELD =
|
|
434
|
+
T.let(
|
|
435
|
+
:held,
|
|
436
|
+
ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Status::TaggedSymbol
|
|
437
|
+
)
|
|
438
|
+
BOUNCED =
|
|
439
|
+
T.let(
|
|
440
|
+
:bounced,
|
|
441
|
+
ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Status::TaggedSymbol
|
|
442
|
+
)
|
|
443
|
+
|
|
444
|
+
sig do
|
|
445
|
+
override.returns(
|
|
446
|
+
T::Array[
|
|
447
|
+
ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Status::TaggedSymbol
|
|
448
|
+
]
|
|
449
|
+
)
|
|
450
|
+
end
|
|
451
|
+
def self.values
|
|
452
|
+
end
|
|
453
|
+
end
|
|
217
454
|
end
|
|
218
455
|
end
|
|
219
456
|
end
|
|
@@ -83,15 +83,57 @@ module ArkEmail
|
|
|
83
83
|
)
|
|
84
84
|
end
|
|
85
85
|
|
|
86
|
-
# Get the
|
|
87
|
-
# and
|
|
86
|
+
# Get the complete delivery history for an email, including SMTP response codes,
|
|
87
|
+
# timestamps, and current retry state.
|
|
88
|
+
#
|
|
89
|
+
# ## Response Fields
|
|
90
|
+
#
|
|
91
|
+
# ### Status
|
|
92
|
+
#
|
|
93
|
+
# The current status of the email:
|
|
94
|
+
#
|
|
95
|
+
# - `pending` - Awaiting first delivery attempt
|
|
96
|
+
# - `sent` - Successfully delivered to recipient server
|
|
97
|
+
# - `softfail` - Temporary failure, automatic retry scheduled
|
|
98
|
+
# - `hardfail` - Permanent failure, will not retry
|
|
99
|
+
# - `held` - Held for manual review
|
|
100
|
+
# - `bounced` - Bounced by recipient server
|
|
101
|
+
#
|
|
102
|
+
# ### Retry State
|
|
103
|
+
#
|
|
104
|
+
# When the email is in the delivery queue (`pending` or `softfail` status),
|
|
105
|
+
# `retryState` provides information about the retry schedule:
|
|
106
|
+
#
|
|
107
|
+
# - `attempt` - Current attempt number (0 = first attempt)
|
|
108
|
+
# - `maxAttempts` - Maximum attempts before hard-fail (typically 18)
|
|
109
|
+
# - `attemptsRemaining` - Attempts left before hard-fail
|
|
110
|
+
# - `nextRetryAt` - When the next retry is scheduled (Unix timestamp)
|
|
111
|
+
# - `processing` - Whether the email is currently being processed
|
|
112
|
+
# - `manual` - Whether this was triggered by a manual retry
|
|
113
|
+
#
|
|
114
|
+
# When the email has finished processing (`sent`, `hardfail`, `held`, `bounced`),
|
|
115
|
+
# `retryState` is `null`.
|
|
116
|
+
#
|
|
117
|
+
# ### Can Retry Manually
|
|
118
|
+
#
|
|
119
|
+
# Indicates whether you can call `POST /emails/{emailId}/retry` to manually retry
|
|
120
|
+
# the email. This is `true` when the raw message content is still available (not
|
|
121
|
+
# expired due to retention policy).
|
|
88
122
|
sig do
|
|
89
123
|
params(
|
|
90
124
|
email_id: String,
|
|
91
125
|
request_options: ArkEmail::RequestOptions::OrHash
|
|
92
126
|
).returns(ArkEmail::Models::EmailRetrieveDeliveriesResponse)
|
|
93
127
|
end
|
|
94
|
-
def retrieve_deliveries(
|
|
128
|
+
def retrieve_deliveries(
|
|
129
|
+
# Email identifier. Accepts multiple formats:
|
|
130
|
+
#
|
|
131
|
+
# - Message ID (numeric): `12345`
|
|
132
|
+
# - Message token: `aBc123XyZ`
|
|
133
|
+
# - Combined format: `msg_12345_aBc123XyZ`
|
|
134
|
+
email_id,
|
|
135
|
+
request_options: {}
|
|
136
|
+
)
|
|
95
137
|
end
|
|
96
138
|
|
|
97
139
|
# Retry delivery of a failed or soft-bounced email. Creates a new delivery
|
|
@@ -28,28 +28,43 @@ module ArkEmail
|
|
|
28
28
|
|
|
29
29
|
type data =
|
|
30
30
|
{
|
|
31
|
+
can_retry_manually: bool,
|
|
31
32
|
deliveries: ::Array[ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Delivery],
|
|
32
|
-
message_id:
|
|
33
|
-
message_token: String
|
|
33
|
+
message_id: Integer,
|
|
34
|
+
message_token: String,
|
|
35
|
+
retry_state: ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::RetryState?,
|
|
36
|
+
status: ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::status
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
class Data < ArkEmail::Internal::Type::BaseModel
|
|
40
|
+
attr_accessor can_retry_manually: bool
|
|
41
|
+
|
|
37
42
|
attr_accessor deliveries: ::Array[ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Delivery]
|
|
38
43
|
|
|
39
|
-
attr_accessor message_id:
|
|
44
|
+
attr_accessor message_id: Integer
|
|
40
45
|
|
|
41
46
|
attr_accessor message_token: String
|
|
42
47
|
|
|
48
|
+
attr_accessor retry_state: ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::RetryState?
|
|
49
|
+
|
|
50
|
+
attr_accessor status: ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::status
|
|
51
|
+
|
|
43
52
|
def initialize: (
|
|
53
|
+
can_retry_manually: bool,
|
|
44
54
|
deliveries: ::Array[ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Delivery],
|
|
45
|
-
message_id:
|
|
46
|
-
message_token: String
|
|
55
|
+
message_id: Integer,
|
|
56
|
+
message_token: String,
|
|
57
|
+
retry_state: ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::RetryState?,
|
|
58
|
+
status: ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::status
|
|
47
59
|
) -> void
|
|
48
60
|
|
|
49
61
|
def to_hash: -> {
|
|
62
|
+
can_retry_manually: bool,
|
|
50
63
|
deliveries: ::Array[ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Delivery],
|
|
51
|
-
message_id:
|
|
52
|
-
message_token: String
|
|
64
|
+
message_id: Integer,
|
|
65
|
+
message_token: String,
|
|
66
|
+
retry_state: ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::RetryState?,
|
|
67
|
+
status: ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::status
|
|
53
68
|
}
|
|
54
69
|
|
|
55
70
|
type delivery =
|
|
@@ -111,6 +126,69 @@ module ArkEmail
|
|
|
111
126
|
sent_with_ssl: bool
|
|
112
127
|
}
|
|
113
128
|
end
|
|
129
|
+
|
|
130
|
+
type retry_state =
|
|
131
|
+
{
|
|
132
|
+
attempt: Integer,
|
|
133
|
+
attempts_remaining: Integer,
|
|
134
|
+
manual: bool,
|
|
135
|
+
max_attempts: Integer,
|
|
136
|
+
processing: bool,
|
|
137
|
+
next_retry_at: Float?,
|
|
138
|
+
next_retry_at_iso: Time?
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
class RetryState < ArkEmail::Internal::Type::BaseModel
|
|
142
|
+
attr_accessor attempt: Integer
|
|
143
|
+
|
|
144
|
+
attr_accessor attempts_remaining: Integer
|
|
145
|
+
|
|
146
|
+
attr_accessor manual: bool
|
|
147
|
+
|
|
148
|
+
attr_accessor max_attempts: Integer
|
|
149
|
+
|
|
150
|
+
attr_accessor processing: bool
|
|
151
|
+
|
|
152
|
+
attr_accessor next_retry_at: Float?
|
|
153
|
+
|
|
154
|
+
attr_accessor next_retry_at_iso: Time?
|
|
155
|
+
|
|
156
|
+
def initialize: (
|
|
157
|
+
attempt: Integer,
|
|
158
|
+
attempts_remaining: Integer,
|
|
159
|
+
manual: bool,
|
|
160
|
+
max_attempts: Integer,
|
|
161
|
+
processing: bool,
|
|
162
|
+
?next_retry_at: Float?,
|
|
163
|
+
?next_retry_at_iso: Time?
|
|
164
|
+
) -> void
|
|
165
|
+
|
|
166
|
+
def to_hash: -> {
|
|
167
|
+
attempt: Integer,
|
|
168
|
+
attempts_remaining: Integer,
|
|
169
|
+
manual: bool,
|
|
170
|
+
max_attempts: Integer,
|
|
171
|
+
processing: bool,
|
|
172
|
+
next_retry_at: Float?,
|
|
173
|
+
next_retry_at_iso: Time?
|
|
174
|
+
}
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
type status =
|
|
178
|
+
:pending | :sent | :softfail | :hardfail | :held | :bounced
|
|
179
|
+
|
|
180
|
+
module Status
|
|
181
|
+
extend ArkEmail::Internal::Type::Enum
|
|
182
|
+
|
|
183
|
+
PENDING: :pending
|
|
184
|
+
SENT: :sent
|
|
185
|
+
SOFTFAIL: :softfail
|
|
186
|
+
HARDFAIL: :hardfail
|
|
187
|
+
HELD: :held
|
|
188
|
+
BOUNCED: :bounced
|
|
189
|
+
|
|
190
|
+
def self?.values: -> ::Array[ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::status]
|
|
191
|
+
end
|
|
114
192
|
end
|
|
115
193
|
end
|
|
116
194
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ark-email
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ark
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-01-
|
|
11
|
+
date: 2026-01-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|