@bernierllc/nevarmail 0.11.0 → 0.12.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 +28 -0
- package/dist/index.js +4 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -368,12 +368,40 @@ export interface Suppression {
|
|
|
368
368
|
email: string;
|
|
369
369
|
reason: SuppressionReason;
|
|
370
370
|
source: SuppressionSource;
|
|
371
|
+
/**
|
|
372
|
+
* @deprecated since 0.12.0; removed in 1.0.0; use sourceOrgProviderId.
|
|
373
|
+
* The API never sent it; the client now fills it from `sourceOrgProviderId`.
|
|
374
|
+
*/
|
|
371
375
|
providerId: string | null;
|
|
376
|
+
/** The provider connection that reported the row, when a provider did. */
|
|
377
|
+
sourceOrgProviderId?: string | null;
|
|
372
378
|
useCaseId: string | null;
|
|
379
|
+
/** The project the row belongs to; for a provider-account row, the project that reported it. */
|
|
380
|
+
projectId?: string;
|
|
381
|
+
/** Name of `projectId`'s project. */
|
|
382
|
+
projectName?: string | null;
|
|
383
|
+
/** The one list an opt-out blocks; null = the whole project. */
|
|
384
|
+
listId?: string | null;
|
|
385
|
+
/** Name of `listId`'s list. */
|
|
386
|
+
listName?: string | null;
|
|
387
|
+
/**
|
|
388
|
+
* Set on a provider-reported bounce or complaint: the row blocks every
|
|
389
|
+
* project sending through this provider account, not only `projectId`.
|
|
390
|
+
*/
|
|
391
|
+
scopeProviderAccountId?: string | null;
|
|
392
|
+
/** The account's connection name, else its provider type; null when it could not be read. */
|
|
393
|
+
scopeProviderAccountName?: string | null;
|
|
394
|
+
/** Enhanced status code of a hard bounce (e.g. "5.1.1"), when the provider reported one. */
|
|
395
|
+
bounceCode?: string | null;
|
|
396
|
+
/** When a bounce's strike expires (ISO 8601); null = permanent, or not a bounce. */
|
|
397
|
+
expiresAt?: string | null;
|
|
398
|
+
/** Which bounce strike this row is (1, 2, 3...); 1 for every other reason. */
|
|
399
|
+
strikeCount?: number;
|
|
373
400
|
providerSyncStatus: string | null;
|
|
374
401
|
isActive: boolean;
|
|
375
402
|
createdAt: string;
|
|
376
403
|
deactivatedAt: string | null;
|
|
404
|
+
/** Null while active, or when the recipient removed it themselves. */
|
|
377
405
|
deactivatedBy: string | null;
|
|
378
406
|
deactivatedByName: string | null;
|
|
379
407
|
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