Skip to main content
Version: 0.5.0 (Previous)

📦 Order Blocks

Order blocks provide comprehensive functionality for order management in Nodeblocks applications. These blocks handle order lifecycle operations including creation, processing, tracking, and fulfillment.


🎯 Overview

Order blocks are designed to:

  • Manage order processing with full CRUD operations
  • Handle order status tracking and updates
  • Provide order validation and business rules
  • Support order fulfillment workflows
  • Enable order administration with comprehensive tracking

📦 Block Types

🔍 Schemas

JSON Schema definitions for order data validation:

  • orderSchema: Base order entity structure
  • createOrderSchema: Order creation validation
  • updateOrderSchema: Order update validation
  • getOrderSchema: Order retrieval validation
  • deleteOrderSchema: Order deletion validation
  • findOrdersSchema: Order search with filtering and pagination

View Order Schema Blocks →

⚙️ Handlers

Core business logic for order operations:

  • createOrder: Order creation
  • getOrderById: Order data retrieval
  • updateOrder: Order updates
  • deleteOrder: Order deletion
  • findOrders: Order search and filtering

View Order Handler Blocks →

🛣️ Routes

HTTP endpoint definitions for order operations:

  • createOrderRoute: POST /orders with creation handler
  • getOrderRoute: GET /orders/:orderId with retrieval handler
  • findOrdersRoute: GET /orders with search and pagination
  • updateOrderRoute: PATCH /orders/:orderId with update handler
  • deleteOrderRoute: DELETE /orders/:orderId with deletion handler

View Order Route Blocks →

🚀 Features

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

  • createOrderFeature: Order creation with validation and routing
  • updateOrderFeature: Order updates with validation and access control
  • getOrderFeature: Order retrieval with access control
  • findOrdersFeature: Order search with filtering and pagination
  • deleteOrderFeature: Order deletion with proper validation and cleanup

View Order Feature Blocks →

Validators

Validation functions for order operations:

  • ownsOrder: Validates order ownership by the authenticated identity
  • validateOrderAccess (deprecated): Legacy access validator; replaced by ownsOrder

View Order Validator Blocks →