@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
package/dist/index.cjs
CHANGED
|
@@ -76,6 +76,7 @@ __export(index_exports, {
|
|
|
76
76
|
PANES_MAX: () => PANES_MAX,
|
|
77
77
|
PANE_CATEGORY_KEYS: () => PANE_CATEGORY_KEYS,
|
|
78
78
|
PANE_ICON_KEYS: () => PANE_ICON_KEYS,
|
|
79
|
+
PaypalDisputes: () => PaypalDisputes,
|
|
79
80
|
RTL_CHECKOUT_LOCALES: () => RTL_CHECKOUT_LOCALES,
|
|
80
81
|
Regions: () => Regions,
|
|
81
82
|
Risk: () => Risk,
|
|
@@ -1248,6 +1249,52 @@ var Disputes = class {
|
|
|
1248
1249
|
}
|
|
1249
1250
|
};
|
|
1250
1251
|
|
|
1252
|
+
// src/resources/paypalDisputes.ts
|
|
1253
|
+
var PaypalDisputes = class {
|
|
1254
|
+
constructor(request) {
|
|
1255
|
+
this.request = request;
|
|
1256
|
+
}
|
|
1257
|
+
actions(caseId, offset = 0) {
|
|
1258
|
+
return this.request("GET", `/disputes/paypal/cases/${encodeURIComponent(caseId)}/actions`, {
|
|
1259
|
+
query: { offset }
|
|
1260
|
+
});
|
|
1261
|
+
}
|
|
1262
|
+
download(caseId, documentUrl) {
|
|
1263
|
+
const body = { document_url: documentUrl };
|
|
1264
|
+
return this.request(
|
|
1265
|
+
"POST",
|
|
1266
|
+
`/disputes/paypal/cases/${encodeURIComponent(caseId)}/documents/download`,
|
|
1267
|
+
{ body }
|
|
1268
|
+
);
|
|
1269
|
+
}
|
|
1270
|
+
list(params) {
|
|
1271
|
+
return this.request("GET", "/disputes/paypal/cases", {
|
|
1272
|
+
query: params
|
|
1273
|
+
});
|
|
1274
|
+
}
|
|
1275
|
+
retrieve(caseId, forceSync = false) {
|
|
1276
|
+
return this.request("GET", `/disputes/paypal/cases/${encodeURIComponent(caseId)}`, {
|
|
1277
|
+
query: { force_sync: forceSync }
|
|
1278
|
+
});
|
|
1279
|
+
}
|
|
1280
|
+
history(caseId, offset = 0) {
|
|
1281
|
+
return this.request("GET", `/disputes/paypal/cases/${encodeURIComponent(caseId)}/history`, {
|
|
1282
|
+
query: { offset }
|
|
1283
|
+
});
|
|
1284
|
+
}
|
|
1285
|
+
import(params) {
|
|
1286
|
+
return this.request("POST", "/disputes/paypal/import", { body: params });
|
|
1287
|
+
}
|
|
1288
|
+
/** The backend checks current provider permissions and deduplicates request_id.
|
|
1289
|
+
* An unknown result requires reconciliation, not a new request ID.
|
|
1290
|
+
*/
|
|
1291
|
+
act(caseId, params) {
|
|
1292
|
+
return this.request("POST", `/disputes/paypal/cases/${encodeURIComponent(caseId)}/actions`, {
|
|
1293
|
+
body: params
|
|
1294
|
+
});
|
|
1295
|
+
}
|
|
1296
|
+
};
|
|
1297
|
+
|
|
1251
1298
|
// src/resources/ephemeralKeys.ts
|
|
1252
1299
|
var EphemeralKeys = class {
|
|
1253
1300
|
constructor(request) {
|
|
@@ -4577,6 +4624,31 @@ var Settlement = class {
|
|
|
4577
4624
|
constructor(request) {
|
|
4578
4625
|
this.request = request;
|
|
4579
4626
|
}
|
|
4627
|
+
/**
|
|
4628
|
+
* Read signed refund/dispute processor fees and report availability.
|
|
4629
|
+
* Merchant scope and connector grants apply. Empty movements confirm zero
|
|
4630
|
+
* only when the source is reported and complete.
|
|
4631
|
+
* Supply payment_id without year/month for all history. force_sync reads
|
|
4632
|
+
* provider reports for this page; it requires payment_id and limit <= 20,
|
|
4633
|
+
* and never issues a payment, refund or dispute action.
|
|
4634
|
+
* Omit test_mode for every reporting partition of one payment; period
|
|
4635
|
+
* queries default to live. Each source states its reporting partition.
|
|
4636
|
+
*/
|
|
4637
|
+
async listProcessorCostEvents(params, options) {
|
|
4638
|
+
return this.request("GET", "/settlement/processor-cost-events", {
|
|
4639
|
+
query: {
|
|
4640
|
+
profile_id: params.profile_id,
|
|
4641
|
+
payment_id: params.payment_id,
|
|
4642
|
+
year: params.year,
|
|
4643
|
+
month: params.month,
|
|
4644
|
+
test_mode: params.test_mode,
|
|
4645
|
+
limit: params.limit,
|
|
4646
|
+
offset: params.offset,
|
|
4647
|
+
force_sync: params.force_sync
|
|
4648
|
+
},
|
|
4649
|
+
...options
|
|
4650
|
+
});
|
|
4651
|
+
}
|
|
4580
4652
|
/**
|
|
4581
4653
|
* Per-shop settlement rollup for the host merchant: unpaid totals and the
|
|
4582
4654
|
* running current period, one row per shop.
|
|
@@ -4611,7 +4683,9 @@ var Settlement = class {
|
|
|
4611
4683
|
* **Host-only.** The response is the host's cost base, which a shop owner
|
|
4612
4684
|
* must never see, so a profile-scoped caller is refused with a 403 rather
|
|
4613
4685
|
* than given a redacted shell. Gate the surface on the caller's scope
|
|
4614
|
-
* instead of calling it and handling the failure.
|
|
4686
|
+
* instead of calling it and handling the failure. Connector-restricted
|
|
4687
|
+
* roles cannot read this merchant-wide aggregate; fee-event reads retain
|
|
4688
|
+
* their connector grants.
|
|
4615
4689
|
*
|
|
4616
4690
|
* Two things not to flatten when rendering the result:
|
|
4617
4691
|
* `margin_usd` is absent — not zero — whenever `margin_quality` is
|
|
@@ -5053,6 +5127,7 @@ var Delopay = class {
|
|
|
5053
5127
|
this.paymentLinks = new PaymentLinks(request);
|
|
5054
5128
|
this.mandates = new Mandates(request);
|
|
5055
5129
|
this.disputes = new Disputes(request);
|
|
5130
|
+
this.paypalDisputes = new PaypalDisputes(request);
|
|
5056
5131
|
this.payouts = new Payouts(request);
|
|
5057
5132
|
this.ephemeralKeys = new EphemeralKeys(request);
|
|
5058
5133
|
this.events = new Events(request);
|
|
@@ -7687,12 +7762,18 @@ var CheckoutSession = class {
|
|
|
7687
7762
|
* order that PayPal's buttons or Card Fields attach the buyer's choice to.
|
|
7688
7763
|
* The client secret is attached automatically.
|
|
7689
7764
|
*
|
|
7690
|
-
* For PayPal Card Fields
|
|
7765
|
+
* For PayPal Card Fields pass `payment_method: 'card'` and the
|
|
7691
7766
|
* `merchant_connector_id` the checkout was rendered with; the order id comes
|
|
7692
7767
|
* back in `next_action.next_action_data.order_id` and is what the SDK's
|
|
7693
7768
|
* `createOrder` returns. The confirm that captures it sends the same order
|
|
7694
7769
|
* and account as `payment_method_data.card_reference`.
|
|
7695
7770
|
*
|
|
7771
|
+
* Send a distinct `Idempotency-Key` through `options.headers` for each new
|
|
7772
|
+
* card submission; reuse it only to retry that same session request. The
|
|
7773
|
+
* returned order is bound to this attempt and account. Sessions cannot
|
|
7774
|
+
* replace an order while authentication or money processing is unresolved,
|
|
7775
|
+
* or after authorization/capture; stale or foreign references are refused.
|
|
7776
|
+
*
|
|
7696
7777
|
* `POST /payments/{paymentId}/post-session-tokens` (publishable key)
|
|
7697
7778
|
*/
|
|
7698
7779
|
async postSessionTokens(params, options) {
|
|
@@ -8203,6 +8284,7 @@ var encodeNativePanes = encodePanes;
|
|
|
8203
8284
|
PANES_MAX,
|
|
8204
8285
|
PANE_CATEGORY_KEYS,
|
|
8205
8286
|
PANE_ICON_KEYS,
|
|
8287
|
+
PaypalDisputes,
|
|
8206
8288
|
RTL_CHECKOUT_LOCALES,
|
|
8207
8289
|
Regions,
|
|
8208
8290
|
Risk,
|