@rebilly/instruments 8.41.1 → 8.42.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 +14 -0
- package/dist/index.js +58 -10
- package/dist/index.min.js +10 -10
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [8.42.1](https://github.com/Rebilly/rebilly/compare/instruments/core-v8.42.0...instruments/core-v8.42.1) (2024-02-06)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **instrument:** Prevent payment for completed transaction ([#3310](https://github.com/Rebilly/rebilly/issues/3310)) ([cd331c5](https://github.com/Rebilly/rebilly/commit/cd331c53199a06a4182ecbd31865e0d7ef8e4afe))
|
|
7
|
+
|
|
8
|
+
## [8.42.0](https://github.com/Rebilly/rebilly/compare/instruments/core-v8.41.1...instruments/core-v8.42.0) (2024-02-05)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **rebilly-js-sdk:** Add RichBillingPortals resource ([#3267](https://github.com/Rebilly/rebilly/issues/3267)) ([fa2b178](https://github.com/Rebilly/rebilly/commit/fa2b1789551f87f74c6a07d3bbc4e40e21f5081a))
|
|
14
|
+
|
|
1
15
|
## [8.41.1](https://github.com/Rebilly/rebilly/compare/instruments/core-v8.41.0...instruments/core-v8.41.1) (2024-02-05)
|
|
2
16
|
|
|
3
17
|
|
package/dist/index.js
CHANGED
|
@@ -1481,7 +1481,8 @@ const en = {
|
|
|
1481
1481
|
invoiceIsPaid: "The invoice has been fully paid.",
|
|
1482
1482
|
invoiceIsVoid: "The invoice has been voided.",
|
|
1483
1483
|
invoiceIsAbandoned: "The invoice has been abandoned.",
|
|
1484
|
-
invoiceIsRefunded: "The invoice has been refunded."
|
|
1484
|
+
invoiceIsRefunded: "The invoice has been refunded.",
|
|
1485
|
+
transactionIsCompleted: "This transaction cannot be updated."
|
|
1485
1486
|
},
|
|
1486
1487
|
loaderMessages: {
|
|
1487
1488
|
processingPayment: "Processing payment instrument."
|
|
@@ -1520,7 +1521,8 @@ const es = {
|
|
|
1520
1521
|
invoiceIsPaid: "La factura ha sido completamente pagada.",
|
|
1521
1522
|
invoiceIsVoid: "La factura ha sido anulada.",
|
|
1522
1523
|
invoiceIsAbandoned: "La factura ha sido abandonada.",
|
|
1523
|
-
invoiceIsRefunded: "La factura ha reembolsada."
|
|
1524
|
+
invoiceIsRefunded: "La factura ha reembolsada.",
|
|
1525
|
+
transactionIsCompleted: "La transacción no pudo ser actualizada."
|
|
1524
1526
|
},
|
|
1525
1527
|
loaderMessages: {
|
|
1526
1528
|
processingPayment: "Procesamiento de instrumento de pago."
|
|
@@ -5994,7 +5996,7 @@ function cloneArrayDeep(val, instanceClone) {
|
|
|
5994
5996
|
return res;
|
|
5995
5997
|
}
|
|
5996
5998
|
var cloneDeep_1 = cloneDeep;
|
|
5997
|
-
const version = "55.
|
|
5999
|
+
const version = "55.17.0";
|
|
5998
6000
|
let urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
5999
6001
|
let nanoid = (size2 = 21) => {
|
|
6000
6002
|
let id2 = "";
|
|
@@ -8015,6 +8017,29 @@ function ResourceResource({ apiHandler }) {
|
|
|
8015
8017
|
}
|
|
8016
8018
|
};
|
|
8017
8019
|
}
|
|
8020
|
+
function RichBillingPortalsResource$1({ apiHandler }) {
|
|
8021
|
+
return {
|
|
8022
|
+
getAll({
|
|
8023
|
+
filter: filter2 = null,
|
|
8024
|
+
sort = null,
|
|
8025
|
+
limit = null,
|
|
8026
|
+
offset = null,
|
|
8027
|
+
q = null
|
|
8028
|
+
} = {}) {
|
|
8029
|
+
const params = { filter: filter2, sort, limit, offset, q };
|
|
8030
|
+
return apiHandler.getAll(`rich-billing-portals`, params);
|
|
8031
|
+
},
|
|
8032
|
+
create({ id: id2 = "", data }) {
|
|
8033
|
+
return apiHandler.create(`rich-billing-portals/${id2}`, id2, data);
|
|
8034
|
+
},
|
|
8035
|
+
get({ id: id2 }) {
|
|
8036
|
+
return apiHandler.get(`rich-billing-portals/${id2}`);
|
|
8037
|
+
},
|
|
8038
|
+
update({ id: id2, data }) {
|
|
8039
|
+
return apiHandler.put(`rich-billing-portals/${id2}`, data);
|
|
8040
|
+
}
|
|
8041
|
+
};
|
|
8042
|
+
}
|
|
8018
8043
|
function RiskScoreRulesResource({ apiHandler }) {
|
|
8019
8044
|
return {
|
|
8020
8045
|
getAll() {
|
|
@@ -8666,6 +8691,7 @@ class ApiInstance {
|
|
|
8666
8691
|
this.purchase = PurchaseResource$1({ apiHandler });
|
|
8667
8692
|
this.quotes = QuotesResource$1({ apiHandler });
|
|
8668
8693
|
this.resource = ResourceResource({ apiHandler });
|
|
8694
|
+
this.richBillingPortals = RichBillingPortalsResource$1({ apiHandler });
|
|
8669
8695
|
this.riskScoreRules = RiskScoreRulesResource({ apiHandler });
|
|
8670
8696
|
this.roles = RolesResource({ apiHandler });
|
|
8671
8697
|
this.search = SearchResource({ apiHandler });
|
|
@@ -9303,6 +9329,9 @@ function OrdersResource({ apiHandler }) {
|
|
|
9303
9329
|
const params = { filter: filter2, sort, limit, offset, q };
|
|
9304
9330
|
return apiHandler.getAll(`orders`, params);
|
|
9305
9331
|
},
|
|
9332
|
+
create({ data }) {
|
|
9333
|
+
return apiHandler.post(`orders`, data);
|
|
9334
|
+
},
|
|
9306
9335
|
get({ id: id2 }) {
|
|
9307
9336
|
return apiHandler.get(`orders/${id2}`);
|
|
9308
9337
|
},
|
|
@@ -9450,6 +9479,13 @@ function ReadyToPayoutResource({ apiHandler }) {
|
|
|
9450
9479
|
}
|
|
9451
9480
|
};
|
|
9452
9481
|
}
|
|
9482
|
+
function RichBillingPortalsResource({ apiHandler }) {
|
|
9483
|
+
return {
|
|
9484
|
+
get({ id: id2 }) {
|
|
9485
|
+
return apiHandler.get(`rich-billing-portals/${id2}`);
|
|
9486
|
+
}
|
|
9487
|
+
};
|
|
9488
|
+
}
|
|
9453
9489
|
function TransactionsResource({ apiHandler }) {
|
|
9454
9490
|
return {
|
|
9455
9491
|
getAll({
|
|
@@ -9505,6 +9541,7 @@ class StorefrontApiInstance {
|
|
|
9505
9541
|
this.purchase = PurchaseResource({ apiHandler });
|
|
9506
9542
|
this.quotes = QuotesResource({ apiHandler });
|
|
9507
9543
|
this.readyToPayout = ReadyToPayoutResource({ apiHandler });
|
|
9544
|
+
this.richBillingPortals = RichBillingPortalsResource({ apiHandler });
|
|
9508
9545
|
this.transactions = TransactionsResource({ apiHandler });
|
|
9509
9546
|
this.websites = WebsitesResource({ apiHandler });
|
|
9510
9547
|
this.checkoutForm = this.checkoutForms;
|
|
@@ -14199,7 +14236,7 @@ async function fetchInvoiceAndProducts({
|
|
|
14199
14236
|
};
|
|
14200
14237
|
});
|
|
14201
14238
|
}
|
|
14202
|
-
class
|
|
14239
|
+
const _TransactionModel = class _TransactionModel2 extends BaseModel {
|
|
14203
14240
|
constructor({ invoiceIds = [], ...fields }) {
|
|
14204
14241
|
super(fields);
|
|
14205
14242
|
this.invoiceIds = invoiceIds || [];
|
|
@@ -14210,7 +14247,14 @@ class TransactionModel extends BaseModel {
|
|
|
14210
14247
|
get hasInvoice() {
|
|
14211
14248
|
return Boolean(this.invoiceId);
|
|
14212
14249
|
}
|
|
14213
|
-
|
|
14250
|
+
get transactionIsCompleted() {
|
|
14251
|
+
return this.status === _TransactionModel2.Status.completed;
|
|
14252
|
+
}
|
|
14253
|
+
};
|
|
14254
|
+
_TransactionModel.Status = {
|
|
14255
|
+
completed: "completed"
|
|
14256
|
+
};
|
|
14257
|
+
let TransactionModel = _TransactionModel;
|
|
14214
14258
|
async function fetchTransaction({
|
|
14215
14259
|
data = null
|
|
14216
14260
|
}) {
|
|
@@ -23400,7 +23444,7 @@ function handleComputedProperty(options) {
|
|
|
23400
23444
|
var _a;
|
|
23401
23445
|
return Object.assign({}, options, {
|
|
23402
23446
|
_computed: {
|
|
23403
|
-
version: "8.
|
|
23447
|
+
version: "8.42.0",
|
|
23404
23448
|
paymentMethodsUrl: ((_a = options._dev) == null ? void 0 : _a.paymentMethodsUrl) ?? "https://forms.secure-payments.app"
|
|
23405
23449
|
}
|
|
23406
23450
|
});
|
|
@@ -26600,7 +26644,7 @@ async function mount({
|
|
|
26600
26644
|
setupFramepay: setupFramepay$1 = setupFramepay,
|
|
26601
26645
|
...options
|
|
26602
26646
|
} = {}) {
|
|
26603
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
26647
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
26604
26648
|
try {
|
|
26605
26649
|
state.data = {};
|
|
26606
26650
|
state.options = {};
|
|
@@ -26661,11 +26705,15 @@ async function mount({
|
|
|
26661
26705
|
} else if (invoiceId && ((_j = state.data.invoice) == null ? void 0 : _j.isRefunded)) {
|
|
26662
26706
|
clearFormOnError("form.error.invoiceIsRefunded");
|
|
26663
26707
|
}
|
|
26708
|
+
const transactionId = ((_k = state.options) == null ? void 0 : _k.transactionId) || ((_m = (_l = state.data) == null ? void 0 : _l.transaction) == null ? void 0 : _m.id);
|
|
26709
|
+
if (transactionId && ((_o = (_n = state.data) == null ? void 0 : _n.transaction) == null ? void 0 : _o.transactionIsCompleted)) {
|
|
26710
|
+
clearFormOnError("form.error.transactionIsCompleted");
|
|
26711
|
+
}
|
|
26664
26712
|
let hasNoPaymentMethods = false;
|
|
26665
26713
|
if (data.payout) {
|
|
26666
|
-
hasNoPaymentMethods = !((
|
|
26714
|
+
hasNoPaymentMethods = !((_p = data.readyToPayout) == null ? void 0 : _p.length);
|
|
26667
26715
|
} else {
|
|
26668
|
-
hasNoPaymentMethods = !((
|
|
26716
|
+
hasNoPaymentMethods = !((_q = data.readyToPay) == null ? void 0 : _q.length);
|
|
26669
26717
|
}
|
|
26670
26718
|
if (hasNoPaymentMethods) {
|
|
26671
26719
|
state.loader.stopLoading({ id: "rebilly-instruments-form" });
|
|
@@ -26736,7 +26784,7 @@ class RebillyInstrumentsInstance {
|
|
|
26736
26784
|
await show({ componentName, payload });
|
|
26737
26785
|
}
|
|
26738
26786
|
get version() {
|
|
26739
|
-
return `RebillyInstruments Ver.${"8.
|
|
26787
|
+
return `RebillyInstruments Ver.${"8.42.0"}`;
|
|
26740
26788
|
}
|
|
26741
26789
|
on(eventName, callback) {
|
|
26742
26790
|
on({ eventName, callback });
|