@pisell/pisellos 2.3.19 → 2.3.21

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.d.ts +1 -1
  4. package/dist/modules/Order/index.js +48 -31
  5. package/dist/modules/Order/types.d.ts +1 -0
  6. package/dist/modules/Order/utils.js +10 -2
  7. package/dist/modules/Product/index.d.ts +1 -1
  8. package/dist/server/index.d.ts +4 -0
  9. package/dist/server/index.js +392 -253
  10. package/dist/server/modules/order/types.d.ts +2 -0
  11. package/dist/server/modules/products/index.d.ts +5 -1
  12. package/dist/server/modules/products/index.js +383 -315
  13. package/dist/server/modules/products/types.d.ts +4 -0
  14. package/dist/solution/BaseSales/index.js +144 -127
  15. package/dist/solution/BaseSales/types.d.ts +2 -0
  16. package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +3 -1
  17. package/dist/solution/BookingByStep/index.d.ts +1 -1
  18. package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +5 -0
  19. package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +1 -0
  20. package/lib/modules/Order/index.d.ts +1 -1
  21. package/lib/modules/Order/index.js +34 -12
  22. package/lib/modules/Order/types.d.ts +1 -0
  23. package/lib/modules/Order/utils.js +10 -1
  24. package/lib/modules/Product/index.d.ts +1 -1
  25. package/lib/server/index.d.ts +4 -0
  26. package/lib/server/index.js +83 -2
  27. package/lib/server/modules/order/types.d.ts +2 -0
  28. package/lib/server/modules/products/index.d.ts +5 -1
  29. package/lib/server/modules/products/index.js +20 -0
  30. package/lib/server/modules/products/types.d.ts +4 -0
  31. package/lib/solution/BaseSales/index.js +40 -22
  32. package/lib/solution/BaseSales/types.d.ts +2 -0
  33. package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +2 -0
  34. package/lib/solution/BookingByStep/index.d.ts +1 -1
  35. package/package.json +1 -1
@@ -104,6 +104,8 @@ export interface OrderProductLineItem {
104
104
  num: number;
105
105
  /** 商品标题快照;本地待同步订单会补齐为多语言对象。 */
106
106
  product_title?: OrderProductTitleSnapshot | string | null;
107
+ /** 商品封面图 */
108
+ product_cover?: string | null;
107
109
  /** 多规格 ID。来源:Detail.product_variant_id */
108
110
  product_variant_id?: number;
109
111
  /**
@@ -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 会创建新对象