mailfloss 0.1.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 +7 -0
- data/CHANGELOG.md +19 -0
- data/LICENSE +21 -0
- data/README.md +203 -0
- data/lib/mailfloss/client.rb +209 -0
- data/lib/mailfloss/errors.rb +64 -0
- data/lib/mailfloss/resources.rb +294 -0
- data/lib/mailfloss/transport.rb +73 -0
- data/lib/mailfloss/version.rb +5 -0
- data/lib/mailfloss.rb +14 -0
- data/sig/mailfloss.rbs +77 -0
- data/sig/resources.rbs +85 -0
- data/sig/types.rbs +266 -0
- metadata +62 -0
data/sig/types.rbs
ADDED
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
# Response shapes, hand-derived from the mailfloss v1 OpenAPI spec
|
|
2
|
+
# (docs/api/openapi.v1.public.json). Responses are parsed with
|
|
3
|
+
# JSON.parse(symbolize_names: true), so all keys are Symbols.
|
|
4
|
+
module Mailfloss
|
|
5
|
+
module Types
|
|
6
|
+
# Cursor pagination envelope for all list endpoints:
|
|
7
|
+
# { data: [...], pagination: { next_cursor:, has_more: } }
|
|
8
|
+
type pagination = { next_cursor: String?, has_more: bool }
|
|
9
|
+
|
|
10
|
+
# GET /verify
|
|
11
|
+
# status: "passed" | "undeliverable" | "risky" | "unknown"
|
|
12
|
+
type verify_result = {
|
|
13
|
+
email: String,
|
|
14
|
+
domain: String?,
|
|
15
|
+
status: String,
|
|
16
|
+
reason: String,
|
|
17
|
+
passed: bool,
|
|
18
|
+
role: bool?,
|
|
19
|
+
disposable: bool?,
|
|
20
|
+
free: bool?,
|
|
21
|
+
suggestion: String?,
|
|
22
|
+
meta: String?
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
# POST /batch-verify
|
|
26
|
+
type batch_create_result = { id: String }
|
|
27
|
+
|
|
28
|
+
# GET /batch-verify/{id}/status
|
|
29
|
+
type batch_status_result = { status: String?, progress: Numeric? }
|
|
30
|
+
|
|
31
|
+
# GET /batch-verify/{id}/results
|
|
32
|
+
type batch_results_result = { id: String?, results: Array[untyped]? }
|
|
33
|
+
|
|
34
|
+
# POST /batch-verify/{id}/cancel
|
|
35
|
+
type batch_cancel_result = { success: bool? }
|
|
36
|
+
|
|
37
|
+
# Per-verdict counts on a completed job (null mid-flight/cancelled).
|
|
38
|
+
type job_results = {
|
|
39
|
+
total: Integer, processed: Integer, passed: Integer, failed: Integer,
|
|
40
|
+
undeliverable: Integer, risky: Integer, unknown: Integer
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
# GET /jobs/{id} and items of GET /jobs data[].
|
|
44
|
+
# status: queued|processing|completed|cancelled
|
|
45
|
+
# source: api|csv|zapier|widget|input|integration
|
|
46
|
+
type job = {
|
|
47
|
+
id: String,
|
|
48
|
+
status: String,
|
|
49
|
+
source: String,
|
|
50
|
+
source_integration: String?,
|
|
51
|
+
created_at: String?,
|
|
52
|
+
finished_at: String?,
|
|
53
|
+
results: job_results?
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
# GET /jobs
|
|
57
|
+
type jobs_list = { data: Array[job], pagination: pagination }
|
|
58
|
+
|
|
59
|
+
# GET /users/{user_id} and items of GET /users data[].
|
|
60
|
+
# role: administrator|contributor; status: active|invited|paused
|
|
61
|
+
type user = {
|
|
62
|
+
id: String,
|
|
63
|
+
email: String,
|
|
64
|
+
name: String?,
|
|
65
|
+
role: String,
|
|
66
|
+
is_primary: bool,
|
|
67
|
+
status: String,
|
|
68
|
+
created_at: String?
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
# GET /users
|
|
72
|
+
type users_list = { data: Array[user], pagination: pagination }
|
|
73
|
+
|
|
74
|
+
# GET /reports/usage — statuses/reasons/range are null for period=lifetime.
|
|
75
|
+
type usage_statuses = {
|
|
76
|
+
passed: Integer, failed: Integer, undeliverable: Integer,
|
|
77
|
+
risky: Integer, unknown: Integer
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
type usage_reasons = {
|
|
81
|
+
invalid: Integer, nonexistent: Integer, deactivated: Integer,
|
|
82
|
+
inbox_full: Integer, illegitimate: Integer, spam: Integer,
|
|
83
|
+
role_based: Integer, banned_words: Integer, disposable: Integer,
|
|
84
|
+
failed_exchange: Integer, accept_all: Integer, unverified: Integer,
|
|
85
|
+
complained: Integer, bounced: Integer, blacklisted: Integer,
|
|
86
|
+
available: Integer
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
type usage_report = {
|
|
90
|
+
period: String,
|
|
91
|
+
connection_id: String?,
|
|
92
|
+
range: { start: String, end: String }?,
|
|
93
|
+
total: Integer,
|
|
94
|
+
statuses: usage_statuses?,
|
|
95
|
+
reasons: usage_reasons?
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
# GET /check-key (legacy field names preserved by the API)
|
|
99
|
+
type check_key_result = {
|
|
100
|
+
name: String?,
|
|
101
|
+
organization: String?,
|
|
102
|
+
planType: String?,
|
|
103
|
+
freeMatches: Numeric?,
|
|
104
|
+
extraCredits: Numeric?
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
# GET /account and PATCH /account response
|
|
108
|
+
type account_address = {
|
|
109
|
+
line1: String?, line2: String?, city: String?, state: String?,
|
|
110
|
+
postal_code: String?, country: String?
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
type account_notifications = {
|
|
114
|
+
after_flossing: bool, weekly_report: bool,
|
|
115
|
+
monthly_report: bool, payment_receipts: bool
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
type account = {
|
|
119
|
+
id: String,
|
|
120
|
+
name: String?,
|
|
121
|
+
email: String,
|
|
122
|
+
email_verified: bool,
|
|
123
|
+
two_factor_enabled: bool,
|
|
124
|
+
identity_verified: bool,
|
|
125
|
+
phone: String?,
|
|
126
|
+
organization: String?,
|
|
127
|
+
vat_id: String?,
|
|
128
|
+
country: String?,
|
|
129
|
+
address: account_address?,
|
|
130
|
+
notifications: account_notifications,
|
|
131
|
+
created_at: String?
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
# GET /organization
|
|
135
|
+
type org_credits = { prepaid: Integer, subscription: Integer, total: Integer }
|
|
136
|
+
|
|
137
|
+
type org_usage = {
|
|
138
|
+
current_period_start: String,
|
|
139
|
+
current_period_end: String,
|
|
140
|
+
current_period_total: Integer
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
type org_trial = { active: bool, started_at: String?, ends_at: String? }
|
|
144
|
+
|
|
145
|
+
type org_entitlements = {
|
|
146
|
+
webhooks: bool, instafloss: bool, typo_fixer: bool, exclusions: bool,
|
|
147
|
+
update_tags: bool, sso: bool, autofloss: bool, decay_basic: bool,
|
|
148
|
+
decay_custom: bool
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
type organization = {
|
|
152
|
+
name: String?,
|
|
153
|
+
email: String?,
|
|
154
|
+
plan: String,
|
|
155
|
+
plan_id: String?,
|
|
156
|
+
credits: org_credits,
|
|
157
|
+
usage: org_usage,
|
|
158
|
+
trial: org_trial,
|
|
159
|
+
created_at: String?,
|
|
160
|
+
status: String,
|
|
161
|
+
entitlements: org_entitlements
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
# Connection settings.checks — the 12 floss check gates.
|
|
165
|
+
type connection_checks = {
|
|
166
|
+
disposable: bool, nonexistent: bool, deactivated: bool, inbox_full: bool,
|
|
167
|
+
bounced: bool, banned_words: bool, role_based: bool, complainers: bool,
|
|
168
|
+
spam: bool, failed_exchange: bool, unverified: bool, accept_all: bool
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
# aggressiveness: normal|aggressive|custom
|
|
172
|
+
# action: unsubscribe|delete|update_tags|update_custom_fields|do_nothing|nil
|
|
173
|
+
type connection_settings = {
|
|
174
|
+
aggressiveness: String,
|
|
175
|
+
manual_mode: bool,
|
|
176
|
+
autofloss: bool,
|
|
177
|
+
decay_protection: bool,
|
|
178
|
+
instafloss: bool,
|
|
179
|
+
action: String?,
|
|
180
|
+
checks: connection_checks,
|
|
181
|
+
blacklist_count: Integer,
|
|
182
|
+
whitelist_count: Integer
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
# An active ESP connection (create/get/update/sync responses and
|
|
186
|
+
# GET /integrations/{type} connections[]).
|
|
187
|
+
type connection = {
|
|
188
|
+
id: String,
|
|
189
|
+
name: String,
|
|
190
|
+
status: String,
|
|
191
|
+
created_at: String?,
|
|
192
|
+
last_synced_at: String?,
|
|
193
|
+
settings: connection_settings
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
type disconnected_connection = {
|
|
197
|
+
id: String,
|
|
198
|
+
name: String,
|
|
199
|
+
status: String,
|
|
200
|
+
created_at: String?,
|
|
201
|
+
disconnected_at: String?
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
# Items of GET /integrations data[].
|
|
205
|
+
type integration = {
|
|
206
|
+
type: String,
|
|
207
|
+
connected: bool,
|
|
208
|
+
connection_count: Integer,
|
|
209
|
+
primary: { id: String, name: String }?,
|
|
210
|
+
disconnected_count: Integer
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
# GET /integrations
|
|
214
|
+
type integrations_list = { data: Array[integration], pagination: pagination }
|
|
215
|
+
|
|
216
|
+
# GET /integrations/{type}
|
|
217
|
+
type integration_detail = {
|
|
218
|
+
type: String,
|
|
219
|
+
connected: bool,
|
|
220
|
+
connection_count: Integer,
|
|
221
|
+
connections: Array[connection],
|
|
222
|
+
disconnected_connections: Array[disconnected_connection]
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
# DELETE /integrations/{type}/connections/{id}
|
|
226
|
+
type disconnect_result = {
|
|
227
|
+
id: String, type: String, status: String, disconnected_at: String?
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
# POST /integrations/{type}/connections/{id}/test
|
|
231
|
+
type credential_test_result = {
|
|
232
|
+
id: String, type: String, credential_valid: bool,
|
|
233
|
+
tested_at: String, reason: String?
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
# Keyword rule (GET list items and POST response data[]).
|
|
237
|
+
# match: exact|contains
|
|
238
|
+
type keyword_applies_to = { localpart: bool, domain: bool, email: bool }
|
|
239
|
+
|
|
240
|
+
type keyword_rule = {
|
|
241
|
+
id: String,
|
|
242
|
+
keyword: String,
|
|
243
|
+
match: String,
|
|
244
|
+
applies_to: keyword_applies_to
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
# GET .../keywords/{list}
|
|
248
|
+
type keyword_rules_list = { data: Array[keyword_rule], pagination: pagination }
|
|
249
|
+
|
|
250
|
+
# POST .../keywords/{list}
|
|
251
|
+
type keyword_rules_created = { data: Array[keyword_rule] }
|
|
252
|
+
|
|
253
|
+
# DELETE .../keywords/{list}/{ruleId}
|
|
254
|
+
type keyword_rule_deleted = { deleted: bool, id: String }
|
|
255
|
+
|
|
256
|
+
# Input shape for keyword rule creation.
|
|
257
|
+
type keyword_rule_input = {
|
|
258
|
+
keyword: String,
|
|
259
|
+
match: String,
|
|
260
|
+
applies_to: Hash[Symbol, bool]
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
# POST /erasures
|
|
264
|
+
type erasure_result = { success: bool? }
|
|
265
|
+
end
|
|
266
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: mailfloss
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Mailfloss
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2026-07-22 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description: Verify email addresses, run batch verifications, manage ESP integrations
|
|
14
|
+
and keyword rules, and read usage reports via the mailfloss REST API. Zero runtime
|
|
15
|
+
dependencies (stdlib Net::HTTP).
|
|
16
|
+
email:
|
|
17
|
+
- support@mailfloss.com
|
|
18
|
+
executables: []
|
|
19
|
+
extensions: []
|
|
20
|
+
extra_rdoc_files: []
|
|
21
|
+
files:
|
|
22
|
+
- CHANGELOG.md
|
|
23
|
+
- LICENSE
|
|
24
|
+
- README.md
|
|
25
|
+
- lib/mailfloss.rb
|
|
26
|
+
- lib/mailfloss/client.rb
|
|
27
|
+
- lib/mailfloss/errors.rb
|
|
28
|
+
- lib/mailfloss/resources.rb
|
|
29
|
+
- lib/mailfloss/transport.rb
|
|
30
|
+
- lib/mailfloss/version.rb
|
|
31
|
+
- sig/mailfloss.rbs
|
|
32
|
+
- sig/resources.rbs
|
|
33
|
+
- sig/types.rbs
|
|
34
|
+
homepage: https://developers.mailfloss.com
|
|
35
|
+
licenses:
|
|
36
|
+
- MIT
|
|
37
|
+
metadata:
|
|
38
|
+
homepage_uri: https://developers.mailfloss.com
|
|
39
|
+
source_code_uri: https://github.com/mailfloss/mailfloss-ruby
|
|
40
|
+
changelog_uri: https://github.com/mailfloss/mailfloss-ruby/blob/main/CHANGELOG.md
|
|
41
|
+
bug_tracker_uri: https://github.com/mailfloss/mailfloss-ruby/issues
|
|
42
|
+
documentation_uri: https://developers.mailfloss.com
|
|
43
|
+
post_install_message:
|
|
44
|
+
rdoc_options: []
|
|
45
|
+
require_paths:
|
|
46
|
+
- lib
|
|
47
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
48
|
+
requirements:
|
|
49
|
+
- - ">="
|
|
50
|
+
- !ruby/object:Gem::Version
|
|
51
|
+
version: '2.6'
|
|
52
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
|
+
requirements:
|
|
54
|
+
- - ">="
|
|
55
|
+
- !ruby/object:Gem::Version
|
|
56
|
+
version: '0'
|
|
57
|
+
requirements: []
|
|
58
|
+
rubygems_version: 3.0.3.1
|
|
59
|
+
signing_key:
|
|
60
|
+
specification_version: 4
|
|
61
|
+
summary: Official Ruby SDK for the mailfloss email verification API
|
|
62
|
+
test_files: []
|