@pisell/pisellos 0.10.74 → 0.10.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/modules/Product/index.d.ts +1 -1
- package/dist/server/index.js +14 -9
- package/dist/shared/receipt/small-ticket.d.ts +3 -0
- package/dist/shared/receipt/small-ticket.js +23 -2
- package/dist/solution/BookingByStep/index.d.ts +2 -2
- package/dist/solution/BookingTicket/index.d.ts +13 -1
- package/dist/solution/OrderInvoicePreview/index.js +13 -8
- package/dist/solution/UnifiedBookingSales/catalogQueryBatch.d.ts +21 -0
- package/dist/solution/UnifiedBookingSales/catalogQueryBatch.js +202 -0
- package/dist/solution/UnifiedBookingSales/index.d.ts +8 -1
- package/dist/solution/UnifiedBookingSales/index.js +680 -557
- package/dist/solution/UnifiedBookingSales/types.d.ts +9 -0
- package/dist/solution/UnifiedBookingSales/types.js +2 -0
- package/lib/modules/Product/index.d.ts +1 -1
- package/lib/server/index.js +5 -0
- package/lib/shared/receipt/small-ticket.d.ts +3 -0
- package/lib/shared/receipt/small-ticket.js +21 -0
- package/lib/solution/BookingByStep/index.d.ts +2 -2
- package/lib/solution/BookingTicket/index.d.ts +13 -1
- package/lib/solution/OrderInvoicePreview/index.js +6 -1
- package/lib/solution/UnifiedBookingSales/catalogQueryBatch.d.ts +21 -0
- package/lib/solution/UnifiedBookingSales/catalogQueryBatch.js +109 -0
- package/lib/solution/UnifiedBookingSales/index.d.ts +8 -1
- package/lib/solution/UnifiedBookingSales/index.js +96 -1
- package/lib/solution/UnifiedBookingSales/types.d.ts +9 -0
- package/lib/solution/UnifiedBookingSales/types.js +1 -0
- package/package.json +1 -1
- package/dist/apis/picoding.d.ts +0 -0
- package/dist/effects/index.d.ts +0 -19
- package/dist/model/strategy/adapter/dataVariant/adapter.d.ts +0 -50
- package/dist/model/strategy/adapter/dataVariant/evaluator.d.ts +0 -105
- package/dist/model/strategy/adapter/dataVariant/examples.d.ts +0 -39
- package/dist/model/strategy/adapter/dataVariant/index.d.ts +0 -4
- package/dist/model/strategy/adapter/dataVariant/type.d.ts +0 -173
- package/dist/model/strategy/adapter/promotion/adapter.d.ts +0 -70
- package/dist/model/strategy/adapter/promotion/examples.d.ts +0 -224
- package/dist/model/strategy/adapter/promotion/type.d.ts +0 -535
- package/dist/model/strategy/adapter/type.d.ts +0 -28
- package/dist/model/strategy/adapter/walletPass/index.d.ts +0 -32
- package/dist/model/strategy/adapter/walletPass/locales.d.ts +0 -1
- package/dist/model/strategy/adapter/walletPass/type.d.ts +0 -192
- package/dist/model/strategy/adapter/walletPass/utils.d.ts +0 -50
- package/dist/model/strategy/engine.d.ts +0 -119
- package/dist/model/strategy/type.d.ts +0 -245
- package/dist/modules/Account/types.d.ts +0 -56
- package/dist/modules/BookingContext/types.d.ts +0 -104
- package/dist/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +0 -76
- package/dist/modules/BookingContext/utils/flexible.d.ts +0 -28
- package/dist/modules/BookingContext/utils/formatResourceList.d.ts +0 -8
- package/dist/modules/BookingContext/utils/noResource.d.ts +0 -13
- package/dist/modules/BookingContext/utils/orderLineDisplay.d.ts +0 -1
- package/dist/modules/BookingContext/utils/resourceErrors.d.ts +0 -41
- package/dist/modules/BookingContext/utils/resourceSelection.d.ts +0 -7
- package/dist/modules/BookingContext/utils/serviceTimes.d.ts +0 -55
- package/dist/modules/BookingContext/utils/timeSlices.d.ts +0 -42
- package/dist/modules/Customer/constants.d.ts +0 -7
- package/dist/modules/Date/types.d.ts +0 -84
- package/dist/modules/Date/utils.d.ts +0 -36
- package/dist/modules/FulfillmentTiming/index.d.ts +0 -11
- package/dist/modules/FulfillmentTiming/types.d.ts +0 -67
- package/dist/modules/Order/payment-utils.d.ts +0 -26
- package/dist/modules/Order/pickupTiming.d.ts +0 -46
- package/dist/modules/Order/utils/manualProductDiscount.d.ts +0 -106
- package/dist/modules/Order/utils/orderCollectionIdentity.d.ts +0 -68
- package/dist/modules/Order/utils/weighedProduct.d.ts +0 -12
- package/dist/modules/Payment/cashRecommendationAlgorithm.d.ts +0 -21
- package/dist/modules/Payment/mx51.d.ts +0 -0
- package/dist/modules/Payment/types.d.ts +0 -943
- package/dist/modules/Payment/utils.d.ts +0 -19
- package/dist/modules/Quotation/types.d.ts +0 -61
- package/dist/modules/Resource/types.d.ts +0 -50
- package/dist/modules/Resource/utils.d.ts +0 -23
- package/dist/modules/ResourcePlanner/localClock.d.ts +0 -33
- package/dist/modules/SalesSummary/types.d.ts +0 -69
- package/dist/modules/ScanOrderLogger/providers/feishu.d.ts +0 -2
- package/dist/modules/ScanOrderLogger/providers/grafana.d.ts +0 -2
- package/dist/modules/ScanOrderLogger/types.d.ts +0 -53
- package/dist/modules/Schedule/getDateIsInSchedule.d.ts +0 -32
- package/dist/modules/Schedule/type.d.ts +0 -157
- package/dist/modules/Schedule/types.d.ts +0 -201
- package/dist/modules/Schedule/utils.d.ts +0 -67
- package/dist/modules/Step/tyeps.d.ts +0 -20
- package/dist/modules/SurchargeList/types.d.ts +0 -15
- package/dist/plugins/app.d.ts +0 -10
- package/dist/plugins/shopStore.d.ts +0 -4
- package/dist/plugins/user.d.ts +0 -7
- package/dist/server/modules/floor-plan/types.d.ts +0 -43
- package/dist/server/modules/menu/types.d.ts +0 -68
- package/dist/server/modules/payment/types.d.ts +0 -9
- package/dist/server/modules/quotation/types.d.ts +0 -50
- package/dist/server/modules/resource/types.d.ts +0 -121
- package/dist/server/modules/schedule/types.d.ts +0 -1
- package/dist/server/modules/schedule/utils.d.ts +0 -32
- package/dist/server/types.d.ts +0 -66
- package/dist/server/utils/index.d.ts +0 -5
- package/dist/server/utils/schedule.d.ts +0 -14
- package/dist/server/utils/time.d.ts +0 -18
- package/dist/solution/BookingTicket/utils/bookingStatus.d.ts +0 -77
- package/dist/solution/BookingTicket/utils/exampleData.d.ts +0 -123
- package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +0 -185
- package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +0 -38
- package/dist/solution/BookingTicket/utils/scan/scanCache.d.ts +0 -78
- package/dist/solution/BookingTicket/utils/scan/scanProductValues.d.ts +0 -21
- package/dist/solution/BookingTicket/utils/weighingProductSku.d.ts +0 -5
- package/dist/solution/PlaceOrder/index.d.ts +0 -0
- package/dist/solution/RegisterAndLogin/config.d.ts +0 -93
- package/dist/solution/RegisterAndLogin/types.d.ts +0 -445
- package/dist/solution/RegisterAndLogin/utils.d.ts +0 -103
- package/dist/store/createStore.d.ts +0 -3
- package/dist/types/index.d.ts +0 -132
- package/dist/utils/os-private-payload.d.ts +0 -5
- package/dist/utils/payment-number.d.ts +0 -9
- package/dist/utils/task.d.ts +0 -40
- package/dist/utils/watch.d.ts +0 -102
- package/lib/apis/picoding.d.ts +0 -0
- package/lib/effects/index.d.ts +0 -19
- package/lib/model/strategy/adapter/dataVariant/adapter.d.ts +0 -50
- package/lib/model/strategy/adapter/dataVariant/evaluator.d.ts +0 -105
- package/lib/model/strategy/adapter/dataVariant/examples.d.ts +0 -39
- package/lib/model/strategy/adapter/dataVariant/index.d.ts +0 -4
- package/lib/model/strategy/adapter/dataVariant/type.d.ts +0 -173
- package/lib/model/strategy/adapter/promotion/adapter.d.ts +0 -70
- package/lib/model/strategy/adapter/promotion/examples.d.ts +0 -224
- package/lib/model/strategy/adapter/promotion/type.d.ts +0 -535
- package/lib/model/strategy/adapter/type.d.ts +0 -28
- package/lib/model/strategy/adapter/walletPass/index.d.ts +0 -32
- package/lib/model/strategy/adapter/walletPass/locales.d.ts +0 -1
- package/lib/model/strategy/adapter/walletPass/type.d.ts +0 -192
- package/lib/model/strategy/adapter/walletPass/utils.d.ts +0 -50
- package/lib/model/strategy/engine.d.ts +0 -119
- package/lib/model/strategy/type.d.ts +0 -245
- package/lib/modules/Account/types.d.ts +0 -56
- package/lib/modules/BookingContext/types.d.ts +0 -104
- package/lib/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +0 -76
- package/lib/modules/BookingContext/utils/flexible.d.ts +0 -28
- package/lib/modules/BookingContext/utils/formatResourceList.d.ts +0 -8
- package/lib/modules/BookingContext/utils/noResource.d.ts +0 -13
- package/lib/modules/BookingContext/utils/orderLineDisplay.d.ts +0 -1
- package/lib/modules/BookingContext/utils/resourceErrors.d.ts +0 -41
- package/lib/modules/BookingContext/utils/resourceSelection.d.ts +0 -7
- package/lib/modules/BookingContext/utils/serviceTimes.d.ts +0 -55
- package/lib/modules/BookingContext/utils/timeSlices.d.ts +0 -42
- package/lib/modules/Customer/constants.d.ts +0 -7
- package/lib/modules/Date/types.d.ts +0 -84
- package/lib/modules/Date/utils.d.ts +0 -36
- package/lib/modules/FulfillmentTiming/index.d.ts +0 -11
- package/lib/modules/FulfillmentTiming/types.d.ts +0 -67
- package/lib/modules/Order/payment-utils.d.ts +0 -26
- package/lib/modules/Order/pickupTiming.d.ts +0 -46
- package/lib/modules/Order/utils/manualProductDiscount.d.ts +0 -106
- package/lib/modules/Order/utils/orderCollectionIdentity.d.ts +0 -68
- package/lib/modules/Order/utils/weighedProduct.d.ts +0 -12
- package/lib/modules/Payment/cashRecommendationAlgorithm.d.ts +0 -21
- package/lib/modules/Payment/mx51.d.ts +0 -0
- package/lib/modules/Payment/types.d.ts +0 -943
- package/lib/modules/Payment/utils.d.ts +0 -19
- package/lib/modules/Quotation/types.d.ts +0 -61
- package/lib/modules/Resource/types.d.ts +0 -50
- package/lib/modules/Resource/utils.d.ts +0 -23
- package/lib/modules/ResourcePlanner/localClock.d.ts +0 -33
- package/lib/modules/SalesSummary/types.d.ts +0 -69
- package/lib/modules/ScanOrderLogger/providers/feishu.d.ts +0 -2
- package/lib/modules/ScanOrderLogger/providers/grafana.d.ts +0 -2
- package/lib/modules/ScanOrderLogger/types.d.ts +0 -53
- package/lib/modules/Schedule/getDateIsInSchedule.d.ts +0 -32
- package/lib/modules/Schedule/type.d.ts +0 -157
- package/lib/modules/Schedule/types.d.ts +0 -201
- package/lib/modules/Schedule/utils.d.ts +0 -67
- package/lib/modules/Step/tyeps.d.ts +0 -20
- package/lib/modules/SurchargeList/types.d.ts +0 -15
- package/lib/plugins/app.d.ts +0 -10
- package/lib/plugins/shopStore.d.ts +0 -4
- package/lib/plugins/user.d.ts +0 -7
- package/lib/server/modules/floor-plan/types.d.ts +0 -43
- package/lib/server/modules/menu/types.d.ts +0 -68
- package/lib/server/modules/payment/types.d.ts +0 -9
- package/lib/server/modules/quotation/types.d.ts +0 -50
- package/lib/server/modules/resource/types.d.ts +0 -121
- package/lib/server/modules/schedule/types.d.ts +0 -1
- package/lib/server/modules/schedule/utils.d.ts +0 -32
- package/lib/server/types.d.ts +0 -66
- package/lib/server/utils/index.d.ts +0 -5
- package/lib/server/utils/schedule.d.ts +0 -14
- package/lib/server/utils/time.d.ts +0 -18
- package/lib/solution/BookingTicket/utils/bookingStatus.d.ts +0 -77
- package/lib/solution/BookingTicket/utils/exampleData.d.ts +0 -123
- package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +0 -185
- package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +0 -38
- package/lib/solution/BookingTicket/utils/scan/scanCache.d.ts +0 -78
- package/lib/solution/BookingTicket/utils/scan/scanProductValues.d.ts +0 -21
- package/lib/solution/BookingTicket/utils/weighingProductSku.d.ts +0 -5
- package/lib/solution/PlaceOrder/index.d.ts +0 -0
- package/lib/solution/RegisterAndLogin/config.d.ts +0 -93
- package/lib/solution/RegisterAndLogin/types.d.ts +0 -445
- package/lib/solution/RegisterAndLogin/utils.d.ts +0 -103
- package/lib/store/createStore.d.ts +0 -3
- package/lib/types/index.d.ts +0 -132
- package/lib/utils/os-private-payload.d.ts +0 -5
- package/lib/utils/payment-number.d.ts +0 -9
- package/lib/utils/task.d.ts +0 -40
- package/lib/utils/watch.d.ts +0 -102
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import type { EvaluationResult, RuntimeContext } from '../../type';
|
|
2
|
-
import type { BusinessAdapter } from '../type';
|
|
3
|
-
import type { PromotionBusinessData, PromotionTransformResult } from './type';
|
|
4
|
-
/**
|
|
5
|
-
* Promotion 适配器
|
|
6
|
-
*
|
|
7
|
-
* 用于将促销活动业务数据转换为策略引擎可识别的格式
|
|
8
|
-
* 策略引擎只负责匹配,具体的优惠计算由业务层完成
|
|
9
|
-
*/
|
|
10
|
-
export declare class PromotionAdapter implements BusinessAdapter {
|
|
11
|
-
name: string;
|
|
12
|
-
version: string;
|
|
13
|
-
/**
|
|
14
|
-
* 准备运行时上下文
|
|
15
|
-
*
|
|
16
|
-
* 将业务数据转换为策略引擎可识别的 RuntimeContext
|
|
17
|
-
*/
|
|
18
|
-
prepareContext(businessData: PromotionBusinessData): RuntimeContext;
|
|
19
|
-
/**
|
|
20
|
-
* 转换执行结果
|
|
21
|
-
*
|
|
22
|
-
* 将策略引擎的通用结果转换为业务层需要的格式
|
|
23
|
-
* 主要是整理 matchedActions,让业务层更容易使用
|
|
24
|
-
*/
|
|
25
|
-
transformResult(result: EvaluationResult, businessData?: PromotionBusinessData): PromotionTransformResult;
|
|
26
|
-
/**
|
|
27
|
-
* 格式化配置
|
|
28
|
-
*/
|
|
29
|
-
formatConfig(result: EvaluationResult, businessData?: PromotionBusinessData): {
|
|
30
|
-
result: EvaluationResult;
|
|
31
|
-
businessData?: PromotionBusinessData;
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* 格式化日期时间
|
|
35
|
-
*/
|
|
36
|
-
private formatDateTime;
|
|
37
|
-
/**
|
|
38
|
-
* 解析 Action 详情
|
|
39
|
-
*
|
|
40
|
-
* 将 matchedAction 转换为更易用的结构
|
|
41
|
-
*/
|
|
42
|
-
private parseActionDetail;
|
|
43
|
-
/**
|
|
44
|
-
* 解析 X件Y元 Action
|
|
45
|
-
*/
|
|
46
|
-
private parseXItemsForYPriceAction;
|
|
47
|
-
/**
|
|
48
|
-
* 解析 买X送Y Action
|
|
49
|
-
*/
|
|
50
|
-
private parseBuyXGetYFreeAction;
|
|
51
|
-
/**
|
|
52
|
-
* 解析 商品奖励 Action
|
|
53
|
-
*/
|
|
54
|
-
private parseItemRewardAction;
|
|
55
|
-
/**
|
|
56
|
-
* 获取适用的商品列表
|
|
57
|
-
*
|
|
58
|
-
* 从购物车商品中筛选出符合策略条件的商品
|
|
59
|
-
*/
|
|
60
|
-
private getApplicableProducts;
|
|
61
|
-
/**
|
|
62
|
-
* 查找商品匹配规则
|
|
63
|
-
*/
|
|
64
|
-
private findProductMatchRule;
|
|
65
|
-
/**
|
|
66
|
-
* 检查商品是否匹配
|
|
67
|
-
*/
|
|
68
|
-
private isProductMatch;
|
|
69
|
-
}
|
|
70
|
-
export default PromotionAdapter;
|
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* X件Y元策略配置示例
|
|
3
|
-
*
|
|
4
|
-
* 业务规则:
|
|
5
|
-
* - 每X件商品固定价格Y元(可累计)
|
|
6
|
-
* - 支持跨商品组合(A+B可以凑成一组)
|
|
7
|
-
* - 买5件 = 2组优惠 + 1件原价
|
|
8
|
-
*
|
|
9
|
-
* 商品匹配规则:
|
|
10
|
-
* - product_variant_id = 0 表示匹配任意变体
|
|
11
|
-
* - product_variant_id != 0 表示精确匹配该变体
|
|
12
|
-
*/
|
|
13
|
-
export declare const X_ITEMS_FOR_Y_PRICE_STRATEGY: {
|
|
14
|
-
metadata: {
|
|
15
|
-
id: string;
|
|
16
|
-
name: {
|
|
17
|
-
en: string;
|
|
18
|
-
'zh-CN': string;
|
|
19
|
-
'zh-HK': string;
|
|
20
|
-
};
|
|
21
|
-
type: string;
|
|
22
|
-
custom: {
|
|
23
|
-
display: {
|
|
24
|
-
product_card: {
|
|
25
|
-
text: {
|
|
26
|
-
en: string;
|
|
27
|
-
'zh-CN': string;
|
|
28
|
-
'zh-HK': string;
|
|
29
|
-
};
|
|
30
|
-
type: string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
conditions: {
|
|
36
|
-
operator: string;
|
|
37
|
-
rules: ({
|
|
38
|
-
type: string;
|
|
39
|
-
field: string;
|
|
40
|
-
value: string;
|
|
41
|
-
operator: string;
|
|
42
|
-
} | {
|
|
43
|
-
type: string;
|
|
44
|
-
field: string;
|
|
45
|
-
value: {
|
|
46
|
-
product_id: number;
|
|
47
|
-
product_variant_id: number;
|
|
48
|
-
}[];
|
|
49
|
-
operator: string;
|
|
50
|
-
})[];
|
|
51
|
-
actionIds: string[];
|
|
52
|
-
};
|
|
53
|
-
actions: {
|
|
54
|
-
id: string;
|
|
55
|
-
type: string;
|
|
56
|
-
value: {
|
|
57
|
-
x: number;
|
|
58
|
-
price: number;
|
|
59
|
-
};
|
|
60
|
-
valueType: string;
|
|
61
|
-
target: string;
|
|
62
|
-
priority: number;
|
|
63
|
-
config: {
|
|
64
|
-
allowCrossProduct: boolean;
|
|
65
|
-
cumulative: boolean;
|
|
66
|
-
};
|
|
67
|
-
}[];
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* 买X送Y策略配置示例
|
|
71
|
-
*
|
|
72
|
-
* 业务规则:
|
|
73
|
-
* - 买X件送Y件(可累计:买2送2、买3送3...)
|
|
74
|
-
* - 赠品由用户从列表中选择
|
|
75
|
-
*
|
|
76
|
-
* 商品匹配规则:
|
|
77
|
-
* - product_variant_id = 0 表示匹配任意变体
|
|
78
|
-
* - product_variant_id != 0 表示精确匹配该变体
|
|
79
|
-
*/
|
|
80
|
-
export declare const BUY_X_GET_Y_FREE_STRATEGY: {
|
|
81
|
-
metadata: {
|
|
82
|
-
id: string;
|
|
83
|
-
name: {
|
|
84
|
-
en: string;
|
|
85
|
-
'zh-CN': string;
|
|
86
|
-
'zh-HK': string;
|
|
87
|
-
};
|
|
88
|
-
type: string;
|
|
89
|
-
custom: {
|
|
90
|
-
display: {
|
|
91
|
-
product_card: {
|
|
92
|
-
text: {
|
|
93
|
-
en: string;
|
|
94
|
-
'zh-CN': string;
|
|
95
|
-
'zh-HK': string;
|
|
96
|
-
};
|
|
97
|
-
type: string;
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
conditions: {
|
|
103
|
-
operator: string;
|
|
104
|
-
rules: ({
|
|
105
|
-
type: string;
|
|
106
|
-
field: string;
|
|
107
|
-
value: string;
|
|
108
|
-
operator: string;
|
|
109
|
-
} | {
|
|
110
|
-
type: string;
|
|
111
|
-
field: string;
|
|
112
|
-
value: {
|
|
113
|
-
product_id: number;
|
|
114
|
-
product_variant_id: number;
|
|
115
|
-
}[];
|
|
116
|
-
operator: string;
|
|
117
|
-
})[];
|
|
118
|
-
actionIds: string[];
|
|
119
|
-
};
|
|
120
|
-
actions: {
|
|
121
|
-
id: string;
|
|
122
|
-
type: string;
|
|
123
|
-
value: {
|
|
124
|
-
buyQuantity: number;
|
|
125
|
-
freeQuantity: number;
|
|
126
|
-
};
|
|
127
|
-
valueType: string;
|
|
128
|
-
target: string;
|
|
129
|
-
priority: number;
|
|
130
|
-
config: {
|
|
131
|
-
cumulative: boolean;
|
|
132
|
-
giftProducts: {
|
|
133
|
-
product_id: number;
|
|
134
|
-
product_variant_id: number;
|
|
135
|
-
}[];
|
|
136
|
-
};
|
|
137
|
-
}[];
|
|
138
|
-
};
|
|
139
|
-
/**
|
|
140
|
-
* ITEM_REWARD 策略配置示例:儿童票触发婴儿票免费
|
|
141
|
-
*
|
|
142
|
-
* 业务规则:
|
|
143
|
-
* - 条件商品:儿童票(conditions.rules.productIdAndVariantId)
|
|
144
|
-
* - 奖励商品:购物车/订单内已经存在的婴儿票(actions[0].config.rewardTargets)
|
|
145
|
-
* - 本 action 不自动新增婴儿票;每次购物车变更后由统一促销链路重算
|
|
146
|
-
*
|
|
147
|
-
* 字段说明:
|
|
148
|
-
* - type: "ITEM_REWARD" 表示商品奖励 action
|
|
149
|
-
* - target: "product" 表示本期只奖励商品行
|
|
150
|
-
* - config.rewardTargets: 奖励对象数组,支持 { product_id, product_variant_id }
|
|
151
|
-
* - config.targetSelection: "consumer_best" 表示目标商品超额时选择节省金额最高的商品
|
|
152
|
-
* - value.rewardMethod:
|
|
153
|
-
* - "free": 目标商品最终价为 0
|
|
154
|
-
* - "percent_off": 百分比折扣,rewardValue 为 0-100
|
|
155
|
-
* - "amount_off": 每个目标商品固定减免 rewardValue
|
|
156
|
-
* - "fixed_price": 目标商品最终单价为 rewardValue
|
|
157
|
-
* - value.quantityRule:
|
|
158
|
-
* - "per_condition_quantity": 每满足 triggerQuantity 个条件商品,奖励 rewardQuantity 个目标商品
|
|
159
|
-
* - "all_targets": 满足条件后奖励全部目标商品
|
|
160
|
-
* - "max_per_order": 满足条件后每单最多奖励 maxRewardQuantity 个目标商品
|
|
161
|
-
*/
|
|
162
|
-
export declare const ITEM_REWARD_STRATEGY: {
|
|
163
|
-
metadata: {
|
|
164
|
-
id: string;
|
|
165
|
-
name: {
|
|
166
|
-
en: string;
|
|
167
|
-
'zh-CN': string;
|
|
168
|
-
'zh-HK': string;
|
|
169
|
-
};
|
|
170
|
-
type: string;
|
|
171
|
-
custom: {
|
|
172
|
-
display: {
|
|
173
|
-
product_card: {
|
|
174
|
-
text: {
|
|
175
|
-
en: string;
|
|
176
|
-
'zh-CN': string;
|
|
177
|
-
'zh-HK': string;
|
|
178
|
-
};
|
|
179
|
-
type: string;
|
|
180
|
-
};
|
|
181
|
-
};
|
|
182
|
-
};
|
|
183
|
-
};
|
|
184
|
-
conditions: {
|
|
185
|
-
operator: string;
|
|
186
|
-
rules: ({
|
|
187
|
-
type: string;
|
|
188
|
-
field: string;
|
|
189
|
-
value: string;
|
|
190
|
-
operator: string;
|
|
191
|
-
} | {
|
|
192
|
-
type: string;
|
|
193
|
-
field: string;
|
|
194
|
-
value: {
|
|
195
|
-
product_id: number;
|
|
196
|
-
product_variant_id: number;
|
|
197
|
-
}[];
|
|
198
|
-
operator: string;
|
|
199
|
-
})[];
|
|
200
|
-
actionIds: string[];
|
|
201
|
-
};
|
|
202
|
-
actions: {
|
|
203
|
-
id: string;
|
|
204
|
-
type: string;
|
|
205
|
-
value: {
|
|
206
|
-
rewardMethod: string;
|
|
207
|
-
rewardValue: number;
|
|
208
|
-
quantityRule: string;
|
|
209
|
-
triggerQuantity: number;
|
|
210
|
-
rewardQuantity: number;
|
|
211
|
-
maxRewardQuantity: number;
|
|
212
|
-
};
|
|
213
|
-
valueType: string;
|
|
214
|
-
target: string;
|
|
215
|
-
priority: number;
|
|
216
|
-
config: {
|
|
217
|
-
rewardTargets: {
|
|
218
|
-
product_id: number;
|
|
219
|
-
product_variant_id: number;
|
|
220
|
-
}[];
|
|
221
|
-
targetSelection: string;
|
|
222
|
-
};
|
|
223
|
-
}[];
|
|
224
|
-
};
|