@rebilly/instruments 9.28.0 → 9.28.1
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 +7 -0
- package/dist/index.js +31 -31
- package/dist/index.min.js +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [9.28.1](https://github.com/Rebilly/rebilly/compare/instruments/core-v9.28.0...instruments/core-v9.28.1) (2024-04-08)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **instruments:** Passing `invoiceId` and `transactionId` on the options object doesn't work ([#4514](https://github.com/Rebilly/rebilly/issues/4514)) ([2e99107](https://github.com/Rebilly/rebilly/commit/2e9910731426d7b6460978de035393c41d79c877))
|
|
7
|
+
|
|
1
8
|
## [9.28.0](https://github.com/Rebilly/rebilly/compare/instruments/core-v9.27.2...instruments/core-v9.28.0) (2024-04-08)
|
|
2
9
|
|
|
3
10
|
|
package/dist/index.js
CHANGED
|
@@ -5963,7 +5963,7 @@ function Jt(e2, t2) {
|
|
|
5963
5963
|
return s;
|
|
5964
5964
|
}
|
|
5965
5965
|
var Gt = P$1;
|
|
5966
|
-
const Yt = /* @__PURE__ */ wt(Gt), Qt = "56.
|
|
5966
|
+
const Yt = /* @__PURE__ */ wt(Gt), Qt = "56.12.0";
|
|
5967
5967
|
let Xt = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", Zt = (e2 = 21) => {
|
|
5968
5968
|
let t2 = "", s = e2;
|
|
5969
5969
|
for (; s--; )
|
|
@@ -15092,7 +15092,7 @@ function filterReadyToPay(readyToPay) {
|
|
|
15092
15092
|
}
|
|
15093
15093
|
async function fetchReadyToPay() {
|
|
15094
15094
|
return Endpoint(async () => {
|
|
15095
|
-
var _a, _b, _c, _d, _e2, _f, _g;
|
|
15095
|
+
var _a, _b, _c, _d, _e2, _f, _g, _h, _i;
|
|
15096
15096
|
if (!state.data.riskMetadata) {
|
|
15097
15097
|
const { riskMetadata: data2 } = await Me();
|
|
15098
15098
|
state.data.riskMetadata = data2;
|
|
@@ -15104,15 +15104,15 @@ async function fetchReadyToPay() {
|
|
|
15104
15104
|
if ((_b = state.options) == null ? void 0 : _b.items) {
|
|
15105
15105
|
data.items = mapItemsQuantities(state.options.items);
|
|
15106
15106
|
}
|
|
15107
|
-
if (((_c = state.options) == null ? void 0 : _c.money)
|
|
15108
|
-
const
|
|
15109
|
-
data.amount =
|
|
15110
|
-
data.currency =
|
|
15107
|
+
if ((((_c = state.options) == null ? void 0 : _c.money) || ((_d = state.data) == null ? void 0 : _d.invoice) || ((_e2 = state.data) == null ? void 0 : _e2.transaction)) && ((_f = state.data) == null ? void 0 : _f.amountAndCurrency)) {
|
|
15108
|
+
const { amount, currency } = state.data.amountAndCurrency;
|
|
15109
|
+
data.amount = amount;
|
|
15110
|
+
data.currency = currency;
|
|
15111
15111
|
}
|
|
15112
|
-
if ((
|
|
15112
|
+
if ((_h = (_g = state.data) == null ? void 0 : _g.account) == null ? void 0 : _h.address) {
|
|
15113
15113
|
data.billingAddress = state.data.account.address;
|
|
15114
15114
|
}
|
|
15115
|
-
if ((
|
|
15115
|
+
if ((_i = state.data) == null ? void 0 : _i.deposit) {
|
|
15116
15116
|
data.amount = state.data.deposit.amount;
|
|
15117
15117
|
data.currency = state.data.deposit.currency;
|
|
15118
15118
|
}
|
|
@@ -15662,11 +15662,29 @@ async function fetchData({
|
|
|
15662
15662
|
id: state.options.payout.payoutRequestId
|
|
15663
15663
|
});
|
|
15664
15664
|
}
|
|
15665
|
+
if ((_d = state.options) == null ? void 0 : _d.transactionId) {
|
|
15666
|
+
state.data.transaction = await fetchTransaction$1({
|
|
15667
|
+
data: {
|
|
15668
|
+
id: state.options.transactionId
|
|
15669
|
+
}
|
|
15670
|
+
});
|
|
15671
|
+
}
|
|
15672
|
+
let productsPromise;
|
|
15673
|
+
const invoiceId = ((_e2 = state.options) == null ? void 0 : _e2.invoiceId) || ((_g = (_f = state.data) == null ? void 0 : _f.transaction) == null ? void 0 : _g.invoiceId);
|
|
15674
|
+
if (invoiceId) {
|
|
15675
|
+
const { invoice, products: products2 } = await fetchInvoiceAndProducts$1({
|
|
15676
|
+
data: {
|
|
15677
|
+
id: invoiceId
|
|
15678
|
+
}
|
|
15679
|
+
});
|
|
15680
|
+
productsPromise = Promise.resolve(products2);
|
|
15681
|
+
state.data.invoice = invoice;
|
|
15682
|
+
}
|
|
15665
15683
|
let readyToPayPromise = Promise.resolve(null);
|
|
15666
15684
|
let readyToPayoutPromise = Promise.resolve(null);
|
|
15667
15685
|
let fetchAccountAndWebsitePromise = Promise.resolve();
|
|
15668
15686
|
let availableInstrumentsPromise = null;
|
|
15669
|
-
if ((
|
|
15687
|
+
if ((_h = state.options) == null ? void 0 : _h.jwt) {
|
|
15670
15688
|
fetchAccountAndWebsitePromise = fetchAccountAndWebsite$1().then(
|
|
15671
15689
|
({ account, website }) => {
|
|
15672
15690
|
if (state.data == null) {
|
|
@@ -15676,7 +15694,7 @@ async function fetchData({
|
|
|
15676
15694
|
state.data.website = website;
|
|
15677
15695
|
}
|
|
15678
15696
|
);
|
|
15679
|
-
if ((
|
|
15697
|
+
if ((_i = state.options) == null ? void 0 : _i.payout) {
|
|
15680
15698
|
readyToPayoutPromise = fetchAccountAndWebsitePromise.then(
|
|
15681
15699
|
() => fetchReadyToPayout()
|
|
15682
15700
|
);
|
|
@@ -15687,30 +15705,12 @@ async function fetchData({
|
|
|
15687
15705
|
}
|
|
15688
15706
|
availableInstrumentsPromise = fetchInstruments();
|
|
15689
15707
|
} else {
|
|
15690
|
-
if ((
|
|
15708
|
+
if ((_j = state.options) == null ? void 0 : _j.payout) {
|
|
15691
15709
|
readyToPayoutPromise = fetchReadyToPayout();
|
|
15692
15710
|
} else {
|
|
15693
15711
|
readyToPayPromise = fetchReadyToPay();
|
|
15694
15712
|
}
|
|
15695
15713
|
}
|
|
15696
|
-
if ((_g = state.options) == null ? void 0 : _g.transactionId) {
|
|
15697
|
-
state.data.transaction = await fetchTransaction$1({
|
|
15698
|
-
data: {
|
|
15699
|
-
id: state.options.transactionId
|
|
15700
|
-
}
|
|
15701
|
-
});
|
|
15702
|
-
}
|
|
15703
|
-
let productsPromise;
|
|
15704
|
-
const invoiceId = ((_h = state.options) == null ? void 0 : _h.invoiceId) || ((_j = (_i = state.data) == null ? void 0 : _i.transaction) == null ? void 0 : _j.invoiceId);
|
|
15705
|
-
if (invoiceId) {
|
|
15706
|
-
const { invoice, products: products2 } = await fetchInvoiceAndProducts$1({
|
|
15707
|
-
data: {
|
|
15708
|
-
id: invoiceId
|
|
15709
|
-
}
|
|
15710
|
-
});
|
|
15711
|
-
productsPromise = Promise.resolve(products2);
|
|
15712
|
-
state.data.invoice = invoice;
|
|
15713
|
-
}
|
|
15714
15714
|
const previewPurchasePromise = ((_k = state.options) == null ? void 0 : _k.items) ? fetchSummary() : null;
|
|
15715
15715
|
if (!((_l = state.options) == null ? void 0 : _l.jwt)) {
|
|
15716
15716
|
productsPromise = fetchProductsFromPlans();
|
|
@@ -24485,7 +24485,7 @@ function handleComputedProperty(options) {
|
|
|
24485
24485
|
var _a;
|
|
24486
24486
|
return Object.assign({}, options, {
|
|
24487
24487
|
_computed: {
|
|
24488
|
-
version: "9.
|
|
24488
|
+
version: "9.28.0",
|
|
24489
24489
|
paymentMethodsUrl: ((_a = options._dev) == null ? void 0 : _a.paymentMethodsUrl) ?? "https://forms.secure-payments.app"
|
|
24490
24490
|
}
|
|
24491
24491
|
});
|
|
@@ -27827,7 +27827,7 @@ class RebillyInstrumentsInstance {
|
|
|
27827
27827
|
await show({ componentName, payload });
|
|
27828
27828
|
}
|
|
27829
27829
|
get version() {
|
|
27830
|
-
return `RebillyInstruments Ver.${"9.
|
|
27830
|
+
return `RebillyInstruments Ver.${"9.28.0"}`;
|
|
27831
27831
|
}
|
|
27832
27832
|
on(eventName, callback) {
|
|
27833
27833
|
on({ eventName, callback });
|