@pisell/pisellos 2.3.132 → 2.3.134
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/model/strategy/adapter/promotion/index.js +9 -0
- package/dist/modules/Order/index.d.ts +1 -1
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/VenueBooking/index.d.ts +15 -2
- package/dist/solution/VenueBooking/index.js +1036 -760
- package/dist/solution/VenueBooking/types.d.ts +2 -1
- package/dist/solution/VenueBooking/types.js +1 -0
- package/dist/solution/VenueBooking/utils/dateSummary.d.ts +1 -0
- package/dist/solution/VenueBooking/utils/dateSummary.js +7 -4
- package/dist/solution/VenueBooking/utils/smartPricing.d.ts +71 -0
- package/dist/solution/VenueBooking/utils/smartPricing.js +273 -0
- package/dist/solution/VenueBooking/utils/timeSlot.d.ts +1 -0
- package/dist/solution/VenueBooking/utils/timeSlot.js +6 -3
- package/lib/model/strategy/adapter/promotion/index.js +46 -1
- package/lib/modules/Order/index.d.ts +1 -1
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/VenueBooking/index.d.ts +15 -2
- package/lib/solution/VenueBooking/index.js +234 -88
- package/lib/solution/VenueBooking/types.d.ts +2 -1
- package/lib/solution/VenueBooking/types.js +1 -0
- package/lib/solution/VenueBooking/utils/dateSummary.d.ts +1 -0
- package/lib/solution/VenueBooking/utils/dateSummary.js +7 -4
- package/lib/solution/VenueBooking/utils/smartPricing.d.ts +71 -0
- package/lib/solution/VenueBooking/utils/smartPricing.js +224 -0
- package/lib/solution/VenueBooking/utils/timeSlot.d.ts +1 -0
- package/lib/solution/VenueBooking/utils/timeSlot.js +5 -2
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// 导出评估器
|
|
2
|
+
export { PromotionEvaluator } from "./evaluator";
|
|
3
|
+
|
|
4
|
+
// 导出适配器
|
|
5
|
+
export { PromotionAdapter } from "./adapter";
|
|
6
|
+
export { default } from "./adapter";
|
|
7
|
+
|
|
8
|
+
// 导出策略配置示例常量
|
|
9
|
+
export { X_ITEMS_FOR_Y_PRICE_STRATEGY, BUY_X_GET_Y_FREE_STRATEGY, ITEM_REWARD_STRATEGY } from "./examples";
|
|
@@ -592,7 +592,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
592
592
|
generateIdempotencyToken(): string;
|
|
593
593
|
syncPaymentsToOrder<T = any>(params: SyncPaymentsToOrderParams): Promise<SyncPaymentsToOrderResult<T>>;
|
|
594
594
|
createOrder(params: CommitOrderParams['query']): {
|
|
595
|
-
type: "
|
|
595
|
+
type: "appointment_booking" | "virtual";
|
|
596
596
|
platform: string;
|
|
597
597
|
sales_channel: string;
|
|
598
598
|
order_sales_channel: string;
|
|
@@ -326,7 +326,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
326
326
|
date: string;
|
|
327
327
|
status: string;
|
|
328
328
|
week: string;
|
|
329
|
-
weekNum: 0 |
|
|
329
|
+
weekNum: 0 | 2 | 1 | 3 | 4 | 5 | 6;
|
|
330
330
|
}[]>;
|
|
331
331
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
332
332
|
private getScheduleDataByIds;
|
|
@@ -41,6 +41,11 @@ export declare class VenueBookingImpl extends BaseSalesImpl implements Module {
|
|
|
41
41
|
private customerLoginRefreshIdInFlight;
|
|
42
42
|
private loadAllProductsInFlight;
|
|
43
43
|
private productsLoaded;
|
|
44
|
+
private smartPricingCustomerId;
|
|
45
|
+
private smartPricingProductCatalog;
|
|
46
|
+
private slotPriceMapCache;
|
|
47
|
+
private slotPriceStrategyConfigs;
|
|
48
|
+
private slotPriceScheduleList;
|
|
44
49
|
private loadOpenDataConfigInFlight;
|
|
45
50
|
private static readonly OPEN_DATA_CACHE_TTL;
|
|
46
51
|
private getLoggerContext;
|
|
@@ -69,7 +74,7 @@ export declare class VenueBookingImpl extends BaseSalesImpl implements Module {
|
|
|
69
74
|
private clearLoginEffectListeners;
|
|
70
75
|
private registerLoginEffect;
|
|
71
76
|
private registerCustomerLoginListeners;
|
|
72
|
-
private
|
|
77
|
+
private refreshOrderMarketingForCustomer;
|
|
73
78
|
initialize(core: PisellCore, options?: ModuleOptions): Promise<void>;
|
|
74
79
|
destroy(): Promise<void>;
|
|
75
80
|
retryInit(): Promise<void>;
|
|
@@ -82,6 +87,11 @@ export declare class VenueBookingImpl extends BaseSalesImpl implements Module {
|
|
|
82
87
|
passed: boolean | null;
|
|
83
88
|
failures: QuantityCheckResult[];
|
|
84
89
|
};
|
|
90
|
+
private resolveCustomerIdForSmartPricing;
|
|
91
|
+
private buildSmartPricingContext;
|
|
92
|
+
private buildSlotPriceMapForDate;
|
|
93
|
+
/** 规则或客户上下文更新后,同步商品展示、已选时段和订单汇总。 */
|
|
94
|
+
refreshSmartPricing(): Promise<void>;
|
|
85
95
|
loadAllProducts(): Promise<{
|
|
86
96
|
venueProducts: ProductData[];
|
|
87
97
|
addonProducts: ProductData[];
|
|
@@ -167,7 +177,10 @@ export declare class VenueBookingImpl extends BaseSalesImpl implements Module {
|
|
|
167
177
|
onCustomerLogin(params: {
|
|
168
178
|
customerId: number;
|
|
169
179
|
}): Promise<void>;
|
|
170
|
-
|
|
180
|
+
/** 宿主退出登录或以匿名身份重新进入时,清理客户资产并恢复匿名价格。 */
|
|
181
|
+
onCustomerLogout(): Promise<void>;
|
|
182
|
+
private recalculateOrderPricesFromSmartPricing;
|
|
183
|
+
private resetProductPriceForSmartPricing;
|
|
171
184
|
scanCode(code: string, customerId?: number): Promise<{
|
|
172
185
|
isAvailable: boolean;
|
|
173
186
|
isAccepted?: boolean | undefined;
|