@pisell/pisellos 0.0.569 → 0.0.571

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 (109) hide show
  1. package/dist/effects/index.d.ts +2 -2
  2. package/dist/model/strategy/adapter/dataVariant/type.d.ts +3 -3
  3. package/dist/model/strategy/adapter/itemRule/type.d.ts +6 -6
  4. package/dist/model/strategy/adapter/promotion/type.d.ts +5 -5
  5. package/dist/model/strategy/type.d.ts +1 -1
  6. package/dist/modules/BookingContext/types.d.ts +4 -4
  7. package/dist/modules/BookingContext/utils/resourceErrors.d.ts +1 -1
  8. package/dist/modules/Customer/types.d.ts +1 -1
  9. package/dist/modules/Discount/types.d.ts +1 -1
  10. package/dist/modules/Holder/types.d.ts +1 -1
  11. package/dist/modules/OpenData/types.d.ts +1 -1
  12. package/dist/modules/Order/types.d.ts +5 -5
  13. package/dist/modules/Order/utils/bundleDiscountHydration.d.ts +1 -1
  14. package/dist/modules/Order/utils/orderCollectionIdentity.d.ts +1 -1
  15. package/dist/modules/Order/utils.d.ts +1 -1
  16. package/dist/modules/Payment/types.d.ts +7 -7
  17. package/dist/modules/Product/index.d.ts +1 -1
  18. package/dist/modules/ResourcePlanner/types.d.ts +4 -4
  19. package/dist/modules/Rules/index.js +2 -1
  20. package/dist/modules/Rules/types.d.ts +2 -2
  21. package/dist/modules/ScanOrderLogger/types.d.ts +2 -2
  22. package/dist/modules/Schedule/getDateIsInSchedule.d.ts +1 -1
  23. package/dist/modules/Schedule/type.d.ts +7 -7
  24. package/dist/modules/Schedule/types.d.ts +9 -9
  25. package/dist/plugins/app.d.ts +1 -1
  26. package/dist/plugins/request.d.ts +2 -2
  27. package/dist/server/modules/floor-plan/types.d.ts +1 -1
  28. package/dist/server/modules/menu/types.d.ts +1 -1
  29. package/dist/server/modules/order/types.d.ts +16 -16
  30. package/dist/server/modules/products/types.d.ts +1 -1
  31. package/dist/server/modules/resource/types.d.ts +1 -1
  32. package/dist/server/modules/schedule/utils.d.ts +1 -1
  33. package/dist/server/types.d.ts +4 -4
  34. package/dist/server/utils/small-ticket.d.ts +1 -1
  35. package/dist/solution/BaseSales/index.d.ts +1 -1
  36. package/dist/solution/BaseSales/types.d.ts +7 -7
  37. package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +1 -1
  38. package/dist/solution/BookingByStep/index.d.ts +1 -1
  39. package/dist/solution/BookingByStep/utils/resources.d.ts +1 -1
  40. package/dist/solution/BookingTicket/index.d.ts +1 -13
  41. package/dist/solution/BookingTicket/types.d.ts +3 -3
  42. package/dist/solution/BookingTicket/utils/addProductDecision.d.ts +1 -1
  43. package/dist/solution/BookingTicket/utils/bookingStatus.d.ts +1 -1
  44. package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +1 -1
  45. package/dist/solution/Sales/types.d.ts +4 -4
  46. package/dist/solution/ScanOrder/types.d.ts +5 -5
  47. package/dist/solution/ShopDiscount/types.d.ts +1 -1
  48. package/dist/solution/ShopDiscount/utils.d.ts +2 -2
  49. package/dist/solution/UnifiedBookingSales/types.d.ts +1 -1
  50. package/dist/solution/VenueBooking/types.d.ts +1 -1
  51. package/dist/types/index.d.ts +1 -1
  52. package/dist/utils/task.d.ts +2 -2
  53. package/dist/utils/watch.d.ts +2 -2
  54. package/lib/effects/index.d.ts +2 -2
  55. package/lib/model/strategy/adapter/dataVariant/type.d.ts +3 -3
  56. package/lib/model/strategy/adapter/itemRule/type.d.ts +6 -6
  57. package/lib/model/strategy/adapter/promotion/type.d.ts +5 -5
  58. package/lib/model/strategy/type.d.ts +1 -1
  59. package/lib/modules/BookingContext/types.d.ts +4 -4
  60. package/lib/modules/BookingContext/utils/resourceErrors.d.ts +1 -1
  61. package/lib/modules/Customer/types.d.ts +1 -1
  62. package/lib/modules/Discount/types.d.ts +1 -1
  63. package/lib/modules/Holder/types.d.ts +1 -1
  64. package/lib/modules/OpenData/types.d.ts +1 -1
  65. package/lib/modules/Order/types.d.ts +5 -5
  66. package/lib/modules/Order/utils/bundleDiscountHydration.d.ts +1 -1
  67. package/lib/modules/Order/utils/orderCollectionIdentity.d.ts +1 -1
  68. package/lib/modules/Order/utils.d.ts +1 -1
  69. package/lib/modules/Payment/types.d.ts +7 -7
  70. package/lib/modules/Product/index.d.ts +1 -1
  71. package/lib/modules/ResourcePlanner/types.d.ts +4 -4
  72. package/lib/modules/Rules/index.js +1 -1
  73. package/lib/modules/Rules/types.d.ts +2 -2
  74. package/lib/modules/ScanOrderLogger/types.d.ts +2 -2
  75. package/lib/modules/Schedule/getDateIsInSchedule.d.ts +1 -1
  76. package/lib/modules/Schedule/type.d.ts +7 -7
  77. package/lib/modules/Schedule/types.d.ts +9 -9
  78. package/lib/plugins/app.d.ts +1 -1
  79. package/lib/plugins/request.d.ts +2 -2
  80. package/lib/server/modules/floor-plan/types.d.ts +1 -1
  81. package/lib/server/modules/menu/types.d.ts +1 -1
  82. package/lib/server/modules/order/types.d.ts +16 -16
  83. package/lib/server/modules/products/types.d.ts +1 -1
  84. package/lib/server/modules/resource/types.d.ts +1 -1
  85. package/lib/server/modules/schedule/utils.d.ts +1 -1
  86. package/lib/server/types.d.ts +4 -4
  87. package/lib/server/utils/small-ticket.d.ts +1 -1
  88. package/lib/solution/BaseSales/index.d.ts +1 -1
  89. package/lib/solution/BaseSales/types.d.ts +7 -7
  90. package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +1 -1
  91. package/lib/solution/BookingByStep/index.d.ts +1 -1
  92. package/lib/solution/BookingByStep/utils/resources.d.ts +1 -1
  93. package/lib/solution/BookingTicket/index.d.ts +1 -13
  94. package/lib/solution/BookingTicket/types.d.ts +3 -3
  95. package/lib/solution/BookingTicket/utils/addProductDecision.d.ts +1 -1
  96. package/lib/solution/BookingTicket/utils/bookingStatus.d.ts +1 -1
  97. package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +1 -1
  98. package/lib/solution/Sales/types.d.ts +4 -4
  99. package/lib/solution/ScanOrder/types.d.ts +5 -5
  100. package/lib/solution/ShopDiscount/types.d.ts +1 -1
  101. package/lib/solution/ShopDiscount/utils.d.ts +2 -2
  102. package/lib/solution/UnifiedBookingSales/types.d.ts +1 -1
  103. package/lib/solution/VenueBooking/types.d.ts +1 -1
  104. package/lib/types/index.d.ts +1 -1
  105. package/lib/utils/task.d.ts +2 -2
  106. package/lib/utils/watch.d.ts +2 -2
  107. package/package.json +18 -19
  108. package/dist/model/strategy/adapter/promotion/index.d.ts +0 -4
  109. package/lib/model/strategy/adapter/promotion/index.d.ts +0 -4
@@ -10,8 +10,8 @@ export declare enum ScanOrderHooks {
10
10
  onRefresh = "scanOrder:onRefresh",
11
11
  onCartValidationChanged = "scanOrder:onCartValidationChanged"
12
12
  }
13
- export type ScanOrderStatus = 'idle' | 'initializing' | 'ready' | 'error';
14
- export type ScanOrderEntryContext = {
13
+ export declare type ScanOrderStatus = 'idle' | 'initializing' | 'ready' | 'error';
14
+ export declare type ScanOrderEntryContext = {
15
15
  biz: string;
16
16
  mode: 'scan' | 'append';
17
17
  resourceId?: string;
@@ -208,7 +208,7 @@ export interface ScanOrderSubmitPayload extends Omit<ScanOrderTempOrder, 'platfo
208
208
  }>;
209
209
  products: ScanOrderSubmitProduct[];
210
210
  }
211
- export type ScanOrderAvailabilityMode = 'idle' | 'shop_closed' | 'submit_disabled' | 'resource_busy' | 'multiple_orders' | 'additional_order_with_code' | 'additional_order';
211
+ export declare type ScanOrderAvailabilityMode = 'idle' | 'shop_closed' | 'submit_disabled' | 'resource_busy' | 'multiple_orders' | 'additional_order_with_code' | 'additional_order';
212
212
  export interface ScanOrderTableFormRecord {
213
213
  policy?: string | null;
214
214
  partyroom_booking?: string | null;
@@ -267,7 +267,7 @@ export interface ScanOrderResourceOccupyDetailApiResponse {
267
267
  occupy_details?: ScanOrderResourceOccupyDetail[] | null;
268
268
  } | null;
269
269
  }
270
- export type ScanOrderResourceSelectType = 'single' | 'multiple' | 'capacity';
270
+ export declare type ScanOrderResourceSelectType = 'single' | 'multiple' | 'capacity';
271
271
  export interface ScanOrderReservationResourceSelectInfo {
272
272
  resourceSelectType?: ScanOrderResourceSelectType;
273
273
  isSingleReservation: boolean;
@@ -277,7 +277,7 @@ export interface ScanOrderReservationResourceSelectInfo {
277
277
  export interface ScanOrderAllowAddItemsInfo {
278
278
  enabled: boolean;
279
279
  }
280
- export type ScanOrderSyncAdditionalOrderReason = 'missing_resource_id' | 'no_order' | 'multiple_orders' | 'add_items_disabled' | 'invalid_order_id';
280
+ export declare type ScanOrderSyncAdditionalOrderReason = 'missing_resource_id' | 'no_order' | 'multiple_orders' | 'add_items_disabled' | 'invalid_order_id';
281
281
  export interface ScanOrderSyncAdditionalOrderResult {
282
282
  matched: boolean;
283
283
  order_id?: string;
@@ -11,7 +11,7 @@ export declare enum ShopDiscountHooks {
11
11
  onRulesListChange = "shopDiscount:onRulesListChange",
12
12
  onLoadPrepareCalcResult = "shopDiscount:onLoadPrepareCalcResult"
13
13
  }
14
- export type Customer = {
14
+ export declare type Customer = {
15
15
  id: string | number;
16
16
  name: string;
17
17
  email: string;
@@ -21,13 +21,13 @@ export declare const isAllNormalProduct: (items: any[]) => boolean;
21
21
  * @returns
22
22
  */
23
23
  export declare const getDiscountAmount: (discount: Discount, total: number, price: number) => number;
24
- export declare const getDiscountListAmountTotal: (discount: Discount[]) => any;
24
+ export declare const getDiscountListAmountTotal: (discount: Discount[]) => Discount;
25
25
  /**
26
26
  * 获取折扣金额 计算每个折扣的金额
27
27
  * @param discount
28
28
  * @returns
29
29
  */
30
- export declare const getDiscountListAmount: (discount: Discount[]) => any;
30
+ export declare const getDiscountListAmount: (discount: Discount[]) => Discount;
31
31
  export interface ScheduleItem {
32
32
  id: number;
33
33
  name: string | {
@@ -55,7 +55,7 @@ export interface UnifiedBookingSalesStagePlannerProductsParams {
55
55
  rawProducts?: Record<string, any>[];
56
56
  }
57
57
  /** Ordinary retail product staging. No resource, time, or booking facts are required. */
58
- export type UnifiedBookingSalesStageRetailProductsParams = UnifiedBookingSalesStagePlannerProductsParams;
58
+ export declare type UnifiedBookingSalesStageRetailProductsParams = UnifiedBookingSalesStagePlannerProductsParams;
59
59
  /** Adds one ordinary retail product without replacing other retail lines already in the cart. */
60
60
  export interface UnifiedBookingSalesAddRetailProductParams {
61
61
  /** Prefer a supplied catalog record when the UI has already loaded it. */
@@ -11,7 +11,7 @@ export declare enum VenueBookingHooks {
11
11
  /** 登录客户的智能定价、营销配置与订单汇总已完成刷新 */
12
12
  onSmartPricingUpdated = "venueBooking:onSmartPricingUpdated"
13
13
  }
14
- export type VenueBookingStatus = 'idle' | 'initializing' | 'ready' | 'error';
14
+ export declare type VenueBookingStatus = 'idle' | 'initializing' | 'ready' | 'error';
15
15
  export interface VenueBookingEntryContext {
16
16
  biz: string;
17
17
  venueId?: string;
@@ -38,7 +38,7 @@ export interface ModuleOptions {
38
38
  initialState?: Record<string, any>;
39
39
  otherParams?: Record<string, any>;
40
40
  }
41
- export type EventHandler = (data?: any) => void;
41
+ export declare type EventHandler = (data?: any) => void;
42
42
  export interface PisellCore {
43
43
  registerPlugin: (plugin: Plugin, options?: PluginOptions) => void;
44
44
  getPlugin: <T extends Plugin>(name: string) => T | null;
@@ -1,5 +1,5 @@
1
- type Action = (...args: any[]) => Promise<any>;
2
- type Task = {
1
+ declare type Action = (...args: any[]) => Promise<any>;
2
+ declare type Task = {
3
3
  uuid: string;
4
4
  type: string;
5
5
  actionParams?: Record<string, any>;
@@ -2,8 +2,8 @@
2
2
  * 监听模块
3
3
  *
4
4
  */
5
- export type WatchEventCallback = (...args: any[]) => void;
6
- export type WatchEventItem = {
5
+ export declare type WatchEventCallback = (...args: any[]) => void;
6
+ export declare type WatchEventItem = {
7
7
  key: string;
8
8
  callback: WatchEventCallback;
9
9
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "0.0.569",
4
+ "version": "0.0.571",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -9,23 +9,6 @@
9
9
  "dist",
10
10
  "lib"
11
11
  ],
12
- "scripts": {
13
- "build": "father build",
14
- "dev": "father dev --watch",
15
- "push": "yalc push --replace",
16
- "test": "vitest",
17
- "lint": "eslint src --ext .ts",
18
- "format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md}\"",
19
- "changeset": "changeset",
20
- "version": "changeset version",
21
- "release": "changeset publish && npm run sync && git push",
22
- "example": "npx parcel-bundler examples/index.html",
23
- "docs": "typedoc --out docs src/index.ts",
24
- "sync": "node sync.js",
25
- "prepublishOnly": "npm run build",
26
- "deploy": "npm run build && npm run changeset && npm run version && npm run release",
27
- "deploy:ci": "npm run build && npm run version && changeset publish --registry=https://registry.npmjs.com/ && npm run sync"
28
- },
29
12
  "repository": {
30
13
  "type": "git",
31
14
  "url": "git+https://github.com/username/pisell-os.git"
@@ -70,5 +53,21 @@
70
53
  },
71
54
  "publishConfig": {
72
55
  "access": "public"
56
+ },
57
+ "scripts": {
58
+ "build": "father build",
59
+ "dev": "father dev --watch",
60
+ "push": "yalc push --replace",
61
+ "test": "vitest",
62
+ "lint": "eslint src --ext .ts",
63
+ "format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md}\"",
64
+ "changeset": "changeset",
65
+ "version": "changeset version",
66
+ "release": "changeset publish && npm run sync && git push",
67
+ "example": "npx parcel-bundler examples/index.html",
68
+ "docs": "typedoc --out docs src/index.ts",
69
+ "sync": "node sync.js",
70
+ "deploy": "npm run build && npm run changeset && npm run version && npm run release",
71
+ "deploy:ci": "npm run build && npm run version && changeset publish --registry=https://registry.npmjs.com/ && npm run sync"
73
72
  }
74
- }
73
+ }
@@ -1,4 +0,0 @@
1
- export { PromotionEvaluator } from './evaluator';
2
- export { PromotionAdapter } from './adapter';
3
- export { default } from './adapter';
4
- export { X_ITEMS_FOR_Y_PRICE_STRATEGY, BUY_X_GET_Y_FREE_STRATEGY, } from './examples';
@@ -1,4 +0,0 @@
1
- export { PromotionEvaluator } from './evaluator';
2
- export { PromotionAdapter } from './adapter';
3
- export { default } from './adapter';
4
- export { X_ITEMS_FOR_Y_PRICE_STRATEGY, BUY_X_GET_Y_FREE_STRATEGY, } from './examples';