refactor: convert modules enum to a const (#9486)

This commit is contained in:
Harminder Virk
2024-10-07 14:42:59 +05:30
committed by GitHub
parent 2d1f4bcabc
commit 2d8ce6fd5b

View File

@@ -1,29 +1,33 @@
export enum Modules {
AUTH = "Auth",
CACHE = "Cache",
CART = "Cart",
CUSTOMER = "Customer",
EVENT_BUS = "EventBus",
INVENTORY = "Inventory",
LINK = "LinkModules",
PAYMENT = "Payment",
PRICING = "Pricing",
PRODUCT = "Product",
PROMOTION = "Promotion",
SALES_CHANNEL = "SalesChannel",
TAX = "Tax",
FULFILLMENT = "Fulfillment",
STOCK_LOCATION = "StockLocation",
USER = "User",
WORKFLOW_ENGINE = "Workflows",
REGION = "Region",
ORDER = "Order",
API_KEY = "ApiKey",
STORE = "Store",
CURRENCY = "Currency",
FILE = "File",
NOTIFICATION = "Notification",
INDEX = "Index",
}
export const Modules = {
AUTH: "Auth",
CACHE: "Cache",
CART: "Cart",
CUSTOMER: "Customer",
EVENT_BUS: "EventBus",
INVENTORY: "Inventory",
LINK: "LinkModules",
PAYMENT: "Payment",
PRICING: "Pricing",
PRODUCT: "Product",
PROMOTION: "Promotion",
SALES_CHANNEL: "SalesChannel",
TAX: "Tax",
FULFILLMENT: "Fulfillment",
STOCK_LOCATION: "StockLocation",
USER: "User",
WORKFLOW_ENGINE: "Workflows",
REGION: "Region",
ORDER: "Order",
API_KEY: "ApiKey",
STORE: "Store",
CURRENCY: "Currency",
FILE: "File",
NOTIFICATION: "Notification",
INDEX: "Index",
} as const
/**
* Making modules be referenced as a type as well.
*/
export type Modules = (typeof Modules)[keyof typeof Modules]
export const ModuleRegistrationName = Modules