coachontap-be
v1.0.0
Published
Shared types and interfaces for MBE microservices
Maintainers
Readme
@mbe/shared-types
Shared TypeScript types and interfaces for MBE microservices.
Installation
npm install @mbe/shared-types
# or
yarn add @mbe/shared-typesUsage
Import specific types
import { BaseRole, RequestContext, EmailData } from "@mbe/shared-types";
// Use in your code
const context: RequestContext = {
correlationId: "uuid",
requestId: "uuid",
role: BaseRole.ADMIN,
timestamp: Date.now(),
source: "user-service",
firstName: "John",
lastName: "Doe",
};Available Exports
Enums
BaseRole- User roles (CLIENT, COACH, ADMIN, etc.)LoginType- Login methods (GOOGLE, MANUAL)VerifyStatus- Verification statusGender- Gender optionsCoachingCategory- All coaching categories- And many more...
Interfaces
RequestContext- Standard request contextEmailData- Email template dataGoogleProfile- Google OAuth profile- Various email template interfaces
Development
# Build the package
npm run build
# Watch mode
npm run build:watch
# Clean dist folder
npm run cleanPublishing
npm run build
npm publish