Skip to content

Releases: timdev-ger/closecrm-node

v1.0.4

14 Jan 21:38

Choose a tag to compare

Created Wiki and fixed some major issues

v1.0.3

13 Jan 11:44

Choose a tag to compare

Changelog

[1.0.3] - 2026-01-13

Added

  • WhatsApp Message Activity: Full CRUD support for WhatsApp messages (activity.whatsapp_message)

    • search(), create(), read(), update(), delete() methods
    • Support for send_to_inbox query parameter in create method
    • TypeScript definitions included
  • Custom Objects: Complete implementation of Custom Objects API

    • custom_object_type resource with list/create/read/update/delete operations
    • custom_object resource with list/create/read/update/delete operations
    • custom_field.custom_object_type sub-resource for custom object custom fields
    • Full TypeScript support for all Custom Objects interfaces
  • Report Resource: Comprehensive reporting endpoints aligned with Close.com API

    • activity_metrics() - List predefined activity metrics
    • activity(data) - Get activity reports (overview/comparison)
    • sent_emails(orgId, opts) - Email reports grouped by template
    • lead_statuses(orgId, opts) - Lead status change reports
    • opportunity_statuses(orgId, opts) - Opportunity status change reports
    • custom(orgId, opts) - Custom reports for any object
    • custom_fields() - List available custom report fields
    • funnel_totals(data) - Opportunity funnel reports (totals)
    • funnel_stages(data) - Opportunity funnel reports (stages)
  • Enhanced Test Coverage:

    • Unit tests expanded from 42 to 69 test cases
    • New test suites for Activity Sub-Resources, Custom Field Sub-Resources, and Status Sub-Resources
    • Manual integration tests expanded from 12 to 22 scenarios
    • All resources now have comprehensive test coverage

Fixed

  • Email Thread Endpoints: Corrected paths from /email_thread/ to /activity/emailthread/ per official API documentation
  • Pagination Parameters: Normalized search/list parameters across all resources
    • Convenience parameters limit, skip, fields now properly mapped to _limit, _skip, _fields
    • Applied to all resources except event.search() which has strict parameter requirements
  • Rate Limiting: Enhanced 429 retry logic
    • Now prioritizes RateLimit-Reset header over Retry-After
    • Supports multiple header variants: RateLimit-Reset, Rate-Limit-Reset, X-RateLimit-Reset, X-Rate-Limit-Reset, rate_reset
    • Intelligent delay calculation based on reset timestamp

Removed

  • Import API: Removed undocumented /import/ endpoint that was not found in official Close.com API documentation

Changed

  • TypeScript Definitions: Updated all interfaces to reflect new resources and corrected endpoints
    • Added WhatsAppMessage, CustomObjectType, CustomObject interfaces
    • Updated ReportResource interface with all 9 reporting methods
    • Extended CustomField interface with custom_object_type_id field
    • Updated SearchOptions to include _limit, _skip, _fields

Documentation

  • README.md: Added comprehensive Notes section
    • Pagination parameter mapping explanation
    • Email thread endpoint documentation
    • Rate limit handling strategy
    • Removed outdated import endpoint warning

Technical Improvements

  • Added _normalizeSearchParams() helper method for consistent parameter handling
  • Added _getRateLimitDelayMs() for intelligent rate limit delay calculation
  • All changes validated against official Close.com API documentation at https://developer.close.com

Testing

  • All 69 unit tests passing ✅
  • All 22 manual integration tests passing ✅
  • 100% resource initialization coverage
  • All CRUD operations validated

Migration Guide

Report Resource

If you were using the old report methods:

// Before (REMOVED)
api.report.list()
api.report.read(id)

// After (NEW)
api.report.activity_metrics()
api.report.activity({ type: 'overview', metrics: [...] })
api.report.lead_statuses(organizationId)
// ... see documentation for all 9 methods

Import Resource

The import resource has been completely removed as it's not documented in the official API:

// Before (REMOVED)
api.import.create(data)

// Alternative: Use standard lead/contact/opportunity creation
api.lead.create(data)

Email Threads

No code changes needed - the SDK now uses the correct endpoints internally:

// Still works the same way
api.email_thread.list()
api.email_thread.read(id)

Full Changelog: v1.0.2...v1.0.3

v1.0.2

13 Jan 11:45

Choose a tag to compare

What's Changed

  • Normalize search params and improve rate limit handling by @timdev-ger in #1

Full Changelog: https://github.com/timdev-ger/closecrm-node/commits/v1.0.2