@delopay/sdk 0.41.0 → 0.43.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.
@@ -1613,6 +1613,7 @@ var Routing = class {
1613
1613
  constructor(request) {
1614
1614
  this.request = request;
1615
1615
  this.decision = new RoutingDecisionManager(request);
1616
+ this.surchargeRules = new SurchargeRules(request);
1616
1617
  }
1617
1618
  /**
1618
1619
  * Create a new routing algorithm.
@@ -1674,6 +1675,18 @@ var Routing = class {
1674
1675
  async list() {
1675
1676
  return this.request("GET", "/routing");
1676
1677
  }
1678
+ /**
1679
+ * Connector names denied at routing for a shop (explicit denies plus
1680
+ * whitelist-implied exclusions). Read-only; surfaced in the routing builder.
1681
+ *
1682
+ * `GET /routing/connector-restrictions/{profileId}`
1683
+ */
1684
+ async connectorRestrictions(profileId) {
1685
+ return this.request(
1686
+ "GET",
1687
+ `/routing/connector-restrictions/${encodeURIComponent(profileId)}`
1688
+ );
1689
+ }
1677
1690
  // --- Advanced operations (Task 3.4) ---
1678
1691
  /** Get active routing config. `GET /routing/active` */
1679
1692
  async getActive() {
@@ -1743,6 +1756,53 @@ var RoutingDecisionManager = class {
1743
1756
  return this.request("DELETE", "/routing/decision/surcharge");
1744
1757
  }
1745
1758
  };
1759
+ var SurchargeRules = class {
1760
+ constructor(request) {
1761
+ this.request = request;
1762
+ }
1763
+ /**
1764
+ * Create or replace the surcharge program for a scope.
1765
+ *
1766
+ * `PUT /routing/surcharge/rules`
1767
+ *
1768
+ * @example
1769
+ * ```typescript
1770
+ * await delopay.routing.surchargeRules.upsert({
1771
+ * surcharges: [
1772
+ * { payment_method: 'crypto', surcharge: { rate: { percent: 1.0 } } },
1773
+ * { payment_method: 'card', surcharge: { fixed: { amount: 35 } } },
1774
+ * ],
1775
+ * });
1776
+ * ```
1777
+ */
1778
+ async upsert(params) {
1779
+ return this.request("PUT", "/routing/surcharge/rules", { body: params });
1780
+ }
1781
+ /**
1782
+ * Retrieve the active surcharge program for a scope, or `null` when none is set.
1783
+ *
1784
+ * `GET /routing/surcharge/rules?profile_id={profileId}`
1785
+ *
1786
+ * @param profileId - Shop scope. Omit for the merchant-wide rule.
1787
+ */
1788
+ async retrieve(profileId) {
1789
+ return this.request("GET", "/routing/surcharge/rules", {
1790
+ query: { profile_id: profileId }
1791
+ });
1792
+ }
1793
+ /**
1794
+ * Deactivate the active surcharge program for a scope.
1795
+ *
1796
+ * `DELETE /routing/surcharge/rules?profile_id={profileId}`
1797
+ *
1798
+ * @param profileId - Shop scope. Omit for the merchant-wide rule.
1799
+ */
1800
+ async delete(profileId) {
1801
+ return this.request("DELETE", "/routing/surcharge/rules", {
1802
+ query: { profile_id: profileId }
1803
+ });
1804
+ }
1805
+ };
1746
1806
 
1747
1807
  // src/resources/search.ts
1748
1808
  var Search = class {
@@ -3796,4 +3856,4 @@ export {
3796
3856
  applyBrandingVariables,
3797
3857
  shadowFor
3798
3858
  };
3799
- //# sourceMappingURL=chunk-DMNCVY25.js.map
3859
+ //# sourceMappingURL=chunk-235UFV7Z.js.map