@marlinjai/mail-sdk 0.22.0 → 0.24.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.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" | "sending_domain.created" | "sending_domain.updated" | "sending_domain.checked" | "sending_domain.records_written" | "sending_domain.deleted" | "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" | "billing.extra_sending_domains_changed" | "billing.terms_accepted" | "domain_order.created" | "domain_order.paid" | "domain_order.registered" | "domain_order.ready" | "domain_order.needs_attention" | "domain_order.kind_changed" | "domain_order.refunded" | "domain_order.cancelled" | "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" | "sending_domain.created" | "sending_domain.updated" | "sending_domain.checked" | "sending_domain.records_written" | "sending_domain.deleted" | "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" | "billing.extra_sending_domains_changed" | "billing.terms_accepted" | "domain_order.created" | "domain_order.paid" | "domain_order.registered" | "domain_order.ready" | "domain_order.needs_attention" | "domain_order.kind_changed" | "domain_order.no_charge" | "domain_order.refunded" | "domain_order.cancelled" | "domain_record.created" | "domain_record.updated" | "domain_record.deleted" | "domain_leave.requested" | "domain_leave.done" | "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;
@@ -3718,6 +3718,107 @@ declare function createNamespaces(config: CoreConfig): {
3718
3718
  registered_at: string | null;
3719
3719
  }>;
3720
3720
  };
3721
+ boughtDomains: {
3722
+ list: (opts?: RequestOpts) => Promise<{
3723
+ data: {
3724
+ id: string;
3725
+ kind: "sending" | "domain_only";
3726
+ expires_at: string | null;
3727
+ currency: "EUR";
3728
+ domain: string;
3729
+ renewal_price_cents: number;
3730
+ registrant_name: string;
3731
+ registered_at: string;
3732
+ no_charge: boolean;
3733
+ next_charge_at: string | null;
3734
+ renewal: {
3735
+ state: "failed" | "paid" | "invoiced" | "stopped" | "lapsed";
3736
+ amount_cents: number;
3737
+ pay_url: string | null;
3738
+ } | null;
3739
+ move_account_from: string;
3740
+ transfer_from: string;
3741
+ leave: {
3742
+ id: string;
3743
+ state: "cancelled" | "requested" | "done";
3744
+ way: "cloudflare_account" | "transfer";
3745
+ target_account_id: string | null;
3746
+ auth_code: string | null;
3747
+ requested_at: string;
3748
+ done_at: string | null;
3749
+ } | null;
3750
+ left: boolean;
3751
+ }[];
3752
+ }>;
3753
+ records: (id: string, opts?: RequestOpts) => Promise<{
3754
+ data: {
3755
+ type: string;
3756
+ id: string;
3757
+ name: string;
3758
+ ttl: number;
3759
+ priority: number | null;
3760
+ content: string;
3761
+ proxied: boolean;
3762
+ locked: boolean;
3763
+ }[];
3764
+ }>;
3765
+ createRecord: (id: string, body: RouteBody<"boughtDomains.createRecord">, opts?: RequestOpts) => Promise<{
3766
+ type: string;
3767
+ id: string;
3768
+ name: string;
3769
+ ttl: number;
3770
+ priority: number | null;
3771
+ content: string;
3772
+ proxied: boolean;
3773
+ locked: boolean;
3774
+ }>;
3775
+ updateRecord: (id: string, recordId: string, body: RouteBody<"boughtDomains.updateRecord">, opts?: RequestOpts) => Promise<{
3776
+ type: string;
3777
+ id: string;
3778
+ name: string;
3779
+ ttl: number;
3780
+ priority: number | null;
3781
+ content: string;
3782
+ proxied: boolean;
3783
+ locked: boolean;
3784
+ }>;
3785
+ deleteRecord: (id: string, recordId: string, opts?: RequestOpts) => Promise<{
3786
+ ok: true;
3787
+ }>;
3788
+ zoneFile: (id: string, opts?: RequestOpts) => Promise<{
3789
+ domain: string;
3790
+ zone_file: string;
3791
+ }>;
3792
+ leave: (id: string, body: RouteBody<"boughtDomains.leave">, opts?: RequestOpts) => Promise<{
3793
+ id: string;
3794
+ kind: "sending" | "domain_only";
3795
+ expires_at: string | null;
3796
+ currency: "EUR";
3797
+ domain: string;
3798
+ renewal_price_cents: number;
3799
+ registrant_name: string;
3800
+ registered_at: string;
3801
+ no_charge: boolean;
3802
+ next_charge_at: string | null;
3803
+ renewal: {
3804
+ state: "failed" | "paid" | "invoiced" | "stopped" | "lapsed";
3805
+ amount_cents: number;
3806
+ pay_url: string | null;
3807
+ } | null;
3808
+ move_account_from: string;
3809
+ transfer_from: string;
3810
+ leave: {
3811
+ id: string;
3812
+ state: "cancelled" | "requested" | "done";
3813
+ way: "cloudflare_account" | "transfer";
3814
+ target_account_id: string | null;
3815
+ auth_code: string | null;
3816
+ requested_at: string;
3817
+ done_at: string | null;
3818
+ } | null;
3819
+ left: boolean;
3820
+ }>;
3821
+ };
3721
3822
  automations: {
3722
3823
  list: (query?: RouteQuery<"automations.list">, opts?: RequestOpts) => Promise<{
3723
3824
  data: {
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" | "sending_domain.created" | "sending_domain.updated" | "sending_domain.checked" | "sending_domain.records_written" | "sending_domain.deleted" | "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" | "billing.extra_sending_domains_changed" | "billing.terms_accepted" | "domain_order.created" | "domain_order.paid" | "domain_order.registered" | "domain_order.ready" | "domain_order.needs_attention" | "domain_order.kind_changed" | "domain_order.refunded" | "domain_order.cancelled" | "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" | "sending_domain.created" | "sending_domain.updated" | "sending_domain.checked" | "sending_domain.records_written" | "sending_domain.deleted" | "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" | "billing.extra_sending_domains_changed" | "billing.terms_accepted" | "domain_order.created" | "domain_order.paid" | "domain_order.registered" | "domain_order.ready" | "domain_order.needs_attention" | "domain_order.kind_changed" | "domain_order.no_charge" | "domain_order.refunded" | "domain_order.cancelled" | "domain_record.created" | "domain_record.updated" | "domain_record.deleted" | "domain_leave.requested" | "domain_leave.done" | "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;
@@ -3718,6 +3718,107 @@ declare function createNamespaces(config: CoreConfig): {
3718
3718
  registered_at: string | null;
3719
3719
  }>;
3720
3720
  };
3721
+ boughtDomains: {
3722
+ list: (opts?: RequestOpts) => Promise<{
3723
+ data: {
3724
+ id: string;
3725
+ kind: "sending" | "domain_only";
3726
+ expires_at: string | null;
3727
+ currency: "EUR";
3728
+ domain: string;
3729
+ renewal_price_cents: number;
3730
+ registrant_name: string;
3731
+ registered_at: string;
3732
+ no_charge: boolean;
3733
+ next_charge_at: string | null;
3734
+ renewal: {
3735
+ state: "failed" | "paid" | "invoiced" | "stopped" | "lapsed";
3736
+ amount_cents: number;
3737
+ pay_url: string | null;
3738
+ } | null;
3739
+ move_account_from: string;
3740
+ transfer_from: string;
3741
+ leave: {
3742
+ id: string;
3743
+ state: "cancelled" | "requested" | "done";
3744
+ way: "cloudflare_account" | "transfer";
3745
+ target_account_id: string | null;
3746
+ auth_code: string | null;
3747
+ requested_at: string;
3748
+ done_at: string | null;
3749
+ } | null;
3750
+ left: boolean;
3751
+ }[];
3752
+ }>;
3753
+ records: (id: string, opts?: RequestOpts) => Promise<{
3754
+ data: {
3755
+ type: string;
3756
+ id: string;
3757
+ name: string;
3758
+ ttl: number;
3759
+ priority: number | null;
3760
+ content: string;
3761
+ proxied: boolean;
3762
+ locked: boolean;
3763
+ }[];
3764
+ }>;
3765
+ createRecord: (id: string, body: RouteBody<"boughtDomains.createRecord">, opts?: RequestOpts) => Promise<{
3766
+ type: string;
3767
+ id: string;
3768
+ name: string;
3769
+ ttl: number;
3770
+ priority: number | null;
3771
+ content: string;
3772
+ proxied: boolean;
3773
+ locked: boolean;
3774
+ }>;
3775
+ updateRecord: (id: string, recordId: string, body: RouteBody<"boughtDomains.updateRecord">, opts?: RequestOpts) => Promise<{
3776
+ type: string;
3777
+ id: string;
3778
+ name: string;
3779
+ ttl: number;
3780
+ priority: number | null;
3781
+ content: string;
3782
+ proxied: boolean;
3783
+ locked: boolean;
3784
+ }>;
3785
+ deleteRecord: (id: string, recordId: string, opts?: RequestOpts) => Promise<{
3786
+ ok: true;
3787
+ }>;
3788
+ zoneFile: (id: string, opts?: RequestOpts) => Promise<{
3789
+ domain: string;
3790
+ zone_file: string;
3791
+ }>;
3792
+ leave: (id: string, body: RouteBody<"boughtDomains.leave">, opts?: RequestOpts) => Promise<{
3793
+ id: string;
3794
+ kind: "sending" | "domain_only";
3795
+ expires_at: string | null;
3796
+ currency: "EUR";
3797
+ domain: string;
3798
+ renewal_price_cents: number;
3799
+ registrant_name: string;
3800
+ registered_at: string;
3801
+ no_charge: boolean;
3802
+ next_charge_at: string | null;
3803
+ renewal: {
3804
+ state: "failed" | "paid" | "invoiced" | "stopped" | "lapsed";
3805
+ amount_cents: number;
3806
+ pay_url: string | null;
3807
+ } | null;
3808
+ move_account_from: string;
3809
+ transfer_from: string;
3810
+ leave: {
3811
+ id: string;
3812
+ state: "cancelled" | "requested" | "done";
3813
+ way: "cloudflare_account" | "transfer";
3814
+ target_account_id: string | null;
3815
+ auth_code: string | null;
3816
+ requested_at: string;
3817
+ done_at: string | null;
3818
+ } | null;
3819
+ left: boolean;
3820
+ }>;
3821
+ };
3721
3822
  automations: {
3722
3823
  list: (query?: RouteQuery<"automations.list">, opts?: RequestOpts) => Promise<{
3723
3824
  data: {
package/dist/index.js CHANGED
@@ -693,6 +693,16 @@ function createNamespaces(config) {
693
693
  list: (query, opts) => execute(config, "domainOrders.list", { query }, opts),
694
694
  get: (id, opts) => execute(config, "domainOrders.get", { params: { id } }, opts)
695
695
  },
696
+ // Bought domains, managed by their holder: dates, DNS records, the zone file, leaving.
697
+ boughtDomains: {
698
+ list: (opts) => execute(config, "boughtDomains.list", {}, opts),
699
+ records: (id, opts) => execute(config, "boughtDomains.records", { params: { id } }, opts),
700
+ createRecord: (id, body, opts) => execute(config, "boughtDomains.createRecord", { params: { id }, body }, opts),
701
+ updateRecord: (id, recordId, body, opts) => execute(config, "boughtDomains.updateRecord", { params: { id, record_id: recordId }, body }, opts),
702
+ deleteRecord: (id, recordId, opts) => execute(config, "boughtDomains.deleteRecord", { params: { id, record_id: recordId } }, opts),
703
+ zoneFile: (id, opts) => execute(config, "boughtDomains.zoneFile", { params: { id } }, opts),
704
+ leave: (id, body, opts) => execute(config, "boughtDomains.leave", { params: { id }, body }, opts)
705
+ },
696
706
  // A1: automations.
697
707
  automations: {
698
708
  list: (query, opts) => execute(config, "automations.list", { query }, opts),
package/dist/index.mjs CHANGED
@@ -677,6 +677,16 @@ function createNamespaces(config) {
677
677
  list: (query, opts) => execute(config, "domainOrders.list", { query }, opts),
678
678
  get: (id, opts) => execute(config, "domainOrders.get", { params: { id } }, opts)
679
679
  },
680
+ // Bought domains, managed by their holder: dates, DNS records, the zone file, leaving.
681
+ boughtDomains: {
682
+ list: (opts) => execute(config, "boughtDomains.list", {}, opts),
683
+ records: (id, opts) => execute(config, "boughtDomains.records", { params: { id } }, opts),
684
+ createRecord: (id, body, opts) => execute(config, "boughtDomains.createRecord", { params: { id }, body }, opts),
685
+ updateRecord: (id, recordId, body, opts) => execute(config, "boughtDomains.updateRecord", { params: { id, record_id: recordId }, body }, opts),
686
+ deleteRecord: (id, recordId, opts) => execute(config, "boughtDomains.deleteRecord", { params: { id, record_id: recordId } }, opts),
687
+ zoneFile: (id, opts) => execute(config, "boughtDomains.zoneFile", { params: { id } }, opts),
688
+ leave: (id, body, opts) => execute(config, "boughtDomains.leave", { params: { id }, body }, opts)
689
+ },
680
690
  // A1: automations.
681
691
  automations: {
682
692
  list: (query, opts) => execute(config, "automations.list", { query }, opts),
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.22.0",
6
+ "version": "0.24.0",
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.22.0"
35
+ "@marlinjai/mail-contract": "^0.24.0"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "zod": "^3.25.0"