@rebilly/instruments 16.140.0 → 16.141.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 +2 -2
- package/dist/index.js +52 -35
- package/dist/index.min.js +9 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
## [16.
|
|
1
|
+
## [16.141.0](https://github.com/Rebilly/rebilly/compare/instruments/core-v16.140.0...instruments/core-v16.141.0) (2026-07-01)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Features
|
|
5
5
|
|
|
6
|
-
* **
|
|
6
|
+
* **instruments:** show prorata pricing and billed to address for invoices ([#23084](https://github.com/Rebilly/rebilly/issues/23084)) ([7cb1ab2](https://github.com/Rebilly/rebilly/commit/7cb1ab2a424baedd96f7a2f147cd95619d4e020b))
|
package/dist/index.js
CHANGED
|
@@ -5365,12 +5365,12 @@ let A$1 = class A extends Error {
|
|
|
5365
5365
|
n2 && n2.data && (n2.data.error ? l = n2.data.error : n2.data.detail ? l = n2.data.detail : n2.data.title && (l = n2.data.title)), super(l), this.name = s || "RebillyError", this.response = n2, this.request = u, this.config = r2, this.status = n2 && n2.status ? n2.status : null, this.statusText = n2 && n2.statusText ? n2.statusText : null, this.details = n2 && n2.data && n2.data.details ? n2.data.details : null, this.invalidFields = n2 && n2.data && n2.data.invalidFields ? n2.data.invalidFields : null;
|
|
5366
5366
|
}
|
|
5367
5367
|
};
|
|
5368
|
-
let
|
|
5368
|
+
let bt$1 = class bt extends A$1 {
|
|
5369
5369
|
constructor(t2) {
|
|
5370
5370
|
super({ error: t2, name: "RebillyRequestError" });
|
|
5371
5371
|
}
|
|
5372
5372
|
};
|
|
5373
|
-
let
|
|
5373
|
+
let Rt$1 = class Rt extends A$1 {
|
|
5374
5374
|
constructor(t2) {
|
|
5375
5375
|
super({ error: t2, name: "RebillyValidationError" });
|
|
5376
5376
|
}
|
|
@@ -5407,8 +5407,8 @@ let Tt$1 = class Tt extends A$1 {
|
|
|
5407
5407
|
};
|
|
5408
5408
|
const y = {
|
|
5409
5409
|
RebillyError: A$1,
|
|
5410
|
-
RebillyRequestError:
|
|
5411
|
-
RebillyValidationError:
|
|
5410
|
+
RebillyRequestError: bt$1,
|
|
5411
|
+
RebillyValidationError: Rt$1,
|
|
5412
5412
|
RebillyNotFoundError: wt$1,
|
|
5413
5413
|
RebillyConflictError: kt$1,
|
|
5414
5414
|
RebillyForbiddenError: vt$1,
|
|
@@ -5779,7 +5779,7 @@ function O$1({ options: e2 }) {
|
|
|
5779
5779
|
}
|
|
5780
5780
|
function o2() {
|
|
5781
5781
|
const g = {
|
|
5782
|
-
"REB-API-CONSUMER": `${["Rebilly", e2.appName, "js-sdk"].filter((m2) => m2).join("/")}@
|
|
5782
|
+
"REB-API-CONSUMER": `${["Rebilly", e2.appName, "js-sdk"].filter((m2) => m2).join("/")}@7cb1ab2`
|
|
5783
5783
|
};
|
|
5784
5784
|
return e2.apiKey && (g["REB-APIKEY"] = e2.apiKey), g;
|
|
5785
5785
|
}
|
|
@@ -5840,8 +5840,8 @@ function O$1({ options: e2 }) {
|
|
|
5840
5840
|
function ut2(c) {
|
|
5841
5841
|
N2(k$1.response, c);
|
|
5842
5842
|
}
|
|
5843
|
-
function
|
|
5844
|
-
const p = z2(m2), { id:
|
|
5843
|
+
function R({ request: c, isCollection: g, config: m2 }) {
|
|
5844
|
+
const p = z2(m2), { id: b, cancelToken: $t2 } = q$1.save();
|
|
5845
5845
|
p.cancelToken = $t2;
|
|
5846
5846
|
const W2 = (async function() {
|
|
5847
5847
|
try {
|
|
@@ -5854,10 +5854,10 @@ function O$1({ options: e2 }) {
|
|
|
5854
5854
|
} catch (d) {
|
|
5855
5855
|
return L2({ error: d });
|
|
5856
5856
|
} finally {
|
|
5857
|
-
q$1.deleteById(
|
|
5857
|
+
q$1.deleteById(b);
|
|
5858
5858
|
}
|
|
5859
5859
|
})();
|
|
5860
|
-
return W2.cancel = (d) => I$1.cancelById(
|
|
5860
|
+
return W2.cancel = (d) => I$1.cancelById(b, d), W2;
|
|
5861
5861
|
}
|
|
5862
5862
|
function ot2({ response: c, isCollection: g, config: m2 }) {
|
|
5863
5863
|
return g ? new yt$1(c, m2) : new tt$1(c, m2);
|
|
@@ -5891,13 +5891,13 @@ function O$1({ options: e2 }) {
|
|
|
5891
5891
|
return { ...lt2(c) };
|
|
5892
5892
|
}
|
|
5893
5893
|
function U2(c, g = {}) {
|
|
5894
|
-
return
|
|
5894
|
+
return R({
|
|
5895
5895
|
request: (m2) => t2.get(c, m2),
|
|
5896
5896
|
config: { params: g }
|
|
5897
5897
|
});
|
|
5898
5898
|
}
|
|
5899
5899
|
function ct2(c, g) {
|
|
5900
|
-
return
|
|
5900
|
+
return R({
|
|
5901
5901
|
request: (m2) => t2.get(c, m2),
|
|
5902
5902
|
config: { params: g },
|
|
5903
5903
|
isCollection: true
|
|
@@ -5905,31 +5905,31 @@ function O$1({ options: e2 }) {
|
|
|
5905
5905
|
}
|
|
5906
5906
|
function V2(c, g, m2 = {}) {
|
|
5907
5907
|
let p = {};
|
|
5908
|
-
return m2.authenticate === false && (p = { headers: l() }, delete p.headers.common["REB-APIKEY"], delete p.headers.common.Authorization), m2.params && (p.params = { ...m2.params }),
|
|
5909
|
-
request: (
|
|
5908
|
+
return m2.authenticate === false && (p = { headers: l() }, delete p.headers.common["REB-APIKEY"], delete p.headers.common.Authorization), m2.params && (p.params = { ...m2.params }), R({
|
|
5909
|
+
request: (b) => t2.post(c, g, b),
|
|
5910
5910
|
config: p
|
|
5911
5911
|
});
|
|
5912
5912
|
}
|
|
5913
5913
|
function J2(c, g, m2 = {}) {
|
|
5914
|
-
return
|
|
5914
|
+
return R({
|
|
5915
5915
|
request: (p) => t2.put(c, g, p),
|
|
5916
5916
|
config: { params: m2 }
|
|
5917
5917
|
});
|
|
5918
5918
|
}
|
|
5919
5919
|
function it2(c, g) {
|
|
5920
|
-
return
|
|
5920
|
+
return R({
|
|
5921
5921
|
request: (m2) => t2.patch(c, g, m2),
|
|
5922
5922
|
config: {}
|
|
5923
5923
|
});
|
|
5924
5924
|
}
|
|
5925
5925
|
function gt2(c) {
|
|
5926
|
-
return
|
|
5926
|
+
return R({
|
|
5927
5927
|
request: (g) => t2.delete(c, g),
|
|
5928
5928
|
config: {}
|
|
5929
5929
|
});
|
|
5930
5930
|
}
|
|
5931
5931
|
function at2(c, g) {
|
|
5932
|
-
return
|
|
5932
|
+
return R({
|
|
5933
5933
|
request: (m2) => t2.delete(c, m2),
|
|
5934
5934
|
config: { data: { ...g } }
|
|
5935
5935
|
});
|
|
@@ -5942,10 +5942,10 @@ function O$1({ options: e2 }) {
|
|
|
5942
5942
|
throw new y.RebillyConflictError({
|
|
5943
5943
|
message: "A resource already exists with this ID. Please use a different ID."
|
|
5944
5944
|
});
|
|
5945
|
-
} catch (
|
|
5946
|
-
if (
|
|
5945
|
+
} catch (b) {
|
|
5946
|
+
if (b.name === "RebillyNotFoundError")
|
|
5947
5947
|
return J2(c, m2, p);
|
|
5948
|
-
throw
|
|
5948
|
+
throw b;
|
|
5949
5949
|
}
|
|
5950
5950
|
}
|
|
5951
5951
|
async function ft2(c, g) {
|
|
@@ -7656,7 +7656,7 @@ function Ae$1({ apiHandler: e2 }) {
|
|
|
7656
7656
|
}
|
|
7657
7657
|
};
|
|
7658
7658
|
}
|
|
7659
|
-
function
|
|
7659
|
+
function be({ apiHandler: e2 }) {
|
|
7660
7660
|
return {
|
|
7661
7661
|
/**
|
|
7662
7662
|
* @param { rebilly.GetJournalAccountCollectionRequest } request
|
|
@@ -7692,7 +7692,7 @@ function Re$1({ apiHandler: e2 }) {
|
|
|
7692
7692
|
}
|
|
7693
7693
|
};
|
|
7694
7694
|
}
|
|
7695
|
-
function
|
|
7695
|
+
function Re$1({ apiHandler: e2 }) {
|
|
7696
7696
|
return {
|
|
7697
7697
|
/**
|
|
7698
7698
|
* @param { rebilly.GetJournalEntryCollectionRequest } request
|
|
@@ -9523,7 +9523,7 @@ class $s {
|
|
|
9523
9523
|
apiHandler: t2
|
|
9524
9524
|
}), this.depositRequests = ne$1({ apiHandler: t2 }), this.depositStrategies = ue$1({ apiHandler: t2 }), this.digitalWallets = oe$1({ apiHandler: t2 }), this.disputes = le$1({ apiHandler: t2 }), this.emailDeliverySettings = ce$1({ apiHandler: t2 }), this.emailMessages = ie$1({ apiHandler: t2 }), this.emailNotifications = ge({ apiHandler: t2 }), this.events = ae$1({ apiHandler: t2 }), this.externalIdentifiers = me$1({ apiHandler: t2 }), this.externalServicesSettings = fe$1({
|
|
9525
9525
|
apiHandler: t2
|
|
9526
|
-
}), this.fees = $e$1({ apiHandler: t2 }), this.files = pe$1({ apiHandler: t2 }), this.gatewayAccounts = he$1({ apiHandler: t2 }), this.integrations = ye$1({ apiHandler: t2 }), this.invoices = Ae$1({ apiHandler: t2 }), this.journalAccounts =
|
|
9526
|
+
}), this.fees = $e$1({ apiHandler: t2 }), this.files = pe$1({ apiHandler: t2 }), this.gatewayAccounts = he$1({ apiHandler: t2 }), this.integrations = ye$1({ apiHandler: t2 }), this.invoices = Ae$1({ apiHandler: t2 }), this.journalAccounts = be({ apiHandler: t2 }), this.journalEntries = Re$1({ apiHandler: t2 }), this.journalRecords = we$1({ apiHandler: t2 }), this.kycDocuments = ke$1({ apiHandler: t2 }), this.kycRequests = ve$1({ apiHandler: t2 }), this.kycSettings = qe$1({ apiHandler: t2 }), this.lists = de$1({ apiHandler: t2 }), this.memberships = Te$1({ apiHandler: t2 }), this.orderCancellations = Ie$1({ apiHandler: t2 }), this.orderPauses = Se$1({ apiHandler: t2 }), this.orderReactivations = Ee$1({ apiHandler: t2 }), this.orders = xe$1({ apiHandler: t2 }), this.organizationExports = Pe$1({ apiHandler: t2 }), this.organizations = Ce$1({ apiHandler: t2 }), this.paymentCardsBankNames = De$1({ apiHandler: t2 }), this.paymentInstruments = je$1({ apiHandler: t2 }), this.paymentMethods = Me$1({ apiHandler: t2 }), this.paymentTokens = Oe$1({ apiHandler: t2 }), this.payoutRequestAllocations = Fe$1({
|
|
9527
9527
|
apiHandler: t2
|
|
9528
9528
|
}), this.payoutRequestBatches = Be$1({ apiHandler: t2 }), this.payoutRequests = Ke$1({ apiHandler: t2 }), this.payouts = Ne$1({ apiHandler: t2 }), this.plans = Le$1({ apiHandler: t2 }), this.previews = ze$1({ apiHandler: t2 }), this.products = Ue$1({ apiHandler: t2 }), this.profile = Ve$1({ apiHandler: t2 }), this.purchase = Je$1({ apiHandler: t2 }), this.quotes = We$1({ apiHandler: t2 }), this.resource = Ge$1({ apiHandler: t2 }), this.riskScoreRules = Ye$1({ apiHandler: t2 }), this.roles = Qe$1({ apiHandler: t2 }), this.search = Xe$1({ apiHandler: t2 }), this.segments = Ze$1({ apiHandler: t2 }), this.sendThroughAttribution = _e$1({ apiHandler: t2 }), this.serviceCredentials = He$1({ apiHandler: t2 }), this.shippingRates = ts({ apiHandler: t2 }), this.status = es({ apiHandler: t2 }), this.subscriptionCancellations = ss({
|
|
9529
9529
|
apiHandler: t2
|
|
@@ -10103,7 +10103,7 @@ function As({ apiHandler: e2 }) {
|
|
|
10103
10103
|
}
|
|
10104
10104
|
};
|
|
10105
10105
|
}
|
|
10106
|
-
function
|
|
10106
|
+
function bs({ apiHandler: e2 }) {
|
|
10107
10107
|
return {
|
|
10108
10108
|
/**
|
|
10109
10109
|
* @returns { rebilly.GetSubscriptionSummaryMetricReportResponsePromise } response
|
|
@@ -10113,7 +10113,7 @@ function Rs({ apiHandler: e2 }) {
|
|
|
10113
10113
|
}
|
|
10114
10114
|
};
|
|
10115
10115
|
}
|
|
10116
|
-
function
|
|
10116
|
+
function Rs({ apiHandler: e2 }) {
|
|
10117
10117
|
return {
|
|
10118
10118
|
getActivityFeed({ eventTypes: t2 = null, limit: s = 1e3, offset: r2 = 0 }) {
|
|
10119
10119
|
const n2 = {
|
|
@@ -10153,8 +10153,8 @@ const w = {
|
|
|
10153
10153
|
DataExportsResource: hs,
|
|
10154
10154
|
HistogramsResource: ys,
|
|
10155
10155
|
ReportsResource: As,
|
|
10156
|
-
SubscriptionsResource:
|
|
10157
|
-
TimelinesResource:
|
|
10156
|
+
SubscriptionsResource: bs,
|
|
10157
|
+
TimelinesResource: Rs,
|
|
10158
10158
|
LocationResource: ws
|
|
10159
10159
|
};
|
|
10160
10160
|
class ks {
|
|
@@ -13183,20 +13183,31 @@ async function fetchInvoiceAndProducts({
|
|
|
13183
13183
|
data
|
|
13184
13184
|
}) {
|
|
13185
13185
|
return Endpoint(async () => {
|
|
13186
|
-
var _a;
|
|
13186
|
+
var _a, _b;
|
|
13187
13187
|
validateStorefront(state.storefront);
|
|
13188
13188
|
validateOptions$1(state.options);
|
|
13189
13189
|
state.storefront.setSessionToken(state.options.jwt);
|
|
13190
13190
|
const { fields } = await state.storefront.invoices.get({
|
|
13191
13191
|
...data,
|
|
13192
|
-
expand: "items.*.product"
|
|
13192
|
+
expand: "items.*.product,items.*.plan"
|
|
13193
|
+
});
|
|
13194
|
+
const products = (_a = fields.items) == null ? void 0 : _a.filter((item) => {
|
|
13195
|
+
var _a2;
|
|
13196
|
+
return (_a2 = item._embedded) == null ? void 0 : _a2.product;
|
|
13197
|
+
}).map((item) => {
|
|
13198
|
+
var _a2;
|
|
13199
|
+
return new ProductModel((_a2 = item._embedded) == null ? void 0 : _a2.product);
|
|
13193
13200
|
});
|
|
13194
|
-
const
|
|
13201
|
+
const plans = (_b = fields.items) == null ? void 0 : _b.filter((item) => {
|
|
13202
|
+
var _a2;
|
|
13203
|
+
return (_a2 = item._embedded) == null ? void 0 : _a2.plan;
|
|
13204
|
+
}).map((item) => {
|
|
13195
13205
|
var _a2;
|
|
13196
|
-
return new
|
|
13206
|
+
return new PlanModel((_a2 = item._embedded) == null ? void 0 : _a2.plan).toPayload();
|
|
13197
13207
|
});
|
|
13198
13208
|
return {
|
|
13199
13209
|
products,
|
|
13210
|
+
plans,
|
|
13200
13211
|
invoice: new InvoiceModel(fields)
|
|
13201
13212
|
};
|
|
13202
13213
|
});
|
|
@@ -13577,7 +13588,8 @@ async function fetchData({
|
|
|
13577
13588
|
fetchAccountAndWebsite: fetchAccountAndWebsite$1 = fetchAccountAndWebsite,
|
|
13578
13589
|
fetchInstruments = fetchPaymentInstrument,
|
|
13579
13590
|
fetchDepositRequest: fetchDepositRequest$1 = fetchDepositRequest,
|
|
13580
|
-
fetchPayoutRequest: fetchPayoutRequest$1 = fetchPayoutRequest
|
|
13591
|
+
fetchPayoutRequest: fetchPayoutRequest$1 = fetchPayoutRequest,
|
|
13592
|
+
fetchPlansFromAddonsBumpOffer: fetchPlansFromAddonsBumpOffer$1 = fetchPlansFromAddonsBumpOffer
|
|
13581
13593
|
} = {}) {
|
|
13582
13594
|
var _a, _b, _c, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t2, _u;
|
|
13583
13595
|
try {
|
|
@@ -13618,15 +13630,17 @@ async function fetchData({
|
|
|
13618
13630
|
});
|
|
13619
13631
|
}
|
|
13620
13632
|
let productsPromise;
|
|
13633
|
+
let invoicePlans;
|
|
13621
13634
|
const invoiceId = ((_e2 = state.options) == null ? void 0 : _e2.invoiceId) || ((_g = (_f = state.data) == null ? void 0 : _f.transaction) == null ? void 0 : _g.invoiceId);
|
|
13622
13635
|
if (invoiceId) {
|
|
13623
|
-
const { invoice, products: products2 } = await fetchInvoiceAndProducts$1({
|
|
13636
|
+
const { invoice, products: products2, plans: plans2 } = await fetchInvoiceAndProducts$1({
|
|
13624
13637
|
data: {
|
|
13625
13638
|
id: invoiceId
|
|
13626
13639
|
}
|
|
13627
13640
|
});
|
|
13628
13641
|
productsPromise = Promise.resolve(products2);
|
|
13629
13642
|
state.data.invoice = invoice;
|
|
13643
|
+
invoicePlans = plans2;
|
|
13630
13644
|
}
|
|
13631
13645
|
const isManageInstruments = [
|
|
13632
13646
|
(_i = (_h = state.options) == null ? void 0 : _h.paymentInstruments) == null ? void 0 : _i.allowDeactivate,
|
|
@@ -13670,7 +13684,7 @@ async function fetchData({
|
|
|
13670
13684
|
resolve([]);
|
|
13671
13685
|
});
|
|
13672
13686
|
if (((_s = state.options) == null ? void 0 : _s.addons) || ((_t2 = state.options) == null ? void 0 : _t2.bumpOffer)) {
|
|
13673
|
-
plansPromise = fetchPlansFromAddonsBumpOffer();
|
|
13687
|
+
plansPromise = fetchPlansFromAddonsBumpOffer$1();
|
|
13674
13688
|
}
|
|
13675
13689
|
let [
|
|
13676
13690
|
readyToPayout,
|
|
@@ -13701,7 +13715,10 @@ async function fetchData({
|
|
|
13701
13715
|
readyToPay,
|
|
13702
13716
|
previewPurchase,
|
|
13703
13717
|
products,
|
|
13704
|
-
plans
|
|
13718
|
+
plans: [
|
|
13719
|
+
...Array.isArray(invoicePlans) ? invoicePlans : [],
|
|
13720
|
+
...Array.isArray(plans) ? plans : []
|
|
13721
|
+
],
|
|
13705
13722
|
availableInstruments,
|
|
13706
13723
|
isManageInstruments
|
|
13707
13724
|
});
|