@delopay/sdk 0.140.0 → 0.142.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
@@ -157,6 +157,7 @@ __export(index_exports, {
157
157
  isCheckboxChecked: () => isCheckboxChecked,
158
158
  isDarkSurface: () => isDarkSurface,
159
159
  isHexColor: () => isHexColor,
160
+ isSubscriptionLifecycleWebhook: () => isSubscriptionLifecycleWebhook,
160
161
  knownSectionLabelKey: () => knownSectionLabelKey,
161
162
  leaf: () => leaf,
162
163
  logoDimensions: () => logoDimensions,
@@ -833,7 +834,10 @@ var Connectors = class {
833
834
  * revoke an account's ability to take payments while the credentials stay
834
835
  * perfectly valid, and then a credential check reports healthy while every
835
836
  * checkout silently stalls. This asks the account's own status instead, and
836
- * is a plain read — it costs the merchant nothing and is safe to call twice.
837
+ * does not create a payment. By default it reads a scheduler snapshot;
838
+ * `refresh: true` asks for a new probe and `stale` identifies an overdue result.
839
+ * `test_mode` selects the requested environment; `credential_source` identifies
840
+ * a sandbox, live or shared credential set. Not every provider reports chargeability.
837
841
  *
838
842
  * Connectors with no probe answer `state: 'unknown'` with
839
843
  * `unknown_reason: 'connector_not_supported'`, rather than an error — every
@@ -843,10 +847,11 @@ var Connectors = class {
843
847
  *
844
848
  * `GET /account/{accountId}/connectors/{connectorId}/health`
845
849
  */
846
- async health(accountId, connectorId) {
850
+ async health(accountId, connectorId, options) {
847
851
  return this.request(
848
852
  "GET",
849
- `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/health`
853
+ `/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/health`,
854
+ { query: options }
850
855
  );
851
856
  }
852
857
  /** Verify connector credentials. `POST /account/connectors/verify` */
@@ -3857,6 +3862,9 @@ var Verification = class {
3857
3862
  };
3858
3863
 
3859
3864
  // src/resources/webhooks.ts
3865
+ function isSubscriptionLifecycleWebhook(object) {
3866
+ return typeof object.transition_id === "string";
3867
+ }
3860
3868
  function hexToBytes(hex) {
3861
3869
  if (hex.length === 0 || hex.length % 2 !== 0) return null;
3862
3870
  const bytes = new Uint8Array(hex.length / 2);
@@ -8276,6 +8284,7 @@ var encodeNativePanes = encodePanes;
8276
8284
  isCheckboxChecked,
8277
8285
  isDarkSurface,
8278
8286
  isHexColor,
8287
+ isSubscriptionLifecycleWebhook,
8279
8288
  knownSectionLabelKey,
8280
8289
  leaf,
8281
8290
  logoDimensions,