@pisell/pisellos 0.10.62 → 0.10.63

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.
@@ -0,0 +1,9 @@
1
+ // 导出评估器
2
+ export { PromotionEvaluator } from "./evaluator";
3
+
4
+ // 导出适配器
5
+ export { PromotionAdapter } from "./adapter";
6
+ export { default } from "./adapter";
7
+
8
+ // 导出策略配置示例常量
9
+ export { X_ITEMS_FOR_Y_PRICE_STRATEGY, BUY_X_GET_Y_FREE_STRATEGY, ITEM_REWARD_STRATEGY } from "./examples";
@@ -49,5 +49,5 @@ export declare class Product extends BaseModule implements Module {
49
49
  getCategories(): ProductCategory[];
50
50
  setOtherParams(key: string, value: any): void;
51
51
  getOtherParams(): any;
52
- getProductType(): "duration" | "session" | "normal";
52
+ getProductType(): "normal" | "duration" | "session";
53
53
  }
@@ -373,7 +373,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
373
373
  };
374
374
  setOtherData(key: string, value: any): void;
375
375
  getOtherData(key: string): any;
376
- getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
376
+ getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
377
377
  /**
378
378
  * 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
379
379
  *
@@ -465,7 +465,19 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
465
465
  * 加车两阶段主决策(规格弹窗 / 资源编辑 / 直接加车)。
466
466
  * 与 ticketBooking `handleSelectProduct` + `handleBooking4Service` 等价。
467
467
  */
468
- decideAddProduct(item: any, options?: Partial<AddProductDecideContext>): import("./utils/addProductDecision").AddProductDecision;
468
+ decideAddProduct(item: any, options?: Partial<AddProductDecideContext>): {
469
+ action: "reloadCatalog";
470
+ } | {
471
+ action: "add";
472
+ cacheItem: any;
473
+ } | {
474
+ action: "requiresDetail";
475
+ payload: AddProductRequiresDetailPayload;
476
+ } | {
477
+ action: "requiresBookingEdit";
478
+ cacheItem: any;
479
+ payload: import("./utils/addProductDecision").AddProductRequiresBookingEditPayload;
480
+ };
469
481
  /** 规格弹窗 callback 后的第二段决策。 */
470
482
  decideAfterDetail(cacheItem: any, options?: Partial<AddProductDecideContext>): import("./utils/addProductDecision").AddProductDecision;
471
483
  /**
@@ -49,5 +49,5 @@ export declare class Product extends BaseModule implements Module {
49
49
  getCategories(): ProductCategory[];
50
50
  setOtherParams(key: string, value: any): void;
51
51
  getOtherParams(): any;
52
- getProductType(): "duration" | "session" | "normal";
52
+ getProductType(): "normal" | "duration" | "session";
53
53
  }
@@ -373,7 +373,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
373
373
  };
374
374
  setOtherData(key: string, value: any): void;
375
375
  getOtherData(key: string): any;
376
- getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
376
+ getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
377
377
  /**
378
378
  * 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
379
379
  *
@@ -465,7 +465,19 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
465
465
  * 加车两阶段主决策(规格弹窗 / 资源编辑 / 直接加车)。
466
466
  * 与 ticketBooking `handleSelectProduct` + `handleBooking4Service` 等价。
467
467
  */
468
- decideAddProduct(item: any, options?: Partial<AddProductDecideContext>): import("./utils/addProductDecision").AddProductDecision;
468
+ decideAddProduct(item: any, options?: Partial<AddProductDecideContext>): {
469
+ action: "reloadCatalog";
470
+ } | {
471
+ action: "add";
472
+ cacheItem: any;
473
+ } | {
474
+ action: "requiresDetail";
475
+ payload: AddProductRequiresDetailPayload;
476
+ } | {
477
+ action: "requiresBookingEdit";
478
+ cacheItem: any;
479
+ payload: import("./utils/addProductDecision").AddProductRequiresBookingEditPayload;
480
+ };
469
481
  /** 规格弹窗 callback 后的第二段决策。 */
470
482
  decideAfterDetail(cacheItem: any, options?: Partial<AddProductDecideContext>): import("./utils/addProductDecision").AddProductDecision;
471
483
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "0.10.62",
4
+ "version": "0.10.63",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",