@fire-spark/core 0.17.2 → 0.17.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.d.ts CHANGED
@@ -559,24 +559,35 @@ type ApplyRedeemInput = {
559
559
  */
560
560
  quantity: number;
561
561
  /**
562
- * Default `true`: the redeem covers at most the pre-tax value of its
562
+ * POINTS and DISCOUNT cover money. PRODUCT only links `line_uid` and
563
+ * does not change the payable total. Omit it for a money redeem.
564
+ */
565
+ type?: "POINTS" | "DISCOUNT" | "PRODUCT";
566
+ /**
567
+ * Default `true`: a money redeem covers at most the pre-tax value of its
563
568
  * target (line or order); taxes stay for the customer's method.
564
- * `false`: it may also cover taxes, up to the full total.
569
+ * `false`: it may also cover taxes, up to the full total. Ignored for
570
+ * a PRODUCT reward.
565
571
  */
566
572
  before_taxes?: boolean;
567
- /** Root line the redeem is for; omit to apply it to the whole order. */
573
+ /**
574
+ * Root product line the redeem is for. Required for PRODUCT. Omit to
575
+ * apply a POINTS or DISCOUNT redeem to the whole order.
576
+ */
568
577
  line_uid?: string;
569
578
  /**
570
- * Required: the active merchant `REDEMPTION` payment whose tender covers
571
- * `amount`. Redeems with the same `payment_id` share one tender.
579
+ * Required: the active merchant `REDEMPTION` payment. Money redeems that
580
+ * share a `payment_id` share one tender. A PRODUCT reward names the same
581
+ * payment and does not add a tender.
572
582
  */
573
583
  payment_id: string;
574
584
  /**
575
- * Required, > 0: money the redeem covers for the whole entry (every
576
- * `quantity` unit). Shown as the line or order discount; trimmed to the
577
- * `before_taxes` cap and to total − tip − delivery.
585
+ * POINTS and DISCOUNT: required, > 0, money for the whole entry (every
586
+ * `quantity` unit). Trimmed to the `before_taxes` cap and to total − tip
587
+ * − delivery. PRODUCT: omit it or send 0. It is not a discount and it
588
+ * does not change the line price.
578
589
  */
579
- amount: number;
590
+ amount?: number;
580
591
  /** Provider of the REDEMPTION payment (default `firespark`). */
581
592
  provider?: PaymentProvider;
582
593
  /** ISO datetime with offset; validation fails once it has passed. */
@@ -662,14 +673,14 @@ declare class Order {
662
673
  replaceLine(lineUid: string, lines: OrderLine | OrderLine[]): void;
663
674
  emptyOrder(): void;
664
675
  /**
665
- * Applies a redeem (points, voucher, free product…) to `line_uid` (root
666
- * product line) or to the order. `payment_id` and `amount` are required:
667
- * `amount` is what the redeem covers for the whole entry and is shown as
668
- * the line / order discount, while line and order totals keep their full
669
- * value. The REDEMPTION tender of `payment_id` pays `amount`; the
670
- * customer's method pays the rest (the taxes when `before_taxes`, the
671
- * default, keeps them out of the redeem). Redeems with the same
672
- * `payment_id` share one tender (D15, D18, D19).
676
+ * Applies a redeem to `line_uid` (root product line) or to the order.
677
+ * POINTS and DISCOUNT need `amount` > 0: that money is the discount,
678
+ * line and order totals stay full, and the REDEMPTION tender of
679
+ * `payment_id` pays it. The customer's method pays the rest (taxes stay
680
+ * out when `before_taxes`, the default). Redeems with the same
681
+ * `payment_id` share one tender (D15, D18, D19). A PRODUCT reward needs
682
+ * `line_uid`. It links that line, keeps the cart price, and adds no
683
+ * tender money.
673
684
  */
674
685
  applyRedeem(input: ApplyRedeemInput): void;
675
686
  /**
@@ -740,10 +751,10 @@ declare class Order {
740
751
  refundOrder(): Promise<void>;
741
752
  validateOrder(): Promise<void>;
742
753
  /**
743
- * Tenders of the next intent: one REDEMPTION per redeem `payment_id`
744
- * (order and lines, capped) plus the customer's method for the rest,
745
- * e.g. the taxes. When the redeems cover the whole total, only
746
- * REDEMPTION tenders.
754
+ * Tenders of the next intent: one REDEMPTION per `payment_id` that
755
+ * covers money (order and lines, capped) plus the customer's method for
756
+ * the rest, e.g. the taxes. PRODUCT rewards add no tender. When the
757
+ * money redeems cover the whole total, only REDEMPTION tenders.
747
758
  */
748
759
  getTenders(payment?: PlaceOrderInput["payment"]): PaymentTenderInput[];
749
760
  /**
@@ -935,7 +946,7 @@ declare const isOrderPaymentRequiredError: (error: unknown) => error is OrderPay
935
946
  //#endregion
936
947
  //#region src/order/validate.d.ts
937
948
  type OrderLineIssueCode = "PRODUCT_NOT_FOUND" | "HIDDEN" | "OUT_OF_STOCK" | "OUTSIDE_HOURS" | "MODIFIER_NOT_FOUND" | "MODIFIER_RULES_INVALID" | "VARIANT_BASE_NOT_ORDERABLE" | "VARIANT_NOT_OFFERED" | "PRICE_MISMATCH" | "TAX_MISMATCH" | "DISCOUNT_MISMATCH" | "QUANTITY_MISMATCH" | "QUANTITY_BELOW_MINIMUM" | "QUANTITY_ABOVE_MAXIMUM" | "STRUCTURE_MISMATCH" | "FEE_MISMATCH" | "REDEEM_EXPIRED" | RedeemIssueCode;
938
- type OrderIssueCode = "NO_MENU" | "MENU_CLOSED" | "SCOPE_INACTIVE" | "TOTALS_MISMATCH" | "REDEEM_EXPIRED" | RedeemIssueCode | "REDEMPTION_STEPS_MISMATCH" | "REDEMPTION_MISMATCH" | "EMPTY_ORDER" | "ITEMS_BELOW_MINIMUM" | "ITEMS_ABOVE_MAXIMUM" | "TOTAL_BELOW_MINIMUM" | "TOTAL_ABOVE_MAXIMUM" | "REDEEMS_ABOVE_MAXIMUM" | "REDEEMS_TOTAL_ABOVE_MAXIMUM" | "SHIPPING_REQUIRED" | "BILLING_REQUIRED" | "SHIPPING_FIELD_REQUIRED" | "BILLING_FIELD_REQUIRED" | "CUSTOMER_FIELD_REQUIRED" | "DAILY_ORDER_LIMIT_REACHED" | "MASIVO_REWARD_NOT_REDEEMABLE" | "MASIVO_REDEMPTION_PAYMENT_REQUIRED" | "MASIVO_UNAVAILABLE";
949
+ type OrderIssueCode = "NO_MENU" | "MENU_CLOSED" | "SCOPE_INACTIVE" | "TOTALS_MISMATCH" | "REDEEM_EXPIRED" | RedeemIssueCode | "REDEMPTION_STEPS_MISMATCH" | "REDEMPTION_MISMATCH" | "EMPTY_ORDER" | "ITEMS_BELOW_MINIMUM" | "ITEMS_ABOVE_MAXIMUM" | "TOTAL_BELOW_MINIMUM" | "TOTAL_ABOVE_MAXIMUM" | "REDEEMS_ABOVE_MAXIMUM" | "REDEEMS_TOTAL_ABOVE_MAXIMUM" | "SHIPPING_REQUIRED" | "BILLING_REQUIRED" | "SHIPPING_FIELD_REQUIRED" | "BILLING_FIELD_REQUIRED" | "CUSTOMER_FIELD_REQUIRED" | "DAILY_ORDER_LIMIT_REACHED" | "MASIVO_REWARD_NOT_REDEEMABLE" | "MASIVO_REDEMPTION_PAYMENT_REQUIRED" | "MASIVO_PRODUCT_LINE_MISSING" | "MASIVO_PRODUCT_PAYABLE_REDUCED" | "MASIVO_CHARGE_MISMATCH" | "MASIVO_UNAVAILABLE";
939
950
  type OrderLineIssue = {
940
951
  code: OrderLineIssueCode;
941
952
  field?: string;
@@ -1073,6 +1084,7 @@ declare const capRedeems: <T extends CapOrder>(order: T) => T & {
1073
1084
  redeem: {
1074
1085
  reward_id: string;
1075
1086
  quantity: number;
1087
+ type?: "DISCOUNT" | "POINTS" | "PRODUCT" | undefined;
1076
1088
  before_taxes?: boolean | undefined;
1077
1089
  expires_at?: string | undefined;
1078
1090
  payment_id: string;
@@ -1104,6 +1116,7 @@ declare const capRedeems: <T extends CapOrder>(order: T) => T & {
1104
1116
  declare const cappedRedeems: (order: CapOrder) => {
1105
1117
  reward_id: string;
1106
1118
  quantity: number;
1119
+ type?: "DISCOUNT" | "POINTS" | "PRODUCT" | undefined;
1107
1120
  before_taxes?: boolean | undefined;
1108
1121
  expires_at?: string | undefined;
1109
1122
  payment_id: string;
@@ -1129,9 +1142,10 @@ declare const redeemsForPayment: <T extends {
1129
1142
  amount: number;
1130
1143
  }>(items: readonly T[], paymentId: string) => T[];
1131
1144
  /**
1132
- * Money the redeems cover (Σ `amount`): the discount the customer sees.
1133
- * It is paid by REDEMPTION tenders, so it is never subtracted from line
1134
- * or order totals.
1145
+ * Money POINTS and DISCOUNT redeems cover (Σ `amount`). A PRODUCT reward
1146
+ * is not included: it links a line and does not change what the customer
1147
+ * pays. The sum is paid by REDEMPTION tenders, so it is never subtracted
1148
+ * from line or order totals.
1135
1149
  */
1136
1150
  declare const redeemedTotal: (redeem?: readonly RedeemLike[] | null) => number;
1137
1151
  /** Redeemed money of every redeem of the order (order + root lines). */
@@ -1160,10 +1174,11 @@ type StepOrder = Parameters<typeof fitRedeems>[0];
1160
1174
  /**
1161
1175
  * One step per redeem with a `payment_id`, in the order `fitRedeems`
1162
1176
  * applies them: root-line redeems in line order, then order redeems.
1163
- * `discount_amount` is the capped `amount`, so the steps of a `payment_id`
1164
- * add up to its REDEMPTION tender and the line steps to the discount shown
1165
- * on the line. Lines, taxes and totals keep their full value; `value` is
1166
- * what the customer's method still pays.
1177
+ * `discount_amount` is the capped `amount` of a POINTS or DISCOUNT redeem,
1178
+ * so those steps of a `payment_id` add up to its REDEMPTION tender. A
1179
+ * PRODUCT reward is a step with `discount_amount` 0 and action READ: it
1180
+ * links the line and does not change `value`. Lines, taxes and totals keep
1181
+ * their full value; `value` is what the customer's method still pays.
1167
1182
  */
1168
1183
  declare const redemptionSteps: (order: StepOrder) => OrderRedemptionStep[];
1169
1184
  //#endregion
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { DIGITAL_COLLECT_AT, PARTIAL_APPROVAL_ERROR, REDEMPTION_METHOD, activeIntent, createAttemptReference, createPaymentError, currentIntent, defaultReversalFor, groupRedeems, hasRedeemPayment, isDeliveryFee, isManualPayment, isPaymentError, isRealPaymentMethod, isRealPaymentMethod as isRealPaymentMethod$1, isTenderSettled, isTipFee, liveTenders, memoryPaymentStorage, missingDeviceFields, money, moneyMin, moneyNumber, moneyZero, orderRedeems, orderRedeems as orderRedeems$1, redeemsCoverTotal, resolvePaymentPolicy, resolveProviderEnvironment, scopedPaymentStorage, taxBreakdown, toChargeAmount, withTerminalLock } from "@fire-spark/payments";
1
+ import { DIGITAL_COLLECT_AT, PARTIAL_APPROVAL_ERROR, REDEMPTION_METHOD, activeIntent, createAttemptReference, createPaymentError, currentIntent, defaultReversalFor, groupRedeems, hasRedeemPayment, isDeliveryFee, isManualPayment, isPaymentError, isProductReward, isRealPaymentMethod, isRealPaymentMethod as isRealPaymentMethod$1, isTenderSettled, isTipFee, liveTenders, memoryPaymentStorage, missingDeviceFields, money, moneyMin, moneyNumber, moneyZero, orderRedeems, orderRedeems as orderRedeems$1, redeemsCoverTotal, resolvePaymentPolicy, resolveProviderEnvironment, scopedPaymentStorage, taxBreakdown, toChargeAmount, withTerminalLock } from "@fire-spark/payments";
2
2
  import advancedFormat from "dayjs/plugin/advancedFormat.js";
3
3
  import isBetween from "dayjs/plugin/isBetween.js";
4
4
  import isSameOrAfter from "dayjs/plugin/isSameOrAfter.js";
@@ -4306,7 +4306,8 @@ const fitRedeems = (order) => {
4306
4306
  const net = money(redemptionCap(order, true));
4307
4307
  let used = moneyZero();
4308
4308
  const fit = (item, line, lineUsed) => {
4309
- if (!hasRedeemPayment(item) || !(item.amount > 0)) return moneyZero();
4309
+ if (!hasRedeemPayment(item) || isProductReward(item)) return moneyZero();
4310
+ if (!(item.amount > 0)) return moneyZero();
4310
4311
  const beforeTaxes = item.before_taxes ?? true;
4311
4312
  let room = (beforeTaxes ? net : gross).minus(used);
4312
4313
  if (line) {
@@ -4332,6 +4333,7 @@ const fitRedeems = (order) => {
4332
4333
  };
4333
4334
  const keepFitted = (items, fitted) => {
4334
4335
  return items.flatMap((item, index) => {
4336
+ if (isProductReward(item)) return [item];
4335
4337
  const fits = fitted[index] ?? moneyZero();
4336
4338
  if (fits.lte(0)) return [];
4337
4339
  if (fits.eq(item.amount)) return [item];
@@ -4368,8 +4370,9 @@ const cappedRedeems = (order) => {
4368
4370
  return orderRedeems(capRedeems(order));
4369
4371
  };
4370
4372
  /**
4371
- * One REDEMPTION tender per `payment_id` (D15, D19); its
4372
- * `details.rewards[]` lists every grouped redeem.
4373
+ * One REDEMPTION tender per `payment_id` that covers money (D15, D19).
4374
+ * PRODUCT rewards are left out, so a payment that only links products
4375
+ * gets no tender. `details.rewards[]` lists the money redeems.
4373
4376
  */
4374
4377
  const redemptionTenderInputs = (redeem, providers = /* @__PURE__ */ new Map()) => {
4375
4378
  return groupRedeems(redeem).map(({ payment_id, details }) => {
@@ -5746,21 +5749,34 @@ const collectRecommendations = (config) => {
5746
5749
  };
5747
5750
  //#endregion
5748
5751
  //#region src/order/redemptions.ts
5752
+ const REWARD_TYPES = /* @__PURE__ */ new Set([
5753
+ "POINTS",
5754
+ "DISCOUNT",
5755
+ "PRODUCT"
5756
+ ]);
5749
5757
  /** Same rules as `vOrders.redeem()`; throws on invalid input. */
5750
5758
  const buildRedeem = (input) => {
5751
- const { reward_id, quantity, payment_id, amount } = input;
5759
+ const { reward_id, quantity, payment_id, type } = input;
5752
5760
  const { before_taxes, expires_at } = input;
5753
5761
  if (typeof reward_id !== "string" || !reward_id.trim()) throw new Error("Redeem requires reward_id");
5754
5762
  if (!Number.isInteger(quantity) || quantity < 1) throw new Error("Redeem quantity must be an integer ≥ 1");
5755
5763
  if (typeof payment_id !== "string" || !payment_id.trim()) throw new Error("Redeem requires payment_id");
5756
- if (typeof amount !== "number" || !(amount > 0)) throw new Error("Redeem requires amount > 0");
5764
+ if (type !== void 0 && !REWARD_TYPES.has(type)) throw new Error("Redeem type must be POINTS, DISCOUNT or PRODUCT");
5765
+ const product = type === "PRODUCT";
5766
+ let amount = input.amount;
5767
+ if (product) {
5768
+ if (amount === void 0) amount = 0;
5769
+ if (typeof amount !== "number" || !Number.isFinite(amount) || amount < 0) throw new Error("Product reward amount must be ≥ 0");
5770
+ } else if (typeof amount !== "number" || !(amount > 0)) throw new Error("Redeem requires amount > 0");
5757
5771
  if (expires_at !== void 0 && Number.isNaN(Date.parse(expires_at))) throw new Error("Redeem expires_at must be an ISO datetime");
5772
+ if (typeof amount !== "number") throw new Error("Redeem requires amount > 0");
5758
5773
  const redeem = {
5759
5774
  reward_id,
5760
5775
  quantity,
5761
5776
  payment_id,
5762
5777
  amount
5763
5778
  };
5779
+ if (type !== void 0) redeem.type = type;
5764
5780
  if (before_taxes !== void 0) redeem.before_taxes = before_taxes;
5765
5781
  if (expires_at !== void 0) redeem.expires_at = expires_at;
5766
5782
  return redeem;
@@ -5831,13 +5847,14 @@ const subtractRedeem = (items, reward_id, quantity) => {
5831
5847
  return kept;
5832
5848
  };
5833
5849
  /**
5834
- * Money the redeems cover (Σ `amount`): the discount the customer sees.
5835
- * It is paid by REDEMPTION tenders, so it is never subtracted from line
5836
- * or order totals.
5850
+ * Money POINTS and DISCOUNT redeems cover (Σ `amount`). A PRODUCT reward
5851
+ * is not included: it links a line and does not change what the customer
5852
+ * pays. The sum is paid by REDEMPTION tenders, so it is never subtracted
5853
+ * from line or order totals.
5837
5854
  */
5838
5855
  const redeemedTotal = (redeem = []) => {
5839
5856
  return (redeem ?? []).reduce((sum, item) => {
5840
- if (!hasRedeemPayment(item)) return sum;
5857
+ if (!hasRedeemPayment(item) || isProductReward(item)) return sum;
5841
5858
  return sum.plus(item.amount ?? 0);
5842
5859
  }, new Big(0)).toNumber();
5843
5860
  };
@@ -5934,10 +5951,11 @@ const stateOf = (target) => {
5934
5951
  /**
5935
5952
  * One step per redeem with a `payment_id`, in the order `fitRedeems`
5936
5953
  * applies them: root-line redeems in line order, then order redeems.
5937
- * `discount_amount` is the capped `amount`, so the steps of a `payment_id`
5938
- * add up to its REDEMPTION tender and the line steps to the discount shown
5939
- * on the line. Lines, taxes and totals keep their full value; `value` is
5940
- * what the customer's method still pays.
5954
+ * `discount_amount` is the capped `amount` of a POINTS or DISCOUNT redeem,
5955
+ * so those steps of a `payment_id` add up to its REDEMPTION tender. A
5956
+ * PRODUCT reward is a step with `discount_amount` 0 and action READ: it
5957
+ * links the line and does not change `value`. Lines, taxes and totals keep
5958
+ * their full value; `value` is what the customer's method still pays.
5941
5959
  */
5942
5960
  const redemptionSteps = (order) => {
5943
5961
  const fitted = fitRedeems(order);
@@ -5967,10 +5985,12 @@ const redemptionSteps = (order) => {
5967
5985
  before,
5968
5986
  after: stateOf(whole)
5969
5987
  };
5988
+ const typed = item.type ? { type: item.type } : {};
5970
5989
  return {
5971
5990
  ...s1,
5972
5991
  ...s2,
5973
5992
  ...s3,
5993
+ ...typed,
5974
5994
  ...s4,
5975
5995
  ...s5,
5976
5996
  targetBefore
@@ -6556,19 +6576,20 @@ var Order = class Order {
6556
6576
  });
6557
6577
  }
6558
6578
  /**
6559
- * Applies a redeem (points, voucher, free product…) to `line_uid` (root
6560
- * product line) or to the order. `payment_id` and `amount` are required:
6561
- * `amount` is what the redeem covers for the whole entry and is shown as
6562
- * the line / order discount, while line and order totals keep their full
6563
- * value. The REDEMPTION tender of `payment_id` pays `amount`; the
6564
- * customer's method pays the rest (the taxes when `before_taxes`, the
6565
- * default, keeps them out of the redeem). Redeems with the same
6566
- * `payment_id` share one tender (D15, D18, D19).
6579
+ * Applies a redeem to `line_uid` (root product line) or to the order.
6580
+ * POINTS and DISCOUNT need `amount` > 0: that money is the discount,
6581
+ * line and order totals stay full, and the REDEMPTION tender of
6582
+ * `payment_id` pays it. The customer's method pays the rest (taxes stay
6583
+ * out when `before_taxes`, the default). Redeems with the same
6584
+ * `payment_id` share one tender (D15, D18, D19). A PRODUCT reward needs
6585
+ * `line_uid`. It links that line, keeps the cart price, and adds no
6586
+ * tender money.
6567
6587
  */
6568
6588
  applyRedeem(input) {
6569
6589
  if (this.deleted) return;
6570
6590
  const { line_uid, provider, ...rest } = input;
6571
6591
  const redeem = buildRedeem(rest);
6592
+ if (redeem.type === "PRODUCT" && line_uid === void 0) throw new Error("Product reward requires a root product line");
6572
6593
  if (provider) this.redemptionProviders.set(redeem.payment_id, provider);
6573
6594
  if (line_uid === void 0) {
6574
6595
  this.commitLines({ redeem: [...this.appliedRedeem(), redeem] });
@@ -6853,10 +6874,10 @@ var Order = class Order {
6853
6874
  await services.orders.validate(body, this.http);
6854
6875
  }
6855
6876
  /**
6856
- * Tenders of the next intent: one REDEMPTION per redeem `payment_id`
6857
- * (order and lines, capped) plus the customer's method for the rest,
6858
- * e.g. the taxes. When the redeems cover the whole total, only
6859
- * REDEMPTION tenders.
6877
+ * Tenders of the next intent: one REDEMPTION per `payment_id` that
6878
+ * covers money (order and lines, capped) plus the customer's method for
6879
+ * the rest, e.g. the taxes. PRODUCT rewards add no tender. When the
6880
+ * money redeems cover the whole total, only REDEMPTION tenders.
6860
6881
  */
6861
6882
  getTenders(payment) {
6862
6883
  const redeem = cappedRedeems(this.draft);
@@ -8423,9 +8444,11 @@ const paymentProblem = (payment_id, payments) => {
8423
8444
  return null;
8424
8445
  };
8425
8446
  /**
8426
- * Every redeem needs `payment_id` and `amount > 0`; with `payments`, the
8427
- * payment must exist, be active and be a REDEMPTION method. `amount` must
8428
- * already be trimmed to its `before_taxes` cap (`fitted`).
8447
+ * Every redeem needs `payment_id`. POINTS and DISCOUNT also need
8448
+ * `amount > 0`, already trimmed to the `before_taxes` cap (`fitted`).
8449
+ * A PRODUCT reward may send `amount` 0: it links the line and covers no
8450
+ * money. With `payments`, the payment must exist, be active and be a
8451
+ * REDEMPTION method.
8429
8452
  */
8430
8453
  const redeemIssues = (items, fitted, payments) => {
8431
8454
  const issues = [];
@@ -8439,6 +8462,20 @@ const redeemIssues = (items, fitted, payments) => {
8439
8462
  });
8440
8463
  return;
8441
8464
  }
8465
+ if (isProductReward(item)) {
8466
+ const problem = payments ? paymentProblem(payment_id, payments) : null;
8467
+ if (!problem) return;
8468
+ const b1 = {
8469
+ code: "REDEEM_PAYMENT_METHOD_NOT_CONFIGURED",
8470
+ field: `${prefix}.payment_id`
8471
+ };
8472
+ issues.push({
8473
+ ...b1,
8474
+ expected: REDEMPTION_METHOD,
8475
+ actual: problem
8476
+ });
8477
+ return;
8478
+ }
8442
8479
  if (!(typeof item.amount === "number" && item.amount > 0)) {
8443
8480
  issues.push({
8444
8481
  code: "REDEEM_PAYMENT_REQUIRED",
@@ -8500,9 +8537,11 @@ const flattenStep = (step) => {
8500
8537
  before_taxes: String(step.before_taxes)
8501
8538
  };
8502
8539
  const b2 = { discount_amount: bigStr(step.discount_amount) };
8540
+ const b3 = { type: step.type ?? "" };
8503
8541
  const out = {
8504
8542
  ...b1,
8505
- ...b2
8543
+ ...b2,
8544
+ ...b3
8506
8545
  };
8507
8546
  for (const key of STATE_KEYS) flattenState(key, step[key], out);
8508
8547
  return out;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fire-spark/core",
3
- "version": "0.17.2",
3
+ "version": "0.17.3",
4
4
  "description": "Fire Spark headless SDK",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -20,8 +20,8 @@
20
20
  "big.js": "6.2.1",
21
21
  "dayjs": "1.11.9",
22
22
  "@types/big.js": "6.2.2",
23
- "@fire-spark/payments": "^0.17.2",
24
- "@fire-spark/types": "^0.17.2"
23
+ "@fire-spark/payments": "^0.17.3",
24
+ "@fire-spark/types": "^0.17.3"
25
25
  },
26
26
  "devDependencies": {
27
27
  "tsdown": "^0.22.14",