@pisell/pisellos 2.2.218 → 2.2.219

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.
@@ -334,7 +334,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
334
334
  private logSubmitBackendRejected;
335
335
  syncPaymentsToOrder<T = any>(params: SyncPaymentsToOrderParams): Promise<SyncPaymentsToOrderResult<T>>;
336
336
  createOrder(params: CommitOrderParams['query']): {
337
- type: "appointment_booking" | "virtual";
337
+ type: "virtual" | "appointment_booking";
338
338
  platform: string;
339
339
  sales_channel: string;
340
340
  order_sales_channel: string;
@@ -4126,8 +4126,18 @@ var Server = /*#__PURE__*/function () {
4126
4126
  title: title
4127
4127
  });
4128
4128
  case 15:
4129
+ if (pendingResult.data.order_id) {
4130
+ _context44.next = 17;
4131
+ break;
4132
+ }
4133
+ return _context44.abrupt("return", _objectSpread(_objectSpread({}, pendingResult), {}, {
4134
+ data: _objectSpread(_objectSpread({}, pendingResult.data), {}, {
4135
+ order_id: pendingResult.data.external_sale_number
4136
+ })
4137
+ }));
4138
+ case 17:
4129
4139
  return _context44.abrupt("return", pendingResult);
4130
- case 16:
4140
+ case 18:
4131
4141
  case "end":
4132
4142
  return _context44.stop();
4133
4143
  }
@@ -4143,7 +4153,7 @@ var Server = /*#__PURE__*/function () {
4143
4153
  value: function () {
4144
4154
  var _handlePendingSyncCheckoutOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee45(params) {
4145
4155
  var _this10 = this;
4146
- var backendPath, data, title, reason, pendingOrder, _pendingOrder$payment, _pendingOrder$order_i, _pendingOrder$summary, _pendingOrder$summary2, _pendingOrder$summary3, changeGivenAmount, errorMessage;
4156
+ var backendPath, data, title, reason, pendingOrder, _pendingOrder$payment, _pendingOrder$summary, _pendingOrder$summary2, _pendingOrder$summary3, changeGivenAmount, errorMessage;
4147
4157
  return _regeneratorRuntime().wrap(function _callee45$(_context45) {
4148
4158
  while (1) switch (_context45.prev = _context45.next) {
4149
4159
  case 0:
@@ -4201,8 +4211,7 @@ var Server = /*#__PURE__*/function () {
4201
4211
  code: 200,
4202
4212
  status: true,
4203
4213
  message: '',
4204
- data: {
4205
- order_id: (_pendingOrder$order_i = pendingOrder === null || pendingOrder === void 0 ? void 0 : pendingOrder.order_id) !== null && _pendingOrder$order_i !== void 0 ? _pendingOrder$order_i : pendingOrder === null || pendingOrder === void 0 ? void 0 : pendingOrder.external_sale_number,
4214
+ data: _objectSpread(_objectSpread({}, pendingOrder), {}, {
4206
4215
  amount_gap: pendingOrder === null || pendingOrder === void 0 || (_pendingOrder$summary = pendingOrder.summary) === null || _pendingOrder$summary === void 0 ? void 0 : _pendingOrder$summary.amount_gap,
4207
4216
  expect_amount: pendingOrder === null || pendingOrder === void 0 || (_pendingOrder$summary2 = pendingOrder.summary) === null || _pendingOrder$summary2 === void 0 ? void 0 : _pendingOrder$summary2.expect_amount,
4208
4217
  total_amount: pendingOrder === null || pendingOrder === void 0 || (_pendingOrder$summary3 = pendingOrder.summary) === null || _pendingOrder$summary3 === void 0 ? void 0 : _pendingOrder$summary3.total_amount,
@@ -4210,7 +4219,7 @@ var Server = /*#__PURE__*/function () {
4210
4219
  payment_info: {
4211
4220
  current_change_given_amount: changeGivenAmount
4212
4221
  }
4213
- }
4222
+ })
4214
4223
  });
4215
4224
  case 18:
4216
4225
  _context45.prev = 18;
@@ -311,7 +311,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
311
311
  date: string;
312
312
  status: string;
313
313
  week: string;
314
- weekNum: 0 | 2 | 1 | 5 | 3 | 4 | 6;
314
+ weekNum: 0 | 2 | 1 | 6 | 3 | 4 | 5;
315
315
  }[]>;
316
316
  submitTimeSlot(timeSlots: TimeSliceItem): void;
317
317
  private getScheduleDataByIds;
@@ -310,7 +310,7 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
310
310
  * 获取当前的客户搜索条件
311
311
  * @returns 当前搜索条件
312
312
  */
313
- getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
313
+ getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "skip" | "num">;
314
314
  /**
315
315
  * 获取客户列表状态(包含滚动加载相关状态)
316
316
  * @returns 客户状态
@@ -0,0 +1,49 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/model/strategy/adapter/promotion/index.ts
30
+ var promotion_exports = {};
31
+ __export(promotion_exports, {
32
+ BUY_X_GET_Y_FREE_STRATEGY: () => import_examples.BUY_X_GET_Y_FREE_STRATEGY,
33
+ PromotionAdapter: () => import_adapter.PromotionAdapter,
34
+ PromotionEvaluator: () => import_evaluator.PromotionEvaluator,
35
+ X_ITEMS_FOR_Y_PRICE_STRATEGY: () => import_examples.X_ITEMS_FOR_Y_PRICE_STRATEGY,
36
+ default: () => import_adapter2.default
37
+ });
38
+ module.exports = __toCommonJS(promotion_exports);
39
+ var import_evaluator = require("./evaluator");
40
+ var import_adapter = require("./adapter");
41
+ var import_adapter2 = __toESM(require("./adapter"));
42
+ var import_examples = require("./examples");
43
+ // Annotate the CommonJS export names for ESM import in node:
44
+ 0 && (module.exports = {
45
+ BUY_X_GET_Y_FREE_STRATEGY,
46
+ PromotionAdapter,
47
+ PromotionEvaluator,
48
+ X_ITEMS_FOR_Y_PRICE_STRATEGY
49
+ });
@@ -334,7 +334,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
334
334
  private logSubmitBackendRejected;
335
335
  syncPaymentsToOrder<T = any>(params: SyncPaymentsToOrderParams): Promise<SyncPaymentsToOrderResult<T>>;
336
336
  createOrder(params: CommitOrderParams['query']): {
337
- type: "appointment_booking" | "virtual";
337
+ type: "virtual" | "appointment_booking";
338
338
  platform: string;
339
339
  sales_channel: string;
340
340
  order_sales_channel: string;
@@ -2548,6 +2548,15 @@ var Server = class {
2548
2548
  title
2549
2549
  });
2550
2550
  }
2551
+ if (!pendingResult.data.order_id) {
2552
+ return {
2553
+ ...pendingResult,
2554
+ data: {
2555
+ ...pendingResult.data,
2556
+ order_id: pendingResult.data.external_sale_number
2557
+ }
2558
+ };
2559
+ }
2551
2560
  return pendingResult;
2552
2561
  }
2553
2562
  async handlePendingSyncCheckoutOrder(params) {
@@ -2596,7 +2605,7 @@ var Server = class {
2596
2605
  status: true,
2597
2606
  message: "",
2598
2607
  data: {
2599
- order_id: (pendingOrder == null ? void 0 : pendingOrder.order_id) ?? (pendingOrder == null ? void 0 : pendingOrder.external_sale_number),
2608
+ ...pendingOrder,
2600
2609
  amount_gap: (_b = pendingOrder == null ? void 0 : pendingOrder.summary) == null ? void 0 : _b.amount_gap,
2601
2610
  expect_amount: (_c = pendingOrder == null ? void 0 : pendingOrder.summary) == null ? void 0 : _c.expect_amount,
2602
2611
  total_amount: (_d = pendingOrder == null ? void 0 : pendingOrder.summary) == null ? void 0 : _d.total_amount,
@@ -311,7 +311,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
311
311
  date: string;
312
312
  status: string;
313
313
  week: string;
314
- weekNum: 0 | 2 | 1 | 5 | 3 | 4 | 6;
314
+ weekNum: 0 | 2 | 1 | 6 | 3 | 4 | 5;
315
315
  }[]>;
316
316
  submitTimeSlot(timeSlots: TimeSliceItem): void;
317
317
  private getScheduleDataByIds;
@@ -310,7 +310,7 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
310
310
  * 获取当前的客户搜索条件
311
311
  * @returns 当前搜索条件
312
312
  */
313
- getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
313
+ getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "skip" | "num">;
314
314
  /**
315
315
  * 获取客户列表状态(包含滚动加载相关状态)
316
316
  * @returns 客户状态
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "2.2.218",
4
+ "version": "2.2.219",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",