ark-email 0.13.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/README.md +3 -3
- data/lib/ark_email/client.rb +8 -0
- data/lib/ark_email/models/dns_record.rb +49 -19
- data/lib/ark_email/models/domain_create_response.rb +117 -25
- data/lib/ark_email/models/domain_list_response.rb +12 -13
- data/lib/ark_email/models/domain_retrieve_response.rb +117 -25
- data/lib/ark_email/models/domain_verify_response.rb +117 -25
- data/lib/ark_email/models/email_retrieve_params.rb +4 -1
- data/lib/ark_email/models/email_retrieve_response.rb +177 -1
- data/lib/ark_email/models/log_entry.rb +298 -0
- data/lib/ark_email/models/log_entry_detail.rb +102 -0
- data/lib/ark_email/models/log_list_params.rb +106 -0
- data/lib/ark_email/models/log_retrieve_params.rb +14 -0
- data/lib/ark_email/models/log_retrieve_response.rb +33 -0
- data/lib/ark_email/models/track_domain.rb +6 -2
- data/lib/ark_email/models/usage_retrieve_params.rb +14 -0
- data/lib/ark_email/models/usage_retrieve_response.rb +270 -0
- data/lib/ark_email/models/webhook_create_params.rb +0 -2
- data/lib/ark_email/models/webhook_create_response.rb +0 -2
- data/lib/ark_email/models/webhook_list_deliveries_params.rb +0 -2
- data/lib/ark_email/models/webhook_list_deliveries_response.rb +0 -2
- data/lib/ark_email/models/webhook_retrieve_delivery_response.rb +0 -2
- data/lib/ark_email/models/webhook_retrieve_response.rb +0 -2
- data/lib/ark_email/models/webhook_test_params.rb +0 -2
- data/lib/ark_email/models/webhook_update_response.rb +0 -2
- data/lib/ark_email/models.rb +10 -0
- data/lib/ark_email/resources/logs.rb +120 -0
- data/lib/ark_email/resources/usage.rb +51 -0
- data/lib/ark_email/version.rb +1 -1
- data/lib/ark_email.rb +9 -0
- data/rbi/ark_email/client.rbi +6 -0
- data/rbi/ark_email/models/dns_record.rbi +57 -22
- data/rbi/ark_email/models/domain_create_response.rbi +189 -28
- data/rbi/ark_email/models/domain_list_response.rbi +13 -19
- data/rbi/ark_email/models/domain_retrieve_response.rbi +191 -28
- data/rbi/ark_email/models/domain_verify_response.rbi +189 -28
- data/rbi/ark_email/models/email_retrieve_params.rbi +8 -2
- data/rbi/ark_email/models/email_retrieve_response.rbi +379 -0
- data/rbi/ark_email/models/log_entry.rbi +431 -0
- data/rbi/ark_email/models/log_entry_detail.rbi +192 -0
- data/rbi/ark_email/models/log_list_params.rbi +163 -0
- data/rbi/ark_email/models/log_retrieve_params.rbi +27 -0
- data/rbi/ark_email/models/log_retrieve_response.rbi +59 -0
- data/rbi/ark_email/models/track_domain.rbi +4 -2
- data/rbi/ark_email/models/usage_retrieve_params.rbi +27 -0
- data/rbi/ark_email/models/usage_retrieve_response.rbi +511 -0
- data/rbi/ark_email/models/webhook_create_params.rbi +0 -10
- data/rbi/ark_email/models/webhook_create_response.rbi +0 -10
- data/rbi/ark_email/models/webhook_list_deliveries_params.rbi +0 -10
- data/rbi/ark_email/models/webhook_list_deliveries_response.rbi +0 -10
- data/rbi/ark_email/models/webhook_retrieve_delivery_response.rbi +0 -10
- data/rbi/ark_email/models/webhook_retrieve_response.rbi +0 -10
- data/rbi/ark_email/models/webhook_test_params.rbi +0 -10
- data/rbi/ark_email/models/webhook_update_response.rbi +0 -10
- data/rbi/ark_email/models.rbi +10 -0
- data/rbi/ark_email/resources/emails.rbi +4 -1
- data/rbi/ark_email/resources/logs.rbi +104 -0
- data/rbi/ark_email/resources/usage.rbi +40 -0
- data/sig/ark_email/client.rbs +4 -0
- data/sig/ark_email/models/dns_record.rbs +5 -0
- data/sig/ark_email/models/domain_create_response.rbs +27 -20
- data/sig/ark_email/models/domain_list_response.rbs +4 -16
- data/sig/ark_email/models/domain_retrieve_response.rbs +27 -20
- data/sig/ark_email/models/domain_verify_response.rbs +27 -20
- data/sig/ark_email/models/email_retrieve_response.rbs +179 -0
- data/sig/ark_email/models/log_entry.rbs +209 -0
- data/sig/ark_email/models/log_entry_detail.rbs +97 -0
- data/sig/ark_email/models/log_list_params.rbs +97 -0
- data/sig/ark_email/models/log_retrieve_params.rbs +15 -0
- data/sig/ark_email/models/log_retrieve_response.rbs +26 -0
- data/sig/ark_email/models/usage_retrieve_params.rbs +15 -0
- data/sig/ark_email/models/usage_retrieve_response.rbs +212 -0
- data/sig/ark_email/models/webhook_create_params.rbs +0 -4
- data/sig/ark_email/models/webhook_create_response.rbs +0 -4
- data/sig/ark_email/models/webhook_list_deliveries_params.rbs +0 -4
- data/sig/ark_email/models/webhook_list_deliveries_response.rbs +0 -4
- data/sig/ark_email/models/webhook_retrieve_delivery_response.rbs +0 -4
- data/sig/ark_email/models/webhook_retrieve_response.rbs +0 -4
- data/sig/ark_email/models/webhook_test_params.rbs +0 -4
- data/sig/ark_email/models/webhook_update_response.rbs +0 -4
- data/sig/ark_email/models.rbs +10 -0
- data/sig/ark_email/resources/logs.rbs +25 -0
- data/sig/ark_email/resources/usage.rbs +11 -0
- metadata +29 -2
|
@@ -6,29 +6,55 @@ module ArkEmail
|
|
|
6
6
|
OrHash =
|
|
7
7
|
T.type_alias { T.any(ArkEmail::DNSRecord, ArkEmail::Internal::AnyHash) }
|
|
8
8
|
|
|
9
|
-
#
|
|
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
|
|
27
|
+
# The value to set for the DNS record
|
|
18
28
|
sig { returns(String) }
|
|
19
29
|
attr_accessor :value
|
|
20
30
|
|
|
21
|
-
#
|
|
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
|
|
26
|
-
# - `null` -
|
|
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
|
-
#
|
|
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
|
|
77
|
+
# The value to set for the DNS record
|
|
44
78
|
value:,
|
|
45
|
-
#
|
|
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
|
|
50
|
-
# - `null` -
|
|
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
|
-
#
|
|
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
|
|
91
|
-
# - `null` -
|
|
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
|
-
#
|
|
63
|
-
sig { returns(
|
|
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(
|
|
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
|
-
|
|
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
|
-
#
|
|
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
|
|
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
|
-
#
|
|
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:
|
|
118
|
+
id: Integer,
|
|
100
119
|
created_at: Time,
|
|
101
120
|
dns_records:
|
|
102
|
-
|
|
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
|
-
#
|
|
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
|
-
#
|
|
148
|
+
# The domain name used for sending emails
|
|
115
149
|
name:,
|
|
150
|
+
# UUID of the domain
|
|
116
151
|
uuid:,
|
|
117
|
-
# Whether DNS
|
|
152
|
+
# Whether all DNS records (SPF, DKIM, Return Path) are correctly configured.
|
|
153
|
+
# Domain must be verified before sending emails.
|
|
118
154
|
verified:,
|
|
119
|
-
#
|
|
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:
|
|
163
|
+
id: Integer,
|
|
128
164
|
created_at: Time,
|
|
129
165
|
dns_records:
|
|
130
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
227
|
+
sig do
|
|
228
|
+
params(return_path: T.nilable(ArkEmail::DNSRecord::OrHash)).void
|
|
229
|
+
end
|
|
160
230
|
attr_writer :return_path
|
|
161
231
|
|
|
162
|
-
|
|
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(
|
|
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
|
-
#
|
|
99
|
-
sig { returns(
|
|
98
|
+
# Unique domain identifier
|
|
99
|
+
sig { returns(Integer) }
|
|
100
100
|
attr_accessor :id
|
|
101
101
|
|
|
102
|
-
|
|
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
|
-
|
|
114
|
-
|
|
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
|
-
#
|
|
117
|
+
# Unique domain identifier
|
|
121
118
|
id:,
|
|
122
|
-
|
|
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
|