@rustic-ai/api-client 0.4.3

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 ADDED
@@ -0,0 +1,50 @@
1
+ # @rustic-ai/api-client
2
+
3
+ TypeScript/axios client for the Rustic AI HTTP API.
4
+
5
+ The client is **generated** from the OpenAPI specification
6
+ (`forge-go/api/openapi/`) with [OpenAPI Generator](https://openapi-generator.tech)
7
+ (`typescript-axios`). Do not edit `src/` by hand — it is overwritten on every
8
+ regeneration.
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ npm install @rustic-ai/api-client axios
14
+ ```
15
+
16
+ `axios` is a runtime dependency and is installed automatically.
17
+
18
+ ## Usage
19
+
20
+ ```ts
21
+ import { Configuration, GuildsApi, CatalogApi } from '@rustic-ai/api-client'
22
+
23
+ const config = new Configuration({ basePath: 'http://localhost:8880' })
24
+
25
+ const guilds = new GuildsApi(config)
26
+ const { data } = await guilds.getGuildDetailsById({ guildId: 'my-guild' })
27
+ ```
28
+
29
+ Model interfaces (`BlueprintCreate`, `AgentSpecInput`, `GuildSpec`, …) are exported
30
+ from the package root:
31
+
32
+ ```ts
33
+ import type { BlueprintDetailsResponse, GuildStatus } from '@rustic-ai/api-client'
34
+ ```
35
+
36
+ ## Regenerating
37
+
38
+ The client is generated directly from the OpenAPI 3.1 document
39
+ (`forge-go/api/openapi/openapi.json`).
40
+
41
+ ```bash
42
+ npm install # once
43
+ npm run generate # regenerate src/ from the spec
44
+ npm run build # type-check and emit dist/
45
+ ```
46
+
47
+ Generator settings live in `openapitools.json` (pinned generator version, input
48
+ spec, options). Files that must not be produced inside `src/` are listed in
49
+ `src/.openapi-generator-ignore`.
50
+