@bike4mind/sdk 1.1.1 → 1.2.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 +4 -0
- package/dist/index.d.cts +4 -3
- package/dist/index.d.mts +4 -3
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -123,3 +123,7 @@ pnpm turbo:openapi:generate # regenerates the spec, then the SDK types
|
|
|
123
123
|
```
|
|
124
124
|
|
|
125
125
|
`pnpm --filter @bike4mind/sdk generate` regenerates only the SDK types from the current spec. CI fails when either is stale.
|
|
126
|
+
|
|
127
|
+
## Publishing
|
|
128
|
+
|
|
129
|
+
Released to npm from CI through npm trusted publishing (OIDC); no npm token is stored.
|
package/dist/index.d.cts
CHANGED
|
@@ -332,7 +332,7 @@ interface paths {
|
|
|
332
332
|
put?: never;
|
|
333
333
|
/**
|
|
334
334
|
* Start a file upload
|
|
335
|
-
* @description Registers a file and returns a presigned `upload_url`. Uploading is three steps: (1) call this endpoint with the file name, MIME type, and size in bytes; (2) `PUT` the raw bytes to `upload_url` before `upload_url_expires_at` - send no `Authorization` header, the URL signature is the credential, and do send a `Content-Type` matching `mime_type`; (3) poll `GET /api/v1/files/{id}` until `moderation_status` is `clean` (usually a few seconds after the PUT), then pass `id` wherever an endpoint takes a file id (for example `fabFileIds` and `referenceImageFabFileIds` on `POST /api/v1/image-edits`). Unsupported types, a size over the upload limit, or a size that would exceed your storage quota are rejected with 400 before any URL is issued. Authenticate with an API key (`b4m_live_`) carrying `files:write`, or a JWT.
|
|
335
|
+
* @description Registers a file and returns a presigned `upload_url`. Uploading is three steps: (1) call this endpoint with the file name, MIME type, and size in bytes; (2) `PUT` the raw bytes to `upload_url` before `upload_url_expires_at` - send no `Authorization` header, the URL signature is the credential, and do send a `Content-Type` matching `mime_type`; the URL is bound to `file_size`, so the body must be exactly that many bytes or storage refuses it with 403; (3) poll `GET /api/v1/files/{id}` until `moderation_status` is `clean` (usually a few seconds after the PUT), then pass `id` wherever an endpoint takes a file id (for example `fabFileIds` and `referenceImageFabFileIds` on `POST /api/v1/image-edits`). Unsupported types, a size over the upload limit, or a size that would exceed your storage quota are rejected with 400 before any URL is issued. Authenticate with an API key (`b4m_live_`) carrying `files:write`, or a JWT.
|
|
336
336
|
*/
|
|
337
337
|
post: operations['createFileUpload'];
|
|
338
338
|
delete?: never;
|
|
@@ -1603,7 +1603,7 @@ interface components {
|
|
|
1603
1603
|
*/
|
|
1604
1604
|
name?: string;
|
|
1605
1605
|
/** @enum {string} */
|
|
1606
|
-
errorCode?: 'unknown_model' | 'tool_search_unsupported' | 'all_tools_deferred' | 'deferred_tool_cache_control' | 'unknown_tool_reference';
|
|
1606
|
+
errorCode?: 'unknown_model' | 'tool_search_unsupported' | 'all_tools_deferred' | 'deferred_tool_cache_control' | 'unknown_tool_reference' | 'tool_changes_unsupported' | 'invalid_tool_change';
|
|
1607
1607
|
};
|
|
1608
1608
|
createCompletionResponse422: {
|
|
1609
1609
|
error: string;
|
|
@@ -1644,6 +1644,7 @@ interface components {
|
|
|
1644
1644
|
messages: {
|
|
1645
1645
|
/** @enum {string} */
|
|
1646
1646
|
role: 'user' | 'assistant' | 'system';
|
|
1647
|
+
/** @description A string, or an array of content blocks. A `system` message may instead hold only `tool_addition` / `tool_removal` blocks (`{ type, tool: { type: "tool_reference", name } }`) to load or unload a tool named in `tools` mid-conversation without invalidating the prompt cache. It must follow a user turn or an assistant turn ending in a tool search result, and be the last message or precede an assistant turn. Only on models whose `supports_tool_changes` is true and that are served by the direct Anthropic API; otherwise refused with `errorCode: "tool_changes_unsupported"` (or `invalid_tool_change` / `unknown_tool_reference` when malformed). */
|
|
1647
1648
|
content: string | unknown[];
|
|
1648
1649
|
cache?: boolean;
|
|
1649
1650
|
}[];
|
|
@@ -6034,7 +6035,7 @@ interface operations {
|
|
|
6034
6035
|
'text/event-stream': components['schemas']['createCompletionResponse200'];
|
|
6035
6036
|
};
|
|
6036
6037
|
};
|
|
6037
|
-
/** @description Malformed or otherwise invalid request (no `errorCode`), or a `model` the caller cannot use (`errorCode: "unknown_model"`): not in the catalog or not available to the caller. List valid ids with `GET /api/v1/models`. Tool search requests are refused with: `tool_search_unsupported` (a server tool, `tool_reference` or echoed tool search block on a model that cannot serve tool search here), `all_tools_deferred` (every tool deferred and no server tool), `deferred_tool_cache_control` (`cache_control` on a deferred tool), `unknown_tool_reference` (a `tool_reference` naming a tool not in `tools`, or carrying no string `tool_name`). */
|
|
6038
|
+
/** @description Malformed or otherwise invalid request (no `errorCode`), or a `model` the caller cannot use (`errorCode: "unknown_model"`): not in the catalog or not available to the caller. List valid ids with `GET /api/v1/models`. Tool search requests are refused with: `tool_search_unsupported` (a server tool, `tool_reference` or echoed tool search block on a model that cannot serve tool search here), `all_tools_deferred` (every tool deferred and no server tool), `deferred_tool_cache_control` (`cache_control` on a deferred tool), `unknown_tool_reference` (a `tool_reference` naming a tool not in `tools`, or carrying no string `tool_name`). Mid-conversation tool changes are refused with: `tool_changes_unsupported` (a `tool_addition` / `tool_removal` system message on a model that cannot serve it here), `invalid_tool_change` (a malformed block, or one placed where the provider does not accept it), and `unknown_tool_reference` (a changed tool not in `tools`). */
|
|
6038
6039
|
400: {
|
|
6039
6040
|
headers: {
|
|
6040
6041
|
/** @description Correlation id for this request; safe to log and quote in support requests. */
|
package/dist/index.d.mts
CHANGED
|
@@ -332,7 +332,7 @@ interface paths {
|
|
|
332
332
|
put?: never;
|
|
333
333
|
/**
|
|
334
334
|
* Start a file upload
|
|
335
|
-
* @description Registers a file and returns a presigned `upload_url`. Uploading is three steps: (1) call this endpoint with the file name, MIME type, and size in bytes; (2) `PUT` the raw bytes to `upload_url` before `upload_url_expires_at` - send no `Authorization` header, the URL signature is the credential, and do send a `Content-Type` matching `mime_type`; (3) poll `GET /api/v1/files/{id}` until `moderation_status` is `clean` (usually a few seconds after the PUT), then pass `id` wherever an endpoint takes a file id (for example `fabFileIds` and `referenceImageFabFileIds` on `POST /api/v1/image-edits`). Unsupported types, a size over the upload limit, or a size that would exceed your storage quota are rejected with 400 before any URL is issued. Authenticate with an API key (`b4m_live_`) carrying `files:write`, or a JWT.
|
|
335
|
+
* @description Registers a file and returns a presigned `upload_url`. Uploading is three steps: (1) call this endpoint with the file name, MIME type, and size in bytes; (2) `PUT` the raw bytes to `upload_url` before `upload_url_expires_at` - send no `Authorization` header, the URL signature is the credential, and do send a `Content-Type` matching `mime_type`; the URL is bound to `file_size`, so the body must be exactly that many bytes or storage refuses it with 403; (3) poll `GET /api/v1/files/{id}` until `moderation_status` is `clean` (usually a few seconds after the PUT), then pass `id` wherever an endpoint takes a file id (for example `fabFileIds` and `referenceImageFabFileIds` on `POST /api/v1/image-edits`). Unsupported types, a size over the upload limit, or a size that would exceed your storage quota are rejected with 400 before any URL is issued. Authenticate with an API key (`b4m_live_`) carrying `files:write`, or a JWT.
|
|
336
336
|
*/
|
|
337
337
|
post: operations['createFileUpload'];
|
|
338
338
|
delete?: never;
|
|
@@ -1603,7 +1603,7 @@ interface components {
|
|
|
1603
1603
|
*/
|
|
1604
1604
|
name?: string;
|
|
1605
1605
|
/** @enum {string} */
|
|
1606
|
-
errorCode?: 'unknown_model' | 'tool_search_unsupported' | 'all_tools_deferred' | 'deferred_tool_cache_control' | 'unknown_tool_reference';
|
|
1606
|
+
errorCode?: 'unknown_model' | 'tool_search_unsupported' | 'all_tools_deferred' | 'deferred_tool_cache_control' | 'unknown_tool_reference' | 'tool_changes_unsupported' | 'invalid_tool_change';
|
|
1607
1607
|
};
|
|
1608
1608
|
createCompletionResponse422: {
|
|
1609
1609
|
error: string;
|
|
@@ -1644,6 +1644,7 @@ interface components {
|
|
|
1644
1644
|
messages: {
|
|
1645
1645
|
/** @enum {string} */
|
|
1646
1646
|
role: 'user' | 'assistant' | 'system';
|
|
1647
|
+
/** @description A string, or an array of content blocks. A `system` message may instead hold only `tool_addition` / `tool_removal` blocks (`{ type, tool: { type: "tool_reference", name } }`) to load or unload a tool named in `tools` mid-conversation without invalidating the prompt cache. It must follow a user turn or an assistant turn ending in a tool search result, and be the last message or precede an assistant turn. Only on models whose `supports_tool_changes` is true and that are served by the direct Anthropic API; otherwise refused with `errorCode: "tool_changes_unsupported"` (or `invalid_tool_change` / `unknown_tool_reference` when malformed). */
|
|
1647
1648
|
content: string | unknown[];
|
|
1648
1649
|
cache?: boolean;
|
|
1649
1650
|
}[];
|
|
@@ -6034,7 +6035,7 @@ interface operations {
|
|
|
6034
6035
|
'text/event-stream': components['schemas']['createCompletionResponse200'];
|
|
6035
6036
|
};
|
|
6036
6037
|
};
|
|
6037
|
-
/** @description Malformed or otherwise invalid request (no `errorCode`), or a `model` the caller cannot use (`errorCode: "unknown_model"`): not in the catalog or not available to the caller. List valid ids with `GET /api/v1/models`. Tool search requests are refused with: `tool_search_unsupported` (a server tool, `tool_reference` or echoed tool search block on a model that cannot serve tool search here), `all_tools_deferred` (every tool deferred and no server tool), `deferred_tool_cache_control` (`cache_control` on a deferred tool), `unknown_tool_reference` (a `tool_reference` naming a tool not in `tools`, or carrying no string `tool_name`). */
|
|
6038
|
+
/** @description Malformed or otherwise invalid request (no `errorCode`), or a `model` the caller cannot use (`errorCode: "unknown_model"`): not in the catalog or not available to the caller. List valid ids with `GET /api/v1/models`. Tool search requests are refused with: `tool_search_unsupported` (a server tool, `tool_reference` or echoed tool search block on a model that cannot serve tool search here), `all_tools_deferred` (every tool deferred and no server tool), `deferred_tool_cache_control` (`cache_control` on a deferred tool), `unknown_tool_reference` (a `tool_reference` naming a tool not in `tools`, or carrying no string `tool_name`). Mid-conversation tool changes are refused with: `tool_changes_unsupported` (a `tool_addition` / `tool_removal` system message on a model that cannot serve it here), `invalid_tool_change` (a malformed block, or one placed where the provider does not accept it), and `unknown_tool_reference` (a changed tool not in `tools`). */
|
|
6038
6039
|
400: {
|
|
6039
6040
|
headers: {
|
|
6040
6041
|
/** @description Correlation id for this request; safe to log and quote in support requests. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bike4mind/sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Typed client for the Bike4Mind HTTP API, generated from its OpenAPI spec",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Bike4Mind",
|
|
@@ -44,13 +44,6 @@
|
|
|
44
44
|
"engines": {
|
|
45
45
|
"node": ">=18.0.0"
|
|
46
46
|
},
|
|
47
|
-
"scripts": {
|
|
48
|
-
"build": "tsdown",
|
|
49
|
-
"generate": "node scripts/generate.mjs",
|
|
50
|
-
"typecheck": "tsc --noEmit",
|
|
51
|
-
"typecheck:fast": "tsgo --noEmit --types node || tsc --noEmit",
|
|
52
|
-
"test": "vitest run"
|
|
53
|
-
},
|
|
54
47
|
"dependencies": {
|
|
55
48
|
"eventsource-parser": "^3.1.0"
|
|
56
49
|
},
|
|
@@ -61,5 +54,12 @@
|
|
|
61
54
|
"tsdown": "^0.22.3",
|
|
62
55
|
"typescript": "^5.9.3",
|
|
63
56
|
"vitest": "^4.1.11"
|
|
57
|
+
},
|
|
58
|
+
"scripts": {
|
|
59
|
+
"build": "tsdown",
|
|
60
|
+
"generate": "node scripts/generate.mjs",
|
|
61
|
+
"typecheck": "tsc --noEmit",
|
|
62
|
+
"typecheck:fast": "tsgo --noEmit --types node || tsc --noEmit",
|
|
63
|
+
"test": "vitest run"
|
|
64
64
|
}
|
|
65
|
-
}
|
|
65
|
+
}
|