@pisell/pisellos 0.10.63 → 0.10.65
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 +0 -9
- package/dist/modules/Order/index.d.ts +6 -1
- package/dist/modules/Order/index.js +564 -475
- package/dist/modules/Order/types.d.ts +2 -0
- package/dist/modules/Order/utils/discountProductLineIdentity.js +2 -2
- package/dist/modules/Order/utils/productVoucherGroups.d.ts +15 -0
- package/dist/modules/Order/utils/productVoucherGroups.js +115 -0
- package/dist/modules/Rules/index.d.ts +2 -0
- package/dist/modules/Rules/index.js +29 -21
- package/dist/solution/BaseSales/index.d.ts +8 -1
- package/dist/solution/BaseSales/index.js +53 -41
- package/dist/solution/BookingTicket/index.js +36 -11
- package/dist/solution/BookingTicket/types.d.ts +2 -0
- package/lib/modules/Order/index.d.ts +6 -1
- package/lib/modules/Order/index.js +49 -6
- package/lib/modules/Order/types.d.ts +2 -0
- package/lib/modules/Order/utils/discountProductLineIdentity.js +1 -1
- package/lib/modules/Order/utils/productVoucherGroups.d.ts +15 -0
- package/lib/modules/Order/utils/productVoucherGroups.js +64 -0
- package/lib/modules/Rules/index.d.ts +2 -0
- package/lib/modules/Rules/index.js +6 -0
- package/lib/solution/BaseSales/index.d.ts +8 -1
- package/lib/solution/BaseSales/index.js +9 -2
- package/lib/solution/BookingTicket/index.js +14 -0
- package/lib/solution/BookingTicket/types.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,9 +0,0 @@
|
|
|
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";
|
|
@@ -4,6 +4,7 @@ import { OrderModuleAPI, CommitOrderParams, UpdateOrderBookingParams, UpdateOrde
|
|
|
4
4
|
import { CartItem } from '../Cart/types';
|
|
5
5
|
import { type SubmitPayloadEnhancer } from './utils';
|
|
6
6
|
import { type PickupTimingBooking, type PickupTimingBookingInput } from './pickupTiming';
|
|
7
|
+
import { type ProductVoucherGroup } from './utils/productVoucherGroups';
|
|
7
8
|
import type { OrderAmountSnapshot, AddProductBookingInput, AddProductToOrderOptions, OrderIdentitySnapshot, OrderPaymentSource, OrderSnapshot, OrderSyncState, SyncPaymentsToOrderParams, SyncPaymentsToOrderResult, SubmitSalesOrderParams, OrderProduct, OrderProductIdentity, OrderSummary, OrderTempOrder, OrderPaymentData, OrderPaymentUpdateOptions, OrderPaymentUpdateResult, SendCustomerPayLinkParams, UpdateTempOrderCustomerInput, OrderCustomerPatch, OrderCustomerView, OrderHooksConfig, OrderCartIntentCommitContext, ReplaceTempOrderOptions, OrderPromotionEvaluator, OrderGiftSelectResolver, OrderUnfulfilledPromotion, OrderLastGiftActions, RemoveProductsFromOrderOptions, SalesNote, SalesNotesMutationSnapshot, SetSalesNoteInput, PickupReferenceMode, PointCardSnapshotMergeContext, PointCardSnapshotItem, ShopServiceData, ShopServiceType } from './types';
|
|
8
9
|
import type { ICustomer } from '../AccountList/types';
|
|
9
10
|
import type { Discount } from '../Discount/types';
|
|
@@ -94,6 +95,8 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
94
95
|
*/
|
|
95
96
|
private logError;
|
|
96
97
|
private registerDiscountModules;
|
|
98
|
+
setProductVoucherGroups(groups: ProductVoucherGroup[]): void;
|
|
99
|
+
validateProductVoucherSelection(): void;
|
|
97
100
|
private createDefaultRulesHooks;
|
|
98
101
|
/**
|
|
99
102
|
* Stable across notifyTempOrderChanged's immutable copy, but changes when a
|
|
@@ -112,7 +115,9 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
112
115
|
getCustomerWalletPrepareConfigEpoch(): number;
|
|
113
116
|
private syncScannedDiscountsToOriginalDiscountList;
|
|
114
117
|
private ensureEditDiscountConfigForProductChange;
|
|
115
|
-
scanCode(code: string, customerId?: number
|
|
118
|
+
scanCode(code: string, customerId?: number, options?: {
|
|
119
|
+
productVouchersOnly?: boolean;
|
|
120
|
+
}): Promise<{
|
|
116
121
|
isAvailable: boolean;
|
|
117
122
|
isAccepted?: boolean;
|
|
118
123
|
discountList: Discount[];
|