@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.js
CHANGED
|
@@ -90,6 +90,7 @@ import {
|
|
|
90
90
|
SURCHARGE_STYLES,
|
|
91
91
|
SURCHARGE_WEIGHTS,
|
|
92
92
|
Search,
|
|
93
|
+
SellToRestrictions,
|
|
93
94
|
Settlement,
|
|
94
95
|
Subscriptions,
|
|
95
96
|
UNKNOWN_SECTION_ORDER,
|
|
@@ -155,6 +156,7 @@ import {
|
|
|
155
156
|
isCheckboxChecked,
|
|
156
157
|
isDarkSurface,
|
|
157
158
|
isHexColor,
|
|
159
|
+
isSubscriptionDisputeWebhook,
|
|
158
160
|
isSubscriptionLifecycleWebhook,
|
|
159
161
|
knownSectionLabelKey,
|
|
160
162
|
leaf,
|
|
@@ -191,7 +193,7 @@ import {
|
|
|
191
193
|
validatePanes,
|
|
192
194
|
verticalGapValue,
|
|
193
195
|
visibleCustomFields
|
|
194
|
-
} from "./chunk-
|
|
196
|
+
} from "./chunk-JZZZG5VD.js";
|
|
195
197
|
export {
|
|
196
198
|
AIRWALLEX_AUTOFILL_TREATMENTS,
|
|
197
199
|
AIRWALLEX_CARD_LAYOUTS,
|
|
@@ -284,6 +286,7 @@ export {
|
|
|
284
286
|
SURCHARGE_STYLES,
|
|
285
287
|
SURCHARGE_WEIGHTS,
|
|
286
288
|
Search,
|
|
289
|
+
SellToRestrictions,
|
|
287
290
|
Settlement,
|
|
288
291
|
Subscriptions,
|
|
289
292
|
UNKNOWN_SECTION_ORDER,
|
|
@@ -349,6 +352,7 @@ export {
|
|
|
349
352
|
isCheckboxChecked,
|
|
350
353
|
isDarkSurface,
|
|
351
354
|
isHexColor,
|
|
355
|
+
isSubscriptionDisputeWebhook,
|
|
352
356
|
isSubscriptionLifecycleWebhook,
|
|
353
357
|
knownSectionLabelKey,
|
|
354
358
|
leaf,
|
package/dist/internal.cjs
CHANGED
|
@@ -124,6 +124,7 @@ __export(internal_exports, {
|
|
|
124
124
|
SURCHARGE_STYLES: () => SURCHARGE_STYLES,
|
|
125
125
|
SURCHARGE_WEIGHTS: () => SURCHARGE_WEIGHTS,
|
|
126
126
|
Search: () => Search,
|
|
127
|
+
SellToRestrictions: () => SellToRestrictions,
|
|
127
128
|
Settlement: () => Settlement,
|
|
128
129
|
Subscriptions: () => Subscriptions,
|
|
129
130
|
UNKNOWN_SECTION_ORDER: () => UNKNOWN_SECTION_ORDER,
|
|
@@ -189,6 +190,7 @@ __export(internal_exports, {
|
|
|
189
190
|
isCheckboxChecked: () => isCheckboxChecked,
|
|
190
191
|
isDarkSurface: () => isDarkSurface,
|
|
191
192
|
isHexColor: () => isHexColor,
|
|
193
|
+
isSubscriptionDisputeWebhook: () => isSubscriptionDisputeWebhook,
|
|
192
194
|
isSubscriptionLifecycleWebhook: () => isSubscriptionLifecycleWebhook,
|
|
193
195
|
knownSectionLabelKey: () => knownSectionLabelKey,
|
|
194
196
|
leaf: () => leaf,
|
|
@@ -4039,6 +4041,9 @@ var Verification = class {
|
|
|
4039
4041
|
function isSubscriptionLifecycleWebhook(object) {
|
|
4040
4042
|
return typeof object.transition_id === "string";
|
|
4041
4043
|
}
|
|
4044
|
+
function isSubscriptionDisputeWebhook(object) {
|
|
4045
|
+
return typeof object.connector_dispute_id === "string";
|
|
4046
|
+
}
|
|
4042
4047
|
function hexToBytes(hex) {
|
|
4043
4048
|
if (hex.length === 0 || hex.length % 2 !== 0) return null;
|
|
4044
4049
|
const bytes = new Uint8Array(hex.length / 2);
|
|
@@ -4555,6 +4560,66 @@ var AvailabilityOverrides = class {
|
|
|
4555
4560
|
}
|
|
4556
4561
|
};
|
|
4557
4562
|
|
|
4563
|
+
// src/resources/sellToRestrictions.ts
|
|
4564
|
+
var SellToRestrictions = class {
|
|
4565
|
+
constructor(request) {
|
|
4566
|
+
this.request = request;
|
|
4567
|
+
}
|
|
4568
|
+
/**
|
|
4569
|
+
* The merchant-wide policy and every shop's effective policy. A caller
|
|
4570
|
+
* scoped to one shop receives that shop alone, and no merchant-wide policy.
|
|
4571
|
+
* `GET /sell-to-restrictions`
|
|
4572
|
+
*/
|
|
4573
|
+
async retrieve() {
|
|
4574
|
+
return this.request("GET", "/sell-to-restrictions");
|
|
4575
|
+
}
|
|
4576
|
+
/**
|
|
4577
|
+
* Replace the merchant-wide policy every shop without an override inherits.
|
|
4578
|
+
* The change is recorded in the audit log before it is made.
|
|
4579
|
+
* `PUT /sell-to-restrictions/merchant`
|
|
4580
|
+
*/
|
|
4581
|
+
async updateMerchantPolicy(params) {
|
|
4582
|
+
return this.request("PUT", "/sell-to-restrictions/merchant", { body: params });
|
|
4583
|
+
}
|
|
4584
|
+
/**
|
|
4585
|
+
* Give one shop its own policy, replacing the merchant-wide policy for that
|
|
4586
|
+
* shop. An empty `blocked_countries` lifts every restriction for it.
|
|
4587
|
+
* `PUT /sell-to-restrictions/shops/{profile_id}`
|
|
4588
|
+
*/
|
|
4589
|
+
async updateShopOverride(profileId, params) {
|
|
4590
|
+
return this.request("PUT", `/sell-to-restrictions/shops/${encodeURIComponent(profileId)}`, {
|
|
4591
|
+
body: params
|
|
4592
|
+
});
|
|
4593
|
+
}
|
|
4594
|
+
/**
|
|
4595
|
+
* Remove one shop's override, so it inherits the merchant-wide policy again.
|
|
4596
|
+
* Removing an override the shop does not have changes nothing.
|
|
4597
|
+
* `DELETE /sell-to-restrictions/shops/{profile_id}`
|
|
4598
|
+
*/
|
|
4599
|
+
async deleteShopOverride(profileId) {
|
|
4600
|
+
return this.request("DELETE", `/sell-to-restrictions/shops/${encodeURIComponent(profileId)}`);
|
|
4601
|
+
}
|
|
4602
|
+
/**
|
|
4603
|
+
* Which checks each payment path performs, and how this deployment resolves
|
|
4604
|
+
* a buyer's country — read before relying on a restriction for a path.
|
|
4605
|
+
* `GET /sell-to-restrictions/capabilities`
|
|
4606
|
+
*/
|
|
4607
|
+
async capabilities() {
|
|
4608
|
+
return this.request("GET", "/sell-to-restrictions/capabilities");
|
|
4609
|
+
}
|
|
4610
|
+
/**
|
|
4611
|
+
* Why a payment was refused: where, by which signal, for which country and
|
|
4612
|
+
* under which policy. A shop-scoped caller sees only refusals in its shop.
|
|
4613
|
+
* `GET /sell-to-restrictions/payments/{payment_id}/decisions`
|
|
4614
|
+
*/
|
|
4615
|
+
async listDecisions(paymentId) {
|
|
4616
|
+
return this.request(
|
|
4617
|
+
"GET",
|
|
4618
|
+
`/sell-to-restrictions/payments/${encodeURIComponent(paymentId)}/decisions`
|
|
4619
|
+
);
|
|
4620
|
+
}
|
|
4621
|
+
};
|
|
4622
|
+
|
|
4558
4623
|
// src/resources/checkoutMethods.ts
|
|
4559
4624
|
var CheckoutMethods = class {
|
|
4560
4625
|
constructor(request) {
|
|
@@ -5474,6 +5539,7 @@ var Delopay = class {
|
|
|
5474
5539
|
this.forex = new Forex(request);
|
|
5475
5540
|
this.regions = new Regions(request);
|
|
5476
5541
|
this.availabilityOverrides = new AvailabilityOverrides(request);
|
|
5542
|
+
this.sellToRestrictions = new SellToRestrictions(request);
|
|
5477
5543
|
this.checkoutMethods = new CheckoutMethods(request);
|
|
5478
5544
|
this.analytics = new Analytics(request);
|
|
5479
5545
|
this.analyticsDashboard = new AnalyticsDashboard(request);
|
|
@@ -9271,6 +9337,19 @@ var AdminPortal = class {
|
|
|
9271
9337
|
{ body: { home_country: homeCountry } }
|
|
9272
9338
|
);
|
|
9273
9339
|
}
|
|
9340
|
+
/**
|
|
9341
|
+
* One merchant's sell-to restrictions — the merchant-wide policy and every
|
|
9342
|
+
* shop's effective policy. Read-only; staff change a policy through the
|
|
9343
|
+
* merchant routes.
|
|
9344
|
+
*
|
|
9345
|
+
* `GET /admin-portal/accounts/{merchantId}/sell-to-restrictions`
|
|
9346
|
+
*/
|
|
9347
|
+
async getSellToRestrictions(merchantId) {
|
|
9348
|
+
return this.request(
|
|
9349
|
+
"GET",
|
|
9350
|
+
`/admin-portal/accounts/${encodeURIComponent(merchantId)}/sell-to-restrictions`
|
|
9351
|
+
);
|
|
9352
|
+
}
|
|
9274
9353
|
/**
|
|
9275
9354
|
* Soft-delete a transaction of ANY merchant. Only payments whose status
|
|
9276
9355
|
* is in the admin delete policy can be deleted; the action is audited.
|
|
@@ -10306,6 +10385,7 @@ var DelopayInternal = class extends Delopay {
|
|
|
10306
10385
|
SURCHARGE_STYLES,
|
|
10307
10386
|
SURCHARGE_WEIGHTS,
|
|
10308
10387
|
Search,
|
|
10388
|
+
SellToRestrictions,
|
|
10309
10389
|
Settlement,
|
|
10310
10390
|
Subscriptions,
|
|
10311
10391
|
UNKNOWN_SECTION_ORDER,
|
|
@@ -10371,6 +10451,7 @@ var DelopayInternal = class extends Delopay {
|
|
|
10371
10451
|
isCheckboxChecked,
|
|
10372
10452
|
isDarkSurface,
|
|
10373
10453
|
isHexColor,
|
|
10454
|
+
isSubscriptionDisputeWebhook,
|
|
10374
10455
|
isSubscriptionLifecycleWebhook,
|
|
10375
10456
|
knownSectionLabelKey,
|
|
10376
10457
|
leaf,
|