ark-email 0.14.0 → 0.15.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 (62) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -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/track_domain.rb +6 -2
  11. data/lib/ark_email/models/usage_retrieve_params.rb +14 -0
  12. data/lib/ark_email/models/usage_retrieve_response.rb +270 -0
  13. data/lib/ark_email/models/webhook_create_params.rb +0 -2
  14. data/lib/ark_email/models/webhook_create_response.rb +0 -2
  15. data/lib/ark_email/models/webhook_list_deliveries_params.rb +0 -2
  16. data/lib/ark_email/models/webhook_list_deliveries_response.rb +0 -2
  17. data/lib/ark_email/models/webhook_retrieve_delivery_response.rb +0 -2
  18. data/lib/ark_email/models/webhook_retrieve_response.rb +0 -2
  19. data/lib/ark_email/models/webhook_test_params.rb +0 -2
  20. data/lib/ark_email/models/webhook_update_response.rb +0 -2
  21. data/lib/ark_email/models.rb +2 -0
  22. data/lib/ark_email/resources/usage.rb +51 -0
  23. data/lib/ark_email/version.rb +1 -1
  24. data/lib/ark_email.rb +3 -0
  25. data/rbi/ark_email/client.rbi +3 -0
  26. data/rbi/ark_email/models/dns_record.rbi +57 -22
  27. data/rbi/ark_email/models/domain_create_response.rbi +189 -28
  28. data/rbi/ark_email/models/domain_list_response.rbi +13 -19
  29. data/rbi/ark_email/models/domain_retrieve_response.rbi +191 -28
  30. data/rbi/ark_email/models/domain_verify_response.rbi +189 -28
  31. data/rbi/ark_email/models/track_domain.rbi +4 -2
  32. data/rbi/ark_email/models/usage_retrieve_params.rbi +27 -0
  33. data/rbi/ark_email/models/usage_retrieve_response.rbi +511 -0
  34. data/rbi/ark_email/models/webhook_create_params.rbi +0 -10
  35. data/rbi/ark_email/models/webhook_create_response.rbi +0 -10
  36. data/rbi/ark_email/models/webhook_list_deliveries_params.rbi +0 -10
  37. data/rbi/ark_email/models/webhook_list_deliveries_response.rbi +0 -10
  38. data/rbi/ark_email/models/webhook_retrieve_delivery_response.rbi +0 -10
  39. data/rbi/ark_email/models/webhook_retrieve_response.rbi +0 -10
  40. data/rbi/ark_email/models/webhook_test_params.rbi +0 -10
  41. data/rbi/ark_email/models/webhook_update_response.rbi +0 -10
  42. data/rbi/ark_email/models.rbi +2 -0
  43. data/rbi/ark_email/resources/usage.rbi +40 -0
  44. data/sig/ark_email/client.rbs +2 -0
  45. data/sig/ark_email/models/dns_record.rbs +5 -0
  46. data/sig/ark_email/models/domain_create_response.rbs +27 -20
  47. data/sig/ark_email/models/domain_list_response.rbs +4 -16
  48. data/sig/ark_email/models/domain_retrieve_response.rbs +27 -20
  49. data/sig/ark_email/models/domain_verify_response.rbs +27 -20
  50. data/sig/ark_email/models/usage_retrieve_params.rbs +15 -0
  51. data/sig/ark_email/models/usage_retrieve_response.rbs +212 -0
  52. data/sig/ark_email/models/webhook_create_params.rbs +0 -4
  53. data/sig/ark_email/models/webhook_create_response.rbs +0 -4
  54. data/sig/ark_email/models/webhook_list_deliveries_params.rbs +0 -4
  55. data/sig/ark_email/models/webhook_list_deliveries_response.rbs +0 -4
  56. data/sig/ark_email/models/webhook_retrieve_delivery_response.rbs +0 -4
  57. data/sig/ark_email/models/webhook_retrieve_response.rbs +0 -4
  58. data/sig/ark_email/models/webhook_test_params.rbs +0 -4
  59. data/sig/ark_email/models/webhook_update_response.rbs +0 -4
  60. data/sig/ark_email/models.rbs +2 -0
  61. data/sig/ark_email/resources/usage.rbs +11 -0
  62. metadata +11 -2
data/lib/ark_email.rb CHANGED
@@ -107,6 +107,8 @@ require_relative "ark_email/models/tracking_update_params"
107
107
  require_relative "ark_email/models/tracking_update_response"
108
108
  require_relative "ark_email/models/tracking_verify_params"
109
109
  require_relative "ark_email/models/tracking_verify_response"
110
+ require_relative "ark_email/models/usage_retrieve_params"
111
+ require_relative "ark_email/models/usage_retrieve_response"
110
112
  require_relative "ark_email/models/webhook_create_params"
111
113
  require_relative "ark_email/models/webhook_create_response"
112
114
  require_relative "ark_email/models/webhook_delete_params"
@@ -131,4 +133,5 @@ require_relative "ark_email/resources/emails"
131
133
  require_relative "ark_email/resources/logs"
132
134
  require_relative "ark_email/resources/suppressions"
133
135
  require_relative "ark_email/resources/tracking"
136
+ require_relative "ark_email/resources/usage"
134
137
  require_relative "ark_email/resources/webhooks"
@@ -37,6 +37,9 @@ module ArkEmail
37
37
  sig { returns(ArkEmail::Resources::Logs) }
38
38
  attr_reader :logs
39
39
 
40
+ sig { returns(ArkEmail::Resources::Usage) }
41
+ attr_reader :usage
42
+
40
43
  # @api private
41
44
  sig { override.returns(T::Hash[String, String]) }
42
45
  private def auth_headers
@@ -6,29 +6,55 @@ module ArkEmail
6
6
  OrHash =
7
7
  T.type_alias { T.any(ArkEmail::DNSRecord, ArkEmail::Internal::AnyHash) }
8
8
 
9
- # DNS record name (hostname)
9
+ # The complete fully-qualified domain name (FQDN). Use this as a reference to
10
+ # verify the record is configured correctly.
11
+ sig { returns(String) }
12
+ attr_accessor :full_name
13
+
14
+ # The relative hostname to enter in your DNS provider. Most DNS providers
15
+ # auto-append the zone name, so you only need to enter this relative part.
16
+ #
17
+ # - `"@"` means the apex/root of the zone (for root domains)
18
+ # - `"mail"` for a subdomain like `mail.example.com`
19
+ # - `"ark-xyz._domainkey.mail"` for DKIM on a subdomain
10
20
  sig { returns(String) }
11
21
  attr_accessor :name
12
22
 
13
- # DNS record type
23
+ # The DNS record type to create
14
24
  sig { returns(ArkEmail::DNSRecord::Type::TaggedSymbol) }
15
25
  attr_accessor :type
16
26
 
17
- # DNS record value
27
+ # The value to set for the DNS record
18
28
  sig { returns(String) }
19
29
  attr_accessor :value
20
30
 
21
- # DNS verification status:
31
+ # Current verification status of this DNS record:
22
32
  #
23
- # - `OK` - Record is correctly configured
24
- # - `Missing` - Record not found in DNS
25
- # - `Invalid` - Record exists but has wrong value
26
- # - `null` - Not yet checked
33
+ # - `OK` - Record is correctly configured and verified
34
+ # - `Missing` - Record was not found in your DNS
35
+ # - `Invalid` - Record exists but has an incorrect value
36
+ # - `null` - Record has not been checked yet
27
37
  sig { returns(T.nilable(ArkEmail::DNSRecord::Status::TaggedSymbol)) }
28
38
  attr_accessor :status
29
39
 
40
+ # A DNS record that needs to be configured in your domain's DNS settings.
41
+ #
42
+ # The `name` field contains the relative hostname to enter in your DNS provider
43
+ # (which auto-appends the zone). The `fullName` field contains the complete
44
+ # fully-qualified domain name (FQDN) for reference.
45
+ #
46
+ # **Example for subdomain `mail.example.com`:**
47
+ #
48
+ # - `name`: `"mail"` (what you enter in DNS provider)
49
+ # - `fullName`: `"mail.example.com"` (the complete hostname)
50
+ #
51
+ # **Example for root domain `example.com`:**
52
+ #
53
+ # - `name`: `"@"` (DNS shorthand for apex/root)
54
+ # - `fullName`: `"example.com"`
30
55
  sig do
31
56
  params(
57
+ full_name: String,
32
58
  name: String,
33
59
  type: ArkEmail::DNSRecord::Type::OrSymbol,
34
60
  value: String,
@@ -36,18 +62,26 @@ module ArkEmail
36
62
  ).returns(T.attached_class)
37
63
  end
38
64
  def self.new(
39
- # DNS record name (hostname)
65
+ # The complete fully-qualified domain name (FQDN). Use this as a reference to
66
+ # verify the record is configured correctly.
67
+ full_name:,
68
+ # The relative hostname to enter in your DNS provider. Most DNS providers
69
+ # auto-append the zone name, so you only need to enter this relative part.
70
+ #
71
+ # - `"@"` means the apex/root of the zone (for root domains)
72
+ # - `"mail"` for a subdomain like `mail.example.com`
73
+ # - `"ark-xyz._domainkey.mail"` for DKIM on a subdomain
40
74
  name:,
41
- # DNS record type
75
+ # The DNS record type to create
42
76
  type:,
43
- # DNS record value
77
+ # The value to set for the DNS record
44
78
  value:,
45
- # DNS verification status:
79
+ # Current verification status of this DNS record:
46
80
  #
47
- # - `OK` - Record is correctly configured
48
- # - `Missing` - Record not found in DNS
49
- # - `Invalid` - Record exists but has wrong value
50
- # - `null` - Not yet checked
81
+ # - `OK` - Record is correctly configured and verified
82
+ # - `Missing` - Record was not found in your DNS
83
+ # - `Invalid` - Record exists but has an incorrect value
84
+ # - `null` - Record has not been checked yet
51
85
  status: nil
52
86
  )
53
87
  end
@@ -55,6 +89,7 @@ module ArkEmail
55
89
  sig do
56
90
  override.returns(
57
91
  {
92
+ full_name: String,
58
93
  name: String,
59
94
  type: ArkEmail::DNSRecord::Type::TaggedSymbol,
60
95
  value: String,
@@ -65,7 +100,7 @@ module ArkEmail
65
100
  def to_hash
66
101
  end
67
102
 
68
- # DNS record type
103
+ # The DNS record type to create
69
104
  module Type
70
105
  extend ArkEmail::Internal::Type::Enum
71
106
 
@@ -83,12 +118,12 @@ module ArkEmail
83
118
  end
84
119
  end
85
120
 
86
- # DNS verification status:
121
+ # Current verification status of this DNS record:
87
122
  #
88
- # - `OK` - Record is correctly configured
89
- # - `Missing` - Record not found in DNS
90
- # - `Invalid` - Record exists but has wrong value
91
- # - `null` - Not yet checked
123
+ # - `OK` - Record is correctly configured and verified
124
+ # - `Missing` - Record was not found in your DNS
125
+ # - `Invalid` - Record exists but has an incorrect value
126
+ # - `null` - Record has not been checked yet
92
127
  module Status
93
128
  extend ArkEmail::Internal::Type::Enum
94
129
 
@@ -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::DomainCreateResponse::Data::DNSRecords)
83
+ returns(
84
+ T.nilable(ArkEmail::Models::DomainCreateResponse::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::DomainCreateResponse::Data::DNSRecords::OrHash
92
+ T.nilable(
93
+ ArkEmail::Models::DomainCreateResponse::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::DomainCreateResponse::Data::DNSRecords::OrHash,
121
+ T.nilable(
122
+ ArkEmail::Models::DomainCreateResponse::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::DomainCreateResponse::Data::DNSRecords,
166
+ T.nilable(
167
+ ArkEmail::Models::DomainCreateResponse::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
@@ -95,44 +95,38 @@ module ArkEmail
95
95
  )
96
96
  end
97
97
 
98
- # Domain ID
99
- sig { returns(String) }
98
+ # Unique domain identifier
99
+ sig { returns(Integer) }
100
100
  attr_accessor :id
101
101
 
102
- sig { returns(T::Boolean) }
103
- attr_accessor :dns_ok
104
-
102
+ # The domain name used for sending emails
105
103
  sig { returns(String) }
106
104
  attr_accessor :name
107
105
 
106
+ # Whether all DNS records (SPF, DKIM, Return Path) are correctly configured.
107
+ # Domain must be verified before sending emails.
108
108
  sig { returns(T::Boolean) }
109
109
  attr_accessor :verified
110
110
 
111
111
  sig do
112
- params(
113
- id: String,
114
- dns_ok: T::Boolean,
115
- name: String,
116
- verified: T::Boolean
117
- ).returns(T.attached_class)
112
+ params(id: Integer, name: String, verified: T::Boolean).returns(
113
+ T.attached_class
114
+ )
118
115
  end
119
116
  def self.new(
120
- # Domain ID
117
+ # Unique domain identifier
121
118
  id:,
122
- dns_ok:,
119
+ # The domain name used for sending emails
123
120
  name:,
121
+ # Whether all DNS records (SPF, DKIM, Return Path) are correctly configured.
122
+ # Domain must be verified before sending emails.
124
123
  verified:
125
124
  )
126
125
  end
127
126
 
128
127
  sig do
129
128
  override.returns(
130
- {
131
- id: String,
132
- dns_ok: T::Boolean,
133
- name: String,
134
- verified: T::Boolean
135
- }
129
+ { id: Integer, name: String, verified: T::Boolean }
136
130
  )
137
131
  end
138
132
  def to_hash