rebilly-js-sdk 62.167.0 → 62.169.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/rebilly-js-sdk.d.cts +316 -200
- package/dist/rebilly-js-sdk.d.mts +316 -200
- package/dist/rebilly-js-sdk.d.ts +316 -200
- package/dist/rebilly-js-sdk.es.mjs +63 -48
- package/dist/rebilly-js-sdk.umd.js +2 -2
- package/package.json +1 -1
- package/src/resources/experimental/reports-resource.js +15 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var
|
|
2
|
-
var ht = (e, t, s) => t in e ?
|
|
1
|
+
var $t = Object.defineProperty;
|
|
2
|
+
var ht = (e, t, s) => t in e ? $t(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
3
3
|
var E = (e, t, s) => ht(e, typeof t != "symbol" ? t + "" : t, s);
|
|
4
4
|
import M from "axios";
|
|
5
5
|
function S(e, { exclude: t = [] } = {}) {
|
|
@@ -127,23 +127,23 @@ function st() {
|
|
|
127
127
|
if (Q) return x;
|
|
128
128
|
Q = 1;
|
|
129
129
|
var e = Object.prototype.toString;
|
|
130
|
-
x = function(
|
|
131
|
-
if (
|
|
132
|
-
if (
|
|
133
|
-
var h = typeof
|
|
130
|
+
x = function($) {
|
|
131
|
+
if ($ === void 0) return "undefined";
|
|
132
|
+
if ($ === null) return "null";
|
|
133
|
+
var h = typeof $;
|
|
134
134
|
if (h === "boolean") return "boolean";
|
|
135
135
|
if (h === "string") return "string";
|
|
136
136
|
if (h === "number") return "number";
|
|
137
137
|
if (h === "symbol") return "symbol";
|
|
138
138
|
if (h === "function")
|
|
139
|
-
return o(
|
|
140
|
-
if (s(
|
|
141
|
-
if (f(
|
|
142
|
-
if (i(
|
|
143
|
-
if (n(
|
|
144
|
-
if (r(
|
|
145
|
-
if (u(
|
|
146
|
-
switch (t(
|
|
139
|
+
return o($) ? "generatorfunction" : "function";
|
|
140
|
+
if (s($)) return "array";
|
|
141
|
+
if (f($)) return "buffer";
|
|
142
|
+
if (i($)) return "arguments";
|
|
143
|
+
if (n($)) return "date";
|
|
144
|
+
if (r($)) return "error";
|
|
145
|
+
if (u($)) return "regexp";
|
|
146
|
+
switch (t($)) {
|
|
147
147
|
case "Symbol":
|
|
148
148
|
return "symbol";
|
|
149
149
|
case "Promise":
|
|
@@ -179,9 +179,9 @@ function st() {
|
|
|
179
179
|
case "Float64Array":
|
|
180
180
|
return "float64array";
|
|
181
181
|
}
|
|
182
|
-
if (l(
|
|
182
|
+
if (l($))
|
|
183
183
|
return "generator";
|
|
184
|
-
switch (h = e.call(
|
|
184
|
+
switch (h = e.call($), h) {
|
|
185
185
|
case "[object Object]":
|
|
186
186
|
return "object";
|
|
187
187
|
// iterators
|
|
@@ -211,7 +211,7 @@ function st() {
|
|
|
211
211
|
function u(g) {
|
|
212
212
|
return g instanceof RegExp ? !0 : typeof g.flags == "string" && typeof g.ignoreCase == "boolean" && typeof g.multiline == "boolean" && typeof g.global == "boolean";
|
|
213
213
|
}
|
|
214
|
-
function o(g,
|
|
214
|
+
function o(g, $) {
|
|
215
215
|
return t(g) === "GeneratorFunction";
|
|
216
216
|
}
|
|
217
217
|
function l(g) {
|
|
@@ -221,8 +221,8 @@ function st() {
|
|
|
221
221
|
try {
|
|
222
222
|
if (typeof g.length == "number" && typeof g.callee == "function")
|
|
223
223
|
return !0;
|
|
224
|
-
} catch (
|
|
225
|
-
if (
|
|
224
|
+
} catch ($) {
|
|
225
|
+
if ($.message.indexOf("callee") !== -1)
|
|
226
226
|
return !0;
|
|
227
227
|
}
|
|
228
228
|
return !1;
|
|
@@ -489,7 +489,7 @@ function O({ options: e }) {
|
|
|
489
489
|
}
|
|
490
490
|
function o() {
|
|
491
491
|
const a = {
|
|
492
|
-
"REB-API-CONSUMER": `${["Rebilly", e.appName, "js-sdk"].filter((m) => m).join("/")}@
|
|
492
|
+
"REB-API-CONSUMER": `${["Rebilly", e.appName, "js-sdk"].filter((m) => m).join("/")}@9677e5c`
|
|
493
493
|
};
|
|
494
494
|
return e.apiKey && (a["REB-APIKEY"] = e.apiKey), a;
|
|
495
495
|
}
|
|
@@ -507,7 +507,7 @@ function O({ options: e }) {
|
|
|
507
507
|
const a = l();
|
|
508
508
|
e.publishableKey = c, a.common.Authorization = `${c}`, t.defaults.headers = a;
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function $({ host: c, port: a, auth: m }) {
|
|
511
511
|
t.defaults.proxy = {
|
|
512
512
|
host: c,
|
|
513
513
|
port: a,
|
|
@@ -551,15 +551,15 @@ function O({ options: e }) {
|
|
|
551
551
|
N(w.response, c);
|
|
552
552
|
}
|
|
553
553
|
function v({ request: c, isCollection: a, config: m }) {
|
|
554
|
-
const
|
|
555
|
-
|
|
554
|
+
const p = z(m), { id: R, cancelToken: pt } = q.save();
|
|
555
|
+
p.cancelToken = pt;
|
|
556
556
|
const G = async function() {
|
|
557
557
|
try {
|
|
558
|
-
const d = await c(
|
|
558
|
+
const d = await c(p);
|
|
559
559
|
return lt({
|
|
560
560
|
response: d,
|
|
561
561
|
isCollection: a,
|
|
562
|
-
config:
|
|
562
|
+
config: p
|
|
563
563
|
});
|
|
564
564
|
} catch (d) {
|
|
565
565
|
return L({ error: d });
|
|
@@ -599,8 +599,8 @@ function O({ options: e }) {
|
|
|
599
599
|
return c.params[a] !== null && c.params[a] !== "" && !(a === "sort" && ((m = c.params[a]) == null ? void 0 : m.length) === 0);
|
|
600
600
|
}
|
|
601
601
|
).reduce((a, m) => {
|
|
602
|
-
const
|
|
603
|
-
return a[m] = m === "sort" && Array.isArray(
|
|
602
|
+
const p = c.params[m];
|
|
603
|
+
return a[m] = m === "sort" && Array.isArray(p) ? p.join(",") : p, a;
|
|
604
604
|
}, {})), c;
|
|
605
605
|
}
|
|
606
606
|
function z(c = {}) {
|
|
@@ -620,15 +620,15 @@ function O({ options: e }) {
|
|
|
620
620
|
});
|
|
621
621
|
}
|
|
622
622
|
function V(c, a, m = {}) {
|
|
623
|
-
let
|
|
624
|
-
return m.authenticate === !1 && (
|
|
623
|
+
let p = {};
|
|
624
|
+
return m.authenticate === !1 && (p = { headers: l() }, delete p.headers.common["REB-APIKEY"], delete p.headers.common.Authorization), m.params && (p.params = { ...m.params }), v({
|
|
625
625
|
request: (R) => t.post(c, a, R),
|
|
626
|
-
config:
|
|
626
|
+
config: p
|
|
627
627
|
});
|
|
628
628
|
}
|
|
629
629
|
function J(c, a, m = {}) {
|
|
630
630
|
return v({
|
|
631
|
-
request: (
|
|
631
|
+
request: (p) => t.put(c, a, p),
|
|
632
632
|
config: { params: m }
|
|
633
633
|
});
|
|
634
634
|
}
|
|
@@ -647,9 +647,9 @@ function O({ options: e }) {
|
|
|
647
647
|
function gt(c, a) {
|
|
648
648
|
return W(c, a);
|
|
649
649
|
}
|
|
650
|
-
async function mt(c, a, m,
|
|
650
|
+
async function mt(c, a, m, p = {}) {
|
|
651
651
|
if (a === "")
|
|
652
|
-
return V(c, m, { params:
|
|
652
|
+
return V(c, m, { params: p });
|
|
653
653
|
try {
|
|
654
654
|
if ((await U(c)).response.status === 200)
|
|
655
655
|
throw new y.RebillyConflictError({
|
|
@@ -657,17 +657,17 @@ function O({ options: e }) {
|
|
|
657
657
|
});
|
|
658
658
|
} catch (R) {
|
|
659
659
|
if (R.name === "RebillyNotFoundError")
|
|
660
|
-
return J(c, m,
|
|
660
|
+
return J(c, m, p);
|
|
661
661
|
throw R;
|
|
662
662
|
}
|
|
663
663
|
}
|
|
664
664
|
async function ft(c, a) {
|
|
665
665
|
const m = z(a);
|
|
666
666
|
try {
|
|
667
|
-
const
|
|
668
|
-
return new At(
|
|
669
|
-
} catch (
|
|
670
|
-
return L({ error:
|
|
667
|
+
const p = await t.get(c, m);
|
|
668
|
+
return new At(p, m);
|
|
669
|
+
} catch (p) {
|
|
670
|
+
return L({ error: p });
|
|
671
671
|
}
|
|
672
672
|
}
|
|
673
673
|
return {
|
|
@@ -677,7 +677,7 @@ function O({ options: e }) {
|
|
|
677
677
|
addResponseInterceptor: ut,
|
|
678
678
|
removeResponseInterceptor: ot,
|
|
679
679
|
setTimeout: i,
|
|
680
|
-
setProxyAgent:
|
|
680
|
+
setProxyAgent: $,
|
|
681
681
|
setSessionToken: f,
|
|
682
682
|
setPublishableKey: g,
|
|
683
683
|
setEndpoints: h,
|
|
@@ -1910,7 +1910,7 @@ function fe({ apiHandler: e }) {
|
|
|
1910
1910
|
}
|
|
1911
1911
|
};
|
|
1912
1912
|
}
|
|
1913
|
-
function
|
|
1913
|
+
function pe({ apiHandler: e }) {
|
|
1914
1914
|
return {
|
|
1915
1915
|
/**
|
|
1916
1916
|
* @param { rebilly.GetFeeCollectionRequest } request
|
|
@@ -1947,7 +1947,7 @@ function $e({ apiHandler: e }) {
|
|
|
1947
1947
|
}
|
|
1948
1948
|
};
|
|
1949
1949
|
}
|
|
1950
|
-
function
|
|
1950
|
+
function $e({ apiHandler: e }) {
|
|
1951
1951
|
return {
|
|
1952
1952
|
/**
|
|
1953
1953
|
* @param { rebilly.GetAttachmentCollectionRequest } request
|
|
@@ -4214,7 +4214,7 @@ function fs({ apiHandler: e }) {
|
|
|
4214
4214
|
}
|
|
4215
4215
|
};
|
|
4216
4216
|
}
|
|
4217
|
-
function
|
|
4217
|
+
function ps({ apiHandler: e }) {
|
|
4218
4218
|
return {
|
|
4219
4219
|
/**
|
|
4220
4220
|
* @param { rebilly.GetWebsiteCollectionRequest } request
|
|
@@ -4254,7 +4254,7 @@ function $s({ apiHandler: e }) {
|
|
|
4254
4254
|
}
|
|
4255
4255
|
};
|
|
4256
4256
|
}
|
|
4257
|
-
class
|
|
4257
|
+
class $s {
|
|
4258
4258
|
constructor({ apiHandler: t }) {
|
|
4259
4259
|
this.accountRegistrationSettings = Ft({
|
|
4260
4260
|
apiHandler: t
|
|
@@ -4262,13 +4262,13 @@ class ps {
|
|
|
4262
4262
|
apiHandler: t
|
|
4263
4263
|
}), this.depositRequests = ne({ apiHandler: t }), this.depositStrategies = ue({ apiHandler: t }), this.digitalWallets = oe({ apiHandler: t }), this.disputes = le({ apiHandler: t }), this.emailDeliverySettings = ce({ apiHandler: t }), this.emailMessages = ie({ apiHandler: t }), this.emailNotifications = ae({ apiHandler: t }), this.events = ge({ apiHandler: t }), this.externalIdentifiers = me({ apiHandler: t }), this.externalServicesSettings = fe({
|
|
4264
4264
|
apiHandler: t
|
|
4265
|
-
}), this.fees =
|
|
4265
|
+
}), this.fees = pe({ apiHandler: t }), this.files = $e({ apiHandler: t }), this.gatewayAccounts = he({ apiHandler: t }), this.integrations = ye({ apiHandler: t }), this.invoices = Ae({ apiHandler: t }), this.journalAccounts = Re({ apiHandler: t }), this.journalEntries = be({ apiHandler: t }), this.journalRecords = we({ apiHandler: t }), this.kycDocuments = ke({ apiHandler: t }), this.kycRequests = ve({ apiHandler: t }), this.kycSettings = qe({ apiHandler: t }), this.lists = de({ apiHandler: t }), this.memberships = Te({ apiHandler: t }), this.orderCancellations = Ie({ apiHandler: t }), this.orderPauses = Se({ apiHandler: t }), this.orderReactivations = Ee({ apiHandler: t }), this.orders = xe({ apiHandler: t }), this.organizationExports = Pe({ apiHandler: t }), this.organizations = Ce({ apiHandler: t }), this.paymentCardsBankNames = De({ apiHandler: t }), this.paymentInstruments = je({ apiHandler: t }), this.paymentMethods = Me({ apiHandler: t }), this.paymentTokens = Oe({ apiHandler: t }), this.payoutRequestAllocations = Fe({
|
|
4266
4266
|
apiHandler: t
|
|
4267
4267
|
}), this.payoutRequestBatches = Be({ apiHandler: t }), this.payoutRequestSplits = Ke({ apiHandler: t }), this.payoutRequests = Ne({ apiHandler: t }), this.payouts = Le({ apiHandler: t }), this.plans = ze({ apiHandler: t }), this.previews = Ue({ apiHandler: t }), this.products = Ve({ apiHandler: t }), this.profile = Je({ apiHandler: t }), this.purchase = We({ apiHandler: t }), this.quotes = Ge({ apiHandler: t }), this.resource = Ye({ apiHandler: t }), this.riskScoreRules = Qe({ apiHandler: t }), this.roles = Xe({ apiHandler: t }), this.search = Ze({ apiHandler: t }), this.segments = _e({ apiHandler: t }), this.sendThroughAttribution = He({ apiHandler: t }), this.serviceCredentials = ts({ apiHandler: t }), this.shippingRates = es({ apiHandler: t }), this.status = ss({ apiHandler: t }), this.subscriptionCancellations = rs({
|
|
4268
4268
|
apiHandler: t
|
|
4269
4269
|
}), this.subscriptionPauses = ns({ apiHandler: t }), this.subscriptionReactivations = us({
|
|
4270
4270
|
apiHandler: t
|
|
4271
|
-
}), this.subscriptions = os({ apiHandler: t }), this.tags = ls({ apiHandler: t }), this.tagsRules = cs({ apiHandler: t }), this.tracking = is({ apiHandler: t }), this.transactions = as({ apiHandler: t }), this.usages = gs({ apiHandler: t }), this.users = ms({ apiHandler: t }), this.webhooks = fs({ apiHandler: t }), this.websites =
|
|
4271
|
+
}), this.subscriptions = os({ apiHandler: t }), this.tags = ls({ apiHandler: t }), this.tagsRules = cs({ apiHandler: t }), this.tracking = is({ apiHandler: t }), this.transactions = as({ apiHandler: t }), this.usages = gs({ apiHandler: t }), this.users = ms({ apiHandler: t }), this.webhooks = fs({ apiHandler: t }), this.websites = ps({ apiHandler: t }), this.addRequestInterceptor = t.addRequestInterceptor, this.removeRequestInterceptor = t.removeRequestInterceptor, this.addResponseInterceptor = t.addResponseInterceptor, this.removeResponseInterceptor = t.removeResponseInterceptor, this.setTimeout = t.setTimeout, this.setProxyAgent = t.setProxyAgent, this.setSessionToken = t.setSessionToken, this.setPublishableKey = t.setPublishableKey, this.setEndpoints = t.setEndpoints, this.getCancellationToken = t.getCancellationToken, this.generateSignature = t.generateSignature;
|
|
4272
4272
|
}
|
|
4273
4273
|
}
|
|
4274
4274
|
function hs({ apiHandler: e }) {
|
|
@@ -4714,7 +4714,7 @@ function Rs({ apiHandler: e }) {
|
|
|
4714
4714
|
offset: i = null,
|
|
4715
4715
|
filter: f = null,
|
|
4716
4716
|
sort: g = null,
|
|
4717
|
-
criteria:
|
|
4717
|
+
criteria: $ = null
|
|
4718
4718
|
}) {
|
|
4719
4719
|
const h = {
|
|
4720
4720
|
aggregationField: t,
|
|
@@ -4727,7 +4727,7 @@ function Rs({ apiHandler: e }) {
|
|
|
4727
4727
|
offset: i,
|
|
4728
4728
|
filter: f,
|
|
4729
4729
|
sort: g,
|
|
4730
|
-
criteria:
|
|
4730
|
+
criteria: $
|
|
4731
4731
|
};
|
|
4732
4732
|
return e.get("reports/retention-value", h);
|
|
4733
4733
|
},
|
|
@@ -4851,6 +4851,21 @@ function Rs({ apiHandler: e }) {
|
|
|
4851
4851
|
filter: o
|
|
4852
4852
|
};
|
|
4853
4853
|
return e.get("reports/transactions", l);
|
|
4854
|
+
},
|
|
4855
|
+
downloadAmlAuditReport({
|
|
4856
|
+
personId: t,
|
|
4857
|
+
periodStart: s = null,
|
|
4858
|
+
periodEnd: r = null,
|
|
4859
|
+
filter: n = null,
|
|
4860
|
+
// Selects the export format: 'application/pdf' (default), 'text/csv', or 'application/json'.
|
|
4861
|
+
accept: u = "application/pdf"
|
|
4862
|
+
}) {
|
|
4863
|
+
const o = {
|
|
4864
|
+
params: { personId: t, periodStart: s, periodEnd: r, filter: n },
|
|
4865
|
+
headers: { Accept: u },
|
|
4866
|
+
responseType: u === "application/pdf" ? "arraybuffer" : "text"
|
|
4867
|
+
};
|
|
4868
|
+
return e.download("reports/aml-audit-reports", o);
|
|
4854
4869
|
}
|
|
4855
4870
|
};
|
|
4856
4871
|
}
|
|
@@ -5407,7 +5422,7 @@ class Qs {
|
|
|
5407
5422
|
}
|
|
5408
5423
|
}
|
|
5409
5424
|
function Xs({ apiHandler: e }) {
|
|
5410
|
-
return new
|
|
5425
|
+
return new $s({ apiHandler: e });
|
|
5411
5426
|
}
|
|
5412
5427
|
function Zs({ apiHandler: e }) {
|
|
5413
5428
|
return new vs({ apiHandler: e });
|