@byte_fluffy/nexra-sdk 0.1.0-alpha.2 → 0.1.0-alpha.4
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 +28 -0
- package/dist/catalog.d.ts +1 -1
- package/dist/catalog.js +1 -1
- package/dist/chunk-AV3GN4TV.js +6239 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-WE6JHADB.js +0 -1512
- /package/dist/{catalog-mytCeh5t.d.ts → index-mytCeh5t.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -33,3 +33,31 @@ The default API base URL is `https://api.nexra-ai.com/v1`. When overriding
|
|
|
33
33
|
Static catalog APIs are also available from `@byte_fluffy/nexra-sdk/catalog`.
|
|
34
34
|
Exact non-negative decimal helpers are available from
|
|
35
35
|
`@byte_fluffy/nexra-sdk/decimal`.
|
|
36
|
+
|
|
37
|
+
## Directory layout
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
src/
|
|
41
|
+
index.ts Public entry; re-exports the catalog, client, etc.
|
|
42
|
+
catalog/
|
|
43
|
+
index.ts CatalogClient, getModelSpec, listModelSpecs
|
|
44
|
+
generated/ Generated artifacts (committed; required to publish)
|
|
45
|
+
image.generated.json One file per model kind (image, video, audio, ...)
|
|
46
|
+
index.ts Imports every kind JSON and exports the merged array
|
|
47
|
+
generated/
|
|
48
|
+
version.generated.ts SDK_VERSION used by the transport
|
|
49
|
+
... client, tasks, assets, input, sse, webhooks, errors, ...
|
|
50
|
+
scripts/
|
|
51
|
+
generate-public-catalog.ts Projects models from @nexra/models and writes
|
|
52
|
+
src/catalog/generated/*
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Adding a new public model
|
|
56
|
+
|
|
57
|
+
1. Add its ID to `PUBLIC_MODEL_IDS` in `scripts/generate-public-catalog.ts`.
|
|
58
|
+
2. Run `bun run generate` (from `packages/sdk`).
|
|
59
|
+
3. The script groups projected models by `model.kind`, writes one
|
|
60
|
+
`src/catalog/generated/<kind>.generated.json` per kind (new kinds appear
|
|
61
|
+
automatically), regenerates the merging `index.ts`, and bumps
|
|
62
|
+
`src/generated/version.generated.ts`. No hand-written code changes.
|
|
63
|
+
|
package/dist/catalog.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { d as CatalogClient, h as CreateNexraQuoteRequest, u as NexraBillingCurrency, v as NexraModelOperation, w as NexraModelSpec, x as NexraModelSpecFilter, y as NexraQuote, z as NexraSalePrice, N as NexraSettlement, R as getModelSpec, V as listModelSpecs } from './
|
|
1
|
+
export { d as CatalogClient, h as CreateNexraQuoteRequest, u as NexraBillingCurrency, v as NexraModelOperation, w as NexraModelSpec, x as NexraModelSpecFilter, y as NexraQuote, z as NexraSalePrice, N as NexraSettlement, R as getModelSpec, V as listModelSpecs } from './index-mytCeh5t.js';
|