@delopay/sdk 0.155.0 → 0.157.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-GV7R45LR.js → chunk-JZZZG5VD.js} +67 -1
- package/dist/chunk-JZZZG5VD.js.map +1 -0
- package/dist/index.cjs +68 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +390 -17
- package/dist/index.d.ts +390 -17
- package/dist/index.js +5 -1
- package/dist/internal.cjs +81 -0
- 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 +18 -1
- package/dist/internal.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-GV7R45LR.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -111,6 +111,7 @@ __export(index_exports, {
|
|
|
111
111
|
SURCHARGE_STYLES: () => SURCHARGE_STYLES,
|
|
112
112
|
SURCHARGE_WEIGHTS: () => SURCHARGE_WEIGHTS,
|
|
113
113
|
Search: () => Search,
|
|
114
|
+
SellToRestrictions: () => SellToRestrictions,
|
|
114
115
|
Settlement: () => Settlement,
|
|
115
116
|
Subscriptions: () => Subscriptions,
|
|
116
117
|
UNKNOWN_SECTION_ORDER: () => UNKNOWN_SECTION_ORDER,
|
|
@@ -176,6 +177,7 @@ __export(index_exports, {
|
|
|
176
177
|
isCheckboxChecked: () => isCheckboxChecked,
|
|
177
178
|
isDarkSurface: () => isDarkSurface,
|
|
178
179
|
isHexColor: () => isHexColor,
|
|
180
|
+
isSubscriptionDisputeWebhook: () => isSubscriptionDisputeWebhook,
|
|
179
181
|
isSubscriptionLifecycleWebhook: () => isSubscriptionLifecycleWebhook,
|
|
180
182
|
knownSectionLabelKey: () => knownSectionLabelKey,
|
|
181
183
|
leaf: () => leaf,
|
|
@@ -4026,6 +4028,9 @@ var Verification = class {
|
|
|
4026
4028
|
function isSubscriptionLifecycleWebhook(object) {
|
|
4027
4029
|
return typeof object.transition_id === "string";
|
|
4028
4030
|
}
|
|
4031
|
+
function isSubscriptionDisputeWebhook(object) {
|
|
4032
|
+
return typeof object.connector_dispute_id === "string";
|
|
4033
|
+
}
|
|
4029
4034
|
function hexToBytes(hex) {
|
|
4030
4035
|
if (hex.length === 0 || hex.length % 2 !== 0) return null;
|
|
4031
4036
|
const bytes = new Uint8Array(hex.length / 2);
|
|
@@ -4542,6 +4547,66 @@ var AvailabilityOverrides = class {
|
|
|
4542
4547
|
}
|
|
4543
4548
|
};
|
|
4544
4549
|
|
|
4550
|
+
// src/resources/sellToRestrictions.ts
|
|
4551
|
+
var SellToRestrictions = class {
|
|
4552
|
+
constructor(request) {
|
|
4553
|
+
this.request = request;
|
|
4554
|
+
}
|
|
4555
|
+
/**
|
|
4556
|
+
* The merchant-wide policy and every shop's effective policy. A caller
|
|
4557
|
+
* scoped to one shop receives that shop alone, and no merchant-wide policy.
|
|
4558
|
+
* `GET /sell-to-restrictions`
|
|
4559
|
+
*/
|
|
4560
|
+
async retrieve() {
|
|
4561
|
+
return this.request("GET", "/sell-to-restrictions");
|
|
4562
|
+
}
|
|
4563
|
+
/**
|
|
4564
|
+
* Replace the merchant-wide policy every shop without an override inherits.
|
|
4565
|
+
* The change is recorded in the audit log before it is made.
|
|
4566
|
+
* `PUT /sell-to-restrictions/merchant`
|
|
4567
|
+
*/
|
|
4568
|
+
async updateMerchantPolicy(params) {
|
|
4569
|
+
return this.request("PUT", "/sell-to-restrictions/merchant", { body: params });
|
|
4570
|
+
}
|
|
4571
|
+
/**
|
|
4572
|
+
* Give one shop its own policy, replacing the merchant-wide policy for that
|
|
4573
|
+
* shop. An empty `blocked_countries` lifts every restriction for it.
|
|
4574
|
+
* `PUT /sell-to-restrictions/shops/{profile_id}`
|
|
4575
|
+
*/
|
|
4576
|
+
async updateShopOverride(profileId, params) {
|
|
4577
|
+
return this.request("PUT", `/sell-to-restrictions/shops/${encodeURIComponent(profileId)}`, {
|
|
4578
|
+
body: params
|
|
4579
|
+
});
|
|
4580
|
+
}
|
|
4581
|
+
/**
|
|
4582
|
+
* Remove one shop's override, so it inherits the merchant-wide policy again.
|
|
4583
|
+
* Removing an override the shop does not have changes nothing.
|
|
4584
|
+
* `DELETE /sell-to-restrictions/shops/{profile_id}`
|
|
4585
|
+
*/
|
|
4586
|
+
async deleteShopOverride(profileId) {
|
|
4587
|
+
return this.request("DELETE", `/sell-to-restrictions/shops/${encodeURIComponent(profileId)}`);
|
|
4588
|
+
}
|
|
4589
|
+
/**
|
|
4590
|
+
* Which checks each payment path performs, and how this deployment resolves
|
|
4591
|
+
* a buyer's country — read before relying on a restriction for a path.
|
|
4592
|
+
* `GET /sell-to-restrictions/capabilities`
|
|
4593
|
+
*/
|
|
4594
|
+
async capabilities() {
|
|
4595
|
+
return this.request("GET", "/sell-to-restrictions/capabilities");
|
|
4596
|
+
}
|
|
4597
|
+
/**
|
|
4598
|
+
* Why a payment was refused: where, by which signal, for which country and
|
|
4599
|
+
* under which policy. A shop-scoped caller sees only refusals in its shop.
|
|
4600
|
+
* `GET /sell-to-restrictions/payments/{payment_id}/decisions`
|
|
4601
|
+
*/
|
|
4602
|
+
async listDecisions(paymentId) {
|
|
4603
|
+
return this.request(
|
|
4604
|
+
"GET",
|
|
4605
|
+
`/sell-to-restrictions/payments/${encodeURIComponent(paymentId)}/decisions`
|
|
4606
|
+
);
|
|
4607
|
+
}
|
|
4608
|
+
};
|
|
4609
|
+
|
|
4545
4610
|
// src/resources/checkoutMethods.ts
|
|
4546
4611
|
var CheckoutMethods = class {
|
|
4547
4612
|
constructor(request) {
|
|
@@ -5461,6 +5526,7 @@ var Delopay = class {
|
|
|
5461
5526
|
this.forex = new Forex(request);
|
|
5462
5527
|
this.regions = new Regions(request);
|
|
5463
5528
|
this.availabilityOverrides = new AvailabilityOverrides(request);
|
|
5529
|
+
this.sellToRestrictions = new SellToRestrictions(request);
|
|
5464
5530
|
this.checkoutMethods = new CheckoutMethods(request);
|
|
5465
5531
|
this.analytics = new Analytics(request);
|
|
5466
5532
|
this.analyticsDashboard = new AnalyticsDashboard(request);
|
|
@@ -9027,6 +9093,7 @@ var encodeNativePanes = encodePanes;
|
|
|
9027
9093
|
SURCHARGE_STYLES,
|
|
9028
9094
|
SURCHARGE_WEIGHTS,
|
|
9029
9095
|
Search,
|
|
9096
|
+
SellToRestrictions,
|
|
9030
9097
|
Settlement,
|
|
9031
9098
|
Subscriptions,
|
|
9032
9099
|
UNKNOWN_SECTION_ORDER,
|
|
@@ -9092,6 +9159,7 @@ var encodeNativePanes = encodePanes;
|
|
|
9092
9159
|
isCheckboxChecked,
|
|
9093
9160
|
isDarkSurface,
|
|
9094
9161
|
isHexColor,
|
|
9162
|
+
isSubscriptionDisputeWebhook,
|
|
9095
9163
|
isSubscriptionLifecycleWebhook,
|
|
9096
9164
|
knownSectionLabelKey,
|
|
9097
9165
|
leaf,
|