@pisell/pisellos 2.3.89 → 2.3.91

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.
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["custom_product_bundle_map_id"],
2
2
  _excluded2 = ["unique_identification_number"],
3
- _excluded3 = ["num", "surcharge_fee", "discount_amount", "discount_type", "discountway", "product_discount_reason", "discount_per"],
3
+ _excluded3 = ["num", "surcharge_fee", "discount_amount", "discount_type", "discountway", "product_discount_reason", "discount_per", "production_code"],
4
4
  _excluded4 = ["_extend", "relation_id", "table_form_id", "resource_id", "summary", "lastOrderInfo", "paid_amount", "shop_id", "shop_note", "shop_service_type", "start_time", "customer", "discount_list", "tax_fee", "total_amount", "total_refund_amount", "create_date", "holder_id"],
5
5
  _excluded5 = ["collect_pax", "table_occupancy_duration"];
6
6
  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; }
@@ -814,6 +814,11 @@ function normalizeSubmitPlatform(platform) {
814
814
  if (lower === 'h5') return 'H5';
815
815
  return value;
816
816
  }
817
+ function normalizeSubmitProductionCode(value) {
818
+ if (value === undefined || value === null) return undefined;
819
+ var productionCode = String(value).trim();
820
+ return productionCode || undefined;
821
+ }
817
822
 
818
823
  // 后端 checkout 协议字段 option_group_item_id;tempOrder 内部也保持同一字段名。
819
824
  function formatSubmitOptionItems(options) {
@@ -825,6 +830,9 @@ function formatSubmitOptionItems(options) {
825
830
  option_group_item_id: d === null || d === void 0 ? void 0 : d.option_group_item_id,
826
831
  option_group_id: d === null || d === void 0 ? void 0 : d.option_group_id
827
832
  });
833
+ var productionCode = normalizeSubmitProductionCode(d === null || d === void 0 ? void 0 : d.production_code);
834
+ delete option.production_code;
835
+ if (productionCode !== undefined) option.production_code = productionCode;
828
836
  var addPrice = (_d$add_price = d === null || d === void 0 ? void 0 : d.add_price) !== null && _d$add_price !== void 0 ? _d$add_price : d === null || d === void 0 ? void 0 : d.price;
829
837
  if (addPrice !== undefined) option.add_price = String(addPrice);
830
838
  delete option.price;
@@ -865,10 +873,13 @@ function formatSubmitBundleItems(bundle) {
865
873
  var num = toBundleNumber((_rawBundle$num = rawBundle.num) !== null && _rawBundle$num !== void 0 ? _rawBundle$num : rawBundle.quantity, 1);
866
874
  var bundleMapId = resolveSubmitBundleMapId(rawBundle);
867
875
  var hasSubmitBundleDiscounts = Array.isArray(rawBundle.discount_list) && rawBundle.discount_list.length > 0;
868
- return {
876
+ var productionCode = normalizeSubmitProductionCode(rawBundle.production_code);
877
+ return _objectSpread(_objectSpread({
869
878
  is_charge_tax: (_rawBundle$is_charge_ = rawBundle.is_charge_tax) !== null && _rawBundle$is_charge_ !== void 0 ? _rawBundle$is_charge_ : 0,
870
- bundle_variant_id: (_rawBundle$bundle_var = rawBundle.bundle_variant_id) !== null && _rawBundle$bundle_var !== void 0 ? _rawBundle$bundle_var : 0,
871
- production_code: rawBundle.production_code,
879
+ bundle_variant_id: (_rawBundle$bundle_var = rawBundle.bundle_variant_id) !== null && _rawBundle$bundle_var !== void 0 ? _rawBundle$bundle_var : 0
880
+ }, productionCode !== undefined ? {
881
+ production_code: productionCode
882
+ } : {}), {}, {
872
883
  num: num,
873
884
  quantity: toBundleNumber((_rawBundle$quantity = rawBundle.quantity) !== null && _rawBundle$quantity !== void 0 ? _rawBundle$quantity : rawBundle.num, num),
874
885
  extension_id: (_rawBundle$extension_ = rawBundle.extension_id) !== null && _rawBundle$extension_ !== void 0 ? _rawBundle$extension_ : 0,
@@ -890,7 +901,7 @@ function formatSubmitBundleItems(bundle) {
890
901
  relation_surcharge_ids: relationSurchargeIds,
891
902
  product_discount_difference: productDiscountDifference
892
903
  })
893
- };
904
+ });
894
905
  });
895
906
  }
896
907
 
@@ -922,7 +933,9 @@ function normalizeSubmitProduct(product) {
922
933
  _deprecatedDiscountway = submitProduct.discountway,
923
934
  _deprecatedProductDiscountReason = submitProduct.product_discount_reason,
924
935
  _deprecatedDiscountPer = submitProduct.discount_per,
936
+ rawProductionCode = submitProduct.production_code,
925
937
  productRest = _objectWithoutProperties(submitProduct, _excluded3);
938
+ var productionCode = normalizeSubmitProductionCode(rawProductionCode);
926
939
  delete productRest["product_".concat('option', "_item")];
927
940
  var rawMetadata = submitProduct.metadata || {};
928
941
  var bookingUid = rawMetadata.booking_uid;
@@ -954,7 +967,9 @@ function normalizeSubmitProduct(product) {
954
967
  var productSku = _objectSpread(_objectSpread({}, submitProduct.product_sku && _typeof(submitProduct.product_sku) === 'object' ? submitProduct.product_sku : {}), {}, {
955
968
  option: formatSubmitOptionItems((_submitProduct$produc = submitProduct.product_sku) === null || _submitProduct$produc === void 0 ? void 0 : _submitProduct$produc.option)
956
969
  });
957
- return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, productRest), bookingUid ? {
970
+ return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, productRest), productionCode !== undefined ? {
971
+ production_code: productionCode
972
+ } : {}), bookingUid ? {
958
973
  booking_uid: bookingUid
959
974
  } : {}), bundleEdit !== undefined ? {
960
975
  bundle_edit: bundleEdit
@@ -128,6 +128,9 @@ declare class Server {
128
128
  private runCheckoutSync;
129
129
  private omitCheckoutSyncMode;
130
130
  private buildRemoteCheckoutData;
131
+ private buildCheckoutDeviceHeaders;
132
+ private applyKioskCheckoutOperator;
133
+ private resolveKioskCheckoutOperatorId;
131
134
  private mergeCheckoutSyncPayments;
132
135
  private persistSyncedCheckoutOrder;
133
136
  /**