@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 CHANGED
@@ -1290,6 +1290,44 @@ var Documents = class {
1290
1290
  });
1291
1291
  }
1292
1292
  /**
1293
+ * Get document ingestion status
1294
+ *
1295
+ * Returns a lightweight ingestion status payload for polling — `status`,
1296
+ * `chunk_count`, `total_pages`, and (when failed) `error`. Unlike
1297
+ * `GET /documents/{document_id}`, it never returns the assembled chunk
1298
+ * content, so it is cheap to poll on large documents. A document whose
1299
+ * ingestion has stalled (no progress past the configured timeout) is
1300
+ * transitioned to `failed` with `error=INGESTION_TIMEOUT` on read.
1301
+ *
1302
+ */
1303
+ static getDocumentStatus(options) {
1304
+ return (options.client ?? client).get({
1305
+ url: "/api/v1/documents/{document_id}/status",
1306
+ ...options
1307
+ });
1308
+ }
1309
+ /**
1310
+ * Re-ingest an existing document
1311
+ *
1312
+ * Re-runs ingestion for an existing document against its already-stored
1313
+ * source file. Existing chunks are discarded and the document is reset to
1314
+ * `status=pending` before re-processing. Use this to recover a document
1315
+ * stuck in `processing`/`failed` or to re-chunk with a different strategy
1316
+ * without re-uploading the file. Async by default (`202`); pass
1317
+ * `?async=false` to run synchronously (`201`).
1318
+ *
1319
+ */
1320
+ static reingestDocument(options) {
1321
+ return (options.client ?? client).post({
1322
+ url: "/api/v1/documents/{document_id}/ingest",
1323
+ ...options,
1324
+ headers: {
1325
+ "Content-Type": "application/json",
1326
+ ...options.headers
1327
+ }
1328
+ });
1329
+ }
1330
+ /**
1293
1331
  * Get document tags
1294
1332
  *
1295
1333
  * Returns all tags attached to the document
@@ -1412,7 +1450,7 @@ var Files = class {
1412
1450
  /**
1413
1451
  * Create a presigned upload URL
1414
1452
  *
1415
- * 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 `SERVER_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.
1453
+ * 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.
1416
1454
  */
1417
1455
  static createPresignedUrl(options) {
1418
1456
  return (options.client ?? client).post({