feat(dashboard,medusa): Promotion Campaign fixes (#7337)
* chore(medusa): strict zod versions in workspace * feat(dashboard): add campaign create to promotion UI * wip * fix(medusa): Missing middlewares export (#7289) * fix(docblock-generator): fix how type names created from Zod objects are inferred (#7292) * feat(api-ref): show schema of a tag (#7297) * feat: Add support for sendgrid and logger notification providers (#7290) * feat: Add support for sendgrid and logger notification providers * fix: changes based on PR review * chore: add action to automatically label docs (#7284) * chore: add action to automatically label docs * removes the paths param * docs: preparations for preview (#7267) * configured base paths + added development banner * fix typelist site url * added navbar and sidebar badges * configure algolia filters * remove AI assistant * remove unused imports * change navbar text and badge * lint fixes * fix build error * add to api reference rewrites * fix build error * fix build errors in user-guide * fix feedback component * add parent title to pagination * added breadcrumbs component * remove user-guide links * resolve todos * fix details about authentication * change documentation title * lint content * chore: fix bug with form reset * chore: address reviews * chore: fix specs * chore: loads of FE fixes + BE adds * chore: add more polishes + reorg files * chore: fixes to promotions modal * chore: cleanup * chore: cleanup * chore: fix build * chore: fkix cart spec * chore: fix module tests * chore: fix moar tests * wip * chore: templates + fixes + migrate currency * chore: fix build, add validation for max_quantity * chore: allow removing campaigns * chore: fix specs * chore: scope campaigns based on currency * remove console logs * chore: add translations + update keys * chore: move over filesfrom v2 to routes * chore(dashboard): Delete old translation files (#7423) * feat(dashboard,admin-sdk,admin-shared,admin-vite-plugin): Add support for UI extensions (#7383) * intial work * update lock * add routes and fix HMR of configs * cleanup * rm imports * rm debug from plugin * address feedback * address feedback * temp skip specs --------- Co-authored-by: Adrien de Peretti <adrien.deperetti@gmail.com> Co-authored-by: Shahed Nasser <shahednasser@gmail.com> Co-authored-by: Stevche Radevski <sradevski@live.com> Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com> Co-authored-by: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com>
This commit is contained in:
72 files changed
+5380
-3473
No files matched your search
@@ -12,6 +12,7 @@ export interface CampaignResponse {
|
||||
budget: {
|
||||
id: string
|
||||
type: CampaignBudgetTypeValues
|
||||
currency_code: string
|
||||
limit: number
|
||||
used: number
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
export * from "./promotion-rule"
|
||||
export * from "./rule-attribute-options"
|
||||
export * from "./rule-operator-options"
|
||||
export * from "./rule-value-options"
|
||||
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* @experimental
|
||||
*/
|
||||
export interface RuleValueOptionsResponse {
|
||||
id: string
|
||||
value: string
|
||||
label: string
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
*/
|
||||
export interface AdminRuleValueOptionsListResponse {
|
||||
values: RuleValueOptionsResponse[]
|
||||
}
|
||||
@@ -53,6 +53,11 @@ export interface ApplicationMethodDTO {
|
||||
*/
|
||||
value?: number
|
||||
|
||||
/**
|
||||
* The currency code of the application method
|
||||
*/
|
||||
currency_code?: string
|
||||
|
||||
/**
|
||||
* The max quantity allowed in the cart for the associated promotion to be applied.
|
||||
*/
|
||||
@@ -116,6 +121,11 @@ export interface CreateApplicationMethodDTO {
|
||||
*/
|
||||
value?: number
|
||||
|
||||
/**
|
||||
* Currency of the value to apply.
|
||||
*/
|
||||
currency_code: string
|
||||
|
||||
/**
|
||||
* The max quantity allowed in the cart for the associated promotion to be applied.
|
||||
*/
|
||||
@@ -158,7 +168,7 @@ export interface UpdateApplicationMethodDTO {
|
||||
/**
|
||||
* The ID of the application method.
|
||||
*/
|
||||
id: string
|
||||
id?: string
|
||||
|
||||
/**
|
||||
* The type of the application method indicating how
|
||||
@@ -184,6 +194,11 @@ export interface UpdateApplicationMethodDTO {
|
||||
*/
|
||||
value?: number
|
||||
|
||||
/**
|
||||
* The currency code of the promotions application
|
||||
*/
|
||||
currency_code?: string
|
||||
|
||||
/**
|
||||
* The max quantity allowed in the cart for the associated promotion to be applied.
|
||||
*/
|
||||
|
||||
@@ -36,6 +36,11 @@ export interface CampaignBudgetDTO {
|
||||
*
|
||||
*/
|
||||
used?: number
|
||||
|
||||
/**
|
||||
* The currency of the campaign.
|
||||
*/
|
||||
currency_code?: string
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -21,11 +21,6 @@ export interface CampaignDTO {
|
||||
*/
|
||||
description?: string
|
||||
|
||||
/**
|
||||
* The currency of the campaign.
|
||||
*/
|
||||
currency?: string
|
||||
|
||||
/**
|
||||
* The campaign identifier of the campaign.
|
||||
*/
|
||||
|
||||
@@ -88,7 +88,7 @@ export interface CreatePromotionDTO {
|
||||
/**
|
||||
* The associated application method.
|
||||
*/
|
||||
application_method?: CreateApplicationMethodDTO
|
||||
application_method: CreateApplicationMethodDTO
|
||||
|
||||
/**
|
||||
* The rules of the promotion.
|
||||
|
||||
@@ -4,6 +4,7 @@ export type AdminGetPromotionRulesRes = {
|
||||
attribute_label: string
|
||||
field_type?: string
|
||||
operator: string
|
||||
hydrate: boolean
|
||||
operator_label: string
|
||||
values: { label?: string; value?: string }[]
|
||||
disguised?: boolean
|
||||
|
||||
@@ -12,12 +12,17 @@ export interface CreateCampaignBudgetDTO {
|
||||
/**
|
||||
* The limit of the campaign budget.
|
||||
*/
|
||||
limit?: number
|
||||
limit?: number | null
|
||||
|
||||
/**
|
||||
* How much is used of the campaign budget.
|
||||
*/
|
||||
used?: number
|
||||
|
||||
/**
|
||||
* The currency of the campaign.
|
||||
*/
|
||||
currency_code?: string | null
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -37,7 +42,12 @@ export interface UpdateCampaignBudgetDTO {
|
||||
/**
|
||||
* The limit of the campaign budget.
|
||||
*/
|
||||
limit?: number
|
||||
limit?: number | null
|
||||
|
||||
/**
|
||||
* The limit of the campaign budget.
|
||||
*/
|
||||
currency_code?: string | null
|
||||
|
||||
/**
|
||||
* How much is used of the campaign budget.
|
||||
@@ -59,11 +69,6 @@ export interface CreateCampaignDTO {
|
||||
*/
|
||||
description?: string
|
||||
|
||||
/**
|
||||
* The currency of the campaign.
|
||||
*/
|
||||
currency?: string
|
||||
|
||||
/**
|
||||
* The campaign identifier of the campaign.
|
||||
*/
|
||||
@@ -104,11 +109,6 @@ export interface UpdateCampaignDTO {
|
||||
*/
|
||||
description?: string
|
||||
|
||||
/**
|
||||
* The currency of the campaign.
|
||||
*/
|
||||
currency?: string
|
||||
|
||||
/**
|
||||
* The campaign identifier of the campaign.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user