Changelog
2025-09-11
🎥 Demo Video
📹 NodeBlocks Backend SDK v0.6.0 Demo - Complete walkthrough of all new features and functionality
✨ Added
Blocks
- Chat:
createChatMessageTemplate
: Create new chat message templates with organization access controlgetChatMessageTemplateById
: Retrieve specific message template by ID with validation
Schemas
- Chat:
createChatMessageTemplateSchema
: Validate template creation requestschatMessageTemplateIdPathParameter
: Validate template ID path parameters
Routes
- Chat:
createChatMessageTemplateRoute
: POST/message-templates
- Create message templatesgetChatMessageTemplateByIdRoute
: GET/message-templates/:messageTemplateId
- Get template by ID
Features
- Chat:
createChatMessageTemplateFeature
: Composed workflow for template creationgetChatMessageTemplateByIdFeature
: Composed workflow for template retrieval
Drivers
- OAuth:
createTwitterOAuthDriver
: Configure Passport strategy for Twitter OAuthverifyTwitterCallback
: Passport verify callback for Twitter OAuth
Validators
- Chat:
hasOrganizationAccessToMessageTemplate
: Validate organization access to message templates
Utilities
- RxJS:
notFromEmitter
: RxJS predicate to filter messages from specific emitter instancesmarkAsFromEmitter
: Mark messages as originating from specific emitter instances
🔄 Changed
Services
Authentication Service
: Added Twitter OAuth support and refresh token functionality- Added
twitterOAuthDriver
parameter to service configuration - Added Twitter OAuth endpoints to route composition
- Enhanced refresh token system with soft delete functionality
- Updated datastore configuration to include
chatMessageTemplates
collection
- Added
Primitives
- Service Infrastructure:
- Enhanced
defService
to support WebSocket server integration - Added WebSocket route handling with RxJS bridging for real-time communication
- Implemented WebSocket connection management with emitter-based message filtering
- Added support for
protocol: 'ws'
routes alongside HTTP routes
- Enhanced
Route Definitions:
- WebSocket Routing:
- Added
withRoute
support for WebSocket protocol routes - Enabled
protocol: 'ws'
option for defining WebSocket endpoints - Integrated WebSocket handlers with the existing route composition system
- Added
Blocks
- Chat:
- Enhanced message template blocks with organization-based access control
- Added soft delete functionality for template management
- Improved validation and error handling for template operations
Drivers
- OAuth:
createGoogleOAuthDriver
: Enhanced with multi-provider support- Added Twitter OAuth driver integration
- Improved session-based state management for OAuth flows
Validators
- Chat:
- Enhanced organization access validators for message templates
- Improved error handling and validation messages
🐞 Fixed
Services
Authentication Service
:- Fixed refresh token route validation (removed isAuthenticated validator)
- Corrected configuration property names (
user.typeIds
→identity.typeIds
) - Fixed type definitions (
user?: string
→regular?: string
) - Updated all service quickstart examples with correct property names
Drivers
- File Storage:
- Fixed GCP storage testing mock implementation
- Improved cross-platform compatibility for test environments
Blocks
- Organization:
- Fixed missing organization blocks export issue
- Improved module organization and exports
Configuration
- Fixed property name inconsistencies across all services:
user.typeIds
→identity.typeIds
in configuration interfacesuser?: string
→regular?: string
in type definitions- Updated all example configurations and documentation