chore: buyget templates add default target + buy rules (#7500)
* chore: buyget templates add default target + buy rules * chore: reposition * chore: address comments * chore: added fixes * chore: fix typo * chore: fix strictness checks
This commit is contained in:
@@ -81,15 +81,23 @@ async function removePromotionRules(
|
||||
)
|
||||
}
|
||||
|
||||
async function listPromotionRules(id: string | null, ruleType: string) {
|
||||
async function listPromotionRules(
|
||||
id: string | null,
|
||||
ruleType: string,
|
||||
query?: Record<string, string>
|
||||
) {
|
||||
return getRequest<PromotionRuleAttributesListRes>(
|
||||
`/admin/promotions/${id}/${ruleType}`
|
||||
`/admin/promotions/${id}/${ruleType}`,
|
||||
query
|
||||
)
|
||||
}
|
||||
|
||||
async function listPromotionRuleAttributes(ruleType: string) {
|
||||
async function listPromotionRuleAttributes(
|
||||
ruleType: string,
|
||||
promotionType?: string
|
||||
) {
|
||||
return getRequest<PromotionRuleAttributesListRes>(
|
||||
`/admin/promotions/rule-attribute-options/${ruleType}`
|
||||
`/admin/promotions/rule-attribute-options/${ruleType}?promotion_type=${promotionType}`
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user