refactor: migrate promotion module (#10410)
This commit is contained in:
1 parent
777582ac43
commit
fad85a9d29
22 files changed
+682
-745
No files matched your search
@@ -9,6 +9,7 @@ import {
|
||||
MedusaError,
|
||||
PromotionType,
|
||||
} from "@medusajs/framework/utils"
|
||||
import { InferEntityType } from "@medusajs/types"
|
||||
import { Promotion } from "@models"
|
||||
import { CreateApplicationMethodDTO, UpdateApplicationMethodDTO } from "@types"
|
||||
|
||||
@@ -28,7 +29,7 @@ export const allowedAllocationForQuantity: string[] = [
|
||||
|
||||
export function validateApplicationMethodAttributes(
|
||||
data: UpdateApplicationMethodDTO | CreateApplicationMethodDTO,
|
||||
promotion: Promotion
|
||||
promotion: InferEntityType<typeof Promotion>
|
||||
) {
|
||||
const applicationMethod = promotion?.application_method || {}
|
||||
const buyRulesMinQuantity =
|
||||
|
||||
Reference in new issue
Block a user