@pisell/pisellos 0.10.75 → 0.10.76

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 (189) hide show
  1. package/dist/modules/Product/index.d.ts +1 -1
  2. package/dist/server/index.js +14 -9
  3. package/dist/shared/receipt/small-ticket.d.ts +3 -0
  4. package/dist/shared/receipt/small-ticket.js +23 -2
  5. package/dist/solution/BookingByStep/index.d.ts +2 -2
  6. package/dist/solution/BookingTicket/index.d.ts +13 -1
  7. package/dist/solution/OrderInvoicePreview/index.js +13 -8
  8. package/lib/modules/Product/index.d.ts +1 -1
  9. package/lib/server/index.js +5 -0
  10. package/lib/shared/receipt/small-ticket.d.ts +3 -0
  11. package/lib/shared/receipt/small-ticket.js +21 -0
  12. package/lib/solution/BookingByStep/index.d.ts +2 -2
  13. package/lib/solution/BookingTicket/index.d.ts +13 -1
  14. package/lib/solution/OrderInvoicePreview/index.js +6 -1
  15. package/package.json +1 -1
  16. package/dist/apis/picoding.d.ts +0 -0
  17. package/dist/effects/index.d.ts +0 -19
  18. package/dist/model/strategy/adapter/dataVariant/adapter.d.ts +0 -50
  19. package/dist/model/strategy/adapter/dataVariant/evaluator.d.ts +0 -105
  20. package/dist/model/strategy/adapter/dataVariant/examples.d.ts +0 -39
  21. package/dist/model/strategy/adapter/dataVariant/index.d.ts +0 -4
  22. package/dist/model/strategy/adapter/dataVariant/type.d.ts +0 -173
  23. package/dist/model/strategy/adapter/promotion/adapter.d.ts +0 -70
  24. package/dist/model/strategy/adapter/promotion/examples.d.ts +0 -224
  25. package/dist/model/strategy/adapter/promotion/type.d.ts +0 -535
  26. package/dist/model/strategy/adapter/type.d.ts +0 -28
  27. package/dist/model/strategy/adapter/walletPass/index.d.ts +0 -32
  28. package/dist/model/strategy/adapter/walletPass/locales.d.ts +0 -1
  29. package/dist/model/strategy/adapter/walletPass/type.d.ts +0 -192
  30. package/dist/model/strategy/adapter/walletPass/utils.d.ts +0 -50
  31. package/dist/model/strategy/engine.d.ts +0 -119
  32. package/dist/model/strategy/type.d.ts +0 -245
  33. package/dist/modules/Account/types.d.ts +0 -56
  34. package/dist/modules/BookingContext/types.d.ts +0 -104
  35. package/dist/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +0 -76
  36. package/dist/modules/BookingContext/utils/flexible.d.ts +0 -28
  37. package/dist/modules/BookingContext/utils/formatResourceList.d.ts +0 -8
  38. package/dist/modules/BookingContext/utils/noResource.d.ts +0 -13
  39. package/dist/modules/BookingContext/utils/orderLineDisplay.d.ts +0 -1
  40. package/dist/modules/BookingContext/utils/resourceErrors.d.ts +0 -41
  41. package/dist/modules/BookingContext/utils/resourceSelection.d.ts +0 -7
  42. package/dist/modules/BookingContext/utils/serviceTimes.d.ts +0 -55
  43. package/dist/modules/BookingContext/utils/timeSlices.d.ts +0 -42
  44. package/dist/modules/Customer/constants.d.ts +0 -7
  45. package/dist/modules/Date/types.d.ts +0 -84
  46. package/dist/modules/Date/utils.d.ts +0 -36
  47. package/dist/modules/FulfillmentTiming/index.d.ts +0 -11
  48. package/dist/modules/FulfillmentTiming/types.d.ts +0 -67
  49. package/dist/modules/Order/payment-utils.d.ts +0 -26
  50. package/dist/modules/Order/pickupTiming.d.ts +0 -46
  51. package/dist/modules/Order/utils/manualProductDiscount.d.ts +0 -106
  52. package/dist/modules/Order/utils/orderCollectionIdentity.d.ts +0 -68
  53. package/dist/modules/Order/utils/weighedProduct.d.ts +0 -12
  54. package/dist/modules/Payment/cashRecommendationAlgorithm.d.ts +0 -21
  55. package/dist/modules/Payment/mx51.d.ts +0 -0
  56. package/dist/modules/Payment/types.d.ts +0 -943
  57. package/dist/modules/Payment/utils.d.ts +0 -19
  58. package/dist/modules/Quotation/types.d.ts +0 -61
  59. package/dist/modules/Resource/types.d.ts +0 -50
  60. package/dist/modules/Resource/utils.d.ts +0 -23
  61. package/dist/modules/ResourcePlanner/localClock.d.ts +0 -33
  62. package/dist/modules/SalesSummary/types.d.ts +0 -69
  63. package/dist/modules/ScanOrderLogger/providers/feishu.d.ts +0 -2
  64. package/dist/modules/ScanOrderLogger/providers/grafana.d.ts +0 -2
  65. package/dist/modules/ScanOrderLogger/types.d.ts +0 -53
  66. package/dist/modules/Schedule/getDateIsInSchedule.d.ts +0 -32
  67. package/dist/modules/Schedule/type.d.ts +0 -157
  68. package/dist/modules/Schedule/types.d.ts +0 -201
  69. package/dist/modules/Schedule/utils.d.ts +0 -67
  70. package/dist/modules/Step/tyeps.d.ts +0 -20
  71. package/dist/modules/SurchargeList/types.d.ts +0 -15
  72. package/dist/plugins/app.d.ts +0 -10
  73. package/dist/plugins/shopStore.d.ts +0 -4
  74. package/dist/plugins/user.d.ts +0 -7
  75. package/dist/server/modules/floor-plan/types.d.ts +0 -43
  76. package/dist/server/modules/menu/types.d.ts +0 -68
  77. package/dist/server/modules/payment/types.d.ts +0 -9
  78. package/dist/server/modules/quotation/types.d.ts +0 -50
  79. package/dist/server/modules/resource/types.d.ts +0 -121
  80. package/dist/server/modules/schedule/types.d.ts +0 -1
  81. package/dist/server/modules/schedule/utils.d.ts +0 -32
  82. package/dist/server/types.d.ts +0 -66
  83. package/dist/server/utils/index.d.ts +0 -5
  84. package/dist/server/utils/schedule.d.ts +0 -14
  85. package/dist/server/utils/time.d.ts +0 -18
  86. package/dist/solution/BookingTicket/utils/bookingStatus.d.ts +0 -77
  87. package/dist/solution/BookingTicket/utils/exampleData.d.ts +0 -123
  88. package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +0 -185
  89. package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +0 -38
  90. package/dist/solution/BookingTicket/utils/scan/scanCache.d.ts +0 -78
  91. package/dist/solution/BookingTicket/utils/scan/scanProductValues.d.ts +0 -21
  92. package/dist/solution/BookingTicket/utils/weighingProductSku.d.ts +0 -5
  93. package/dist/solution/PlaceOrder/index.d.ts +0 -0
  94. package/dist/solution/RegisterAndLogin/config.d.ts +0 -93
  95. package/dist/solution/RegisterAndLogin/types.d.ts +0 -445
  96. package/dist/solution/RegisterAndLogin/utils.d.ts +0 -103
  97. package/dist/store/createStore.d.ts +0 -3
  98. package/dist/types/index.d.ts +0 -132
  99. package/dist/utils/os-private-payload.d.ts +0 -5
  100. package/dist/utils/payment-number.d.ts +0 -9
  101. package/dist/utils/task.d.ts +0 -40
  102. package/dist/utils/watch.d.ts +0 -102
  103. package/lib/apis/picoding.d.ts +0 -0
  104. package/lib/effects/index.d.ts +0 -19
  105. package/lib/model/strategy/adapter/dataVariant/adapter.d.ts +0 -50
  106. package/lib/model/strategy/adapter/dataVariant/evaluator.d.ts +0 -105
  107. package/lib/model/strategy/adapter/dataVariant/examples.d.ts +0 -39
  108. package/lib/model/strategy/adapter/dataVariant/index.d.ts +0 -4
  109. package/lib/model/strategy/adapter/dataVariant/type.d.ts +0 -173
  110. package/lib/model/strategy/adapter/promotion/adapter.d.ts +0 -70
  111. package/lib/model/strategy/adapter/promotion/examples.d.ts +0 -224
  112. package/lib/model/strategy/adapter/promotion/type.d.ts +0 -535
  113. package/lib/model/strategy/adapter/type.d.ts +0 -28
  114. package/lib/model/strategy/adapter/walletPass/index.d.ts +0 -32
  115. package/lib/model/strategy/adapter/walletPass/locales.d.ts +0 -1
  116. package/lib/model/strategy/adapter/walletPass/type.d.ts +0 -192
  117. package/lib/model/strategy/adapter/walletPass/utils.d.ts +0 -50
  118. package/lib/model/strategy/engine.d.ts +0 -119
  119. package/lib/model/strategy/type.d.ts +0 -245
  120. package/lib/modules/Account/types.d.ts +0 -56
  121. package/lib/modules/BookingContext/types.d.ts +0 -104
  122. package/lib/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +0 -76
  123. package/lib/modules/BookingContext/utils/flexible.d.ts +0 -28
  124. package/lib/modules/BookingContext/utils/formatResourceList.d.ts +0 -8
  125. package/lib/modules/BookingContext/utils/noResource.d.ts +0 -13
  126. package/lib/modules/BookingContext/utils/orderLineDisplay.d.ts +0 -1
  127. package/lib/modules/BookingContext/utils/resourceErrors.d.ts +0 -41
  128. package/lib/modules/BookingContext/utils/resourceSelection.d.ts +0 -7
  129. package/lib/modules/BookingContext/utils/serviceTimes.d.ts +0 -55
  130. package/lib/modules/BookingContext/utils/timeSlices.d.ts +0 -42
  131. package/lib/modules/Customer/constants.d.ts +0 -7
  132. package/lib/modules/Date/types.d.ts +0 -84
  133. package/lib/modules/Date/utils.d.ts +0 -36
  134. package/lib/modules/FulfillmentTiming/index.d.ts +0 -11
  135. package/lib/modules/FulfillmentTiming/types.d.ts +0 -67
  136. package/lib/modules/Order/payment-utils.d.ts +0 -26
  137. package/lib/modules/Order/pickupTiming.d.ts +0 -46
  138. package/lib/modules/Order/utils/manualProductDiscount.d.ts +0 -106
  139. package/lib/modules/Order/utils/orderCollectionIdentity.d.ts +0 -68
  140. package/lib/modules/Order/utils/weighedProduct.d.ts +0 -12
  141. package/lib/modules/Payment/cashRecommendationAlgorithm.d.ts +0 -21
  142. package/lib/modules/Payment/mx51.d.ts +0 -0
  143. package/lib/modules/Payment/types.d.ts +0 -943
  144. package/lib/modules/Payment/utils.d.ts +0 -19
  145. package/lib/modules/Quotation/types.d.ts +0 -61
  146. package/lib/modules/Resource/types.d.ts +0 -50
  147. package/lib/modules/Resource/utils.d.ts +0 -23
  148. package/lib/modules/ResourcePlanner/localClock.d.ts +0 -33
  149. package/lib/modules/SalesSummary/types.d.ts +0 -69
  150. package/lib/modules/ScanOrderLogger/providers/feishu.d.ts +0 -2
  151. package/lib/modules/ScanOrderLogger/providers/grafana.d.ts +0 -2
  152. package/lib/modules/ScanOrderLogger/types.d.ts +0 -53
  153. package/lib/modules/Schedule/getDateIsInSchedule.d.ts +0 -32
  154. package/lib/modules/Schedule/type.d.ts +0 -157
  155. package/lib/modules/Schedule/types.d.ts +0 -201
  156. package/lib/modules/Schedule/utils.d.ts +0 -67
  157. package/lib/modules/Step/tyeps.d.ts +0 -20
  158. package/lib/modules/SurchargeList/types.d.ts +0 -15
  159. package/lib/plugins/app.d.ts +0 -10
  160. package/lib/plugins/shopStore.d.ts +0 -4
  161. package/lib/plugins/user.d.ts +0 -7
  162. package/lib/server/modules/floor-plan/types.d.ts +0 -43
  163. package/lib/server/modules/menu/types.d.ts +0 -68
  164. package/lib/server/modules/payment/types.d.ts +0 -9
  165. package/lib/server/modules/quotation/types.d.ts +0 -50
  166. package/lib/server/modules/resource/types.d.ts +0 -121
  167. package/lib/server/modules/schedule/types.d.ts +0 -1
  168. package/lib/server/modules/schedule/utils.d.ts +0 -32
  169. package/lib/server/types.d.ts +0 -66
  170. package/lib/server/utils/index.d.ts +0 -5
  171. package/lib/server/utils/schedule.d.ts +0 -14
  172. package/lib/server/utils/time.d.ts +0 -18
  173. package/lib/solution/BookingTicket/utils/bookingStatus.d.ts +0 -77
  174. package/lib/solution/BookingTicket/utils/exampleData.d.ts +0 -123
  175. package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +0 -185
  176. package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +0 -38
  177. package/lib/solution/BookingTicket/utils/scan/scanCache.d.ts +0 -78
  178. package/lib/solution/BookingTicket/utils/scan/scanProductValues.d.ts +0 -21
  179. package/lib/solution/BookingTicket/utils/weighingProductSku.d.ts +0 -5
  180. package/lib/solution/PlaceOrder/index.d.ts +0 -0
  181. package/lib/solution/RegisterAndLogin/config.d.ts +0 -93
  182. package/lib/solution/RegisterAndLogin/types.d.ts +0 -445
  183. package/lib/solution/RegisterAndLogin/utils.d.ts +0 -103
  184. package/lib/store/createStore.d.ts +0 -3
  185. package/lib/types/index.d.ts +0 -132
  186. package/lib/utils/os-private-payload.d.ts +0 -5
  187. package/lib/utils/payment-number.d.ts +0 -9
  188. package/lib/utils/task.d.ts +0 -40
  189. package/lib/utils/watch.d.ts +0 -102
@@ -1,201 +0,0 @@
1
- import dayjs from 'dayjs';
2
- export interface ScheduleState {
3
- scheduleList: ScheduleItem[];
4
- /** 日程 Map 缓存(以 id 为 key,加速查询) */
5
- map: Map<number, ScheduleItem>;
6
- availabilityDateList: ScheduleAvailabilityDateItem[];
7
- otherProductsIds: number[];
8
- }
9
- export type ScheduleAvailabilityDateItem = {
10
- date: string;
11
- schedule_id: number[];
12
- product_ids: number[];
13
- };
14
- /**
15
- * 加载日程可用日期参数接口
16
- */
17
- export interface LoadScheduleAvailableDateParams {
18
- /** 开始日期 */
19
- startDate: string;
20
- /** 结束日期 */
21
- endDate: string;
22
- /** 自定义页面ID */
23
- custom_page_id?: number;
24
- /** 渠道 */
25
- channel?: string;
26
- }
27
- export interface ScheduleModuleAPI {
28
- getScheduleList: () => ScheduleItem[];
29
- isScheduleListLoaded: () => boolean;
30
- }
31
- export type ScheduleItem = {
32
- /** 颜色 */
33
- color: string;
34
- /** 创建时间 */
35
- created_at: string;
36
- /** 更新时间 */
37
- updated_at: string;
38
- /** 开始时间 */
39
- start_time: string;
40
- /** 结束时间 */
41
- end_time: string;
42
- /** 日程名称 */
43
- name: string;
44
- /** 关联订单 */
45
- order_count: number;
46
- /** 关联项目数据*/
47
- relation_count: number;
48
- repeat_rule: {
49
- end: {
50
- /** 截止类型 */
51
- type: 'date' | 'never';
52
- /** 结束时间 */
53
- end_date: string | null;
54
- occurrence: any | null;
55
- };
56
- frequency: number;
57
- excluded_date: ExcIncDate[];
58
- included_date: ExcIncDate[];
59
- frequency_date: number[];
60
- };
61
- repeat_type: 'daily' | 'none' | 'weekly';
62
- /** 日程类型
63
- * standard: 标准日程
64
- * time-slots: 时间段日程
65
- * designation: 指定日期日程
66
- * */
67
- type: 'standard' | 'time-slots' | 'designation';
68
- conflict?: boolean;
69
- time_slot: {
70
- start_time: string;
71
- end_time: string;
72
- id: number;
73
- }[];
74
- id: number;
75
- /** 指定的开始时间结束时间 */
76
- designation: {
77
- start_date: string;
78
- end_date: string;
79
- start_time: string;
80
- end_time: string;
81
- } | {
82
- start_date: string;
83
- end_date: string;
84
- start_time: string;
85
- end_time: string;
86
- }[];
87
- /** 是否全天 */
88
- is_all: 1 | 0;
89
- [key: string]: any;
90
- relation?: {
91
- id: number;
92
- item_id: number;
93
- item_type: string;
94
- relation_table_type: string;
95
- schedule_id: number;
96
- }[];
97
- };
98
- export type ScheduleFormOtherValue = {
99
- /** 截止模式
100
- * 1: 永不截止
101
- * 2: 按日期截止
102
- * */
103
- endRadio: 1 | 2;
104
- /** 是否为全天 */
105
- isAllDay: boolean;
106
- /** 是否开启排除日期 */
107
- excludedStatus: boolean;
108
- /** 是否包含排除日期 */
109
- includeStatus: boolean;
110
- type: 'standard' | 'time-slots' | 'designation';
111
- };
112
- export type ExcIncDate = {
113
- start: string;
114
- end: string;
115
- };
116
- export type ScheduleFormData = {
117
- /** 颜色 */
118
- color: string;
119
- /** 日程名称 */
120
- name: {
121
- en: string;
122
- 'zh-CN': string;
123
- 'zh-HK': string;
124
- original: string;
125
- } | string;
126
- /** 重复模式
127
- * 0:不重复
128
- * 1:按天重复
129
- * 2:按周重复 */
130
- repeat_type: '0' | '1' | '2';
131
- /** 备注 */
132
- note: string;
133
- /** 指定的开始时间结束时间 */
134
- designation: {
135
- start_date: string;
136
- end_date: string;
137
- start_time: string;
138
- end_time: string;
139
- } | {
140
- start_date: string;
141
- end_date: string;
142
- start_time: string;
143
- end_time: string;
144
- }[];
145
- time_slot: {
146
- start_time: string;
147
- end_time: string;
148
- id: number;
149
- }[];
150
- /** 重复频率 */
151
- frequency: number;
152
- /** 按周重复时选择的周数据 */
153
- frequency_date: number[];
154
- /** 截止日期 */
155
- end_date: string;
156
- /** 排除的日期范围 */
157
- excluded_date: ExcIncDate[];
158
- /** 包含的日期范围 */
159
- included_date: ExcIncDate[];
160
- /** 多时间段的开始时间 */
161
- start_time: any;
162
- end_time: any;
163
- };
164
- export type CalendarDataItem = {
165
- date: string;
166
- color: string[];
167
- isExcluded: boolean;
168
- schedule_ids?: number[];
169
- [key: string]: any;
170
- };
171
- export type RequestData<Data> = {
172
- data: Data;
173
- status: boolean;
174
- message: string;
175
- code: number;
176
- };
177
- export type ResponseListData<Data> = {
178
- status: boolean;
179
- message: string;
180
- code: number;
181
- data: {
182
- list: Data;
183
- count: number;
184
- size: number;
185
- skip: number;
186
- };
187
- };
188
- export type ScheduleAllMap = Record<string, {
189
- minTime: dayjs.Dayjs | null;
190
- maxTime: dayjs.Dayjs | null;
191
- minTimeStr: string | null;
192
- maxTimeStr: string | null;
193
- dateRange: {
194
- start: string;
195
- end: string;
196
- }[];
197
- dateRangeFormat: {
198
- start: string;
199
- end: string;
200
- }[];
201
- }>;
@@ -1,67 +0,0 @@
1
- import { ScheduleFormData, ScheduleFormOtherValue, ScheduleItem, ScheduleAllMap } from './types';
2
- /**
3
- * 根据日程配置生成日历数据
4
- * @param values
5
- * @param others
6
- * @param type
7
- */
8
- export declare const calcCalendarDataBySchedule: (values: ScheduleFormData, others: ScheduleFormOtherValue, type?: 'standard' | 'time-slots' | 'designation') => any[];
9
- /**
10
- * 获取开始时间和结束时间之间的所有日期
11
- * @param startDate
12
- * @param endDate
13
- */
14
- export declare const getDaysByStartEnd: (startDate: any, endDate: any) => string[];
15
- /**
16
- * 根据标准日程计算日历数据
17
- * @param values
18
- * @param others
19
- */
20
- export declare const calcCalendarDataByStandard: (values: ScheduleFormData, others: ScheduleFormOtherValue, isGetRange?: boolean) => any[];
21
- /**
22
- * 根据多时间段计算日历数据
23
- * @param values
24
- * @param others
25
- */
26
- export declare const calcCalendarDataByTimeSlots: (values: ScheduleFormData, others: ScheduleFormOtherValue, isGetRange?: boolean) => any[];
27
- /**
28
- * 根据指定日期计算日历数据
29
- * @param values
30
- * @param others
31
- */
32
- export declare const calcCalendarDataByDesignation: (values: ScheduleFormData, others: ScheduleFormOtherValue, isGetRange?: boolean) => any[];
33
- export declare const isAllDay: (value: ScheduleItem) => boolean;
34
- /**
35
- * 根据接口返回的Schedule计算日历数据
36
- * @param schedule
37
- */
38
- export declare const calcCalendarDataByScheduleResult: (schedule: ScheduleItem) => any[];
39
- /**
40
- * 接口返回schedule转换格式
41
- * @param schedule
42
- */
43
- export declare const formatScheduleResult: (schedule: ScheduleItem) => {
44
- scheduleFormData: Partial<ScheduleFormData>;
45
- scheduleFormOtherValue: ScheduleFormOtherValue;
46
- };
47
- export declare const calcScheduleDateRange: (schedule: ScheduleItem) => any[];
48
- export declare const calcCalendarDataBySchedules: (schedules: ScheduleItem[]) => unknown[];
49
- export declare const calcMinTimeMaxTimeBySchedules: (schedules: ScheduleItem[], scheduleAllMap?: ScheduleAllMap, selectDate?: string) => ScheduleAllMap;
50
- /**
51
- * @title: 格式化日程数据
52
- * @description:
53
- * @param {Array} relation 资源列表
54
- * @param {string} table_type 关联表类型
55
- * @param {string} item_type 资源类型
56
- * @param {boolean} isExcluded 是否排除
57
- * @return {*}
58
- * @Author: WangHan
59
- * @Date: 2024-09-04 11:54
60
- */
61
- export declare const formatScheduleData: (relation: Array<any>, table_type?: string, item_type?: string, isExcluded?: boolean) => any;
62
- export interface TimeRange {
63
- start: string;
64
- end: string;
65
- count?: number;
66
- }
67
- export declare function getAllSortedDateRanges(schedules: Record<string, any>): TimeRange[];
@@ -1,20 +0,0 @@
1
- export interface IStepState {
2
- stepList: IStep[];
3
- currentStep: IStep;
4
- currentStepIndex: number;
5
- }
6
- export interface IStep {
7
- index: number;
8
- key: string;
9
- /** 是否跳过 */
10
- isSkip?: boolean;
11
- [key: string]: any;
12
- }
13
- export interface IStepModuleAPI {
14
- getStepList: () => IStep[];
15
- getCurrentStep: () => IStep;
16
- getCurrentStepIndex: () => number;
17
- nextStep: () => void;
18
- prevStep: () => void;
19
- gotoStep: (stepIndex: number) => void;
20
- }
@@ -1,15 +0,0 @@
1
- export interface SurchargeListItem {
2
- [key: string]: any;
3
- }
4
- export interface SurchargeListState {
5
- surchargeList: SurchargeListItem[];
6
- isLoaded: boolean;
7
- channel?: string;
8
- }
9
- export interface SurchargeListQuery {
10
- channel?: string;
11
- }
12
- export interface SurchargeListModuleAPI {
13
- getSurchargeList(query?: SurchargeListQuery): Promise<SurchargeListItem[]>;
14
- refreshSurchargeList(query?: SurchargeListQuery): Promise<SurchargeListItem[]>;
15
- }
@@ -1,10 +0,0 @@
1
- import { Plugin } from '../types';
2
- import App from './app-types/app';
3
- export type AppDataGetter = (key: string) => any;
4
- /**
5
- * AppPlugin 接口定义
6
- */
7
- export interface AppPlugin extends Plugin {
8
- getApp: () => App;
9
- getData?: () => AppDataGetter;
10
- }
@@ -1,4 +0,0 @@
1
- import { Plugin } from '../types';
2
- export interface ShopStorePlugin extends Plugin {
3
- get(model: string): any;
4
- }
@@ -1,7 +0,0 @@
1
- import { Plugin } from '../types';
2
- /**
3
- * UserPlugin 接口定义
4
- */
5
- export interface UserPlugin extends Plugin {
6
- get(): Record<string, any>;
7
- }
@@ -1,43 +0,0 @@
1
- /**
2
- * 平面图(floor-plan)Server 模块类型
3
- * 与 GET /shop/schedule/floor-plan 系列接口数据结构对齐
4
- */
5
- export interface FloorPlanItem {
6
- id: number;
7
- shop_id?: number;
8
- code: string;
9
- name: string | Record<string, string>;
10
- layout: unknown[];
11
- canvas_width: number;
12
- canvas_height: number;
13
- sort: number;
14
- status: number;
15
- created_at?: string;
16
- updated_at?: string;
17
- }
18
- export interface FloorPlanState {
19
- list: FloorPlanItem[];
20
- map: Map<string, FloorPlanItem>;
21
- codeMap: Map<string, FloorPlanItem>;
22
- }
23
- /** pubsub / Ably 推送消息(与《平面图编辑器API文档》Socket 一节一致) */
24
- export interface FloorPlanSyncMessage {
25
- module?: string;
26
- action?: string;
27
- operation?: string;
28
- id?: number;
29
- ids?: number[];
30
- body?: Partial<FloorPlanItem> & {
31
- id?: number;
32
- };
33
- message_uuid?: string;
34
- timestamp?: string;
35
- _channelKey?: string;
36
- }
37
- export declare const FloorPlanHooks: {
38
- /** 本地列表变更(预加载、合并、删除后) */
39
- readonly onFloorPlansChanged: "server_floor_plan:onFloorPlansChanged";
40
- /** pubsub 同步处理完成,供 Server 向订阅者推送最新查询结果 */
41
- readonly onFloorPlanSyncCompleted: "server_floor_plan:onFloorPlanSyncCompleted";
42
- };
43
- export type FloorPlanHooksType = (typeof FloorPlanHooks)[keyof typeof FloorPlanHooks];
@@ -1,68 +0,0 @@
1
- /**
2
- * 餐牌模块状态
3
- */
4
- export interface MenuState {
5
- /** 餐牌列表 */
6
- menuList: MenuData[];
7
- /** 餐牌 Map 缓存(以 form_record_id 为 key,加速查询) */
8
- map: Map<number, MenuData>;
9
- /** 当前生效的餐牌 */
10
- currentMenu?: MenuData;
11
- }
12
- type ProductItemType = {
13
- /** 商品集合 ID */
14
- product_collection_id: number;
15
- /** 商品 ID */
16
- product_id: number;
17
- /** 商品规格 ID */
18
- product_variant_id: number;
19
- };
20
- /**
21
- * 餐牌数据结构
22
- */
23
- export interface MenuData {
24
- /** 餐牌名称 */
25
- name: string;
26
- /** 副标题 */
27
- subtitle: string;
28
- /** 媒体资源 */
29
- media: any[];
30
- /** 描述 */
31
- description: string;
32
- /** 状态 */
33
- status: 'valid' | 'invalid';
34
- /** 绑定的日程 ID 列表 */
35
- schedule: number[];
36
- /** 商品配置 */
37
- partyroom_package: {
38
- /** 类型:product_all 表示所有商品,product_ids 表示指定商品,product_collection 表示商品集合 */
39
- type: 'product_all' | 'products' | 'product_collection';
40
- /** 指定的商品 或 商品集合 */
41
- products: ProductItemType[];
42
- filter?: number;
43
- };
44
- /** 表单标签 */
45
- form_tag: string;
46
- /** 商品字段 */
47
- products: string;
48
- /** 容量 */
49
- capacity: number;
50
- /** 表单记录 ID */
51
- form_record_id: number;
52
- /** 表单 ID */
53
- form_id: number;
54
- /** 主字段 */
55
- main_field: string;
56
- /** 过期时间 */
57
- expired_at: string | null;
58
- /** 创建时间 */
59
- created_at: string;
60
- }
61
- /**
62
- * 餐牌模块钩子
63
- */
64
- export declare enum MenuHooks {
65
- onMenuLoaded = "menu:onMenuLoaded",
66
- onMenuChanged = "menu:onMenuChanged"
67
- }
68
- export {};
@@ -1,9 +0,0 @@
1
- import type { PaymentMethod } from '../../../modules/Payment/types';
2
- export interface PaymentServerState {
3
- payMethods: PaymentMethod[];
4
- }
5
- export interface PaymentMethodsChangedEventData {
6
- oldMethods: PaymentMethod[];
7
- newMethods: PaymentMethod[];
8
- }
9
- export type { PaymentMethod };
@@ -1,50 +0,0 @@
1
- /**
2
- * 报价单模块状态
3
- */
4
- export interface QuotationState {
5
- /** 报价单列表 */
6
- quotationList: QuotationData[];
7
- }
8
- /**
9
- * 报价单数据结构
10
- */
11
- export interface QuotationData {
12
- /** 报价单 ID */
13
- id: number;
14
- /** 报价单名称 */
15
- name: string;
16
- /** 绑定的日程 ID 列表 */
17
- schedule_ids: number[];
18
- /** 商品价格配置列表 */
19
- product_prices: QuotationProductPrice[];
20
- /** 状态 */
21
- status: 'active' | 'inactive';
22
- /** 优先级(多个报价单同时生效时使用) */
23
- priority: number;
24
- /** 创建时间 */
25
- created_at: string;
26
- /** 更新时间 */
27
- updated_at: string;
28
- }
29
- /**
30
- * 报价单商品价格配置
31
- */
32
- export interface QuotationProductPrice {
33
- /** 商品 ID */
34
- product_id: number;
35
- /** 规格 ID(可选,针对有规格的商品) */
36
- variant_id?: number;
37
- /** 折扣类型:fixed 固定价格,percentage 百分比折扣 */
38
- discount_type: 'fixed' | 'percentage';
39
- /** 折扣价格或百分比 */
40
- discount_value: string;
41
- /** 最终价格(仅当 discount_type 为 fixed 时) */
42
- final_price?: string;
43
- }
44
- /**
45
- * 报价单模块钩子
46
- */
47
- export declare enum QuotationHooks {
48
- onQuotationLoaded = "quotation:onQuotationLoaded",
49
- onQuotationChanged = "quotation:onQuotationChanged"
50
- }
@@ -1,121 +0,0 @@
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
- }
@@ -1 +0,0 @@
1
- export * from '../../../modules/Schedule/types';
@@ -1,32 +0,0 @@
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[];