@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 +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -7
- package/dist/index.d.ts +12 -7
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/types.ts +4 -4
- package/src/webhooks.ts +9 -3
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
|
|
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
|
-
|
|
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
|
|
762
|
-
|
|
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).
|
|
2527
|
-
*
|
|
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
|
|
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
|
-
|
|
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
|
|
762
|
-
|
|
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).
|
|
2527
|
-
*
|
|
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
|