@soat/sdk 0.13.10 → 0.13.12
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 +92 -0
- package/dist/index.d.cts +425 -37
- package/dist/index.d.mts +425 -37
- package/dist/index.mjs +92 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1343,6 +1343,30 @@ var Documents = class {
|
|
|
1343
1343
|
});
|
|
1344
1344
|
}
|
|
1345
1345
|
/**
|
|
1346
|
+
* Deliver an async converter result
|
|
1347
|
+
*
|
|
1348
|
+
* Token-authed callback for a tool converter that deferred conversion by
|
|
1349
|
+
* returning `{ "status": "pending" }` (see the Ingestion Rules module
|
|
1350
|
+
* docs). Not IAM-gated — the external converter is not a SOAT principal,
|
|
1351
|
+
* so it authenticates with the single-use token minted for this
|
|
1352
|
+
* document and ingestion attempt (delivered as `callback.token` /
|
|
1353
|
+
* embedded in `callback.url` in the original converter invocation).
|
|
1354
|
+
* Accepted only while the document is still awaiting that exact
|
|
1355
|
+
* attempt; rejected with `409` if the attempt already completed, timed
|
|
1356
|
+
* out, or was superseded by a re-ingest.
|
|
1357
|
+
*
|
|
1358
|
+
*/
|
|
1359
|
+
static completeIngestionCallback(options) {
|
|
1360
|
+
return (options.client ?? client).post({
|
|
1361
|
+
url: "/api/v1/documents/{document_id}/ingestion-callback",
|
|
1362
|
+
...options,
|
|
1363
|
+
headers: {
|
|
1364
|
+
"Content-Type": "application/json",
|
|
1365
|
+
...options.headers
|
|
1366
|
+
}
|
|
1367
|
+
});
|
|
1368
|
+
}
|
|
1369
|
+
/**
|
|
1346
1370
|
* Get document tags
|
|
1347
1371
|
*
|
|
1348
1372
|
* Returns all tags attached to the document
|
|
@@ -1731,6 +1755,71 @@ var Generations = class {
|
|
|
1731
1755
|
});
|
|
1732
1756
|
}
|
|
1733
1757
|
};
|
|
1758
|
+
var IngestionRules = class {
|
|
1759
|
+
/**
|
|
1760
|
+
* List ingestion rules
|
|
1761
|
+
*
|
|
1762
|
+
* Returns the ingestion rules for a project
|
|
1763
|
+
*/
|
|
1764
|
+
static listIngestionRules(options) {
|
|
1765
|
+
return (options?.client ?? client).get({
|
|
1766
|
+
url: "/api/v1/ingestion-rules",
|
|
1767
|
+
...options
|
|
1768
|
+
});
|
|
1769
|
+
}
|
|
1770
|
+
/**
|
|
1771
|
+
* Create an ingestion rule
|
|
1772
|
+
*
|
|
1773
|
+
* Creates a rule mapping a content_type glob to a converter. Exactly one of tool_id or agent_id must be set.
|
|
1774
|
+
*/
|
|
1775
|
+
static createIngestionRule(options) {
|
|
1776
|
+
return (options.client ?? client).post({
|
|
1777
|
+
url: "/api/v1/ingestion-rules",
|
|
1778
|
+
...options,
|
|
1779
|
+
headers: {
|
|
1780
|
+
"Content-Type": "application/json",
|
|
1781
|
+
...options.headers
|
|
1782
|
+
}
|
|
1783
|
+
});
|
|
1784
|
+
}
|
|
1785
|
+
/**
|
|
1786
|
+
* Delete an ingestion rule
|
|
1787
|
+
*
|
|
1788
|
+
* Deletes an ingestion rule
|
|
1789
|
+
*/
|
|
1790
|
+
static deleteIngestionRule(options) {
|
|
1791
|
+
return (options.client ?? client).delete({
|
|
1792
|
+
url: "/api/v1/ingestion-rules/{ingestion_rule_id}",
|
|
1793
|
+
...options
|
|
1794
|
+
});
|
|
1795
|
+
}
|
|
1796
|
+
/**
|
|
1797
|
+
* Get an ingestion rule
|
|
1798
|
+
*
|
|
1799
|
+
* Returns a specific ingestion rule
|
|
1800
|
+
*/
|
|
1801
|
+
static getIngestionRule(options) {
|
|
1802
|
+
return (options.client ?? client).get({
|
|
1803
|
+
url: "/api/v1/ingestion-rules/{ingestion_rule_id}",
|
|
1804
|
+
...options
|
|
1805
|
+
});
|
|
1806
|
+
}
|
|
1807
|
+
/**
|
|
1808
|
+
* Update an ingestion rule
|
|
1809
|
+
*
|
|
1810
|
+
* Updates fields of an ingestion rule
|
|
1811
|
+
*/
|
|
1812
|
+
static updateIngestionRule(options) {
|
|
1813
|
+
return (options.client ?? client).patch({
|
|
1814
|
+
url: "/api/v1/ingestion-rules/{ingestion_rule_id}",
|
|
1815
|
+
...options,
|
|
1816
|
+
headers: {
|
|
1817
|
+
"Content-Type": "application/json",
|
|
1818
|
+
...options.headers
|
|
1819
|
+
}
|
|
1820
|
+
});
|
|
1821
|
+
}
|
|
1822
|
+
};
|
|
1734
1823
|
var Knowledge = class {
|
|
1735
1824
|
/**
|
|
1736
1825
|
* Search knowledge
|
|
@@ -2776,6 +2865,7 @@ var SoatClient = class {
|
|
|
2776
2865
|
documents;
|
|
2777
2866
|
files;
|
|
2778
2867
|
formations;
|
|
2868
|
+
ingestionRules;
|
|
2779
2869
|
knowledge;
|
|
2780
2870
|
memories;
|
|
2781
2871
|
memoryEntries;
|
|
@@ -2805,6 +2895,7 @@ var SoatClient = class {
|
|
|
2805
2895
|
this.documents = bindResource(Documents, httpClient);
|
|
2806
2896
|
this.files = bindResource(Files, httpClient);
|
|
2807
2897
|
this.formations = bindResource(Formations, httpClient);
|
|
2898
|
+
this.ingestionRules = bindResource(IngestionRules, httpClient);
|
|
2808
2899
|
this.knowledge = bindResource(Knowledge, httpClient);
|
|
2809
2900
|
this.memories = bindResource(Memories, httpClient);
|
|
2810
2901
|
this.memoryEntries = bindResource(MemoryEntries, httpClient);
|
|
@@ -2830,6 +2921,7 @@ exports.Embeddings = Embeddings;
|
|
|
2830
2921
|
exports.Files = Files;
|
|
2831
2922
|
exports.Formations = Formations;
|
|
2832
2923
|
exports.Generations = Generations;
|
|
2924
|
+
exports.IngestionRules = IngestionRules;
|
|
2833
2925
|
exports.Knowledge = Knowledge;
|
|
2834
2926
|
exports.Memories = Memories;
|
|
2835
2927
|
exports.MemoryEntries = MemoryEntries;
|