@delopay/sdk 0.226.0 → 0.227.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/index.d.cts CHANGED
@@ -10149,13 +10149,17 @@ interface SellToRestrictionCapabilitiesResponse {
10149
10149
  rails: SellToRestrictionRailCapability[];
10150
10150
  }
10151
10151
  /**
10152
- * What a buyer blocklist entry matches: the buyer's email address (compared
10153
- * without surrounding spaces and without regard to case), one IPv4 or IPv6
10154
- * address (equivalent notations are one entry), or a customer id. A
10155
- * `customer_id` entry always names a shop, because a customer id is unique
10156
- * inside one shop only.
10157
- */
10158
- type BuyerBlocklistKind = 'email' | 'ip' | 'customer_id';
10152
+ * A kind of identifier a buyer blocklist entry can name: the buyer's email
10153
+ * address (compared without surrounding spaces and without regard to case),
10154
+ * one IPv4 or IPv6 address (equivalent notations are one address), a customer
10155
+ * id, or DeloPay's device identifier (`device_id`, as shown on a payment's
10156
+ * device details; the signature after the last `.` may be left out). An entry
10157
+ * naming a `customer_id` always names a shop, because a customer id is unique
10158
+ * inside one shop only. A `device_id` is matched when the buyer opens the
10159
+ * hosted checkout and when the buyer's browser confirms; a merchant's
10160
+ * server-side create carries none.
10161
+ */
10162
+ type BuyerBlocklistKind = 'email' | 'ip' | 'customer_id' | 'device_id';
10159
10163
  /**
10160
10164
  * Which entries {@link BuyerBlocklist.list} returns: the entries that block in
10161
10165
  * every shop together with every shop's own entries (`all`), only the entries
@@ -10172,24 +10176,51 @@ interface BuyerBlocklistListQuery {
10172
10176
  scope?: BuyerBlocklistListScope | null;
10173
10177
  /** The shop to list, with `scope: 'shop'`. */
10174
10178
  profile_id?: string | null;
10175
- /** Only entries of this kind. */
10179
+ /**
10180
+ * Only entries that include an identifier of this kind, whatever else they
10181
+ * name: `email` also lists an entry naming an email together with an IP.
10182
+ */
10176
10183
  kind?: BuyerBlocklistKind | null;
10177
- /** Matches the blocked value or the note, ignoring case. */
10184
+ /** Matches any of the entry's identifiers or its note, ignoring case. */
10178
10185
  search?: string | null;
10179
10186
  /** Page size, 1 to 100. Defaults to 20. */
10180
10187
  limit?: number | null;
10181
10188
  /** How many entries to skip. Defaults to 0. */
10182
10189
  offset?: number | null;
10183
10190
  }
10184
- /** Body of {@link BuyerBlocklist.create}: block a buyer. */
10191
+ /**
10192
+ * Body of {@link BuyerBlocklist.create}: block a buyer, named by one or more
10193
+ * identifiers. The entry blocks a payment when any one of them matches. At
10194
+ * least one of `email`, `ip`, `customer_id` and `device_id` is required, and
10195
+ * each identifier may be named by only one entry in the same scope.
10196
+ */
10185
10197
  interface BuyerBlocklistEntryCreateRequest {
10186
- kind: BuyerBlocklistKind;
10187
- /** The email address, IP address or customer id to block. */
10188
- value: string;
10198
+ /** The buyer's email address. */
10199
+ email?: string | null;
10200
+ /** One IPv4 or IPv6 address of the buyer. */
10201
+ ip?: string | null;
10202
+ /** A customer id of the shop named in `profile_id`. */
10203
+ customer_id?: string | null;
10204
+ /** DeloPay's device identifier of the buyer's browser. */
10205
+ device_id?: string | null;
10206
+ /**
10207
+ * One identifier as `kind` and `value`, sent together. When given, it is
10208
+ * added to the identifier fields, and refused when it disagrees with the
10209
+ * field of its kind.
10210
+ *
10211
+ * @deprecated Use `email`, `ip`, `customer_id` or `device_id` instead.
10212
+ */
10213
+ kind?: BuyerBlocklistKind | null;
10214
+ /**
10215
+ * The identifier named by `kind`, sent together with it.
10216
+ *
10217
+ * @deprecated Use `email`, `ip`, `customer_id` or `device_id` instead.
10218
+ */
10219
+ value?: string | null;
10189
10220
  /**
10190
10221
  * The shop the entry blocks in. Omitted, the entry blocks in every shop of
10191
- * the merchant, which a `customer_id` entry cannot, and which only a
10192
- * merchant role may add.
10222
+ * the merchant, which an entry naming a `customer_id` cannot, and which only
10223
+ * a merchant role may add.
10193
10224
  */
10194
10225
  profile_id?: string | null;
10195
10226
  /**
@@ -10209,11 +10240,32 @@ interface BuyerBlocklistEntryDeleteRequest {
10209
10240
  /** Why the buyer is unblocked, kept in the audit log. At most 1024 characters. */
10210
10241
  reason?: string | null;
10211
10242
  }
10212
- /** One blocked buyer. */
10243
+ /**
10244
+ * One blocked buyer. The entry blocks a payment when any one of its
10245
+ * identifiers matches; at least one of them is not `null`.
10246
+ */
10213
10247
  interface BuyerBlocklistEntryResponse {
10214
10248
  id: string;
10249
+ /** The buyer's email address, normalised as it is matched. `null` when the entry names none. */
10250
+ email: string | null;
10251
+ /** The buyer's IP address in canonical form. `null` when the entry names none. */
10252
+ ip: string | null;
10253
+ /** The blocked customer id. `null` when the entry names none. */
10254
+ customer_id: string | null;
10255
+ /** The blocked device identifier, without its signature. `null` when the entry names none. */
10256
+ device_id: string | null;
10257
+ /**
10258
+ * The kind of the entry's first identifier, in the order `customer_id`,
10259
+ * `email`, `ip`, `device_id`.
10260
+ *
10261
+ * @deprecated Read `email`, `ip`, `customer_id` and `device_id` instead.
10262
+ */
10215
10263
  kind: BuyerBlocklistKind;
10216
- /** The blocked value, normalised as it is matched. */
10264
+ /**
10265
+ * The entry's first identifier (see `kind`), normalised as it is matched.
10266
+ *
10267
+ * @deprecated Read `email`, `ip`, `customer_id` and `device_id` instead.
10268
+ */
10217
10269
  value: string;
10218
10270
  /** The shop the entry blocks in. `null` when it blocks in every shop. */
10219
10271
  profile_id: string | null;
@@ -20041,9 +20093,11 @@ declare class SellToRestrictions {
20041
20093
  }
20042
20094
 
20043
20095
  /**
20044
- * Buyer blocklist: the buyers a merchant refuses to sell to again, by email
20045
- * address, IP address or customer id, in every shop of the merchant or in one
20046
- * shop. A blocked buyer's hosted checkout and confirms fail with error code
20096
+ * Buyer blocklist: the buyers a merchant refuses to sell to again, in every
20097
+ * shop of the merchant or in one shop. One entry names the buyer by email
20098
+ * address, IP address, customer id and device id, at most one of each and at
20099
+ * least one in total, and blocks a payment when any one of them matches. A
20100
+ * blocked buyer's hosted checkout and confirms fail with error code
20047
20101
  * `DE_14`, and the payments create response marks the buyer with
20048
20102
  * `buyer_blocked` and the entry's `buyer_block_note`. This is not the card
20049
20103
  * blocklist (`client.blocklist`), which is a separate list.
@@ -20057,16 +20111,18 @@ declare class BuyerBlocklist {
20057
20111
  private readonly request;
20058
20112
  constructor(request: RequestFn);
20059
20113
  /**
20060
- * One page of blocked buyers, newest first, filtered by scope, kind and a
20061
- * search over the value and the note. Expired entries are not listed.
20114
+ * One page of blocked buyers, newest first, filtered by scope, by `kind`
20115
+ * (the entries that include an identifier of that kind) and by a search
20116
+ * over every identifier and the note. Expired entries are not listed.
20062
20117
  * `GET /buyer-blocklist`
20063
20118
  */
20064
20119
  list(params?: BuyerBlocklistListQuery): Promise<BuyerBlocklistListResponse>;
20065
20120
  /**
20066
20121
  * Block a buyer in one shop or, without `profile_id`, in every shop of the
20067
- * merchant. The value is normalised as it is matched; a value already
20068
- * blocked in that scope is refused. The change is recorded in the audit log
20069
- * before it is made.
20122
+ * merchant, named by one or more of `email`, `ip`, `customer_id` and
20123
+ * `device_id`. Each identifier is normalised as it is matched; an
20124
+ * identifier another entry already names in that scope is refused. The
20125
+ * change is recorded in the audit log before it is made.
20070
20126
  * `POST /buyer-blocklist`
20071
20127
  */
20072
20128
  create(params: BuyerBlocklistEntryCreateRequest): Promise<BuyerBlocklistEntryResponse>;
package/dist/index.d.ts CHANGED
@@ -10149,13 +10149,17 @@ interface SellToRestrictionCapabilitiesResponse {
10149
10149
  rails: SellToRestrictionRailCapability[];
10150
10150
  }
10151
10151
  /**
10152
- * What a buyer blocklist entry matches: the buyer's email address (compared
10153
- * without surrounding spaces and without regard to case), one IPv4 or IPv6
10154
- * address (equivalent notations are one entry), or a customer id. A
10155
- * `customer_id` entry always names a shop, because a customer id is unique
10156
- * inside one shop only.
10157
- */
10158
- type BuyerBlocklistKind = 'email' | 'ip' | 'customer_id';
10152
+ * A kind of identifier a buyer blocklist entry can name: the buyer's email
10153
+ * address (compared without surrounding spaces and without regard to case),
10154
+ * one IPv4 or IPv6 address (equivalent notations are one address), a customer
10155
+ * id, or DeloPay's device identifier (`device_id`, as shown on a payment's
10156
+ * device details; the signature after the last `.` may be left out). An entry
10157
+ * naming a `customer_id` always names a shop, because a customer id is unique
10158
+ * inside one shop only. A `device_id` is matched when the buyer opens the
10159
+ * hosted checkout and when the buyer's browser confirms; a merchant's
10160
+ * server-side create carries none.
10161
+ */
10162
+ type BuyerBlocklistKind = 'email' | 'ip' | 'customer_id' | 'device_id';
10159
10163
  /**
10160
10164
  * Which entries {@link BuyerBlocklist.list} returns: the entries that block in
10161
10165
  * every shop together with every shop's own entries (`all`), only the entries
@@ -10172,24 +10176,51 @@ interface BuyerBlocklistListQuery {
10172
10176
  scope?: BuyerBlocklistListScope | null;
10173
10177
  /** The shop to list, with `scope: 'shop'`. */
10174
10178
  profile_id?: string | null;
10175
- /** Only entries of this kind. */
10179
+ /**
10180
+ * Only entries that include an identifier of this kind, whatever else they
10181
+ * name: `email` also lists an entry naming an email together with an IP.
10182
+ */
10176
10183
  kind?: BuyerBlocklistKind | null;
10177
- /** Matches the blocked value or the note, ignoring case. */
10184
+ /** Matches any of the entry's identifiers or its note, ignoring case. */
10178
10185
  search?: string | null;
10179
10186
  /** Page size, 1 to 100. Defaults to 20. */
10180
10187
  limit?: number | null;
10181
10188
  /** How many entries to skip. Defaults to 0. */
10182
10189
  offset?: number | null;
10183
10190
  }
10184
- /** Body of {@link BuyerBlocklist.create}: block a buyer. */
10191
+ /**
10192
+ * Body of {@link BuyerBlocklist.create}: block a buyer, named by one or more
10193
+ * identifiers. The entry blocks a payment when any one of them matches. At
10194
+ * least one of `email`, `ip`, `customer_id` and `device_id` is required, and
10195
+ * each identifier may be named by only one entry in the same scope.
10196
+ */
10185
10197
  interface BuyerBlocklistEntryCreateRequest {
10186
- kind: BuyerBlocklistKind;
10187
- /** The email address, IP address or customer id to block. */
10188
- value: string;
10198
+ /** The buyer's email address. */
10199
+ email?: string | null;
10200
+ /** One IPv4 or IPv6 address of the buyer. */
10201
+ ip?: string | null;
10202
+ /** A customer id of the shop named in `profile_id`. */
10203
+ customer_id?: string | null;
10204
+ /** DeloPay's device identifier of the buyer's browser. */
10205
+ device_id?: string | null;
10206
+ /**
10207
+ * One identifier as `kind` and `value`, sent together. When given, it is
10208
+ * added to the identifier fields, and refused when it disagrees with the
10209
+ * field of its kind.
10210
+ *
10211
+ * @deprecated Use `email`, `ip`, `customer_id` or `device_id` instead.
10212
+ */
10213
+ kind?: BuyerBlocklistKind | null;
10214
+ /**
10215
+ * The identifier named by `kind`, sent together with it.
10216
+ *
10217
+ * @deprecated Use `email`, `ip`, `customer_id` or `device_id` instead.
10218
+ */
10219
+ value?: string | null;
10189
10220
  /**
10190
10221
  * The shop the entry blocks in. Omitted, the entry blocks in every shop of
10191
- * the merchant, which a `customer_id` entry cannot, and which only a
10192
- * merchant role may add.
10222
+ * the merchant, which an entry naming a `customer_id` cannot, and which only
10223
+ * a merchant role may add.
10193
10224
  */
10194
10225
  profile_id?: string | null;
10195
10226
  /**
@@ -10209,11 +10240,32 @@ interface BuyerBlocklistEntryDeleteRequest {
10209
10240
  /** Why the buyer is unblocked, kept in the audit log. At most 1024 characters. */
10210
10241
  reason?: string | null;
10211
10242
  }
10212
- /** One blocked buyer. */
10243
+ /**
10244
+ * One blocked buyer. The entry blocks a payment when any one of its
10245
+ * identifiers matches; at least one of them is not `null`.
10246
+ */
10213
10247
  interface BuyerBlocklistEntryResponse {
10214
10248
  id: string;
10249
+ /** The buyer's email address, normalised as it is matched. `null` when the entry names none. */
10250
+ email: string | null;
10251
+ /** The buyer's IP address in canonical form. `null` when the entry names none. */
10252
+ ip: string | null;
10253
+ /** The blocked customer id. `null` when the entry names none. */
10254
+ customer_id: string | null;
10255
+ /** The blocked device identifier, without its signature. `null` when the entry names none. */
10256
+ device_id: string | null;
10257
+ /**
10258
+ * The kind of the entry's first identifier, in the order `customer_id`,
10259
+ * `email`, `ip`, `device_id`.
10260
+ *
10261
+ * @deprecated Read `email`, `ip`, `customer_id` and `device_id` instead.
10262
+ */
10215
10263
  kind: BuyerBlocklistKind;
10216
- /** The blocked value, normalised as it is matched. */
10264
+ /**
10265
+ * The entry's first identifier (see `kind`), normalised as it is matched.
10266
+ *
10267
+ * @deprecated Read `email`, `ip`, `customer_id` and `device_id` instead.
10268
+ */
10217
10269
  value: string;
10218
10270
  /** The shop the entry blocks in. `null` when it blocks in every shop. */
10219
10271
  profile_id: string | null;
@@ -20041,9 +20093,11 @@ declare class SellToRestrictions {
20041
20093
  }
20042
20094
 
20043
20095
  /**
20044
- * Buyer blocklist: the buyers a merchant refuses to sell to again, by email
20045
- * address, IP address or customer id, in every shop of the merchant or in one
20046
- * shop. A blocked buyer's hosted checkout and confirms fail with error code
20096
+ * Buyer blocklist: the buyers a merchant refuses to sell to again, in every
20097
+ * shop of the merchant or in one shop. One entry names the buyer by email
20098
+ * address, IP address, customer id and device id, at most one of each and at
20099
+ * least one in total, and blocks a payment when any one of them matches. A
20100
+ * blocked buyer's hosted checkout and confirms fail with error code
20047
20101
  * `DE_14`, and the payments create response marks the buyer with
20048
20102
  * `buyer_blocked` and the entry's `buyer_block_note`. This is not the card
20049
20103
  * blocklist (`client.blocklist`), which is a separate list.
@@ -20057,16 +20111,18 @@ declare class BuyerBlocklist {
20057
20111
  private readonly request;
20058
20112
  constructor(request: RequestFn);
20059
20113
  /**
20060
- * One page of blocked buyers, newest first, filtered by scope, kind and a
20061
- * search over the value and the note. Expired entries are not listed.
20114
+ * One page of blocked buyers, newest first, filtered by scope, by `kind`
20115
+ * (the entries that include an identifier of that kind) and by a search
20116
+ * over every identifier and the note. Expired entries are not listed.
20062
20117
  * `GET /buyer-blocklist`
20063
20118
  */
20064
20119
  list(params?: BuyerBlocklistListQuery): Promise<BuyerBlocklistListResponse>;
20065
20120
  /**
20066
20121
  * Block a buyer in one shop or, without `profile_id`, in every shop of the
20067
- * merchant. The value is normalised as it is matched; a value already
20068
- * blocked in that scope is refused. The change is recorded in the audit log
20069
- * before it is made.
20122
+ * merchant, named by one or more of `email`, `ip`, `customer_id` and
20123
+ * `device_id`. Each identifier is normalised as it is matched; an
20124
+ * identifier another entry already names in that scope is refused. The
20125
+ * change is recorded in the audit log before it is made.
20070
20126
  * `POST /buyer-blocklist`
20071
20127
  */
20072
20128
  create(params: BuyerBlocklistEntryCreateRequest): Promise<BuyerBlocklistEntryResponse>;
package/dist/index.js CHANGED
@@ -222,7 +222,7 @@ import {
222
222
  validatePanes,
223
223
  verticalGapValue,
224
224
  visibleCustomFields
225
- } from "./chunk-ILCBRQSO.js";
225
+ } from "./chunk-J6JKP5UX.js";
226
226
  export {
227
227
  AIRWALLEX_AUTOFILL_TREATMENTS,
228
228
  AIRWALLEX_CARD_LAYOUTS,
package/dist/internal.cjs CHANGED
@@ -5391,8 +5391,9 @@ var BuyerBlocklist = class {
5391
5391
  this.request = request;
5392
5392
  }
5393
5393
  /**
5394
- * One page of blocked buyers, newest first, filtered by scope, kind and a
5395
- * search over the value and the note. Expired entries are not listed.
5394
+ * One page of blocked buyers, newest first, filtered by scope, by `kind`
5395
+ * (the entries that include an identifier of that kind) and by a search
5396
+ * over every identifier and the note. Expired entries are not listed.
5396
5397
  * `GET /buyer-blocklist`
5397
5398
  */
5398
5399
  async list(params) {
@@ -5402,9 +5403,10 @@ var BuyerBlocklist = class {
5402
5403
  }
5403
5404
  /**
5404
5405
  * Block a buyer in one shop or, without `profile_id`, in every shop of the
5405
- * merchant. The value is normalised as it is matched; a value already
5406
- * blocked in that scope is refused. The change is recorded in the audit log
5407
- * before it is made.
5406
+ * merchant, named by one or more of `email`, `ip`, `customer_id` and
5407
+ * `device_id`. Each identifier is normalised as it is matched; an
5408
+ * identifier another entry already names in that scope is refused. The
5409
+ * change is recorded in the audit log before it is made.
5408
5410
  * `POST /buyer-blocklist`
5409
5411
  */
5410
5412
  async create(params) {