@pisell/pisellos 2.2.233 → 2.2.235
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 +36 -1
- package/dist/modules/Order/index.js +496 -308
- package/dist/modules/Order/types.d.ts +11 -0
- package/dist/modules/Order/utils.d.ts +1 -0
- package/dist/modules/Order/utils.js +1 -1
- package/dist/server/index.d.ts +5 -0
- package/dist/server/index.js +855 -633
- package/dist/server/modules/order/index.d.ts +2 -0
- package/dist/server/modules/order/index.js +86 -32
- package/dist/solution/BaseSales/index.d.ts +6 -0
- package/dist/solution/BaseSales/index.js +240 -197
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts +40 -1
- package/dist/solution/BookingTicket/index.js +674 -314
- package/dist/solution/BookingTicket/types.d.ts +62 -0
- package/dist/solution/BookingTicket/types.js +30 -0
- package/dist/solution/BookingTicket/utils/addTimeAvailability.d.ts +35 -0
- package/dist/solution/BookingTicket/utils/addTimeAvailability.js +95 -0
- package/dist/solution/BookingTicket/utils/cartView.d.ts +9 -1
- package/dist/solution/BookingTicket/utils/cartView.js +76 -5
- package/dist/solution/BookingTicket/utils/exampleData.d.ts +123 -0
- package/dist/solution/BookingTicket/utils/exampleData.js +183 -0
- package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +9 -13
- package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.js +42 -33
- package/lib/modules/Order/index.d.ts +36 -1
- package/lib/modules/Order/index.js +98 -10
- package/lib/modules/Order/types.d.ts +11 -0
- package/lib/modules/Order/utils.d.ts +1 -0
- package/lib/modules/Order/utils.js +1 -1
- package/lib/server/index.d.ts +5 -0
- package/lib/server/index.js +224 -63
- package/lib/server/modules/order/index.d.ts +2 -0
- package/lib/server/modules/order/index.js +43 -1
- package/lib/solution/BaseSales/index.d.ts +6 -0
- package/lib/solution/BaseSales/index.js +20 -1
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.d.ts +40 -1
- package/lib/solution/BookingTicket/index.js +201 -4
- package/lib/solution/BookingTicket/types.d.ts +62 -0
- package/lib/solution/BookingTicket/utils/addTimeAvailability.d.ts +35 -0
- package/lib/solution/BookingTicket/utils/addTimeAvailability.js +125 -0
- package/lib/solution/BookingTicket/utils/cartView.d.ts +9 -1
- package/lib/solution/BookingTicket/utils/cartView.js +48 -2
- package/lib/solution/BookingTicket/utils/exampleData.d.ts +123 -0
- package/lib/solution/BookingTicket/utils/exampleData.js +0 -0
- package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +9 -13
- package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.js +41 -28
- package/package.json +1 -1
|
@@ -296,6 +296,13 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
296
296
|
updateVoucherOrderPayments(payments: OrderPaymentSource[]): OrderPaymentData[];
|
|
297
297
|
private shouldMergeProductToOrder;
|
|
298
298
|
private hasOrderProductLineNote;
|
|
299
|
+
/**
|
|
300
|
+
* 判断商品行是否显式绑定了 booking。
|
|
301
|
+
*
|
|
302
|
+
* @example
|
|
303
|
+
* this.hasLinkedBookingUid({ metadata: { booking_uid: 'booking-1' } });
|
|
304
|
+
*/
|
|
305
|
+
private hasLinkedBookingUid;
|
|
299
306
|
/**
|
|
300
307
|
* 预约商品加车后的统一收尾:促销、折扣、summary 重算与持久化(批量拆行时只调用一次)。
|
|
301
308
|
*
|
|
@@ -319,6 +326,21 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
319
326
|
* // → tempOrder.products 新增 3 行,每行 num=1,bookings 3 条
|
|
320
327
|
*/
|
|
321
328
|
addProductToOrder(product: Partial<OrderProduct> & OrderProductIdentity, booking?: AddProductBookingInput): Promise<OrderProduct[]>;
|
|
329
|
+
/**
|
|
330
|
+
* 批量添加商品行,所有行追加完成后只触发一次促销、折扣、summary 重算与持久化。
|
|
331
|
+
*
|
|
332
|
+
* @example
|
|
333
|
+
* await order.addProductsToOrder([
|
|
334
|
+
* { product: { product_id: 1, product_variant_id: 0, num: 1 } },
|
|
335
|
+
* { product: { product_id: 2, product_variant_id: 0, num: 1 } },
|
|
336
|
+
* ]);
|
|
337
|
+
*/
|
|
338
|
+
addProductsToOrder(items: Array<{
|
|
339
|
+
product: Partial<OrderProduct> & OrderProductIdentity;
|
|
340
|
+
booking?: AddProductBookingInput;
|
|
341
|
+
}>, options?: {
|
|
342
|
+
skipEditDiscountConfigRefresh?: boolean;
|
|
343
|
+
}): Promise<OrderProduct[]>;
|
|
322
344
|
private hasGoodPassDiscount;
|
|
323
345
|
private getBundleRuntimeIdentity;
|
|
324
346
|
private preservePersistedBundlePriceFields;
|
|
@@ -371,6 +393,18 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
371
393
|
smallTicketDataFlag?: number;
|
|
372
394
|
enhancePayload?: SubmitPayloadEnhancer;
|
|
373
395
|
}): Promise<T>;
|
|
396
|
+
submitTempOrderAsync<T = any>(params?: {
|
|
397
|
+
cacheId?: string;
|
|
398
|
+
platform?: string;
|
|
399
|
+
businessCode?: string;
|
|
400
|
+
channel?: string;
|
|
401
|
+
type?: string;
|
|
402
|
+
payments?: OrderPaymentSource[];
|
|
403
|
+
paymentStatus?: SubmitSalesOrderParams['query']['payment_status'];
|
|
404
|
+
smallTicketDataFlag?: number;
|
|
405
|
+
enhancePayload?: SubmitPayloadEnhancer;
|
|
406
|
+
}): Promise<T>;
|
|
407
|
+
private runSubmitTempOrder;
|
|
374
408
|
private markLocalOrderSynced;
|
|
375
409
|
private applyRemoteOrderNumbersToTempOrder;
|
|
376
410
|
private isSubmitResponseRejected;
|
|
@@ -378,9 +412,10 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
378
412
|
private isSubmitErrorResponse;
|
|
379
413
|
private extractSubmitErrorResponse;
|
|
380
414
|
private logSubmitBackendRejected;
|
|
415
|
+
generateIdempotencyToken(): string;
|
|
381
416
|
syncPaymentsToOrder<T = any>(params: SyncPaymentsToOrderParams): Promise<SyncPaymentsToOrderResult<T>>;
|
|
382
417
|
createOrder(params: CommitOrderParams['query']): {
|
|
383
|
-
type: "
|
|
418
|
+
type: "appointment_booking" | "virtual";
|
|
384
419
|
platform: string;
|
|
385
420
|
sales_channel: string;
|
|
386
421
|
order_sales_channel: string;
|