feat(pricing, types, utils, medusa-sdk): Pricing Module Setup + Currency (#4860)
What: - Setups the skeleton for pricing module - Creates service/model/repository for currency model - Setups types - Setups DB - Moved some utils to a common place RESOLVES CORE-1477 RESOLVES CORE-1476
This commit is contained in:
@@ -10,6 +10,7 @@ export enum Modules {
|
||||
INVENTORY = "inventoryService",
|
||||
CACHE = "cacheService",
|
||||
PRODUCT = "productService",
|
||||
PRICING = "pricingService",
|
||||
}
|
||||
|
||||
export enum ModuleRegistrationName {
|
||||
@@ -18,6 +19,7 @@ export enum ModuleRegistrationName {
|
||||
INVENTORY = "inventoryService",
|
||||
CACHE = "cacheService",
|
||||
PRODUCT = "productModuleService",
|
||||
PRICING = "pricingModuleService",
|
||||
}
|
||||
|
||||
export const MODULE_PACKAGE_NAMES = {
|
||||
@@ -26,6 +28,7 @@ export const MODULE_PACKAGE_NAMES = {
|
||||
[Modules.STOCK_LOCATION]: "@medusajs/stock-location",
|
||||
[Modules.INVENTORY]: "@medusajs/inventory",
|
||||
[Modules.CACHE]: "@medusajs/cache-inmemory",
|
||||
[Modules.PRICING]: "@medusajs/pricing",
|
||||
}
|
||||
|
||||
export const ModulesDefinition: { [key: string | Modules]: ModuleDefinition } =
|
||||
@@ -97,6 +100,20 @@ export const ModulesDefinition: { [key: string | Modules]: ModuleDefinition } =
|
||||
resources: MODULE_RESOURCE_TYPE.SHARED,
|
||||
},
|
||||
},
|
||||
[Modules.PRICING]: {
|
||||
key: Modules.PRICING,
|
||||
registrationName: ModuleRegistrationName.PRICING,
|
||||
defaultPackage: false,
|
||||
label: "PricingModuleService",
|
||||
isRequired: false,
|
||||
canOverride: true,
|
||||
isQueryable: true,
|
||||
dependencies: ["logger"],
|
||||
defaultModuleDeclaration: {
|
||||
scope: MODULE_SCOPE.INTERNAL,
|
||||
resources: MODULE_RESOURCE_TYPE.SHARED,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
export const MODULE_DEFINITIONS: ModuleDefinition[] =
|
||||
|
||||
Reference in New Issue
Block a user