@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.cjs CHANGED
@@ -815,27 +815,6 @@ var Billing = class {
815
815
  }
816
816
  };
817
817
 
818
- // src/resources/blocklist.ts
819
- var Blocklist = class {
820
- constructor(request) {
821
- this.request = request;
822
- }
823
- async add(params) {
824
- return this.request("POST", "/blocklist", { body: params });
825
- }
826
- async remove(params) {
827
- return this.request("DELETE", "/blocklist", { body: params });
828
- }
829
- async list(params) {
830
- return this.request("GET", "/blocklist", {
831
- query: params
832
- });
833
- }
834
- async toggle(params) {
835
- return this.request("POST", "/blocklist/toggle", { body: params });
836
- }
837
- };
838
-
839
818
  // src/resources/connectors.ts
840
819
  var Connectors = class {
841
820
  constructor(request) {
@@ -3936,6 +3915,30 @@ var Refunds = class {
3936
3915
  async list(params) {
3937
3916
  return this.request("POST", "/refunds/list", { body: params });
3938
3917
  }
3918
+ /**
3919
+ * Every identifier a block of each selected refund's buyer would name,
3920
+ * changing nothing: the payment's email and customer id, and every IP
3921
+ * address and device id seen on its checkout, each with where it was seen
3922
+ * and whether it is already blocked. Name the refunds by `ids` or by the
3923
+ * list's `filters`, exactly one of the two; at most `max_refunds` are read.
3924
+ *
3925
+ * `POST /refunds/bulk/block-buyer/preview`. Needs a dashboard JWT.
3926
+ */
3927
+ async bulkBlockPreview(request) {
3928
+ return this.request("POST", "/refunds/bulk/block-buyer/preview", { body: request });
3929
+ }
3930
+ /**
3931
+ * Add the buyer of each listed refund's payment to the buyer blocklist with
3932
+ * the chosen `kinds`, leaving out the `exclude`d identifiers, at most the
3933
+ * preview's `max_run_refunds` per call. The server reads each payment again;
3934
+ * it never blocks a value the request names. Identifiers already blocked
3935
+ * are not added again, and every refund gets its own result.
3936
+ *
3937
+ * `POST /refunds/bulk/block-buyer`. Needs a dashboard JWT.
3938
+ */
3939
+ async bulkBlockBuyer(request) {
3940
+ return this.request("POST", "/refunds/bulk/block-buyer", { body: request });
3941
+ }
3939
3942
  // --- OLAP extensions (Task 4.3) ---
3940
3943
  /**
3941
3944
  * Refund requests buyers raised from the customer portal, newest first.
@@ -4510,7 +4513,8 @@ var CheckoutThemeConversion = class {
4510
4513
  * that governs seeing how a checkout looks.
4511
4514
  *
4512
4515
  * @param params - Window (RFC3339, `start` inclusive / `end` exclusive), the
4513
- * shop, and the dimension to group by.
4516
+ * shop, the dimension to group by, and the optional `device_class`,
4517
+ * `country` and `selection` filters.
4514
4518
  *
4515
4519
  * @example Which variant wins on which device, over the last 30 days.
4516
4520
  * ```typescript
@@ -4533,7 +4537,10 @@ var CheckoutThemeConversion = class {
4533
4537
  profile_id: params.profile_id,
4534
4538
  start: params.start,
4535
4539
  end: params.end,
4536
- segment: params.segment
4540
+ segment: params.segment,
4541
+ device_class: params.device_class ?? void 0,
4542
+ country: params.country ?? void 0,
4543
+ selection: params.selection ?? void 0
4537
4544
  }
4538
4545
  });
4539
4546
  }
@@ -6705,6 +6712,72 @@ var BuyerBlocklist = class {
6705
6712
  body: params ?? {}
6706
6713
  });
6707
6714
  }
6715
+ /**
6716
+ * Block the buyer of a payment by the identifiers the payment carries:
6717
+ * its card (the Stripe fingerprint), email, IP, device or customer, in the
6718
+ * payment's shop or in every shop.
6719
+ * `POST /buyer-blocklist/from-payment`
6720
+ */
6721
+ async createFromPayment(params) {
6722
+ return this.request("POST", "/buyer-blocklist/from-payment", { body: params });
6723
+ }
6724
+ /**
6725
+ * Retry now every failed or pending Radar sync of an entry.
6726
+ * `POST /buyer-blocklist/{entry_id}/sync/retry`
6727
+ */
6728
+ async retrySync(entryId) {
6729
+ return this.request("POST", `/buyer-blocklist/${encodeURIComponent(entryId)}/sync/retry`);
6730
+ }
6731
+ /**
6732
+ * The Radar sync settings of every Stripe connection the caller sees. A
6733
+ * role that hides processor names is refused (403).
6734
+ * `GET /buyer-blocklist/radar-sync`
6735
+ */
6736
+ async listRadarSync() {
6737
+ return this.request("GET", "/buyer-blocklist/radar-sync");
6738
+ }
6739
+ /**
6740
+ * The Radar sync settings of one Stripe connection.
6741
+ * `GET /buyer-blocklist/radar-sync/{merchant_connector_id}`
6742
+ */
6743
+ async retrieveRadarSync(merchantConnectorId) {
6744
+ return this.request(
6745
+ "GET",
6746
+ `/buyer-blocklist/radar-sync/${encodeURIComponent(merchantConnectorId)}`
6747
+ );
6748
+ }
6749
+ /**
6750
+ * Turn Radar sync on or off for one Stripe connection and set what an
6751
+ * early fraud warning or a review does.
6752
+ * `PUT /buyer-blocklist/radar-sync/{merchant_connector_id}`
6753
+ */
6754
+ async updateRadarSync(merchantConnectorId, params) {
6755
+ return this.request(
6756
+ "PUT",
6757
+ `/buyer-blocklist/radar-sync/${encodeURIComponent(merchantConnectorId)}`,
6758
+ { body: params }
6759
+ );
6760
+ }
6761
+ /**
6762
+ * Remove every item DeloPay synced from this connection's Radar lists. The
6763
+ * lists themselves are kept.
6764
+ * `POST /buyer-blocklist/radar-sync/{merchant_connector_id}/remove-items`
6765
+ */
6766
+ async removeRadarItems(merchantConnectorId) {
6767
+ return this.request(
6768
+ "POST",
6769
+ `/buyer-blocklist/radar-sync/${encodeURIComponent(merchantConnectorId)}/remove-items`
6770
+ );
6771
+ }
6772
+ /**
6773
+ * Stripe's fraud signals on a payment (risk, early fraud warnings,
6774
+ * reviews), what of its buyer can be blocked, and the entries that
6775
+ * already match it.
6776
+ * `GET /buyer-blocklist/fraud-signals/{payment_id}`
6777
+ */
6778
+ async fraudSignals(paymentId) {
6779
+ return this.request("GET", `/buyer-blocklist/fraud-signals/${encodeURIComponent(paymentId)}`);
6780
+ }
6708
6781
  };
6709
6782
 
6710
6783
  // src/resources/shopLabels.ts
@@ -10682,7 +10755,6 @@ var Delopay = class {
10682
10755
  this.users = new Users(request);
10683
10756
  this.apiKeys = new ApiKeys(request);
10684
10757
  this.billing = new Billing(request);
10685
- this.blocklist = new Blocklist(request);
10686
10758
  this.fees = new Fees(request);
10687
10759
  this.merchantAccounts = new MerchantAccounts(request);
10688
10760
  this.projects = new Projects(request);