@pisell/pisellos 2.3.7 → 2.3.8
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/Order/index.d.ts +18 -2
- package/dist/modules/Order/index.js +252 -115
- package/dist/modules/Order/types.d.ts +15 -2
- package/dist/modules/Order/utils/bundleDiscountHydration.d.ts +5 -0
- package/dist/modules/Order/utils/bundleDiscountHydration.js +144 -0
- package/dist/modules/Order/utils.js +83 -28
- package/dist/solution/BaseSales/index.d.ts +8 -1
- package/dist/solution/BaseSales/index.js +86 -52
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/lib/model/strategy/adapter/promotion/index.js +49 -0
- package/lib/modules/Order/index.d.ts +18 -2
- package/lib/modules/Order/index.js +179 -27
- package/lib/modules/Order/types.d.ts +15 -2
- package/lib/modules/Order/utils/bundleDiscountHydration.d.ts +5 -0
- package/lib/modules/Order/utils/bundleDiscountHydration.js +139 -0
- package/lib/modules/Order/utils.js +45 -2
- package/lib/solution/BaseSales/index.d.ts +8 -1
- package/lib/solution/BaseSales/index.js +38 -9
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -312,13 +312,27 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
312
312
|
updateOrderPayment(paymentIdentity: string | number, updates: Partial<OrderPaymentData> & Record<string, any>): OrderPaymentData[];
|
|
313
313
|
/** 从当前订单支付项中移除指定支付项。 */
|
|
314
314
|
deleteOrderPayment(paymentIdentity: string | number): OrderPaymentData[];
|
|
315
|
+
private confirmPendingVoucherPaymentsInList;
|
|
316
|
+
private discardPendingVoucherPaymentsFromList;
|
|
317
|
+
private prepareVoucherPaymentsForSubmit;
|
|
318
|
+
private applyPaymentLifecycleChange;
|
|
319
|
+
confirmPendingVoucherPayments(options?: {
|
|
320
|
+
persist?: boolean;
|
|
321
|
+
recalculateSummary?: boolean;
|
|
322
|
+
}): OrderPaymentData[];
|
|
323
|
+
discardPendingVoucherPayments(options?: {
|
|
324
|
+
persist?: boolean;
|
|
325
|
+
recalculateSummary?: boolean;
|
|
326
|
+
}): OrderPaymentData[];
|
|
315
327
|
/**
|
|
316
328
|
* 覆盖当前订单中的 wallet pass 支付项。
|
|
317
329
|
*
|
|
318
330
|
* 判断口径与 PaymentModal 保持一致:voucher_id 存在且不为 0 的支付项
|
|
319
331
|
* 视为 wallet pass;其它支付项保持不变。
|
|
320
332
|
*/
|
|
321
|
-
updateVoucherOrderPayments(payments: OrderPaymentSource[]
|
|
333
|
+
updateVoucherOrderPayments(payments: OrderPaymentSource[], options?: {
|
|
334
|
+
status?: 'paid' | 'payment_pending';
|
|
335
|
+
}): OrderPaymentData[];
|
|
322
336
|
private shouldMergeProductToOrder;
|
|
323
337
|
private hasOrderProductLineNote;
|
|
324
338
|
/**
|
|
@@ -418,6 +432,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
418
432
|
payments?: OrderPaymentSource[];
|
|
419
433
|
paymentStatus?: SubmitSalesOrderParams['query']['payment_status'];
|
|
420
434
|
smallTicketDataFlag?: number;
|
|
435
|
+
confirmPendingVoucherPayments?: boolean;
|
|
421
436
|
enhancePayload?: SubmitPayloadEnhancer;
|
|
422
437
|
}): Promise<T>;
|
|
423
438
|
submitTempOrderAsync<T = any>(params?: {
|
|
@@ -429,6 +444,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
429
444
|
payments?: OrderPaymentSource[];
|
|
430
445
|
paymentStatus?: SubmitSalesOrderParams['query']['payment_status'];
|
|
431
446
|
smallTicketDataFlag?: number;
|
|
447
|
+
confirmPendingVoucherPayments?: boolean;
|
|
432
448
|
enhancePayload?: SubmitPayloadEnhancer;
|
|
433
449
|
}): Promise<T>;
|
|
434
450
|
private runSubmitTempOrder;
|
|
@@ -442,7 +458,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
442
458
|
generateIdempotencyToken(): string;
|
|
443
459
|
syncPaymentsToOrder<T = any>(params: SyncPaymentsToOrderParams): Promise<SyncPaymentsToOrderResult<T>>;
|
|
444
460
|
createOrder(params: CommitOrderParams['query']): {
|
|
445
|
-
type: "
|
|
461
|
+
type: "appointment_booking" | "virtual";
|
|
446
462
|
platform: string;
|
|
447
463
|
sales_channel: string;
|
|
448
464
|
order_sales_channel: string;
|