tastebuddy-common-modules
v1.0.0
Published
A shared TypeScript package containing common constants, enums, and types for the TasteBuddy platform.
Downloads
152
Readme
TasteBuddy Common Modules
A shared TypeScript package containing common constants, enums, and types for the TasteBuddy platform.
Features
- Centralized Constants: Shared constants for entity names, DynamoDB key prefixes, and configuration.
- Unified Enums: Standardized enums for statuses, types, and categories across the platform.
- Kafka Topics: Centralized definitions for Kafka topic names.
- Braze Events: Standardized Braze event definitions.
Installation
npm install tastebuddy-common-modulesUsage
Importing Enums and Constants
import {
// Enums
UserType,
OrderStatus,
PaymentStatus,
DeviceType,
// Constants
KAFKA_TOPICS,
DEFAULT_CURRENCY,
PRODUCT,
RETAILER,
} from "tastebuddy-common-modules";
// Example Usage
const userType = UserType.CUSTOMER;
const currency = DEFAULT_CURRENCY;
console.log(`User type is ${userType} and currency is ${currency}`);Available Modules
Enums (enums/types.ts)
Includes standardized types for:
- User & Retailer:
UserType,UserStatus,RetailerStatus,BusinessType,OnboardingStatus - Product & Category:
ProductSource,CategoryType,AudienceType,CategoryEntityType - Orders & Payments:
OrderStatus,OrderType,PaymentStatus,PaymentMethod,ShippingMethod,ReturnStatus - System & Devices:
DeviceType,POSSystem,ProductSyncMethod - Marketing & Leads:
LeadStatus,LeadType,BrazeCampaignKey,BrazeEvents
Constants (constants/constants.ts)
Includes shared constants for:
- Entity Names:
PRODUCT,RETAILER,STORE,USER, etc. - DynamoDB Key Prefixes:
AUDIENCE,CATEGORY,DEPARTMENT,SUBCATEGORY - Kafka:
KAFKA_TOPICS(Retailer, Inventory, Product, Order, Payment, Notification, and Braze webhooks) - Braze:
BRAZE_EVENT_NAME
Development
Building
npm run buildPublishing
npm publishLicense
ISC
