Releases: timdev-ger/closecrm-node
Releases · timdev-ger/closecrm-node
v1.0.4
v1.0.3
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_inboxquery parameter in create method - TypeScript definitions included
-
Custom Objects: Complete implementation of Custom Objects API
custom_object_typeresource with list/create/read/update/delete operationscustom_objectresource with list/create/read/update/delete operationscustom_field.custom_object_typesub-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 metricsactivity(data)- Get activity reports (overview/comparison)sent_emails(orgId, opts)- Email reports grouped by templatelead_statuses(orgId, opts)- Lead status change reportsopportunity_statuses(orgId, opts)- Opportunity status change reportscustom(orgId, opts)- Custom reports for any objectcustom_fields()- List available custom report fieldsfunnel_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,fieldsnow properly mapped to_limit,_skip,_fields - Applied to all resources except
event.search()which has strict parameter requirements
- Convenience parameters
- Rate Limiting: Enhanced 429 retry logic
- Now prioritizes
RateLimit-Resetheader overRetry-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
- Now prioritizes
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,CustomObjectinterfaces - Updated
ReportResourceinterface with all 9 reporting methods - Extended
CustomFieldinterface withcustom_object_type_idfield - Updated
SearchOptionsto include_limit,_skip,_fields
- Added
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 methodsImport 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
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