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