@nozle-js/react 0.4.0 → 0.5.1
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 +5 -5
- package/dist/index.cjs +2773 -902
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +602 -123
- package/dist/index.d.ts +602 -123
- package/dist/index.js +2740 -898
- package/dist/index.js.map +1 -1
- package/package.json +20 -6
package/README.md
CHANGED
|
@@ -25,11 +25,9 @@ function App() {
|
|
|
25
25
|
return (
|
|
26
26
|
<BillingProvider
|
|
27
27
|
apiKey="pk_live_..."
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
stripeKey="pk_test_..."
|
|
32
|
-
features={["tokens_used", "code_completions"]}
|
|
28
|
+
baseUrl="https://api.nozle.app" // Default: https://api.nozle.app
|
|
29
|
+
workspaceId="ws_123" // Optional: workspace scoping
|
|
30
|
+
centrifugoUrl="wss://ws.nozle.app/connection/websocket" // Optional: real-time updates
|
|
33
31
|
>
|
|
34
32
|
<YourApp />
|
|
35
33
|
</BillingProvider>
|
|
@@ -37,6 +35,8 @@ function App() {
|
|
|
37
35
|
}
|
|
38
36
|
```
|
|
39
37
|
|
|
38
|
+
> **Note:** LLM wrappers (`wrapOpenAI`, `wrapAnthropic`) and server-side methods (`checkAndDeduct`, `customers.upsert`) are only available in `@nozle-js/node`. The React SDK is for client-side billing UI only.
|
|
39
|
+
|
|
40
40
|
## Hooks
|
|
41
41
|
|
|
42
42
|
### `useCan(feature)`
|