@clocknext/sdk 0.20.1 → 0.20.2

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.d.cts CHANGED
@@ -748,18 +748,18 @@ interface WalletLedgerPage {
748
748
  /** Reserved Wallet balance, USD; `null` when the workspace hasn't enabled
749
749
  * it. */
750
750
  reservedBalanceUsd: number | null;
751
- /** The customer's own low-balance alert level, USD; `null` when none is set.
751
+ /** The customer's own low-balance threshold, USD; `null` when none is set.
752
752
  * At or below it the `wallet.balance.drop` webhook fires for this customer.
753
753
  * Set with `customers.setWalletAlert()`. */
754
- lowBalanceAlertUsd: number | null;
754
+ lowBalanceThresholdUsd: number | null;
755
755
  transactions: WalletTransaction[];
756
756
  /** Pass back as `cursor` for the next page; `null` on the last page. */
757
757
  nextCursor: string | null;
758
758
  }
759
759
  /** Result of `customers.setWalletAlert()`. */
760
760
  interface WalletAlert {
761
- /** The saved low-balance alert level, USD; `null` once cleared. */
762
- lowBalanceAlertUsd: number | null;
761
+ /** The saved low-balance threshold, USD; `null` once cleared. */
762
+ lowBalanceThresholdUsd: number | null;
763
763
  }
764
764
  interface WalletLedgerParams {
765
765
  /** Default 50, max 200. */
@@ -2523,14 +2523,19 @@ declare class Taxes {
2523
2523
  * dashboard (Settings → Webhooks). Two events exist today:
2524
2524
  *
2525
2525
  * wallet.balance.update a customer's MAIN wallet balance moved (credit or
2526
- * debit). Invoice settlements and the Reserved
2527
- * Wallet do not fire it.
2526
+ * debit). NOT sent for changes caused by signals
2527
+ * (usage debits and outcome / unit / composite
2528
+ * charges): they can arrive thousands of times a
2529
+ * minute. Invoice settlements and the Reserved
2530
+ * Wallet do not fire it either. To read the current
2531
+ * balance use `customers.balances()`.
2528
2532
  * wallet.balance.drop a debit took the balance from above a level to at
2529
2533
  * or below it. The level is the customer's own alert
2530
2534
  * level (`customers.setWalletAlert`) when they have
2531
2535
  * one, otherwise the endpoint's threshold. Fires once
2532
2536
  * per drop through the level, not on every debit while
2533
- * the balance stays under it.
2537
+ * the balance stays under it. A signal that crosses
2538
+ * the level DOES fire it.
2534
2539
  *
2535
2540
  * Verify every request before trusting it — {@link constructWebhookEvent} does
2536
2541
  * that and returns the typed event. It needs the RAW request body: parsing the
package/dist/index.d.ts CHANGED
@@ -748,18 +748,18 @@ interface WalletLedgerPage {
748
748
  /** Reserved Wallet balance, USD; `null` when the workspace hasn't enabled
749
749
  * it. */
750
750
  reservedBalanceUsd: number | null;
751
- /** The customer's own low-balance alert level, USD; `null` when none is set.
751
+ /** The customer's own low-balance threshold, USD; `null` when none is set.
752
752
  * At or below it the `wallet.balance.drop` webhook fires for this customer.
753
753
  * Set with `customers.setWalletAlert()`. */
754
- lowBalanceAlertUsd: number | null;
754
+ lowBalanceThresholdUsd: number | null;
755
755
  transactions: WalletTransaction[];
756
756
  /** Pass back as `cursor` for the next page; `null` on the last page. */
757
757
  nextCursor: string | null;
758
758
  }
759
759
  /** Result of `customers.setWalletAlert()`. */
760
760
  interface WalletAlert {
761
- /** The saved low-balance alert level, USD; `null` once cleared. */
762
- lowBalanceAlertUsd: number | null;
761
+ /** The saved low-balance threshold, USD; `null` once cleared. */
762
+ lowBalanceThresholdUsd: number | null;
763
763
  }
764
764
  interface WalletLedgerParams {
765
765
  /** Default 50, max 200. */
@@ -2523,14 +2523,19 @@ declare class Taxes {
2523
2523
  * dashboard (Settings → Webhooks). Two events exist today:
2524
2524
  *
2525
2525
  * wallet.balance.update a customer's MAIN wallet balance moved (credit or
2526
- * debit). Invoice settlements and the Reserved
2527
- * Wallet do not fire it.
2526
+ * debit). NOT sent for changes caused by signals
2527
+ * (usage debits and outcome / unit / composite
2528
+ * charges): they can arrive thousands of times a
2529
+ * minute. Invoice settlements and the Reserved
2530
+ * Wallet do not fire it either. To read the current
2531
+ * balance use `customers.balances()`.
2528
2532
  * wallet.balance.drop a debit took the balance from above a level to at
2529
2533
  * or below it. The level is the customer's own alert
2530
2534
  * level (`customers.setWalletAlert`) when they have
2531
2535
  * one, otherwise the endpoint's threshold. Fires once
2532
2536
  * per drop through the level, not on every debit while
2533
- * the balance stays under it.
2537
+ * the balance stays under it. A signal that crosses
2538
+ * the level DOES fire it.
2534
2539
  *
2535
2540
  * Verify every request before trusting it — {@link constructWebhookEvent} does
2536
2541
  * that and returns the typed event. It needs the RAW request body: parsing the
package/dist/index.js CHANGED
@@ -338,7 +338,7 @@ function sleep(ms) {
338
338
  }
339
339
 
340
340
  // src/http.ts
341
- var SDK_VERSION = "0.20.1" ;
341
+ var SDK_VERSION = "0.20.2" ;
342
342
  var Transport = class {
343
343
  constructor(cfg) {
344
344
  this.cfg = cfg;