@pisell/pisellos 0.10.76 → 0.10.78

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 (212) hide show
  1. package/dist/apis/picoding.d.ts +0 -0
  2. package/dist/effects/index.d.ts +19 -0
  3. package/dist/model/strategy/adapter/dataVariant/adapter.d.ts +50 -0
  4. package/dist/model/strategy/adapter/dataVariant/evaluator.d.ts +105 -0
  5. package/dist/model/strategy/adapter/dataVariant/examples.d.ts +39 -0
  6. package/dist/model/strategy/adapter/dataVariant/index.d.ts +4 -0
  7. package/dist/model/strategy/adapter/dataVariant/type.d.ts +173 -0
  8. package/dist/model/strategy/adapter/promotion/adapter.d.ts +70 -0
  9. package/dist/model/strategy/adapter/promotion/examples.d.ts +224 -0
  10. package/dist/model/strategy/adapter/promotion/index.js +0 -9
  11. package/dist/model/strategy/adapter/promotion/type.d.ts +535 -0
  12. package/dist/model/strategy/adapter/type.d.ts +28 -0
  13. package/dist/model/strategy/adapter/walletPass/index.d.ts +32 -0
  14. package/dist/model/strategy/adapter/walletPass/locales.d.ts +1 -0
  15. package/dist/model/strategy/adapter/walletPass/type.d.ts +192 -0
  16. package/dist/model/strategy/adapter/walletPass/utils.d.ts +50 -0
  17. package/dist/model/strategy/engine.d.ts +119 -0
  18. package/dist/model/strategy/type.d.ts +245 -0
  19. package/dist/modules/Account/types.d.ts +56 -0
  20. package/dist/modules/BookingContext/types.d.ts +104 -0
  21. package/dist/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +76 -0
  22. package/dist/modules/BookingContext/utils/flexible.d.ts +28 -0
  23. package/dist/modules/BookingContext/utils/formatResourceList.d.ts +8 -0
  24. package/dist/modules/BookingContext/utils/noResource.d.ts +13 -0
  25. package/dist/modules/BookingContext/utils/orderLineDisplay.d.ts +1 -0
  26. package/dist/modules/BookingContext/utils/resourceErrors.d.ts +41 -0
  27. package/dist/modules/BookingContext/utils/resourceSelection.d.ts +7 -0
  28. package/dist/modules/BookingContext/utils/serviceTimes.d.ts +55 -0
  29. package/dist/modules/BookingContext/utils/timeSlices.d.ts +42 -0
  30. package/dist/modules/Customer/constants.d.ts +7 -0
  31. package/dist/modules/Date/types.d.ts +84 -0
  32. package/dist/modules/Date/utils.d.ts +36 -0
  33. package/dist/modules/FulfillmentTiming/index.d.ts +11 -0
  34. package/dist/modules/FulfillmentTiming/types.d.ts +67 -0
  35. package/dist/modules/Order/payment-utils.d.ts +26 -0
  36. package/dist/modules/Order/pickupTiming.d.ts +46 -0
  37. package/dist/modules/Order/utils/manualProductDiscount.d.ts +106 -0
  38. package/dist/modules/Order/utils/orderCollectionIdentity.d.ts +68 -0
  39. package/dist/modules/Order/utils/weighedProduct.d.ts +12 -0
  40. package/dist/modules/Payment/cashRecommendationAlgorithm.d.ts +21 -0
  41. package/dist/modules/Payment/mx51.d.ts +0 -0
  42. package/dist/modules/Payment/types.d.ts +943 -0
  43. package/dist/modules/Payment/utils.d.ts +19 -0
  44. package/dist/modules/Product/index.d.ts +1 -1
  45. package/dist/modules/ProductList/index.d.ts +2 -0
  46. package/dist/modules/ProductList/index.js +125 -39
  47. package/dist/modules/Quotation/types.d.ts +61 -0
  48. package/dist/modules/Resource/types.d.ts +50 -0
  49. package/dist/modules/Resource/utils.d.ts +23 -0
  50. package/dist/modules/ResourcePlanner/localClock.d.ts +33 -0
  51. package/dist/modules/ResourcePlanner/planner.js +5 -0
  52. package/dist/modules/SalesSummary/types.d.ts +69 -0
  53. package/dist/modules/ScanOrderLogger/providers/feishu.d.ts +2 -0
  54. package/dist/modules/ScanOrderLogger/providers/grafana.d.ts +2 -0
  55. package/dist/modules/ScanOrderLogger/types.d.ts +53 -0
  56. package/dist/modules/Schedule/getDateIsInSchedule.d.ts +32 -0
  57. package/dist/modules/Schedule/type.d.ts +157 -0
  58. package/dist/modules/Schedule/types.d.ts +201 -0
  59. package/dist/modules/Schedule/utils.d.ts +67 -0
  60. package/dist/modules/Step/tyeps.d.ts +20 -0
  61. package/dist/modules/SurchargeList/types.d.ts +15 -0
  62. package/dist/plugins/app.d.ts +10 -0
  63. package/dist/plugins/shopStore.d.ts +4 -0
  64. package/dist/plugins/user.d.ts +7 -0
  65. package/dist/server/modules/floor-plan/types.d.ts +43 -0
  66. package/dist/server/modules/menu/types.d.ts +68 -0
  67. package/dist/server/modules/payment/types.d.ts +9 -0
  68. package/dist/server/modules/quotation/types.d.ts +50 -0
  69. package/dist/server/modules/resource/types.d.ts +121 -0
  70. package/dist/server/modules/schedule/types.d.ts +1 -0
  71. package/dist/server/modules/schedule/utils.d.ts +32 -0
  72. package/dist/server/types.d.ts +66 -0
  73. package/dist/server/utils/index.d.ts +5 -0
  74. package/dist/server/utils/schedule.d.ts +14 -0
  75. package/dist/server/utils/time.d.ts +18 -0
  76. package/dist/solution/BaseSales/index.d.ts +12 -1
  77. package/dist/solution/BaseSales/index.js +275 -185
  78. package/dist/solution/BookingByStep/index.d.ts +2 -2
  79. package/dist/solution/BookingTicket/index.d.ts +1 -13
  80. package/dist/solution/BookingTicket/utils/bookingStatus.d.ts +77 -0
  81. package/dist/solution/BookingTicket/utils/exampleData.d.ts +123 -0
  82. package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +185 -0
  83. package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +38 -0
  84. package/dist/solution/BookingTicket/utils/scan/scanCache.d.ts +78 -0
  85. package/dist/solution/BookingTicket/utils/scan/scanProductValues.d.ts +21 -0
  86. package/dist/solution/BookingTicket/utils/weighingProductSku.d.ts +5 -0
  87. package/dist/solution/PlaceOrder/index.d.ts +0 -0
  88. package/dist/solution/RegisterAndLogin/config.d.ts +93 -0
  89. package/dist/solution/RegisterAndLogin/types.d.ts +445 -0
  90. package/dist/solution/RegisterAndLogin/utils.d.ts +103 -0
  91. package/dist/solution/UnifiedBookingSales/index.d.ts +23 -1
  92. package/dist/solution/UnifiedBookingSales/index.js +1367 -646
  93. package/dist/solution/UnifiedBookingSales/remoteOccupancyCache.d.ts +2 -0
  94. package/dist/solution/UnifiedBookingSales/remoteOccupancyCache.js +4 -0
  95. package/dist/solution/UnifiedBookingSales/sessionResourceCache.d.ts +27 -0
  96. package/dist/solution/UnifiedBookingSales/sessionResourceCache.js +271 -0
  97. package/dist/solution/UnifiedBookingSales/types.d.ts +25 -0
  98. package/dist/solution/UnifiedBookingSales/types.js +2 -0
  99. package/dist/solution/UnifiedBookingSales/venueCatalogSession.d.ts +32 -0
  100. package/dist/solution/UnifiedBookingSales/venueCatalogSession.js +277 -0
  101. package/dist/store/createStore.d.ts +3 -0
  102. package/dist/types/index.d.ts +132 -0
  103. package/dist/utils/os-private-payload.d.ts +5 -0
  104. package/dist/utils/payment-number.d.ts +9 -0
  105. package/dist/utils/task.d.ts +40 -0
  106. package/dist/utils/watch.d.ts +102 -0
  107. package/lib/apis/picoding.d.ts +0 -0
  108. package/lib/effects/index.d.ts +19 -0
  109. package/lib/model/strategy/adapter/dataVariant/adapter.d.ts +50 -0
  110. package/lib/model/strategy/adapter/dataVariant/evaluator.d.ts +105 -0
  111. package/lib/model/strategy/adapter/dataVariant/examples.d.ts +39 -0
  112. package/lib/model/strategy/adapter/dataVariant/index.d.ts +4 -0
  113. package/lib/model/strategy/adapter/dataVariant/type.d.ts +173 -0
  114. package/lib/model/strategy/adapter/promotion/adapter.d.ts +70 -0
  115. package/lib/model/strategy/adapter/promotion/examples.d.ts +224 -0
  116. package/lib/model/strategy/adapter/promotion/type.d.ts +535 -0
  117. package/lib/model/strategy/adapter/type.d.ts +28 -0
  118. package/lib/model/strategy/adapter/walletPass/index.d.ts +32 -0
  119. package/lib/model/strategy/adapter/walletPass/locales.d.ts +1 -0
  120. package/lib/model/strategy/adapter/walletPass/type.d.ts +192 -0
  121. package/lib/model/strategy/adapter/walletPass/utils.d.ts +50 -0
  122. package/lib/model/strategy/engine.d.ts +119 -0
  123. package/lib/model/strategy/type.d.ts +245 -0
  124. package/lib/modules/Account/types.d.ts +56 -0
  125. package/lib/modules/BookingContext/types.d.ts +104 -0
  126. package/lib/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +76 -0
  127. package/lib/modules/BookingContext/utils/flexible.d.ts +28 -0
  128. package/lib/modules/BookingContext/utils/formatResourceList.d.ts +8 -0
  129. package/lib/modules/BookingContext/utils/noResource.d.ts +13 -0
  130. package/lib/modules/BookingContext/utils/orderLineDisplay.d.ts +1 -0
  131. package/lib/modules/BookingContext/utils/resourceErrors.d.ts +41 -0
  132. package/lib/modules/BookingContext/utils/resourceSelection.d.ts +7 -0
  133. package/lib/modules/BookingContext/utils/serviceTimes.d.ts +55 -0
  134. package/lib/modules/BookingContext/utils/timeSlices.d.ts +42 -0
  135. package/lib/modules/Customer/constants.d.ts +7 -0
  136. package/lib/modules/Date/types.d.ts +84 -0
  137. package/lib/modules/Date/utils.d.ts +36 -0
  138. package/lib/modules/FulfillmentTiming/index.d.ts +11 -0
  139. package/lib/modules/FulfillmentTiming/types.d.ts +67 -0
  140. package/lib/modules/Order/payment-utils.d.ts +26 -0
  141. package/lib/modules/Order/pickupTiming.d.ts +46 -0
  142. package/lib/modules/Order/utils/manualProductDiscount.d.ts +106 -0
  143. package/lib/modules/Order/utils/orderCollectionIdentity.d.ts +68 -0
  144. package/lib/modules/Order/utils/weighedProduct.d.ts +12 -0
  145. package/lib/modules/Payment/cashRecommendationAlgorithm.d.ts +21 -0
  146. package/lib/modules/Payment/mx51.d.ts +0 -0
  147. package/lib/modules/Payment/types.d.ts +943 -0
  148. package/lib/modules/Payment/utils.d.ts +19 -0
  149. package/lib/modules/Product/index.d.ts +1 -1
  150. package/lib/modules/ProductList/index.d.ts +2 -0
  151. package/lib/modules/ProductList/index.js +56 -0
  152. package/lib/modules/Quotation/types.d.ts +61 -0
  153. package/lib/modules/Resource/types.d.ts +50 -0
  154. package/lib/modules/Resource/utils.d.ts +23 -0
  155. package/lib/modules/ResourcePlanner/localClock.d.ts +33 -0
  156. package/lib/modules/ResourcePlanner/planner.js +4 -0
  157. package/lib/modules/SalesSummary/types.d.ts +69 -0
  158. package/lib/modules/ScanOrderLogger/providers/feishu.d.ts +2 -0
  159. package/lib/modules/ScanOrderLogger/providers/grafana.d.ts +2 -0
  160. package/lib/modules/ScanOrderLogger/types.d.ts +53 -0
  161. package/lib/modules/Schedule/getDateIsInSchedule.d.ts +32 -0
  162. package/lib/modules/Schedule/type.d.ts +157 -0
  163. package/lib/modules/Schedule/types.d.ts +201 -0
  164. package/lib/modules/Schedule/utils.d.ts +67 -0
  165. package/lib/modules/Step/tyeps.d.ts +20 -0
  166. package/lib/modules/SurchargeList/types.d.ts +15 -0
  167. package/lib/plugins/app.d.ts +10 -0
  168. package/lib/plugins/shopStore.d.ts +4 -0
  169. package/lib/plugins/user.d.ts +7 -0
  170. package/lib/server/modules/floor-plan/types.d.ts +43 -0
  171. package/lib/server/modules/menu/types.d.ts +68 -0
  172. package/lib/server/modules/payment/types.d.ts +9 -0
  173. package/lib/server/modules/quotation/types.d.ts +50 -0
  174. package/lib/server/modules/resource/types.d.ts +121 -0
  175. package/lib/server/modules/schedule/types.d.ts +1 -0
  176. package/lib/server/modules/schedule/utils.d.ts +32 -0
  177. package/lib/server/types.d.ts +66 -0
  178. package/lib/server/utils/index.d.ts +5 -0
  179. package/lib/server/utils/schedule.d.ts +14 -0
  180. package/lib/server/utils/time.d.ts +18 -0
  181. package/lib/solution/BaseSales/index.d.ts +12 -1
  182. package/lib/solution/BaseSales/index.js +65 -0
  183. package/lib/solution/BookingByStep/index.d.ts +2 -2
  184. package/lib/solution/BookingTicket/index.d.ts +1 -13
  185. package/lib/solution/BookingTicket/utils/bookingStatus.d.ts +77 -0
  186. package/lib/solution/BookingTicket/utils/exampleData.d.ts +123 -0
  187. package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +185 -0
  188. package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +38 -0
  189. package/lib/solution/BookingTicket/utils/scan/scanCache.d.ts +78 -0
  190. package/lib/solution/BookingTicket/utils/scan/scanProductValues.d.ts +21 -0
  191. package/lib/solution/BookingTicket/utils/weighingProductSku.d.ts +5 -0
  192. package/lib/solution/PlaceOrder/index.d.ts +0 -0
  193. package/lib/solution/RegisterAndLogin/config.d.ts +93 -0
  194. package/lib/solution/RegisterAndLogin/types.d.ts +445 -0
  195. package/lib/solution/RegisterAndLogin/utils.d.ts +103 -0
  196. package/lib/solution/UnifiedBookingSales/index.d.ts +23 -1
  197. package/lib/solution/UnifiedBookingSales/index.js +399 -14
  198. package/lib/solution/UnifiedBookingSales/remoteOccupancyCache.d.ts +2 -0
  199. package/lib/solution/UnifiedBookingSales/remoteOccupancyCache.js +2 -0
  200. package/lib/solution/UnifiedBookingSales/sessionResourceCache.d.ts +27 -0
  201. package/lib/solution/UnifiedBookingSales/sessionResourceCache.js +199 -0
  202. package/lib/solution/UnifiedBookingSales/types.d.ts +25 -0
  203. package/lib/solution/UnifiedBookingSales/types.js +1 -0
  204. package/lib/solution/UnifiedBookingSales/venueCatalogSession.d.ts +32 -0
  205. package/lib/solution/UnifiedBookingSales/venueCatalogSession.js +151 -0
  206. package/lib/store/createStore.d.ts +3 -0
  207. package/lib/types/index.d.ts +132 -0
  208. package/lib/utils/os-private-payload.d.ts +5 -0
  209. package/lib/utils/payment-number.d.ts +9 -0
  210. package/lib/utils/task.d.ts +40 -0
  211. package/lib/utils/watch.d.ts +102 -0
  212. package/package.json +1 -1
@@ -0,0 +1,121 @@
1
+ /**
2
+ * Resource 模块主键类型
3
+ */
4
+ export type ResourceId = number | string;
5
+ /**
6
+ * Sales / ScheduleEventResource:预约条目内关联资源(仅 ID 与占用,详情由设备端基准数据解析)
7
+ * @see 统一 Sales 数据协议 3.4.1 resources
8
+ */
9
+ export interface ScheduleEventResource {
10
+ /** 表单 ID。来源:ScheduleEventResource.form_id */
11
+ form_id: number;
12
+ /** 关联类型(如 form)。来源:ScheduleEventResource.relation_type */
13
+ relation_type: string;
14
+ /** 关联资源 ID(设备端用此 ID 从本地基准数据取资源详情)。来源:ScheduleEventResource.relation_id */
15
+ relation_id: number;
16
+ /** 占用容量。来源:ScheduleEventResource.capacity */
17
+ capacity: number;
18
+ /** 特殊状态。来源:ScheduleEventResource.like_status */
19
+ like_status?: string;
20
+ /** 资源元数据。来源:ScheduleEventResource.metadata */
21
+ metadata?: Record<string, unknown> | null;
22
+ /** 子资源(组合资源场景),结构同父级 */
23
+ children?: ScheduleEventResource[];
24
+ }
25
+ /**
26
+ * 资源预订数据结构
27
+ */
28
+ export interface ResourceBooking {
29
+ id: ResourceId;
30
+ resource_id?: ResourceId;
31
+ resourceId?: ResourceId;
32
+ user_id?: string | number;
33
+ userId?: string | number;
34
+ start_time?: string | number;
35
+ end_time?: string | number;
36
+ startTime?: string | number;
37
+ endTime?: string | number;
38
+ status?: string;
39
+ notes?: string;
40
+ metadata?: Record<string, any> | null;
41
+ [key: string]: any;
42
+ }
43
+ /**
44
+ * 资源数据结构(兼容历史数据)
45
+ */
46
+ export interface ResourceData {
47
+ id: ResourceId;
48
+ form_record_id?: ResourceId;
49
+ main_field?: string;
50
+ form_id?: number | string;
51
+ capacity?: number;
52
+ like_status?: 'common' | 'like';
53
+ type?: string;
54
+ resourceType?: string;
55
+ resource_form_id?: number | string | '';
56
+ schedule?: any[] | '';
57
+ times?: any;
58
+ metadata?: Record<string, any> | null;
59
+ children?: ResourceData[];
60
+ bookings?: ResourceBooking[];
61
+ [key: string]: any;
62
+ }
63
+ /**
64
+ * 查询选项
65
+ */
66
+ export interface QueryOptions {
67
+ includeBookings?: boolean;
68
+ [key: string]: any;
69
+ }
70
+ /**
71
+ * Resource 模块状态
72
+ */
73
+ export interface ResourceState {
74
+ /** 资源列表 */
75
+ list: ResourceData[];
76
+ /** 资源 Map 缓存(以 id 为 key,加速查询) */
77
+ map: Map<ResourceId, ResourceData>;
78
+ /** 预订列表 */
79
+ bookings: ResourceBooking[];
80
+ }
81
+ /**
82
+ * 与 ResourceDataSource 对齐的分页查询参数
83
+ */
84
+ export interface ResourcePageQuery {
85
+ 'ids[]'?: ResourceId[] | ResourceId;
86
+ ids?: ResourceId[];
87
+ num?: number | string;
88
+ skip?: number | string;
89
+ }
90
+ /**
91
+ * 与 ResourceDataSource 对齐的分页返回结构
92
+ */
93
+ export interface ResourcePageResult {
94
+ list: ResourceData[];
95
+ count: number;
96
+ skip: number;
97
+ size: number;
98
+ }
99
+ /**
100
+ * ResourceSyncMessage - pubsub 同步消息结构
101
+ */
102
+ export interface ResourceSyncMessage {
103
+ module?: string;
104
+ action?: string;
105
+ operation?: string;
106
+ id?: ResourceId;
107
+ ids?: ResourceId[];
108
+ body?: Partial<ResourceData>;
109
+ change_types?: string[];
110
+ relation_resource_ids?: ResourceId[];
111
+ _channelKey?: string;
112
+ }
113
+ /**
114
+ * Resource 模块钩子
115
+ */
116
+ export declare enum ResourceHooks {
117
+ onResourcesLoaded = "resource:onResourcesLoaded",
118
+ onResourcesChanged = "resource:onResourcesChanged",
119
+ onResourcesSyncCompleted = "resource:onResourcesSyncCompleted",
120
+ onBookingsChanged = "resource:onBookingsChanged"
121
+ }
@@ -0,0 +1 @@
1
+ export * from '../../../modules/Schedule/types';
@@ -0,0 +1,32 @@
1
+ import dayjs from "dayjs";
2
+ import { ScheduleItem } from "../../../modules/Schedule/types";
3
+ export declare const getDateIsInSchedule: (dateTime: string, scheduleList: ScheduleItem[]) => boolean;
4
+ export type ScheduleTimeSlot = {
5
+ /** 开始时间 HH:mm */
6
+ start_time: string;
7
+ /** 结束时间 HH:mm */
8
+ end_time: string;
9
+ /** 开始日期时间 YYYY-MM-DD HH:mm:ss */
10
+ start_at: dayjs.Dayjs;
11
+ /** 结束日期时间 YYYY-MM-DD HH:mm:ss */
12
+ end_at: dayjs.Dayjs;
13
+ };
14
+ /**
15
+ * 获取当前日期日程时间点
16
+ * @param date 日期 YYYY-MM-DD
17
+ * @param scheduleList 日程列表
18
+ * @returns 当前日期日程时间点 结构,数组 [{
19
+ *
20
+ * // HH:mm
21
+ * end_time: string,
22
+ * // HH:mm
23
+ * start_time: string,
24
+ * // 日期时间
25
+ * // YYYY-MM-DD HH:mm:ss
26
+ * end_at: Dayjs,
27
+ * // YYYY-MM-DD HH:mm:ss
28
+ * start_at: Dayjs,
29
+ *
30
+ * }]
31
+ */
32
+ export declare const getScheduleStartEndTimePoints: (date: string, scheduleList: ScheduleItem[]) => ScheduleTimeSlot[];
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Server 类型定义
3
+ */
4
+ export type CacheType = 'memory' | 'storage' | 'indexDB';
5
+ export interface CacheProps {
6
+ key?: string;
7
+ type?: CacheType;
8
+ updateCache?: boolean;
9
+ cacheUpdateChange?: (data: any) => void;
10
+ }
11
+ export interface RequestSetting {
12
+ abort?: boolean;
13
+ headers?: any;
14
+ cache?: CacheProps;
15
+ signal?: any;
16
+ token?: string;
17
+ osServer?: boolean;
18
+ [key: string]: any;
19
+ }
20
+ /**
21
+ * 路由处理函数类型
22
+ */
23
+ export type RouteHandler = (params: {
24
+ url: string;
25
+ method: 'get' | 'post' | 'remove' | 'put';
26
+ data?: any;
27
+ config?: RequestSetting;
28
+ /** 路由路径(前缀匹配时由 handleRoute 注入,便于 handler 解析动态段) */
29
+ path?: string;
30
+ }) => Promise<any> | any;
31
+ /**
32
+ * HTTP 方法类型
33
+ */
34
+ export type HttpMethod = 'get' | 'post' | 'remove' | 'put';
35
+ /**
36
+ * 路由定义类型
37
+ */
38
+ export type RouteDefinition = {
39
+ method: HttpMethod;
40
+ path: string;
41
+ handler: RouteHandler;
42
+ };
43
+ /**
44
+ * Router 对象类型
45
+ */
46
+ export interface Router {
47
+ get: Record<string, RouteHandler>;
48
+ post: Record<string, RouteHandler>;
49
+ put: Record<string, RouteHandler>;
50
+ remove: Record<string, RouteHandler>;
51
+ }
52
+ /**
53
+ * 模块注册配置(内部使用)
54
+ */
55
+ export interface ModuleRegistryConfig {
56
+ /** 模块名称 */
57
+ name: string;
58
+ /** 模块类 */
59
+ moduleClass: any;
60
+ /** 模块完整名称(用于注册到 Core) */
61
+ moduleName: string;
62
+ /** 模块版本 */
63
+ version: string;
64
+ /** 默认 store 结构 */
65
+ defaultStore: Record<string, any>;
66
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Server 工具函数集合
3
+ */
4
+ export * from './time';
5
+ export * from './schedule';
@@ -0,0 +1,14 @@
1
+ import type { ScheduleItem } from '../../modules/Schedule/types';
2
+ import type { MenuData } from '../modules/menu/types';
3
+ /**
4
+ * 从餐牌列表中提取所有 schedule IDs
5
+ * @param menus 餐牌列表
6
+ * @returns 去重后的日程ID数组
7
+ */
8
+ export declare function extractScheduleIdsFromMenus(menus: MenuData[]): number[];
9
+ /**
10
+ * 从日程列表中提取所有时间点
11
+ * @param schedules 日程列表
12
+ * @returns 排序后的时间点数组,格式为 ["10:00", "12:00", "14:00", "18:00"]
13
+ */
14
+ export declare function extractTimePointsFromSchedules(schedules: ScheduleItem[]): string[];
@@ -0,0 +1,18 @@
1
+ /**
2
+ * 从日期时间字符串中提取时间部分
3
+ * @param dateTime 日期时间字符串,格式如 "2024-01-01 10:00:00"
4
+ * @returns 时间字符串,格式如 "10:00"
5
+ */
6
+ export declare function extractTimeFromDateTime(dateTime: string): string | null;
7
+ /**
8
+ * 将时间字符串转换为分钟数(用于排序)
9
+ * @param timeStr 时间字符串,格式如 "10:00" 或 "14:30"
10
+ * @returns 从00:00开始的分钟数
11
+ */
12
+ export declare function timeStringToMinutes(timeStr: string): number;
13
+ /**
14
+ * 对时间点数组进行排序
15
+ * @param timePoints 时间点数组
16
+ * @returns 排序后的时间点数组
17
+ */
18
+ export declare function sortTimePoints(timePoints: string[]): string[];
@@ -129,7 +129,7 @@ export declare class BaseSalesImpl extends BaseModule implements Module {
129
129
  * /product/query 的智能定价评估只读取 strategy_context;
130
130
  * application_code 仅作为接口兼容字段,不能替代 channel / business_code。
131
131
  */
132
- private getPriceQueryStrategyContext;
132
+ protected getPriceQueryStrategyContext(channel?: string): Record<string, any>;
133
133
  /**
134
134
  * 子类可在商品重报价前准备客户维度的策略上下文,例如等待 Wallet/优惠资产加载。
135
135
  */
@@ -156,6 +156,12 @@ export declare class BaseSalesImpl extends BaseModule implements Module {
156
156
  private prepareRawProductForPriceQuery;
157
157
  private resolveLocalProductForPriceQuery;
158
158
  private loadProductsForPriceQuery;
159
+ /** Opt-in subclasses may supply page-owned raw pools; ordinary sales keep remote fallback. */
160
+ protected isVenueCatalogLocalPricingActive(): boolean;
161
+ protected getVenueCatalogLocalPriceSource(_productId: number, _selectedProduct?: Record<string, any>): {
162
+ product: Record<string, any>;
163
+ menuList: Record<string, any>[];
164
+ } | undefined;
159
165
  private resolveProductsForPriceQuery;
160
166
  private getAuthoritativeBundleItems;
161
167
  private findAuthoritativeBundleItem;
@@ -523,6 +529,11 @@ export declare class BaseSalesImpl extends BaseModule implements Module {
523
529
  submitBeforeSend?: boolean;
524
530
  }): Promise<T>;
525
531
  transformBaseProductToOrderProduct(params: TransformBaseProductToOrderProductParams): import("./utils/transformBaseProductToOrderProduct").BaseProductOrderProductInput | null;
532
+ /** Explicit pool source avoids races between two simultaneous Venue pricing contexts. */
533
+ protected calculateVenueCatalogProductBookingPrice(params: BaseSalesCalculateProductBookingPriceParams, source: {
534
+ product: Record<string, any>;
535
+ menuList: Record<string, any>[];
536
+ }): Promise<BaseSalesProductBookingPriceResult>;
526
537
  calculateProductBookingPrice(params: BaseSalesCalculateProductBookingPriceParams): Promise<BaseSalesProductBookingPriceResult>;
527
538
  getQuotationCustomerScopeInfo(): BaseSalesQuotationCustomerScopeInfo;
528
539
  private hasSmartPricingStrategies;