@delopay/sdk 0.222.0 → 0.226.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-YI6NOPLG.js → chunk-ILCBRQSO.js} +116 -2
- package/dist/chunk-ILCBRQSO.js.map +1 -0
- package/dist/index.cjs +116 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +256 -9
- package/dist/index.d.ts +256 -9
- package/dist/index.js +3 -1
- package/dist/internal.cjs +193 -1
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +296 -3
- package/dist/internal.d.ts +296 -3
- package/dist/internal.js +80 -1
- package/dist/internal.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-YI6NOPLG.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -41,6 +41,7 @@ __export(index_exports, {
|
|
|
41
41
|
AvailabilityOverrides: () => AvailabilityOverrides,
|
|
42
42
|
BRANDING_EXPORT_FORMAT: () => BRANDING_EXPORT_FORMAT,
|
|
43
43
|
BRANDING_EXPORT_VERSION: () => BRANDING_EXPORT_VERSION,
|
|
44
|
+
BuyerBlocklist: () => BuyerBlocklist,
|
|
44
45
|
CARD_FIELD_CHROMES: () => CARD_FIELD_CHROMES,
|
|
45
46
|
CARD_FIELD_FONT_SIZES: () => CARD_FIELD_FONT_SIZES,
|
|
46
47
|
CARD_FIELD_WEIGHTS: () => CARD_FIELD_WEIGHTS,
|
|
@@ -4423,6 +4424,11 @@ var Users = class {
|
|
|
4423
4424
|
* parent-groups shape: `[{role_id, role_name, entity_type, role_scope,
|
|
4424
4425
|
* parent_groups: [{name, description, scopes}]}]`; without it, the
|
|
4425
4426
|
* deprecated flat `groups` shape.
|
|
4427
|
+
*
|
|
4428
|
+
* Each role carries `managed_centrally: true` when it is a shared role the
|
|
4429
|
+
* platform offers this merchant: it can be assigned, but `updateRole`,
|
|
4430
|
+
* `deleteRole` and `updateRoleConnectors` refuse it with `UR_71`
|
|
4431
|
+
* (`data.reason: 'managed_centrally'`).
|
|
4426
4432
|
*/
|
|
4427
4433
|
async listRoles(params) {
|
|
4428
4434
|
if (params === void 0) {
|
|
@@ -5363,6 +5369,45 @@ var SellToRestrictions = class {
|
|
|
5363
5369
|
}
|
|
5364
5370
|
};
|
|
5365
5371
|
|
|
5372
|
+
// src/resources/buyerBlocklist.ts
|
|
5373
|
+
var BuyerBlocklist = class {
|
|
5374
|
+
constructor(request) {
|
|
5375
|
+
this.request = request;
|
|
5376
|
+
}
|
|
5377
|
+
/**
|
|
5378
|
+
* One page of blocked buyers, newest first, filtered by scope, kind and a
|
|
5379
|
+
* search over the value and the note. Expired entries are not listed.
|
|
5380
|
+
* `GET /buyer-blocklist`
|
|
5381
|
+
*/
|
|
5382
|
+
async list(params) {
|
|
5383
|
+
return this.request("GET", "/buyer-blocklist", {
|
|
5384
|
+
query: params
|
|
5385
|
+
});
|
|
5386
|
+
}
|
|
5387
|
+
/**
|
|
5388
|
+
* Block a buyer in one shop or, without `profile_id`, in every shop of the
|
|
5389
|
+
* merchant. The value is normalised as it is matched; a value already
|
|
5390
|
+
* blocked in that scope is refused. The change is recorded in the audit log
|
|
5391
|
+
* before it is made.
|
|
5392
|
+
* `POST /buyer-blocklist`
|
|
5393
|
+
*/
|
|
5394
|
+
async create(params) {
|
|
5395
|
+
return this.request("POST", "/buyer-blocklist", { body: params });
|
|
5396
|
+
}
|
|
5397
|
+
/**
|
|
5398
|
+
* Remove an entry, so the buyer can pay again. Payments the entry already
|
|
5399
|
+
* refused keep their status. The removal and the optional `reason` are
|
|
5400
|
+
* recorded in the audit log before it is made. The route requires a body,
|
|
5401
|
+
* so `{}` is sent when no reason is given.
|
|
5402
|
+
* `DELETE /buyer-blocklist/{entry_id}`
|
|
5403
|
+
*/
|
|
5404
|
+
async delete(entryId, params) {
|
|
5405
|
+
return this.request("DELETE", `/buyer-blocklist/${encodeURIComponent(entryId)}`, {
|
|
5406
|
+
body: params ?? {}
|
|
5407
|
+
});
|
|
5408
|
+
}
|
|
5409
|
+
};
|
|
5410
|
+
|
|
5366
5411
|
// src/resources/checkoutRecovery.ts
|
|
5367
5412
|
var CheckoutRecovery = class {
|
|
5368
5413
|
constructor(request) {
|
|
@@ -8010,6 +8055,7 @@ var Delopay = class {
|
|
|
8010
8055
|
this.regions = new Regions(request);
|
|
8011
8056
|
this.availabilityOverrides = new AvailabilityOverrides(request);
|
|
8012
8057
|
this.sellToRestrictions = new SellToRestrictions(request);
|
|
8058
|
+
this.buyerBlocklist = new BuyerBlocklist(request);
|
|
8013
8059
|
this.checkoutRecovery = new CheckoutRecovery(request);
|
|
8014
8060
|
this.costRules = new CostRules(request);
|
|
8015
8061
|
this.externalRecords = new ExternalRecords(request);
|
|
@@ -9469,6 +9515,10 @@ var DEFAULT_BRANDING_BASE = {
|
|
|
9469
9515
|
nomupayApplePayButtonType: "pay",
|
|
9470
9516
|
nomupayGooglePayButtonColor: "auto",
|
|
9471
9517
|
nomupayGooglePayButtonType: "pay",
|
|
9518
|
+
micropaymentFieldChrome: "outlined",
|
|
9519
|
+
micropaymentFieldFontSize: "md",
|
|
9520
|
+
micropaymentFieldWeight: "regular",
|
|
9521
|
+
micropaymentFocusRing: "strong",
|
|
9472
9522
|
customCss: ""
|
|
9473
9523
|
};
|
|
9474
9524
|
var DEFAULT_BRANDING = {
|
|
@@ -10391,6 +10441,26 @@ function decodeBranding(source) {
|
|
|
10391
10441
|
CARD_FOCUS_RINGS,
|
|
10392
10442
|
DEFAULT_BRANDING.mollieFocusRing
|
|
10393
10443
|
),
|
|
10444
|
+
micropaymentFieldChrome: pickEnum(
|
|
10445
|
+
extras["micropaymentFieldChrome"],
|
|
10446
|
+
CARD_FIELD_CHROMES,
|
|
10447
|
+
DEFAULT_BRANDING.micropaymentFieldChrome
|
|
10448
|
+
),
|
|
10449
|
+
micropaymentFieldFontSize: pickEnum(
|
|
10450
|
+
extras["micropaymentFieldFontSize"],
|
|
10451
|
+
CARD_FIELD_FONT_SIZES,
|
|
10452
|
+
DEFAULT_BRANDING.micropaymentFieldFontSize
|
|
10453
|
+
),
|
|
10454
|
+
micropaymentFieldWeight: pickEnum(
|
|
10455
|
+
extras["micropaymentFieldWeight"],
|
|
10456
|
+
CARD_FIELD_WEIGHTS,
|
|
10457
|
+
DEFAULT_BRANDING.micropaymentFieldWeight
|
|
10458
|
+
),
|
|
10459
|
+
micropaymentFocusRing: pickEnum(
|
|
10460
|
+
extras["micropaymentFocusRing"],
|
|
10461
|
+
CARD_FOCUS_RINGS,
|
|
10462
|
+
DEFAULT_BRANDING.micropaymentFocusRing
|
|
10463
|
+
),
|
|
10394
10464
|
paypalValidTint: parseBool(extras["paypalValidTint"], DEFAULT_BRANDING.paypalValidTint),
|
|
10395
10465
|
nomupayFormStyle: pickEnum(
|
|
10396
10466
|
extras["nomupayFormStyle"],
|
|
@@ -10534,6 +10604,10 @@ function encodeBranding(branding, base) {
|
|
|
10534
10604
|
mollieFieldWeight: branding.mollieFieldWeight,
|
|
10535
10605
|
paypalFocusRing: branding.paypalFocusRing,
|
|
10536
10606
|
mollieFocusRing: branding.mollieFocusRing,
|
|
10607
|
+
micropaymentFieldChrome: branding.micropaymentFieldChrome,
|
|
10608
|
+
micropaymentFieldFontSize: branding.micropaymentFieldFontSize,
|
|
10609
|
+
micropaymentFieldWeight: branding.micropaymentFieldWeight,
|
|
10610
|
+
micropaymentFocusRing: branding.micropaymentFocusRing,
|
|
10537
10611
|
paypalValidTint: String(branding.paypalValidTint),
|
|
10538
10612
|
nomupayFormStyle: branding.nomupayFormStyle,
|
|
10539
10613
|
nomupayShowLabels: String(branding.nomupayShowLabels),
|
|
@@ -10921,6 +10995,26 @@ function parseImportedBranding(raw) {
|
|
|
10921
10995
|
CARD_FOCUS_RINGS,
|
|
10922
10996
|
dflt.mollieFocusRing
|
|
10923
10997
|
),
|
|
10998
|
+
micropaymentFieldChrome: pickEnum(
|
|
10999
|
+
root["micropaymentFieldChrome"],
|
|
11000
|
+
CARD_FIELD_CHROMES,
|
|
11001
|
+
dflt.micropaymentFieldChrome
|
|
11002
|
+
),
|
|
11003
|
+
micropaymentFieldFontSize: pickEnum(
|
|
11004
|
+
root["micropaymentFieldFontSize"],
|
|
11005
|
+
CARD_FIELD_FONT_SIZES,
|
|
11006
|
+
dflt.micropaymentFieldFontSize
|
|
11007
|
+
),
|
|
11008
|
+
micropaymentFieldWeight: pickEnum(
|
|
11009
|
+
root["micropaymentFieldWeight"],
|
|
11010
|
+
CARD_FIELD_WEIGHTS,
|
|
11011
|
+
dflt.micropaymentFieldWeight
|
|
11012
|
+
),
|
|
11013
|
+
micropaymentFocusRing: pickEnum(
|
|
11014
|
+
root["micropaymentFocusRing"],
|
|
11015
|
+
CARD_FOCUS_RINGS,
|
|
11016
|
+
dflt.micropaymentFocusRing
|
|
11017
|
+
),
|
|
10924
11018
|
paypalValidTint: parseBool(root["paypalValidTint"], dflt.paypalValidTint),
|
|
10925
11019
|
nomupayFormStyle: pickEnum(
|
|
10926
11020
|
root["nomupayFormStyle"],
|
|
@@ -11468,6 +11562,24 @@ var CheckoutSession = class {
|
|
|
11468
11562
|
headers: this.bearerHeaders(options?.headers)
|
|
11469
11563
|
});
|
|
11470
11564
|
}
|
|
11565
|
+
/**
|
|
11566
|
+
* Mint the security-code form for a saved card, on a shop whose vault keeps
|
|
11567
|
+
* the code itself (Enigma Vault). The buyer re-enters the code into the
|
|
11568
|
+
* vault's own form, so it never reaches the checkout; confirm with the saved
|
|
11569
|
+
* card's `payment_token` once the form reports it stored.
|
|
11570
|
+
*
|
|
11571
|
+
* `paymentToken` is the saved card's token from the payment-method list. A
|
|
11572
|
+
* VGS shop answers `400`: VGS re-collects the code with Collect.
|
|
11573
|
+
*
|
|
11574
|
+
* `GET /payment-link/{merchantId}/{paymentId}/vault/security-code-session`
|
|
11575
|
+
*/
|
|
11576
|
+
async vaultSecurityCodeSession(paymentToken, options) {
|
|
11577
|
+
return this.client.request("GET", `${this.linkBase}/vault/security-code-session`, {
|
|
11578
|
+
...options,
|
|
11579
|
+
query: { payment_token: paymentToken },
|
|
11580
|
+
headers: this.bearerHeaders(options?.headers)
|
|
11581
|
+
});
|
|
11582
|
+
}
|
|
11471
11583
|
/**
|
|
11472
11584
|
* Register the aliased card as a payment method and mint the one-shot
|
|
11473
11585
|
* `payment_token` the confirm call spends.
|
|
@@ -11494,7 +11606,9 @@ var CheckoutSession = class {
|
|
|
11494
11606
|
*
|
|
11495
11607
|
* The router judges the card's issuing country and the buyer's IP country
|
|
11496
11608
|
* against the shop's sell-to restrictions before Stripe authorises, and a
|
|
11497
|
-
* refusal throws a `DelopayError` with code `DE_10`.
|
|
11609
|
+
* refusal throws a `DelopayError` with code `DE_10`. A buyer on the
|
|
11610
|
+
* merchant's buyer blocklist is refused before any Stripe call with code
|
|
11611
|
+
* `DE_14` (`buyer_blocked`, 422), which names no entry. When the answer's
|
|
11498
11612
|
* `status` is `requires_action`, run `stripe.handleNextAction` with its
|
|
11499
11613
|
* `client_secret` — safe, because the intent is `confirmation_method=manual`
|
|
11500
11614
|
* and that secret confirms nothing without the secret key — then call this
|
|
@@ -12096,6 +12210,7 @@ var encodeNativePanes = encodePanes;
|
|
|
12096
12210
|
AvailabilityOverrides,
|
|
12097
12211
|
BRANDING_EXPORT_FORMAT,
|
|
12098
12212
|
BRANDING_EXPORT_VERSION,
|
|
12213
|
+
BuyerBlocklist,
|
|
12099
12214
|
CARD_FIELD_CHROMES,
|
|
12100
12215
|
CARD_FIELD_FONT_SIZES,
|
|
12101
12216
|
CARD_FIELD_WEIGHTS,
|