hanzoai 2.2.8 → 2.2.9

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.
Files changed (2) hide show
  1. package/README.md +14 -9
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  TypeScript client for the [Hanzo API](https://api.hanzo.ai). Generated from the
6
6
  API's own OpenAPI document — the one each subsystem's router emits — so it
7
- carries every `/v1` route, 2479 operations across 192 products, and cannot name
7
+ carries every `/v1` route, 2479 operations across 191 products, and cannot name
8
8
  an address the server does not serve.
9
9
 
10
10
  ## Install
@@ -109,23 +109,28 @@ that a CI gate — which is what keeps them from rotting into pseudocode.
109
109
 
110
110
  ## The API surface
111
111
 
112
- One class per product — the first path segment after `/v1/`. 192 of them:
112
+ One class per product — the first path segment after `/v1/`. 191 of them:
113
113
  `ChatApi`, `ModelsApi`, `IamApi`, `BillingApi`, `KvApi`, `AgentsApi`,
114
- `ToolsApi`, `McpApi`, `CommerceApi`, `O11yApi`, and 182 more. Each takes a
115
- `Configuration`; each method takes one request object.
114
+ `ToolsApi`, `McpApi`, `CommerceApi`, `O11yApi`, and 181 more. A 192nd class,
115
+ `DefaultApi`, holds the 50 routes the document leaves untagged — `/` and the
116
+ `/.well-known/*` family. Each takes a `Configuration`; each method takes one
117
+ request object.
116
118
 
117
119
  ```ts
118
- import { BillingApi } from 'hanzoai';
119
- const { data } = await new BillingApi(config).getBillingBalance();
120
+ import { Configuration, BillingApi } from 'hanzoai';
121
+
122
+ const billing = new BillingApi(new Configuration({ basePath: 'https://api.hanzo.ai' }));
123
+ billing.getBillingBalance().then(({ data }) => console.log(data));
120
124
  ```
121
125
 
122
126
  Method names are the document's operation ids in camelCase — `get_billing_balance`
123
127
  is `getBillingBalance`, and a path parameter reads as `by`:
124
128
  `GET /v1/kv/{name}` is `getKvByName({ name })`.
125
129
 
126
- 834 of the 2479 operations declare a route but not a response shape, so their
127
- `data` arrives typed `void` and wants a cast. That is a gap in the document, not
128
- in the client; it closes as the subsystems describe their own replies.
130
+ 891 of the 2479 operations declare a route but not a response shape, so their
131
+ `data` arrives untyped — `void` for 834 of them, `any` for the other 57 — and
132
+ wants a cast. That is a gap in the document, not in the client; it closes as the
133
+ subsystems describe their own replies.
129
134
 
130
135
  Full reference: [docs.hanzo.ai](https://docs.hanzo.ai).
131
136
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hanzoai",
3
- "version": "2.2.8",
3
+ "version": "2.2.9",
4
4
  "description": "The official TypeScript library for the Hanzo API",
5
5
  "author": "Hanzo <dev@hanzo.ai>",
6
6
  "license": "Apache-2.0",