@pisell/pisellos 3.0.55 → 3.0.57
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.
- package/dist/core/index.js +2 -1
- package/dist/effects/index.d.ts +4 -3
- package/dist/effects/index.js +15 -6
- package/dist/modules/AccountList/index.d.ts +7 -1
- package/dist/modules/AccountList/index.js +81 -14
- package/dist/modules/AccountList/types.d.ts +28 -0
- package/dist/modules/AccountList/types.js +8 -0
- package/dist/modules/Cart/index.js +1 -1
- package/dist/modules/Cart/utils/changePrice.d.ts +2 -2
- package/dist/modules/Cart/utils/changePrice.js +1 -1
- package/dist/modules/Customer/constants.d.ts +7 -0
- package/dist/modules/Customer/constants.js +12 -0
- package/dist/modules/Customer/index.d.ts +122 -0
- package/dist/modules/Customer/index.js +697 -0
- package/dist/modules/Customer/types.d.ts +146 -0
- package/dist/modules/Customer/types.js +41 -0
- package/dist/modules/Payment/cash.d.ts +11 -0
- package/dist/modules/Payment/cash.js +78 -0
- package/dist/modules/Payment/eftpos.d.ts +11 -0
- package/dist/modules/Payment/eftpos.js +80 -0
- package/dist/modules/Payment/index.d.ts +273 -9
- package/dist/modules/Payment/index.js +2525 -109
- package/dist/modules/Payment/types.d.ts +382 -30
- package/dist/modules/Payment/types.js +116 -14
- package/dist/modules/Payment/wallet.d.ts +11 -0
- package/dist/modules/Payment/wallet.js +78 -0
- package/dist/modules/Payment/walletpass.d.ts +0 -0
- package/dist/modules/Payment/walletpass.js +0 -0
- package/dist/modules/ProductList/index.d.ts +14 -3
- package/dist/modules/ProductList/index.js +58 -44
- package/dist/modules/ProductList/types.d.ts +0 -1
- package/dist/modules/Rules/index.js +27 -14
- package/dist/modules/Rules/types.d.ts +1 -0
- package/dist/modules/index.d.ts +1 -0
- package/dist/modules/index.js +1 -0
- package/dist/plugins/app-types/app/app.d.ts +83 -0
- package/dist/plugins/app-types/app/const.d.ts +4 -0
- package/dist/plugins/app-types/app/index.d.ts +14 -0
- package/dist/plugins/app-types/applicationManager/application.d.ts +50 -0
- package/dist/plugins/app-types/applicationManager/index.d.ts +13 -0
- package/dist/plugins/app-types/config.d.ts +3 -0
- package/dist/plugins/app-types/cookie/index.d.ts +13 -0
- package/dist/plugins/app-types/data/index.d.ts +8 -0
- package/dist/plugins/app-types/history/config.d.ts +24 -0
- package/dist/plugins/app-types/history/index.d.ts +20 -0
- package/dist/plugins/app-types/history/type.d.ts +2 -0
- package/dist/plugins/app-types/hooks/index.d.ts +12 -0
- package/dist/plugins/app-types/hooks/useDelayedValue/index.d.ts +2 -0
- package/dist/plugins/app-types/hooks/useDispatch/index.d.ts +2 -0
- package/dist/plugins/app-types/hooks/useLowCode/index.d.ts +13 -0
- package/dist/plugins/app-types/hooks/useStore/index.d.ts +6 -0
- package/dist/plugins/app-types/index.d.ts +6 -0
- package/dist/plugins/app-types/indexDB/index.d.ts +178 -0
- package/dist/plugins/app-types/locales/en.d.ts +3 -0
- package/dist/plugins/app-types/locales/index.d.ts +37 -0
- package/dist/plugins/app-types/locales/original.d.ts +3 -0
- package/dist/plugins/app-types/locales/type.d.ts +19 -0
- package/dist/plugins/app-types/locales/zh-CN.d.ts +3 -0
- package/dist/plugins/app-types/locales/zh-HK.d.ts +3 -0
- package/dist/plugins/app-types/logger/feishu.d.ts +11 -0
- package/dist/plugins/app-types/logger/index.d.ts +122 -0
- package/dist/plugins/app-types/menuManager/hooks.d.ts +17 -0
- package/dist/plugins/app-types/menuManager/index.d.ts +28 -0
- package/dist/plugins/app-types/models/global.d.ts +32 -0
- package/dist/plugins/app-types/models/index.d.ts +45 -0
- package/dist/plugins/app-types/models/type.d.ts +2 -0
- package/dist/plugins/app-types/package.json +15 -0
- package/dist/plugins/app-types/plugin/index.d.ts +0 -0
- package/dist/plugins/app-types/pubsub/example.d.ts +5 -0
- package/dist/plugins/app-types/pubsub/index.d.ts +63 -0
- package/dist/plugins/app-types/request/cache.d.ts +46 -0
- package/dist/plugins/app-types/request/cancelToken.d.ts +38 -0
- package/dist/plugins/app-types/request/config.d.ts +3 -0
- package/dist/plugins/app-types/request/constants.d.ts +2 -0
- package/dist/plugins/app-types/request/index.d.ts +24 -0
- package/dist/plugins/app-types/request/pisell2Request.d.ts +6 -0
- package/dist/plugins/app-types/request/type.d.ts +41 -0
- package/dist/plugins/app-types/request/utils.d.ts +46 -0
- package/dist/plugins/app-types/routes/config.d.ts +7 -0
- package/dist/plugins/app-types/routes/index.d.ts +28 -0
- package/dist/plugins/app-types/socket/components/SocketMonitorPage.d.ts +6 -0
- package/dist/plugins/app-types/socket/components/index.d.ts +2 -0
- package/dist/plugins/app-types/socket/constants.d.ts +33 -0
- package/dist/plugins/app-types/socket/events.d.ts +31 -0
- package/dist/plugins/app-types/socket/heartbeat.d.ts +66 -0
- package/dist/plugins/app-types/socket/index.d.ts +61 -0
- package/dist/plugins/app-types/socket/monitor.d.ts +169 -0
- package/dist/plugins/app-types/socket/reconnect.d.ts +61 -0
- package/dist/plugins/app-types/socket/socket.d.ts +129 -0
- package/dist/plugins/app-types/socket/types.d.ts +85 -0
- package/dist/plugins/app-types/storage/index.d.ts +17 -0
- package/dist/plugins/app-types/tasks/index.d.ts +77 -0
- package/dist/plugins/app-types/tasks/type.d.ts +62 -0
- package/dist/plugins/app-types/tasks/useTasks.d.ts +5 -0
- package/dist/plugins/app-types/type.d.ts +2 -0
- package/dist/plugins/app-types/variables/VariablesProvider.d.ts +7 -0
- package/dist/plugins/app-types/variables/config.d.ts +3 -0
- package/dist/plugins/app-types/variables/index.d.ts +6 -0
- package/dist/plugins/app-types/variables/type.d.ts +2 -0
- package/dist/plugins/app-types/website/index.d.ts +6 -0
- package/dist/plugins/app.d.ts +8 -0
- package/dist/plugins/app.js +1 -0
- package/dist/plugins/window.d.ts +1 -0
- package/dist/solution/BookingByStep/index.js +59 -35
- package/dist/solution/BookingByStep/types.d.ts +3 -2
- package/dist/solution/BookingTicket/index.d.ts +172 -0
- package/dist/solution/BookingTicket/index.js +665 -0
- package/dist/solution/BookingTicket/types.d.ts +68 -0
- package/dist/solution/BookingTicket/types.js +43 -0
- package/dist/solution/BookingTicket/utils/scan/cloudSearch.d.ts +22 -0
- package/dist/solution/BookingTicket/utils/scan/cloudSearch.js +159 -0
- package/dist/solution/BookingTicket/utils/scan/handleScan.d.ts +16 -0
- package/dist/solution/BookingTicket/utils/scan/handleScan.js +174 -0
- package/dist/solution/BookingTicket/utils/scan/index.d.ts +81 -0
- package/dist/solution/BookingTicket/utils/scan/index.js +285 -0
- package/dist/solution/BookingTicket/utils/scan/scanCache.d.ts +78 -0
- package/dist/solution/BookingTicket/utils/scan/scanCache.js +305 -0
- package/dist/solution/BuyTickets/index.d.ts +2 -2
- package/dist/solution/BuyTickets/index.js +1 -1
- package/dist/solution/Checkout/appointmentDemo.json +1 -0
- package/dist/solution/Checkout/index.d.ts +181 -0
- package/dist/solution/Checkout/index.js +1596 -0
- package/dist/solution/Checkout/types.d.ts +550 -0
- package/dist/solution/Checkout/types.js +132 -0
- package/dist/solution/Checkout/utils/index.d.ts +73 -0
- package/dist/solution/Checkout/utils/index.js +371 -0
- package/dist/solution/ShopDiscount/index.js +4 -2
- package/dist/solution/index.d.ts +2 -0
- package/dist/solution/index.js +3 -1
- package/dist/types/index.d.ts +3 -1
- package/dist/utils/task.d.ts +40 -0
- package/dist/utils/task.js +171 -0
- package/dist/utils/watch.d.ts +102 -0
- package/dist/utils/watch.js +294 -0
- package/lib/core/index.js +1 -1
- package/lib/effects/index.d.ts +4 -3
- package/lib/effects/index.js +4 -1
- package/lib/modules/AccountList/index.d.ts +7 -1
- package/lib/modules/AccountList/index.js +27 -0
- package/lib/modules/AccountList/types.d.ts +28 -0
- package/lib/modules/Cart/index.js +1 -1
- package/lib/modules/Cart/utils/changePrice.d.ts +2 -2
- package/lib/modules/Cart/utils/changePrice.js +1 -1
- package/lib/modules/Customer/constants.d.ts +7 -0
- package/lib/modules/Customer/constants.js +39 -0
- package/lib/modules/Customer/index.d.ts +122 -0
- package/lib/modules/Customer/index.js +440 -0
- package/lib/modules/Customer/types.d.ts +146 -0
- package/lib/modules/Customer/types.js +37 -0
- package/lib/modules/Payment/cash.d.ts +11 -0
- package/lib/modules/Payment/cash.js +51 -0
- package/lib/modules/Payment/eftpos.d.ts +11 -0
- package/lib/modules/Payment/eftpos.js +51 -0
- package/lib/modules/Payment/index.d.ts +273 -9
- package/lib/modules/Payment/index.js +1285 -50
- package/lib/modules/Payment/types.d.ts +382 -30
- package/lib/modules/Payment/types.js +41 -6
- package/lib/modules/Payment/wallet.d.ts +11 -0
- package/lib/modules/Payment/wallet.js +51 -0
- package/lib/modules/Payment/walletpass.d.ts +0 -0
- package/lib/modules/Payment/walletpass.js +0 -0
- package/lib/modules/ProductList/index.d.ts +14 -3
- package/lib/modules/ProductList/index.js +42 -28
- package/lib/modules/ProductList/types.d.ts +0 -1
- package/lib/modules/Rules/index.js +20 -12
- package/lib/modules/Rules/types.d.ts +1 -0
- package/lib/modules/index.d.ts +1 -0
- package/lib/modules/index.js +2 -0
- package/lib/plugins/app-types/app/app.d.ts +83 -0
- package/lib/plugins/app-types/app/const.d.ts +4 -0
- package/lib/plugins/app-types/app/index.d.ts +14 -0
- package/lib/plugins/app-types/applicationManager/application.d.ts +50 -0
- package/lib/plugins/app-types/applicationManager/index.d.ts +13 -0
- package/lib/plugins/app-types/config.d.ts +3 -0
- package/lib/plugins/app-types/cookie/index.d.ts +13 -0
- package/lib/plugins/app-types/data/index.d.ts +8 -0
- package/lib/plugins/app-types/history/config.d.ts +24 -0
- package/lib/plugins/app-types/history/index.d.ts +20 -0
- package/lib/plugins/app-types/history/type.d.ts +2 -0
- package/lib/plugins/app-types/hooks/index.d.ts +12 -0
- package/lib/plugins/app-types/hooks/useDelayedValue/index.d.ts +2 -0
- package/lib/plugins/app-types/hooks/useDispatch/index.d.ts +2 -0
- package/lib/plugins/app-types/hooks/useLowCode/index.d.ts +13 -0
- package/lib/plugins/app-types/hooks/useStore/index.d.ts +6 -0
- package/lib/plugins/app-types/index.d.ts +6 -0
- package/lib/plugins/app-types/indexDB/index.d.ts +178 -0
- package/lib/plugins/app-types/locales/en.d.ts +3 -0
- package/lib/plugins/app-types/locales/index.d.ts +37 -0
- package/lib/plugins/app-types/locales/original.d.ts +3 -0
- package/lib/plugins/app-types/locales/type.d.ts +19 -0
- package/lib/plugins/app-types/locales/zh-CN.d.ts +3 -0
- package/lib/plugins/app-types/locales/zh-HK.d.ts +3 -0
- package/lib/plugins/app-types/logger/feishu.d.ts +11 -0
- package/lib/plugins/app-types/logger/index.d.ts +122 -0
- package/lib/plugins/app-types/menuManager/hooks.d.ts +17 -0
- package/lib/plugins/app-types/menuManager/index.d.ts +28 -0
- package/lib/plugins/app-types/models/global.d.ts +32 -0
- package/lib/plugins/app-types/models/index.d.ts +45 -0
- package/lib/plugins/app-types/models/type.d.ts +2 -0
- package/lib/plugins/app-types/package.json +15 -0
- package/lib/plugins/app-types/plugin/index.d.ts +0 -0
- package/lib/plugins/app-types/pubsub/example.d.ts +5 -0
- package/lib/plugins/app-types/pubsub/index.d.ts +63 -0
- package/lib/plugins/app-types/request/cache.d.ts +46 -0
- package/lib/plugins/app-types/request/cancelToken.d.ts +38 -0
- package/lib/plugins/app-types/request/config.d.ts +3 -0
- package/lib/plugins/app-types/request/constants.d.ts +2 -0
- package/lib/plugins/app-types/request/index.d.ts +24 -0
- package/lib/plugins/app-types/request/pisell2Request.d.ts +6 -0
- package/lib/plugins/app-types/request/type.d.ts +41 -0
- package/lib/plugins/app-types/request/utils.d.ts +46 -0
- package/lib/plugins/app-types/routes/config.d.ts +7 -0
- package/lib/plugins/app-types/routes/index.d.ts +28 -0
- package/lib/plugins/app-types/socket/components/SocketMonitorPage.d.ts +6 -0
- package/lib/plugins/app-types/socket/components/index.d.ts +2 -0
- package/lib/plugins/app-types/socket/constants.d.ts +33 -0
- package/lib/plugins/app-types/socket/events.d.ts +31 -0
- package/lib/plugins/app-types/socket/heartbeat.d.ts +66 -0
- package/lib/plugins/app-types/socket/index.d.ts +61 -0
- package/lib/plugins/app-types/socket/monitor.d.ts +169 -0
- package/lib/plugins/app-types/socket/reconnect.d.ts +61 -0
- package/lib/plugins/app-types/socket/socket.d.ts +129 -0
- package/lib/plugins/app-types/socket/types.d.ts +85 -0
- package/lib/plugins/app-types/storage/index.d.ts +17 -0
- package/lib/plugins/app-types/tasks/index.d.ts +77 -0
- package/lib/plugins/app-types/tasks/type.d.ts +62 -0
- package/lib/plugins/app-types/tasks/useTasks.d.ts +5 -0
- package/lib/plugins/app-types/type.d.ts +2 -0
- package/lib/plugins/app-types/variables/VariablesProvider.d.ts +7 -0
- package/lib/plugins/app-types/variables/config.d.ts +3 -0
- package/lib/plugins/app-types/variables/index.d.ts +6 -0
- package/lib/plugins/app-types/variables/type.d.ts +2 -0
- package/lib/plugins/app-types/website/index.d.ts +6 -0
- package/lib/plugins/app.d.ts +8 -0
- package/lib/plugins/app.js +17 -0
- package/lib/plugins/window.d.ts +1 -0
- package/lib/solution/BookingByStep/index.js +40 -29
- package/lib/solution/BookingByStep/types.d.ts +3 -2
- package/lib/solution/BookingTicket/index.d.ts +172 -0
- package/lib/solution/BookingTicket/index.js +399 -0
- package/lib/solution/BookingTicket/types.d.ts +68 -0
- package/lib/solution/BookingTicket/types.js +72 -0
- package/lib/solution/BookingTicket/utils/scan/cloudSearch.d.ts +22 -0
- package/lib/solution/BookingTicket/utils/scan/cloudSearch.js +117 -0
- package/lib/solution/BookingTicket/utils/scan/handleScan.d.ts +16 -0
- package/lib/solution/BookingTicket/utils/scan/handleScan.js +125 -0
- package/lib/solution/BookingTicket/utils/scan/index.d.ts +81 -0
- package/lib/solution/BookingTicket/utils/scan/index.js +210 -0
- package/lib/solution/BookingTicket/utils/scan/scanCache.d.ts +78 -0
- package/lib/solution/BookingTicket/utils/scan/scanCache.js +231 -0
- package/lib/solution/BuyTickets/index.d.ts +2 -2
- package/lib/solution/BuyTickets/index.js +1 -1
- package/lib/solution/Checkout/appointmentDemo.json +1 -0
- package/lib/solution/Checkout/index.d.ts +181 -0
- package/lib/solution/Checkout/index.js +864 -0
- package/lib/solution/Checkout/types.d.ts +550 -0
- package/lib/solution/Checkout/types.js +75 -0
- package/lib/solution/Checkout/utils/index.d.ts +73 -0
- package/lib/solution/Checkout/utils/index.js +266 -0
- package/lib/solution/ShopDiscount/index.js +2 -1
- package/lib/solution/index.d.ts +2 -0
- package/lib/solution/index.js +5 -1
- package/lib/types/index.d.ts +3 -1
- package/lib/utils/task.d.ts +40 -0
- package/lib/utils/task.js +109 -0
- package/lib/utils/watch.d.ts +102 -0
- package/lib/utils/watch.js +217 -0
- package/package.json +4 -2
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { SocketOptions, SocketStatus } from "./types";
|
|
2
|
+
import { SocketMonitor, SocketMonitorOptions } from "./monitor";
|
|
3
|
+
/**
|
|
4
|
+
* Socket主类
|
|
5
|
+
* 负责管理WebSocket连接、消息收发、事件处理、心跳检测和断线重连
|
|
6
|
+
*/
|
|
7
|
+
export declare class Socket {
|
|
8
|
+
private ws;
|
|
9
|
+
private url;
|
|
10
|
+
private options;
|
|
11
|
+
private status;
|
|
12
|
+
private eventHandlers;
|
|
13
|
+
private heartbeatManager;
|
|
14
|
+
private reconnectManager;
|
|
15
|
+
private monitor;
|
|
16
|
+
private messageIdCounter;
|
|
17
|
+
/**
|
|
18
|
+
* 创建Socket实例
|
|
19
|
+
* @param options Socket配置选项
|
|
20
|
+
*/
|
|
21
|
+
constructor(options: SocketOptions);
|
|
22
|
+
/**
|
|
23
|
+
* 建立WebSocket连接
|
|
24
|
+
*/
|
|
25
|
+
connect(): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* 关闭WebSocket连接
|
|
28
|
+
*/
|
|
29
|
+
disconnect(): void;
|
|
30
|
+
/**
|
|
31
|
+
* 发送消息到服务器
|
|
32
|
+
* @param event 事件名称
|
|
33
|
+
* @param data 消息数据
|
|
34
|
+
* @param id 消息ID(可选,默认自动生成)
|
|
35
|
+
*/
|
|
36
|
+
send(type: string, data?: any, id?: string): void;
|
|
37
|
+
/**
|
|
38
|
+
* 发送原始消息
|
|
39
|
+
* @param message 消息对象
|
|
40
|
+
*/
|
|
41
|
+
private sendRaw;
|
|
42
|
+
/**
|
|
43
|
+
* 注册事件监听器
|
|
44
|
+
* @param event 事件名称
|
|
45
|
+
* @param handler 事件处理函数
|
|
46
|
+
*/
|
|
47
|
+
on(event: string, handler: (...args: any[]) => void): void;
|
|
48
|
+
/**
|
|
49
|
+
* 移除事件监听器
|
|
50
|
+
* @param event 事件名称
|
|
51
|
+
* @param handler 事件处理函数(可选,不提供则移除所有该事件的处理函数)
|
|
52
|
+
*/
|
|
53
|
+
off(event: string, handler?: (...args: any[]) => void): void;
|
|
54
|
+
/**
|
|
55
|
+
* 触发事件
|
|
56
|
+
* @param event 事件名称
|
|
57
|
+
* @param args 事件参数
|
|
58
|
+
*/
|
|
59
|
+
private emit;
|
|
60
|
+
/**
|
|
61
|
+
* 获取当前连接状态
|
|
62
|
+
*/
|
|
63
|
+
getStatus(): SocketStatus;
|
|
64
|
+
/**
|
|
65
|
+
* 获取当前状态描述
|
|
66
|
+
*/
|
|
67
|
+
getStatusText(): string;
|
|
68
|
+
/**
|
|
69
|
+
* 检查是否已连接
|
|
70
|
+
*/
|
|
71
|
+
isConnected(): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* 设置连接状态
|
|
74
|
+
*/
|
|
75
|
+
private setStatus;
|
|
76
|
+
/**
|
|
77
|
+
* 设置WebSocket事件监听器
|
|
78
|
+
*/
|
|
79
|
+
private setupWebSocketListeners;
|
|
80
|
+
/**
|
|
81
|
+
* 处理接收到的消息
|
|
82
|
+
*/
|
|
83
|
+
private handleMessage;
|
|
84
|
+
/**
|
|
85
|
+
* 处理连接关闭
|
|
86
|
+
*/
|
|
87
|
+
private handleConnectionClosed;
|
|
88
|
+
/**
|
|
89
|
+
* 处理连接失败
|
|
90
|
+
*/
|
|
91
|
+
private handleConnectionFailure;
|
|
92
|
+
/**
|
|
93
|
+
* 处理心跳响应
|
|
94
|
+
*/
|
|
95
|
+
private handleHeartbeatResponse;
|
|
96
|
+
/**
|
|
97
|
+
* 初始化心跳检测
|
|
98
|
+
*/
|
|
99
|
+
private initHeartbeat;
|
|
100
|
+
/**
|
|
101
|
+
* 初始化重连管理
|
|
102
|
+
*/
|
|
103
|
+
private initReconnect;
|
|
104
|
+
/**
|
|
105
|
+
* 开始重连过程
|
|
106
|
+
*/
|
|
107
|
+
private startReconnection;
|
|
108
|
+
/**
|
|
109
|
+
* 生成消息ID
|
|
110
|
+
*/
|
|
111
|
+
private generateMessageId;
|
|
112
|
+
/**
|
|
113
|
+
* 启用监控功能
|
|
114
|
+
* @param options 监控配置选项
|
|
115
|
+
*/
|
|
116
|
+
enableMonitoring(options?: SocketMonitorOptions): SocketMonitor;
|
|
117
|
+
/**
|
|
118
|
+
* 禁用监控功能
|
|
119
|
+
*/
|
|
120
|
+
disableMonitoring(): void;
|
|
121
|
+
/**
|
|
122
|
+
* 获取监控器实例
|
|
123
|
+
*/
|
|
124
|
+
getMonitor(): SocketMonitor | null;
|
|
125
|
+
/**
|
|
126
|
+
* 释放资源
|
|
127
|
+
*/
|
|
128
|
+
destroy(): void;
|
|
129
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Socket配置选项
|
|
3
|
+
*/
|
|
4
|
+
export interface SocketOptions {
|
|
5
|
+
/** 是否自动连接 */
|
|
6
|
+
autoConnect?: boolean;
|
|
7
|
+
/** 是否启用重连功能 */
|
|
8
|
+
reconnection?: boolean;
|
|
9
|
+
/** 最大重连尝试次数,默认无限 */
|
|
10
|
+
reconnectionAttempts?: number;
|
|
11
|
+
/** 重连延迟时间(毫秒) */
|
|
12
|
+
reconnectionDelay?: number;
|
|
13
|
+
/** 最大重连延迟时间(毫秒) */
|
|
14
|
+
reconnectionDelayMax?: number;
|
|
15
|
+
/** 是否启用心跳检测 */
|
|
16
|
+
heartbeat?: boolean;
|
|
17
|
+
/** 心跳间隔时间(毫秒) */
|
|
18
|
+
heartbeatInterval?: number;
|
|
19
|
+
/** 请求超时时间(毫秒) */
|
|
20
|
+
timeout?: number;
|
|
21
|
+
/** 心跳超时时间(毫秒) */
|
|
22
|
+
heartbeatTimeout?: number;
|
|
23
|
+
/** 自定义协议 */
|
|
24
|
+
protocols?: string | string[];
|
|
25
|
+
/** 连接URL */
|
|
26
|
+
url: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Socket连接状态
|
|
30
|
+
*/
|
|
31
|
+
export declare enum SocketStatus {
|
|
32
|
+
CONNECTING = 0,
|
|
33
|
+
OPEN = 1,
|
|
34
|
+
CLOSING = 2,
|
|
35
|
+
CLOSED = 3,
|
|
36
|
+
RECONNECTING = 4
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Socket消息格式
|
|
40
|
+
*/
|
|
41
|
+
export interface SocketMessage<T = any> {
|
|
42
|
+
/** 事件类型 */
|
|
43
|
+
type: string;
|
|
44
|
+
/** 消息数据 */
|
|
45
|
+
data?: T;
|
|
46
|
+
/** 消息ID */
|
|
47
|
+
id?: string;
|
|
48
|
+
event?: any;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* 心跳配置选项
|
|
52
|
+
*/
|
|
53
|
+
export interface HeartbeatOptions {
|
|
54
|
+
/** 心跳间隔时间(毫秒) */
|
|
55
|
+
interval: number;
|
|
56
|
+
/** 心跳超时时间(毫秒) */
|
|
57
|
+
timeout: number;
|
|
58
|
+
/** 心跳探测消息 */
|
|
59
|
+
message?: SocketMessage;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* 重连配置选项
|
|
63
|
+
*/
|
|
64
|
+
export interface ReconnectOptions {
|
|
65
|
+
/** 是否启用重连 */
|
|
66
|
+
enabled: boolean;
|
|
67
|
+
/** 最大重连尝试次数 */
|
|
68
|
+
attempts?: number;
|
|
69
|
+
/** 重连延迟时间(毫秒) */
|
|
70
|
+
delay: number;
|
|
71
|
+
/** 最大重连延迟时间(毫秒) */
|
|
72
|
+
delayMax?: number;
|
|
73
|
+
/** 是否使用指数退避算法 */
|
|
74
|
+
jitter?: boolean;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* 事件处理函数类型
|
|
78
|
+
*/
|
|
79
|
+
export type EventHandler = (...args: any[]) => void;
|
|
80
|
+
/**
|
|
81
|
+
* 事件处理函数映射
|
|
82
|
+
*/
|
|
83
|
+
export interface EventHandlerMap {
|
|
84
|
+
[event: string]: EventHandler[];
|
|
85
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import App from '../app';
|
|
2
|
+
export interface StorageOptions {
|
|
3
|
+
storageKey?: string;
|
|
4
|
+
removeStorageAfter?: (key: string) => void;
|
|
5
|
+
setStorageAfter?: (key: string, value: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare class Storage {
|
|
8
|
+
private storageKey;
|
|
9
|
+
private app?;
|
|
10
|
+
private options;
|
|
11
|
+
constructor(app?: App, options?: StorageOptions);
|
|
12
|
+
createKey: (key: string) => string;
|
|
13
|
+
setStorage: (key: string, value: string) => void;
|
|
14
|
+
getStorage: (key: string) => string | null;
|
|
15
|
+
removeStorage: (key: string) => void;
|
|
16
|
+
clear: () => void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Task, TasksModule, RunTaskParams, AddTaskParams, DeleteTaskParams } from "./type";
|
|
2
|
+
import App from "../app";
|
|
3
|
+
export declare class TasksManager {
|
|
4
|
+
private static instance;
|
|
5
|
+
private taskFunctions;
|
|
6
|
+
private tasks;
|
|
7
|
+
private app;
|
|
8
|
+
private db;
|
|
9
|
+
useTasks: () => {
|
|
10
|
+
tasks: TasksModule;
|
|
11
|
+
};
|
|
12
|
+
watchTaskCallback: (taskModule: TasksModule) => void;
|
|
13
|
+
constructor(app: App);
|
|
14
|
+
static getInstance(app?: App): TasksManager;
|
|
15
|
+
addTaskFunction<T>(name: string, fun: T): void;
|
|
16
|
+
addTaskFunctions<T>(tasks: {
|
|
17
|
+
name: string;
|
|
18
|
+
fun: T;
|
|
19
|
+
}[]): void;
|
|
20
|
+
getTasks(): TasksModule;
|
|
21
|
+
getTaskFunction(name: string): any;
|
|
22
|
+
init(): Promise<void>;
|
|
23
|
+
private saveTaskQueueToLocal;
|
|
24
|
+
private loadTaskQueueFromLocal;
|
|
25
|
+
/**
|
|
26
|
+
* @title: 执行任务
|
|
27
|
+
* @description:
|
|
28
|
+
* @param {Task} task
|
|
29
|
+
* @return {*}
|
|
30
|
+
* @Author: zhiwei.Wang
|
|
31
|
+
* @Date: 2024-09-26 13:53
|
|
32
|
+
*/
|
|
33
|
+
private runTask;
|
|
34
|
+
/**
|
|
35
|
+
* @title: 启动轮询
|
|
36
|
+
* @description: 根据轮询间隔定期执行任务
|
|
37
|
+
* @param {Task} task
|
|
38
|
+
* @return {*}
|
|
39
|
+
*/
|
|
40
|
+
private startPolling;
|
|
41
|
+
/**
|
|
42
|
+
* @title: 创建任务数据
|
|
43
|
+
* @description:
|
|
44
|
+
* @param {Partial} payload
|
|
45
|
+
* @return {*}
|
|
46
|
+
* @Author: zhiwei.Wang
|
|
47
|
+
* @Date: 2024-09-26 13:54
|
|
48
|
+
*/
|
|
49
|
+
private createTaskData;
|
|
50
|
+
private getTaskQueue;
|
|
51
|
+
private timeout;
|
|
52
|
+
/**
|
|
53
|
+
* @title: 执行任务队列
|
|
54
|
+
* @description:
|
|
55
|
+
* @return {*}
|
|
56
|
+
* @Author: zhiwei.Wang
|
|
57
|
+
* @Date: 2024-09-26 13:52
|
|
58
|
+
*/
|
|
59
|
+
run(payload: RunTaskParams): Promise<void>;
|
|
60
|
+
deleteTask(payload: DeleteTaskParams): void;
|
|
61
|
+
/**
|
|
62
|
+
* @title: 重试任务
|
|
63
|
+
* @description:
|
|
64
|
+
* @return {*}
|
|
65
|
+
* @Author: zhiwei.Wang
|
|
66
|
+
* @Date: 2024-09-26 13:53
|
|
67
|
+
*/
|
|
68
|
+
retryTask(payload: RunTaskParams): void;
|
|
69
|
+
addTask(payload: AddTaskParams): void;
|
|
70
|
+
private updateTask;
|
|
71
|
+
private updateQueueStatus;
|
|
72
|
+
private setTasks;
|
|
73
|
+
clearAllTaskTimer(tasks: Task[]): void;
|
|
74
|
+
clearTasks(payload: RunTaskParams): void;
|
|
75
|
+
clearAllTasks(): void;
|
|
76
|
+
watchTask(callback: (taskModule: TasksModule) => void): void;
|
|
77
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export type TaskRunStatus = "pending" | "in-progress" | "success" | "failure";
|
|
2
|
+
export interface Task {
|
|
3
|
+
id?: string;
|
|
4
|
+
type?: "local" | "cloud";
|
|
5
|
+
retries?: number;
|
|
6
|
+
maxRetries?: number;
|
|
7
|
+
status?: TaskRunStatus;
|
|
8
|
+
action: string;
|
|
9
|
+
payload: any;
|
|
10
|
+
beforeAction?: string;
|
|
11
|
+
beforePayload?: any;
|
|
12
|
+
afterAction?: string;
|
|
13
|
+
afterPayload?: any;
|
|
14
|
+
polling?: {
|
|
15
|
+
interval?: number;
|
|
16
|
+
};
|
|
17
|
+
pollingResult?: {
|
|
18
|
+
count: number;
|
|
19
|
+
timerId?: any;
|
|
20
|
+
};
|
|
21
|
+
manual?: boolean;
|
|
22
|
+
destroy?: boolean;
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
}
|
|
25
|
+
export interface TaskConfig {
|
|
26
|
+
tasks: Task[];
|
|
27
|
+
}
|
|
28
|
+
type TaskModuleName = string;
|
|
29
|
+
type TaskQueueName = string;
|
|
30
|
+
type TaskStatus = "uncompleted" | "completed";
|
|
31
|
+
export interface TaskQueue {
|
|
32
|
+
status: TaskStatus;
|
|
33
|
+
tasks: Task[];
|
|
34
|
+
}
|
|
35
|
+
export interface RunTaskParams {
|
|
36
|
+
module: TaskModuleName;
|
|
37
|
+
queueId: TaskQueueName;
|
|
38
|
+
callback?: () => void;
|
|
39
|
+
}
|
|
40
|
+
export interface DeleteTaskParams {
|
|
41
|
+
module: TaskModuleName;
|
|
42
|
+
queueId: TaskQueueName;
|
|
43
|
+
taskId: string;
|
|
44
|
+
}
|
|
45
|
+
export interface AddTaskParams {
|
|
46
|
+
module: TaskModuleName;
|
|
47
|
+
queueId: TaskQueueName;
|
|
48
|
+
tasks: Task[];
|
|
49
|
+
}
|
|
50
|
+
export interface TaskRunResult {
|
|
51
|
+
status: TaskRunStatus;
|
|
52
|
+
[key: string]: any;
|
|
53
|
+
}
|
|
54
|
+
export interface TasksModule {
|
|
55
|
+
[key: TaskModuleName]: {
|
|
56
|
+
[key: TaskQueueName]: {
|
|
57
|
+
status: TaskStatus;
|
|
58
|
+
tasks: Task[];
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
|
|
15
|
+
// src/plugins/app.ts
|
|
16
|
+
var app_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(app_exports);
|
package/lib/plugins/window.d.ts
CHANGED
|
@@ -93,8 +93,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
93
93
|
"step",
|
|
94
94
|
"products",
|
|
95
95
|
"date",
|
|
96
|
-
"order"
|
|
97
|
-
"payment"
|
|
96
|
+
"order"
|
|
98
97
|
];
|
|
99
98
|
moduleArr.forEach((step) => {
|
|
100
99
|
var _a2, _b2;
|
|
@@ -390,7 +389,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
390
389
|
}
|
|
391
390
|
// 获取商品/服务的可用日期
|
|
392
391
|
async getAvailableDate(params = {}) {
|
|
393
|
-
var _a, _b, _c;
|
|
392
|
+
var _a, _b, _c, _d;
|
|
394
393
|
let { products, startDate, endDate, type, useCache = true } = params;
|
|
395
394
|
if ((0, import_dayjs.default)(startDate).isBefore((0, import_dayjs.default)(), "day") && ((0, import_dayjs.default)(endDate).isAfter((0, import_dayjs.default)(), "day") || (0, import_dayjs.default)(endDate).isSame((0, import_dayjs.default)(), "day"))) {
|
|
396
395
|
startDate = (0, import_dayjs.default)().format("YYYY-MM-DD");
|
|
@@ -407,14 +406,14 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
407
406
|
if (this.store.currentProduct) {
|
|
408
407
|
tempProducts = [
|
|
409
408
|
{
|
|
410
|
-
...this.store.currentProduct
|
|
411
|
-
_schedule: this.store.
|
|
409
|
+
...this.store.currentProduct,
|
|
410
|
+
_schedule: (_a = this.store.currentProductMeta) == null ? void 0 : _a["schedule"]
|
|
412
411
|
}
|
|
413
412
|
];
|
|
414
413
|
}
|
|
415
414
|
let dateRange = this.store.date.getDateRange();
|
|
416
|
-
const tempStartDate = startDate || ((
|
|
417
|
-
const tempEndDate = endDate || ((
|
|
415
|
+
const tempStartDate = startDate || ((_b = dateRange == null ? void 0 : dateRange[0]) == null ? void 0 : _b.date);
|
|
416
|
+
const tempEndDate = endDate || ((_c = dateRange == null ? void 0 : dateRange[1]) == null ? void 0 : _c.date) || ((_d = dateRange == null ? void 0 : dateRange[0]) == null ? void 0 : _d.date);
|
|
418
417
|
if (!tempProducts.length) {
|
|
419
418
|
return [];
|
|
420
419
|
}
|
|
@@ -1596,15 +1595,17 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
1596
1595
|
}
|
|
1597
1596
|
// 打开某个商品详情的弹窗,OS 层这边会记录当前选中的商品,适用于 session 类商品预约
|
|
1598
1597
|
async openProductDetail(productId) {
|
|
1599
|
-
const
|
|
1600
|
-
if (
|
|
1601
|
-
|
|
1602
|
-
this.store.
|
|
1598
|
+
const targetProductData = await this.store.products.getProduct(productId);
|
|
1599
|
+
if (targetProductData) {
|
|
1600
|
+
this.store.currentProduct = targetProductData;
|
|
1601
|
+
this.store.currentProductMeta = {};
|
|
1603
1602
|
if (targetProductData["schedule.ids"]) {
|
|
1604
1603
|
const newScheduleArr = this.getScheduleDataByIds(
|
|
1605
1604
|
targetProductData["schedule.ids"]
|
|
1606
1605
|
);
|
|
1607
|
-
|
|
1606
|
+
if (!this.store.currentProductMeta)
|
|
1607
|
+
this.store.currentProductMeta = {};
|
|
1608
|
+
this.store.currentProductMeta.schedule = newScheduleArr;
|
|
1608
1609
|
} else if (targetProductData.duration) {
|
|
1609
1610
|
const dateRange = this.store.date.getDateRange();
|
|
1610
1611
|
if (!(dateRange == null ? void 0 : dateRange.length))
|
|
@@ -1618,8 +1619,9 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
1618
1619
|
}
|
|
1619
1620
|
}
|
|
1620
1621
|
closeProductDetail() {
|
|
1621
|
-
|
|
1622
|
-
|
|
1622
|
+
if (this.store.currentProductMeta) {
|
|
1623
|
+
this.store.currentProductMeta.schedule = [];
|
|
1624
|
+
}
|
|
1623
1625
|
this.store.currentProduct = void 0;
|
|
1624
1626
|
}
|
|
1625
1627
|
getTimeslotBySchedule({
|
|
@@ -1628,9 +1630,9 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
1628
1630
|
resources,
|
|
1629
1631
|
product
|
|
1630
1632
|
}) {
|
|
1631
|
-
var _a, _b, _c, _d, _e
|
|
1633
|
+
var _a, _b, _c, _d, _e;
|
|
1632
1634
|
const targetProduct = this.store.currentProduct;
|
|
1633
|
-
const targetProductData = product ||
|
|
1635
|
+
const targetProductData = product || targetProduct;
|
|
1634
1636
|
let targetSchedules = [];
|
|
1635
1637
|
if (scheduleIds == null ? void 0 : scheduleIds.length) {
|
|
1636
1638
|
targetSchedules = this.store.schedule.getScheduleListByIds(scheduleIds);
|
|
@@ -1650,7 +1652,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
1650
1652
|
);
|
|
1651
1653
|
const productResources = (0, import_resources.getResourcesByProduct)(
|
|
1652
1654
|
resourcesMap,
|
|
1653
|
-
resources || ((
|
|
1655
|
+
resources || ((_b = (_a = this.store.currentProduct) == null ? void 0 : _a.product_resource) == null ? void 0 : _b.resources) || [],
|
|
1654
1656
|
selectedResources,
|
|
1655
1657
|
1
|
|
1656
1658
|
);
|
|
@@ -1671,9 +1673,9 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
1671
1673
|
return -1;
|
|
1672
1674
|
return 0;
|
|
1673
1675
|
});
|
|
1674
|
-
const firstEnabledResourceId = (
|
|
1676
|
+
const firstEnabledResourceId = (_e = (_d = (_c = targetProductData == null ? void 0 : targetProductData.product_resource) == null ? void 0 : _c.resources) == null ? void 0 : _d.find(
|
|
1675
1677
|
(n) => n.status === 1
|
|
1676
|
-
)) == null ? void 0 :
|
|
1678
|
+
)) == null ? void 0 : _e.id;
|
|
1677
1679
|
const formatScheduleTimeSlots = scheduleTimeSlots.map((item) => {
|
|
1678
1680
|
const resourcesUseableMap = {};
|
|
1679
1681
|
let count = 0;
|
|
@@ -1747,9 +1749,16 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
1747
1749
|
return this.otherData[key];
|
|
1748
1750
|
}
|
|
1749
1751
|
async getProductTypeById(id) {
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1752
|
+
var _a;
|
|
1753
|
+
const productData = await this.store.products.getProduct(id);
|
|
1754
|
+
if (productData) {
|
|
1755
|
+
if (productData.duration) {
|
|
1756
|
+
return "duration";
|
|
1757
|
+
}
|
|
1758
|
+
if ((_a = productData["schedule.ids"]) == null ? void 0 : _a.length) {
|
|
1759
|
+
return "session";
|
|
1760
|
+
}
|
|
1761
|
+
return "normal";
|
|
1753
1762
|
}
|
|
1754
1763
|
return "normal";
|
|
1755
1764
|
}
|
|
@@ -1910,7 +1919,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
1910
1919
|
return results;
|
|
1911
1920
|
}
|
|
1912
1921
|
async getAvailableDateForSessionOptimize(params = {}) {
|
|
1913
|
-
var _a, _b, _c, _d
|
|
1922
|
+
var _a, _b, _c, _d;
|
|
1914
1923
|
let { startDate, endDate } = params;
|
|
1915
1924
|
if ((0, import_dayjs.default)(startDate).isBefore((0, import_dayjs.default)(), "day") && ((0, import_dayjs.default)(endDate).isAfter((0, import_dayjs.default)(), "day") || (0, import_dayjs.default)(endDate).isSame((0, import_dayjs.default)(), "day"))) {
|
|
1916
1925
|
startDate = (0, import_dayjs.default)().format("YYYY-MM-DD");
|
|
@@ -1926,7 +1935,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
1926
1935
|
tempEndDate = endDate || "";
|
|
1927
1936
|
}
|
|
1928
1937
|
endDate = tempEndDate;
|
|
1929
|
-
const cache = (_a = this.store.
|
|
1938
|
+
const cache = (_a = this.store.currentProductMeta) == null ? void 0 : _a["timeSlotBySchedule"];
|
|
1930
1939
|
if (cache) {
|
|
1931
1940
|
if ((0, import_dayjs.default)(params.startDate).isSameOrAfter((0, import_dayjs.default)(cache.startDate), "day") && (0, import_dayjs.default)(params.endDate).isSameOrBefore((0, import_dayjs.default)(cache.endDate), "day")) {
|
|
1932
1941
|
this.store.date.setDateList(cache.dateList);
|
|
@@ -1937,8 +1946,8 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
1937
1946
|
}
|
|
1938
1947
|
}
|
|
1939
1948
|
let tempProducts;
|
|
1940
|
-
tempProducts =
|
|
1941
|
-
const schedule = (
|
|
1949
|
+
tempProducts = this.store.currentProduct;
|
|
1950
|
+
const schedule = (_b = this.store.currentProductMeta) == null ? void 0 : _b["schedule"];
|
|
1942
1951
|
const filteredSchedule = (0, import_resources.filterScheduleByDateRange)(
|
|
1943
1952
|
schedule,
|
|
1944
1953
|
startDate || "",
|
|
@@ -1955,7 +1964,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
1955
1964
|
let dates = [];
|
|
1956
1965
|
let currentDate = (0, import_dayjs.default)(startDate);
|
|
1957
1966
|
let firstAvailableDate = "";
|
|
1958
|
-
const openResources = ((
|
|
1967
|
+
const openResources = ((_d = (_c = tempProducts == null ? void 0 : tempProducts.product_resource) == null ? void 0 : _c.resources) == null ? void 0 : _d.filter(
|
|
1959
1968
|
(m) => m.status === 1
|
|
1960
1969
|
)) || [];
|
|
1961
1970
|
const allProductResources = (0, import_resources.sortCombinedResources)(res.data);
|
|
@@ -2056,12 +2065,14 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
2056
2065
|
}
|
|
2057
2066
|
dates = (0, import_utils3.handleAvailableDateByResource)(res.data, dates);
|
|
2058
2067
|
this.store.date.setDateList(dates);
|
|
2059
|
-
(
|
|
2068
|
+
if (!this.store.currentProductMeta)
|
|
2069
|
+
this.store.currentProductMeta = {};
|
|
2070
|
+
this.store.currentProductMeta.timeSlotBySchedule = {
|
|
2060
2071
|
dateList: dates,
|
|
2061
2072
|
firstAvailableDate,
|
|
2062
2073
|
startDate,
|
|
2063
2074
|
endDate: (0, import_dayjs.default)(currentDate).format("YYYY-MM-DD")
|
|
2064
|
-
}
|
|
2075
|
+
};
|
|
2065
2076
|
return {
|
|
2066
2077
|
dateList: dates,
|
|
2067
2078
|
firstAvailableDate
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProductList, CartModule,
|
|
1
|
+
import { ProductList, CartModule, ProductData, AccountModule, AccountListModule, DateModule, GuestListModule, OrderModule, PaymentModule, ResourceListModule, StepModule, SummaryModule, ScheduleModule } from '../../modules';
|
|
2
2
|
export interface BookingByStepState {
|
|
3
3
|
cart: CartModule;
|
|
4
4
|
summary: SummaryModule;
|
|
@@ -11,7 +11,8 @@ export interface BookingByStepState {
|
|
|
11
11
|
accountList: AccountListModule;
|
|
12
12
|
order: OrderModule;
|
|
13
13
|
payment: PaymentModule;
|
|
14
|
-
currentProduct?:
|
|
14
|
+
currentProduct?: ProductData;
|
|
15
|
+
currentProductMeta?: Record<string, any>;
|
|
15
16
|
schedule: ScheduleModule;
|
|
16
17
|
}
|
|
17
18
|
export declare function createModule<T extends keyof BookingByStepState>(moduleName: T, solutionName: string, name?: string, version?: string): BookingByStepState[T];
|