All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
-
New Feature:
contacts.deleteByEmail()method for deleting contacts by email address- Added
deleteByEmail(email: string)method to Contacts API - Properly handles URL encoding of email addresses with special characters
- Returns same response format as existing
delete()method:{ isDeleted: boolean, contact: Contact } - Added comprehensive tests and example usage
- Integrates with new SMASHSEND backend endpoint
/v1/contacts/by-email/{email}
- Added
-
Events API Improvements: New clearer method names for better developer experience
- 🎯 New methods:
events.send()andevents.sendBatch()- much clearer than "track"! - 📚 Better documentation: Updated examples and documentation to use the new method names
- 📝 Added Events API section: Comprehensive guide in README with practical examples
- 🔧 New example file:
examples/events-usage.tsshowing real-world usage patterns
- 🎯 New methods:
- BREAKING: Simplified transactional email response format to match backend API changes
RawEmailSendResponsenow returns:{ messageId, status, to, warning?, groupBy? }TemplatedEmailSendResponsenow returns:{ messageId, status, to, warning? }- Removed deprecated fields:
from,subject,type,template,created,statusCode,message - Updated all tests to use the new response format
- This change aligns the Node.js SDK with the simplified backend response schema
-
Dynamic Reply-To Addresses: Added support for custom reply-to addresses in both raw and templated emails
- 📧 Multiple addresses: Support for up to 5 reply-to addresses per email
- 🔄 Flexible input: Accept single email string or array of email strings
- 🧹 Automatic deduplication: Duplicate addresses are automatically removed (case-insensitive)
- 📝 Template override: Dynamic reply-to addresses override template defaults for templated emails
- ✅ Full validation: Proper error messages when limits are exceeded
- 🎯 Both email types: Works with both
emails.send()(raw) andemails.sendWithTemplate()(templated)
-
Data Migration Support: Added
overrideCreatedAtparameter for batch contact operations⚠️ MIGRATION USE ONLY: Allows preserving historical creation dates when migrating from legacy systems- Added
createdAtfield toContactCreateOptionsinterface (Date type, automatically converted to ISO string) - Added comprehensive documentation and examples with warnings about proper usage
- Designed specifically for one-time migrations (e.g., from Jungle or other legacy systems)
- WARNING: Incorrect usage can corrupt analytics and reporting data
- Type Exports: Added missing exports for
EmailIdentity,DomainIdentity, andEmailIdentityStatustypes- These types are now properly exported from the main package for external use
- Fixes TypeScript compilation errors when using the enhanced email identities API
- Enhanced Email Identities API: Updated
domains.getVerifiedIdentities()to include status information- Each email now returns
{ email: string, status: EmailIdentityStatus } - Each domain now returns
{ domain: string, status: EmailIdentityStatus } - Status types:
"VERIFIED" | "PENDING" | "FAILED" - Currently only VERIFIED identities are returned, but structure supports future expansion
- Updated JSDoc documentation with new examples
- Each email now returns
- BREAKING:
VerifiedEmailIdentitiesinterface updated from simple string arrays to objects with statusemails: string[]→emails: EmailIdentity[]domains: string[]→domains: DomainIdentity[]
Before:
const identities = await smashsend.domains.getVerifiedIdentities();
console.log(identities.emails); // ['user@domain.com']
console.log(identities.domains); // ['domain.com']After:
const identities = await smashsend.domains.getVerifiedIdentities();
console.log(identities.emails); // [{ email: 'user@domain.com', status: 'VERIFIED' }]
console.log(identities.domains); // [{ domain: 'domain.com', status: 'VERIFIED' }]
// To get just the email strings (for backward compatibility):
const emailStrings = identities.emails.map((e) => e.email);
const domainStrings = identities.domains.map((d) => d.domain);- Domains API: New
domainsresource withgetVerifiedIdentities()method- Returns verified email addresses and domains for the workspace
- Includes default workspace email and custom verified domains
- Used by Zapier integration for dynamic "From" field population
- Added comprehensive documentation for the Domains API in JSDoc comments
- Added
typeConfigparameter toCustomPropertyCreateOptionsinterface to support property configuration during creationmultiple: boolean - Enable multiple values for SELECT/MULTI_SELECT typesoptions: string[] - Define predefined options for SELECT/MULTI_SELECT typesisRequired: boolean - Mark property as requiredisDeletable: boolean - Control whether property can be deleted
- Fixed issue where
typeConfigwas not being passed when creating contact properties
Note: Version 1.0.1 was the actual initial release. Version 1.0.0 was not published.
- Removed the following property types that don't exist in the backend:
SmashsendPropertyType.TEXT- useSTRINGinsteadSmashsendPropertyType.INTEGER- useNUMBERinsteadSmashsendPropertyType.EMAIL- useSTRINGinsteadSmashsendPropertyType.URL- useSTRINGinsteadSmashsendPropertyType.PHONE- useSTRINGinstead
SmashsendPropertyType.SELECT- for single choice dropdown fieldsSmashsendPropertyType.MULTI_SELECT- for multiple choice selection fields- Montenegro (ME) country code to
SmashsendCountryCodeenum - Comprehensive TypeScript example for contact properties (
examples/contact-properties.ts) - Contact Properties section in README with proper documentation
- Property types now correctly match the backend implementation
- Only 6 property types are supported: SELECT, MULTI_SELECT, STRING, NUMBER, DATE, BOOLEAN
If you were using any of the removed property types, update your code as follows:
// Before
type: SmashsendPropertyType.TEXT → type: SmashsendPropertyType.STRING
type: SmashsendPropertyType.INTEGER → type: SmashsendPropertyType.NUMBER
type: SmashsendPropertyType.EMAIL → type: SmashsendPropertyType.STRING
type: SmashsendPropertyType.URL → type: SmashsendPropertyType.STRING
type: SmashsendPropertyType.PHONE → type: SmashsendPropertyType.STRINGFor dropdown/select fields, use the new types:
// Single choice dropdown
type: SmashsendPropertyType.SELECT;
// Multiple choice selection
type: SmashsendPropertyType.MULTI_SELECT;