@movmo_app/types
v1.1.1
Published
A collection of Movmo's types
Downloads
16
Readme
@movmo_app/types
This package provides all of the TypeScript type definitions used across the Movmo ecosystem.
Overview
The @movmo_app/types package serves as a central repository for shared TypeScript types, interfaces, and enums that are used across various Movmo packages and applications. By centralizing these types, we ensure consistency across our codebase and reduce duplication.
Installation
# npm
npm install @movmo_app/types
# yarn
yarn add @movmo_app/types
# pnpm
pnpm add @movmo_app/typesUsage
Import the types you need in your TypeScript files:
import { FlightOffer, DataSource, BookingStatus } from '@movmo_app/types';
// Example usage
const offer: FlightOffer = {
// ...
};
const dataSource: DataSource = "amadeus";
const status: BookingStatus = "CONFIRMED";Available Types
Core Types
FlightOffer: Represents a flight offer from a data sourceBookingData: Contains booking detailsPassengerInfo: Passenger informationPricingInfo: Flight pricing details
Enums
DataSource: Available data sources (e.g., "amadeus", "sabre")BookingStatus: Status of a booking (e.g., "PENDING", "CONFIRMED", "CANCELLED")PaymentMethod: Available payment methodsFlightClass: Flight class types (e.g., "ECONOMY", "BUSINESS", "FIRST")
API Request/Response Types
FlightOfferRequest: Request format for retrieving flight offersFlightOfferResponse: Response format for flight offersBookingRequest: Request format for creating a bookingBookingResponse: Response format for booking creation
Development
Building the Package
# Install dependencies
pnpm install
# Build
pnpm buildAdding New Types
When adding new types to this package:
- Place the type definitions in the appropriate file under the
src/directory - Export them from the main
index.tsfile - Ensure proper documentation is added for each type
- Update this README if adding significant new types or categories
Version Control
This package follows semantic versioning:
- Major version: Breaking changes to existing types
- Minor version: New types added (non-breaking)
- Patch version: Bug fixes, documentation updates
Internal Usage Guidelines
- Avoid duplicating these types in other packages or applications
- If you need a modified version of an existing type, consider extending it
- If you find yourself copy-pasting types between projects, consider adding them here instead
- For types that are only used in a single package, keep them in that package
Deployment
This package is automatically published to npm when changes are merged to the main branch via GitHub Actions.
License
Internal use only. © Movmo
