@spottoai/types-package
v1.0.2-beta.113
Published
Shared TypeScript interfaces for SpottoAI
Readme
Types Package
A shared TypeScript interfaces package. This package contains common interfaces that can be reused across your API, frontend, and backend projects.
Features
- Shared Interfaces: Common TypeScript interfaces for API requests/responses, database models, frontend components, and backend services
- Git Dependencies: Designed to work with Git dependencies
- TypeScript Declaration Files: Built with declaration files for better IDE support
- Modular Structure: Organized by domain (API, Database, Frontend, Backend)
Installation
Add this to your consuming project's package.json:
{
"dependencies": {
"@spotto/types-package": "git+https://github.com/spottoai/types-package.git#main"
}
}Or for a specific branch/tag:
{
"dependencies": {
"@spotto/types-package": "git+https://github.com/spottoai/types-package.git#v1.0.0"
}
}Usage
Importing Interfaces
// Import all interfaces
import * as Types from '@spotto/types-package';
// Import specific interfaces
import { User } from '@spotto/types-package';Development
Setup
- Clone the repository
- Install dependencies:
npm install
Building
# Build the package
npm run build
# Watch mode for development
npm run dev
# Clean build artifacts
npm run clean
# Code linting
npm run lint
# Code formatting
npm run format
# Build with checks
npm run build:checkAdding New Interfaces
- Create new interface files in the appropriate
src/subdirectory - Export them from the corresponding index file
- Update the main
src/index.tsif needed - Build the package:
npm run build
Directory Structure
src/
├── example/
│ └── common.ts # Common types
└── index.ts # Main export fileVersioning
This package follows semantic versioning. When making changes:
- Update the version in
package.json - Create a Git tag for the new version
- Push the tag to the repository
Contributing
- Create a feature branch
- Add your new interfaces or modifications
- Update the main index file if needed
- Build and test the package
- Submit a pull request
License
MIT License - see LICENSE file for details
