fix: Standardize remaining batch methods and update FE calls (#7122)
This commit is contained in:
1 parent
ea14a3bd68
commit
9e3556686b
49 files changed
+851
-611
No files matched your search
@@ -1,11 +1,12 @@
|
||||
import { Modules } from "@medusajs/modules-sdk"
|
||||
import { ModuleJoinerConfig } from "@medusajs/types"
|
||||
import { generateLinkableKeysMap } from "@medusajs/utils"
|
||||
import { Campaign, Promotion } from "@models"
|
||||
import { Campaign, Promotion, PromotionRule } from "@models"
|
||||
|
||||
export const LinkableKeys = {
|
||||
promotion_id: Promotion.name,
|
||||
campaign_id: Campaign.name,
|
||||
promotion_rule_id: PromotionRule.name,
|
||||
}
|
||||
|
||||
export const entityNameToLinkableKeysMap = generateLinkableKeysMap(LinkableKeys)
|
||||
@@ -28,5 +29,12 @@ export const joinerConfig: ModuleJoinerConfig = {
|
||||
methodSuffix: "Campaigns",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: ["promotion_rule", "promotion_rules"],
|
||||
args: {
|
||||
entity: PromotionRule.name,
|
||||
methodSuffix: "PromotionRules",
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
Reference in new issue
Block a user