sendlit 0.5.0 → 0.7.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/README.md +10 -4
- package/dist/index.d.mts +1874 -485
- package/dist/index.d.ts +1874 -485
- package/dist/index.js +627 -301
- package/dist/index.mjs +627 -302
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -63,14 +63,15 @@ new SendLit({
|
|
|
63
63
|
| `sendlit.contacts` | `create`, `list`, `listAll`, `get`, `update`, `remove`, `addTag`, `removeTag`, `deliveries`, `events` |
|
|
64
64
|
| `sendlit.segments` | `create`, `list`, `get`, `update`, `remove` |
|
|
65
65
|
| `sendlit.templates` | `list`, `listSystem`, `get`, `create`, `update`, `duplicate`, `remove` |
|
|
66
|
-
| `sendlit.sequences` | Broadcasts and sequences: `create`, `list`, `listAll`, `get`, `update`, `remove`, `addEmail`, `updateEmail`, `publishChanges`, `discardChanges`, `emailVersions`, `restoreEmailVersion`, `removeEmail`, `start`, `pause`, `stats`, `subscribers`, `sendEmailTest` |
|
|
66
|
+
| `sendlit.sequences` | Broadcasts and sequences: `create`, `list`, `listAll`, `get`, `update`, `remove`, `addEmail`, `updateEmail`, `publishChanges`, `discardChanges`, `emailVersions`, `restoreEmailVersion`, `removeEmail`, `start`, `pause`, `stats`, `deliveries`, `listAllDeliveries`, `subscribers`, `sendEmailTest` |
|
|
67
67
|
| `sendlit.emails` | Transactional email: `send`, `get`, `list`, `listAll` |
|
|
68
|
+
| `sendlit.forms` | Signup forms: `list`, `get`, `create`, `update`, `remove`, and `submit` to sign someone up from your server (double opt-in forms email a confirmation link) |
|
|
68
69
|
| `sendlit.events` | Custom events: `track`, and `definitions.list`, `definitions.get`, `definitions.create`, `definitions.update`, `definitions.delete` |
|
|
69
70
|
| `sendlit.provisioning` | Organization key only: `provisionTeam`, `getTeam`, `updateTeam`, `createTeamKey`, `suspendTeam`, `resumeTeam`, `archiveTeam`, `getTeamUsage` |
|
|
70
71
|
| `sendlit.suppressions` | `list`, `listAll`, `get`, `release` |
|
|
71
72
|
| `sendlit.deliveryEvents` | `list`, `listAll`, `get` |
|
|
72
73
|
| `sendlit.tags` | `list`, `references`, `rename`, `remove` |
|
|
73
|
-
| `sendlit.settings` | `general.get`, `general.update` (the
|
|
74
|
+
| `sendlit.settings` | `general.get`, `general.update` (the `postalAddress` broadcasts and sequences need) |
|
|
74
75
|
| `sendlit.overview` | `get`: the team's dashboard numbers, optionally for `rangeDays` 1, 3, 7 or 30 |
|
|
75
76
|
|
|
76
77
|
Request and response types are exported too, for example `Contact`,
|
|
@@ -190,7 +191,12 @@ const platform = new SendLit({ apiKey: process.env.SENDLIT_ORG_API_KEY });
|
|
|
190
191
|
const team = await platform.provisioning.provisionTeam({
|
|
191
192
|
externalId: school.id, // an immutable ID from your database
|
|
192
193
|
name: school.name,
|
|
193
|
-
|
|
194
|
+
postalAddress: {
|
|
195
|
+
line1: school.street,
|
|
196
|
+
city: school.city,
|
|
197
|
+
postalCode: school.postalCode,
|
|
198
|
+
country: school.country, // ISO 3166-1 alpha-2, such as "GB"
|
|
199
|
+
},
|
|
194
200
|
});
|
|
195
201
|
if (team.created) {
|
|
196
202
|
// The plaintext key is only returned once. Encrypt and store it now.
|
|
@@ -229,7 +235,7 @@ await sendlit.sequences.start(broadcast.sequenceId);
|
|
|
229
235
|
```
|
|
230
236
|
|
|
231
237
|
Starting a broadcast or sequence requires a mailing address in the team's
|
|
232
|
-
settings (set it with `
|
|
238
|
+
settings (set it with `postalAddress` when provisioning) and a way to send
|
|
233
239
|
email: either an organization delivery grant or the team's own ESP.
|
|
234
240
|
|
|
235
241
|
While a broadcast or sequence is active, `updateEmail` saves subject and
|