ark-email 0.7.0 → 0.9.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 +24 -0
- data/README.md +22 -6
- data/lib/ark_email/models/email_send_batch_params.rb +10 -1
- data/lib/ark_email/models/email_send_batch_response.rb +13 -1
- data/lib/ark_email/models/email_send_params.rb +14 -2
- data/lib/ark_email/models/email_send_raw_response.rb +13 -1
- data/lib/ark_email/models/email_send_response.rb +13 -1
- data/lib/ark_email/models/webhook_list_deliveries_params.rb +79 -0
- data/lib/ark_email/models/webhook_list_deliveries_response.rb +154 -0
- data/lib/ark_email/models/webhook_replay_delivery_params.rb +20 -0
- data/lib/ark_email/models/webhook_replay_delivery_response.rb +82 -0
- data/lib/ark_email/models/webhook_retrieve_delivery_params.rb +20 -0
- data/lib/ark_email/models/webhook_retrieve_delivery_response.rb +198 -0
- data/lib/ark_email/models.rb +6 -0
- data/lib/ark_email/resources/emails.rb +1 -1
- data/lib/ark_email/resources/webhooks.rb +127 -0
- data/lib/ark_email/version.rb +1 -1
- data/lib/ark_email.rb +6 -0
- data/rbi/ark_email/models/email_send_batch_params.rbi +18 -0
- data/rbi/ark_email/models/email_send_batch_response.rbi +16 -3
- data/rbi/ark_email/models/email_send_params.rbi +26 -2
- data/rbi/ark_email/models/email_send_raw_response.rbi +16 -3
- data/rbi/ark_email/models/email_send_response.rbi +16 -3
- data/rbi/ark_email/models/webhook_list_deliveries_params.rbi +172 -0
- data/rbi/ark_email/models/webhook_list_deliveries_response.rbi +257 -0
- data/rbi/ark_email/models/webhook_replay_delivery_params.rbi +38 -0
- data/rbi/ark_email/models/webhook_replay_delivery_response.rbi +132 -0
- data/rbi/ark_email/models/webhook_retrieve_delivery_params.rbi +38 -0
- data/rbi/ark_email/models/webhook_retrieve_delivery_response.rbi +371 -0
- data/rbi/ark_email/models.rbi +7 -0
- data/rbi/ark_email/resources/emails.rbi +14 -1
- data/rbi/ark_email/resources/webhooks.rbi +105 -0
- data/sig/ark_email/models/email_send_batch_response.rbs +10 -3
- data/sig/ark_email/models/email_send_raw_response.rbs +10 -3
- data/sig/ark_email/models/email_send_response.rbs +10 -3
- data/sig/ark_email/models/webhook_list_deliveries_params.rbs +90 -0
- data/sig/ark_email/models/webhook_list_deliveries_response.rbs +127 -0
- data/sig/ark_email/models/webhook_replay_delivery_params.rbs +23 -0
- data/sig/ark_email/models/webhook_replay_delivery_response.rbs +72 -0
- data/sig/ark_email/models/webhook_retrieve_delivery_params.rbs +23 -0
- data/sig/ark_email/models/webhook_retrieve_delivery_response.rbs +158 -0
- data/sig/ark_email/models.rbs +6 -0
- data/sig/ark_email/resources/webhooks.rbs +23 -0
- metadata +20 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ee70352e87d7586234884d318276da0a01b94c7a8cc47e795d37fa77571a0d17
|
|
4
|
+
data.tar.gz: f469a30b7c8ed720169c6b6c613eb8279789e82505581d1584d930c67d678784
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 176ab6feb912821c518e32aea92ff9c3b7acf82e25ef4382aca2a9101bc1f5339c2bd9e76f89c9cf6e0feb0313a635101ddb5169b70232f2fa68a046f279cdf2
|
|
7
|
+
data.tar.gz: 9244988b7e44d174dd35d7b0f005574b37acd10aae831db4170c15725d00d7c22d37ab705f5f7cfbfe49e199f2f74b40680e055c3f52edf7ebd9b92832b71396
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.9.0 (2026-01-21)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.8.0...v0.9.0](https://github.com/ArkHQ-io/ark-ruby/compare/v0.8.0...v0.9.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** add sandbox domain ([d61ffa2](https://github.com/ArkHQ-io/ark-ruby/commit/d61ffa220016820c5620ba168461e82fab223ed4))
|
|
10
|
+
|
|
11
|
+
## 0.8.0 (2026-01-20)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v0.7.0...v0.8.0](https://github.com/ArkHQ-io/ark-ruby/compare/v0.7.0...v0.8.0)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **api:** add webhook deliveries ([bf74654](https://github.com/ArkHQ-io/ark-ruby/commit/bf746548583f88e32cac7cc8875388c7222b581a))
|
|
18
|
+
* **api:** api update ([4218931](https://github.com/ArkHQ-io/ark-ruby/commit/42189310508e7607e2447dd93c15b510ca70ea0f))
|
|
19
|
+
* **api:** api update ([81372c5](https://github.com/ArkHQ-io/ark-ruby/commit/81372c535c36671ff15d83309a88c5108f3d2115))
|
|
20
|
+
* **api:** manual updates ([3934561](https://github.com/ArkHQ-io/ark-ruby/commit/3934561e4a5c942d344349d637471c36829ac318))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Chores
|
|
24
|
+
|
|
25
|
+
* **internal:** update `actions/checkout` version ([45fbb7d](https://github.com/ArkHQ-io/ark-ruby/commit/45fbb7d77eff7f081c44e2174711183c7113a5df))
|
|
26
|
+
|
|
3
27
|
## 0.7.0 (2026-01-14)
|
|
4
28
|
|
|
5
29
|
Full Changelog: [v0.6.0...v0.7.0](https://github.com/ArkHQ-io/ark-ruby/compare/v0.6.0...v0.7.0)
|
data/README.md
CHANGED
|
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
|
26
26
|
<!-- x-release-please-start-version -->
|
|
27
27
|
|
|
28
28
|
```ruby
|
|
29
|
-
gem "ark-email", "~> 0.
|
|
29
|
+
gem "ark-email", "~> 0.9.0"
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
<!-- x-release-please-end -->
|
|
@@ -45,7 +45,9 @@ response = ark.emails.send_(
|
|
|
45
45
|
from: "hello@yourdomain.com",
|
|
46
46
|
subject: "Hello World",
|
|
47
47
|
to: ["user@example.com"],
|
|
48
|
-
html: "<h1>Welcome!</h1>"
|
|
48
|
+
html: "<h1>Welcome!</h1>",
|
|
49
|
+
metadata: {user_id: "usr_123", campaign: "onboarding"},
|
|
50
|
+
tag: "welcome"
|
|
49
51
|
)
|
|
50
52
|
|
|
51
53
|
puts(response.data)
|
|
@@ -89,7 +91,9 @@ begin
|
|
|
89
91
|
from: "hello@yourdomain.com",
|
|
90
92
|
subject: "Hello World",
|
|
91
93
|
to: ["user@example.com"],
|
|
92
|
-
html: "<h1>Welcome!</h1>"
|
|
94
|
+
html: "<h1>Welcome!</h1>",
|
|
95
|
+
metadata: {user_id: "usr_123", campaign: "onboarding"},
|
|
96
|
+
tag: "welcome"
|
|
93
97
|
)
|
|
94
98
|
rescue ArkEmail::Errors::APIConnectionError => e
|
|
95
99
|
puts("The server could not be reached")
|
|
@@ -138,6 +142,8 @@ ark.emails.send_(
|
|
|
138
142
|
subject: "Hello World",
|
|
139
143
|
to: ["user@example.com"],
|
|
140
144
|
html: "<h1>Welcome!</h1>",
|
|
145
|
+
metadata: {user_id: "usr_123", campaign: "onboarding"},
|
|
146
|
+
tag: "welcome",
|
|
141
147
|
request_options: {max_retries: 5}
|
|
142
148
|
)
|
|
143
149
|
```
|
|
@@ -158,6 +164,8 @@ ark.emails.send_(
|
|
|
158
164
|
subject: "Hello World",
|
|
159
165
|
to: ["user@example.com"],
|
|
160
166
|
html: "<h1>Welcome!</h1>",
|
|
167
|
+
metadata: {user_id: "usr_123", campaign: "onboarding"},
|
|
168
|
+
tag: "welcome",
|
|
161
169
|
request_options: {timeout: 5}
|
|
162
170
|
)
|
|
163
171
|
```
|
|
@@ -195,6 +203,8 @@ response =
|
|
|
195
203
|
subject: "Hello World",
|
|
196
204
|
to: ["user@example.com"],
|
|
197
205
|
html: "<h1>Welcome!</h1>",
|
|
206
|
+
metadata: {user_id: "usr_123", campaign: "onboarding"},
|
|
207
|
+
tag: "welcome",
|
|
198
208
|
request_options: {
|
|
199
209
|
extra_query: {my_query_parameter: value},
|
|
200
210
|
extra_body: {my_body_parameter: value},
|
|
@@ -244,7 +254,9 @@ ark.emails.send_(
|
|
|
244
254
|
from: "hello@yourdomain.com",
|
|
245
255
|
subject: "Hello World",
|
|
246
256
|
to: ["user@example.com"],
|
|
247
|
-
html: "<h1>Welcome!</h1>"
|
|
257
|
+
html: "<h1>Welcome!</h1>",
|
|
258
|
+
metadata: {user_id: "usr_123", campaign: "onboarding"},
|
|
259
|
+
tag: "welcome"
|
|
248
260
|
)
|
|
249
261
|
```
|
|
250
262
|
|
|
@@ -256,7 +268,9 @@ ark.emails.send_(
|
|
|
256
268
|
from: "hello@yourdomain.com",
|
|
257
269
|
subject: "Hello World",
|
|
258
270
|
to: ["user@example.com"],
|
|
259
|
-
html: "<h1>Welcome!</h1>"
|
|
271
|
+
html: "<h1>Welcome!</h1>",
|
|
272
|
+
metadata: {user_id: "usr_123", campaign: "onboarding"},
|
|
273
|
+
tag: "welcome"
|
|
260
274
|
)
|
|
261
275
|
|
|
262
276
|
# You can also splat a full Params class:
|
|
@@ -264,7 +278,9 @@ params = ArkEmail::EmailSendParams.new(
|
|
|
264
278
|
from: "hello@yourdomain.com",
|
|
265
279
|
subject: "Hello World",
|
|
266
280
|
to: ["user@example.com"],
|
|
267
|
-
html: "<h1>Welcome!</h1>"
|
|
281
|
+
html: "<h1>Welcome!</h1>",
|
|
282
|
+
metadata: {user_id: "usr_123", campaign: "onboarding"},
|
|
283
|
+
tag: "welcome"
|
|
268
284
|
)
|
|
269
285
|
ark.emails.send_(**params)
|
|
270
286
|
```
|
|
@@ -60,10 +60,19 @@ module ArkEmail
|
|
|
60
60
|
# This is useful for correlating webhook events with your internal systems (e.g.,
|
|
61
61
|
# user IDs, order IDs, campaign identifiers).
|
|
62
62
|
#
|
|
63
|
+
# **Validation Rules:**
|
|
64
|
+
#
|
|
65
|
+
# - Maximum 10 keys per email
|
|
66
|
+
# - Keys: 1-40 characters, must start with a letter, only alphanumeric and
|
|
67
|
+
# underscores (`^[a-zA-Z][a-zA-Z0-9_]*$`)
|
|
68
|
+
# - Values: 1-500 characters, no control characters (newlines, tabs, etc.)
|
|
69
|
+
# - Total size: 4KB maximum (JSON-encoded)
|
|
70
|
+
#
|
|
63
71
|
# @return [Hash{Symbol=>String}, nil]
|
|
64
72
|
optional :metadata, ArkEmail::Internal::Type::HashOf[String], nil?: true
|
|
65
73
|
|
|
66
74
|
# @!attribute tag
|
|
75
|
+
# Tag for categorization and filtering
|
|
67
76
|
#
|
|
68
77
|
# @return [String, nil]
|
|
69
78
|
optional :tag, String, nil?: true
|
|
@@ -85,7 +94,7 @@ module ArkEmail
|
|
|
85
94
|
#
|
|
86
95
|
# @param metadata [Hash{Symbol=>String}, nil] Custom key-value pairs attached to an email for webhook correlation.
|
|
87
96
|
#
|
|
88
|
-
# @param tag [String, nil]
|
|
97
|
+
# @param tag [String, nil] Tag for categorization and filtering
|
|
89
98
|
#
|
|
90
99
|
# @param text [String, nil]
|
|
91
100
|
end
|
|
@@ -51,7 +51,17 @@ module ArkEmail
|
|
|
51
51
|
# @return [Integer]
|
|
52
52
|
required :total, Integer
|
|
53
53
|
|
|
54
|
-
# @!
|
|
54
|
+
# @!attribute sandbox
|
|
55
|
+
# Whether this batch was sent in sandbox mode. Only present (and true) for sandbox
|
|
56
|
+
# emails sent from @arkhq.io addresses.
|
|
57
|
+
#
|
|
58
|
+
# @return [Boolean, nil]
|
|
59
|
+
optional :sandbox, ArkEmail::Internal::Type::Boolean
|
|
60
|
+
|
|
61
|
+
# @!method initialize(accepted:, failed:, messages:, total:, sandbox: nil)
|
|
62
|
+
# Some parameter documentations has been truncated, see
|
|
63
|
+
# {ArkEmail::Models::EmailSendBatchResponse::Data} for more details.
|
|
64
|
+
#
|
|
55
65
|
# @param accepted [Integer] Successfully accepted emails
|
|
56
66
|
#
|
|
57
67
|
# @param failed [Integer] Failed emails
|
|
@@ -59,6 +69,8 @@ module ArkEmail
|
|
|
59
69
|
# @param messages [Hash{Symbol=>ArkEmail::Models::EmailSendBatchResponse::Data::Message}] Map of recipient email to message info
|
|
60
70
|
#
|
|
61
71
|
# @param total [Integer] Total emails in the batch
|
|
72
|
+
#
|
|
73
|
+
# @param sandbox [Boolean] Whether this batch was sent in sandbox mode.
|
|
62
74
|
|
|
63
75
|
class Message < ArkEmail::Internal::Type::BaseModel
|
|
64
76
|
# @!attribute id
|
|
@@ -8,7 +8,7 @@ module ArkEmail
|
|
|
8
8
|
include ArkEmail::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
10
|
# @!attribute from
|
|
11
|
-
# Sender email address. Must be from a verified domain.
|
|
11
|
+
# Sender email address. Must be from a verified domain OR use sandbox mode.
|
|
12
12
|
#
|
|
13
13
|
# **Supported formats:**
|
|
14
14
|
#
|
|
@@ -18,6 +18,10 @@ module ArkEmail
|
|
|
18
18
|
#
|
|
19
19
|
# The domain portion must match a verified sending domain in your account.
|
|
20
20
|
#
|
|
21
|
+
# **Sandbox mode:** Use `sandbox@arkhq.io` to send test emails without domain
|
|
22
|
+
# verification. Sandbox emails can only be sent to organization members and are
|
|
23
|
+
# limited to 10 per day.
|
|
24
|
+
#
|
|
21
25
|
# @return [String]
|
|
22
26
|
required :from, String
|
|
23
27
|
|
|
@@ -78,6 +82,14 @@ module ArkEmail
|
|
|
78
82
|
# This is useful for correlating webhook events with your internal systems (e.g.,
|
|
79
83
|
# user IDs, order IDs, campaign identifiers).
|
|
80
84
|
#
|
|
85
|
+
# **Validation Rules:**
|
|
86
|
+
#
|
|
87
|
+
# - Maximum 10 keys per email
|
|
88
|
+
# - Keys: 1-40 characters, must start with a letter, only alphanumeric and
|
|
89
|
+
# underscores (`^[a-zA-Z][a-zA-Z0-9_]*$`)
|
|
90
|
+
# - Values: 1-500 characters, no control characters (newlines, tabs, etc.)
|
|
91
|
+
# - Total size: 4KB maximum (JSON-encoded)
|
|
92
|
+
#
|
|
81
93
|
# @return [Hash{Symbol=>String}, nil]
|
|
82
94
|
optional :metadata, ArkEmail::Internal::Type::HashOf[String], nil?: true
|
|
83
95
|
|
|
@@ -109,7 +121,7 @@ module ArkEmail
|
|
|
109
121
|
# Some parameter documentations has been truncated, see
|
|
110
122
|
# {ArkEmail::Models::EmailSendParams} for more details.
|
|
111
123
|
#
|
|
112
|
-
# @param from [String] Sender email address. Must be from a verified domain.
|
|
124
|
+
# @param from [String] Sender email address. Must be from a verified domain OR use sandbox mode.
|
|
113
125
|
#
|
|
114
126
|
# @param subject [String] Email subject line
|
|
115
127
|
#
|
|
@@ -50,7 +50,17 @@ module ArkEmail
|
|
|
50
50
|
# @return [String, nil]
|
|
51
51
|
optional :message_id, String, api_name: :messageId
|
|
52
52
|
|
|
53
|
-
# @!
|
|
53
|
+
# @!attribute sandbox
|
|
54
|
+
# Whether this email was sent in sandbox mode. Only present (and true) for sandbox
|
|
55
|
+
# emails sent from @arkhq.io addresses.
|
|
56
|
+
#
|
|
57
|
+
# @return [Boolean, nil]
|
|
58
|
+
optional :sandbox, ArkEmail::Internal::Type::Boolean
|
|
59
|
+
|
|
60
|
+
# @!method initialize(id:, status:, to:, message_id: nil, sandbox: nil)
|
|
61
|
+
# Some parameter documentations has been truncated, see
|
|
62
|
+
# {ArkEmail::Models::EmailSendRawResponse::Data} for more details.
|
|
63
|
+
#
|
|
54
64
|
# @param id [String] Unique message ID (format: msg*{id}*{token})
|
|
55
65
|
#
|
|
56
66
|
# @param status [Symbol, ArkEmail::Models::EmailSendRawResponse::Data::Status] Current delivery status
|
|
@@ -58,6 +68,8 @@ module ArkEmail
|
|
|
58
68
|
# @param to [Array<String>] List of recipient addresses
|
|
59
69
|
#
|
|
60
70
|
# @param message_id [String] SMTP Message-ID header value
|
|
71
|
+
#
|
|
72
|
+
# @param sandbox [Boolean] Whether this email was sent in sandbox mode.
|
|
61
73
|
|
|
62
74
|
# Current delivery status
|
|
63
75
|
#
|
|
@@ -50,7 +50,17 @@ module ArkEmail
|
|
|
50
50
|
# @return [String, nil]
|
|
51
51
|
optional :message_id, String, api_name: :messageId
|
|
52
52
|
|
|
53
|
-
# @!
|
|
53
|
+
# @!attribute sandbox
|
|
54
|
+
# Whether this email was sent in sandbox mode. Only present (and true) for sandbox
|
|
55
|
+
# emails sent from @arkhq.io addresses.
|
|
56
|
+
#
|
|
57
|
+
# @return [Boolean, nil]
|
|
58
|
+
optional :sandbox, ArkEmail::Internal::Type::Boolean
|
|
59
|
+
|
|
60
|
+
# @!method initialize(id:, status:, to:, message_id: nil, sandbox: nil)
|
|
61
|
+
# Some parameter documentations has been truncated, see
|
|
62
|
+
# {ArkEmail::Models::EmailSendResponse::Data} for more details.
|
|
63
|
+
#
|
|
54
64
|
# @param id [String] Unique message ID (format: msg*{id}*{token})
|
|
55
65
|
#
|
|
56
66
|
# @param status [Symbol, ArkEmail::Models::EmailSendResponse::Data::Status] Current delivery status
|
|
@@ -58,6 +68,8 @@ module ArkEmail
|
|
|
58
68
|
# @param to [Array<String>] List of recipient addresses
|
|
59
69
|
#
|
|
60
70
|
# @param message_id [String] SMTP Message-ID header value
|
|
71
|
+
#
|
|
72
|
+
# @param sandbox [Boolean] Whether this email was sent in sandbox mode.
|
|
61
73
|
|
|
62
74
|
# Current delivery status
|
|
63
75
|
#
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ArkEmail
|
|
4
|
+
module Models
|
|
5
|
+
# @see ArkEmail::Resources::Webhooks#list_deliveries
|
|
6
|
+
class WebhookListDeliveriesParams < ArkEmail::Internal::Type::BaseModel
|
|
7
|
+
extend ArkEmail::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include ArkEmail::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute after
|
|
11
|
+
# Only deliveries after this Unix timestamp
|
|
12
|
+
#
|
|
13
|
+
# @return [Integer, nil]
|
|
14
|
+
optional :after, Integer
|
|
15
|
+
|
|
16
|
+
# @!attribute before
|
|
17
|
+
# Only deliveries before this Unix timestamp
|
|
18
|
+
#
|
|
19
|
+
# @return [Integer, nil]
|
|
20
|
+
optional :before, Integer
|
|
21
|
+
|
|
22
|
+
# @!attribute event
|
|
23
|
+
# Filter by event type
|
|
24
|
+
#
|
|
25
|
+
# @return [Symbol, ArkEmail::Models::WebhookListDeliveriesParams::Event, nil]
|
|
26
|
+
optional :event, enum: -> { ArkEmail::WebhookListDeliveriesParams::Event }
|
|
27
|
+
|
|
28
|
+
# @!attribute page
|
|
29
|
+
# Page number (default 1)
|
|
30
|
+
#
|
|
31
|
+
# @return [Integer, nil]
|
|
32
|
+
optional :page, Integer
|
|
33
|
+
|
|
34
|
+
# @!attribute per_page
|
|
35
|
+
# Items per page (default 30, max 100)
|
|
36
|
+
#
|
|
37
|
+
# @return [Integer, nil]
|
|
38
|
+
optional :per_page, Integer
|
|
39
|
+
|
|
40
|
+
# @!attribute success
|
|
41
|
+
# Filter by delivery success (true = 2xx response, false = non-2xx or error)
|
|
42
|
+
#
|
|
43
|
+
# @return [Boolean, nil]
|
|
44
|
+
optional :success, ArkEmail::Internal::Type::Boolean
|
|
45
|
+
|
|
46
|
+
# @!method initialize(after: nil, before: nil, event: nil, page: nil, per_page: nil, success: nil, request_options: {})
|
|
47
|
+
# @param after [Integer] Only deliveries after this Unix timestamp
|
|
48
|
+
#
|
|
49
|
+
# @param before [Integer] Only deliveries before this Unix timestamp
|
|
50
|
+
#
|
|
51
|
+
# @param event [Symbol, ArkEmail::Models::WebhookListDeliveriesParams::Event] Filter by event type
|
|
52
|
+
#
|
|
53
|
+
# @param page [Integer] Page number (default 1)
|
|
54
|
+
#
|
|
55
|
+
# @param per_page [Integer] Items per page (default 30, max 100)
|
|
56
|
+
#
|
|
57
|
+
# @param success [Boolean] Filter by delivery success (true = 2xx response, false = non-2xx or error)
|
|
58
|
+
#
|
|
59
|
+
# @param request_options [ArkEmail::RequestOptions, Hash{Symbol=>Object}]
|
|
60
|
+
|
|
61
|
+
# Filter by event type
|
|
62
|
+
module Event
|
|
63
|
+
extend ArkEmail::Internal::Type::Enum
|
|
64
|
+
|
|
65
|
+
MESSAGE_SENT = :MessageSent
|
|
66
|
+
MESSAGE_DELAYED = :MessageDelayed
|
|
67
|
+
MESSAGE_DELIVERY_FAILED = :MessageDeliveryFailed
|
|
68
|
+
MESSAGE_HELD = :MessageHeld
|
|
69
|
+
MESSAGE_BOUNCED = :MessageBounced
|
|
70
|
+
MESSAGE_LINK_CLICKED = :MessageLinkClicked
|
|
71
|
+
MESSAGE_LOADED = :MessageLoaded
|
|
72
|
+
DOMAIN_DNS_ERROR = :DomainDNSError
|
|
73
|
+
|
|
74
|
+
# @!method self.values
|
|
75
|
+
# @return [Array<Symbol>]
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ArkEmail
|
|
4
|
+
module Models
|
|
5
|
+
# @see ArkEmail::Resources::Webhooks#list_deliveries
|
|
6
|
+
class WebhookListDeliveriesResponse < ArkEmail::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute data
|
|
8
|
+
#
|
|
9
|
+
# @return [Array<ArkEmail::Models::WebhookListDeliveriesResponse::Data>]
|
|
10
|
+
required :data,
|
|
11
|
+
-> { ArkEmail::Internal::Type::ArrayOf[ArkEmail::Models::WebhookListDeliveriesResponse::Data] }
|
|
12
|
+
|
|
13
|
+
# @!attribute meta
|
|
14
|
+
#
|
|
15
|
+
# @return [ArkEmail::Models::APIMeta]
|
|
16
|
+
required :meta, -> { ArkEmail::APIMeta }
|
|
17
|
+
|
|
18
|
+
# @!attribute page
|
|
19
|
+
# Current page number
|
|
20
|
+
#
|
|
21
|
+
# @return [Integer]
|
|
22
|
+
required :page, Integer
|
|
23
|
+
|
|
24
|
+
# @!attribute per_page
|
|
25
|
+
# Items per page
|
|
26
|
+
#
|
|
27
|
+
# @return [Integer]
|
|
28
|
+
required :per_page, Integer, api_name: :perPage
|
|
29
|
+
|
|
30
|
+
# @!attribute total
|
|
31
|
+
# Total number of deliveries matching the filter
|
|
32
|
+
#
|
|
33
|
+
# @return [Integer]
|
|
34
|
+
required :total, Integer
|
|
35
|
+
|
|
36
|
+
# @!attribute total_pages
|
|
37
|
+
# Total number of pages
|
|
38
|
+
#
|
|
39
|
+
# @return [Integer]
|
|
40
|
+
required :total_pages, Integer, api_name: :totalPages
|
|
41
|
+
|
|
42
|
+
# @!method initialize(data:, meta:, page:, per_page:, total:, total_pages:)
|
|
43
|
+
# Paginated list of webhook delivery attempts
|
|
44
|
+
#
|
|
45
|
+
# @param data [Array<ArkEmail::Models::WebhookListDeliveriesResponse::Data>]
|
|
46
|
+
#
|
|
47
|
+
# @param meta [ArkEmail::Models::APIMeta]
|
|
48
|
+
#
|
|
49
|
+
# @param page [Integer] Current page number
|
|
50
|
+
#
|
|
51
|
+
# @param per_page [Integer] Items per page
|
|
52
|
+
#
|
|
53
|
+
# @param total [Integer] Total number of deliveries matching the filter
|
|
54
|
+
#
|
|
55
|
+
# @param total_pages [Integer] Total number of pages
|
|
56
|
+
|
|
57
|
+
class Data < ArkEmail::Internal::Type::BaseModel
|
|
58
|
+
# @!attribute id
|
|
59
|
+
# Unique delivery ID (UUID)
|
|
60
|
+
#
|
|
61
|
+
# @return [String]
|
|
62
|
+
required :id, String
|
|
63
|
+
|
|
64
|
+
# @!attribute attempt
|
|
65
|
+
# Attempt number (1 for first attempt, increments with retries)
|
|
66
|
+
#
|
|
67
|
+
# @return [Integer]
|
|
68
|
+
required :attempt, Integer
|
|
69
|
+
|
|
70
|
+
# @!attribute event
|
|
71
|
+
# Event type that triggered this delivery
|
|
72
|
+
#
|
|
73
|
+
# @return [Symbol, ArkEmail::Models::WebhookListDeliveriesResponse::Data::Event]
|
|
74
|
+
required :event, enum: -> { ArkEmail::Models::WebhookListDeliveriesResponse::Data::Event }
|
|
75
|
+
|
|
76
|
+
# @!attribute status_code
|
|
77
|
+
# HTTP status code returned by the endpoint (null if connection failed)
|
|
78
|
+
#
|
|
79
|
+
# @return [Integer, nil]
|
|
80
|
+
required :status_code, Integer, api_name: :statusCode, nil?: true
|
|
81
|
+
|
|
82
|
+
# @!attribute success
|
|
83
|
+
# Whether the delivery was successful (2xx response)
|
|
84
|
+
#
|
|
85
|
+
# @return [Boolean]
|
|
86
|
+
required :success, ArkEmail::Internal::Type::Boolean
|
|
87
|
+
|
|
88
|
+
# @!attribute timestamp
|
|
89
|
+
# When this delivery attempt occurred
|
|
90
|
+
#
|
|
91
|
+
# @return [Time]
|
|
92
|
+
required :timestamp, Time
|
|
93
|
+
|
|
94
|
+
# @!attribute url
|
|
95
|
+
# URL the webhook was delivered to
|
|
96
|
+
#
|
|
97
|
+
# @return [String]
|
|
98
|
+
required :url, String
|
|
99
|
+
|
|
100
|
+
# @!attribute webhook_id
|
|
101
|
+
# ID of the webhook this delivery belongs to
|
|
102
|
+
#
|
|
103
|
+
# @return [String]
|
|
104
|
+
required :webhook_id, String, api_name: :webhookId
|
|
105
|
+
|
|
106
|
+
# @!attribute will_retry
|
|
107
|
+
# Whether this delivery will be retried (true if failed and retries remaining)
|
|
108
|
+
#
|
|
109
|
+
# @return [Boolean]
|
|
110
|
+
required :will_retry, ArkEmail::Internal::Type::Boolean, api_name: :willRetry
|
|
111
|
+
|
|
112
|
+
# @!method initialize(id:, attempt:, event:, status_code:, success:, timestamp:, url:, webhook_id:, will_retry:)
|
|
113
|
+
# Summary of a webhook delivery attempt
|
|
114
|
+
#
|
|
115
|
+
# @param id [String] Unique delivery ID (UUID)
|
|
116
|
+
#
|
|
117
|
+
# @param attempt [Integer] Attempt number (1 for first attempt, increments with retries)
|
|
118
|
+
#
|
|
119
|
+
# @param event [Symbol, ArkEmail::Models::WebhookListDeliveriesResponse::Data::Event] Event type that triggered this delivery
|
|
120
|
+
#
|
|
121
|
+
# @param status_code [Integer, nil] HTTP status code returned by the endpoint (null if connection failed)
|
|
122
|
+
#
|
|
123
|
+
# @param success [Boolean] Whether the delivery was successful (2xx response)
|
|
124
|
+
#
|
|
125
|
+
# @param timestamp [Time] When this delivery attempt occurred
|
|
126
|
+
#
|
|
127
|
+
# @param url [String] URL the webhook was delivered to
|
|
128
|
+
#
|
|
129
|
+
# @param webhook_id [String] ID of the webhook this delivery belongs to
|
|
130
|
+
#
|
|
131
|
+
# @param will_retry [Boolean] Whether this delivery will be retried (true if failed and retries remaining)
|
|
132
|
+
|
|
133
|
+
# Event type that triggered this delivery
|
|
134
|
+
#
|
|
135
|
+
# @see ArkEmail::Models::WebhookListDeliveriesResponse::Data#event
|
|
136
|
+
module Event
|
|
137
|
+
extend ArkEmail::Internal::Type::Enum
|
|
138
|
+
|
|
139
|
+
MESSAGE_SENT = :MessageSent
|
|
140
|
+
MESSAGE_DELAYED = :MessageDelayed
|
|
141
|
+
MESSAGE_DELIVERY_FAILED = :MessageDeliveryFailed
|
|
142
|
+
MESSAGE_HELD = :MessageHeld
|
|
143
|
+
MESSAGE_BOUNCED = :MessageBounced
|
|
144
|
+
MESSAGE_LINK_CLICKED = :MessageLinkClicked
|
|
145
|
+
MESSAGE_LOADED = :MessageLoaded
|
|
146
|
+
DOMAIN_DNS_ERROR = :DomainDNSError
|
|
147
|
+
|
|
148
|
+
# @!method self.values
|
|
149
|
+
# @return [Array<Symbol>]
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ArkEmail
|
|
4
|
+
module Models
|
|
5
|
+
# @see ArkEmail::Resources::Webhooks#replay_delivery
|
|
6
|
+
class WebhookReplayDeliveryParams < ArkEmail::Internal::Type::BaseModel
|
|
7
|
+
extend ArkEmail::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include ArkEmail::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute webhook_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :webhook_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(webhook_id:, request_options: {})
|
|
16
|
+
# @param webhook_id [String]
|
|
17
|
+
# @param request_options [ArkEmail::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ArkEmail
|
|
4
|
+
module Models
|
|
5
|
+
# @see ArkEmail::Resources::Webhooks#replay_delivery
|
|
6
|
+
class WebhookReplayDeliveryResponse < ArkEmail::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute data
|
|
8
|
+
#
|
|
9
|
+
# @return [ArkEmail::Models::WebhookReplayDeliveryResponse::Data]
|
|
10
|
+
required :data, -> { ArkEmail::Models::WebhookReplayDeliveryResponse::Data }
|
|
11
|
+
|
|
12
|
+
# @!attribute meta
|
|
13
|
+
#
|
|
14
|
+
# @return [ArkEmail::Models::APIMeta]
|
|
15
|
+
required :meta, -> { ArkEmail::APIMeta }
|
|
16
|
+
|
|
17
|
+
# @!attribute success
|
|
18
|
+
#
|
|
19
|
+
# @return [Boolean, true]
|
|
20
|
+
required :success, const: true
|
|
21
|
+
|
|
22
|
+
# @!method initialize(data:, meta:, success: true)
|
|
23
|
+
# Result of replaying a webhook delivery
|
|
24
|
+
#
|
|
25
|
+
# @param data [ArkEmail::Models::WebhookReplayDeliveryResponse::Data]
|
|
26
|
+
# @param meta [ArkEmail::Models::APIMeta]
|
|
27
|
+
# @param success [Boolean, true]
|
|
28
|
+
|
|
29
|
+
# @see ArkEmail::Models::WebhookReplayDeliveryResponse#data
|
|
30
|
+
class Data < ArkEmail::Internal::Type::BaseModel
|
|
31
|
+
# @!attribute duration
|
|
32
|
+
# Request duration in milliseconds
|
|
33
|
+
#
|
|
34
|
+
# @return [Integer]
|
|
35
|
+
required :duration, Integer
|
|
36
|
+
|
|
37
|
+
# @!attribute new_delivery_id
|
|
38
|
+
# ID of the new delivery created by the replay
|
|
39
|
+
#
|
|
40
|
+
# @return [String]
|
|
41
|
+
required :new_delivery_id, String, api_name: :newDeliveryId
|
|
42
|
+
|
|
43
|
+
# @!attribute original_delivery_id
|
|
44
|
+
# ID of the original delivery that was replayed
|
|
45
|
+
#
|
|
46
|
+
# @return [String]
|
|
47
|
+
required :original_delivery_id, String, api_name: :originalDeliveryId
|
|
48
|
+
|
|
49
|
+
# @!attribute status_code
|
|
50
|
+
# HTTP status code from your endpoint
|
|
51
|
+
#
|
|
52
|
+
# @return [Integer, nil]
|
|
53
|
+
required :status_code, Integer, api_name: :statusCode, nil?: true
|
|
54
|
+
|
|
55
|
+
# @!attribute success
|
|
56
|
+
# Whether the replay was successful (2xx response from endpoint)
|
|
57
|
+
#
|
|
58
|
+
# @return [Boolean]
|
|
59
|
+
required :success, ArkEmail::Internal::Type::Boolean
|
|
60
|
+
|
|
61
|
+
# @!attribute timestamp
|
|
62
|
+
# When the replay was executed
|
|
63
|
+
#
|
|
64
|
+
# @return [Time]
|
|
65
|
+
required :timestamp, Time
|
|
66
|
+
|
|
67
|
+
# @!method initialize(duration:, new_delivery_id:, original_delivery_id:, status_code:, success:, timestamp:)
|
|
68
|
+
# @param duration [Integer] Request duration in milliseconds
|
|
69
|
+
#
|
|
70
|
+
# @param new_delivery_id [String] ID of the new delivery created by the replay
|
|
71
|
+
#
|
|
72
|
+
# @param original_delivery_id [String] ID of the original delivery that was replayed
|
|
73
|
+
#
|
|
74
|
+
# @param status_code [Integer, nil] HTTP status code from your endpoint
|
|
75
|
+
#
|
|
76
|
+
# @param success [Boolean] Whether the replay was successful (2xx response from endpoint)
|
|
77
|
+
#
|
|
78
|
+
# @param timestamp [Time] When the replay was executed
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ArkEmail
|
|
4
|
+
module Models
|
|
5
|
+
# @see ArkEmail::Resources::Webhooks#retrieve_delivery
|
|
6
|
+
class WebhookRetrieveDeliveryParams < ArkEmail::Internal::Type::BaseModel
|
|
7
|
+
extend ArkEmail::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include ArkEmail::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute webhook_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :webhook_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(webhook_id:, request_options: {})
|
|
16
|
+
# @param webhook_id [String]
|
|
17
|
+
# @param request_options [ArkEmail::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|