@soat/sdk 0.13.6 → 0.13.7
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/dist/index.cjs +39 -1
- package/dist/index.d.cts +359 -174
- package/dist/index.d.mts +359 -174
- package/dist/index.mjs +39 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1289,6 +1289,44 @@ var Documents = class {
|
|
|
1289
1289
|
});
|
|
1290
1290
|
}
|
|
1291
1291
|
/**
|
|
1292
|
+
* Get document ingestion status
|
|
1293
|
+
*
|
|
1294
|
+
* Returns a lightweight ingestion status payload for polling — `status`,
|
|
1295
|
+
* `chunk_count`, `total_pages`, and (when failed) `error`. Unlike
|
|
1296
|
+
* `GET /documents/{document_id}`, it never returns the assembled chunk
|
|
1297
|
+
* content, so it is cheap to poll on large documents. A document whose
|
|
1298
|
+
* ingestion has stalled (no progress past the configured timeout) is
|
|
1299
|
+
* transitioned to `failed` with `error=INGESTION_TIMEOUT` on read.
|
|
1300
|
+
*
|
|
1301
|
+
*/
|
|
1302
|
+
static getDocumentStatus(options) {
|
|
1303
|
+
return (options.client ?? client).get({
|
|
1304
|
+
url: "/api/v1/documents/{document_id}/status",
|
|
1305
|
+
...options
|
|
1306
|
+
});
|
|
1307
|
+
}
|
|
1308
|
+
/**
|
|
1309
|
+
* Re-ingest an existing document
|
|
1310
|
+
*
|
|
1311
|
+
* Re-runs ingestion for an existing document against its already-stored
|
|
1312
|
+
* source file. Existing chunks are discarded and the document is reset to
|
|
1313
|
+
* `status=pending` before re-processing. Use this to recover a document
|
|
1314
|
+
* stuck in `processing`/`failed` or to re-chunk with a different strategy
|
|
1315
|
+
* without re-uploading the file. Async by default (`202`); pass
|
|
1316
|
+
* `?async=false` to run synchronously (`201`).
|
|
1317
|
+
*
|
|
1318
|
+
*/
|
|
1319
|
+
static reingestDocument(options) {
|
|
1320
|
+
return (options.client ?? client).post({
|
|
1321
|
+
url: "/api/v1/documents/{document_id}/ingest",
|
|
1322
|
+
...options,
|
|
1323
|
+
headers: {
|
|
1324
|
+
"Content-Type": "application/json",
|
|
1325
|
+
...options.headers
|
|
1326
|
+
}
|
|
1327
|
+
});
|
|
1328
|
+
}
|
|
1329
|
+
/**
|
|
1292
1330
|
* Get document tags
|
|
1293
1331
|
*
|
|
1294
1332
|
* Returns all tags attached to the document
|
|
@@ -1411,7 +1449,7 @@ var Files = class {
|
|
|
1411
1449
|
/**
|
|
1412
1450
|
* Create a presigned upload URL
|
|
1413
1451
|
*
|
|
1414
|
-
* Creates a short-lived, single-use presigned upload URL — the local-storage equivalent of an S3 presigned URL. The client then uploads the file content directly to the returned `upload_url` via `POST /api/v1/files/upload/{token}`, bypassing MCP payload size limits. When the server is configured with `
|
|
1452
|
+
* Creates a short-lived, single-use presigned upload URL — the local-storage equivalent of an S3 presigned URL. The client then uploads the file content directly to the returned `upload_url` via `POST /api/v1/files/upload/{token}`, bypassing MCP payload size limits. When the server is configured with `SOAT_BASE_URL`, `upload_url` is a fully-qualified absolute URL so MCP agents and other clients can POST to it without knowing the server base URL in advance.
|
|
1415
1453
|
*/
|
|
1416
1454
|
static createPresignedUrl(options) {
|
|
1417
1455
|
return (options.client ?? client).post({
|