Skip to main content
Version: 0.6.0 (Latest)

📂 Category Blocks

Category blocks provide comprehensive functionality for managing hierarchical category structures in Nodeblocks applications. These blocks handle category creation, updates, retrieval, and search operations with support for parent-child relationships.


🎯 Overview

Category blocks are designed to:

  • Manage hierarchical categories with parent-child relationships
  • Support category lifecycle with enable/disable operations
  • Enable category search and filtering capabilities
  • Provide CRUD operations for category management
  • Support pagination for large category collections

📦 Block Types

🔍 Schemas

JSON Schema definitions for category data validation:

  • categorySchema: Base category structure
  • createCategorySchema: Category creation validation
  • updateCategorySchema: Category modifications
  • getCategorySchema: Category retrieval
  • deleteCategorySchema: Category deletion
  • enableCategorySchema: Category activation
  • disableCategorySchema: Category deactivation
  • findCategoriesSchema: Category search with filtering and pagination

View Category Schema Blocks →

⚙️ Handlers

Core business logic for category operations:

  • createCategory: Category creation with hierarchy support
  • getCategoryById: Category data retrieval
  • findCategories: Category search and filtering
  • updateCategory: Category modifications
  • enableCategory: Category activation
  • disableCategory: Category deactivation
  • deleteCategory: Category deletion with cleanup

View Category Handler Blocks →

🛣️ Routes

HTTP endpoint definitions for category operations:

  • createCategoryRoute: POST /categories with creation handler
  • getCategoryRoute: GET /categories/:categoryId with retrieval handler
  • findCategoriesRoute: GET /categories with search and pagination
  • updateCategoryRoute: PATCH /categories/:categoryId with update handler
  • enableCategoryRoute: POST /categories/:categoryId/enable with enable handler
  • disableCategoryRoute: POST /categories/:categoryId/disable with disable handler
  • deleteCategoryRoute: DELETE /categories/:categoryId with deletion handler

View Category Route Blocks →

🚀 Features

Complete category management features combining schemas, routes, and handlers:

  • createCategoryFeature: Category creation with validation and routing
  • getCategoryFeatures: Category retrieval with access control
  • findCategoriesFeatures: Category search with filtering and pagination
  • editCategoryFeatures: Category updates with validation and access control
  • enableCategoryStatusFeatures: Category activation functionality
  • disableCategoryStatusFeatures: Category deactivation functionality
  • editCategoryStatusFeatures: Complete category status management
  • deleteCategoryFeatures: Category deletion with proper validation and cleanup

View Category Feature Blocks →

Validators

Validation functions for category operations:

  • doesCategoryExist: Validates category existence before operations

View Category Validator Blocks →