@pisell/pisellos 0.0.44 → 0.0.45

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 (127) hide show
  1. package/dist/modules/Account/index.d.ts +2 -6
  2. package/dist/modules/Account/index.js +21 -103
  3. package/dist/modules/Account/types.d.ts +12 -1
  4. package/dist/modules/AccountList/index.d.ts +19 -0
  5. package/dist/modules/AccountList/index.js +224 -70
  6. package/dist/modules/AccountList/types.d.ts +33 -1
  7. package/dist/modules/AccountList/types.js +8 -0
  8. package/dist/modules/AccountList/utils.d.ts +9 -0
  9. package/dist/modules/AccountList/utils.js +25 -0
  10. package/dist/modules/BaseModule.d.ts +2 -2
  11. package/dist/modules/BaseModule.js +1 -1
  12. package/dist/modules/Cart/index.d.ts +5 -5
  13. package/dist/modules/Cart/index.js +32 -19
  14. package/dist/modules/Cart/types.d.ts +18 -4
  15. package/dist/modules/Cart/utils.d.ts +29 -5
  16. package/dist/modules/Cart/utils.js +72 -26
  17. package/dist/modules/Date/index.d.ts +6 -6
  18. package/dist/modules/Date/index.js +41 -55
  19. package/dist/modules/Date/types.d.ts +22 -6
  20. package/dist/modules/Date/utils.d.ts +4 -3
  21. package/dist/modules/Date/utils.js +74 -23
  22. package/dist/modules/Discount/index.d.ts +4 -4
  23. package/dist/modules/Discount/index.js +11 -11
  24. package/dist/modules/Order/index.d.ts +10 -5
  25. package/dist/modules/Order/index.js +32 -16
  26. package/dist/modules/Order/types.d.ts +10 -3
  27. package/dist/modules/Product/index.d.ts +4 -1
  28. package/dist/modules/Product/index.js +22 -0
  29. package/dist/modules/Product/types.d.ts +7 -3
  30. package/dist/modules/ProductList/index.js +11 -5
  31. package/dist/modules/Resource/utils.js +1 -1
  32. package/dist/modules/Rules/index.d.ts +4 -4
  33. package/dist/modules/Rules/index.js +11 -11
  34. package/dist/modules/Rules/types.d.ts +1 -1
  35. package/dist/modules/Schedule/index.d.ts +8 -3
  36. package/dist/modules/Schedule/index.js +45 -5
  37. package/dist/modules/Schedule/type.d.ts +7 -7
  38. package/dist/modules/Schedule/types.d.ts +8 -8
  39. package/dist/modules/Schedule/utils.d.ts +9 -3
  40. package/dist/modules/Schedule/utils.js +77 -48
  41. package/dist/modules/Step/index.d.ts +14 -3
  42. package/dist/modules/Step/index.js +54 -2
  43. package/dist/modules/Summary/index.d.ts +5 -5
  44. package/dist/modules/Summary/index.js +7 -7
  45. package/dist/modules/Summary/types.d.ts +2 -2
  46. package/dist/modules/Summary/utils.d.ts +4 -4
  47. package/dist/modules/Summary/utils.js +3 -3
  48. package/dist/plugins/index.d.ts +3 -3
  49. package/dist/plugins/request.d.ts +3 -3
  50. package/dist/plugins/request.js +30 -30
  51. package/dist/plugins/shopStore.d.ts +1 -1
  52. package/dist/solution/BookingByStep/index.d.ts +65 -16
  53. package/dist/solution/BookingByStep/index.js +553 -216
  54. package/dist/solution/BookingByStep/types.d.ts +2 -2
  55. package/dist/solution/BookingByStep/types.js +9 -9
  56. package/dist/solution/BookingByStep/utils/products.d.ts +1 -1
  57. package/dist/solution/BookingByStep/utils/products.js +3 -0
  58. package/dist/solution/BookingByStep/utils/resources.d.ts +5 -5
  59. package/dist/solution/BookingByStep/utils/resources.js +11 -11
  60. package/dist/solution/ShopDiscount/index.d.ts +4 -4
  61. package/dist/solution/ShopDiscount/index.js +16 -16
  62. package/dist/solution/ShopDiscount/types.d.ts +2 -2
  63. package/dist/solution/ShopDiscount/utils.js +1 -1
  64. package/lib/core/index.js +7 -2
  65. package/lib/modules/Account/index.d.ts +2 -6
  66. package/lib/modules/Account/index.js +15 -30
  67. package/lib/modules/Account/types.d.ts +12 -1
  68. package/lib/modules/AccountList/index.d.ts +19 -0
  69. package/lib/modules/AccountList/index.js +109 -12
  70. package/lib/modules/AccountList/types.d.ts +33 -1
  71. package/lib/modules/AccountList/utils.d.ts +9 -0
  72. package/lib/modules/AccountList/utils.js +39 -0
  73. package/lib/modules/BaseModule.d.ts +2 -2
  74. package/lib/modules/BaseModule.js +14 -3
  75. package/lib/modules/Cart/index.d.ts +5 -5
  76. package/lib/modules/Cart/index.js +27 -6
  77. package/lib/modules/Cart/types.d.ts +18 -4
  78. package/lib/modules/Cart/utils.d.ts +29 -5
  79. package/lib/modules/Cart/utils.js +47 -3
  80. package/lib/modules/Date/index.d.ts +6 -6
  81. package/lib/modules/Date/index.js +6 -6
  82. package/lib/modules/Date/types.d.ts +22 -6
  83. package/lib/modules/Date/utils.d.ts +4 -3
  84. package/lib/modules/Date/utils.js +37 -6
  85. package/lib/modules/Discount/index.d.ts +4 -4
  86. package/lib/modules/Discount/index.js +9 -2
  87. package/lib/modules/Guests/index.js +4 -1
  88. package/lib/modules/Order/index.d.ts +10 -5
  89. package/lib/modules/Order/index.js +11 -1
  90. package/lib/modules/Order/types.d.ts +10 -3
  91. package/lib/modules/Payment/index.js +1 -6
  92. package/lib/modules/Product/index.d.ts +4 -1
  93. package/lib/modules/Product/index.js +16 -0
  94. package/lib/modules/Product/types.d.ts +7 -3
  95. package/lib/modules/ProductList/index.js +21 -7
  96. package/lib/modules/Resource/index.js +4 -1
  97. package/lib/modules/Resource/utils.js +7 -4
  98. package/lib/modules/Rules/index.d.ts +4 -4
  99. package/lib/modules/Rules/types.d.ts +1 -1
  100. package/lib/modules/Schedule/index.d.ts +8 -3
  101. package/lib/modules/Schedule/index.js +33 -2
  102. package/lib/modules/Schedule/type.d.ts +7 -7
  103. package/lib/modules/Schedule/types.d.ts +8 -8
  104. package/lib/modules/Schedule/utils.d.ts +9 -3
  105. package/lib/modules/Schedule/utils.js +32 -4
  106. package/lib/modules/Step/index.d.ts +14 -3
  107. package/lib/modules/Step/index.js +38 -1
  108. package/lib/modules/Summary/index.d.ts +5 -5
  109. package/lib/modules/Summary/types.d.ts +2 -2
  110. package/lib/modules/Summary/utils.d.ts +4 -4
  111. package/lib/plugins/index.d.ts +3 -3
  112. package/lib/plugins/request.d.ts +3 -3
  113. package/lib/plugins/request.js +48 -11
  114. package/lib/plugins/shopStore.d.ts +1 -1
  115. package/lib/solution/BookingByStep/index.d.ts +65 -16
  116. package/lib/solution/BookingByStep/index.js +351 -39
  117. package/lib/solution/BookingByStep/types.d.ts +2 -2
  118. package/lib/solution/BookingByStep/types.js +36 -9
  119. package/lib/solution/BookingByStep/utils/products.d.ts +1 -1
  120. package/lib/solution/BookingByStep/utils/products.js +3 -0
  121. package/lib/solution/BookingByStep/utils/resources.d.ts +5 -5
  122. package/lib/solution/BookingByStep/utils/resources.js +103 -52
  123. package/lib/solution/BuyTickets/index.js +34 -20
  124. package/lib/solution/ShopDiscount/index.d.ts +4 -4
  125. package/lib/solution/ShopDiscount/index.js +10 -2
  126. package/lib/solution/ShopDiscount/types.d.ts +2 -2
  127. package/package.json +4 -2
@@ -52,7 +52,7 @@ export var RequestError = /*#__PURE__*/function (_Error) {
52
52
  _defineProperty(_assertThisInitialized(_this), "response", void 0);
53
53
  _defineProperty(_assertThisInitialized(_this), "request", void 0);
54
54
  _defineProperty(_assertThisInitialized(_this), "config", void 0);
55
- _this.name = "RequestError";
55
+ _this.name = 'RequestError';
56
56
  _this.config = config;
57
57
  _this.request = request;
58
58
  _this.response = response;
@@ -67,19 +67,19 @@ export var RequestError = /*#__PURE__*/function (_Error) {
67
67
  var RequestPluginImpl = /*#__PURE__*/function () {
68
68
  function RequestPluginImpl() {
69
69
  _classCallCheck(this, RequestPluginImpl);
70
- _defineProperty(this, "name", "request");
71
- _defineProperty(this, "version", "1.0.0");
70
+ _defineProperty(this, "name", 'request');
71
+ _defineProperty(this, "version", '1.0.0');
72
72
  _defineProperty(this, "core", null);
73
73
  /**
74
74
  * 默认请求选项
75
75
  */
76
76
  _defineProperty(this, "defaultOptions", {
77
- method: "GET",
77
+ method: 'GET',
78
78
  headers: {
79
- "Content-Type": "application/json"
79
+ 'Content-Type': 'application/json'
80
80
  },
81
81
  timeout: 30000,
82
- responseType: "json"
82
+ responseType: 'json'
83
83
  });
84
84
  /**
85
85
  * 全局拦截器
@@ -96,14 +96,14 @@ var RequestPluginImpl = /*#__PURE__*/function () {
96
96
  // 初始化方法
97
97
  function initialize() {
98
98
  this.core = globalThis.pisellOS;
99
- console.log("[RequestPlugin] 初始化完成");
99
+ console.log('[RequestPlugin] 初始化完成');
100
100
  }
101
101
 
102
102
  // 销毁方法
103
103
  }, {
104
104
  key: "destroy",
105
105
  value: function destroy() {
106
- console.log("[RequestPlugin] 已销毁");
106
+ console.log('[RequestPlugin] 已销毁');
107
107
  }
108
108
 
109
109
  /**
@@ -142,7 +142,7 @@ var RequestPluginImpl = /*#__PURE__*/function () {
142
142
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
143
143
  return this.request(_objectSpread(_objectSpread({}, options), {}, {
144
144
  url: url,
145
- method: "GET"
145
+ method: 'GET'
146
146
  }));
147
147
  }
148
148
 
@@ -155,7 +155,7 @@ var RequestPluginImpl = /*#__PURE__*/function () {
155
155
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
156
156
  return this.request(_objectSpread(_objectSpread({}, options), {}, {
157
157
  url: url,
158
- method: "POST",
158
+ method: 'POST',
159
159
  data: data
160
160
  }));
161
161
  }
@@ -169,7 +169,7 @@ var RequestPluginImpl = /*#__PURE__*/function () {
169
169
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
170
170
  return this.request(_objectSpread(_objectSpread({}, options), {}, {
171
171
  url: url,
172
- method: "PUT",
172
+ method: 'PUT',
173
173
  data: data
174
174
  }));
175
175
  }
@@ -183,7 +183,7 @@ var RequestPluginImpl = /*#__PURE__*/function () {
183
183
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
184
184
  return this.request(_objectSpread(_objectSpread({}, options), {}, {
185
185
  url: url,
186
- method: "DELETE"
186
+ method: 'DELETE'
187
187
  }));
188
188
  }
189
189
 
@@ -202,10 +202,10 @@ var RequestPluginImpl = /*#__PURE__*/function () {
202
202
  config = _objectSpread(_objectSpread(_objectSpread({}, this.defaultOptions), options), {}, {
203
203
  headers: _objectSpread(_objectSpread({}, this.defaultOptions.headers), options.headers)
204
204
  });
205
- if (!config.headers["authorization"] && this.core) {
206
- windowPlugin = this.core.getPlugin("window");
205
+ if (!config.headers['authorization'] && this.core) {
206
+ windowPlugin = this.core.getPlugin('window');
207
207
  if (windowPlugin) {
208
- config.headers["authorization"] = windowPlugin.localStorage.getItem("token") || "";
208
+ config.headers['authorization'] = windowPlugin.localStorage.getItem('token') || '';
209
209
  }
210
210
  }
211
211
 
@@ -229,7 +229,7 @@ var RequestPluginImpl = /*#__PURE__*/function () {
229
229
  case 13:
230
230
  _context.prev = 13;
231
231
  _context.t0 = _context["catch"](7);
232
- _requestError2 = _context.t0 instanceof RequestError ? _context.t0 : new RequestError(_context.t0 instanceof Error ? _context.t0.message : "请求拦截器错误", config); // 应用错误拦截器
232
+ _requestError2 = _context.t0 instanceof RequestError ? _context.t0 : new RequestError(_context.t0 instanceof Error ? _context.t0.message : '请求拦截器错误', config); // 应用错误拦截器
233
233
  _processedError2 = _requestError2;
234
234
  _iterator5 = _createForOfIteratorHelper(this.interceptors.error);
235
235
  _context.prev = 18;
@@ -307,7 +307,7 @@ var RequestPluginImpl = /*#__PURE__*/function () {
307
307
  case 67:
308
308
  _context.prev = 67;
309
309
  _context.t4 = _context["catch"](61);
310
- requestError = _context.t4 instanceof RequestError ? _context.t4 : new RequestError(_context.t4 instanceof Error ? _context.t4.message : "响应拦截器错误", config, null, _response); // 应用错误拦截器
310
+ requestError = _context.t4 instanceof RequestError ? _context.t4 : new RequestError(_context.t4 instanceof Error ? _context.t4.message : '响应拦截器错误', config, null, _response); // 应用错误拦截器
311
311
  processedError = requestError;
312
312
  _iterator3 = _createForOfIteratorHelper(this.interceptors.error);
313
313
  _context.prev = 72;
@@ -363,7 +363,7 @@ var RequestPluginImpl = /*#__PURE__*/function () {
363
363
  case 108:
364
364
  _context.prev = 108;
365
365
  _context.t8 = _context["catch"](51);
366
- _requestError = _context.t8 instanceof RequestError ? _context.t8 : new RequestError(_context.t8 instanceof Error ? _context.t8.message : "请求错误", config); // 应用错误拦截器
366
+ _requestError = _context.t8 instanceof RequestError ? _context.t8 : new RequestError(_context.t8 instanceof Error ? _context.t8.message : '请求错误', config); // 应用错误拦截器
367
367
  _processedError = _requestError;
368
368
  _iterator4 = _createForOfIteratorHelper(this.interceptors.error);
369
369
  _context.prev = 113;
@@ -429,7 +429,7 @@ var RequestPluginImpl = /*#__PURE__*/function () {
429
429
  _context2.next = 3;
430
430
  break;
431
431
  }
432
- throw new RequestError("URL不能为空", config);
432
+ throw new RequestError('URL不能为空', config);
433
433
  case 3:
434
434
  // 处理 URL 参数
435
435
  fullUrl = url;
@@ -439,22 +439,22 @@ var RequestPluginImpl = /*#__PURE__*/function () {
439
439
  key = _ref2[0],
440
440
  value = _ref2[1];
441
441
  return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(String(value)));
442
- }).join("&");
443
- fullUrl += (url.includes("?") ? "&" : "?") + queryString;
442
+ }).join('&');
443
+ fullUrl += (url.includes('?') ? '&' : '?') + queryString;
444
444
  }
445
445
 
446
446
  // 准备请求选项
447
447
  fetchOptions = {
448
448
  method: method,
449
449
  headers: _objectSpread({}, headers),
450
- credentials: withCredentials ? "include" : "same-origin"
450
+ credentials: withCredentials ? 'include' : 'same-origin'
451
451
  }; // 处理请求体
452
- if (data !== undefined && method !== "GET" && method !== "HEAD") {
452
+ if (data !== undefined && method !== 'GET' && method !== 'HEAD') {
453
453
  if (data instanceof FormData) {
454
454
  fetchOptions.body = data;
455
455
  // 当使用 FormData 时,删除 Content-Type,让浏览器自动设置
456
- delete fetchOptions.headers["Content-Type"];
457
- } else if (_typeof(data) === "object") {
456
+ delete fetchOptions.headers['Content-Type'];
457
+ } else if (_typeof(data) === 'object') {
458
458
  fetchOptions.body = JSON.stringify(data);
459
459
  } else {
460
460
  fetchOptions.body = data;
@@ -471,7 +471,7 @@ var RequestPluginImpl = /*#__PURE__*/function () {
471
471
  });
472
472
  _context2.prev = 8;
473
473
  // 发起请求,并竞争超时
474
- fetchPromise = typeof fetch !== "undefined" ? fetch(fullUrl, fetchOptions) : Promise.reject(new RequestError("当前环境不支持 fetch API", config));
474
+ fetchPromise = typeof fetch !== 'undefined' ? fetch(fullUrl, fetchOptions) : Promise.reject(new RequestError('当前环境不支持 fetch API', config));
475
475
  _context2.next = 12;
476
476
  return Promise.race([fetchPromise, timeoutPromise]);
477
477
  case 12:
@@ -483,7 +483,7 @@ var RequestPluginImpl = /*#__PURE__*/function () {
483
483
  });
484
484
 
485
485
  // 解析响应内容
486
- if (!(responseType === "json")) {
486
+ if (!(responseType === 'json')) {
487
487
  _context2.next = 29;
488
488
  break;
489
489
  }
@@ -505,7 +505,7 @@ var RequestPluginImpl = /*#__PURE__*/function () {
505
505
  _context2.next = 58;
506
506
  break;
507
507
  case 29:
508
- if (!(responseType === "text")) {
508
+ if (!(responseType === 'text')) {
509
509
  _context2.next = 35;
510
510
  break;
511
511
  }
@@ -516,7 +516,7 @@ var RequestPluginImpl = /*#__PURE__*/function () {
516
516
  _context2.next = 58;
517
517
  break;
518
518
  case 35:
519
- if (!(responseType === "arraybuffer")) {
519
+ if (!(responseType === 'arraybuffer')) {
520
520
  _context2.next = 41;
521
521
  break;
522
522
  }
@@ -527,7 +527,7 @@ var RequestPluginImpl = /*#__PURE__*/function () {
527
527
  _context2.next = 58;
528
528
  break;
529
529
  case 41:
530
- if (!(responseType === "blob")) {
530
+ if (!(responseType === 'blob')) {
531
531
  _context2.next = 47;
532
532
  break;
533
533
  }
@@ -1,4 +1,4 @@
1
- import { Plugin } from "../types";
1
+ import { Plugin } from '../types';
2
2
  export interface ShopStorePlugin extends Plugin {
3
3
  get(model: string): any;
4
4
  }
@@ -1,12 +1,14 @@
1
- import { Module, PisellCore } from "../../types";
2
- import { BaseModule } from "../../modules/BaseModule";
3
- import { Response } from "../../plugins";
4
- import { BookingByStepState } from "./types";
5
- import { CartItem, IUpdateItemParams, ProductData } from "../../modules";
6
- import { Account } from "../../modules/Account/types";
7
- import { IStep } from "../../modules/Step/tyeps";
8
- import { TimeSliceItem } from "./utils/resources";
9
- import { ITime } from "../../modules/Date/types";
1
+ import { Module, PisellCore } from '../../types';
2
+ import { BaseModule } from '../../modules/BaseModule';
3
+ import { Response } from '../../plugins';
4
+ import { BookingByStepState } from './types';
5
+ import { CartItem, IUpdateItemParams, ProductData } from '../../modules';
6
+ import { Account } from '../../modules/Account/types';
7
+ import { IStep } from '../../modules/Step/tyeps';
8
+ import { TimeSliceItem } from './utils/resources';
9
+ import { ITime } from '../../modules/Date/types';
10
+ import dayjs from 'dayjs';
11
+ import { IHolder, IFetchHolderAccountsParams } from '../../modules/AccountList/types';
10
12
  export declare class BookingByStepImpl extends BaseModule implements Module {
11
13
  protected defaultName: string;
12
14
  protected defaultVersion: string;
@@ -17,6 +19,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
17
19
  private store;
18
20
  private otherParams;
19
21
  private cacheId;
22
+ private otherData;
20
23
  initialize(core: PisellCore, options: any): Promise<void>;
21
24
  initStep(stepList: (keyof BookingByStepState)[]): void;
22
25
  getCurrentStep(): {
@@ -27,26 +30,42 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
27
30
  back(): void;
28
31
  gotoStep(index: number): void;
29
32
  getStepList(): IStep[];
30
- loadProducts({ category_ids, product_ids, collection, schedule_ids }: {
33
+ /**
34
+ * 添加step
35
+ */
36
+ addStep(step: IStep, key?: string): void;
37
+ /**
38
+ * 删除step
39
+ */
40
+ removeStep(key: string): void;
41
+ loadProducts({ category_ids, product_ids, collection, schedule_ids, }: {
31
42
  category_ids?: number[];
32
43
  product_ids?: number[];
33
44
  collection?: number | string[];
34
45
  schedule_ids?: number[];
35
46
  }): Promise<any>;
36
- loadProductByScheduleDate(date: string): void;
47
+ loadProductByScheduleDate(date: string): Promise<any>;
37
48
  loadAllSchedule(): Promise<void>;
38
- loadAvailableDate({ startDate, endDate, custom_page_id }: {
49
+ loadScheduleAvailableDate({ startDate, endDate, custom_page_id, }: {
39
50
  startDate: string;
40
51
  endDate: string;
41
52
  custom_page_id?: number;
42
- }): Promise<void>;
53
+ }): Promise<ITime[]>;
43
54
  storeProduct(productData: ProductData): Promise<void>;
44
- addAccount(accounts: Account[]): Promise<void>;
55
+ addAccount(accounts: Account[] | IHolder[], extra?: {
56
+ type: 'account' | 'holder';
57
+ customerId: number;
58
+ }): Promise<void>;
45
59
  getAccounts(): Promise<(Account | null)[]>;
46
60
  checkHasLoginAccount(): boolean;
47
61
  setActiveAccount(id: string): void;
48
62
  getActiveAccount(): Account | null;
49
63
  removeAccount(id: string): void;
64
+ /**
65
+ * 获取holder类型账户列表
66
+ * @param params
67
+ */
68
+ fetchHolderAccountsAsync(params: IFetchHolderAccountsParams): Promise<void>;
50
69
  setDateRange(dateRange: ITime[]): Promise<void>;
51
70
  clearDateRange(): void;
52
71
  getDateRange(): Promise<ITime[]>;
@@ -55,6 +74,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
55
74
  products?: ProductData[];
56
75
  startDate?: string;
57
76
  endDate?: string;
77
+ type?: 'month' | 'day';
58
78
  }): Promise<ITime[]>;
59
79
  /**
60
80
  * 获取购物车汇总信息
@@ -78,6 +98,12 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
78
98
  setLoginAccount(accountId: string, accountInfo: Account): Promise<void>;
79
99
  generateCartData(): Promise<void>;
80
100
  getFreeProduct(id: string | number): Promise<Response<any>>;
101
+ /**
102
+ * 检查购物车提交订单前是否符合条件
103
+ * @param type 类型 "holder" | "account"
104
+ * @returns boolean
105
+ */
106
+ checkBeforeSubmitOrder(type: 'holder' | 'account'): boolean;
81
107
  submitOrder(): Promise<void>;
82
108
  pay(): Promise<void>;
83
109
  getPayInfo(): Promise<void>;
@@ -96,7 +122,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
96
122
  /**
97
123
  * 从购物车中按类别删除信息
98
124
  */
99
- deleteCartItemInfo(types: "resource" | "time"): void;
125
+ deleteCartItemInfo(types: 'resource' | 'time'): void;
100
126
  destroy(): void;
101
127
  getResourcesList(): any[];
102
128
  getResourcesListByCartItem(id: string | number): {
@@ -123,7 +149,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
123
149
  timeSlots: any[];
124
150
  selectedResource: any;
125
151
  } | undefined;
126
- autoSelectAccountResources({ holder_id, resources_code, timeSlots, countMap, capacity }: {
152
+ autoSelectAccountResources({ holder_id, resources_code, timeSlots, countMap, capacity, }: {
127
153
  holder_id: string;
128
154
  resources_code: string | number;
129
155
  timeSlots?: TimeSliceItem;
@@ -143,5 +169,28 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
143
169
  submitTimeSlot(timeSlots: TimeSliceItem): void;
144
170
  clearCache(): void;
145
171
  clearCacheByModule(module: string): void;
172
+ private getScheduleDataByIds;
146
173
  openProductDetail(productId: number): Promise<void>;
174
+ closeProductDetail(): void;
175
+ getTimeslotBySchedule({ date, scheduleIds, }: {
176
+ date: string;
177
+ scheduleIds: number[];
178
+ }): {
179
+ start_time: string;
180
+ end_time: string;
181
+ start_at: dayjs.Dayjs;
182
+ end_at: dayjs.Dayjs;
183
+ count: number;
184
+ }[];
185
+ addProductToCart({ product, date, account, }: {
186
+ product: ProductData;
187
+ date: {
188
+ startTime: string;
189
+ endTime: string;
190
+ };
191
+ account: Account;
192
+ }): void;
193
+ setOtherData(key: string, value: any): void;
194
+ getOtherData(key: string): any;
195
+ getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
147
196
  }