Many of these changes are live on the REST API too. Search your code for the old names below, then let the type checker find the rest. If you upgrade one release at a time, each version's notes are in the package changelog.
What you need to do
- Mailbox streams. The stream now pings every 30 seconds instead of sending heartbeats. Upgrade the SDK or CLI before you rely on a long-lived stream, or an older one reconnects about every 90 seconds (0.12).
- Contacts.
contacts.bulkImporttakesidentitiesandprofileand anonConflictofskiporupdate.findOrCreatetakes alookupand returns{ contact, created }(0.13, 0.14). An identity has atypeofemailorphonewhere it had achannel(0.19). - Mailbox sends. A send, reply or forward returns a receipt with a
state, such asqueuedorcompleted, in place ofstatus(0.14). A mailbox owns endpoints (0.15, 0.16):
// Before
await samva.mailboxes.create({
slug: "support",
displayName: "Support",
addresses: [{ address: "support@acme.samva.email" }],
});
// After
await samva.mailboxes.create({
endpoint: { channel: "email", address: "support@acme.samva.email" },
name: "Support",
});
- Default sender. An organization has one default sender, and domains carry none (0.16):
// Before
await samva.email.setDomainDefaultSender({ id: domainId, senderId });
// After
await samva.email.setDefaultSender({ id: senderId });
- Unsubscribe groups. Members are contacts.
addEmailsisaddMembers,removeEmailsisremoveMembers, and each takes{ contactId },{ email }or{ phone }(0.19). - Templates. Publications return
compiledwhere they returnedir, and a brand's footer is onerenderedFooter(0.23). Template, API key and campaign run responses carry new required fields, so update test fixtures (0.21). - Usage. Organization usage reports
includedCredits,usedCreditsandoverageCreditswhere it reported email counts, with AI credits in separate fields (0.23). - Sends without a sender. A send with no
fromand no default sender throwsFromAddressRequiredError, whoseverifiedDomainslists what you can use (0.24). - Effect users.
Client.rawis gone. Call the domain operation, such asContacts.list(...)fromsamva/effect/contacts(0.17).
Also in this range: Promise request types accept undefined inside free-form objects such as templateData, and list parameters accept two or more items (0.23.1).