@pisell/pisellos 0.0.507 → 0.0.508

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.
@@ -86,7 +86,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
86
86
  enhancePayload?: SubmitPayloadEnhancer;
87
87
  }): Promise<T>;
88
88
  createOrder(params: CommitOrderParams['query']): {
89
- type: "appointment_booking" | "virtual";
89
+ type: "virtual" | "appointment_booking";
90
90
  platform: string;
91
91
  sales_channel: string;
92
92
  order_sales_channel: string;
@@ -311,7 +311,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
311
311
  date: string;
312
312
  status: string;
313
313
  week: string;
314
- weekNum: 0 | 2 | 1 | 3 | 5 | 4 | 6;
314
+ weekNum: 0 | 1 | 2 | 3 | 4 | 5 | 6;
315
315
  }[]>;
316
316
  submitTimeSlot(timeSlots: TimeSliceItem): void;
317
317
  private getScheduleDataByIds;
@@ -131,7 +131,7 @@ export declare class BookingTicketImpl extends BaseModule implements Module {
131
131
  * 获取当前的客户搜索条件
132
132
  * @returns 当前搜索条件
133
133
  */
134
- getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "skip" | "num">;
134
+ getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
135
135
  /**
136
136
  * 获取客户列表状态(包含滚动加载相关状态)
137
137
  * @returns 客户状态
@@ -1,6 +1,7 @@
1
1
  import { Module, ModuleOptions, PisellCore } from '../../types';
2
2
  import { BaseModule } from '../../modules/BaseModule';
3
- import { ScanOrderAddLogParams, ScanOrderAvailabilityInfo, ScanOrderOrderProduct, ScanOrderOrderProductIdentity } from './types';
3
+ import { ScanOrderAddLogParams, ScanOrderAvailabilityInfo, ScanOrderOrderProduct, ScanOrderOrderProductIdentity, ScanOrderScanCodeResult } from './types';
4
+ import type { Discount } from '../../modules/Discount/types';
4
5
  import { type CartItemSummary, type PaxInfo, type QuantityCheckResult, type QuantityLimitResult } from '../../model/strategy/adapter/itemRule';
5
6
  import type { StrategyConfig } from '../../model/strategy/type';
6
7
  export * from './types';
@@ -29,6 +30,10 @@ export declare class ScanOrderImpl extends BaseModule implements Module {
29
30
  private itemRuleRuntimeConfig;
30
31
  /** 最近一次 checkResourceAvailable 从预约规则 link 拉取的商品快照 */
31
32
  private enabledReservationRuleProducts;
33
+ private loginEffectDisposers;
34
+ private customerLoginRefreshInFlight;
35
+ private customerLoginRefreshIdInFlight;
36
+ private static readonly PISELL1_LOGIN_SUCCESS;
32
37
  private getScanOrderLoggerContext;
33
38
  private serializeError;
34
39
  private addScanOrderLog;
@@ -36,6 +41,12 @@ export declare class ScanOrderImpl extends BaseModule implements Module {
36
41
  private logMethodSuccess;
37
42
  private logMethodError;
38
43
  addLog(params: ScanOrderAddLogParams): Promise<void>;
44
+ private normalizeCustomerId;
45
+ private resolveCustomerIdFromLoginPayload;
46
+ private clearLoginEffectListeners;
47
+ private registerLoginEffect;
48
+ private registerCustomerLoginListeners;
49
+ private refreshOrderMarketingAfterLogin;
39
50
  constructor(name?: string, version?: string);
40
51
  initialize(core: PisellCore, options?: ModuleOptions): Promise<void>;
41
52
  destroy(): Promise<void>;
@@ -62,6 +73,15 @@ export declare class ScanOrderImpl extends BaseModule implements Module {
62
73
  restoreOrder(): Promise<import("./types").ScanOrderTempOrder>;
63
74
  getOrderProducts(): ScanOrderOrderProduct[];
64
75
  getSummary(): Promise<import("./types").ScanOrderSummary>;
76
+ getDiscountList(): Discount[];
77
+ scanCode(code: string, customerId?: number): Promise<ScanOrderScanCodeResult>;
78
+ setDiscountSelected(params: {
79
+ discountId: number;
80
+ isSelected: boolean;
81
+ }): Promise<void>;
82
+ onCustomerLogin(params: {
83
+ customerId: number;
84
+ }): Promise<void>;
65
85
  private buildSubmitPayloadEnhancer;
66
86
  submitScanOrder<T = any>(): Promise<T>;
67
87
  addProductToOrder(product: Partial<ScanOrderOrderProduct> & ScanOrderOrderProductIdentity): Promise<ScanOrderOrderProduct[]>;