@delopay/sdk 0.358.0 → 0.361.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/dist/{chunk-E7CYYHZ3.js → chunk-P2Q4GXEB.js} +81 -2
- package/dist/chunk-P2Q4GXEB.js.map +1 -0
- package/dist/{index-CTJ7wd4n.d.cts → index-BbyUEY-4.d.cts} +270 -4
- package/dist/{index-CTJ7wd4n.d.ts → index-BbyUEY-4.d.ts} +270 -4
- package/dist/index.cjs +80 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -1
- package/dist/internal.cjs +100 -1
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +18 -3
- package/dist/internal.d.ts +18 -3
- package/dist/internal.js +24 -1
- package/dist/internal.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-E7CYYHZ3.js.map +0 -1
|
@@ -1962,6 +1962,77 @@ var Disputes = class {
|
|
|
1962
1962
|
}
|
|
1963
1963
|
};
|
|
1964
1964
|
|
|
1965
|
+
// src/resources/chargebackPrevention.ts
|
|
1966
|
+
function preventionCaseQuery(params) {
|
|
1967
|
+
if (!params) return void 0;
|
|
1968
|
+
const { provider, source, status, outcome, match_status, ...query } = params;
|
|
1969
|
+
return {
|
|
1970
|
+
...query,
|
|
1971
|
+
...provider?.length ? { provider: provider.join(",") } : {},
|
|
1972
|
+
...source?.length ? { source: source.join(",") } : {},
|
|
1973
|
+
...status?.length ? { status: status.join(",") } : {},
|
|
1974
|
+
...outcome?.length ? { outcome: outcome.join(",") } : {},
|
|
1975
|
+
...match_status?.length ? { match_status: match_status.join(",") } : {}
|
|
1976
|
+
};
|
|
1977
|
+
}
|
|
1978
|
+
var ChargebackPrevention = class {
|
|
1979
|
+
constructor(request) {
|
|
1980
|
+
this.request = request;
|
|
1981
|
+
}
|
|
1982
|
+
/** The merchant's connections, with their business accounts and sync health. */
|
|
1983
|
+
async listConnections() {
|
|
1984
|
+
return this.request("GET", "/chargeback-prevention/connections");
|
|
1985
|
+
}
|
|
1986
|
+
/**
|
|
1987
|
+
* Connect a provider account. DeloPay checks the key with the provider,
|
|
1988
|
+
* registers its webhooks there and starts reading alerts. Dashboard session
|
|
1989
|
+
* only.
|
|
1990
|
+
*/
|
|
1991
|
+
async connect(params) {
|
|
1992
|
+
return this.request("POST", "/chargeback-prevention/connections", { body: params });
|
|
1993
|
+
}
|
|
1994
|
+
/** Replace a connection's key; reconnects one whose key was refused. */
|
|
1995
|
+
async replaceKey(connectionId, params) {
|
|
1996
|
+
return this.request(
|
|
1997
|
+
"PUT",
|
|
1998
|
+
`/chargeback-prevention/connections/${encodeURIComponent(connectionId)}/key`,
|
|
1999
|
+
{ body: params }
|
|
2000
|
+
);
|
|
2001
|
+
}
|
|
2002
|
+
/** Stop reading a connection. Its cases are kept. */
|
|
2003
|
+
async disconnect(connectionId) {
|
|
2004
|
+
return this.request(
|
|
2005
|
+
"DELETE",
|
|
2006
|
+
`/chargeback-prevention/connections/${encodeURIComponent(connectionId)}`
|
|
2007
|
+
);
|
|
2008
|
+
}
|
|
2009
|
+
/** Read the connection's alerts again as soon as the provider allows. */
|
|
2010
|
+
async syncNow(connectionId) {
|
|
2011
|
+
return this.request(
|
|
2012
|
+
"POST",
|
|
2013
|
+
`/chargeback-prevention/connections/${encodeURIComponent(connectionId)}/sync`
|
|
2014
|
+
);
|
|
2015
|
+
}
|
|
2016
|
+
/** Set the shops a provider business account sells through; its cases are matched again. */
|
|
2017
|
+
async mapAccount(connectionId, providerAccountId, params) {
|
|
2018
|
+
return this.request(
|
|
2019
|
+
"PUT",
|
|
2020
|
+
`/chargeback-prevention/connections/${encodeURIComponent(connectionId)}/accounts/${encodeURIComponent(providerAccountId)}`,
|
|
2021
|
+
{ body: params }
|
|
2022
|
+
);
|
|
2023
|
+
}
|
|
2024
|
+
/** Cases with what DeloPay's records say happened to each payment. */
|
|
2025
|
+
async listCases(params) {
|
|
2026
|
+
return this.request("GET", "/chargeback-prevention/cases", {
|
|
2027
|
+
query: preventionCaseQuery(params)
|
|
2028
|
+
});
|
|
2029
|
+
}
|
|
2030
|
+
/** One case with its references and observed history. */
|
|
2031
|
+
async retrieveCase(caseId) {
|
|
2032
|
+
return this.request("GET", `/chargeback-prevention/cases/${encodeURIComponent(caseId)}`);
|
|
2033
|
+
}
|
|
2034
|
+
};
|
|
2035
|
+
|
|
1965
2036
|
// src/resources/paypalDisputes.ts
|
|
1966
2037
|
var PaypalDisputes = class {
|
|
1967
2038
|
constructor(request) {
|
|
@@ -4201,7 +4272,12 @@ var Routing = class {
|
|
|
4201
4272
|
async getDefaultForProfile(profileId) {
|
|
4202
4273
|
return this.request("GET", `/routing/default/profile/${encodeURIComponent(profileId)}`);
|
|
4203
4274
|
}
|
|
4204
|
-
/**
|
|
4275
|
+
/**
|
|
4276
|
+
* Update default config for a profile. `POST /routing/default/profile/{profileId}`
|
|
4277
|
+
*
|
|
4278
|
+
* Send the list alone to keep the shop's fallback mode, or `{ connectors, mode, splits }` to set
|
|
4279
|
+
* it. A `volume_split` whose shares do not total 100 is refused.
|
|
4280
|
+
*/
|
|
4205
4281
|
async updateDefaultProfile(profileId, params, options) {
|
|
4206
4282
|
return this.request("POST", `/routing/default/profile/${encodeURIComponent(profileId)}`, {
|
|
4207
4283
|
body: params,
|
|
@@ -10815,6 +10891,7 @@ var Delopay = class {
|
|
|
10815
10891
|
this.paymentLinks = new PaymentLinks(request);
|
|
10816
10892
|
this.mandates = new Mandates(request);
|
|
10817
10893
|
this.disputes = new Disputes(request);
|
|
10894
|
+
this.chargebackPrevention = new ChargebackPrevention(request);
|
|
10818
10895
|
this.paypalDisputes = new PaypalDisputes(request);
|
|
10819
10896
|
this.whopResolutionCases = new WhopResolutionCases(request);
|
|
10820
10897
|
this.payouts = new Payouts(request);
|
|
@@ -16597,6 +16674,8 @@ export {
|
|
|
16597
16674
|
DelopayError,
|
|
16598
16675
|
DelopayAuthenticationError,
|
|
16599
16676
|
runExport,
|
|
16677
|
+
preventionCaseQuery,
|
|
16678
|
+
ChargebackPrevention,
|
|
16600
16679
|
PaypalDisputes,
|
|
16601
16680
|
WhopResolutionCases,
|
|
16602
16681
|
Search,
|
|
@@ -16892,4 +16971,4 @@ export {
|
|
|
16892
16971
|
decodeNativePanes,
|
|
16893
16972
|
encodeNativePanes
|
|
16894
16973
|
};
|
|
16895
|
-
//# sourceMappingURL=chunk-
|
|
16974
|
+
//# sourceMappingURL=chunk-P2Q4GXEB.js.map
|