Skip to main content

2 posts tagged with "node"

View All Tags

@hatang/sdk 0.4.0: production by default, templates, global contacts, automations

@hatang/sdk 0.4.0 calls https://api.hatang.dev by default. Before, a client created without baseUrl or HATANG_BASE_URL called http://localhost:3001; local development now passes baseUrl (or sets HATANG_BASE_URL) instead.

New calls:

  • Templates: templates.create/get/list/update/remove/publish/duplicate, and emails.send({ to, template: { id, variables } }).
  • Global contacts: contacts.* without audience_id, by id or email, with properties, segments and topics; new segments, topics and contactProperties namespaces. audience_id still uses the older audience routes.
  • Automations: events.*, automations.* and automations.runs.*.
  • Insights: emails.metrics(), logs.list/get and usage.get.

The blog namespace is removed. See the Node.js guide.

@hatang/sdk 0.3.0: receiving email

@hatang/sdk 0.3.0 reads received email: emails.receiving.list(), .get(id), and the attachments with signed download URLs (valid for an hour). Domains gain capabilities, so domains.update({ id, capabilities: { receiving: "enabled" } }) turns receiving on. Canned responses gain subject and is_private, and payment links gain qr_payload for apps that draw the VietQR code themselves.