Skip to main content

Data Base Package

The base package provides the core types, interfaces, and utilities for data operations in the zopio framework. It serves as the foundation for all data providers and UI components.

Features

  • CrudProvider Interface: Standard interface for all data providers
  • Type Definitions: Comprehensive TypeScript types for data operations
  • Provider Registry: System for registering and retrieving data providers
  • Schema Utilities: Tools for defining and validating data schemas
  • Mutation Utilities: Utilities for data transformations

Core Types

CrudProvider Interface

The CrudProvider interface is the foundation of the data package, defining a standard set of operations that all data providers must implement:

Operation Parameters

Each CRUD operation has a specific parameter type:

Operation Results

Each CRUD operation returns a specific result type:

Provider Utilities

Creating Data Providers

The base package provides utilities for creating data providers:

Provider Registry

The provider registry allows you to register and retrieve data providers:

Mock Providers

The base package includes utilities for creating mock providers for testing:

Schema Utilities

Creating Schemas

The base package provides utilities for defining and validating data schemas:

Schema Registry

The schema registry allows you to register and retrieve schemas:

Mutation Utilities

Data Transformers

The base package provides utilities for data transformations:

Data Filters

The base package provides utilities for filtering data:

General Utilities

Error Handling

The base package provides utilities for error handling:

Pagination

The base package provides utilities for pagination:

Advanced Usage

Custom Provider Types

You can create custom provider types by implementing the ProviderFactory interface:

Provider Composition

You can compose multiple providers together:

API Reference

For a complete API reference, please refer to the TypeScript definitions in the package.