lumail 0.1.1 → 0.1.2
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.
- package/README.md +5 -1
- package/dist/cli.js +1 -5
- package/dist/index.cjs +1 -5
- package/dist/index.js +1 -5
- package/dist/types.d.ts +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -150,9 +150,13 @@ await lumail.emails.send({
|
|
|
150
150
|
});
|
|
151
151
|
|
|
152
152
|
// Verify an email address
|
|
153
|
-
const
|
|
153
|
+
const result = await lumail.emails.verify({
|
|
154
154
|
email: "check@example.com",
|
|
155
155
|
});
|
|
156
|
+
|
|
157
|
+
if (!result.success) {
|
|
158
|
+
console.log(result.code, result.error, result.suggestion);
|
|
159
|
+
}
|
|
156
160
|
```
|
|
157
161
|
|
|
158
162
|
### Tags
|
package/dist/cli.js
CHANGED
|
@@ -2321,11 +2321,7 @@ class LumailClient {
|
|
|
2321
2321
|
signal
|
|
2322
2322
|
});
|
|
2323
2323
|
if (response.ok) {
|
|
2324
|
-
|
|
2325
|
-
if (data.success === false) {
|
|
2326
|
-
throw new LumailError(data.message ?? "Request failed", response.status, data.code);
|
|
2327
|
-
}
|
|
2328
|
-
return data;
|
|
2324
|
+
return await response.json();
|
|
2329
2325
|
}
|
|
2330
2326
|
if (response.status === 429 && isIdempotent && attempt < maxRetries) {
|
|
2331
2327
|
await sleep(parseRetryAfter(response, RETRY_DELAYS[attempt]));
|
package/dist/index.cjs
CHANGED
|
@@ -147,11 +147,7 @@ class LumailClient {
|
|
|
147
147
|
signal
|
|
148
148
|
});
|
|
149
149
|
if (response.ok) {
|
|
150
|
-
|
|
151
|
-
if (data.success === false) {
|
|
152
|
-
throw new LumailError(data.message ?? "Request failed", response.status, data.code);
|
|
153
|
-
}
|
|
154
|
-
return data;
|
|
150
|
+
return await response.json();
|
|
155
151
|
}
|
|
156
152
|
if (response.status === 429 && isIdempotent && attempt < maxRetries) {
|
|
157
153
|
await sleep(parseRetryAfter(response, RETRY_DELAYS[attempt]));
|
package/dist/index.js
CHANGED
|
@@ -95,11 +95,7 @@ class LumailClient {
|
|
|
95
95
|
signal
|
|
96
96
|
});
|
|
97
97
|
if (response.ok) {
|
|
98
|
-
|
|
99
|
-
if (data.success === false) {
|
|
100
|
-
throw new LumailError(data.message ?? "Request failed", response.status, data.code);
|
|
101
|
-
}
|
|
102
|
-
return data;
|
|
98
|
+
return await response.json();
|
|
103
99
|
}
|
|
104
100
|
if (response.status === 429 && isIdempotent && attempt < maxRetries) {
|
|
105
101
|
await sleep(parseRetryAfter(response, RETRY_DELAYS[attempt]));
|
package/dist/types.d.ts
CHANGED
|
@@ -245,7 +245,11 @@ export type VerifyEmailParams = {
|
|
|
245
245
|
email: string;
|
|
246
246
|
};
|
|
247
247
|
export type VerifyEmailResponse = {
|
|
248
|
-
|
|
248
|
+
success: boolean;
|
|
249
|
+
error?: string;
|
|
250
|
+
code?: string;
|
|
251
|
+
suggestion?: string;
|
|
252
|
+
warnings?: string[];
|
|
249
253
|
};
|
|
250
254
|
export type Tag = {
|
|
251
255
|
id: string;
|