ark-email 0.14.0 → 0.16.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.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +27 -0
  3. data/README.md +3 -3
  4. data/lib/ark_email/client.rb +4 -0
  5. data/lib/ark_email/models/dns_record.rb +49 -19
  6. data/lib/ark_email/models/domain_create_response.rb +117 -25
  7. data/lib/ark_email/models/domain_list_response.rb +12 -13
  8. data/lib/ark_email/models/domain_retrieve_response.rb +117 -25
  9. data/lib/ark_email/models/domain_verify_response.rb +117 -25
  10. data/lib/ark_email/models/email_list_response.rb +3 -10
  11. data/lib/ark_email/models/email_retrieve_deliveries_response.rb +11 -19
  12. data/lib/ark_email/models/email_retrieve_response.rb +3 -13
  13. data/lib/ark_email/models/email_retry_response.rb +9 -1
  14. data/lib/ark_email/models/email_send_batch_response.rb +3 -10
  15. data/lib/ark_email/models/email_send_raw_response.rb +2 -2
  16. data/lib/ark_email/models/email_send_response.rb +2 -2
  17. data/lib/ark_email/models/log_entry.rb +2 -2
  18. data/lib/ark_email/models/track_domain.rb +6 -2
  19. data/lib/ark_email/models/usage_retrieve_params.rb +14 -0
  20. data/lib/ark_email/models/usage_retrieve_response.rb +270 -0
  21. data/lib/ark_email/models/webhook_create_params.rb +0 -2
  22. data/lib/ark_email/models/webhook_create_response.rb +0 -2
  23. data/lib/ark_email/models/webhook_list_deliveries_params.rb +0 -2
  24. data/lib/ark_email/models/webhook_list_deliveries_response.rb +0 -2
  25. data/lib/ark_email/models/webhook_retrieve_delivery_response.rb +0 -2
  26. data/lib/ark_email/models/webhook_retrieve_response.rb +0 -2
  27. data/lib/ark_email/models/webhook_test_params.rb +0 -2
  28. data/lib/ark_email/models/webhook_update_response.rb +0 -2
  29. data/lib/ark_email/models.rb +2 -0
  30. data/lib/ark_email/resources/emails.rb +15 -14
  31. data/lib/ark_email/resources/usage.rb +51 -0
  32. data/lib/ark_email/version.rb +1 -1
  33. data/lib/ark_email.rb +3 -0
  34. data/rbi/ark_email/client.rbi +3 -0
  35. data/rbi/ark_email/models/dns_record.rbi +57 -22
  36. data/rbi/ark_email/models/domain_create_response.rbi +189 -28
  37. data/rbi/ark_email/models/domain_list_response.rbi +13 -19
  38. data/rbi/ark_email/models/domain_retrieve_response.rbi +191 -28
  39. data/rbi/ark_email/models/domain_verify_response.rbi +189 -28
  40. data/rbi/ark_email/models/email_list_response.rbi +2 -8
  41. data/rbi/ark_email/models/email_retrieve_deliveries_response.rbi +10 -18
  42. data/rbi/ark_email/models/email_retrieve_response.rbi +2 -14
  43. data/rbi/ark_email/models/email_retry_response.rbi +11 -3
  44. data/rbi/ark_email/models/email_send_batch_response.rbi +5 -9
  45. data/rbi/ark_email/models/email_send_raw_response.rbi +2 -2
  46. data/rbi/ark_email/models/email_send_response.rbi +2 -2
  47. data/rbi/ark_email/models/log_entry.rbi +2 -2
  48. data/rbi/ark_email/models/track_domain.rbi +4 -2
  49. data/rbi/ark_email/models/usage_retrieve_params.rbi +27 -0
  50. data/rbi/ark_email/models/usage_retrieve_response.rbi +511 -0
  51. data/rbi/ark_email/models/webhook_create_params.rbi +0 -10
  52. data/rbi/ark_email/models/webhook_create_response.rbi +0 -10
  53. data/rbi/ark_email/models/webhook_list_deliveries_params.rbi +0 -10
  54. data/rbi/ark_email/models/webhook_list_deliveries_response.rbi +0 -10
  55. data/rbi/ark_email/models/webhook_retrieve_delivery_response.rbi +0 -10
  56. data/rbi/ark_email/models/webhook_retrieve_response.rbi +0 -10
  57. data/rbi/ark_email/models/webhook_test_params.rbi +0 -10
  58. data/rbi/ark_email/models/webhook_update_response.rbi +0 -10
  59. data/rbi/ark_email/models.rbi +2 -0
  60. data/rbi/ark_email/resources/emails.rbi +14 -14
  61. data/rbi/ark_email/resources/usage.rbi +40 -0
  62. data/sig/ark_email/client.rbs +2 -0
  63. data/sig/ark_email/models/dns_record.rbs +5 -0
  64. data/sig/ark_email/models/domain_create_response.rbs +27 -20
  65. data/sig/ark_email/models/domain_list_response.rbs +4 -16
  66. data/sig/ark_email/models/domain_retrieve_response.rbs +27 -20
  67. data/sig/ark_email/models/domain_verify_response.rbs +27 -20
  68. data/sig/ark_email/models/email_list_response.rbs +0 -5
  69. data/sig/ark_email/models/email_retrieve_deliveries_response.rbs +5 -10
  70. data/sig/ark_email/models/email_retrieve_response.rbs +0 -5
  71. data/sig/ark_email/models/email_retry_response.rbs +5 -3
  72. data/sig/ark_email/models/email_send_batch_response.rbs +3 -5
  73. data/sig/ark_email/models/usage_retrieve_params.rbs +15 -0
  74. data/sig/ark_email/models/usage_retrieve_response.rbs +212 -0
  75. data/sig/ark_email/models/webhook_create_params.rbs +0 -4
  76. data/sig/ark_email/models/webhook_create_response.rbs +0 -4
  77. data/sig/ark_email/models/webhook_list_deliveries_params.rbs +0 -4
  78. data/sig/ark_email/models/webhook_list_deliveries_response.rbs +0 -4
  79. data/sig/ark_email/models/webhook_retrieve_delivery_response.rbs +0 -4
  80. data/sig/ark_email/models/webhook_retrieve_response.rbs +0 -4
  81. data/sig/ark_email/models/webhook_test_params.rbs +0 -4
  82. data/sig/ark_email/models/webhook_update_response.rbs +0 -4
  83. data/sig/ark_email/models.rbs +2 -0
  84. data/sig/ark_email/resources/emails.rbs +3 -3
  85. data/sig/ark_email/resources/usage.rbs +11 -0
  86. metadata +11 -2
@@ -59,47 +59,68 @@ module ArkEmail
59
59
  )
60
60
  end
61
61
 
62
- # Domain ID
63
- sig { returns(String) }
62
+ # Unique domain identifier
63
+ sig { returns(Integer) }
64
64
  attr_accessor :id
65
65
 
66
+ # Timestamp when the domain was added
66
67
  sig { returns(Time) }
67
68
  attr_accessor :created_at
68
69
 
70
+ # DNS records that must be added to your domain's DNS settings. Null if records
71
+ # are not yet generated.
72
+ #
73
+ # **Important:** The `name` field contains the relative hostname that you should
74
+ # enter in your DNS provider. Most DNS providers auto-append the zone name, so you
75
+ # only need to enter the relative part.
76
+ #
77
+ # For subdomains like `mail.example.com`, the zone is `example.com`, so:
78
+ #
79
+ # - SPF `name` would be `mail` (not `@`)
80
+ # - DKIM `name` would be `ark-xyz._domainkey.mail`
81
+ # - Return Path `name` would be `psrp.mail`
69
82
  sig do
70
- returns(ArkEmail::Models::DomainVerifyResponse::Data::DNSRecords)
83
+ returns(
84
+ T.nilable(ArkEmail::Models::DomainVerifyResponse::Data::DNSRecords)
85
+ )
71
86
  end
72
87
  attr_reader :dns_records
73
88
 
74
89
  sig do
75
90
  params(
76
91
  dns_records:
77
- ArkEmail::Models::DomainVerifyResponse::Data::DNSRecords::OrHash
92
+ T.nilable(
93
+ ArkEmail::Models::DomainVerifyResponse::Data::DNSRecords::OrHash
94
+ )
78
95
  ).void
79
96
  end
80
97
  attr_writer :dns_records
81
98
 
82
- # Domain name
99
+ # The domain name used for sending emails
83
100
  sig { returns(String) }
84
101
  attr_accessor :name
85
102
 
103
+ # UUID of the domain
86
104
  sig { returns(String) }
87
105
  attr_accessor :uuid
88
106
 
89
- # Whether DNS is verified
107
+ # Whether all DNS records (SPF, DKIM, Return Path) are correctly configured.
108
+ # Domain must be verified before sending emails.
90
109
  sig { returns(T::Boolean) }
91
110
  attr_accessor :verified
92
111
 
93
- # When the domain was verified (null if not verified)
112
+ # Timestamp when the domain ownership was verified, or null if not yet verified
94
113
  sig { returns(T.nilable(Time)) }
95
114
  attr_accessor :verified_at
96
115
 
97
116
  sig do
98
117
  params(
99
- id: String,
118
+ id: Integer,
100
119
  created_at: Time,
101
120
  dns_records:
102
- ArkEmail::Models::DomainVerifyResponse::Data::DNSRecords::OrHash,
121
+ T.nilable(
122
+ ArkEmail::Models::DomainVerifyResponse::Data::DNSRecords::OrHash
123
+ ),
103
124
  name: String,
104
125
  uuid: String,
105
126
  verified: T::Boolean,
@@ -107,16 +128,31 @@ module ArkEmail
107
128
  ).returns(T.attached_class)
108
129
  end
109
130
  def self.new(
110
- # Domain ID
131
+ # Unique domain identifier
111
132
  id:,
133
+ # Timestamp when the domain was added
112
134
  created_at:,
135
+ # DNS records that must be added to your domain's DNS settings. Null if records
136
+ # are not yet generated.
137
+ #
138
+ # **Important:** The `name` field contains the relative hostname that you should
139
+ # enter in your DNS provider. Most DNS providers auto-append the zone name, so you
140
+ # only need to enter the relative part.
141
+ #
142
+ # For subdomains like `mail.example.com`, the zone is `example.com`, so:
143
+ #
144
+ # - SPF `name` would be `mail` (not `@`)
145
+ # - DKIM `name` would be `ark-xyz._domainkey.mail`
146
+ # - Return Path `name` would be `psrp.mail`
113
147
  dns_records:,
114
- # Domain name
148
+ # The domain name used for sending emails
115
149
  name:,
150
+ # UUID of the domain
116
151
  uuid:,
117
- # Whether DNS is verified
152
+ # Whether all DNS records (SPF, DKIM, Return Path) are correctly configured.
153
+ # Domain must be verified before sending emails.
118
154
  verified:,
119
- # When the domain was verified (null if not verified)
155
+ # Timestamp when the domain ownership was verified, or null if not yet verified
120
156
  verified_at: nil
121
157
  )
122
158
  end
@@ -124,10 +160,12 @@ module ArkEmail
124
160
  sig do
125
161
  override.returns(
126
162
  {
127
- id: String,
163
+ id: Integer,
128
164
  created_at: Time,
129
165
  dns_records:
130
- ArkEmail::Models::DomainVerifyResponse::Data::DNSRecords,
166
+ T.nilable(
167
+ ArkEmail::Models::DomainVerifyResponse::Data::DNSRecords
168
+ ),
131
169
  name: String,
132
170
  uuid: String,
133
171
  verified: T::Boolean,
@@ -147,40 +185,163 @@ module ArkEmail
147
185
  )
148
186
  end
149
187
 
150
- sig { returns(ArkEmail::DNSRecord) }
188
+ # A DNS record that needs to be configured in your domain's DNS settings.
189
+ #
190
+ # The `name` field contains the relative hostname to enter in your DNS provider
191
+ # (which auto-appends the zone). The `fullName` field contains the complete
192
+ # fully-qualified domain name (FQDN) for reference.
193
+ #
194
+ # **Example for subdomain `mail.example.com`:**
195
+ #
196
+ # - `name`: `"mail"` (what you enter in DNS provider)
197
+ # - `fullName`: `"mail.example.com"` (the complete hostname)
198
+ #
199
+ # **Example for root domain `example.com`:**
200
+ #
201
+ # - `name`: `"@"` (DNS shorthand for apex/root)
202
+ # - `fullName`: `"example.com"`
203
+ sig { returns(T.nilable(ArkEmail::DNSRecord)) }
151
204
  attr_reader :dkim
152
205
 
153
- sig { params(dkim: ArkEmail::DNSRecord::OrHash).void }
206
+ sig { params(dkim: T.nilable(ArkEmail::DNSRecord::OrHash)).void }
154
207
  attr_writer :dkim
155
208
 
156
- sig { returns(ArkEmail::DNSRecord) }
209
+ # A DNS record that needs to be configured in your domain's DNS settings.
210
+ #
211
+ # The `name` field contains the relative hostname to enter in your DNS provider
212
+ # (which auto-appends the zone). The `fullName` field contains the complete
213
+ # fully-qualified domain name (FQDN) for reference.
214
+ #
215
+ # **Example for subdomain `mail.example.com`:**
216
+ #
217
+ # - `name`: `"mail"` (what you enter in DNS provider)
218
+ # - `fullName`: `"mail.example.com"` (the complete hostname)
219
+ #
220
+ # **Example for root domain `example.com`:**
221
+ #
222
+ # - `name`: `"@"` (DNS shorthand for apex/root)
223
+ # - `fullName`: `"example.com"`
224
+ sig { returns(T.nilable(ArkEmail::DNSRecord)) }
157
225
  attr_reader :return_path
158
226
 
159
- sig { params(return_path: ArkEmail::DNSRecord::OrHash).void }
227
+ sig do
228
+ params(return_path: T.nilable(ArkEmail::DNSRecord::OrHash)).void
229
+ end
160
230
  attr_writer :return_path
161
231
 
162
- sig { returns(ArkEmail::DNSRecord) }
232
+ # A DNS record that needs to be configured in your domain's DNS settings.
233
+ #
234
+ # The `name` field contains the relative hostname to enter in your DNS provider
235
+ # (which auto-appends the zone). The `fullName` field contains the complete
236
+ # fully-qualified domain name (FQDN) for reference.
237
+ #
238
+ # **Example for subdomain `mail.example.com`:**
239
+ #
240
+ # - `name`: `"mail"` (what you enter in DNS provider)
241
+ # - `fullName`: `"mail.example.com"` (the complete hostname)
242
+ #
243
+ # **Example for root domain `example.com`:**
244
+ #
245
+ # - `name`: `"@"` (DNS shorthand for apex/root)
246
+ # - `fullName`: `"example.com"`
247
+ sig { returns(T.nilable(ArkEmail::DNSRecord)) }
163
248
  attr_reader :spf
164
249
 
165
- sig { params(spf: ArkEmail::DNSRecord::OrHash).void }
250
+ sig { params(spf: T.nilable(ArkEmail::DNSRecord::OrHash)).void }
166
251
  attr_writer :spf
167
252
 
253
+ # The DNS zone (registrable domain) where records should be added. This is the
254
+ # root domain that your DNS provider manages. For `mail.example.com`, the zone is
255
+ # `example.com`. For `example.co.uk`, the zone is `example.co.uk`.
256
+ sig { returns(T.nilable(String)) }
257
+ attr_reader :zone
258
+
259
+ sig { params(zone: String).void }
260
+ attr_writer :zone
261
+
262
+ # DNS records that must be added to your domain's DNS settings. Null if records
263
+ # are not yet generated.
264
+ #
265
+ # **Important:** The `name` field contains the relative hostname that you should
266
+ # enter in your DNS provider. Most DNS providers auto-append the zone name, so you
267
+ # only need to enter the relative part.
268
+ #
269
+ # For subdomains like `mail.example.com`, the zone is `example.com`, so:
270
+ #
271
+ # - SPF `name` would be `mail` (not `@`)
272
+ # - DKIM `name` would be `ark-xyz._domainkey.mail`
273
+ # - Return Path `name` would be `psrp.mail`
168
274
  sig do
169
275
  params(
170
- dkim: ArkEmail::DNSRecord::OrHash,
171
- return_path: ArkEmail::DNSRecord::OrHash,
172
- spf: ArkEmail::DNSRecord::OrHash
276
+ dkim: T.nilable(ArkEmail::DNSRecord::OrHash),
277
+ return_path: T.nilable(ArkEmail::DNSRecord::OrHash),
278
+ spf: T.nilable(ArkEmail::DNSRecord::OrHash),
279
+ zone: String
173
280
  ).returns(T.attached_class)
174
281
  end
175
- def self.new(dkim:, return_path:, spf:)
282
+ def self.new(
283
+ # A DNS record that needs to be configured in your domain's DNS settings.
284
+ #
285
+ # The `name` field contains the relative hostname to enter in your DNS provider
286
+ # (which auto-appends the zone). The `fullName` field contains the complete
287
+ # fully-qualified domain name (FQDN) for reference.
288
+ #
289
+ # **Example for subdomain `mail.example.com`:**
290
+ #
291
+ # - `name`: `"mail"` (what you enter in DNS provider)
292
+ # - `fullName`: `"mail.example.com"` (the complete hostname)
293
+ #
294
+ # **Example for root domain `example.com`:**
295
+ #
296
+ # - `name`: `"@"` (DNS shorthand for apex/root)
297
+ # - `fullName`: `"example.com"`
298
+ dkim: nil,
299
+ # A DNS record that needs to be configured in your domain's DNS settings.
300
+ #
301
+ # The `name` field contains the relative hostname to enter in your DNS provider
302
+ # (which auto-appends the zone). The `fullName` field contains the complete
303
+ # fully-qualified domain name (FQDN) for reference.
304
+ #
305
+ # **Example for subdomain `mail.example.com`:**
306
+ #
307
+ # - `name`: `"mail"` (what you enter in DNS provider)
308
+ # - `fullName`: `"mail.example.com"` (the complete hostname)
309
+ #
310
+ # **Example for root domain `example.com`:**
311
+ #
312
+ # - `name`: `"@"` (DNS shorthand for apex/root)
313
+ # - `fullName`: `"example.com"`
314
+ return_path: nil,
315
+ # A DNS record that needs to be configured in your domain's DNS settings.
316
+ #
317
+ # The `name` field contains the relative hostname to enter in your DNS provider
318
+ # (which auto-appends the zone). The `fullName` field contains the complete
319
+ # fully-qualified domain name (FQDN) for reference.
320
+ #
321
+ # **Example for subdomain `mail.example.com`:**
322
+ #
323
+ # - `name`: `"mail"` (what you enter in DNS provider)
324
+ # - `fullName`: `"mail.example.com"` (the complete hostname)
325
+ #
326
+ # **Example for root domain `example.com`:**
327
+ #
328
+ # - `name`: `"@"` (DNS shorthand for apex/root)
329
+ # - `fullName`: `"example.com"`
330
+ spf: nil,
331
+ # The DNS zone (registrable domain) where records should be added. This is the
332
+ # root domain that your DNS provider manages. For `mail.example.com`, the zone is
333
+ # `example.com`. For `example.co.uk`, the zone is `example.co.uk`.
334
+ zone: nil
335
+ )
176
336
  end
177
337
 
178
338
  sig do
179
339
  override.returns(
180
340
  {
181
- dkim: ArkEmail::DNSRecord,
182
- return_path: ArkEmail::DNSRecord,
183
- spf: ArkEmail::DNSRecord
341
+ dkim: T.nilable(ArkEmail::DNSRecord),
342
+ return_path: T.nilable(ArkEmail::DNSRecord),
343
+ spf: T.nilable(ArkEmail::DNSRecord),
344
+ zone: String
184
345
  }
185
346
  )
186
347
  end
@@ -11,13 +11,10 @@ module ArkEmail
11
11
  )
12
12
  end
13
13
 
14
- # Internal message ID
14
+ # Unique message identifier (token)
15
15
  sig { returns(String) }
16
16
  attr_accessor :id
17
17
 
18
- sig { returns(String) }
19
- attr_accessor :token
20
-
21
18
  sig { returns(String) }
22
19
  attr_accessor :from
23
20
 
@@ -53,7 +50,6 @@ module ArkEmail
53
50
  sig do
54
51
  params(
55
52
  id: String,
56
- token: String,
57
53
  from: String,
58
54
  status: ArkEmail::Models::EmailListResponse::Status::OrSymbol,
59
55
  subject: String,
@@ -64,9 +60,8 @@ module ArkEmail
64
60
  ).returns(T.attached_class)
65
61
  end
66
62
  def self.new(
67
- # Internal message ID
63
+ # Unique message identifier (token)
68
64
  id:,
69
- token:,
70
65
  from:,
71
66
  # Current delivery status:
72
67
  #
@@ -89,7 +84,6 @@ module ArkEmail
89
84
  override.returns(
90
85
  {
91
86
  id: String,
92
- token: String,
93
87
  from: String,
94
88
  status: ArkEmail::Models::EmailListResponse::Status::TaggedSymbol,
95
89
  subject: String,
@@ -61,7 +61,11 @@ module ArkEmail
61
61
  )
62
62
  end
63
63
 
64
- # Whether the message can be manually retried via `POST /emails/{emailId}/retry`.
64
+ # Message identifier (token)
65
+ sig { returns(String) }
66
+ attr_accessor :id
67
+
68
+ # Whether the message can be manually retried via `POST /emails/{id}/retry`.
65
69
  # `true` when the raw message content is still available (not expired). Messages
66
70
  # older than the retention period cannot be retried.
67
71
  sig { returns(T::Boolean) }
@@ -78,14 +82,6 @@ module ArkEmail
78
82
  end
79
83
  attr_accessor :deliveries
80
84
 
81
- # Internal numeric message ID
82
- sig { returns(Integer) }
83
- attr_accessor :message_id
84
-
85
- # Unique message token for API references
86
- sig { returns(String) }
87
- attr_accessor :message_token
88
-
89
85
  # Information about the current retry state of a message that is queued for
90
86
  # delivery. Only present when the message is in the delivery queue.
91
87
  sig do
@@ -124,13 +120,12 @@ module ArkEmail
124
120
 
125
121
  sig do
126
122
  params(
123
+ id: String,
127
124
  can_retry_manually: T::Boolean,
128
125
  deliveries:
129
126
  T::Array[
130
127
  ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Delivery::OrHash
131
128
  ],
132
- message_id: Integer,
133
- message_token: String,
134
129
  retry_state:
135
130
  T.nilable(
136
131
  ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::RetryState::OrHash
@@ -140,17 +135,15 @@ module ArkEmail
140
135
  ).returns(T.attached_class)
141
136
  end
142
137
  def self.new(
143
- # Whether the message can be manually retried via `POST /emails/{emailId}/retry`.
138
+ # Message identifier (token)
139
+ id:,
140
+ # Whether the message can be manually retried via `POST /emails/{id}/retry`.
144
141
  # `true` when the raw message content is still available (not expired). Messages
145
142
  # older than the retention period cannot be retried.
146
143
  can_retry_manually:,
147
144
  # Chronological list of delivery attempts for this message. Each attempt includes
148
145
  # SMTP response codes and timestamps.
149
146
  deliveries:,
150
- # Internal numeric message ID
151
- message_id:,
152
- # Unique message token for API references
153
- message_token:,
154
147
  # Information about the current retry state of a message that is queued for
155
148
  # delivery. Only present when the message is in the delivery queue.
156
149
  retry_state:,
@@ -169,13 +162,12 @@ module ArkEmail
169
162
  sig do
170
163
  override.returns(
171
164
  {
165
+ id: String,
172
166
  can_retry_manually: T::Boolean,
173
167
  deliveries:
174
168
  T::Array[
175
169
  ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Delivery
176
170
  ],
177
- message_id: Integer,
178
- message_token: String,
179
171
  retry_state:
180
172
  T.nilable(
181
173
  ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::RetryState
@@ -59,16 +59,10 @@ module ArkEmail
59
59
  )
60
60
  end
61
61
 
62
- # Internal message ID
62
+ # Unique message identifier (token)
63
63
  sig { returns(String) }
64
64
  attr_accessor :id
65
65
 
66
- # Unique message token used to retrieve this email via API. Combined with id to
67
- # form the full message identifier: msg*{id}*{token} Use this token with GET
68
- # /emails/{emailId} where emailId = "msg*{id}*{token}"
69
- sig { returns(String) }
70
- attr_accessor :token
71
-
72
66
  # Sender address
73
67
  sig { returns(String) }
74
68
  attr_accessor :from
@@ -230,7 +224,6 @@ module ArkEmail
230
224
  sig do
231
225
  params(
232
226
  id: String,
233
- token: String,
234
227
  from: String,
235
228
  scope:
236
229
  ArkEmail::Models::EmailRetrieveResponse::Data::Scope::OrSymbol,
@@ -261,12 +254,8 @@ module ArkEmail
261
254
  ).returns(T.attached_class)
262
255
  end
263
256
  def self.new(
264
- # Internal message ID
257
+ # Unique message identifier (token)
265
258
  id:,
266
- # Unique message token used to retrieve this email via API. Combined with id to
267
- # form the full message identifier: msg*{id}*{token} Use this token with GET
268
- # /emails/{emailId} where emailId = "msg*{id}*{token}"
269
- token:,
270
259
  # Sender address
271
260
  from:,
272
261
  # Message direction
@@ -318,7 +307,6 @@ module ArkEmail
318
307
  override.returns(
319
308
  {
320
309
  id: String,
321
- token: String,
322
310
  from: String,
323
311
  scope:
324
312
  ArkEmail::Models::EmailRetrieveResponse::Data::Scope::TaggedSymbol,
@@ -59,14 +59,22 @@ module ArkEmail
59
59
  )
60
60
  end
61
61
 
62
+ # Email identifier (token)
63
+ sig { returns(String) }
64
+ attr_accessor :id
65
+
62
66
  sig { returns(String) }
63
67
  attr_accessor :message
64
68
 
65
- sig { params(message: String).returns(T.attached_class) }
66
- def self.new(message:)
69
+ sig { params(id: String, message: String).returns(T.attached_class) }
70
+ def self.new(
71
+ # Email identifier (token)
72
+ id:,
73
+ message:
74
+ )
67
75
  end
68
76
 
69
- sig { override.returns({ message: String }) }
77
+ sig { override.returns({ id: String, message: String }) }
70
78
  def to_hash
71
79
  end
72
80
  end
@@ -147,22 +147,18 @@ module ArkEmail
147
147
  )
148
148
  end
149
149
 
150
- # Message ID
150
+ # Message identifier (token)
151
151
  sig { returns(String) }
152
152
  attr_accessor :id
153
153
 
154
- sig { returns(String) }
155
- attr_accessor :token
156
-
157
- sig { params(id: String, token: String).returns(T.attached_class) }
154
+ sig { params(id: String).returns(T.attached_class) }
158
155
  def self.new(
159
- # Message ID
160
- id:,
161
- token:
156
+ # Message identifier (token)
157
+ id:
162
158
  )
163
159
  end
164
160
 
165
- sig { override.returns({ id: String, token: String }) }
161
+ sig { override.returns({ id: String }) }
166
162
  def to_hash
167
163
  end
168
164
  end
@@ -59,7 +59,7 @@ module ArkEmail
59
59
  )
60
60
  end
61
61
 
62
- # Unique message ID (format: msg*{id}*{token})
62
+ # Unique message identifier (token)
63
63
  sig { returns(String) }
64
64
  attr_accessor :id
65
65
 
@@ -101,7 +101,7 @@ module ArkEmail
101
101
  ).returns(T.attached_class)
102
102
  end
103
103
  def self.new(
104
- # Unique message ID (format: msg*{id}*{token})
104
+ # Unique message identifier (token)
105
105
  id:,
106
106
  # Current delivery status
107
107
  status:,
@@ -59,7 +59,7 @@ module ArkEmail
59
59
  )
60
60
  end
61
61
 
62
- # Unique message ID (format: msg*{id}*{token})
62
+ # Unique message identifier (token)
63
63
  sig { returns(String) }
64
64
  attr_accessor :id
65
65
 
@@ -100,7 +100,7 @@ module ArkEmail
100
100
  ).returns(T.attached_class)
101
101
  end
102
102
  def self.new(
103
- # Unique message ID (format: msg*{id}*{token})
103
+ # Unique message identifier (token)
104
104
  id:,
105
105
  # Current delivery status
106
106
  status:,
@@ -323,7 +323,7 @@ module ArkEmail
323
323
  T.any(ArkEmail::LogEntry::Email, ArkEmail::Internal::AnyHash)
324
324
  end
325
325
 
326
- # Email message ID
326
+ # Email message identifier (token)
327
327
  sig { returns(T.nilable(String)) }
328
328
  attr_reader :id
329
329
 
@@ -341,7 +341,7 @@ module ArkEmail
341
341
  )
342
342
  end
343
343
  def self.new(
344
- # Email message ID
344
+ # Email message identifier (token)
345
345
  id: nil,
346
346
  # Number of recipients
347
347
  recipient_count: nil
@@ -16,7 +16,8 @@ module ArkEmail
16
16
  sig { returns(Time) }
17
17
  attr_accessor :created_at
18
18
 
19
- # Whether DNS is correctly configured
19
+ # Whether the tracking CNAME record is correctly configured. Must be true to use
20
+ # tracking features.
20
21
  sig { returns(T::Boolean) }
21
22
  attr_accessor :dns_ok
22
23
 
@@ -99,7 +100,8 @@ module ArkEmail
99
100
  id:,
100
101
  # When the track domain was created
101
102
  created_at:,
102
- # Whether DNS is correctly configured
103
+ # Whether the tracking CNAME record is correctly configured. Must be true to use
104
+ # tracking features.
103
105
  dns_ok:,
104
106
  # ID of the parent sending domain
105
107
  domain_id:,
@@ -0,0 +1,27 @@
1
+ # typed: strong
2
+
3
+ module ArkEmail
4
+ module Models
5
+ class UsageRetrieveParams < ArkEmail::Internal::Type::BaseModel
6
+ extend ArkEmail::Internal::Type::RequestParameters::Converter
7
+ include ArkEmail::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(ArkEmail::UsageRetrieveParams, ArkEmail::Internal::AnyHash)
12
+ end
13
+
14
+ sig do
15
+ params(request_options: ArkEmail::RequestOptions::OrHash).returns(
16
+ T.attached_class
17
+ )
18
+ end
19
+ def self.new(request_options: {})
20
+ end
21
+
22
+ sig { override.returns({ request_options: ArkEmail::RequestOptions }) }
23
+ def to_hash
24
+ end
25
+ end
26
+ end
27
+ end