@signozhq/noz-client 0.0.0-stage → 0.0.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/README.md CHANGED
@@ -1,3 +1,37 @@
1
- # Temporary Holding Version
1
+ # @signozhq/noz-client
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ TypeScript client for the REST API of Noz, the SigNoz AI Assistant: request and response DTOs,
4
+ react-query hooks, and the axios mutator they call. It is generated from the assistant's OpenAPI
5
+ spec, so don't edit it by hand.
6
+
7
+ ```bash
8
+ pnpm add -E @signozhq/noz-client
9
+ ```
10
+
11
+ React 18, react-query 3 and axios 1 are peer dependencies, so the hooks share your app's
12
+ `QueryClient` and axios.
13
+
14
+ ## Usage
15
+
16
+ Types and enums work on their own:
17
+
18
+ ```ts
19
+ import { PageTypeDTO, type ThreadSummaryDTO } from '@signozhq/noz-client';
20
+ ```
21
+
22
+ Before the first hook call, give the client an axios instance whose `baseURL` is the assistant
23
+ origin without `/api/v1/assistant`, because the generated paths include that prefix. Until then,
24
+ hooks call the page's own origin with no auth.
25
+
26
+ ```ts
27
+ import { setGeneratedAPIInstance } from '@signozhq/noz-client';
28
+
29
+ setGeneratedAPIInstance(assistantAxiosInstance);
30
+ ```
31
+
32
+ The SSE event stream is not part of this client.
33
+
34
+ ## Versions
35
+
36
+ Each version matches the AI Assistant release it was built from: `1.13.0` is the client for
37
+ assistant `v1.13.0`. Pin an exact version.