Package Exports
- @cranberry-money/shared-types
Readme
@myportfolio/shared-types
Shared TypeScript type definitions for the Blueberry platform, supporting both web (Blueberry) and mobile (Blackberry) applications.
Installation
npm install @myportfolio/shared-typesUsage
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 interfacesBaseSearchFieldProps- Search field variationsBaseSummaryPanelProps- Summary panel patterns
Instruments (instruments.ts)
InstrumentFilters- Filtering for financial instrumentsInstrumentMetadata- Reference data for instruments
Navigation (navigation.ts)
NavigationItem- Navigation menu itemsAppNavigationStructure- Cross-platform navigation structure
Trading Filters (trading-filters.ts)
BaseFilters- Base filtering interfacesDateRangeFilters- Date range filteringNumericRangeFilters- Numeric range filtering
Validation (validation.ts)
BaseFieldValidation- Form field validationBaseFormValidation- Form-level validation
Development
# Build the package
npm run build
# Watch for changes
npm run dev
# Type check
npm run typecheckPlatform Compatibility
This package is designed to work across:
- Web applications (React)
- Mobile applications (React Native)
- Node.js environments
License
MIT