feat(dashboard): SO cart item total rules UI (#10386)

This commit is contained in:
Kasper Fabricius Kristensen authored and GitHub committed 2024-12-09 09:44:11 +01:00
1 parent 9e797dc3d2
commit a1a1e0e789
33 files changed
+1947 -190

No files matched your search

@@ -30,7 +30,14 @@ export interface AdminShippingOptionRule {
// TODO: This type is complete, but it's not clear what the `rules` field is supposed to return in all cases.
export interface AdminShippingOptionPriceRule {
id: string
value: string
value: string | number
operator: RuleOperatorType
attribute: string
price_id: string
priority: number
created_at: string
updated_at: string
deleted_at: string | null
}
export interface AdminShippingOptionPrice extends AdminPrice {
@@ -13,12 +13,24 @@ export interface AdminCreateShippingOptionType {
code: string
}
export interface AdminCreateShippingOptionPriceWithCurrency {
interface AdminShippingOptionPriceRulePayload {
operator: string
attribute: string
value: string | string[] | number
}
interface AdminShippingOptionPriceWithRules {
rules?: AdminShippingOptionPriceRulePayload[]
}
export interface AdminCreateShippingOptionPriceWithCurrency
extends AdminShippingOptionPriceWithRules {
currency_code: string
amount: number
}
export interface AdminCreateShippingOptionPriceWithRegion {
export interface AdminCreateShippingOptionPriceWithRegion
extends AdminShippingOptionPriceWithRules {
region_id: string
amount: number
}
@@ -43,13 +55,15 @@ export interface AdminUpdateShippingOptionRule
id: string
}
export interface AdminUpdateShippingOptionPriceWithCurrency {
export interface AdminUpdateShippingOptionPriceWithCurrency
extends AdminShippingOptionPriceWithRules {
id?: string
currency_code?: string
amount?: number
}
export interface AdminUpdateShippingOptionPriceWithRegion {
export interface AdminUpdateShippingOptionPriceWithRegion
extends AdminShippingOptionPriceWithRules {
id?: string
region_id?: string
amount?: number