Skip to main content
Version: 0.4.2 (Previous)

💬 Chat Blocks

Chat blocks provide comprehensive functionality for real-time communication in Nodeblocks applications. These blocks handle chat lifecycle operations including channels, messages, and subscriptions.


🎯 Overview

Chat blocks are designed to:

  • Manage chat channels with full CRUD operations
  • Handle message exchange and real-time communication
  • Provide subscription management for notifications
  • Support multi-channel communication
  • Enable chat administration with comprehensive controls

📦 Block Types

🔍 Schemas

JSON Schema definitions for chat data validation:

  • channelSchema: Base channel entity structure
  • messageSchema: Message entity structure
  • subscriptionSchema: Subscription entity structure

View Chat Schema Blocks →

⚙️ Handlers

Core business logic for chat operations:

  • Channel Operations: createChatChannel, getChatChannelById, findChatChannels, updateChatChannel, deleteChatChannel
  • Message Operations: createChatMessage, getChatMessageById, findChatMessages, updateChatMessage, deleteChatMessage
  • Subscription Operations: createChatSubscription, getChatSubscriptionById, findChatSubscriptions, deleteChatSubscription

View Chat Handler Blocks →

🛣️ Routes

HTTP endpoint definitions for chat operations:

  • Channel Routes: createChatChannelRoute, getChatChannelRoute, findChatChannelsRoute, updateChatChannelRoute, deleteChatChannelRoute
  • Message Routes: createChatMessageRoute, getChatMessageRoute, findChatMessagesRoute, updateChatMessageRoute, deleteChatMessageRoute
  • Subscription Routes: createChatSubscriptionRoute, getChatSubscriptionRoute, findChatSubscriptionsRoute, deleteChatSubscriptionRoute

View Chat Route Blocks →

🚀 Features

Composed chat features for easy integration:

  • Channel Features: createChannelFeature, getChannelFeature, findChannelsFeature, updateChannelFeature, deleteChannelFeature
  • Message Features: createChatMessageFeature, getChatMessageFeature, findChatMessagesFeature, updateChatMessageFeature, deleteChatMessageFeature
  • Subscription Features: createChatSubscriptionFeature, getChatSubscriptionFeature, findChatSubscriptionsFeature, deleteChatSubscriptionFeature

View Chat Features →

Validators

Validation functions for chat operations:

  • validateChannelAccess: Validates channel access based on ownership and permissions
  • validateMessageAccess: Validates message access based on ownership and permissions

View Chat Validator Blocks →