@pisell/pisellos 2.2.294 → 2.2.296

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 (72) hide show
  1. package/dist/model/strategy/adapter/itemRule/adapter.d.ts +1 -4
  2. package/dist/model/strategy/adapter/itemRule/adapter.js +35 -135
  3. package/dist/model/strategy/adapter/itemRule/evaluator.d.ts +1 -8
  4. package/dist/model/strategy/adapter/itemRule/evaluator.js +1 -25
  5. package/dist/model/strategy/adapter/itemRule/type.d.ts +0 -44
  6. package/dist/model/strategy/adapter/itemRule/type.js +1 -19
  7. package/dist/modules/Order/index.d.ts +3 -18
  8. package/dist/modules/Order/index.js +485 -885
  9. package/dist/modules/Order/types.d.ts +5 -91
  10. package/dist/modules/Order/types.js +0 -5
  11. package/dist/modules/Order/utils.js +10 -22
  12. package/dist/modules/ProductList/index.d.ts +1 -2
  13. package/dist/modules/ProductList/index.js +20 -100
  14. package/dist/modules/ProductList/types.d.ts +0 -10
  15. package/dist/server/index.d.ts +0 -6
  16. package/dist/server/index.js +3 -43
  17. package/dist/server/utils/small-ticket.js +49 -1
  18. package/dist/solution/BaseSales/index.d.ts +1 -9
  19. package/dist/solution/BaseSales/index.js +706 -894
  20. package/dist/solution/BookingByStep/index.d.ts +2 -2
  21. package/dist/solution/BookingTicket/utils/orderCustomer.js +2 -3
  22. package/dist/solution/RegisterAndLogin/config.d.ts +3 -9
  23. package/dist/solution/RegisterAndLogin/config.js +40 -95
  24. package/dist/solution/RegisterAndLogin/index.js +1 -4
  25. package/dist/solution/ScanOrder/index.d.ts +0 -1
  26. package/dist/solution/ScanOrder/index.js +27 -31
  27. package/dist/solution/ScanOrder/utils.d.ts +0 -1
  28. package/dist/solution/ScanOrder/utils.js +0 -2
  29. package/dist/solution/UnifiedBookingSales/index.d.ts +2 -15
  30. package/dist/solution/UnifiedBookingSales/index.js +484 -752
  31. package/dist/solution/UnifiedBookingSales/types.d.ts +1 -14
  32. package/dist/solution/VenueBooking/index.d.ts +0 -1
  33. package/dist/solution/VenueBooking/index.js +4 -8
  34. package/lib/model/strategy/adapter/itemRule/adapter.d.ts +1 -4
  35. package/lib/model/strategy/adapter/itemRule/adapter.js +4 -73
  36. package/lib/model/strategy/adapter/itemRule/evaluator.d.ts +1 -8
  37. package/lib/model/strategy/adapter/itemRule/evaluator.js +1 -23
  38. package/lib/model/strategy/adapter/itemRule/type.d.ts +0 -44
  39. package/lib/model/strategy/adapter/itemRule/type.js +1 -19
  40. package/lib/model/strategy/adapter/promotion/index.js +1 -46
  41. package/lib/modules/Order/index.d.ts +3 -18
  42. package/lib/modules/Order/index.js +28 -325
  43. package/lib/modules/Order/types.d.ts +5 -91
  44. package/lib/modules/Order/types.js +0 -4
  45. package/lib/modules/Order/utils.js +1 -13
  46. package/lib/modules/ProductList/index.d.ts +1 -2
  47. package/lib/modules/ProductList/index.js +2 -47
  48. package/lib/modules/ProductList/types.d.ts +0 -10
  49. package/lib/server/index.d.ts +0 -6
  50. package/lib/server/index.js +3 -37
  51. package/lib/server/utils/small-ticket.js +50 -1
  52. package/lib/solution/BaseSales/index.d.ts +1 -9
  53. package/lib/solution/BaseSales/index.js +1 -105
  54. package/lib/solution/BookingByStep/index.d.ts +2 -2
  55. package/lib/solution/BookingTicket/utils/orderCustomer.js +1 -2
  56. package/lib/solution/RegisterAndLogin/config.d.ts +3 -9
  57. package/lib/solution/RegisterAndLogin/config.js +8 -49
  58. package/lib/solution/RegisterAndLogin/index.js +1 -4
  59. package/lib/solution/ScanOrder/index.d.ts +0 -1
  60. package/lib/solution/ScanOrder/index.js +1 -5
  61. package/lib/solution/ScanOrder/utils.d.ts +0 -1
  62. package/lib/solution/ScanOrder/utils.js +0 -1
  63. package/lib/solution/UnifiedBookingSales/index.d.ts +2 -15
  64. package/lib/solution/UnifiedBookingSales/index.js +1 -125
  65. package/lib/solution/UnifiedBookingSales/types.d.ts +1 -14
  66. package/lib/solution/VenueBooking/index.d.ts +0 -1
  67. package/lib/solution/VenueBooking/index.js +1 -5
  68. package/package.json +1 -1
  69. package/dist/modules/Order/salesNotes.d.ts +0 -31
  70. package/dist/modules/Order/salesNotes.js +0 -492
  71. package/lib/modules/Order/salesNotes.d.ts +0 -31
  72. package/lib/modules/Order/salesNotes.js +0 -382
@@ -326,7 +326,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
326
326
  date: string;
327
327
  status: string;
328
328
  week: string;
329
- weekNum: 0 | 5 | 3 | 1 | 2 | 4 | 6;
329
+ weekNum: 0 | 2 | 1 | 6 | 4 | 3 | 5;
330
330
  }[]>;
331
331
  submitTimeSlot(timeSlots: TimeSliceItem): void;
332
332
  private getScheduleDataByIds;
@@ -345,7 +345,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
345
345
  count: number;
346
346
  left: number;
347
347
  summaryCount: number;
348
- status: "sold_out" | "lots_of_space" | "filling_up_fast";
348
+ status: "lots_of_space" | "filling_up_fast" | "sold_out";
349
349
  }[];
350
350
  /**
351
351
  * 找到多个资源的公共可用时间段
@@ -18,9 +18,8 @@ function resolveCustomerDisplayName(customer) {
18
18
 
19
19
  /** 将 ICustomer 格式化为写入 tempOrder 的协议字段。 */
20
20
  export function formatOrderCustomerPatch(customer) {
21
- var _ref, _c$customer_id, _customer$phone, _customer$email, _country_calling_code, _country_calling_code2;
22
- var c = customer;
23
- var rawId = (_ref = (_c$customer_id = c.customer_id) !== null && _c$customer_id !== void 0 ? _c$customer_id : c.customerId) !== null && _ref !== void 0 ? _ref : customer.id;
21
+ var _customer$phone, _customer$email, _country_calling_code, _country_calling_code2;
22
+ var rawId = customer.id;
24
23
  var numericId = typeof rawId === 'number' ? rawId : rawId !== undefined && rawId !== null && rawId !== '' ? Number(rawId) : null;
25
24
  return {
26
25
  customer_id: Number.isFinite(numericId) ? numericId : null,
@@ -10,11 +10,7 @@ export interface ApiConfig {
10
10
  method: 'GET' | 'POST' | 'PUT' | 'DELETE';
11
11
  transformParams?: (params: any) => any;
12
12
  transformResponse?: (response: any) => any;
13
- options?: Record<string, any> | ((params: any) => Record<string, any>);
14
- }
15
- export interface ApiCallerOptions {
16
- baseUrl?: string;
17
- shopDomain?: string;
13
+ options?: Record<string, any>;
18
14
  }
19
15
  /**
20
16
  * 渠道配置接口
@@ -69,14 +65,12 @@ export declare function getChannelConfig(channel: string): ChannelConfig;
69
65
  export declare class ApiCaller {
70
66
  private request;
71
67
  private config;
72
- private options;
73
68
  constructor(request: {
74
69
  get: <T = any>(url: string, data?: any, options?: any) => Promise<T>;
75
70
  post: <T = any>(url: string, data?: any, options?: any) => Promise<T>;
76
71
  put: <T = any>(url: string, data?: any, options?: any) => Promise<T>;
77
72
  delete: <T = any>(url: string, options?: any) => Promise<T>;
78
- }, config: ChannelConfig, options?: ApiCallerOptions);
79
- private resolveUrl;
73
+ }, config: ChannelConfig);
80
74
  /**
81
75
  * 执行 API 调用
82
76
  */
@@ -90,4 +84,4 @@ export declare function createApiCaller(request: {
90
84
  post: <T = any>(url: string, data?: any, options?: any) => Promise<T>;
91
85
  put: <T = any>(url: string, data?: any, options?: any) => Promise<T>;
92
86
  delete: <T = any>(url: string, options?: any) => Promise<T>;
93
- }, channel: string, options?: ApiCallerOptions): ApiCaller;
87
+ }, channel: string): ApiCaller;
@@ -1,24 +1,15 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["withCredentials"];
3
2
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
3
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
6
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
5
7
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
6
8
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
7
9
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
8
10
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
9
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
10
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
11
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
12
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
13
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
14
11
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
15
12
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
16
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
17
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
18
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
19
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
20
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
21
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
22
13
  /**
23
14
  * 注册登录解决方案配置
24
15
  * 根据不同渠道配置不同的接口地址和参数
@@ -28,8 +19,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
28
19
  * API 配置接口
29
20
  */
30
21
 
31
- var h5CustomerAuthApiNames = new Set(['sendEmailVerificationCode', 'sendEmailLoginCode', 'sendSmsRegisterCode', 'sendEmailRegisterLink', 'verifyEmailRegistrationLink', 'emailPasswordLogin', 'emailCodeRegister', 'phoneCodeRegister', 'resendEmailRegisterLink', 'checkEmailLinkCode', 'sendSmsLoginCode', 'phoneCodeLogin', 'guestLogin', 'checkEmailExists', 'checkEmailCode', 'checkMobileCode', 'phonePasswordLogin', 'sendPasswordResetEmail', 'sendPasswordResetSms', 'sendResetPasswordLink', 'checkResetPasswordCode', 'resetPasswordByCode', 'resetPasswordByEmail', 'resetPasswordByPhone', 'verifyCode', 'register', 'login', 'oauthLogin', 'facebookLogin', 'appleLogin']);
32
-
33
22
  /**
34
23
  * 渠道配置接口
35
24
  */
@@ -361,31 +350,6 @@ var onlineStoreConfig = {
361
350
  }
362
351
  }
363
352
  };
364
- function withH5AuthPrefix(config) {
365
- var nextConfig = {};
366
- Object.entries(config).forEach(function (_ref) {
367
- var _ref2 = _slicedToArray(_ref, 2),
368
- key = _ref2[0],
369
- apiConfig = _ref2[1];
370
- if (!apiConfig.url.startsWith('/auth/')) {
371
- nextConfig[key] = apiConfig;
372
- return;
373
- }
374
- nextConfig[key] = _objectSpread(_objectSpread({}, apiConfig), {}, {
375
- url: apiConfig.url.startsWith('/h5/') ? apiConfig.url : "/h5".concat(apiConfig.url),
376
- options: function options(params) {
377
- var _ref3 = (typeof apiConfig.options === 'function' ? apiConfig.options(params) : apiConfig.options) || {},
378
- withCredentials = _ref3.withCredentials,
379
- baseOptions = _objectWithoutProperties(_ref3, _excluded);
380
- return _objectSpread(_objectSpread({}, baseOptions), {}, {
381
- prefix: false
382
- });
383
- }
384
- });
385
- });
386
- return nextConfig;
387
- }
388
- var h5OnlineStoreConfig = withH5AuthPrefix(onlineStoreConfig);
389
353
 
390
354
  /**
391
355
  * 默认配置(通用配置)
@@ -1382,7 +1346,6 @@ var shopWebposConfig = {
1382
1346
  */
1383
1347
  export var channelConfigMap = {
1384
1348
  'online-store': onlineStoreConfig,
1385
- 'online-store-h5': h5OnlineStoreConfig,
1386
1349
  'default': defaultConfig,
1387
1350
  'webpos': webposConfig,
1388
1351
  'shop.webpos': shopWebposConfig
@@ -1401,25 +1364,15 @@ export function getChannelConfig(channel) {
1401
1364
  */
1402
1365
  export var ApiCaller = /*#__PURE__*/function () {
1403
1366
  function ApiCaller(request, config) {
1404
- var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1405
1367
  _classCallCheck(this, ApiCaller);
1406
1368
  this.request = request;
1407
1369
  this.config = config;
1408
- this.options = options;
1409
1370
  }
1410
- _createClass(ApiCaller, [{
1411
- key: "resolveUrl",
1412
- value: function resolveUrl(url) {
1413
- if (!this.options.baseUrl || !url.startsWith('/h5/auth/')) {
1414
- return url;
1415
- }
1416
- return "".concat(this.options.baseUrl.replace(/\/$/, '')).concat(url);
1417
- }
1418
1371
 
1419
- /**
1420
- * 执行 API 调用
1421
- */
1422
- }, {
1372
+ /**
1373
+ * 执行 API 调用
1374
+ */
1375
+ _createClass(ApiCaller, [{
1423
1376
  key: "call",
1424
1377
  value: (function () {
1425
1378
  var _call = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(apiName, params, additionalOptions) {
@@ -1444,15 +1397,7 @@ export var ApiCaller = /*#__PURE__*/function () {
1444
1397
  }
1445
1398
 
1446
1399
  // 构建请求选项
1447
- requestOptions = _objectSpread(_objectSpread({}, options), additionalOptions);
1448
- if (apiConfig.url.startsWith('/h5/auth/') && h5CustomerAuthApiNames.has(apiName)) {
1449
- requestOptions.h5CustomerAuth = true;
1450
- if (this.options.shopDomain) {
1451
- requestOptions.h5AuthShopDomain = this.options.shopDomain;
1452
- }
1453
- }
1454
-
1455
- // 处理动态 headers
1400
+ requestOptions = _objectSpread(_objectSpread({}, options), additionalOptions); // 处理动态 headers
1456
1401
  if (requestOptions.headers && typeof requestOptions.headers === 'function') {
1457
1402
  requestOptions.headers = requestOptions.headers(params);
1458
1403
  }
@@ -1460,49 +1405,49 @@ export var ApiCaller = /*#__PURE__*/function () {
1460
1405
 
1461
1406
  // 根据 HTTP 方法调用对应的请求方法
1462
1407
  _context.t0 = apiConfig.method;
1463
- _context.next = _context.t0 === 'GET' ? 13 : _context.t0 === 'POST' ? 23 : _context.t0 === 'PUT' ? 27 : _context.t0 === 'DELETE' ? 31 : 35;
1408
+ _context.next = _context.t0 === 'GET' ? 12 : _context.t0 === 'POST' ? 22 : _context.t0 === 'PUT' ? 26 : _context.t0 === 'DELETE' ? 30 : 34;
1464
1409
  break;
1465
- case 13:
1410
+ case 12:
1466
1411
  if (!(transformedParams && Object.keys(transformedParams).length > 0)) {
1467
- _context.next = 19;
1412
+ _context.next = 18;
1468
1413
  break;
1469
1414
  }
1470
- _context.next = 16;
1471
- return this.request.get(this.resolveUrl(apiConfig.url), transformedParams, requestOptions);
1472
- case 16:
1415
+ _context.next = 15;
1416
+ return this.request.get(apiConfig.url, transformedParams, requestOptions);
1417
+ case 15:
1473
1418
  response = _context.sent;
1474
- _context.next = 22;
1475
- break;
1476
- case 19:
1477
1419
  _context.next = 21;
1478
- return this.request.get(this.resolveUrl(apiConfig.url), undefined, requestOptions);
1479
- case 21:
1420
+ break;
1421
+ case 18:
1422
+ _context.next = 20;
1423
+ return this.request.get(apiConfig.url, undefined, requestOptions);
1424
+ case 20:
1480
1425
  response = _context.sent;
1426
+ case 21:
1427
+ return _context.abrupt("break", 35);
1481
1428
  case 22:
1482
- return _context.abrupt("break", 36);
1483
- case 23:
1484
- _context.next = 25;
1485
- return this.request.post(this.resolveUrl(apiConfig.url), transformedParams, requestOptions);
1486
- case 25:
1429
+ _context.next = 24;
1430
+ return this.request.post(apiConfig.url, transformedParams, requestOptions);
1431
+ case 24:
1487
1432
  response = _context.sent;
1488
- return _context.abrupt("break", 36);
1489
- case 27:
1490
- _context.next = 29;
1491
- return this.request.put(this.resolveUrl(apiConfig.url), transformedParams, requestOptions);
1492
- case 29:
1433
+ return _context.abrupt("break", 35);
1434
+ case 26:
1435
+ _context.next = 28;
1436
+ return this.request.put(apiConfig.url, transformedParams, requestOptions);
1437
+ case 28:
1493
1438
  response = _context.sent;
1494
- return _context.abrupt("break", 36);
1495
- case 31:
1496
- _context.next = 33;
1497
- return this.request.delete(this.resolveUrl(apiConfig.url), requestOptions);
1498
- case 33:
1439
+ return _context.abrupt("break", 35);
1440
+ case 30:
1441
+ _context.next = 32;
1442
+ return this.request.delete(apiConfig.url, requestOptions);
1443
+ case 32:
1499
1444
  response = _context.sent;
1500
- return _context.abrupt("break", 36);
1501
- case 35:
1445
+ return _context.abrupt("break", 35);
1446
+ case 34:
1502
1447
  throw new Error("\u4E0D\u652F\u6301\u7684 HTTP \u65B9\u6CD5: ".concat(apiConfig.method));
1503
- case 36:
1448
+ case 35:
1504
1449
  return _context.abrupt("return", apiConfig.transformResponse ? apiConfig.transformResponse(response) : response);
1505
- case 37:
1450
+ case 36:
1506
1451
  case "end":
1507
1452
  return _context.stop();
1508
1453
  }
@@ -1520,7 +1465,7 @@ export var ApiCaller = /*#__PURE__*/function () {
1520
1465
  /**
1521
1466
  * 创建 API 调用器
1522
1467
  */
1523
- export function createApiCaller(request, channel, options) {
1468
+ export function createApiCaller(request, channel) {
1524
1469
  var config = getChannelConfig(channel);
1525
- return new ApiCaller(request, config, options);
1470
+ return new ApiCaller(request, config);
1526
1471
  }
@@ -323,10 +323,7 @@ export var RegisterAndLoginImpl = /*#__PURE__*/function (_BaseModule) {
323
323
  throw new Error('RegisterAndLogin 模块需要 window 插件支持');
324
324
  case 10:
325
325
  // 创建 API 调用器
326
- this.apiCaller = createApiCaller(this.request, this.channel, {
327
- baseUrl: this.otherParams.h5AuthBaseUrl,
328
- shopDomain: this.otherParams.h5AuthShopDomain
329
- });
326
+ this.apiCaller = createApiCaller(this.request, this.channel);
330
327
 
331
328
  // 尝试从本地存储恢复登录状态
332
329
  _context4.next = 13;
@@ -13,7 +13,6 @@ interface ScanOrderItemRuleRuntimeConfig {
13
13
  pax?: Partial<PaxInfo>;
14
14
  historicalItems?: CartItemSummary[];
15
15
  serviceType?: string;
16
- channel?: string;
17
16
  submissionIndex?: number;
18
17
  custom?: Record<string, any>;
19
18
  }
@@ -2023,11 +2023,7 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
2023
2023
  }, {
2024
2024
  key: "getItemRuleRuntimeConfig",
2025
2025
  value: function getItemRuleRuntimeConfig() {
2026
- var _ref7, _runtimeConfig$channe, _runtimeConfig$custom, _this$otherParams13;
2027
- var runtimeConfig = this.itemRuleRuntimeConfig || {};
2028
- return _objectSpread(_objectSpread({}, runtimeConfig), {}, {
2029
- channel: (_ref7 = (_runtimeConfig$channe = runtimeConfig.channel) !== null && _runtimeConfig$channe !== void 0 ? _runtimeConfig$channe : (_runtimeConfig$custom = runtimeConfig.custom) === null || _runtimeConfig$custom === void 0 ? void 0 : _runtimeConfig$custom.channel) !== null && _ref7 !== void 0 ? _ref7 : (_this$otherParams13 = this.otherParams) === null || _this$otherParams13 === void 0 ? void 0 : _this$otherParams13.channel
2030
- });
2026
+ return this.itemRuleRuntimeConfig || {};
2031
2027
  }
2032
2028
  }, {
2033
2029
  key: "ensureItemRuleConfigsLoaded",
@@ -2514,14 +2510,14 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
2514
2510
  }, {
2515
2511
  key: "normalizeResourceState",
2516
2512
  value: function normalizeResourceState(detail, resourceSelectType, hasOrderId) {
2517
- var _detail$form_record, _this$otherParams14, _detail$resource_capa, _detail$resource_capa2;
2513
+ var _detail$form_record, _this$otherParams13, _detail$resource_capa, _detail$resource_capa2;
2518
2514
  var currentOrderId = toPositiveString(detail === null || detail === void 0 ? void 0 : detail.order_id);
2519
2515
  var lastOrderId = toPositiveString(detail === null || detail === void 0 ? void 0 : detail.last_order_id);
2520
2516
  var relationId = toPositiveString(detail === null || detail === void 0 ? void 0 : detail.form_record_id);
2521
2517
  var tableFormId = toPositiveString(detail === null || detail === void 0 ? void 0 : detail.form_id);
2522
2518
  var formRecord = (_detail$form_record = detail === null || detail === void 0 ? void 0 : detail.form_record) !== null && _detail$form_record !== void 0 ? _detail$form_record : null;
2523
2519
  // 是否允许加餐
2524
- var allowSnack = ((_this$otherParams14 = this.otherParams) === null || _this$otherParams14 === void 0 || (_this$otherParams14 = _this$otherParams14.dineInConfig) === null || _this$otherParams14 === void 0 ? void 0 : _this$otherParams14['sale.allow_add_items']) || false;
2520
+ var allowSnack = ((_this$otherParams13 = this.otherParams) === null || _this$otherParams13 === void 0 || (_this$otherParams13 = _this$otherParams13.dineInConfig) === null || _this$otherParams13 === void 0 ? void 0 : _this$otherParams13['sale.allow_add_items']) || false;
2525
2521
  // 开启同桌验证 - 本期没有这个配置,默认关掉
2526
2522
  var deskmateValid = false;
2527
2523
  var isExclusive = resourceSelectType === 'single';
@@ -2604,7 +2600,7 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
2604
2600
  key: "fetchResourceOccupyDetailsByResourceId",
2605
2601
  value: function () {
2606
2602
  var _fetchResourceOccupyDetailsByResourceId = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee36(resourceId) {
2607
- var _this$otherParams15, _this$otherParams15$g, _response$data$occupy, _response$data;
2603
+ var _this$otherParams14, _this$otherParams14$g, _response$data$occupy, _response$data;
2608
2604
  var formRecordId, shopId, response;
2609
2605
  return _regeneratorRuntime().wrap(function _callee36$(_context36) {
2610
2606
  while (1) switch (_context36.prev = _context36.next) {
@@ -2616,7 +2612,7 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
2616
2612
  }
2617
2613
  throw new Error("[ScanOrder] \u975E\u6CD5\u684C\u53F0 resourceId: ".concat(resourceId));
2618
2614
  case 3:
2619
- shopId = (_this$otherParams15 = this.otherParams) === null || _this$otherParams15 === void 0 || (_this$otherParams15$g = _this$otherParams15.getStateData) === null || _this$otherParams15$g === void 0 ? void 0 : _this$otherParams15$g.call(_this$otherParams15, 'shop_id');
2615
+ shopId = (_this$otherParams14 = this.otherParams) === null || _this$otherParams14 === void 0 || (_this$otherParams14$g = _this$otherParams14.getStateData) === null || _this$otherParams14$g === void 0 ? void 0 : _this$otherParams14$g.call(_this$otherParams14, 'shop_id');
2620
2616
  if (shopId) {
2621
2617
  _context36.next = 6;
2622
2618
  break;
@@ -2710,18 +2706,18 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
2710
2706
  var hasOrderId,
2711
2707
  normalizedResourceId,
2712
2708
  _this$otherParams$bus,
2713
- _this$otherParams16,
2709
+ _this$otherParams15,
2714
2710
  _this$otherParams$cha,
2711
+ _this$otherParams16,
2715
2712
  _this$otherParams17,
2716
- _this$otherParams18,
2717
- _this$otherParams18$g,
2713
+ _this$otherParams17$g,
2718
2714
  _occupyDetails$,
2719
2715
  _occupyDetail$form_re,
2720
2716
  _occupyDetail$form_re2,
2721
2717
  _this$store$order6,
2722
2718
  _this$store$order7,
2723
2719
  _this$store$order7$ge,
2724
- _this$otherParams19,
2720
+ _this$otherParams18,
2725
2721
  _this$store$resource3,
2726
2722
  _this$store$resource4,
2727
2723
  businessCode,
@@ -2779,11 +2775,11 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
2779
2775
  resourceId: normalizedResourceId
2780
2776
  });
2781
2777
  _context37.prev = 3;
2782
- businessCode = String((_this$otherParams$bus = (_this$otherParams16 = this.otherParams) === null || _this$otherParams16 === void 0 ? void 0 : _this$otherParams16.businessCode) !== null && _this$otherParams$bus !== void 0 ? _this$otherParams$bus : '').trim();
2783
- channel = String((_this$otherParams$cha = (_this$otherParams17 = this.otherParams) === null || _this$otherParams17 === void 0 ? void 0 : _this$otherParams17.channel) !== null && _this$otherParams$cha !== void 0 ? _this$otherParams$cha : '').trim();
2778
+ businessCode = String((_this$otherParams$bus = (_this$otherParams15 = this.otherParams) === null || _this$otherParams15 === void 0 ? void 0 : _this$otherParams15.businessCode) !== null && _this$otherParams$bus !== void 0 ? _this$otherParams$bus : '').trim();
2779
+ channel = String((_this$otherParams$cha = (_this$otherParams16 = this.otherParams) === null || _this$otherParams16 === void 0 ? void 0 : _this$otherParams16.channel) !== null && _this$otherParams$cha !== void 0 ? _this$otherParams$cha : '').trim();
2784
2780
  openDataTarget = businessCode && channel ? "".concat(businessCode, "+").concat(channel) : 'dine_in+scan_to_order';
2785
2781
  _context37.next = 9;
2786
- return (_this$otherParams18 = this.otherParams) === null || _this$otherParams18 === void 0 || (_this$otherParams18$g = _this$otherParams18.getOpenData) === null || _this$otherParams18$g === void 0 ? void 0 : _this$otherParams18$g.call(_this$otherParams18, {
2782
+ return (_this$otherParams17 = this.otherParams) === null || _this$otherParams17 === void 0 || (_this$otherParams17$g = _this$otherParams17.getOpenData) === null || _this$otherParams17$g === void 0 ? void 0 : _this$otherParams17$g.call(_this$otherParams17, {
2787
2783
  scope: 'board',
2788
2784
  target: openDataTarget,
2789
2785
  section_code: ['basic', 'fulfillment', 'reservation', 'sale', 'menu', 'availability', 'workflow']
@@ -3047,7 +3043,7 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
3047
3043
  }, []) : []; // pax 由 setEntryPaxNumber 负责写入 itemRuleRuntimeConfig.pax
3048
3044
  _context37.next = 79;
3049
3045
  return this.setItemRuleRuntimeConfig({
3050
- serviceType: (_this$otherParams19 = this.otherParams) === null || _this$otherParams19 === void 0 ? void 0 : _this$otherParams19.businessCode,
3046
+ serviceType: (_this$otherParams18 = this.otherParams) === null || _this$otherParams18 === void 0 ? void 0 : _this$otherParams18.businessCode,
3051
3047
  submissionIndex: isAdditionalOrderMode ? 1 : 0,
3052
3048
  historicalItems: historicalItems
3053
3049
  });
@@ -3173,14 +3169,14 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
3173
3169
  key: "getProductList",
3174
3170
  value: function () {
3175
3171
  var _getProductList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee40() {
3176
- var _this$otherParams20;
3172
+ var _this$otherParams19;
3177
3173
  var associatedMenus, menu_list_ids, res, productList, formattedRes;
3178
3174
  return _regeneratorRuntime().wrap(function _callee40$(_context40) {
3179
3175
  while (1) switch (_context40.prev = _context40.next) {
3180
3176
  case 0:
3181
3177
  this.logMethodStart('getProductList');
3182
3178
  // 可以直接通过配置里的 menu 读取
3183
- associatedMenus = (_this$otherParams20 = this.otherParams) === null || _this$otherParams20 === void 0 || (_this$otherParams20 = _this$otherParams20.dineInConfig) === null || _this$otherParams20 === void 0 ? void 0 : _this$otherParams20['menu.associated_menus'];
3179
+ associatedMenus = (_this$otherParams19 = this.otherParams) === null || _this$otherParams19 === void 0 || (_this$otherParams19 = _this$otherParams19.dineInConfig) === null || _this$otherParams19 === void 0 ? void 0 : _this$otherParams19['menu.associated_menus'];
3184
3180
  menu_list_ids = associatedMenus.map(function (n) {
3185
3181
  return Number(n.value);
3186
3182
  }) || [];
@@ -3239,14 +3235,14 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
3239
3235
  key: "setOtherParams",
3240
3236
  value: function () {
3241
3237
  var _setOtherParams = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee41(params) {
3242
- var _ref9,
3243
- _ref9$cover,
3238
+ var _ref8,
3239
+ _ref8$cover,
3244
3240
  cover,
3245
3241
  _args41 = arguments;
3246
3242
  return _regeneratorRuntime().wrap(function _callee41$(_context41) {
3247
3243
  while (1) switch (_context41.prev = _context41.next) {
3248
3244
  case 0:
3249
- _ref9 = _args41.length > 1 && _args41[1] !== undefined ? _args41[1] : {}, _ref9$cover = _ref9.cover, cover = _ref9$cover === void 0 ? false : _ref9$cover;
3245
+ _ref8 = _args41.length > 1 && _args41[1] !== undefined ? _args41[1] : {}, _ref8$cover = _ref8.cover, cover = _ref8$cover === void 0 ? false : _ref8$cover;
3250
3246
  if (cover) {
3251
3247
  this.otherParams = params;
3252
3248
  } else {
@@ -3397,7 +3393,7 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
3397
3393
  key: "syncAdditionalOrderFromResource",
3398
3394
  value: function () {
3399
3395
  var _syncAdditionalOrderFromResource = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee43(resourceId) {
3400
- var _ref10, _ref11, _ref12, _this$store$resource5, _this$store$resource6, _occupyDetails$2, _this$store$resource7, _this$otherParams21, _this$store$order8;
3396
+ var _ref9, _ref10, _ref11, _this$store$resource5, _this$store$resource6, _occupyDetails$2, _this$store$resource7, _this$otherParams20, _this$store$order8;
3401
3397
  var tempOrder, normalizedResourceId, _result, occupyDetails, occupyDetail, resourceSelectType, allowAddItems, result;
3402
3398
  return _regeneratorRuntime().wrap(function _callee43$(_context43) {
3403
3399
  while (1) switch (_context43.prev = _context43.next) {
@@ -3409,7 +3405,7 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
3409
3405
  throw new Error('order 模块未初始化');
3410
3406
  case 2:
3411
3407
  tempOrder = this.store.order.ensureTempOrder();
3412
- normalizedResourceId = String((_ref10 = (_ref11 = (_ref12 = resourceId !== null && resourceId !== void 0 ? resourceId : tempOrder.resource_id) !== null && _ref12 !== void 0 ? _ref12 : (_this$store$resource5 = this.store.resource) === null || _this$store$resource5 === void 0 ? void 0 : _this$store$resource5.relationId) !== null && _ref11 !== void 0 ? _ref11 : (_this$store$resource6 = this.store.resource) === null || _this$store$resource6 === void 0 ? void 0 : _this$store$resource6.relation_id) !== null && _ref10 !== void 0 ? _ref10 : '').trim();
3408
+ normalizedResourceId = String((_ref9 = (_ref10 = (_ref11 = resourceId !== null && resourceId !== void 0 ? resourceId : tempOrder.resource_id) !== null && _ref11 !== void 0 ? _ref11 : (_this$store$resource5 = this.store.resource) === null || _this$store$resource5 === void 0 ? void 0 : _this$store$resource5.relationId) !== null && _ref10 !== void 0 ? _ref10 : (_this$store$resource6 = this.store.resource) === null || _this$store$resource6 === void 0 ? void 0 : _this$store$resource6.relation_id) !== null && _ref9 !== void 0 ? _ref9 : '').trim();
3413
3409
  this.logMethodStart('syncAdditionalOrderFromResource', {
3414
3410
  resourceId: normalizedResourceId
3415
3411
  });
@@ -3430,7 +3426,7 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
3430
3426
  occupyDetails = _context43.sent;
3431
3427
  occupyDetail = (_occupyDetails$2 = occupyDetails[0]) !== null && _occupyDetails$2 !== void 0 ? _occupyDetails$2 : null;
3432
3428
  resourceSelectType = ((_this$store$resource7 = this.store.resource) === null || _this$store$resource7 === void 0 ? void 0 : _this$store$resource7.resourceSelectType) || this.resolveResourceSelectType(toPositiveString(occupyDetail === null || occupyDetail === void 0 ? void 0 : occupyDetail.form_id));
3433
- allowAddItems = toBoolean((_this$otherParams21 = this.otherParams) === null || _this$otherParams21 === void 0 || (_this$otherParams21 = _this$otherParams21.dineInConfig) === null || _this$otherParams21 === void 0 ? void 0 : _this$otherParams21['sale.allow_add_items']);
3429
+ allowAddItems = toBoolean((_this$otherParams20 = this.otherParams) === null || _this$otherParams20 === void 0 || (_this$otherParams20 = _this$otherParams20.dineInConfig) === null || _this$otherParams20 === void 0 ? void 0 : _this$otherParams20['sale.allow_add_items']);
3434
3430
  result = this.resolveAdditionalOrderFromOccupyDetail(occupyDetail, resourceSelectType, allowAddItems);
3435
3431
  if (!(!result.matched || !result.order_id)) {
3436
3432
  _context43.next = 19;
@@ -3488,9 +3484,9 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
3488
3484
  }, {
3489
3485
  key: "checkAllowAddItems",
3490
3486
  value: function checkAllowAddItems() {
3491
- var _this$otherParams22;
3487
+ var _this$otherParams21;
3492
3488
  this.logMethodStart('checkAllowAddItems');
3493
- var dineInConfig = ((_this$otherParams22 = this.otherParams) === null || _this$otherParams22 === void 0 ? void 0 : _this$otherParams22.dineInConfig) || {};
3489
+ var dineInConfig = ((_this$otherParams21 = this.otherParams) === null || _this$otherParams21 === void 0 ? void 0 : _this$otherParams21.dineInConfig) || {};
3494
3490
  var result = {
3495
3491
  enabled: toBoolean(dineInConfig['sale.allow_add_items'])
3496
3492
  };
@@ -3503,9 +3499,9 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
3503
3499
  }, {
3504
3500
  key: "getFulfillmentModes",
3505
3501
  value: function getFulfillmentModes() {
3506
- var _this$otherParams23;
3502
+ var _this$otherParams22;
3507
3503
  this.logMethodStart('getFulfillmentModes');
3508
- var dineInConfig = ((_this$otherParams23 = this.otherParams) === null || _this$otherParams23 === void 0 ? void 0 : _this$otherParams23.dineInConfig) || {};
3504
+ var dineInConfig = ((_this$otherParams22 = this.otherParams) === null || _this$otherParams22 === void 0 ? void 0 : _this$otherParams22.dineInConfig) || {};
3509
3505
  var result = {
3510
3506
  enablePickup: Boolean(dineInConfig['fulfillment.enable_pickup']),
3511
3507
  enableTableService: Boolean(dineInConfig['fulfillment.enable_table_service'])
@@ -3519,9 +3515,9 @@ export var ScanOrderImpl = /*#__PURE__*/function (_BaseSalesImpl) {
3519
3515
  }, {
3520
3516
  key: "checkManualPickupRef",
3521
3517
  value: function checkManualPickupRef() {
3522
- var _this$otherParams24;
3518
+ var _this$otherParams23;
3523
3519
  this.logMethodStart('checkManualPickupRef');
3524
- var dineInConfig = ((_this$otherParams24 = this.otherParams) === null || _this$otherParams24 === void 0 ? void 0 : _this$otherParams24.dineInConfig) || {};
3520
+ var dineInConfig = ((_this$otherParams23 = this.otherParams) === null || _this$otherParams23 === void 0 ? void 0 : _this$otherParams23.dineInConfig) || {};
3525
3521
  var refMode = dineInConfig['fulfillment.fulfillment_ref_mode'];
3526
3522
  var manualInputType = dineInConfig['fulfillment.manual_input_type'];
3527
3523
  var enabled = refMode === 'manual_input';
@@ -78,7 +78,6 @@ export declare function buildItemRuleBusinessData(params: {
78
78
  pax?: Partial<PaxInfo>;
79
79
  historicalItems?: CartItemSummary[];
80
80
  serviceType?: string;
81
- channel?: string;
82
81
  submissionIndex?: number;
83
82
  custom?: Record<string, any>;
84
83
  };
@@ -309,7 +309,6 @@ export function aggregateItemRuleLimit(matchedLimits) {
309
309
  };
310
310
  }
311
311
  export function buildItemRuleBusinessData(params) {
312
- var _runtimeConfig$channe, _runtimeConfig$custom;
313
312
  var tempOrder = params.tempOrder,
314
313
  runtimeConfig = params.runtimeConfig,
315
314
  itemRuleConfigs = params.itemRuleConfigs;
@@ -346,7 +345,6 @@ export function buildItemRuleBusinessData(params) {
346
345
  cartItems: cartItems,
347
346
  historicalItems: historicalItems,
348
347
  serviceType: runtimeConfig.serviceType || 'dine-in',
349
- channel: (_runtimeConfig$channe = runtimeConfig.channel) !== null && _runtimeConfig$channe !== void 0 ? _runtimeConfig$channe : (_runtimeConfig$custom = runtimeConfig.custom) === null || _runtimeConfig$custom === void 0 ? void 0 : _runtimeConfig$custom.channel,
350
348
  submissionIndex: typeof runtimeConfig.submissionIndex === 'number' ? toNonNegativeInt(runtimeConfig.submissionIndex) : tempOrder.order_id ? 1 : 0,
351
349
  custom: runtimeConfig.custom || {},
352
350
  strategyConfigs: itemRuleConfigs
@@ -2,11 +2,10 @@ import type { Module, ModuleOptions, PisellCore } from '../../types';
2
2
  import type { ProductData } from '../../modules';
3
3
  import type { OpenDataConfig } from '../../modules/OpenData';
4
4
  import type { LoadScheduleAvailableDateParams, ScheduleItem } from '../../modules/Schedule/types';
5
- import type { ProductListLoadProductsParams, ProductListStoreQueryParams } from '../../modules/ProductList';
5
+ import type { ProductListLoadProductsParams } from '../../modules/ProductList';
6
6
  import type { AvailabilityDateRange, AvailabilityOccupancy, AvailabilityProduct, AvailabilityResource, GetProductTimeRangesRequest } from '../../modules/ResourcePlanner';
7
- import type { AvailabilityContextRef, ContextualAvailabilityQuery, ContextualAvailabilityQueryResult, ContextualCommitAvailabilitySelectionParams, ContextualProductTimeRangeGroup, UnifiedBookingSalesAddRetailProductParams, UnifiedBookingSalesApplyPlannerDiscountsParams, UnifiedBookingSalesCommitAvailabilitySelectionResult, UnifiedBookingSalesDiscountResult, UnifiedBookingSalesLoadProductsByScheduleDateParams, UnifiedBookingSalesLoadOpenDataParams, UnifiedBookingSalesPrepareAvailabilityProjectionParams, UnifiedBookingSalesPolicyResponse, UnifiedBookingSalesResolveProductAllergyRequirementParams, UnifiedBookingSalesStageRetailProductsParams, UnifiedBookingSalesState } from './types';
7
+ import type { AvailabilityContextRef, ContextualAvailabilityQuery, ContextualAvailabilityQueryResult, ContextualCommitAvailabilitySelectionParams, ContextualProductTimeRangeGroup, UnifiedBookingSalesAddRetailProductParams, UnifiedBookingSalesApplyPlannerDiscountsParams, UnifiedBookingSalesCommitAvailabilitySelectionResult, UnifiedBookingSalesDiscountResult, UnifiedBookingSalesLoadProductsByScheduleDateParams, UnifiedBookingSalesLoadOpenDataParams, UnifiedBookingSalesPrepareAvailabilityProjectionParams, UnifiedBookingSalesPolicyResponse, UnifiedBookingSalesStageRetailProductsParams, UnifiedBookingSalesState } from './types';
8
8
  import { BookingTicket } from '../BookingTicket';
9
- import type { AllergyRequirement } from '../../model/strategy/adapter/itemRule';
10
9
  export * from './types';
11
10
  export { AvailabilityError } from '../../modules/ResourcePlanner';
12
11
  /**
@@ -77,9 +76,6 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
77
76
  private availabilityRemoteResourceQuerySequence;
78
77
  private availabilityRemoteResourceEpoch;
79
78
  private availabilityCommitLocks;
80
- private allergyItemRuleEvaluator;
81
- private allergyItemRuleConfigs;
82
- private allergyItemRuleConfigsPromise;
83
79
  initialize(core: PisellCore, options?: ModuleOptions): Promise<void>;
84
80
  protected getSubmitOrderSalesChannel(): string;
85
81
  private createAvailabilityFacadeError;
@@ -151,14 +147,6 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
151
147
  */
152
148
  loadOpenData(params: UnifiedBookingSalesLoadOpenDataParams): Promise<OpenDataConfig>;
153
149
  getOpenData(): Promise<OpenDataConfig | null>;
154
- private resetAllergyItemRuleState;
155
- private fetchAllergyItemRuleConfigs;
156
- private ensureAllergyItemRuleConfigsLoaded;
157
- /**
158
- * 评估当前渠道与商品是否命中 ALLERGY_CHECK。
159
- * 只返回优先级最高 Action 中当前商品 Target 的 dataSource,不跨商品或 Action 合并。
160
- */
161
- resolveProductAllergyRequirement(params: UnifiedBookingSalesResolveProductAllergyRequirementParams): Promise<AllergyRequirement | null>;
162
150
  /**
163
151
  * Load a resource policy without depending on the legacy appointmentBooking solution.
164
152
  */
@@ -171,7 +159,6 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
171
159
  callback?: (result: any) => void;
172
160
  subscriberId?: string;
173
161
  }): Promise<ProductData[]>;
174
- queryProducts(params?: ProductListStoreQueryParams): Promise<ProductData[]>;
175
162
  /** Date-first entry point. It delegates protocol details and cache ownership to ScheduleModule. */
176
163
  loadScheduleAvailableDate(params: LoadScheduleAvailableDateParams): Promise<import("../../modules/Date/types").ITime[]>;
177
164
  /**