@marlinjai/mail-sdk 0.14.0 → 0.15.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.mts CHANGED
@@ -382,7 +382,7 @@ declare function createNamespaces(config: CoreConfig): {
382
382
  id: string;
383
383
  details: Record<string, unknown>;
384
384
  created_at: string;
385
- action: "workspace.created" | "workspace.updated" | "workspace.company_changed" | "member.added" | "member.role_changed" | "member.removed" | "member.invited" | "invite.revoked" | "api_key.created" | "api_key.revoked" | "provider.created" | "provider.updated" | "provider.deleted" | "provider.events_registered" | "provider.events_secret_set" | "provider.bounces_halted" | "provider.anomaly_cleared" | "topic.created" | "topic.updated" | "topic.deleted" | "template.created" | "template.updated" | "template.deleted" | "template.inputs_declared" | "saved_section.created" | "saved_section.updated" | "saved_section.deleted" | "asset.uploaded" | "asset.imported" | "contact.erased" | "suppression.created" | "suppression.deleted" | "mailing.created" | "mailing.sent" | "mailing.paused" | "mailing.resumed" | "mailing.cancelled" | "mailing.retried" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.secret_rotated" | "webhook.redelivered" | "contact.unsubscribed" | "tag.created" | "tag.deleted" | "tag.assigned" | "tag.unassigned" | "contact_property.created" | "contact_property.deleted" | "segment.created" | "segment.updated" | "segment.deleted" | "signup_form.created" | "signup_form.updated" | "signup_form.deleted" | "contact.subscribed" | "import.created" | "import.mapped" | "import.committed" | "import.cancelled" | "import.finished" | "mailing.scheduled" | "mailing.unscheduled" | "mailing.schedule_failed" | "mailing.ab_test_updated" | "mailing.ab_winner_selected" | "tracking.updated" | "billing.checkout_started" | "billing.subscription_changed" | "billing.exemption_changed" | "automation.created" | "automation.updated" | "automation.published" | "automation.paused" | "automation.resumed" | "automation.archived" | "automation.deleted" | "automation.duplicated" | "automation.enrolled" | "automation.run_ended" | "event.recorded";
385
+ action: "workspace.created" | "workspace.updated" | "workspace.company_changed" | "member.added" | "member.role_changed" | "member.removed" | "member.invited" | "invite.revoked" | "api_key.created" | "api_key.revoked" | "provider.created" | "provider.updated" | "provider.deleted" | "provider.events_registered" | "provider.events_secret_set" | "provider.bounces_halted" | "provider.anomaly_cleared" | "topic.created" | "topic.updated" | "topic.deleted" | "template.created" | "template.updated" | "template.deleted" | "template.inputs_declared" | "saved_section.created" | "saved_section.updated" | "saved_section.deleted" | "asset.uploaded" | "asset.imported" | "contact.erased" | "suppression.created" | "suppression.deleted" | "mailing.created" | "mailing.sent" | "mailing.paused" | "mailing.resumed" | "mailing.cancelled" | "mailing.deleted" | "mailing.retried" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.secret_rotated" | "webhook.redelivered" | "contact.unsubscribed" | "tag.created" | "tag.deleted" | "tag.assigned" | "tag.unassigned" | "contact_property.created" | "contact_property.deleted" | "segment.created" | "segment.updated" | "segment.deleted" | "signup_form.created" | "signup_form.updated" | "signup_form.deleted" | "contact.subscribed" | "import.created" | "import.mapped" | "import.committed" | "import.cancelled" | "import.finished" | "mailing.scheduled" | "mailing.unscheduled" | "mailing.schedule_failed" | "mailing.ab_test_updated" | "mailing.ab_winner_selected" | "tracking.updated" | "billing.checkout_started" | "billing.subscription_changed" | "billing.exemption_changed" | "automation.created" | "automation.updated" | "automation.published" | "automation.paused" | "automation.resumed" | "automation.archived" | "automation.deleted" | "automation.duplicated" | "automation.enrolled" | "automation.run_ended" | "event.recorded";
386
386
  actor: {
387
387
  type: "member";
388
388
  subject: string;
@@ -2371,6 +2371,16 @@ declare function createNamespaces(config: CoreConfig): {
2371
2371
  finished_at: string | null;
2372
2372
  pause_reason: string | null;
2373
2373
  }>;
2374
+ /**
2375
+ * Deletes a mailing that never started: a draft, or one cancelled before
2376
+ * any send began (`canDeleteMailing` answers for a mailing in hand).
2377
+ * Anything else is `mailing_invalid_state` (409) and nothing is deleted:
2378
+ * unschedule a scheduled mailing first; a mailing that started stays.
2379
+ * Test sends made from it stay in the archive, with `mailing_id` null.
2380
+ */
2381
+ delete: (id: string, opts?: RequestOpts) => Promise<{
2382
+ ok: true;
2383
+ }>;
2374
2384
  retryFailed: (id: string, body?: RouteBody<"mailings.retryFailed">, opts?: RequestOpts) => Promise<{
2375
2385
  status: "draft" | "scheduled" | "sending" | "paused" | "sent" | "partially_failed" | "cancelled";
2376
2386
  id: string;
package/dist/index.d.ts CHANGED
@@ -382,7 +382,7 @@ declare function createNamespaces(config: CoreConfig): {
382
382
  id: string;
383
383
  details: Record<string, unknown>;
384
384
  created_at: string;
385
- action: "workspace.created" | "workspace.updated" | "workspace.company_changed" | "member.added" | "member.role_changed" | "member.removed" | "member.invited" | "invite.revoked" | "api_key.created" | "api_key.revoked" | "provider.created" | "provider.updated" | "provider.deleted" | "provider.events_registered" | "provider.events_secret_set" | "provider.bounces_halted" | "provider.anomaly_cleared" | "topic.created" | "topic.updated" | "topic.deleted" | "template.created" | "template.updated" | "template.deleted" | "template.inputs_declared" | "saved_section.created" | "saved_section.updated" | "saved_section.deleted" | "asset.uploaded" | "asset.imported" | "contact.erased" | "suppression.created" | "suppression.deleted" | "mailing.created" | "mailing.sent" | "mailing.paused" | "mailing.resumed" | "mailing.cancelled" | "mailing.retried" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.secret_rotated" | "webhook.redelivered" | "contact.unsubscribed" | "tag.created" | "tag.deleted" | "tag.assigned" | "tag.unassigned" | "contact_property.created" | "contact_property.deleted" | "segment.created" | "segment.updated" | "segment.deleted" | "signup_form.created" | "signup_form.updated" | "signup_form.deleted" | "contact.subscribed" | "import.created" | "import.mapped" | "import.committed" | "import.cancelled" | "import.finished" | "mailing.scheduled" | "mailing.unscheduled" | "mailing.schedule_failed" | "mailing.ab_test_updated" | "mailing.ab_winner_selected" | "tracking.updated" | "billing.checkout_started" | "billing.subscription_changed" | "billing.exemption_changed" | "automation.created" | "automation.updated" | "automation.published" | "automation.paused" | "automation.resumed" | "automation.archived" | "automation.deleted" | "automation.duplicated" | "automation.enrolled" | "automation.run_ended" | "event.recorded";
385
+ action: "workspace.created" | "workspace.updated" | "workspace.company_changed" | "member.added" | "member.role_changed" | "member.removed" | "member.invited" | "invite.revoked" | "api_key.created" | "api_key.revoked" | "provider.created" | "provider.updated" | "provider.deleted" | "provider.events_registered" | "provider.events_secret_set" | "provider.bounces_halted" | "provider.anomaly_cleared" | "topic.created" | "topic.updated" | "topic.deleted" | "template.created" | "template.updated" | "template.deleted" | "template.inputs_declared" | "saved_section.created" | "saved_section.updated" | "saved_section.deleted" | "asset.uploaded" | "asset.imported" | "contact.erased" | "suppression.created" | "suppression.deleted" | "mailing.created" | "mailing.sent" | "mailing.paused" | "mailing.resumed" | "mailing.cancelled" | "mailing.deleted" | "mailing.retried" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.secret_rotated" | "webhook.redelivered" | "contact.unsubscribed" | "tag.created" | "tag.deleted" | "tag.assigned" | "tag.unassigned" | "contact_property.created" | "contact_property.deleted" | "segment.created" | "segment.updated" | "segment.deleted" | "signup_form.created" | "signup_form.updated" | "signup_form.deleted" | "contact.subscribed" | "import.created" | "import.mapped" | "import.committed" | "import.cancelled" | "import.finished" | "mailing.scheduled" | "mailing.unscheduled" | "mailing.schedule_failed" | "mailing.ab_test_updated" | "mailing.ab_winner_selected" | "tracking.updated" | "billing.checkout_started" | "billing.subscription_changed" | "billing.exemption_changed" | "automation.created" | "automation.updated" | "automation.published" | "automation.paused" | "automation.resumed" | "automation.archived" | "automation.deleted" | "automation.duplicated" | "automation.enrolled" | "automation.run_ended" | "event.recorded";
386
386
  actor: {
387
387
  type: "member";
388
388
  subject: string;
@@ -2371,6 +2371,16 @@ declare function createNamespaces(config: CoreConfig): {
2371
2371
  finished_at: string | null;
2372
2372
  pause_reason: string | null;
2373
2373
  }>;
2374
+ /**
2375
+ * Deletes a mailing that never started: a draft, or one cancelled before
2376
+ * any send began (`canDeleteMailing` answers for a mailing in hand).
2377
+ * Anything else is `mailing_invalid_state` (409) and nothing is deleted:
2378
+ * unschedule a scheduled mailing first; a mailing that started stays.
2379
+ * Test sends made from it stay in the archive, with `mailing_id` null.
2380
+ */
2381
+ delete: (id: string, opts?: RequestOpts) => Promise<{
2382
+ ok: true;
2383
+ }>;
2374
2384
  retryFailed: (id: string, body?: RouteBody<"mailings.retryFailed">, opts?: RequestOpts) => Promise<{
2375
2385
  status: "draft" | "scheduled" | "sending" | "paused" | "sent" | "partially_failed" | "cancelled";
2376
2386
  id: string;
package/dist/index.js CHANGED
@@ -579,6 +579,14 @@ function createNamespaces(config) {
579
579
  pause: (id, opts) => execute(config, "mailings.pause", { params: { id }, body: {} }, opts),
580
580
  resume: (id, opts) => execute(config, "mailings.resume", { params: { id }, body: {} }, opts),
581
581
  cancel: (id, opts) => execute(config, "mailings.cancel", { params: { id }, body: {} }, opts),
582
+ /**
583
+ * Deletes a mailing that never started: a draft, or one cancelled before
584
+ * any send began (`canDeleteMailing` answers for a mailing in hand).
585
+ * Anything else is `mailing_invalid_state` (409) and nothing is deleted:
586
+ * unschedule a scheduled mailing first; a mailing that started stays.
587
+ * Test sends made from it stay in the archive, with `mailing_id` null.
588
+ */
589
+ delete: (id, opts) => execute(config, "mailings.delete", { params: { id } }, opts),
582
590
  retryFailed: (id, body = {}, opts) => execute(config, "mailings.retryFailed", { params: { id }, body }, opts),
583
591
  duplicate: (id, opts) => execute(config, "mailings.duplicate", { params: { id }, body: {} }, opts),
584
592
  // S4: scheduling, segments and A/B testing
package/dist/index.mjs CHANGED
@@ -563,6 +563,14 @@ function createNamespaces(config) {
563
563
  pause: (id, opts) => execute(config, "mailings.pause", { params: { id }, body: {} }, opts),
564
564
  resume: (id, opts) => execute(config, "mailings.resume", { params: { id }, body: {} }, opts),
565
565
  cancel: (id, opts) => execute(config, "mailings.cancel", { params: { id }, body: {} }, opts),
566
+ /**
567
+ * Deletes a mailing that never started: a draft, or one cancelled before
568
+ * any send began (`canDeleteMailing` answers for a mailing in hand).
569
+ * Anything else is `mailing_invalid_state` (409) and nothing is deleted:
570
+ * unschedule a scheduled mailing first; a mailing that started stays.
571
+ * Test sends made from it stay in the archive, with `mailing_id` null.
572
+ */
573
+ delete: (id, opts) => execute(config, "mailings.delete", { params: { id } }, opts),
566
574
  retryFailed: (id, body = {}, opts) => execute(config, "mailings.retryFailed", { params: { id }, body }, opts),
567
575
  duplicate: (id, opts) => execute(config, "mailings.duplicate", { params: { id }, body: {} }, opts),
568
576
  // S4: scheduling, segments and A/B testing
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.14.0",
6
+ "version": "0.15.1",
7
7
  "description": "Typed client for the Lumitra Mail v1 API: Node and edge runtimes, retries with idempotency, cursor pagination, webhook verification",
8
8
  "license": "MIT",
9
9
  "repository": {
@@ -32,7 +32,7 @@
32
32
  "LICENSE"
33
33
  ],
34
34
  "dependencies": {
35
- "@marlinjai/mail-contract": "^0.14.0"
35
+ "@marlinjai/mail-contract": "^0.15.1"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "zod": "^3.25.0"