@bernierllc/nevarmail 0.12.0 → 0.13.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/index.d.ts +20 -4
- package/dist/index.js +14 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -210,7 +210,12 @@ export interface CreateListInput {
|
|
|
210
210
|
* ignores it: a list opt-out always applies to that list.
|
|
211
211
|
*/
|
|
212
212
|
unsubScope?: "list" | "global";
|
|
213
|
-
|
|
213
|
+
/**
|
|
214
|
+
* Which page the list's unsubscribe link opens. Default `"hosted"`: the
|
|
215
|
+
* project's branded preferences page. `"provider"` is gone:
|
|
216
|
+
* every link already went to the hosted page, so it was a second name for it.
|
|
217
|
+
*/
|
|
218
|
+
unsubHandler?: "hosted" | "custom_html";
|
|
214
219
|
storageTier?: "provider" | "byo_database" | "local";
|
|
215
220
|
}
|
|
216
221
|
export interface NewContact {
|
|
@@ -474,11 +479,22 @@ export declare class NevarMail {
|
|
|
474
479
|
* routes, where dropping it would make `total` unknowable to the caller.
|
|
475
480
|
*/
|
|
476
481
|
requestPaginated<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", path: string, options?: RequestOptions): Promise<Paginated<T>>;
|
|
477
|
-
/**
|
|
482
|
+
/**
|
|
483
|
+
* POST /api/v1/email/send — one transactional message. A marketing send
|
|
484
|
+
* whose use case's list has a Custom HTML unsubscribe page and none saved is
|
|
485
|
+
* a 409 LIST_UNSUB_PAGE_MISSING; the message names where to save one.
|
|
486
|
+
*/
|
|
478
487
|
sendEmail(input: SendEmailInput): Promise<EmailResult>;
|
|
479
|
-
/**
|
|
488
|
+
/**
|
|
489
|
+
* POST /api/v1/email/send-to-list — one message to every contact on a list.
|
|
490
|
+
* 409 LIST_UNSUB_PAGE_MISSING while the list's Custom HTML unsubscribe page
|
|
491
|
+
* is unsaved; nobody is mailed.
|
|
492
|
+
*/
|
|
480
493
|
sendEmailToList(input: SendToListInput): Promise<SendToListResult>;
|
|
481
|
-
/**
|
|
494
|
+
/**
|
|
495
|
+
* POST /api/v1/email/schedule — queue a send for a future instant. Same
|
|
496
|
+
* guards as sendEmail at schedule time, including 409 LIST_UNSUB_PAGE_MISSING.
|
|
497
|
+
*/
|
|
482
498
|
scheduleEmail(input: ScheduleEmailInput): Promise<ScheduledEmail>;
|
|
483
499
|
/** GET /api/v1/email/schedule — the org's scheduled sends, newest first. */
|
|
484
500
|
listScheduledEmails(): Promise<ScheduledEmail[]>;
|
package/dist/index.js
CHANGED
|
@@ -197,15 +197,26 @@ export class NevarMail {
|
|
|
197
197
|
return true;
|
|
198
198
|
return options.signal !== undefined && cause?.name === "AbortError";
|
|
199
199
|
}
|
|
200
|
-
/**
|
|
200
|
+
/**
|
|
201
|
+
* POST /api/v1/email/send — one transactional message. A marketing send
|
|
202
|
+
* whose use case's list has a Custom HTML unsubscribe page and none saved is
|
|
203
|
+
* a 409 LIST_UNSUB_PAGE_MISSING; the message names where to save one.
|
|
204
|
+
*/
|
|
201
205
|
sendEmail(input) {
|
|
202
206
|
return this.request("POST", "/api/v1/email/send", { body: input });
|
|
203
207
|
}
|
|
204
|
-
/**
|
|
208
|
+
/**
|
|
209
|
+
* POST /api/v1/email/send-to-list — one message to every contact on a list.
|
|
210
|
+
* 409 LIST_UNSUB_PAGE_MISSING while the list's Custom HTML unsubscribe page
|
|
211
|
+
* is unsaved; nobody is mailed.
|
|
212
|
+
*/
|
|
205
213
|
sendEmailToList(input) {
|
|
206
214
|
return this.request("POST", "/api/v1/email/send-to-list", { body: input });
|
|
207
215
|
}
|
|
208
|
-
/**
|
|
216
|
+
/**
|
|
217
|
+
* POST /api/v1/email/schedule — queue a send for a future instant. Same
|
|
218
|
+
* guards as sendEmail at schedule time, including 409 LIST_UNSUB_PAGE_MISSING.
|
|
219
|
+
*/
|
|
209
220
|
scheduleEmail(input) {
|
|
210
221
|
return this.request("POST", "/api/v1/email/schedule", { body: input });
|
|
211
222
|
}
|
package/package.json
CHANGED