@delopay/sdk 0.143.0 → 0.145.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-SV2BCXV6.js → chunk-NRLTXUV7.js} +84 -3
- package/dist/chunk-NRLTXUV7.js.map +1 -0
- package/dist/index.cjs +84 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +289 -24
- package/dist/index.d.ts +289 -24
- package/dist/index.js +3 -1
- package/dist/internal.cjs +101 -2
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +13 -3
- package/dist/internal.d.ts +13 -3
- package/dist/internal.js +20 -1
- package/dist/internal.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-SV2BCXV6.js.map +0 -1
|
@@ -1054,6 +1054,52 @@ var Disputes = class {
|
|
|
1054
1054
|
}
|
|
1055
1055
|
};
|
|
1056
1056
|
|
|
1057
|
+
// src/resources/paypalDisputes.ts
|
|
1058
|
+
var PaypalDisputes = class {
|
|
1059
|
+
constructor(request) {
|
|
1060
|
+
this.request = request;
|
|
1061
|
+
}
|
|
1062
|
+
actions(caseId, offset = 0) {
|
|
1063
|
+
return this.request("GET", `/disputes/paypal/cases/${encodeURIComponent(caseId)}/actions`, {
|
|
1064
|
+
query: { offset }
|
|
1065
|
+
});
|
|
1066
|
+
}
|
|
1067
|
+
download(caseId, documentUrl) {
|
|
1068
|
+
const body = { document_url: documentUrl };
|
|
1069
|
+
return this.request(
|
|
1070
|
+
"POST",
|
|
1071
|
+
`/disputes/paypal/cases/${encodeURIComponent(caseId)}/documents/download`,
|
|
1072
|
+
{ body }
|
|
1073
|
+
);
|
|
1074
|
+
}
|
|
1075
|
+
list(params) {
|
|
1076
|
+
return this.request("GET", "/disputes/paypal/cases", {
|
|
1077
|
+
query: params
|
|
1078
|
+
});
|
|
1079
|
+
}
|
|
1080
|
+
retrieve(caseId, forceSync = false) {
|
|
1081
|
+
return this.request("GET", `/disputes/paypal/cases/${encodeURIComponent(caseId)}`, {
|
|
1082
|
+
query: { force_sync: forceSync }
|
|
1083
|
+
});
|
|
1084
|
+
}
|
|
1085
|
+
history(caseId, offset = 0) {
|
|
1086
|
+
return this.request("GET", `/disputes/paypal/cases/${encodeURIComponent(caseId)}/history`, {
|
|
1087
|
+
query: { offset }
|
|
1088
|
+
});
|
|
1089
|
+
}
|
|
1090
|
+
import(params) {
|
|
1091
|
+
return this.request("POST", "/disputes/paypal/import", { body: params });
|
|
1092
|
+
}
|
|
1093
|
+
/** The backend checks current provider permissions and deduplicates request_id.
|
|
1094
|
+
* An unknown result requires reconciliation, not a new request ID.
|
|
1095
|
+
*/
|
|
1096
|
+
act(caseId, params) {
|
|
1097
|
+
return this.request("POST", `/disputes/paypal/cases/${encodeURIComponent(caseId)}/actions`, {
|
|
1098
|
+
body: params
|
|
1099
|
+
});
|
|
1100
|
+
}
|
|
1101
|
+
};
|
|
1102
|
+
|
|
1057
1103
|
// src/resources/ephemeralKeys.ts
|
|
1058
1104
|
var EphemeralKeys = class {
|
|
1059
1105
|
constructor(request) {
|
|
@@ -4383,6 +4429,31 @@ var Settlement = class {
|
|
|
4383
4429
|
constructor(request) {
|
|
4384
4430
|
this.request = request;
|
|
4385
4431
|
}
|
|
4432
|
+
/**
|
|
4433
|
+
* Read signed refund/dispute processor fees and report availability.
|
|
4434
|
+
* Merchant scope and connector grants apply. Empty movements confirm zero
|
|
4435
|
+
* only when the source is reported and complete.
|
|
4436
|
+
* Supply payment_id without year/month for all history. force_sync reads
|
|
4437
|
+
* provider reports for this page; it requires payment_id and limit <= 20,
|
|
4438
|
+
* and never issues a payment, refund or dispute action.
|
|
4439
|
+
* Omit test_mode for every reporting partition of one payment; period
|
|
4440
|
+
* queries default to live. Each source states its reporting partition.
|
|
4441
|
+
*/
|
|
4442
|
+
async listProcessorCostEvents(params, options) {
|
|
4443
|
+
return this.request("GET", "/settlement/processor-cost-events", {
|
|
4444
|
+
query: {
|
|
4445
|
+
profile_id: params.profile_id,
|
|
4446
|
+
payment_id: params.payment_id,
|
|
4447
|
+
year: params.year,
|
|
4448
|
+
month: params.month,
|
|
4449
|
+
test_mode: params.test_mode,
|
|
4450
|
+
limit: params.limit,
|
|
4451
|
+
offset: params.offset,
|
|
4452
|
+
force_sync: params.force_sync
|
|
4453
|
+
},
|
|
4454
|
+
...options
|
|
4455
|
+
});
|
|
4456
|
+
}
|
|
4386
4457
|
/**
|
|
4387
4458
|
* Per-shop settlement rollup for the host merchant: unpaid totals and the
|
|
4388
4459
|
* running current period, one row per shop.
|
|
@@ -4417,7 +4488,9 @@ var Settlement = class {
|
|
|
4417
4488
|
* **Host-only.** The response is the host's cost base, which a shop owner
|
|
4418
4489
|
* must never see, so a profile-scoped caller is refused with a 403 rather
|
|
4419
4490
|
* than given a redacted shell. Gate the surface on the caller's scope
|
|
4420
|
-
* instead of calling it and handling the failure.
|
|
4491
|
+
* instead of calling it and handling the failure. Connector-restricted
|
|
4492
|
+
* roles cannot read this merchant-wide aggregate; fee-event reads retain
|
|
4493
|
+
* their connector grants.
|
|
4421
4494
|
*
|
|
4422
4495
|
* Two things not to flatten when rendering the result:
|
|
4423
4496
|
* `margin_usd` is absent — not zero — whenever `margin_quality` is
|
|
@@ -4859,6 +4932,7 @@ var Delopay = class {
|
|
|
4859
4932
|
this.paymentLinks = new PaymentLinks(request);
|
|
4860
4933
|
this.mandates = new Mandates(request);
|
|
4861
4934
|
this.disputes = new Disputes(request);
|
|
4935
|
+
this.paypalDisputes = new PaypalDisputes(request);
|
|
4862
4936
|
this.payouts = new Payouts(request);
|
|
4863
4937
|
this.ephemeralKeys = new EphemeralKeys(request);
|
|
4864
4938
|
this.events = new Events(request);
|
|
@@ -7493,12 +7567,18 @@ var CheckoutSession = class {
|
|
|
7493
7567
|
* order that PayPal's buttons or Card Fields attach the buyer's choice to.
|
|
7494
7568
|
* The client secret is attached automatically.
|
|
7495
7569
|
*
|
|
7496
|
-
* For PayPal Card Fields
|
|
7570
|
+
* For PayPal Card Fields pass `payment_method: 'card'` and the
|
|
7497
7571
|
* `merchant_connector_id` the checkout was rendered with; the order id comes
|
|
7498
7572
|
* back in `next_action.next_action_data.order_id` and is what the SDK's
|
|
7499
7573
|
* `createOrder` returns. The confirm that captures it sends the same order
|
|
7500
7574
|
* and account as `payment_method_data.card_reference`.
|
|
7501
7575
|
*
|
|
7576
|
+
* Send a distinct `Idempotency-Key` through `options.headers` for each new
|
|
7577
|
+
* card submission; reuse it only to retry that same session request. The
|
|
7578
|
+
* returned order is bound to this attempt and account. Sessions cannot
|
|
7579
|
+
* replace an order while authentication or money processing is unresolved,
|
|
7580
|
+
* or after authorization/capture; stale or foreign references are refused.
|
|
7581
|
+
*
|
|
7502
7582
|
* `POST /payments/{paymentId}/post-session-tokens` (publishable key)
|
|
7503
7583
|
*/
|
|
7504
7584
|
async postSessionTokens(params, options) {
|
|
@@ -7955,6 +8035,7 @@ var encodeNativePanes = encodePanes;
|
|
|
7955
8035
|
export {
|
|
7956
8036
|
DelopayError,
|
|
7957
8037
|
DelopayAuthenticationError,
|
|
8038
|
+
PaypalDisputes,
|
|
7958
8039
|
Search,
|
|
7959
8040
|
isSubscriptionLifecycleWebhook,
|
|
7960
8041
|
Webhooks,
|
|
@@ -8123,4 +8204,4 @@ export {
|
|
|
8123
8204
|
decodeNativePanes,
|
|
8124
8205
|
encodeNativePanes
|
|
8125
8206
|
};
|
|
8126
|
-
//# sourceMappingURL=chunk-
|
|
8207
|
+
//# sourceMappingURL=chunk-NRLTXUV7.js.map
|