@pisell/pisellos 2.2.232 → 2.2.234

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.
Files changed (49) hide show
  1. package/dist/model/strategy/adapter/promotion/index.js +0 -9
  2. package/dist/modules/Order/index.d.ts +36 -1
  3. package/dist/modules/Order/index.js +496 -308
  4. package/dist/modules/Order/types.d.ts +11 -0
  5. package/dist/modules/Order/utils.d.ts +1 -0
  6. package/dist/modules/Order/utils.js +1 -1
  7. package/dist/server/index.d.ts +5 -0
  8. package/dist/server/index.js +855 -633
  9. package/dist/server/modules/order/index.d.ts +2 -0
  10. package/dist/server/modules/order/index.js +86 -32
  11. package/dist/solution/BaseSales/index.d.ts +6 -0
  12. package/dist/solution/BaseSales/index.js +240 -197
  13. package/dist/solution/BookingByStep/index.d.ts +1 -1
  14. package/dist/solution/BookingTicket/index.d.ts +38 -2
  15. package/dist/solution/BookingTicket/index.js +653 -323
  16. package/dist/solution/BookingTicket/types.d.ts +62 -0
  17. package/dist/solution/BookingTicket/types.js +30 -0
  18. package/dist/solution/BookingTicket/utils/addTimeAvailability.d.ts +35 -0
  19. package/dist/solution/BookingTicket/utils/addTimeAvailability.js +95 -0
  20. package/dist/solution/BookingTicket/utils/cartView.d.ts +9 -1
  21. package/dist/solution/BookingTicket/utils/cartView.js +76 -5
  22. package/dist/solution/BookingTicket/utils/exampleData.d.ts +123 -0
  23. package/dist/solution/BookingTicket/utils/exampleData.js +183 -0
  24. package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +9 -13
  25. package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.js +42 -33
  26. package/lib/modules/Order/index.d.ts +36 -1
  27. package/lib/modules/Order/index.js +98 -10
  28. package/lib/modules/Order/types.d.ts +11 -0
  29. package/lib/modules/Order/utils.d.ts +1 -0
  30. package/lib/modules/Order/utils.js +1 -1
  31. package/lib/server/index.d.ts +5 -0
  32. package/lib/server/index.js +224 -63
  33. package/lib/server/modules/order/index.d.ts +2 -0
  34. package/lib/server/modules/order/index.js +43 -1
  35. package/lib/solution/BaseSales/index.d.ts +6 -0
  36. package/lib/solution/BaseSales/index.js +20 -1
  37. package/lib/solution/BookingByStep/index.d.ts +1 -1
  38. package/lib/solution/BookingTicket/index.d.ts +38 -2
  39. package/lib/solution/BookingTicket/index.js +196 -4
  40. package/lib/solution/BookingTicket/types.d.ts +62 -0
  41. package/lib/solution/BookingTicket/utils/addTimeAvailability.d.ts +35 -0
  42. package/lib/solution/BookingTicket/utils/addTimeAvailability.js +125 -0
  43. package/lib/solution/BookingTicket/utils/cartView.d.ts +9 -1
  44. package/lib/solution/BookingTicket/utils/cartView.js +48 -2
  45. package/lib/solution/BookingTicket/utils/exampleData.d.ts +123 -0
  46. package/lib/solution/BookingTicket/utils/exampleData.js +0 -0
  47. package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +9 -13
  48. package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.js +41 -28
  49. package/package.json +1 -1
@@ -678,6 +678,17 @@ export interface OrderModuleAPI {
678
678
  smallTicketDataFlag?: number;
679
679
  enhancePayload?: SubmitPayloadEnhancer;
680
680
  }) => Promise<T>;
681
+ submitTempOrderAsync: <T = any>(params?: {
682
+ cacheId?: string;
683
+ platform?: string;
684
+ businessCode?: string;
685
+ channel?: string;
686
+ type?: string;
687
+ payments?: OrderPaymentSource[];
688
+ paymentStatus?: SubmitSalesOrderParams['query']['payment_status'];
689
+ smallTicketDataFlag?: number;
690
+ enhancePayload?: SubmitPayloadEnhancer;
691
+ }) => Promise<T>;
681
692
  getOrderPayments: () => OrderPaymentData[];
682
693
  setOrderPayments: (payments: OrderPaymentSource[]) => OrderPaymentData[];
683
694
  addOrderPayment: (payment: OrderPaymentSource) => OrderPaymentData[];
@@ -188,6 +188,7 @@ export declare function buildSubmitPayload(params: {
188
188
  channel?: string;
189
189
  type?: string;
190
190
  summary?: OrderSummary | null;
191
+ request_unique_idempotency_token?: string;
191
192
  enhance?: SubmitPayloadEnhancer;
192
193
  }): OrderSubmitPayload;
193
194
  export declare function mapPaymentItemToOrderPayment(paymentItem: OrderPaymentSource): OrderPaymentData;
@@ -845,7 +845,7 @@ export function buildSubmitPayload(params) {
845
845
  shop_order_number: (_tempOrder$shop_order = tempOrder.shop_order_number) !== null && _tempOrder$shop_order !== void 0 ? _tempOrder$shop_order : null,
846
846
  shop_full_order_number: (_tempOrder$shop_full_ = tempOrder.shop_full_order_number) !== null && _tempOrder$shop_full_ !== void 0 ? _tempOrder$shop_full_ : null,
847
847
  platform: normalizeSubmitPlatform(platform),
848
- request_unique_idempotency_token: tempOrder.request_unique_idempotency_token || "".concat(tempOrder.external_sale_number, "_").concat(now.getTime()),
848
+ request_unique_idempotency_token: (params === null || params === void 0 ? void 0 : params.request_unique_idempotency_token) || tempOrder.request_unique_idempotency_token || "".concat(tempOrder.external_sale_number, "_").concat(now.getTime()),
849
849
  type: submitType,
850
850
  business_code: businessCode !== null && businessCode !== void 0 ? businessCode : tempOrder.business_code,
851
851
  sales_channel: tempOrder.sales_channel || 'my_pisel',
@@ -95,6 +95,9 @@ declare class Server {
95
95
  }[]>;
96
96
  private registerDeviceTaskActions;
97
97
  private handleSyncSalesTask;
98
+ private runCheckoutSync;
99
+ private omitCheckoutSyncMode;
100
+ private persistSyncedCheckoutOrder;
98
101
  /**
99
102
  * 将普通层 QuotationModule 的报价单计算能力桥接到 Server Products 模块。
100
103
  */
@@ -401,6 +404,7 @@ declare class Server {
401
404
  private getLocalPrintOrderLookup;
402
405
  private handleLocalPrintOrder;
403
406
  private handleOrderCheckoutSubmit;
407
+ private handleSyncCheckoutSubmit;
404
408
  private handlePendingSyncCheckoutOrder;
405
409
  private buildPendingSyncCheckoutOrder;
406
410
  private shouldBuildSmallTicketData;
@@ -455,6 +459,7 @@ declare class Server {
455
459
  private buildSyncedOrderForPrint;
456
460
  private isMergeableCheckoutOrder;
457
461
  private normalizeCheckoutResponse;
462
+ private withSyncedOrderIdInCheckoutResponse;
458
463
  private isCheckoutResponseRejected;
459
464
  private getUnknownErrorMessage;
460
465
  private normalizeUnknownError;