alliance-shared-types
v1.0.21
Published
Shared TypeScript types for Alliance B2B Travel Portal
Maintainers
Readme
Alliance Shared Types
This package contains shared TypeScript type definitions for the Alliance B2B Travel Portal. It ensures type consistency between the frontend and backend applications.
Installation
Local Development
During local development, you can use the package directly from your local filesystem:
# From the frontend or backend project
npm install ../alliance-shared-typesUsing npm
Once published to npm:
npm install alliance-shared-typesUsing GitHub
You can also install directly from GitHub:
npm install git+https://github.com/yourusername/alliance-shared-types.gitUsage
// Import specific types
import { UserData, AuthResponse, USER_ROLES } from 'alliance-shared-types';
// Use in your code
const user: UserData = {
userId: '123',
email: '[email protected]',
role: USER_ROLES.ADMIN,
agentId: '456',
status: 'active'
};Available Types
Authentication
UserCredentials- Login credentialsAuthResponse- Authentication response with token and user dataUserData- User informationJwtPayload- JWT token payload structureTokenData- Token data with expiration
Enums and Constants
UserRoleandUSER_ROLES- User role types and constantsUserStatusandUSER_STATUSES- User status types and constantsAgentTypeandAGENT_TYPES- Agent type types and constantsKycStatusandKYC_STATUSES- KYC status types and constantsAgentStatusandAGENT_STATUSES- Agent status types and constants
Development
To build the package:
npm run buildPublishing
npm login
npm publish