@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/internal.cjs
CHANGED
|
@@ -87,6 +87,7 @@ __export(internal_exports, {
|
|
|
87
87
|
PANES_MAX: () => PANES_MAX,
|
|
88
88
|
PANE_CATEGORY_KEYS: () => PANE_CATEGORY_KEYS,
|
|
89
89
|
PANE_ICON_KEYS: () => PANE_ICON_KEYS,
|
|
90
|
+
PaypalDisputes: () => PaypalDisputes,
|
|
90
91
|
PlatformBilling: () => PlatformBilling,
|
|
91
92
|
PlatformFees: () => PlatformFees,
|
|
92
93
|
RTL_CHECKOUT_LOCALES: () => RTL_CHECKOUT_LOCALES,
|
|
@@ -1261,6 +1262,52 @@ var Disputes = class {
|
|
|
1261
1262
|
}
|
|
1262
1263
|
};
|
|
1263
1264
|
|
|
1265
|
+
// src/resources/paypalDisputes.ts
|
|
1266
|
+
var PaypalDisputes = class {
|
|
1267
|
+
constructor(request) {
|
|
1268
|
+
this.request = request;
|
|
1269
|
+
}
|
|
1270
|
+
actions(caseId, offset = 0) {
|
|
1271
|
+
return this.request("GET", `/disputes/paypal/cases/${encodeURIComponent(caseId)}/actions`, {
|
|
1272
|
+
query: { offset }
|
|
1273
|
+
});
|
|
1274
|
+
}
|
|
1275
|
+
download(caseId, documentUrl) {
|
|
1276
|
+
const body = { document_url: documentUrl };
|
|
1277
|
+
return this.request(
|
|
1278
|
+
"POST",
|
|
1279
|
+
`/disputes/paypal/cases/${encodeURIComponent(caseId)}/documents/download`,
|
|
1280
|
+
{ body }
|
|
1281
|
+
);
|
|
1282
|
+
}
|
|
1283
|
+
list(params) {
|
|
1284
|
+
return this.request("GET", "/disputes/paypal/cases", {
|
|
1285
|
+
query: params
|
|
1286
|
+
});
|
|
1287
|
+
}
|
|
1288
|
+
retrieve(caseId, forceSync = false) {
|
|
1289
|
+
return this.request("GET", `/disputes/paypal/cases/${encodeURIComponent(caseId)}`, {
|
|
1290
|
+
query: { force_sync: forceSync }
|
|
1291
|
+
});
|
|
1292
|
+
}
|
|
1293
|
+
history(caseId, offset = 0) {
|
|
1294
|
+
return this.request("GET", `/disputes/paypal/cases/${encodeURIComponent(caseId)}/history`, {
|
|
1295
|
+
query: { offset }
|
|
1296
|
+
});
|
|
1297
|
+
}
|
|
1298
|
+
import(params) {
|
|
1299
|
+
return this.request("POST", "/disputes/paypal/import", { body: params });
|
|
1300
|
+
}
|
|
1301
|
+
/** The backend checks current provider permissions and deduplicates request_id.
|
|
1302
|
+
* An unknown result requires reconciliation, not a new request ID.
|
|
1303
|
+
*/
|
|
1304
|
+
act(caseId, params) {
|
|
1305
|
+
return this.request("POST", `/disputes/paypal/cases/${encodeURIComponent(caseId)}/actions`, {
|
|
1306
|
+
body: params
|
|
1307
|
+
});
|
|
1308
|
+
}
|
|
1309
|
+
};
|
|
1310
|
+
|
|
1264
1311
|
// src/resources/ephemeralKeys.ts
|
|
1265
1312
|
var EphemeralKeys = class {
|
|
1266
1313
|
constructor(request) {
|
|
@@ -4590,6 +4637,31 @@ var Settlement = class {
|
|
|
4590
4637
|
constructor(request) {
|
|
4591
4638
|
this.request = request;
|
|
4592
4639
|
}
|
|
4640
|
+
/**
|
|
4641
|
+
* Read signed refund/dispute processor fees and report availability.
|
|
4642
|
+
* Merchant scope and connector grants apply. Empty movements confirm zero
|
|
4643
|
+
* only when the source is reported and complete.
|
|
4644
|
+
* Supply payment_id without year/month for all history. force_sync reads
|
|
4645
|
+
* provider reports for this page; it requires payment_id and limit <= 20,
|
|
4646
|
+
* and never issues a payment, refund or dispute action.
|
|
4647
|
+
* Omit test_mode for every reporting partition of one payment; period
|
|
4648
|
+
* queries default to live. Each source states its reporting partition.
|
|
4649
|
+
*/
|
|
4650
|
+
async listProcessorCostEvents(params, options) {
|
|
4651
|
+
return this.request("GET", "/settlement/processor-cost-events", {
|
|
4652
|
+
query: {
|
|
4653
|
+
profile_id: params.profile_id,
|
|
4654
|
+
payment_id: params.payment_id,
|
|
4655
|
+
year: params.year,
|
|
4656
|
+
month: params.month,
|
|
4657
|
+
test_mode: params.test_mode,
|
|
4658
|
+
limit: params.limit,
|
|
4659
|
+
offset: params.offset,
|
|
4660
|
+
force_sync: params.force_sync
|
|
4661
|
+
},
|
|
4662
|
+
...options
|
|
4663
|
+
});
|
|
4664
|
+
}
|
|
4593
4665
|
/**
|
|
4594
4666
|
* Per-shop settlement rollup for the host merchant: unpaid totals and the
|
|
4595
4667
|
* running current period, one row per shop.
|
|
@@ -4624,7 +4696,9 @@ var Settlement = class {
|
|
|
4624
4696
|
* **Host-only.** The response is the host's cost base, which a shop owner
|
|
4625
4697
|
* must never see, so a profile-scoped caller is refused with a 403 rather
|
|
4626
4698
|
* than given a redacted shell. Gate the surface on the caller's scope
|
|
4627
|
-
* instead of calling it and handling the failure.
|
|
4699
|
+
* instead of calling it and handling the failure. Connector-restricted
|
|
4700
|
+
* roles cannot read this merchant-wide aggregate; fee-event reads retain
|
|
4701
|
+
* their connector grants.
|
|
4628
4702
|
*
|
|
4629
4703
|
* Two things not to flatten when rendering the result:
|
|
4630
4704
|
* `margin_usd` is absent — not zero — whenever `margin_quality` is
|
|
@@ -5066,6 +5140,7 @@ var Delopay = class {
|
|
|
5066
5140
|
this.paymentLinks = new PaymentLinks(request);
|
|
5067
5141
|
this.mandates = new Mandates(request);
|
|
5068
5142
|
this.disputes = new Disputes(request);
|
|
5143
|
+
this.paypalDisputes = new PaypalDisputes(request);
|
|
5069
5144
|
this.payouts = new Payouts(request);
|
|
5070
5145
|
this.ephemeralKeys = new EphemeralKeys(request);
|
|
5071
5146
|
this.events = new Events(request);
|
|
@@ -7700,12 +7775,18 @@ var CheckoutSession = class {
|
|
|
7700
7775
|
* order that PayPal's buttons or Card Fields attach the buyer's choice to.
|
|
7701
7776
|
* The client secret is attached automatically.
|
|
7702
7777
|
*
|
|
7703
|
-
* For PayPal Card Fields
|
|
7778
|
+
* For PayPal Card Fields pass `payment_method: 'card'` and the
|
|
7704
7779
|
* `merchant_connector_id` the checkout was rendered with; the order id comes
|
|
7705
7780
|
* back in `next_action.next_action_data.order_id` and is what the SDK's
|
|
7706
7781
|
* `createOrder` returns. The confirm that captures it sends the same order
|
|
7707
7782
|
* and account as `payment_method_data.card_reference`.
|
|
7708
7783
|
*
|
|
7784
|
+
* Send a distinct `Idempotency-Key` through `options.headers` for each new
|
|
7785
|
+
* card submission; reuse it only to retry that same session request. The
|
|
7786
|
+
* returned order is bound to this attempt and account. Sessions cannot
|
|
7787
|
+
* replace an order while authentication or money processing is unresolved,
|
|
7788
|
+
* or after authorization/capture; stale or foreign references are refused.
|
|
7789
|
+
*
|
|
7709
7790
|
* `POST /payments/{paymentId}/post-session-tokens` (publishable key)
|
|
7710
7791
|
*/
|
|
7711
7792
|
async postSessionTokens(params, options) {
|
|
@@ -8518,6 +8599,23 @@ var AdminPortal = class {
|
|
|
8518
8599
|
`/admin-portal/transactions/${encodeURIComponent(paymentId)}/attempts/${encodeURIComponent(attemptId)}/processor-cost`
|
|
8519
8600
|
);
|
|
8520
8601
|
}
|
|
8602
|
+
/** Read or refresh signed processor fees for a payment. Internal admin access required. */
|
|
8603
|
+
async getTransactionProcessorCostEvents(paymentId, params = {}) {
|
|
8604
|
+
return this.request(
|
|
8605
|
+
"GET",
|
|
8606
|
+
`/admin-portal/transactions/${encodeURIComponent(paymentId)}/processor-cost-events`,
|
|
8607
|
+
{
|
|
8608
|
+
query: {
|
|
8609
|
+
test_mode: params.test_mode,
|
|
8610
|
+
year: params.year,
|
|
8611
|
+
month: params.month,
|
|
8612
|
+
limit: params.limit,
|
|
8613
|
+
offset: params.offset,
|
|
8614
|
+
force_sync: params.force_sync
|
|
8615
|
+
}
|
|
8616
|
+
}
|
|
8617
|
+
);
|
|
8618
|
+
}
|
|
8521
8619
|
/** Get the connector health polling interval. `GET /admin-portal/connector-health-config` */
|
|
8522
8620
|
async getConnectorHealthConfig() {
|
|
8523
8621
|
return this.request("GET", "/admin-portal/connector-health-config");
|
|
@@ -9428,6 +9526,7 @@ var DelopayInternal = class extends Delopay {
|
|
|
9428
9526
|
PANES_MAX,
|
|
9429
9527
|
PANE_CATEGORY_KEYS,
|
|
9430
9528
|
PANE_ICON_KEYS,
|
|
9529
|
+
PaypalDisputes,
|
|
9431
9530
|
PlatformBilling,
|
|
9432
9531
|
PlatformFees,
|
|
9433
9532
|
RTL_CHECKOUT_LOCALES,
|