@rebilly/instruments 9.89.1 → 9.89.3
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 +6 -1
- package/dist/index.js +47 -27
- package/dist/index.min.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1 +1,6 @@
|
|
|
1
|
-
## [9.89.
|
|
1
|
+
## [9.89.3](https://github.com/Rebilly/rebilly/compare/instruments/core-v9.89.2...instruments/core-v9.89.3) (2024-11-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **rebilly-js-sdk:** support esmodule node projects ([#8328](https://github.com/Rebilly/rebilly/issues/8328)) ([0b6b9bb](https://github.com/Rebilly/rebilly/commit/0b6b9bb5d4494803833358591067a9ae534cb689))
|
package/dist/index.js
CHANGED
|
@@ -5909,12 +5909,12 @@ let At$1 = class At extends p {
|
|
|
5909
5909
|
super({ error: t2, name: "RebillyMethodNotAllowedError" });
|
|
5910
5910
|
}
|
|
5911
5911
|
};
|
|
5912
|
-
let
|
|
5912
|
+
let bt$1 = class bt extends p {
|
|
5913
5913
|
constructor(t2) {
|
|
5914
5914
|
super({ error: t2, name: "RebillyTimeoutError" });
|
|
5915
5915
|
}
|
|
5916
5916
|
};
|
|
5917
|
-
let
|
|
5917
|
+
let Rt$1 = class Rt extends p {
|
|
5918
5918
|
constructor(t2) {
|
|
5919
5919
|
super({ error: t2, name: "RebillyCanceledError" });
|
|
5920
5920
|
}
|
|
@@ -5927,8 +5927,8 @@ const $$1 = {
|
|
|
5927
5927
|
RebillyConflictError: ht$1,
|
|
5928
5928
|
RebillyForbiddenError: yt$1,
|
|
5929
5929
|
RebillyMethodNotAllowedError: At$1,
|
|
5930
|
-
RebillyTimeoutError:
|
|
5931
|
-
RebillyCanceledError:
|
|
5930
|
+
RebillyTimeoutError: bt$1,
|
|
5931
|
+
RebillyCanceledError: Rt$1
|
|
5932
5932
|
};
|
|
5933
5933
|
function wt$1(e2) {
|
|
5934
5934
|
return e2 && e2.__esModule && Object.prototype.hasOwnProperty.call(e2, "default") ? e2.default : e2;
|
|
@@ -6233,11 +6233,11 @@ const lr = {
|
|
|
6233
6233
|
* @type Cancellation.cancelAll
|
|
6234
6234
|
*/
|
|
6235
6235
|
cancelAll: async (...e2) => await T.cancelAll(...e2)
|
|
6236
|
-
},
|
|
6236
|
+
}, R = {
|
|
6237
6237
|
request: "request",
|
|
6238
6238
|
response: "response"
|
|
6239
6239
|
}, W$1 = (e2) => {
|
|
6240
|
-
if (!Object.values(
|
|
6240
|
+
if (!Object.values(R).includes(e2))
|
|
6241
6241
|
throw new Error(`There is no such interceptor type as "${e2}"`);
|
|
6242
6242
|
return true;
|
|
6243
6243
|
};
|
|
@@ -6262,7 +6262,7 @@ function C$1({ options: e2 }) {
|
|
|
6262
6262
|
}
|
|
6263
6263
|
function o2() {
|
|
6264
6264
|
const i = {
|
|
6265
|
-
"REB-API-CONSUMER": `${["Rebilly", e2.appName, "js-sdk"].filter((g) => g).join("/")}@
|
|
6265
|
+
"REB-API-CONSUMER": `${["Rebilly", e2.appName, "js-sdk"].filter((g) => g).join("/")}@0b6b9bb`
|
|
6266
6266
|
};
|
|
6267
6267
|
return e2.apiKey && (i["REB-APIKEY"] = e2.apiKey), i;
|
|
6268
6268
|
}
|
|
@@ -6292,36 +6292,36 @@ function C$1({ options: e2 }) {
|
|
|
6292
6292
|
}
|
|
6293
6293
|
function M2(c, { thenDelegate: i, catchDelegate: g = () => {
|
|
6294
6294
|
} }) {
|
|
6295
|
-
return W$1(c) && t2.interceptors[
|
|
6295
|
+
return W$1(c) && t2.interceptors[R[c]].use(
|
|
6296
6296
|
i,
|
|
6297
6297
|
g
|
|
6298
6298
|
);
|
|
6299
6299
|
}
|
|
6300
6300
|
function F2(c, i) {
|
|
6301
|
-
return W$1(c) && t2.interceptors[
|
|
6301
|
+
return W$1(c) && t2.interceptors[R[c]].eject(i);
|
|
6302
6302
|
}
|
|
6303
6303
|
function X2({ thenDelegate: c, catchDelegate: i = () => {
|
|
6304
6304
|
} }) {
|
|
6305
|
-
return M2(
|
|
6305
|
+
return M2(R.request, {
|
|
6306
6306
|
thenDelegate: c,
|
|
6307
6307
|
catchDelegate: i
|
|
6308
6308
|
});
|
|
6309
6309
|
}
|
|
6310
6310
|
function Z2(c) {
|
|
6311
|
-
F2(
|
|
6311
|
+
F2(R.request, c);
|
|
6312
6312
|
}
|
|
6313
6313
|
function _2({
|
|
6314
6314
|
thenDelegate: c,
|
|
6315
6315
|
catchDelegate: i = () => {
|
|
6316
6316
|
}
|
|
6317
6317
|
}) {
|
|
6318
|
-
return M2(
|
|
6318
|
+
return M2(R.response, {
|
|
6319
6319
|
thenDelegate: c,
|
|
6320
6320
|
catchDelegate: i
|
|
6321
6321
|
});
|
|
6322
6322
|
}
|
|
6323
6323
|
function H2(c) {
|
|
6324
|
-
F2(
|
|
6324
|
+
F2(R.response, c);
|
|
6325
6325
|
}
|
|
6326
6326
|
function A2({ request: c, isCollection: i, config: g }) {
|
|
6327
6327
|
const m2 = K2(g), { id: h, cancelToken: ct2 } = w.save();
|
|
@@ -7340,7 +7340,7 @@ function Ae$1({ apiHandler: e2 }) {
|
|
|
7340
7340
|
}
|
|
7341
7341
|
};
|
|
7342
7342
|
}
|
|
7343
|
-
function
|
|
7343
|
+
function be({ apiHandler: e2 }) {
|
|
7344
7344
|
return {
|
|
7345
7345
|
validate({ data: t2 }) {
|
|
7346
7346
|
return e2.post("digital-wallets/validation", t2);
|
|
@@ -7350,7 +7350,7 @@ function Re$1({ apiHandler: e2 }) {
|
|
|
7350
7350
|
}
|
|
7351
7351
|
};
|
|
7352
7352
|
}
|
|
7353
|
-
function
|
|
7353
|
+
function Re$1({ apiHandler: e2 }) {
|
|
7354
7354
|
return {
|
|
7355
7355
|
/**
|
|
7356
7356
|
* @param { rebilly.GetDisputeCollectionRequest } request
|
|
@@ -9661,7 +9661,7 @@ function As({ apiHandler: e2 }) {
|
|
|
9661
9661
|
}
|
|
9662
9662
|
};
|
|
9663
9663
|
}
|
|
9664
|
-
function
|
|
9664
|
+
function bs({ apiHandler: e2 }) {
|
|
9665
9665
|
return {
|
|
9666
9666
|
/**
|
|
9667
9667
|
* @param { rebilly.GetWebhookCollectionRequest } request
|
|
@@ -9692,7 +9692,7 @@ function Rs({ apiHandler: e2 }) {
|
|
|
9692
9692
|
}
|
|
9693
9693
|
};
|
|
9694
9694
|
}
|
|
9695
|
-
function
|
|
9695
|
+
function Rs({ apiHandler: e2 }) {
|
|
9696
9696
|
return {
|
|
9697
9697
|
/**
|
|
9698
9698
|
* @param { rebilly.GetWebsiteCollectionRequest } request
|
|
@@ -9736,7 +9736,7 @@ class ws {
|
|
|
9736
9736
|
constructor({ apiHandler: t2 }) {
|
|
9737
9737
|
this.account = _t$1({ apiHandler: t2 }), this.allowlists = Ht$1({ apiHandler: t2 }), this.amlChecks = te$1({ apiHandler: t2 }), this.amlSettings = ee$1({ apiHandler: t2 }), this.apiKeys = se$1({ apiHandler: t2 }), this.applicationInstances = re$1({ apiHandler: t2 }), this.applications = ne$1({ apiHandler: t2 }), this.balanceTransactions = ue$1({ apiHandler: t2 }), this.billingPortals = oe$1({ apiHandler: t2 }), this.blocklists = le$1({ apiHandler: t2 }), this.broadcastMessages = ce$1({ apiHandler: t2 }), this.checkoutForms = ie$1({ apiHandler: t2 }), this.coupons = ge({ apiHandler: t2 }), this.creditMemos = ae$1({ apiHandler: t2 }), this.customDomains = me$1({ apiHandler: t2 }), this.customFields = fe$1({ apiHandler: t2 }), this.customerAuthentication = $e$1({ apiHandler: t2 }), this.customers = pe$1({ apiHandler: t2 }), this.depositCustomPropertySets = he$1({
|
|
9738
9738
|
apiHandler: t2
|
|
9739
|
-
}), this.depositRequests = ye$1({ apiHandler: t2 }), this.depositStrategies = Ae$1({ apiHandler: t2 }), this.digitalWallets =
|
|
9739
|
+
}), this.depositRequests = ye$1({ apiHandler: t2 }), this.depositStrategies = Ae$1({ apiHandler: t2 }), this.digitalWallets = be({ apiHandler: t2 }), this.disputes = Re$1({ apiHandler: t2 }), this.emailDeliverySettings = we$1({ apiHandler: t2 }), this.emailMessages = ke$1({ apiHandler: t2 }), this.emailNotifications = ve$1({ apiHandler: t2 }), this.events = Te$1({ apiHandler: t2 }), this.externalIdentifiers = de$1({ apiHandler: t2 }), this.externalServicesSettings = Se$1({
|
|
9740
9740
|
apiHandler: t2
|
|
9741
9741
|
}), this.fees = Ie$1({ apiHandler: t2 }), this.files = Ee$1({ apiHandler: t2 }), this.gatewayAccounts = qe$1({ apiHandler: t2 }), this.integrations = xe$1({ apiHandler: t2 }), this.invoices = Pe$1({ apiHandler: t2 }), this.journalAccounts = Ce$1({ apiHandler: t2 }), this.journalEntries = je$1({ apiHandler: t2 }), this.kycDocuments = De$1({ apiHandler: t2 }), this.kycRequests = Me$1({ apiHandler: t2 }), this.kycSettings = Fe$1({ apiHandler: t2 }), this.lists = Oe$1({ apiHandler: t2 }), this.memberships = Ke$1({ apiHandler: t2 }), this.organizationExports = Ne$1({ apiHandler: t2 }), this.organizations = Be$1({ apiHandler: t2 }), this.paymentCardsBankNames = Le$1({ apiHandler: t2 }), this.paymentInstruments = ze$1({ apiHandler: t2 }), this.paymentMethods = Ue$1({ apiHandler: t2 }), this.paymentTokens = Ve$1({ apiHandler: t2 }), this.payoutRequests = Je$1({ apiHandler: t2 }), this.payouts = We$1({ apiHandler: t2 }), this.plans = Ge$1({ apiHandler: t2 }), this.previews = Ye$1({ apiHandler: t2 }), this.products = Qe$1({ apiHandler: t2 }), this.profile = Xe$1({ apiHandler: t2 }), this.purchase = Ze$1({ apiHandler: t2 }), this.quotes = _e$1({ apiHandler: t2 }), this.resource = He$1({ apiHandler: t2 }), this.riskScoreRules = ts({ apiHandler: t2 }), this.riskScoreSimulationJobs = es({
|
|
9742
9742
|
apiHandler: t2
|
|
@@ -9744,7 +9744,7 @@ class ws {
|
|
|
9744
9744
|
apiHandler: t2
|
|
9745
9745
|
}), this.subscriptionPauses = gs({ apiHandler: t2 }), this.subscriptionReactivations = as({
|
|
9746
9746
|
apiHandler: t2
|
|
9747
|
-
}), this.subscriptions = ms({ apiHandler: t2 }), this.tags = fs({ apiHandler: t2 }), this.tagsRules = $s({ apiHandler: t2 }), this.tracking = ps({ apiHandler: t2 }), this.transactions = hs({ apiHandler: t2 }), this.usages = ys({ apiHandler: t2 }), this.users = As({ apiHandler: t2 }), this.webhooks =
|
|
9747
|
+
}), this.subscriptions = ms({ apiHandler: t2 }), this.tags = fs({ apiHandler: t2 }), this.tagsRules = $s({ apiHandler: t2 }), this.tracking = ps({ apiHandler: t2 }), this.transactions = hs({ apiHandler: t2 }), this.usages = ys({ apiHandler: t2 }), this.users = As({ apiHandler: t2 }), this.webhooks = bs({ apiHandler: t2 }), this.websites = Rs({ apiHandler: t2 }), this.addRequestInterceptor = t2.addRequestInterceptor, this.removeRequestInterceptor = t2.removeRequestInterceptor, this.addResponseInterceptor = t2.addResponseInterceptor, this.removeResponseInterceptor = t2.removeResponseInterceptor, this.setTimeout = t2.setTimeout, this.setProxyAgent = t2.setProxyAgent, this.setSessionToken = t2.setSessionToken, this.setPublishableKey = t2.setPublishableKey, this.setEndpoints = t2.setEndpoints, this.getCancellationToken = t2.getCancellationToken, this.generateSignature = t2.generateSignature;
|
|
9748
9748
|
}
|
|
9749
9749
|
}
|
|
9750
9750
|
function ks({ apiHandler: e2 }) {
|
|
@@ -10251,7 +10251,7 @@ function Es({ apiHandler: e2 }) {
|
|
|
10251
10251
|
}
|
|
10252
10252
|
};
|
|
10253
10253
|
}
|
|
10254
|
-
const
|
|
10254
|
+
const b$1 = {
|
|
10255
10255
|
CustomersResource: ks,
|
|
10256
10256
|
DataExportsResource: vs,
|
|
10257
10257
|
HistogramsResource: Ts,
|
|
@@ -10262,11 +10262,11 @@ const R = {
|
|
|
10262
10262
|
};
|
|
10263
10263
|
class qs {
|
|
10264
10264
|
constructor({ apiHandler: t2 }) {
|
|
10265
|
-
this.customers =
|
|
10265
|
+
this.customers = b$1.CustomersResource({ apiHandler: t2 }), this.dataExports = b$1.DataExportsResource({
|
|
10266
10266
|
apiHandler: t2
|
|
10267
|
-
}), this.histograms =
|
|
10267
|
+
}), this.histograms = b$1.HistogramsResource({ apiHandler: t2 }), this.reports = b$1.ReportsResource({ apiHandler: t2 }), this.subscriptions = b$1.SubscriptionsResource({
|
|
10268
10268
|
apiHandler: t2
|
|
10269
|
-
}), this.timelines =
|
|
10269
|
+
}), this.timelines = b$1.TimelinesResource({ apiHandler: t2 }), this.location = b$1.LocationResource({ apiHandler: t2 }), this.addRequestInterceptor = t2.addRequestInterceptor, this.removeRequestInterceptor = t2.removeRequestInterceptor, this.addResponseInterceptor = t2.addResponseInterceptor, this.removeResponseInterceptor = t2.removeResponseInterceptor, this.setTimeout = t2.setTimeout, this.setProxyAgent = t2.setProxyAgent, this.setSessionToken = t2.setSessionToken, this.setEndpoints = t2.setEndpoints, this.getCancellationToken = t2.getCancellationToken;
|
|
10270
10270
|
}
|
|
10271
10271
|
}
|
|
10272
10272
|
function xs({ apiHandler: e2 }) {
|
|
@@ -16322,7 +16322,13 @@ class ReadyToPayModel {
|
|
|
16322
16322
|
}
|
|
16323
16323
|
function filterReadyToPay(readyToPay) {
|
|
16324
16324
|
const paymentMethodsMetadata = [...paymentMethods];
|
|
16325
|
-
const EXPRESS_METHODS = [
|
|
16325
|
+
const EXPRESS_METHODS = [
|
|
16326
|
+
"Google Pay",
|
|
16327
|
+
"Apple Pay",
|
|
16328
|
+
"paypal",
|
|
16329
|
+
"Samsung Pay"
|
|
16330
|
+
];
|
|
16331
|
+
const BLOCKED_EXPRESS_METHODS = ["Samsung Pay"];
|
|
16326
16332
|
const BLOCKED_METHODS = [
|
|
16327
16333
|
// Requires implementation.
|
|
16328
16334
|
"echeck",
|
|
@@ -16353,10 +16359,14 @@ function filterReadyToPay(readyToPay) {
|
|
|
16353
16359
|
];
|
|
16354
16360
|
const isExpressMethod = ({ method, feature }) => EXPRESS_METHODS.includes(method) || EXPRESS_METHODS.includes(feature == null ? void 0 : feature.name);
|
|
16355
16361
|
return readyToPay.filter((readyData) => {
|
|
16362
|
+
var _a;
|
|
16356
16363
|
const isOldPayPal = readyData.method === "paypal" && !readyData.feature;
|
|
16357
16364
|
const isPlaid = readyData.method === "ach" && readyData.feature;
|
|
16358
16365
|
const isBlocked = BLOCKED_METHODS.includes(readyData.method);
|
|
16359
|
-
|
|
16366
|
+
const isExpressBlocked = BLOCKED_EXPRESS_METHODS.includes(
|
|
16367
|
+
(_a = readyData.feature) == null ? void 0 : _a.name
|
|
16368
|
+
);
|
|
16369
|
+
return !isOldPayPal && !isPlaid && !isBlocked && !isExpressBlocked;
|
|
16360
16370
|
}).map((fields, index2) => {
|
|
16361
16371
|
const metadata = paymentMethodsMetadata.find(
|
|
16362
16372
|
(methodMetadata) => methodMetadata.apiName === fields.method
|
|
@@ -16402,7 +16412,13 @@ async function fetchReadyToPay() {
|
|
|
16402
16412
|
}
|
|
16403
16413
|
function filterReadyToPayout(readyToPayout) {
|
|
16404
16414
|
const paymentMethodsMetadata = [...paymentMethods];
|
|
16405
|
-
const EXPRESS_METHODS = [
|
|
16415
|
+
const EXPRESS_METHODS = [
|
|
16416
|
+
"Google Pay",
|
|
16417
|
+
"Apple Pay",
|
|
16418
|
+
"paypal",
|
|
16419
|
+
"Samsung Pay"
|
|
16420
|
+
];
|
|
16421
|
+
const BLOCKED_EXPRESS_METHODS = ["Samsung Pay"];
|
|
16406
16422
|
const BLOCKED_METHODS = [
|
|
16407
16423
|
// account number, routing number, and account type required
|
|
16408
16424
|
"echeck",
|
|
@@ -16418,10 +16434,14 @@ function filterReadyToPayout(readyToPayout) {
|
|
|
16418
16434
|
];
|
|
16419
16435
|
const isExpressMethod = ({ method, feature }) => EXPRESS_METHODS.includes(method) || EXPRESS_METHODS.includes(feature == null ? void 0 : feature.name);
|
|
16420
16436
|
return readyToPayout.filter((readyData) => {
|
|
16437
|
+
var _a;
|
|
16421
16438
|
const isOldPayPal = readyData.method === "paypal" && !readyData.feature;
|
|
16422
16439
|
const isPlaid = readyData.method === "ach" && readyData.feature;
|
|
16423
16440
|
const isBlocked = BLOCKED_METHODS.includes(readyData.method);
|
|
16424
|
-
|
|
16441
|
+
const isExpressBlocked = BLOCKED_EXPRESS_METHODS.includes(
|
|
16442
|
+
(_a = readyData.feature) == null ? void 0 : _a.name
|
|
16443
|
+
);
|
|
16444
|
+
return !isOldPayPal && !isPlaid && !isBlocked && !isExpressBlocked;
|
|
16425
16445
|
}).map((fields, index2) => {
|
|
16426
16446
|
const metadata = paymentMethodsMetadata.find(
|
|
16427
16447
|
(methodMetadata) => methodMetadata.apiName === fields.method
|