@final-commerce/common 2.4.1-online.1 → 2.4.1-online.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -3003,7 +3003,9 @@ function buildGrid(rule, timeZone, from, to, now, busy = []) {
3003
3003
  const start = startAt.getTime();
3004
3004
  if (start < askedFrom || start >= askedTo) return false;
3005
3005
  if (start < notBefore || start > notAfter) return false;
3006
- return !blocked.some(({ from: blockFrom, to: blockTo }) => start < blockTo && bufferEndAt.getTime() > blockFrom);
3006
+ return !blocked.some(
3007
+ ({ from: blockFrom, to: blockTo }) => start < blockTo && bufferEndAt.getTime() > blockFrom
3008
+ );
3007
3009
  }).sort((first, second) => +first.startAt - +second.startAt);
3008
3010
  }
3009
3011
  function slotsForWindow(grid, startAt, endAt) {
@@ -3122,7 +3124,14 @@ function buildAvailability({
3122
3124
  for (const slot of slots2) {
3123
3125
  const { taken, foreignProductId } = occupancyIn(mine, productId, slot.startAt, slot.bufferEndAt, shared);
3124
3126
  const free = foreignProductId ? 0 : Math.max(capacity - taken, 0);
3125
- const entry = byInstant.get(+slot.startAt) ?? { ...slot, capacity: 0, booked: 0, free: 0, resources: [], dayKey: shopDayKey(slot.startAt, resource.timeZone) };
3127
+ const entry = byInstant.get(+slot.startAt) ?? {
3128
+ ...slot,
3129
+ capacity: 0,
3130
+ booked: 0,
3131
+ free: 0,
3132
+ resources: [],
3133
+ dayKey: shopDayKey(slot.startAt, resource.timeZone)
3134
+ };
3126
3135
  entry.capacity += capacity;
3127
3136
  entry.booked += foreignProductId ? capacity : taken;
3128
3137
  entry.free += free;
@@ -3221,6 +3230,9 @@ var ProcessorType = /* @__PURE__ */ ((ProcessorType2) => {
3221
3230
  ProcessorType2["ONLINE_PAYMENT"] = "OnlinePayment";
3222
3231
  return ProcessorType2;
3223
3232
  })(ProcessorType || {});
3233
+
3234
+ // constants/payment-channel.constants.ts
3235
+ var PAYMENT_CHANNELS = ["inPerson", "online"];
3224
3236
  export {
3225
3237
  ADYEN_ROLLOUT_COUNTRY_CODES,
3226
3238
  AFFIRM_PRICE_PLANS,
@@ -3267,6 +3279,7 @@ export {
3267
3279
  OtherFixedRates,
3268
3280
  OwnerType,
3269
3281
  PATH_MODES,
3282
+ PAYMENT_CHANNELS,
3270
3283
  PAYMENT_STATES,
3271
3284
  POS_VALID_INITIAL_STATES,
3272
3285
  PaymentMethod,