mailumi 1.2.0 → 1.2.1
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/dist/cjs/index.d.ts +5 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cli.js +2 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/cjs/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* The official Mailumi SDK. Works anywhere `fetch` exists: Node.js 18+, Bun, Deno and Cloudflare Workers.
|
|
3
3
|
* Every method resolves to `{ data, error }` and never throws for API errors.
|
|
4
4
|
*/
|
|
5
|
-
export declare const VERSION = "1.2.
|
|
5
|
+
export declare const VERSION = "1.2.1";
|
|
6
6
|
export type ErrorCode = 'invalid_request' | 'unauthorized' | 'plan_limit_reached' | 'forbidden' | 'not_found' | 'method_not_allowed' | 'conflict' | 'payload_too_large' | 'rate_limited' | 'internal_error' | 'service_unavailable' | 'network_error' | 'missing_api_key' | 'invalid_signature' | 'missing_webhook_secret';
|
|
7
7
|
export interface MailumiError {
|
|
8
8
|
name: 'MailumiError';
|
|
@@ -118,6 +118,8 @@ export interface DnsRecord {
|
|
|
118
118
|
verified: boolean;
|
|
119
119
|
/** What DNS returned at this name when it does not match `value`. Only on records that are not verified. */
|
|
120
120
|
found?: string[];
|
|
121
|
+
/** Where a missing record was found instead: its name with the domain added twice, because the DNS provider adds the domain itself. Enter only the part before the domain. */
|
|
122
|
+
foundAt?: string;
|
|
121
123
|
}
|
|
122
124
|
export interface Domain {
|
|
123
125
|
id: string;
|
|
@@ -142,6 +144,8 @@ export interface DomainVerification {
|
|
|
142
144
|
message: string;
|
|
143
145
|
/** How many required records have a different value at the DNS provider. */
|
|
144
146
|
wrong?: number;
|
|
147
|
+
/** How many records were found at a doubled name; see `foundAt` on each record. */
|
|
148
|
+
misplaced?: number;
|
|
145
149
|
}
|
|
146
150
|
export interface DomainSettings {
|
|
147
151
|
id: string;
|
package/dist/cjs/index.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.toApiEmail = toApiEmail;
|
|
|
7
7
|
* The official Mailumi SDK. Works anywhere `fetch` exists: Node.js 18+, Bun, Deno and Cloudflare Workers.
|
|
8
8
|
* Every method resolves to `{ data, error }` and never throws for API errors.
|
|
9
9
|
*/
|
|
10
|
-
exports.VERSION = '1.2.
|
|
10
|
+
exports.VERSION = '1.2.1';
|
|
11
11
|
const DEFAULT_BASE_URL = 'https://mailumi.com/api/v1';
|
|
12
12
|
function header(h, name, short) {
|
|
13
13
|
if (typeof h.get === 'function')
|
package/dist/cli.js
CHANGED
|
@@ -129,7 +129,8 @@ function templateOptions(f) {
|
|
|
129
129
|
}
|
|
130
130
|
const campaignOptions = (f) => ({ name: one(f, 'name'), subject: one(f, 'subject'), text: fileOr(f, 'text'), from: one(f, 'from'), audienceId: one(f, 'audience') });
|
|
131
131
|
const recordList = (d) => d.records.map(r => {
|
|
132
|
-
const
|
|
132
|
+
const zone = r.foundAt?.slice(r.name.length + 1);
|
|
133
|
+
const state = r.verified ? 'found' : zone ? `wrong name, found at ${r.foundAt}: enter only ${r.name === zone ? '@' : r.name.slice(0, -zone.length - 1)}` : r.found?.length ? `wrong value, found ${r.found.join(', ')}` : 'missing';
|
|
133
134
|
return `[${state}] ${r.type} ${r.name}${r.required ? '' : ' (recommended)'}\n ${r.priority !== undefined ? `${r.priority} ` : ''}${r.value}`;
|
|
134
135
|
}).join('\n');
|
|
135
136
|
const domainView = (d) => `${d.name} (${d.id}): ${d.sendingStatus === 'verified' ? 'verified, ready to send' : d.sendingStatus}\n\n${recordList(d)}`;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* The official Mailumi SDK. Works anywhere `fetch` exists: Node.js 18+, Bun, Deno and Cloudflare Workers.
|
|
3
3
|
* Every method resolves to `{ data, error }` and never throws for API errors.
|
|
4
4
|
*/
|
|
5
|
-
export declare const VERSION = "1.2.
|
|
5
|
+
export declare const VERSION = "1.2.1";
|
|
6
6
|
export type ErrorCode = 'invalid_request' | 'unauthorized' | 'plan_limit_reached' | 'forbidden' | 'not_found' | 'method_not_allowed' | 'conflict' | 'payload_too_large' | 'rate_limited' | 'internal_error' | 'service_unavailable' | 'network_error' | 'missing_api_key' | 'invalid_signature' | 'missing_webhook_secret';
|
|
7
7
|
export interface MailumiError {
|
|
8
8
|
name: 'MailumiError';
|
|
@@ -118,6 +118,8 @@ export interface DnsRecord {
|
|
|
118
118
|
verified: boolean;
|
|
119
119
|
/** What DNS returned at this name when it does not match `value`. Only on records that are not verified. */
|
|
120
120
|
found?: string[];
|
|
121
|
+
/** Where a missing record was found instead: its name with the domain added twice, because the DNS provider adds the domain itself. Enter only the part before the domain. */
|
|
122
|
+
foundAt?: string;
|
|
121
123
|
}
|
|
122
124
|
export interface Domain {
|
|
123
125
|
id: string;
|
|
@@ -142,6 +144,8 @@ export interface DomainVerification {
|
|
|
142
144
|
message: string;
|
|
143
145
|
/** How many required records have a different value at the DNS provider. */
|
|
144
146
|
wrong?: number;
|
|
147
|
+
/** How many records were found at a doubled name; see `foundAt` on each record. */
|
|
148
|
+
misplaced?: number;
|
|
145
149
|
}
|
|
146
150
|
export interface DomainSettings {
|
|
147
151
|
id: string;
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* The official Mailumi SDK. Works anywhere `fetch` exists: Node.js 18+, Bun, Deno and Cloudflare Workers.
|
|
3
3
|
* Every method resolves to `{ data, error }` and never throws for API errors.
|
|
4
4
|
*/
|
|
5
|
-
export const VERSION = '1.2.
|
|
5
|
+
export const VERSION = '1.2.1';
|
|
6
6
|
const DEFAULT_BASE_URL = 'https://mailumi.com/api/v1';
|
|
7
7
|
function header(h, name, short) {
|
|
8
8
|
if (typeof h.get === 'function')
|
package/package.json
CHANGED