@bernierllc/nevarmail 0.11.0 → 0.13.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.
- package/dist/index.d.ts +34 -1
- package/dist/index.js +4 -2
- 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 {
|
|
@@ -368,12 +373,40 @@ export interface Suppression {
|
|
|
368
373
|
email: string;
|
|
369
374
|
reason: SuppressionReason;
|
|
370
375
|
source: SuppressionSource;
|
|
376
|
+
/**
|
|
377
|
+
* @deprecated since 0.12.0; removed in 1.0.0; use sourceOrgProviderId.
|
|
378
|
+
* The API never sent it; the client now fills it from `sourceOrgProviderId`.
|
|
379
|
+
*/
|
|
371
380
|
providerId: string | null;
|
|
381
|
+
/** The provider connection that reported the row, when a provider did. */
|
|
382
|
+
sourceOrgProviderId?: string | null;
|
|
372
383
|
useCaseId: string | null;
|
|
384
|
+
/** The project the row belongs to; for a provider-account row, the project that reported it. */
|
|
385
|
+
projectId?: string;
|
|
386
|
+
/** Name of `projectId`'s project. */
|
|
387
|
+
projectName?: string | null;
|
|
388
|
+
/** The one list an opt-out blocks; null = the whole project. */
|
|
389
|
+
listId?: string | null;
|
|
390
|
+
/** Name of `listId`'s list. */
|
|
391
|
+
listName?: string | null;
|
|
392
|
+
/**
|
|
393
|
+
* Set on a provider-reported bounce or complaint: the row blocks every
|
|
394
|
+
* project sending through this provider account, not only `projectId`.
|
|
395
|
+
*/
|
|
396
|
+
scopeProviderAccountId?: string | null;
|
|
397
|
+
/** The account's connection name, else its provider type; null when it could not be read. */
|
|
398
|
+
scopeProviderAccountName?: string | null;
|
|
399
|
+
/** Enhanced status code of a hard bounce (e.g. "5.1.1"), when the provider reported one. */
|
|
400
|
+
bounceCode?: string | null;
|
|
401
|
+
/** When a bounce's strike expires (ISO 8601); null = permanent, or not a bounce. */
|
|
402
|
+
expiresAt?: string | null;
|
|
403
|
+
/** Which bounce strike this row is (1, 2, 3...); 1 for every other reason. */
|
|
404
|
+
strikeCount?: number;
|
|
373
405
|
providerSyncStatus: string | null;
|
|
374
406
|
isActive: boolean;
|
|
375
407
|
createdAt: string;
|
|
376
408
|
deactivatedAt: string | null;
|
|
409
|
+
/** Null while active, or when the recipient removed it themselves. */
|
|
377
410
|
deactivatedBy: string | null;
|
|
378
411
|
deactivatedByName: string | null;
|
|
379
412
|
deactivationReason: string | null;
|
package/dist/index.js
CHANGED
|
@@ -418,11 +418,13 @@ export class NevarMail {
|
|
|
418
418
|
}
|
|
419
419
|
// ── Suppressions ───────────────────────────────────────────────────────
|
|
420
420
|
/** GET /api/v1/suppressions — paged, newest first. */
|
|
421
|
-
listSuppressions(options = {}) {
|
|
421
|
+
async listSuppressions(options = {}) {
|
|
422
422
|
const { isActive, ...rest } = options;
|
|
423
|
-
|
|
423
|
+
const page = await this.requestPaginated("GET", "/api/v1/suppressions", {
|
|
424
424
|
query: { ...rest, is_active: isActive },
|
|
425
425
|
});
|
|
426
|
+
// Deprecated alias resolves until 1.0.0 (see Suppression.providerId).
|
|
427
|
+
return { ...page, data: page.data.map((s) => ({ ...s, providerId: s.sourceOrgProviderId ?? null })) };
|
|
426
428
|
}
|
|
427
429
|
/** POST /api/v1/suppressions — bulk add; see AddSuppressionsInput for the scope rules. */
|
|
428
430
|
addSuppressions(input) {
|
package/package.json
CHANGED