@pisell/pisellos 0.10.71 → 0.10.72
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 +13 -4
- package/dist/modules/Order/index.js +1401 -764
- package/dist/modules/Order/types.d.ts +24 -1
- package/dist/modules/Order/types.js +4 -0
- package/dist/server/index.js +5 -2
- package/dist/solution/BaseSales/index.d.ts +2 -2
- package/dist/solution/BaseSales/index.js +8 -8
- package/dist/solution/UnifiedBookingSales/index.d.ts +15 -0
- package/dist/solution/UnifiedBookingSales/index.js +1082 -596
- package/dist/solution/UnifiedBookingSales/types.d.ts +17 -1
- package/lib/modules/Order/index.d.ts +13 -4
- package/lib/modules/Order/index.js +284 -24
- package/lib/modules/Order/types.d.ts +24 -1
- package/lib/modules/Order/types.js +2 -0
- package/lib/server/index.js +5 -1
- package/lib/solution/BaseSales/index.d.ts +2 -2
- package/lib/solution/BaseSales/index.js +2 -2
- package/lib/solution/UnifiedBookingSales/index.d.ts +15 -0
- package/lib/solution/UnifiedBookingSales/index.js +343 -44
- package/lib/solution/UnifiedBookingSales/types.d.ts +17 -1
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Module, PisellCore, ModuleOptions } from '../../types';
|
|
2
2
|
import { BaseModule } from '../BaseModule';
|
|
3
|
-
import { OrderModuleAPI, CommitOrderParams, UpdateOrderBookingParams, UpdateOrderProductParams, UpdateOrderProductQuantityParams, CancelOrderParams, ChangeBookingStatusParams, CheckoutOrderParams } from './types';
|
|
3
|
+
import { OrderModuleAPI, CommitOrderParams, UpdateOrderBookingParams, UpdateOrderProductParams, UpdateOrderProductsOptions, UpdateOrderProductQuantityParams, CancelOrderParams, ChangeBookingStatusParams, CheckoutOrderParams } from './types';
|
|
4
4
|
import { CartItem } from '../Cart/types';
|
|
5
5
|
import { type SubmitPayloadEnhancer } from './utils';
|
|
6
6
|
import { type PickupTimingBooking, type PickupTimingBookingInput } from './pickupTiming';
|
|
7
7
|
import { type ProductVoucherGroup } from './utils/productVoucherGroups';
|
|
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
|
+
import type { OrderAmountSnapshot, AddProductBookingInput, AddProductToOrderOptions, ReplaceBookingProductWithRelatedRetailParams, 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';
|
|
9
9
|
import type { ICustomer } from '../AccountList/types';
|
|
10
10
|
import type { Discount } from '../Discount/types';
|
|
11
11
|
import { UnavailableReason } from '../Rules/types';
|
|
@@ -347,6 +347,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
347
347
|
private applyOrderProductsDepositSummary;
|
|
348
348
|
recalculateSummary(options?: {
|
|
349
349
|
createIfMissing?: boolean;
|
|
350
|
+
isCurrentOrder?: () => boolean;
|
|
350
351
|
}): Promise<OrderSummary | null>;
|
|
351
352
|
getOrderSummary(): Promise<OrderSummary>;
|
|
352
353
|
updateTempOrderNote(note: string): string;
|
|
@@ -497,6 +498,13 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
497
498
|
*/
|
|
498
499
|
addProductToOrder(product: Partial<OrderProduct> & OrderProductIdentity, booking?: AddProductBookingInput, options?: AddProductToOrderOptions): Promise<OrderProduct[]>;
|
|
499
500
|
private addProductToOrderDraft;
|
|
501
|
+
/**
|
|
502
|
+
* Replaces one local Party booking and its confirmed children on a detached draft.
|
|
503
|
+
* All fallible preparation precedes a guarded synchronous publication; never rolls
|
|
504
|
+
* an old whole-order snapshot over concurrent edits or a newly selected order.
|
|
505
|
+
*/
|
|
506
|
+
replaceBookingProductWithRelatedRetail(params: ReplaceBookingProductWithRelatedRetailParams): Promise<OrderProduct[]>;
|
|
507
|
+
private replaceBookingProductWithRelatedRetailDraft;
|
|
500
508
|
/**
|
|
501
509
|
* 批量添加商品行,所有行追加完成后只触发一次促销、折扣、summary 重算与持久化。
|
|
502
510
|
*
|
|
@@ -525,8 +533,9 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
525
533
|
private applyOrderProductUpdateToTempOrder;
|
|
526
534
|
updateOrderProduct(params: UpdateOrderProductParams): Promise<OrderProduct[]>;
|
|
527
535
|
private updateOrderProductDraft;
|
|
528
|
-
updateOrderProducts(paramsList: UpdateOrderProductParams[]): Promise<OrderProduct[]>;
|
|
536
|
+
updateOrderProducts(paramsList: UpdateOrderProductParams[], options?: UpdateOrderProductsOptions): Promise<OrderProduct[]>;
|
|
529
537
|
private updateOrderProductsDraft;
|
|
538
|
+
private updateOrderProductsGuarded;
|
|
530
539
|
updateOrderProductQuantity(params: UpdateOrderProductQuantityParams): Promise<OrderProduct[]>;
|
|
531
540
|
private updateOrderProductQuantityDraft;
|
|
532
541
|
updateOrderBooking(params: UpdateOrderBookingParams): any[];
|
|
@@ -692,6 +701,6 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
692
701
|
getOrderInfo(order_id: number): Promise<any>;
|
|
693
702
|
getVouchers(): any[];
|
|
694
703
|
}
|
|
695
|
-
export type { OrderHolderRelation, AddProductToOrderOptions, OrderMetaList, PointCardSnapshotItem, VirtualCurrencySnapshotItem, RemoveProductsFromOrderOptions, SalesNote, SalesNoteDraftInput, SalesNoteLocalizedSelection, SalesNoteLocalizedText, SalesNoteRelation, SalesNoteTextInput, SetSalesNoteInput, UpdateOrderBookingParams, UpdateOrderProductParams, UpdateOrderProductQuantityParams, } from './types';
|
|
704
|
+
export type { OrderHolderRelation, AddProductToOrderOptions, OrderMetaList, PointCardSnapshotItem, VirtualCurrencySnapshotItem, RemoveProductsFromOrderOptions, SalesNote, SalesNoteDraftInput, SalesNoteLocalizedSelection, SalesNoteLocalizedText, SalesNoteRelation, SalesNoteTextInput, SetSalesNoteInput, UpdateOrderBookingParams, UpdateOrderProductParams, UpdateOrderProductsOptions, UpdateOrderProductQuantityParams, } from './types';
|
|
696
705
|
export { isFulfillmentTimingBooking } from './pickupTiming';
|
|
697
706
|
export type { PickupTimingBooking, PickupTimingBookingInput, PickupTimingBookingMetadata, PickupTimingSelectionMode, PickupTimingSource, } from './pickupTiming';
|