@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/README.md CHANGED
@@ -888,8 +888,8 @@ and types these events; it does not create or list endpoints.)
888
888
 
889
889
  | Event | Fires when |
890
890
  | --- | --- |
891
- | `wallet.balance.update` | A customer's **main** wallet balance moves, credit or debit. Not for invoice settlements, and not for the Reserved Wallet. |
892
- | `wallet.balance.drop` | A debit takes the balance from above a level to at or below it. Fires **once per drop** through the level, not on every debit while the balance stays under it. |
891
+ | `wallet.balance.update` | A customer's **main** wallet balance moves, credit or debit — a top-up, an adjustment, a dashboard change. **Not** for changes caused by signals (usage debits and outcome, unit and composite charges: they can arrive thousands of times a minute), not for invoice settlements, and not for the Reserved Wallet. To read the current balance use `customers.balances()`. |
892
+ | `wallet.balance.drop` | A debit takes the balance from above a level to at or below it. Fires **once per drop** through the level, not on every debit while the balance stays under it. A signal that crosses the level **does** fire it. |
893
893
 
894
894
  The level for `wallet.balance.drop` is the customer's own alert level if they
895
895
  have one, otherwise the endpoint's threshold. Set or clear a customer's own
@@ -900,7 +900,7 @@ await cnk.customers.setWalletAlert(customerId, 50); // alert at or below $50
900
900
  await cnk.customers.setWalletAlert(customerId, null); // clear it: fall back to each endpoint's threshold
901
901
  await cnk.customers.setWalletAlertByExternalId("acme-42", 50);
902
902
 
903
- (await cnk.customers.wallet(customerId)).lowBalanceAlertUsd; // 50, or null
903
+ (await cnk.customers.wallet(customerId)).lowBalanceThresholdUsd; // 50, or null
904
904
  ```
905
905
 
906
906
  ### Verify, then handle
package/dist/index.cjs CHANGED
@@ -340,7 +340,7 @@ function sleep(ms) {
340
340
  }
341
341
 
342
342
  // src/http.ts
343
- var SDK_VERSION = "0.20.1" ;
343
+ var SDK_VERSION = "0.20.2" ;
344
344
  var Transport = class {
345
345
  constructor(cfg) {
346
346
  this.cfg = cfg;