@delopay/sdk 0.323.0 → 0.329.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) {
@@ -2343,6 +2322,14 @@ var Events = class {
2343
2322
  async list(merchantId, params) {
2344
2323
  return this.request("POST", `/events/${encodeURIComponent(merchantId)}`, { body: params });
2345
2324
  }
2325
+ /**
2326
+ * Every delivery attempt of one event, initial attempt first.
2327
+ * `GET /events/{merchant_id}/{event_id}/attempts`
2328
+ *
2329
+ * Each entry describes one attempt: `attempt_delivered` is that attempt's own
2330
+ * result, while `is_delivery_successful` and `delivery_terminal_reason` are
2331
+ * the event's and read the same on every entry.
2332
+ */
2346
2333
  async listDeliveryAttempts(merchantId, eventId) {
2347
2334
  return this.request(
2348
2335
  "GET",
@@ -3936,6 +3923,30 @@ var Refunds = class {
3936
3923
  async list(params) {
3937
3924
  return this.request("POST", "/refunds/list", { body: params });
3938
3925
  }
3926
+ /**
3927
+ * Every identifier a block of each selected refund's buyer would name,
3928
+ * changing nothing: the payment's email and customer id, and every IP
3929
+ * address and device id seen on its checkout, each with where it was seen
3930
+ * and whether it is already blocked. Name the refunds by `ids` or by the
3931
+ * list's `filters`, exactly one of the two; at most `max_refunds` are read.
3932
+ *
3933
+ * `POST /refunds/bulk/block-buyer/preview`. Needs a dashboard JWT.
3934
+ */
3935
+ async bulkBlockPreview(request) {
3936
+ return this.request("POST", "/refunds/bulk/block-buyer/preview", { body: request });
3937
+ }
3938
+ /**
3939
+ * Add the buyer of each listed refund's payment to the buyer blocklist with
3940
+ * the chosen `kinds`, leaving out the `exclude`d identifiers, at most the
3941
+ * preview's `max_run_refunds` per call. The server reads each payment again;
3942
+ * it never blocks a value the request names. Identifiers already blocked
3943
+ * are not added again, and every refund gets its own result.
3944
+ *
3945
+ * `POST /refunds/bulk/block-buyer`. Needs a dashboard JWT.
3946
+ */
3947
+ async bulkBlockBuyer(request) {
3948
+ return this.request("POST", "/refunds/bulk/block-buyer", { body: request });
3949
+ }
3939
3950
  // --- OLAP extensions (Task 4.3) ---
3940
3951
  /**
3941
3952
  * Refund requests buyers raised from the customer portal, newest first.
@@ -6709,6 +6720,72 @@ var BuyerBlocklist = class {
6709
6720
  body: params ?? {}
6710
6721
  });
6711
6722
  }
6723
+ /**
6724
+ * Block the buyer of a payment by the identifiers the payment carries:
6725
+ * its card (the Stripe fingerprint), email, IP, device or customer, in the
6726
+ * payment's shop or in every shop.
6727
+ * `POST /buyer-blocklist/from-payment`
6728
+ */
6729
+ async createFromPayment(params) {
6730
+ return this.request("POST", "/buyer-blocklist/from-payment", { body: params });
6731
+ }
6732
+ /**
6733
+ * Retry now every failed or pending Radar sync of an entry.
6734
+ * `POST /buyer-blocklist/{entry_id}/sync/retry`
6735
+ */
6736
+ async retrySync(entryId) {
6737
+ return this.request("POST", `/buyer-blocklist/${encodeURIComponent(entryId)}/sync/retry`);
6738
+ }
6739
+ /**
6740
+ * The Radar sync settings of every Stripe connection the caller sees. A
6741
+ * role that hides processor names is refused (403).
6742
+ * `GET /buyer-blocklist/radar-sync`
6743
+ */
6744
+ async listRadarSync() {
6745
+ return this.request("GET", "/buyer-blocklist/radar-sync");
6746
+ }
6747
+ /**
6748
+ * The Radar sync settings of one Stripe connection.
6749
+ * `GET /buyer-blocklist/radar-sync/{merchant_connector_id}`
6750
+ */
6751
+ async retrieveRadarSync(merchantConnectorId) {
6752
+ return this.request(
6753
+ "GET",
6754
+ `/buyer-blocklist/radar-sync/${encodeURIComponent(merchantConnectorId)}`
6755
+ );
6756
+ }
6757
+ /**
6758
+ * Turn Radar sync on or off for one Stripe connection and set what an
6759
+ * early fraud warning or a review does.
6760
+ * `PUT /buyer-blocklist/radar-sync/{merchant_connector_id}`
6761
+ */
6762
+ async updateRadarSync(merchantConnectorId, params) {
6763
+ return this.request(
6764
+ "PUT",
6765
+ `/buyer-blocklist/radar-sync/${encodeURIComponent(merchantConnectorId)}`,
6766
+ { body: params }
6767
+ );
6768
+ }
6769
+ /**
6770
+ * Remove every item DeloPay synced from this connection's Radar lists. The
6771
+ * lists themselves are kept.
6772
+ * `POST /buyer-blocklist/radar-sync/{merchant_connector_id}/remove-items`
6773
+ */
6774
+ async removeRadarItems(merchantConnectorId) {
6775
+ return this.request(
6776
+ "POST",
6777
+ `/buyer-blocklist/radar-sync/${encodeURIComponent(merchantConnectorId)}/remove-items`
6778
+ );
6779
+ }
6780
+ /**
6781
+ * Stripe's fraud signals on a payment (risk, early fraud warnings,
6782
+ * reviews), what of its buyer can be blocked, and the entries that
6783
+ * already match it.
6784
+ * `GET /buyer-blocklist/fraud-signals/{payment_id}`
6785
+ */
6786
+ async fraudSignals(paymentId) {
6787
+ return this.request("GET", `/buyer-blocklist/fraud-signals/${encodeURIComponent(paymentId)}`);
6788
+ }
6712
6789
  };
6713
6790
 
6714
6791
  // src/resources/shopLabels.ts
@@ -10686,7 +10763,6 @@ var Delopay = class {
10686
10763
  this.users = new Users(request);
10687
10764
  this.apiKeys = new ApiKeys(request);
10688
10765
  this.billing = new Billing(request);
10689
- this.blocklist = new Blocklist(request);
10690
10766
  this.fees = new Fees(request);
10691
10767
  this.merchantAccounts = new MerchantAccounts(request);
10692
10768
  this.projects = new Projects(request);