@rebilly/instruments 16.71.0 → 16.72.0

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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
- ## [16.71.0](https://github.com/Rebilly/rebilly/compare/instruments/core-v16.70.1...instruments/core-v16.71.0) (2026-03-11)
1
+ ## [16.72.0](https://github.com/Rebilly/rebilly/compare/instruments/core-v16.71.0...instruments/core-v16.72.0) (2026-03-12)
2
2
 
3
3
 
4
4
  ### Features
5
5
 
6
- * **api-metadata, rebilly-js-sdk:** Update resources based on latest api definitions ([#19477](https://github.com/Rebilly/rebilly/issues/19477)) ([8abe73e](https://github.com/Rebilly/rebilly/commit/8abe73e570106c22138b48fb91e5aa285271fa3f))
6
+ * **be, recomm, instruments, storefront:** Add creating a credit memo on change quote invoice with negative value ([#16334](https://github.com/Rebilly/rebilly/issues/16334)) ([ce11e5d](https://github.com/Rebilly/rebilly/commit/ce11e5da19ea75bc0c1628271b20f80f01e572a9)), closes [#18252](https://github.com/Rebilly/rebilly/issues/18252) [#17068](https://github.com/Rebilly/rebilly/issues/17068)
package/dist/index.js CHANGED
@@ -1883,6 +1883,9 @@ const _InvoiceModel = class _InvoiceModel extends BaseModel {
1883
1883
  get isAbandoned() {
1884
1884
  return this.status === _InvoiceModel.Status.abandoned;
1885
1885
  }
1886
+ get isQuotation() {
1887
+ return this.status === _InvoiceModel.Status.quotation;
1888
+ }
1886
1889
  };
1887
1890
  _InvoiceModel.Status = {
1888
1891
  draft: "draft",
@@ -1891,6 +1894,7 @@ _InvoiceModel.Status = {
1891
1894
  partiallyPaid: "partially-paid",
1892
1895
  pastDue: "past-due",
1893
1896
  abandoned: "abandoned",
1897
+ quotation: "quotation",
1894
1898
  voided: "voided",
1895
1899
  partiallyRefunded: "partially-refunded",
1896
1900
  refunded: "refunded",
@@ -5294,7 +5298,7 @@ function C$1({ options: e2 }) {
5294
5298
  }
5295
5299
  function o2() {
5296
5300
  const i = {
5297
- "REB-API-CONSUMER": `${["Rebilly", e2.appName, "js-sdk"].filter((g) => g).join("/")}@8abe73e`
5301
+ "REB-API-CONSUMER": `${["Rebilly", e2.appName, "js-sdk"].filter((g) => g).join("/")}@ce11e5d`
5298
5302
  };
5299
5303
  return e2.apiKey && (i["REB-APIKEY"] = e2.apiKey), i;
5300
5304
  }
@@ -18853,7 +18857,7 @@ class DataInstance {
18853
18857
  amount,
18854
18858
  currency
18855
18859
  };
18856
- if (amountDue) {
18860
+ if (typeof amountDue === "number" && !isNaN(amountDue)) {
18857
18861
  amountAndCurrency.amountDue = amountDue;
18858
18862
  }
18859
18863
  return amountAndCurrency;
@@ -18881,11 +18885,14 @@ class DataInstance {
18881
18885
  const {
18882
18886
  shippingAmount = null,
18883
18887
  subtotalAmount = null,
18888
+ // @ts-expect-error TODO: fix - creditMemosAmount not yet present in api-definitions.
18889
+ creditMemosAmount = null,
18884
18890
  taxAmount = null
18885
18891
  } = this.previewPurchase || this.invoice || {};
18886
18892
  const discountsAmount = ((_a = this.previewPurchase) == null ? void 0 : _a.discountsAmount) ?? ((_b = this.invoice) == null ? void 0 : _b.discountAmount) ?? null;
18887
18893
  return {
18888
18894
  discountsAmount,
18895
+ creditMemosAmount,
18889
18896
  shippingAmount,
18890
18897
  subtotalAmount,
18891
18898
  taxAmount