@sendery/sdk 0.1.6 → 0.1.7

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.7
4
+
5
+ - See the GitHub release notes for this version.
6
+
3
7
  ## 0.1.6
4
8
 
5
9
  - See the GitHub release notes for this version.
package/README.md CHANGED
@@ -36,9 +36,9 @@ if (!apiKey) throw new Error('Set SENDERY_API_KEY on your server.');
36
36
 
37
37
  const sendery = new Sendery(apiKey);
38
38
  const receipt = await sendery.send({
39
- to: 'alex@example.com',
39
+ to: 'steven@example.com',
40
40
  template: 'your-template',
41
- data: { name: 'Alex', action_url: 'https://example.com/start' },
41
+ data: { name: 'Steven', action_url: 'https://example.com/start' },
42
42
  });
43
43
 
44
44
  console.log(receipt.id);
@@ -50,9 +50,9 @@ Choose a [published template version](https://sendery.co/en/docs/send-email#sect
50
50
 
51
51
  ```javascript
52
52
  const receipt = await sendery.prepare({
53
- to: 'alex@example.com',
53
+ to: 'steven@example.com',
54
54
  template: 'your-template',
55
- data: { name: 'Alex', action_url: 'https://example.com/start' },
55
+ data: { name: 'Steven', action_url: 'https://example.com/start' },
56
56
  }).version(3).send();
57
57
  ```
58
58
 
@@ -70,9 +70,9 @@ const sendery = new Sendery(process.env.SENDERY_API_KEY);
70
70
  const file = await readFile('/path/document.pdf');
71
71
 
72
72
  await sendery.prepare({
73
- to: 'alex@example.com',
73
+ to: 'steven@example.com',
74
74
  template: 'your-template',
75
- data: { name: 'Alex', action_url: 'https://example.com/start' },
75
+ data: { name: 'Steven', action_url: 'https://example.com/start' },
76
76
  attachments: [attachment('document.pdf', file, 'application/pdf')],
77
77
  }, 'your-idempotency-key').retry().send();
78
78
  ```
@@ -94,9 +94,9 @@ Use `retry(3)` for up to three extra attempts after temporary failures. Keep the
94
94
 
95
95
  ```javascript
96
96
  const email = sendery.prepare({
97
- to: 'alex@example.com',
97
+ to: 'steven@example.com',
98
98
  template: 'your-template',
99
- data: { name: 'Alex', action_url: 'https://example.com/start' },
99
+ data: { name: 'Steven', action_url: 'https://example.com/start' },
100
100
  }, 'your-idempotency-key');
101
101
 
102
102
  const receipt = await email.retry(3).send();
@@ -143,7 +143,7 @@ Start with [Connecting your application](https://sendery.co/en/docs/connect-even
143
143
  const receipt = await sendery.event({
144
144
  name: "account.created",
145
145
  object: { type: "account", id: "842" },
146
- data: { email: "alex@example.com", name: "Alex" },
146
+ data: { email: "steven@example.com", name: "Steven" },
147
147
  }).retry().send();
148
148
  ```
149
149
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendery/sdk",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "type": "module",
5
5
  "description": "Server-side Sendery template email SDK for JavaScript and TypeScript",
6
6
  "license": "MIT",