Skip to content

[docs] Update readme types for domain config #148

Description

@NiloCK

From the readme:

import 'dotenv/config';
import { MailerSend } from "mailersend";

const mailerSend = new MailerSend({
  apiKey: process.env.API_KEY,
});

mailerSend.email.domain.updateSettings("domain_id", {
  send_paused: 1,
  track_clicks: 1,
  track_opens: 1,
  track_unsubscribe: 1,
  track_unsubscribe_html: "<strong> Unsubscribe now </strong>",
  track_unsubscribe_plain: "Unsubscribe now",
  track_content: 1,
  custom_tracking_enabled: 1,
  custom_tracking_subdomain: "subdomain",
  precedence_bulk: 1,
  ignore_duplicated_recipients: 1,
})
  .then((response) => console.log(response.body))
  .catch((error) => console.log(error.body));

But:

Image

Type 'number' is not assignable to type 'boolean | undefined'. (ts 2322)

Probably the numbers work at runtime, but probably also better for example to match defined types.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions