0.0.7 • Published 5 months ago

@usewaypoint/client v0.0.7

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

@usewaypoint/client

Waypoint is a platform for product teams to send, manage, and automate dynamic transactional emails – with little to no code.

This is the Node.js library to access the Waypoint API.

Sending your first email

1. Install npm package

npm install @usewaypoint/client --save

2. Import and initialize a client

import { createClient } from '@usewaypoint/client'

const client = createClient('USERNAME', 'PASSWORD');

3.1 Send a templated email message

// You can also use `client.sandboxEmailMessages.createdTemplated()`
await client.emailMessages.createTemplated({
  templateId: // template id example: 'wptemplate_xxxxxxxxxxxxxxxx',
  to: // email address of recipient,
  variables: // variables expected by the template,
});

3.2 Send a raw HTML email message

// You can also use `client.sandboxEmailMessages.createRaw()`
await client.emailMessages.createRaw({
  to: // email address of recipient,
  bodyHtml: '<h1>Hello world</h1>',
});

Development and releasing

Build a release version

npm run build npm publish

0.0.7

5 months ago

0.0.6

7 months ago

0.0.5

8 months ago

0.0.4

8 months ago

0.0.3

8 months ago

0.0.2

8 months ago