UNPKG

@cranberry-money/shared-types

Version:

Shared TypeScript type definitions for Blueberry platform

84 lines (55 loc) 1.73 kB
# @myportfolio/shared-types Shared TypeScript type definitions for the Blueberry platform, supporting both web (Blueberry) and mobile (Blackberry) applications. ## Installation ```bash npm install @myportfolio/shared-types ``` ## Usage ```typescript import { AuthState, BaseFilters, NavigationItem } from '@myportfolio/shared-types'; // Use shared types in your application const authState: AuthState = { isAuthenticated: true, isLoading: false, user: { hasProfile: true, profileCompleted: true, }, }; ``` ## Available Types ### Authentication (`auth.ts`) - `AuthState` - Authentication state management ### Components (`components.ts`) - `BaseDialogProps` - Standard dialog interfaces - `BaseSearchFieldProps` - Search field variations - `BaseSummaryPanelProps` - Summary panel patterns ### Instruments (`instruments.ts`) - `InstrumentFilters` - Filtering for financial instruments - `InstrumentMetadata` - Reference data for instruments ### Navigation (`navigation.ts`) - `NavigationItem` - Navigation menu items - `AppNavigationStructure` - Cross-platform navigation structure ### Trading Filters (`trading-filters.ts`) - `BaseFilters` - Base filtering interfaces - `DateRangeFilters` - Date range filtering - `NumericRangeFilters` - Numeric range filtering ### Validation (`validation.ts`) - `BaseFieldValidation` - Form field validation - `BaseFormValidation` - Form-level validation ## Development ```bash # Build the package npm run build # Watch for changes npm run dev # Type check npm run typecheck ``` ## Platform Compatibility This package is designed to work across: - Web applications (React) - Mobile applications (React Native) - Node.js environments ## License MIT