@pisell/pisellos 2.3.20 → 2.3.22

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 (35) hide show
  1. package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +16 -10
  2. package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +2 -1
  3. package/dist/modules/Order/index.js +17 -7
  4. package/dist/modules/Order/types.d.ts +1 -0
  5. package/dist/modules/Order/utils.js +16 -4
  6. package/dist/server/index.d.ts +5 -0
  7. package/dist/server/index.js +428 -255
  8. package/dist/server/modules/order/types.d.ts +4 -0
  9. package/dist/server/modules/products/index.d.ts +5 -1
  10. package/dist/server/modules/products/index.js +383 -315
  11. package/dist/server/modules/products/types.d.ts +4 -0
  12. package/dist/solution/BaseSales/index.d.ts +10 -0
  13. package/dist/solution/BaseSales/index.js +503 -428
  14. package/dist/solution/BaseSales/types.d.ts +6 -1
  15. package/dist/solution/BaseSales/types.js +1 -1
  16. package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +14 -1
  17. package/dist/solution/BookingTicket/index.js +42 -24
  18. package/lib/model/strategy/adapter/promotion/index.js +49 -0
  19. package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +5 -0
  20. package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +1 -0
  21. package/lib/modules/Order/index.js +22 -7
  22. package/lib/modules/Order/types.d.ts +1 -0
  23. package/lib/modules/Order/utils.js +17 -3
  24. package/lib/server/index.d.ts +5 -0
  25. package/lib/server/index.js +121 -2
  26. package/lib/server/modules/order/types.d.ts +4 -0
  27. package/lib/server/modules/products/index.d.ts +5 -1
  28. package/lib/server/modules/products/index.js +20 -0
  29. package/lib/server/modules/products/types.d.ts +4 -0
  30. package/lib/solution/BaseSales/index.d.ts +10 -0
  31. package/lib/solution/BaseSales/index.js +66 -23
  32. package/lib/solution/BaseSales/types.d.ts +6 -1
  33. package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +8 -0
  34. package/lib/solution/BookingTicket/index.js +15 -7
  35. package/package.json +1 -1
@@ -63,6 +63,8 @@ export interface OrderProductBundleItem {
63
63
  bundle_group_id?: number;
64
64
  /** 套餐商品 ID */
65
65
  bundle_id?: number;
66
+ /** 套餐子商品封面图 */
67
+ cover?: string | null;
66
68
  /** 套餐商品规格 ID */
67
69
  bundle_variant_id?: number;
68
70
  /** 数量 */
@@ -104,6 +106,8 @@ export interface OrderProductLineItem {
104
106
  num: number;
105
107
  /** 商品标题快照;本地待同步订单会补齐为多语言对象。 */
106
108
  product_title?: OrderProductTitleSnapshot | string | null;
109
+ /** 商品封面图 */
110
+ product_cover?: string | null;
107
111
  /** 多规格 ID。来源:Detail.product_variant_id */
108
112
  product_variant_id?: number;
109
113
  /**
@@ -2,7 +2,7 @@ import { Module, PisellCore } from '../../../types';
2
2
  import { BaseModule } from '../../../modules/BaseModule';
3
3
  import { ProductData } from '../../../modules/Product/types';
4
4
  import type { RouteDefinition } from '../../types';
5
- import { ProductIdScope, ProductFormatter, ProductFormatterContext } from './types';
5
+ import { ProductIdScope, type ProductSnapshot, ProductFormatter, ProductFormatterContext } from './types';
6
6
  /**
7
7
  * Products 模块 - 用于获取和管理完整的商品详细数据
8
8
  * 相比 ProductList 模块,Products 会获取所有详细信息并缓存
@@ -185,6 +185,10 @@ export declare class ProductsModule extends BaseModule implements Module {
185
185
  * 获取商品列表(深拷贝,供外部安全使用)
186
186
  */
187
187
  getProducts(): Promise<ProductData[]>;
188
+ /**
189
+ * 批量获取商品轻量快照,供订单详情等响应补齐展示协议字段。
190
+ */
191
+ getProductSnapshotsByIds(ids: number[]): Promise<Record<string, ProductSnapshot>>;
188
192
  /**
189
193
  * 内部获取商品列表的直接引用(无拷贝)
190
194
  * 仅供内部 formatter 流程使用,因为 formatter 会创建新对象