@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.
@@ -4176,6 +4176,11 @@ var Users = class {
4176
4176
  * parent-groups shape: `[{role_id, role_name, entity_type, role_scope,
4177
4177
  * parent_groups: [{name, description, scopes}]}]`; without it, the
4178
4178
  * deprecated flat `groups` shape.
4179
+ *
4180
+ * Each role carries `managed_centrally: true` when it is a shared role the
4181
+ * platform offers this merchant: it can be assigned, but `updateRole`,
4182
+ * `deleteRole` and `updateRoleConnectors` refuse it with `UR_71`
4183
+ * (`data.reason: 'managed_centrally'`).
4179
4184
  */
4180
4185
  async listRoles(params) {
4181
4186
  if (params === void 0) {
@@ -5116,6 +5121,45 @@ var SellToRestrictions = class {
5116
5121
  }
5117
5122
  };
5118
5123
 
5124
+ // src/resources/buyerBlocklist.ts
5125
+ var BuyerBlocklist = class {
5126
+ constructor(request) {
5127
+ this.request = request;
5128
+ }
5129
+ /**
5130
+ * One page of blocked buyers, newest first, filtered by scope, kind and a
5131
+ * search over the value and the note. Expired entries are not listed.
5132
+ * `GET /buyer-blocklist`
5133
+ */
5134
+ async list(params) {
5135
+ return this.request("GET", "/buyer-blocklist", {
5136
+ query: params
5137
+ });
5138
+ }
5139
+ /**
5140
+ * Block a buyer in one shop or, without `profile_id`, in every shop of the
5141
+ * merchant. The value is normalised as it is matched; a value already
5142
+ * blocked in that scope is refused. The change is recorded in the audit log
5143
+ * before it is made.
5144
+ * `POST /buyer-blocklist`
5145
+ */
5146
+ async create(params) {
5147
+ return this.request("POST", "/buyer-blocklist", { body: params });
5148
+ }
5149
+ /**
5150
+ * Remove an entry, so the buyer can pay again. Payments the entry already
5151
+ * refused keep their status. The removal and the optional `reason` are
5152
+ * recorded in the audit log before it is made. The route requires a body,
5153
+ * so `{}` is sent when no reason is given.
5154
+ * `DELETE /buyer-blocklist/{entry_id}`
5155
+ */
5156
+ async delete(entryId, params) {
5157
+ return this.request("DELETE", `/buyer-blocklist/${encodeURIComponent(entryId)}`, {
5158
+ body: params ?? {}
5159
+ });
5160
+ }
5161
+ };
5162
+
5119
5163
  // src/resources/checkoutRecovery.ts
5120
5164
  var CheckoutRecovery = class {
5121
5165
  constructor(request) {
@@ -7763,6 +7807,7 @@ var Delopay = class {
7763
7807
  this.regions = new Regions(request);
7764
7808
  this.availabilityOverrides = new AvailabilityOverrides(request);
7765
7809
  this.sellToRestrictions = new SellToRestrictions(request);
7810
+ this.buyerBlocklist = new BuyerBlocklist(request);
7766
7811
  this.checkoutRecovery = new CheckoutRecovery(request);
7767
7812
  this.costRules = new CostRules(request);
7768
7813
  this.externalRecords = new ExternalRecords(request);
@@ -9222,6 +9267,10 @@ var DEFAULT_BRANDING_BASE = {
9222
9267
  nomupayApplePayButtonType: "pay",
9223
9268
  nomupayGooglePayButtonColor: "auto",
9224
9269
  nomupayGooglePayButtonType: "pay",
9270
+ micropaymentFieldChrome: "outlined",
9271
+ micropaymentFieldFontSize: "md",
9272
+ micropaymentFieldWeight: "regular",
9273
+ micropaymentFocusRing: "strong",
9225
9274
  customCss: ""
9226
9275
  };
9227
9276
  var DEFAULT_BRANDING = {
@@ -10144,6 +10193,26 @@ function decodeBranding(source) {
10144
10193
  CARD_FOCUS_RINGS,
10145
10194
  DEFAULT_BRANDING.mollieFocusRing
10146
10195
  ),
10196
+ micropaymentFieldChrome: pickEnum(
10197
+ extras["micropaymentFieldChrome"],
10198
+ CARD_FIELD_CHROMES,
10199
+ DEFAULT_BRANDING.micropaymentFieldChrome
10200
+ ),
10201
+ micropaymentFieldFontSize: pickEnum(
10202
+ extras["micropaymentFieldFontSize"],
10203
+ CARD_FIELD_FONT_SIZES,
10204
+ DEFAULT_BRANDING.micropaymentFieldFontSize
10205
+ ),
10206
+ micropaymentFieldWeight: pickEnum(
10207
+ extras["micropaymentFieldWeight"],
10208
+ CARD_FIELD_WEIGHTS,
10209
+ DEFAULT_BRANDING.micropaymentFieldWeight
10210
+ ),
10211
+ micropaymentFocusRing: pickEnum(
10212
+ extras["micropaymentFocusRing"],
10213
+ CARD_FOCUS_RINGS,
10214
+ DEFAULT_BRANDING.micropaymentFocusRing
10215
+ ),
10147
10216
  paypalValidTint: parseBool(extras["paypalValidTint"], DEFAULT_BRANDING.paypalValidTint),
10148
10217
  nomupayFormStyle: pickEnum(
10149
10218
  extras["nomupayFormStyle"],
@@ -10287,6 +10356,10 @@ function encodeBranding(branding, base) {
10287
10356
  mollieFieldWeight: branding.mollieFieldWeight,
10288
10357
  paypalFocusRing: branding.paypalFocusRing,
10289
10358
  mollieFocusRing: branding.mollieFocusRing,
10359
+ micropaymentFieldChrome: branding.micropaymentFieldChrome,
10360
+ micropaymentFieldFontSize: branding.micropaymentFieldFontSize,
10361
+ micropaymentFieldWeight: branding.micropaymentFieldWeight,
10362
+ micropaymentFocusRing: branding.micropaymentFocusRing,
10290
10363
  paypalValidTint: String(branding.paypalValidTint),
10291
10364
  nomupayFormStyle: branding.nomupayFormStyle,
10292
10365
  nomupayShowLabels: String(branding.nomupayShowLabels),
@@ -10674,6 +10747,26 @@ function parseImportedBranding(raw) {
10674
10747
  CARD_FOCUS_RINGS,
10675
10748
  dflt.mollieFocusRing
10676
10749
  ),
10750
+ micropaymentFieldChrome: pickEnum(
10751
+ root["micropaymentFieldChrome"],
10752
+ CARD_FIELD_CHROMES,
10753
+ dflt.micropaymentFieldChrome
10754
+ ),
10755
+ micropaymentFieldFontSize: pickEnum(
10756
+ root["micropaymentFieldFontSize"],
10757
+ CARD_FIELD_FONT_SIZES,
10758
+ dflt.micropaymentFieldFontSize
10759
+ ),
10760
+ micropaymentFieldWeight: pickEnum(
10761
+ root["micropaymentFieldWeight"],
10762
+ CARD_FIELD_WEIGHTS,
10763
+ dflt.micropaymentFieldWeight
10764
+ ),
10765
+ micropaymentFocusRing: pickEnum(
10766
+ root["micropaymentFocusRing"],
10767
+ CARD_FOCUS_RINGS,
10768
+ dflt.micropaymentFocusRing
10769
+ ),
10677
10770
  paypalValidTint: parseBool(root["paypalValidTint"], dflt.paypalValidTint),
10678
10771
  nomupayFormStyle: pickEnum(
10679
10772
  root["nomupayFormStyle"],
@@ -11221,6 +11314,24 @@ var CheckoutSession = class {
11221
11314
  headers: this.bearerHeaders(options?.headers)
11222
11315
  });
11223
11316
  }
11317
+ /**
11318
+ * Mint the security-code form for a saved card, on a shop whose vault keeps
11319
+ * the code itself (Enigma Vault). The buyer re-enters the code into the
11320
+ * vault's own form, so it never reaches the checkout; confirm with the saved
11321
+ * card's `payment_token` once the form reports it stored.
11322
+ *
11323
+ * `paymentToken` is the saved card's token from the payment-method list. A
11324
+ * VGS shop answers `400`: VGS re-collects the code with Collect.
11325
+ *
11326
+ * `GET /payment-link/{merchantId}/{paymentId}/vault/security-code-session`
11327
+ */
11328
+ async vaultSecurityCodeSession(paymentToken, options) {
11329
+ return this.client.request("GET", `${this.linkBase}/vault/security-code-session`, {
11330
+ ...options,
11331
+ query: { payment_token: paymentToken },
11332
+ headers: this.bearerHeaders(options?.headers)
11333
+ });
11334
+ }
11224
11335
  /**
11225
11336
  * Register the aliased card as a payment method and mint the one-shot
11226
11337
  * `payment_token` the confirm call spends.
@@ -11247,7 +11358,9 @@ var CheckoutSession = class {
11247
11358
  *
11248
11359
  * The router judges the card's issuing country and the buyer's IP country
11249
11360
  * against the shop's sell-to restrictions before Stripe authorises, and a
11250
- * refusal throws a `DelopayError` with code `DE_10`. When the answer's
11361
+ * refusal throws a `DelopayError` with code `DE_10`. A buyer on the
11362
+ * merchant's buyer blocklist is refused before any Stripe call with code
11363
+ * `DE_14` (`buyer_blocked`, 422), which names no entry. When the answer's
11251
11364
  * `status` is `requires_action`, run `stripe.handleNextAction` with its
11252
11365
  * `client_secret` — safe, because the intent is `confirmation_method=manual`
11253
11366
  * and that secret confirms nothing without the secret key — then call this
@@ -11847,6 +11960,7 @@ export {
11847
11960
  Regions,
11848
11961
  AvailabilityOverrides,
11849
11962
  SellToRestrictions,
11963
+ BuyerBlocklist,
11850
11964
  CheckoutRecovery,
11851
11965
  CostRules,
11852
11966
  ExternalRecords,
@@ -12052,4 +12166,4 @@ export {
12052
12166
  decodeNativePanes,
12053
12167
  encodeNativePanes
12054
12168
  };
12055
- //# sourceMappingURL=chunk-YI6NOPLG.js.map
12169
+ //# sourceMappingURL=chunk-ILCBRQSO.js.map