@delopay/sdk 0.101.0 → 0.103.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.
@@ -2185,6 +2185,22 @@ var Routing = class {
2185
2185
  async deactivate(params = {}) {
2186
2186
  return this.request("POST", "/routing/deactivate", { body: params });
2187
2187
  }
2188
+ /**
2189
+ * Edit a static routing configuration.
2190
+ *
2191
+ * Partial: send only the fields to change. `name`/`description` are
2192
+ * metadata-only; `algorithm` is a wholesale rule replacement, validated
2193
+ * against the shop exactly as at create. `modified_at` is bumped either way.
2194
+ *
2195
+ * `PUT /routing/{algorithmId}`
2196
+ *
2197
+ * @param algorithmId - The routing algorithm ID to edit.
2198
+ * @param params - The fields to change (at least one required).
2199
+ * @returns The updated routing configuration including the algorithm body.
2200
+ */
2201
+ async update(algorithmId, params) {
2202
+ return this.request("PUT", `/routing/${encodeURIComponent(algorithmId)}`, { body: params });
2203
+ }
2188
2204
  /**
2189
2205
  * List all routing algorithms for the current merchant.
2190
2206
  *
@@ -3780,6 +3796,46 @@ var Settlement = class {
3780
3796
  ...options
3781
3797
  });
3782
3798
  }
3799
+ /**
3800
+ * What a period's payments cost, and what was left over: gross, the
3801
+ * platform fee, hosting fees, what the rails took, and the margin, with a
3802
+ * per-connector breakdown.
3803
+ *
3804
+ * Send `year` and `month` together to report one UTC calendar month, or
3805
+ * neither for the running month so far.
3806
+ *
3807
+ * **Host-only.** The response is the host's cost base, which a shop owner
3808
+ * must never see, so a profile-scoped caller is refused with a 403 rather
3809
+ * than given a redacted shell. Gate the surface on the caller's scope
3810
+ * instead of calling it and handling the failure.
3811
+ *
3812
+ * Two things not to flatten when rendering the result:
3813
+ * `margin_usd` is absent — not zero — whenever `margin_quality` is
3814
+ * `'unknown'`, and `unlined_captured_attempt_count` (cost definitely
3815
+ * missing) means something different from `unlined_unresolved_attempt_count`
3816
+ * (mostly ordinary abandonment).
3817
+ *
3818
+ * `GET /settlement/cost`
3819
+ *
3820
+ * @example
3821
+ * ```typescript
3822
+ * const cost = await delopay.settlement.cost({ test_mode: false, year: 2026, month: 7 });
3823
+ * if (cost.margin_quality === 'unknown') {
3824
+ * // cost.margin_usd is absent — say so, do not render 0.00
3825
+ * }
3826
+ * ```
3827
+ */
3828
+ async cost(params, options) {
3829
+ return this.request("GET", "/settlement/cost", {
3830
+ query: {
3831
+ profile_id: params?.profile_id,
3832
+ test_mode: params?.test_mode,
3833
+ year: params?.year,
3834
+ month: params?.month
3835
+ },
3836
+ ...options
3837
+ });
3838
+ }
3783
3839
  /**
3784
3840
  * List generated settlement statements, newest first.
3785
3841
  *
@@ -6221,4 +6277,4 @@ export {
6221
6277
  focusedCheckoutUrl,
6222
6278
  CHECKOUT_EVENT_KINDS
6223
6279
  };
6224
- //# sourceMappingURL=chunk-NLUEZQZF.js.map
6280
+ //# sourceMappingURL=chunk-Q2PPDRUI.js.map