@delopay/sdk 0.123.0 → 0.125.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/internal.cjs CHANGED
@@ -809,6 +809,32 @@ var Connectors = class {
809
809
  { body: params }
810
810
  );
811
811
  }
812
+ /**
813
+ * What the processor says about this connector account: whether it will
814
+ * accept charges, which capabilities are live, and anything it is still
815
+ * waiting on.
816
+ *
817
+ * This is **not** {@link Connectors.verify}. That one asks whether the stored
818
+ * credentials work, by running a test-card authorization; a processor can
819
+ * revoke an account's ability to take payments while the credentials stay
820
+ * perfectly valid, and then a credential check reports healthy while every
821
+ * checkout silently stalls. This asks the account's own status instead, and
822
+ * is a plain read — it costs the merchant nothing and is safe to call twice.
823
+ *
824
+ * Connectors with no probe answer `state: 'unknown'` with
825
+ * `unknown_reason: 'connector_not_supported'`, rather than an error — every
826
+ * `'unknown'` carries a reason code you render your own words for. A router
827
+ * without this endpoint answers 404 — render that as "this build cannot
828
+ * report health", never as "healthy".
829
+ *
830
+ * `GET /account/{accountId}/connectors/{connectorId}/health`
831
+ */
832
+ async health(accountId, connectorId) {
833
+ return this.request(
834
+ "GET",
835
+ `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/health`
836
+ );
837
+ }
812
838
  /** Verify connector credentials. `POST /account/connectors/verify` */
813
839
  async verify(params) {
814
840
  return this.request("POST", "/account/connectors/verify", { body: params });
@@ -2527,6 +2553,23 @@ var Routing = class {
2527
2553
  async connectorCaps(profileId) {
2528
2554
  return this.request("GET", `/routing/connector-caps/${encodeURIComponent(profileId)}`);
2529
2555
  }
2556
+ /**
2557
+ * The live `routing_volume` counters behind a shop's active advanced
2558
+ * program: one per distinct budget the program reads, each with the window
2559
+ * it covers, the figure in the pinned threshold currency, and the rules that
2560
+ * read it. Lets a merchant see whether a `routing_volume < 50000` rule is at
2561
+ * 120 or at 499 today, and support answer why a payment went to the overflow
2562
+ * connector.
2563
+ *
2564
+ * What routing will use right now, not what the shop turned over: the
2565
+ * counters are held in Redis only and a lost Redis restarts the window at
2566
+ * zero. Read-only; needs the same permission as reading the rules.
2567
+ *
2568
+ * `GET /routing/volume-counters/{profileId}`
2569
+ */
2570
+ async volumeCounters(profileId) {
2571
+ return this.request("GET", `/routing/volume-counters/${encodeURIComponent(profileId)}`);
2572
+ }
2530
2573
  /**
2531
2574
  * Replace a shop's per-connector payment caps.
2532
2575
  *