@delopay/sdk 0.322.0 → 0.326.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.js CHANGED
@@ -262,7 +262,7 @@ import {
262
262
  visibleCustomFields,
263
263
  whopAccentSwatch,
264
264
  whopCardElement
265
- } from "./chunk-SKSZ6A5U.js";
265
+ } from "./chunk-DB725WRJ.js";
266
266
  export {
267
267
  AIRWALLEX_AUTOFILL_TREATMENTS,
268
268
  AIRWALLEX_CARD_LAYOUTS,
package/dist/internal.cjs CHANGED
@@ -833,27 +833,6 @@ var Billing = class {
833
833
  }
834
834
  };
835
835
 
836
- // src/resources/blocklist.ts
837
- var Blocklist = class {
838
- constructor(request) {
839
- this.request = request;
840
- }
841
- async add(params) {
842
- return this.request("POST", "/blocklist", { body: params });
843
- }
844
- async remove(params) {
845
- return this.request("DELETE", "/blocklist", { body: params });
846
- }
847
- async list(params) {
848
- return this.request("GET", "/blocklist", {
849
- query: params
850
- });
851
- }
852
- async toggle(params) {
853
- return this.request("POST", "/blocklist/toggle", { body: params });
854
- }
855
- };
856
-
857
836
  // src/resources/connectors.ts
858
837
  var Connectors = class {
859
838
  constructor(request) {
@@ -3954,6 +3933,30 @@ var Refunds = class {
3954
3933
  async list(params) {
3955
3934
  return this.request("POST", "/refunds/list", { body: params });
3956
3935
  }
3936
+ /**
3937
+ * Every identifier a block of each selected refund's buyer would name,
3938
+ * changing nothing: the payment's email and customer id, and every IP
3939
+ * address and device id seen on its checkout, each with where it was seen
3940
+ * and whether it is already blocked. Name the refunds by `ids` or by the
3941
+ * list's `filters`, exactly one of the two; at most `max_refunds` are read.
3942
+ *
3943
+ * `POST /refunds/bulk/block-buyer/preview`. Needs a dashboard JWT.
3944
+ */
3945
+ async bulkBlockPreview(request) {
3946
+ return this.request("POST", "/refunds/bulk/block-buyer/preview", { body: request });
3947
+ }
3948
+ /**
3949
+ * Add the buyer of each listed refund's payment to the buyer blocklist with
3950
+ * the chosen `kinds`, leaving out the `exclude`d identifiers, at most the
3951
+ * preview's `max_run_refunds` per call. The server reads each payment again;
3952
+ * it never blocks a value the request names. Identifiers already blocked
3953
+ * are not added again, and every refund gets its own result.
3954
+ *
3955
+ * `POST /refunds/bulk/block-buyer`. Needs a dashboard JWT.
3956
+ */
3957
+ async bulkBlockBuyer(request) {
3958
+ return this.request("POST", "/refunds/bulk/block-buyer", { body: request });
3959
+ }
3957
3960
  // --- OLAP extensions (Task 4.3) ---
3958
3961
  /**
3959
3962
  * Refund requests buyers raised from the customer portal, newest first.
@@ -4528,7 +4531,8 @@ var CheckoutThemeConversion = class {
4528
4531
  * that governs seeing how a checkout looks.
4529
4532
  *
4530
4533
  * @param params - Window (RFC3339, `start` inclusive / `end` exclusive), the
4531
- * shop, and the dimension to group by.
4534
+ * shop, the dimension to group by, and the optional `device_class`,
4535
+ * `country` and `selection` filters.
4532
4536
  *
4533
4537
  * @example Which variant wins on which device, over the last 30 days.
4534
4538
  * ```typescript
@@ -4551,7 +4555,10 @@ var CheckoutThemeConversion = class {
4551
4555
  profile_id: params.profile_id,
4552
4556
  start: params.start,
4553
4557
  end: params.end,
4554
- segment: params.segment
4558
+ segment: params.segment,
4559
+ device_class: params.device_class ?? void 0,
4560
+ country: params.country ?? void 0,
4561
+ selection: params.selection ?? void 0
4555
4562
  }
4556
4563
  });
4557
4564
  }
@@ -6723,6 +6730,72 @@ var BuyerBlocklist = class {
6723
6730
  body: params ?? {}
6724
6731
  });
6725
6732
  }
6733
+ /**
6734
+ * Block the buyer of a payment by the identifiers the payment carries:
6735
+ * its card (the Stripe fingerprint), email, IP, device or customer, in the
6736
+ * payment's shop or in every shop.
6737
+ * `POST /buyer-blocklist/from-payment`
6738
+ */
6739
+ async createFromPayment(params) {
6740
+ return this.request("POST", "/buyer-blocklist/from-payment", { body: params });
6741
+ }
6742
+ /**
6743
+ * Retry now every failed or pending Radar sync of an entry.
6744
+ * `POST /buyer-blocklist/{entry_id}/sync/retry`
6745
+ */
6746
+ async retrySync(entryId) {
6747
+ return this.request("POST", `/buyer-blocklist/${encodeURIComponent(entryId)}/sync/retry`);
6748
+ }
6749
+ /**
6750
+ * The Radar sync settings of every Stripe connection the caller sees. A
6751
+ * role that hides processor names is refused (403).
6752
+ * `GET /buyer-blocklist/radar-sync`
6753
+ */
6754
+ async listRadarSync() {
6755
+ return this.request("GET", "/buyer-blocklist/radar-sync");
6756
+ }
6757
+ /**
6758
+ * The Radar sync settings of one Stripe connection.
6759
+ * `GET /buyer-blocklist/radar-sync/{merchant_connector_id}`
6760
+ */
6761
+ async retrieveRadarSync(merchantConnectorId) {
6762
+ return this.request(
6763
+ "GET",
6764
+ `/buyer-blocklist/radar-sync/${encodeURIComponent(merchantConnectorId)}`
6765
+ );
6766
+ }
6767
+ /**
6768
+ * Turn Radar sync on or off for one Stripe connection and set what an
6769
+ * early fraud warning or a review does.
6770
+ * `PUT /buyer-blocklist/radar-sync/{merchant_connector_id}`
6771
+ */
6772
+ async updateRadarSync(merchantConnectorId, params) {
6773
+ return this.request(
6774
+ "PUT",
6775
+ `/buyer-blocklist/radar-sync/${encodeURIComponent(merchantConnectorId)}`,
6776
+ { body: params }
6777
+ );
6778
+ }
6779
+ /**
6780
+ * Remove every item DeloPay synced from this connection's Radar lists. The
6781
+ * lists themselves are kept.
6782
+ * `POST /buyer-blocklist/radar-sync/{merchant_connector_id}/remove-items`
6783
+ */
6784
+ async removeRadarItems(merchantConnectorId) {
6785
+ return this.request(
6786
+ "POST",
6787
+ `/buyer-blocklist/radar-sync/${encodeURIComponent(merchantConnectorId)}/remove-items`
6788
+ );
6789
+ }
6790
+ /**
6791
+ * Stripe's fraud signals on a payment (risk, early fraud warnings,
6792
+ * reviews), what of its buyer can be blocked, and the entries that
6793
+ * already match it.
6794
+ * `GET /buyer-blocklist/fraud-signals/{payment_id}`
6795
+ */
6796
+ async fraudSignals(paymentId) {
6797
+ return this.request("GET", `/buyer-blocklist/fraud-signals/${encodeURIComponent(paymentId)}`);
6798
+ }
6726
6799
  };
6727
6800
 
6728
6801
  // src/resources/shopLabels.ts
@@ -10700,7 +10773,6 @@ var Delopay = class {
10700
10773
  this.users = new Users(request);
10701
10774
  this.apiKeys = new ApiKeys(request);
10702
10775
  this.billing = new Billing(request);
10703
- this.blocklist = new Blocklist(request);
10704
10776
  this.fees = new Fees(request);
10705
10777
  this.merchantAccounts = new MerchantAccounts(request);
10706
10778
  this.projects = new Projects(request);