Skip to content

v6.0.2 - Empty Object Serialization Fix

Choose a tag to compare

@mourraille mourraille released this 03 Jul 12:16
· 2 commits to main since this release
5661ef0

Node.js SDK v6.0.2

What's New

πŸ”§ Bug Fix: Empty Object Serialization

  • Fix: Empty JSON object serialization β€” objects with no properties now correctly serialize to {} instead of []
  • Resolves backend validation errors when sending empty optional/nested objects

✨ New Features: Consent Groups Management

  • List consent groups β€” GET /contacts/consent-groups
  • Create a consent group β€” POST /contacts/consent-groups
  • Get consent group details β€” GET /contacts/consent-groups/{id}
  • Update consent group β€” PUT /contacts/consent-groups/{id} (name, description, signup mode)
  • Delete consent group β€” DELETE /contacts/consent-groups/{id}

πŸ“² Extended Operations

  • Import contacts β€” POST /contacts/import now accepts optional consentGroupIds field to add imported contacts to specified consent groups
  • Get contact details β€” GET /contacts/{identifier} now returns consentGroups array showing subscription status (when feature enabled)

πŸ’³ New Wallet Feature

  • Get pass installation URL β€” GET /wallet/passes/{passId}/installUrl/{contactId}
    • Generates per-contact wallet installation URLs
    • Enables sharing via email, SMS, or QR code for Apple Wallet/Google Wallet integration

Bug Fixes

  • Fixed serialization of empty optional/nullable objects to produce valid JSON objects instead of arrays
  • Resolves issues where backends strict on type validation would reject payloads containing empty nested objects

Compatibility

  • βœ… Backward compatible β€” no breaking changes
  • βœ… No API surface changes
  • βœ… No method signature changes

Installation

npm install @getbrevo/brevo@6.0.2