@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/index.cjs CHANGED
@@ -797,6 +797,32 @@ var Connectors = class {
797
797
  { body: params }
798
798
  );
799
799
  }
800
+ /**
801
+ * What the processor says about this connector account: whether it will
802
+ * accept charges, which capabilities are live, and anything it is still
803
+ * waiting on.
804
+ *
805
+ * This is **not** {@link Connectors.verify}. That one asks whether the stored
806
+ * credentials work, by running a test-card authorization; a processor can
807
+ * revoke an account's ability to take payments while the credentials stay
808
+ * perfectly valid, and then a credential check reports healthy while every
809
+ * checkout silently stalls. This asks the account's own status instead, and
810
+ * is a plain read — it costs the merchant nothing and is safe to call twice.
811
+ *
812
+ * Connectors with no probe answer `state: 'unknown'` with
813
+ * `unknown_reason: 'connector_not_supported'`, rather than an error — every
814
+ * `'unknown'` carries a reason code you render your own words for. A router
815
+ * without this endpoint answers 404 — render that as "this build cannot
816
+ * report health", never as "healthy".
817
+ *
818
+ * `GET /account/{accountId}/connectors/{connectorId}/health`
819
+ */
820
+ async health(accountId, connectorId) {
821
+ return this.request(
822
+ "GET",
823
+ `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/health`
824
+ );
825
+ }
800
826
  /** Verify connector credentials. `POST /account/connectors/verify` */
801
827
  async verify(params) {
802
828
  return this.request("POST", "/account/connectors/verify", { body: params });
@@ -2515,6 +2541,23 @@ var Routing = class {
2515
2541
  async connectorCaps(profileId) {
2516
2542
  return this.request("GET", `/routing/connector-caps/${encodeURIComponent(profileId)}`);
2517
2543
  }
2544
+ /**
2545
+ * The live `routing_volume` counters behind a shop's active advanced
2546
+ * program: one per distinct budget the program reads, each with the window
2547
+ * it covers, the figure in the pinned threshold currency, and the rules that
2548
+ * read it. Lets a merchant see whether a `routing_volume < 50000` rule is at
2549
+ * 120 or at 499 today, and support answer why a payment went to the overflow
2550
+ * connector.
2551
+ *
2552
+ * What routing will use right now, not what the shop turned over: the
2553
+ * counters are held in Redis only and a lost Redis restarts the window at
2554
+ * zero. Read-only; needs the same permission as reading the rules.
2555
+ *
2556
+ * `GET /routing/volume-counters/{profileId}`
2557
+ */
2558
+ async volumeCounters(profileId) {
2559
+ return this.request("GET", `/routing/volume-counters/${encodeURIComponent(profileId)}`);
2560
+ }
2518
2561
  /**
2519
2562
  * Replace a shop's per-connector payment caps.
2520
2563
  *