@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
|
@@ -3809,6 +3809,9 @@ var Verification = class {
|
|
|
3809
3809
|
function isSubscriptionLifecycleWebhook(object) {
|
|
3810
3810
|
return typeof object.transition_id === "string";
|
|
3811
3811
|
}
|
|
3812
|
+
function isSubscriptionDisputeWebhook(object) {
|
|
3813
|
+
return typeof object.connector_dispute_id === "string";
|
|
3814
|
+
}
|
|
3812
3815
|
function hexToBytes(hex) {
|
|
3813
3816
|
if (hex.length === 0 || hex.length % 2 !== 0) return null;
|
|
3814
3817
|
const bytes = new Uint8Array(hex.length / 2);
|
|
@@ -4325,6 +4328,66 @@ var AvailabilityOverrides = class {
|
|
|
4325
4328
|
}
|
|
4326
4329
|
};
|
|
4327
4330
|
|
|
4331
|
+
// src/resources/sellToRestrictions.ts
|
|
4332
|
+
var SellToRestrictions = class {
|
|
4333
|
+
constructor(request) {
|
|
4334
|
+
this.request = request;
|
|
4335
|
+
}
|
|
4336
|
+
/**
|
|
4337
|
+
* The merchant-wide policy and every shop's effective policy. A caller
|
|
4338
|
+
* scoped to one shop receives that shop alone, and no merchant-wide policy.
|
|
4339
|
+
* `GET /sell-to-restrictions`
|
|
4340
|
+
*/
|
|
4341
|
+
async retrieve() {
|
|
4342
|
+
return this.request("GET", "/sell-to-restrictions");
|
|
4343
|
+
}
|
|
4344
|
+
/**
|
|
4345
|
+
* Replace the merchant-wide policy every shop without an override inherits.
|
|
4346
|
+
* The change is recorded in the audit log before it is made.
|
|
4347
|
+
* `PUT /sell-to-restrictions/merchant`
|
|
4348
|
+
*/
|
|
4349
|
+
async updateMerchantPolicy(params) {
|
|
4350
|
+
return this.request("PUT", "/sell-to-restrictions/merchant", { body: params });
|
|
4351
|
+
}
|
|
4352
|
+
/**
|
|
4353
|
+
* Give one shop its own policy, replacing the merchant-wide policy for that
|
|
4354
|
+
* shop. An empty `blocked_countries` lifts every restriction for it.
|
|
4355
|
+
* `PUT /sell-to-restrictions/shops/{profile_id}`
|
|
4356
|
+
*/
|
|
4357
|
+
async updateShopOverride(profileId, params) {
|
|
4358
|
+
return this.request("PUT", `/sell-to-restrictions/shops/${encodeURIComponent(profileId)}`, {
|
|
4359
|
+
body: params
|
|
4360
|
+
});
|
|
4361
|
+
}
|
|
4362
|
+
/**
|
|
4363
|
+
* Remove one shop's override, so it inherits the merchant-wide policy again.
|
|
4364
|
+
* Removing an override the shop does not have changes nothing.
|
|
4365
|
+
* `DELETE /sell-to-restrictions/shops/{profile_id}`
|
|
4366
|
+
*/
|
|
4367
|
+
async deleteShopOverride(profileId) {
|
|
4368
|
+
return this.request("DELETE", `/sell-to-restrictions/shops/${encodeURIComponent(profileId)}`);
|
|
4369
|
+
}
|
|
4370
|
+
/**
|
|
4371
|
+
* Which checks each payment path performs, and how this deployment resolves
|
|
4372
|
+
* a buyer's country — read before relying on a restriction for a path.
|
|
4373
|
+
* `GET /sell-to-restrictions/capabilities`
|
|
4374
|
+
*/
|
|
4375
|
+
async capabilities() {
|
|
4376
|
+
return this.request("GET", "/sell-to-restrictions/capabilities");
|
|
4377
|
+
}
|
|
4378
|
+
/**
|
|
4379
|
+
* Why a payment was refused: where, by which signal, for which country and
|
|
4380
|
+
* under which policy. A shop-scoped caller sees only refusals in its shop.
|
|
4381
|
+
* `GET /sell-to-restrictions/payments/{payment_id}/decisions`
|
|
4382
|
+
*/
|
|
4383
|
+
async listDecisions(paymentId) {
|
|
4384
|
+
return this.request(
|
|
4385
|
+
"GET",
|
|
4386
|
+
`/sell-to-restrictions/payments/${encodeURIComponent(paymentId)}/decisions`
|
|
4387
|
+
);
|
|
4388
|
+
}
|
|
4389
|
+
};
|
|
4390
|
+
|
|
4328
4391
|
// src/resources/checkoutMethods.ts
|
|
4329
4392
|
var CheckoutMethods = class {
|
|
4330
4393
|
constructor(request) {
|
|
@@ -5244,6 +5307,7 @@ var Delopay = class {
|
|
|
5244
5307
|
this.forex = new Forex(request);
|
|
5245
5308
|
this.regions = new Regions(request);
|
|
5246
5309
|
this.availabilityOverrides = new AvailabilityOverrides(request);
|
|
5310
|
+
this.sellToRestrictions = new SellToRestrictions(request);
|
|
5247
5311
|
this.checkoutMethods = new CheckoutMethods(request);
|
|
5248
5312
|
this.analytics = new Analytics(request);
|
|
5249
5313
|
this.analyticsDashboard = new AnalyticsDashboard(request);
|
|
@@ -8724,6 +8788,7 @@ export {
|
|
|
8724
8788
|
PaypalDisputes,
|
|
8725
8789
|
Search,
|
|
8726
8790
|
isSubscriptionLifecycleWebhook,
|
|
8791
|
+
isSubscriptionDisputeWebhook,
|
|
8727
8792
|
Webhooks,
|
|
8728
8793
|
Analytics,
|
|
8729
8794
|
AnalyticsDashboard,
|
|
@@ -8734,6 +8799,7 @@ export {
|
|
|
8734
8799
|
Forex,
|
|
8735
8800
|
Regions,
|
|
8736
8801
|
AvailabilityOverrides,
|
|
8802
|
+
SellToRestrictions,
|
|
8737
8803
|
CheckoutMethods,
|
|
8738
8804
|
Subscriptions,
|
|
8739
8805
|
Audit,
|
|
@@ -8912,4 +8978,4 @@ export {
|
|
|
8912
8978
|
decodeNativePanes,
|
|
8913
8979
|
encodeNativePanes
|
|
8914
8980
|
};
|
|
8915
|
-
//# sourceMappingURL=chunk-
|
|
8981
|
+
//# sourceMappingURL=chunk-JZZZG5VD.js.map
|