@pisell/pisellos 2.2.130 → 2.2.132

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.
@@ -1,9 +0,0 @@
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 } from "./examples";
@@ -19,7 +19,7 @@ interface PackageSubItemUsageRules {
19
19
  type: 'universal_discount' | 'package_exclusive' | 'single_item_promo' | 'custom_usage_rules';
20
20
  rules: ("original_price" | "markup_price")[];
21
21
  package_scope?: {
22
- type: 'all_packages' | 'specific_packages';
22
+ type: 'all_packages' | 'specific_packages' | 'product_all' | 'products';
23
23
  exclude_bundle_product_ids: number[];
24
24
  include_bundle_product_ids: number[];
25
25
  filter: 0 | 1;
@@ -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
  }
@@ -2006,8 +2006,8 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
2006
2006
  // 套餐适用范围校验
2007
2007
  var isScopeValid = false;
2008
2008
 
2009
- // 排除套餐判断
2010
- if (scopeType === 'all_packages') {
2009
+ // 排除套餐判断, product_all值兼容旧数据
2010
+ if (scopeType === 'all_packages' || scopeType === 'product_all') {
2011
2011
  // 所有套餐可用
2012
2012
  if (!filter) {
2013
2013
  isScopeValid = true;
@@ -2016,8 +2016,8 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
2016
2016
  }
2017
2017
  }
2018
2018
 
2019
- // 包含套餐判断
2020
- if (scopeType === 'specific_packages') {
2019
+ // 包含套餐判断, products值兼容旧数据
2020
+ if (scopeType === 'specific_packages' || scopeType === 'products') {
2021
2021
  isScopeValid = include_bundle_product_ids.includes(Number(mainProductId));
2022
2022
  }
2023
2023
 
@@ -166,6 +166,11 @@ declare class Server {
166
166
  * 存储订阅者信息,便于数据变更时推送最新结果
167
167
  */
168
168
  private handleProductQuery;
169
+ /**
170
+ * 按商品 id 查询单条(GET /shop/product/query/:productId)
171
+ * schedule_date 必填:query 或 data;schedule_datetime 可选。不走订阅。
172
+ */
173
+ private handleProductQueryById;
169
174
  /**
170
175
  * 取消商品查询订阅(HTTP 路由入口)
171
176
  */