@messagebird/sdk 0.28.0 → 0.30.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 +2 -2
- package/dist/index.d.mts +7257 -4339
- package/dist/index.mjs +1999 -497
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -67,7 +67,7 @@ for await (const message of bird.email.list()) {
|
|
|
67
67
|
## WhatsApp
|
|
68
68
|
|
|
69
69
|
```ts
|
|
70
|
-
await bird.whatsapp.send({ to, template }); // resolves when accepted (202);
|
|
70
|
+
await bird.whatsapp.send({ to, template }); // resolves when accepted (202); `from` is required except for a Bird-managed template
|
|
71
71
|
await bird.whatsapp.get(messageId); // delivery status + failure detail
|
|
72
72
|
|
|
73
73
|
// `await` yields the first page; `for await` walks every message across pages.
|
|
@@ -111,7 +111,7 @@ try {
|
|
|
111
111
|
html: "<p>My first Bird email.</p>",
|
|
112
112
|
});
|
|
113
113
|
} catch (err) {
|
|
114
|
-
if (err instanceof BirdRateLimitError) console.log(`rate limited
|
|
114
|
+
if (err instanceof BirdRateLimitError) console.log(`rate limited; retry in ${err.retryAfter}s`);
|
|
115
115
|
else if (err instanceof BirdValidationError) console.error(err.details);
|
|
116
116
|
else if (err instanceof BirdAPIError) console.error(err.code, err.requestId);
|
|
117
117
|
else throw err;
|