* chore: added item/shipping adjustments for order/items/shipping_methods * chore: add validation for order type and target rules * chore: add comment for applied promotions * chore: add shipping method and item adjustments * chore: include applied promotions to items/shipping_method for each case * chore: handle case for items across and order to consider existing applications * chore: handle case for applied promo values to shipping => across * chore: added changeset * chore: update return of function * chore: campaigns and campaign budgets + services CRUD * Apply suggestions from code review Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com> * chore: minor refactor * chore: added single/bulk interfaces * Apply suggestions from code review Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com> * chore: use DAL date entity * chore: align nullable * Update packages/promotion/src/models/promotion-rule.ts * chore: fix types * chore: review changes * Update packages/promotion/src/utils/compute-actions/shipping-methods.ts Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com> --------- Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com> Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com>
33 lines
734 B
TypeScript
33 lines
734 B
TypeScript
import { CampaignBudgetType } from "@medusajs/utils"
|
|
|
|
export const defaultCampaignsData = [
|
|
{
|
|
id: "campaign-id-1",
|
|
name: "campaign 1",
|
|
description: "test description",
|
|
currency: "USD",
|
|
campaign_identifier: "test-1",
|
|
starts_at: new Date("01/01/2023"),
|
|
ends_at: new Date("01/01/2024"),
|
|
budget: {
|
|
type: CampaignBudgetType.SPEND,
|
|
limit: 1000,
|
|
used: 0,
|
|
},
|
|
},
|
|
{
|
|
id: "campaign-id-2",
|
|
name: "campaign 1",
|
|
description: "test description",
|
|
currency: "USD",
|
|
campaign_identifier: "test-2",
|
|
starts_at: new Date("01/01/2023"),
|
|
ends_at: new Date("01/01/2024"),
|
|
budget: {
|
|
type: CampaignBudgetType.USAGE,
|
|
limit: 1000,
|
|
used: 0,
|
|
},
|
|
},
|
|
]
|