@fire-spark/core 0.3.2 → 0.3.4

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 (3) hide show
  1. package/dist/index.d.ts +13 -1
  2. package/dist/index.js +1207 -1177
  3. package/package.json +3 -3
package/dist/index.d.ts CHANGED
@@ -464,6 +464,12 @@ declare class Order {
464
464
  /** Real tenders chosen with `setTenders`; REDEMPTION ones come from redeem. */
465
465
  private realTenders;
466
466
  private readonly redemptionProviders;
467
+ /**
468
+ * Redeems as applied, before the D18 cap trims payment amounts. The cap
469
+ * is re-derived from these on every edit, so a redeem trimmed while the
470
+ * total was low recovers its amount once the total grows back.
471
+ */
472
+ private requestedRedeem;
467
473
  private constructor();
468
474
  /**
469
475
  * Opens a cart session: reuses an existing OPEN order for the scope, or a
@@ -549,7 +555,10 @@ declare class Order {
549
555
  reopen(): Promise<Order>;
550
556
  refundOrder(): Promise<void>;
551
557
  validateOrder(): Promise<void>;
552
- /** Tenders of the next intent: real ones plus one per payment redeem. */
558
+ /**
559
+ * Tenders of the next intent: real ones plus one per payment redeem.
560
+ * When the payment redeems cover the total, only REDEMPTION tenders.
561
+ */
553
562
  getTenders(payment?: PlaceOrderInput["payment"]): PaymentTenderInput[];
554
563
  /**
555
564
  * Chooses the real tenders (with allocation for mixed payments) and saves
@@ -561,6 +570,9 @@ declare class Order {
561
570
  clearTenders(): Promise<Order$1>;
562
571
  private syncPaymentIntent;
563
572
  private applyServerOrder;
573
+ /** Keeps the applied redeems while the server holds the same capped ones. */
574
+ private replaceDraft;
575
+ private appliedRedeem;
564
576
  /**
565
577
  * Places the order with a DRAFT intent: `intent_id` as is, else the
566
578
  * tenders of `getTenders(input.payment)` saved first (simple flow: one