@rebilly/instruments 12.52.2 → 12.53.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 +1,6 @@
1
- ## [12.52.2](https://github.com/Rebilly/rebilly/compare/instruments/core-v12.52.1...instruments/core-v12.52.2) (2025-04-22)
1
+ ## [12.53.0](https://github.com/Rebilly/rebilly/compare/instruments/core-v12.52.3...instruments/core-v12.53.0) (2025-04-23)
2
+
3
+
4
+ ### Features
5
+
6
+ * **api-defs, frontend:** api definition updates, quote update in recomm ([#11422](https://github.com/Rebilly/rebilly/issues/11422)) ([1e75e1c](https://github.com/Rebilly/rebilly/commit/1e75e1c39b18e8a4d73762544687b28ea51a451b))
package/dist/index.js CHANGED
@@ -6278,7 +6278,7 @@ function C$1({ options: e2 }) {
6278
6278
  }
6279
6279
  function o2() {
6280
6280
  const i = {
6281
- "REB-API-CONSUMER": `${["Rebilly", e2.appName, "js-sdk"].filter((g) => g).join("/")}@a9513bb`
6281
+ "REB-API-CONSUMER": `${["Rebilly", e2.appName, "js-sdk"].filter((g) => g).join("/")}@1e75e1c`
6282
6282
  };
6283
6283
  return e2.apiKey && (i["REB-APIKEY"] = e2.apiKey), i;
6284
6284
  }
@@ -7806,10 +7806,7 @@ function Ee$1({ apiHandler: e2 }) {
7806
7806
  const o2 = this.getAllAttachments(s);
7807
7807
  r2.push(o2);
7808
7808
  const a = (await o2).items.map(
7809
- (y) => (
7810
- // @ts-ignore
7811
- this.detach({ id: y.fields.id })
7812
- )
7809
+ (y) => this.detach({ id: y.fields.id })
7813
7810
  );
7814
7811
  r2 = [...r2, a], await Promise.all(a);
7815
7812
  const f = e2.delete(`files/${t2}`);
@@ -9617,12 +9614,8 @@ function ys({ apiHandler: e2 }) {
9617
9614
  const o2 = { filter: t2, sort: s, limit: r2, offset: n2, q: u };
9618
9615
  return e2.getAll("usages", o2);
9619
9616
  },
9620
- /**
9621
- * @param { rebilly.CreateUsageRequest } request
9622
- * @returns { rebilly.PostUsageResponsePromise } response
9623
- */
9624
- create({ id: t2 = "", data: s }) {
9625
- return e2.create(`usages/${t2}`, t2, s);
9617
+ create({ data: t2 }) {
9618
+ return e2.post("usages", t2);
9626
9619
  },
9627
9620
  /**
9628
9621
  * @returns { rebilly.GetUsageResponsePromise } response
@@ -9630,12 +9623,6 @@ function ys({ apiHandler: e2 }) {
9630
9623
  get({ id: t2 }) {
9631
9624
  return e2.get(`usages/${t2}`);
9632
9625
  },
9633
- /**
9634
- * @returns { rebilly.PutUsageResponsePromise } response
9635
- */
9636
- update({ id: t2, data: s }) {
9637
- return e2.put(`usages/${t2}`, s);
9638
- },
9639
9626
  delete({ id: t2 }) {
9640
9627
  return e2.delete(`usages/${t2}`);
9641
9628
  }
@@ -10896,9 +10883,9 @@ class StorefrontInstance {
10896
10883
  };
10897
10884
  const api = gr(config);
10898
10885
  const rebilly = (
10899
- // @ts-ignore refactor with above todo
10886
+ // @ts-expect-error refactor with above todo
10900
10887
  typeof cr.default === "function" ? (
10901
- // @ts-ignore refactor with above todo
10888
+ // @ts-expect-error refactor with above todo
10902
10889
  cr.default(config)
10903
10890
  ) : cr(config)
10904
10891
  );
@@ -10991,18 +10978,18 @@ async function fetchSummary({
10991
10978
  state.data.summaryLineItems
10992
10979
  );
10993
10980
  }
10994
- if (!((_k = state.data) == null ? void 0 : _k.acceptBumpOffer) && // @ts-ignore TODO: type "addonLineItems" once "views/common/iframe/events/update-addons-handler.js" is typed.
10981
+ if (!((_k = state.data) == null ? void 0 : _k.acceptBumpOffer) && // @ts-expect-error TODO: type "addonLineItems" once "views/common/iframe/events/update-addons-handler.js" is typed.
10995
10982
  ((_n = (_m = (_l = state.data) == null ? void 0 : _l.previewPurchase) == null ? void 0 : _m.addonLineItems) == null ? void 0 : _n.length) > 0) {
10996
10983
  payload.data.items = (_p = (_o = payload.data) == null ? void 0 : _o.items) == null ? void 0 : _p.concat(
10997
- // @ts-ignore TODO: type "addonLineItems" once "views/common/iframe/events/update-addons-handler.js" is typed.
10984
+ // @ts-expect-error TODO: type "addonLineItems" once "views/common/iframe/events/update-addons-handler.js" is typed.
10998
10985
  state.data.previewPurchase.addonLineItems
10999
10986
  );
11000
10987
  }
11001
10988
  }
11002
- if (!((_q = state.data) == null ? void 0 : _q.acceptBumpOffer) && // @ts-ignore TODO: type "addonLineItems" once "views/common/iframe/events/update-addons-handler.js" is typed.
10989
+ if (!((_q = state.data) == null ? void 0 : _q.acceptBumpOffer) && // @ts-expect-error TODO: type "addonLineItems" once "views/common/iframe/events/update-addons-handler.js" is typed.
11003
10990
  ((_t2 = (_s2 = (_r = state.data) == null ? void 0 : _r.previewPurchase) == null ? void 0 : _s2.addonLineItems) == null ? void 0 : _t2.length) > 0) {
11004
10991
  payload.data.items = (_u = payload.data.items) == null ? void 0 : _u.concat(
11005
- // @ts-ignore TODO: type "addonLineItems" once "views/common/iframe/events/update-addons-handler.js" is typed.
10992
+ // @ts-expect-error TODO: type "addonLineItems" once "views/common/iframe/events/update-addons-handler.js" is typed.
11006
10993
  state.data.previewPurchase.addonLineItems
11007
10994
  );
11008
10995
  }
@@ -11040,9 +11027,9 @@ async function fetchSummary({
11040
11027
  if (transformedFields.lineItems) {
11041
11028
  if ((_z = (_y = state.data) == null ? void 0 : _y.previewPurchase) == null ? void 0 : _z.addonLineItems) {
11042
11029
  const addonsMap = (
11043
- // @ts-ignore TODO: type "addonLineItems" once "views/common/iframe/events/update-addons-handler.js" is typed.
11030
+ // @ts-expect-error TODO: type "addonLineItems" once "views/common/iframe/events/update-addons-handler.js" is typed.
11044
11031
  state.data.previewPurchase.addonLineItems.reduce(
11045
- // @ts-ignore TODO: type "addonLineItems" once "views/common/iframe/events/update-addons-handler.js" is typed.
11032
+ // @ts-expect-error TODO: type "addonLineItems" once "views/common/iframe/events/update-addons-handler.js" is typed.
11046
11033
  (map, curr) => {
11047
11034
  map.set(curr.planId, curr);
11048
11035
  return map;
@@ -11053,7 +11040,7 @@ async function fetchSummary({
11053
11040
  transformedFields.lineItems = transformedFields.lineItems.filter(
11054
11041
  (item) => !addonsMap.has(item.planId)
11055
11042
  );
11056
- transformedFields.addonLineItems = // @ts-ignore TODO: type "addonLineItems" once "views/common/iframe/events/update-addons-handler.js" is typed.
11043
+ transformedFields.addonLineItems = // @ts-expect-error TODO: type "addonLineItems" once "views/common/iframe/events/update-addons-handler.js" is typed.
11057
11044
  state.data.previewPurchase.addonLineItems;
11058
11045
  }
11059
11046
  transformedFields.lineItems.forEach(
@@ -16965,7 +16952,7 @@ async function fetchData({
16965
16952
  });
16966
16953
  } else {
16967
16954
  state.data.deposit = new DepositRequestModel(
16968
- // @ts-ignore TODO: refactor - customAmounts optional modifier not present in api-definitions.
16955
+ // @ts-expect-error TODO: refactor - customAmounts optional modifier not present in api-definitions.
16969
16956
  state.options.deposit
16970
16957
  );
16971
16958
  }