diff --git a/packages/core/utils/src/modules-sdk/definition.ts b/packages/core/utils/src/modules-sdk/definition.ts index fd59d85d69..0e19e8fdd8 100644 --- a/packages/core/utils/src/modules-sdk/definition.ts +++ b/packages/core/utils/src/modules-sdk/definition.ts @@ -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