@soat/sdk 0.12.5 → 0.13.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/dist/index.mjs CHANGED
@@ -823,21 +823,6 @@ var Agents = class {
823
823
  }
824
824
  });
825
825
  }
826
- /**
827
- * Create an actor for an agent
828
- *
829
- * Creates a new actor associated with the specified agent
830
- */
831
- static createAgentActor(options) {
832
- return (options.client ?? client).post({
833
- url: "/api/v1/agents/{agent_id}/actors",
834
- ...options,
835
- headers: {
836
- "Content-Type": "application/json",
837
- ...options.headers
838
- }
839
- });
840
- }
841
826
  };
842
827
  var AiProviders = class {
843
828
  /**
@@ -1043,27 +1028,12 @@ var Chats = class {
1043
1028
  /**
1044
1029
  * Create a chat completion (stateless)
1045
1030
  *
1046
- * OpenAI Chat Completions-compatible endpoint. Resolves the AI provider from `ai_provider_id`, decrypts its secret, and calls the appropriate Vercel AI SDK provider. `ai_provider_id` is required — there is no server-side model fallback.
1031
+ * OpenAI Chat Completions-compatible endpoint. Mirrors OpenAI's `POST /v1/chat/completions` path so an OpenAI SDK can target it by base URL alone. Resolves the AI provider from `ai_provider_id`, decrypts its secret, and calls the appropriate Vercel AI SDK provider. `ai_provider_id` is required — there is no server-side model fallback.
1047
1032
  *
1048
1033
  */
1049
1034
  static createChatCompletion(options) {
1050
1035
  return (options.client ?? client).post({
1051
- url: "/api/v1/chats/completions",
1052
- ...options,
1053
- headers: {
1054
- "Content-Type": "application/json",
1055
- ...options.headers
1056
- }
1057
- });
1058
- }
1059
- /**
1060
- * Create an actor for a chat
1061
- *
1062
- * Creates a new actor associated with the specified chat
1063
- */
1064
- static createChatActor(options) {
1065
- return (options.client ?? client).post({
1066
- url: "/api/v1/chats/{chat_id}/actors",
1036
+ url: "/api/v1/chat/completions",
1067
1037
  ...options,
1068
1038
  headers: {
1069
1039
  "Content-Type": "application/json",
@@ -1182,17 +1152,6 @@ var Conversations = class {
1182
1152
  });
1183
1153
  }
1184
1154
  /**
1185
- * List actors in a conversation
1186
- *
1187
- * Returns all distinct actors who have sent at least one message in the conversation
1188
- */
1189
- static listConversationActors(options) {
1190
- return (options.client ?? client).get({
1191
- url: "/api/v1/conversations/{conversation_id}/actors",
1192
- ...options
1193
- });
1194
- }
1195
- /**
1196
1155
  * Remove a message from a conversation
1197
1156
  *
1198
1157
  * Removes a document from a conversation
@@ -1643,6 +1602,18 @@ var Formations = class {
1643
1602
  }
1644
1603
  };
1645
1604
  var Generations = class {
1605
+ /**
1606
+ * List generations
1607
+ *
1608
+ * Returns generations the caller can access, optionally filtered by agent, trace, and status. Replaces the former per-trace generations endpoint (use the trace_id query filter).
1609
+ *
1610
+ */
1611
+ static listGenerations(options) {
1612
+ return (options?.client ?? client).get({
1613
+ url: "/api/v1/generations",
1614
+ ...options
1615
+ });
1616
+ }
1646
1617
  /**
1647
1618
  * Get a generation
1648
1619
  *
@@ -1746,7 +1717,7 @@ var MemoryEntries = class {
1746
1717
  */
1747
1718
  static listMemoryEntries(options) {
1748
1719
  return (options.client ?? client).get({
1749
- url: "/api/v1/memories/{memory_id}/entries",
1720
+ url: "/api/v1/memory-entries",
1750
1721
  ...options
1751
1722
  });
1752
1723
  }
@@ -1757,7 +1728,7 @@ var MemoryEntries = class {
1757
1728
  */
1758
1729
  static createMemoryEntry(options) {
1759
1730
  return (options.client ?? client).post({
1760
- url: "/api/v1/memories/{memory_id}/entries",
1731
+ url: "/api/v1/memory-entries",
1761
1732
  ...options,
1762
1733
  headers: {
1763
1734
  "Content-Type": "application/json",
@@ -1772,7 +1743,7 @@ var MemoryEntries = class {
1772
1743
  */
1773
1744
  static deleteMemoryEntry(options) {
1774
1745
  return (options.client ?? client).delete({
1775
- url: "/api/v1/memories/{memory_id}/entries/{entry_id}",
1746
+ url: "/api/v1/memory-entries/{entry_id}",
1776
1747
  ...options
1777
1748
  });
1778
1749
  }
@@ -1783,7 +1754,7 @@ var MemoryEntries = class {
1783
1754
  */
1784
1755
  static getMemoryEntry(options) {
1785
1756
  return (options.client ?? client).get({
1786
- url: "/api/v1/memories/{memory_id}/entries/{entry_id}",
1757
+ url: "/api/v1/memory-entries/{entry_id}",
1787
1758
  ...options
1788
1759
  });
1789
1760
  }
@@ -1794,7 +1765,7 @@ var MemoryEntries = class {
1794
1765
  */
1795
1766
  static updateMemoryEntry(options) {
1796
1767
  return (options.client ?? client).put({
1797
- url: "/api/v1/memories/{memory_id}/entries/{entry_id}",
1768
+ url: "/api/v1/memory-entries/{entry_id}",
1798
1769
  ...options,
1799
1770
  headers: {
1800
1771
  "Content-Type": "application/json",
@@ -1870,22 +1841,22 @@ var Orchestrations = class {
1870
1841
  /**
1871
1842
  * List orchestration runs
1872
1843
  *
1873
- * Returns all runs for an orchestration.
1844
+ * Returns orchestration runs the caller can access, optionally filtered by orchestration.
1874
1845
  */
1875
1846
  static listOrchestrationRuns(options) {
1876
- return (options.client ?? client).get({
1877
- url: "/api/v1/orchestrations/{orchestration_id}/runs",
1847
+ return (options?.client ?? client).get({
1848
+ url: "/api/v1/orchestration-runs",
1878
1849
  ...options
1879
1850
  });
1880
1851
  }
1881
1852
  /**
1882
1853
  * Start an orchestration run
1883
1854
  *
1884
- * Creates and immediately executes a new run for the orchestration.
1855
+ * Creates and immediately executes a new run for the orchestration named by orchestration_id.
1885
1856
  */
1886
1857
  static startOrchestrationRun(options) {
1887
1858
  return (options.client ?? client).post({
1888
- url: "/api/v1/orchestrations/{orchestration_id}/runs",
1859
+ url: "/api/v1/orchestration-runs",
1889
1860
  ...options,
1890
1861
  headers: {
1891
1862
  "Content-Type": "application/json",
@@ -1900,7 +1871,7 @@ var Orchestrations = class {
1900
1871
  */
1901
1872
  static cancelOrchestrationRun(options) {
1902
1873
  return (options.client ?? client).post({
1903
- url: "/api/v1/orchestrations/{orchestration_id}/runs/{run_id}/cancel",
1874
+ url: "/api/v1/orchestration-runs/{run_id}/cancel",
1904
1875
  ...options
1905
1876
  });
1906
1877
  }
@@ -1911,7 +1882,7 @@ var Orchestrations = class {
1911
1882
  */
1912
1883
  static submitHumanInput(options) {
1913
1884
  return (options.client ?? client).post({
1914
- url: "/api/v1/orchestrations/{orchestration_id}/runs/{run_id}/human-input",
1885
+ url: "/api/v1/orchestration-runs/{run_id}/human-input",
1915
1886
  ...options,
1916
1887
  headers: {
1917
1888
  "Content-Type": "application/json",
@@ -1926,7 +1897,7 @@ var Orchestrations = class {
1926
1897
  */
1927
1898
  static resumeOrchestrationRun(options) {
1928
1899
  return (options.client ?? client).post({
1929
- url: "/api/v1/orchestrations/{orchestration_id}/runs/{run_id}/resume",
1900
+ url: "/api/v1/orchestration-runs/{run_id}/resume",
1930
1901
  ...options
1931
1902
  });
1932
1903
  }
@@ -1937,7 +1908,7 @@ var Orchestrations = class {
1937
1908
  */
1938
1909
  static getOrchestrationRun(options) {
1939
1910
  return (options.client ?? client).get({
1940
- url: "/api/v1/orchestrations/{orchestration_id}/runs/{run_id}",
1911
+ url: "/api/v1/orchestration-runs/{run_id}",
1941
1912
  ...options
1942
1913
  });
1943
1914
  }
@@ -1946,7 +1917,8 @@ var Policies = class {
1946
1917
  /**
1947
1918
  * List all policies
1948
1919
  *
1949
- * Returns a list of all global policies. Requires admin role.
1920
+ * Returns global policies. Requires admin role. Pass user_id to list only the policies attached to that user (replaces the former per-user policies endpoint).
1921
+ *
1950
1922
  */
1951
1923
  static listPolicies(options) {
1952
1924
  return (options?.client ?? client).get({
@@ -2131,11 +2103,11 @@ var Sessions = class {
2131
2103
  /**
2132
2104
  * List sessions
2133
2105
  *
2134
- * Returns sessions for the specified agent, optionally filtered by actorId and status.
2106
+ * Returns sessions the caller can access, optionally filtered by agent, actor and status.
2135
2107
  */
2136
- static listAgentSessions(options) {
2137
- return (options.client ?? client).get({
2138
- url: "/api/v1/agents/{agent_id}/sessions",
2108
+ static listSessions(options) {
2109
+ return (options?.client ?? client).get({
2110
+ url: "/api/v1/sessions",
2139
2111
  ...options
2140
2112
  });
2141
2113
  }
@@ -2145,13 +2117,13 @@ var Sessions = class {
2145
2117
  * Creates a new session for the specified agent. Internally creates a conversation and two actors (agent + user) so the caller only needs this single call to start interacting with the agent.
2146
2118
  *
2147
2119
  */
2148
- static createAgentSession(options) {
2149
- return (options.client ?? client).post({
2150
- url: "/api/v1/agents/{agent_id}/sessions",
2120
+ static createSession(options) {
2121
+ return (options?.client ?? client).post({
2122
+ url: "/api/v1/sessions",
2151
2123
  ...options,
2152
2124
  headers: {
2153
2125
  "Content-Type": "application/json",
2154
- ...options.headers
2126
+ ...options?.headers
2155
2127
  }
2156
2128
  });
2157
2129
  }
@@ -2160,9 +2132,9 @@ var Sessions = class {
2160
2132
  *
2161
2133
  * Deletes the session and its underlying conversation and actors.
2162
2134
  */
2163
- static deleteAgentSession(options) {
2135
+ static deleteSession(options) {
2164
2136
  return (options.client ?? client).delete({
2165
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}",
2137
+ url: "/api/v1/sessions/{session_id}",
2166
2138
  ...options
2167
2139
  });
2168
2140
  }
@@ -2171,9 +2143,9 @@ var Sessions = class {
2171
2143
  *
2172
2144
  * Returns details of a single session.
2173
2145
  */
2174
- static getAgentSession(options) {
2146
+ static getSession(options) {
2175
2147
  return (options.client ?? client).get({
2176
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}",
2148
+ url: "/api/v1/sessions/{session_id}",
2177
2149
  ...options
2178
2150
  });
2179
2151
  }
@@ -2184,7 +2156,7 @@ var Sessions = class {
2184
2156
  */
2185
2157
  static updateSession(options) {
2186
2158
  return (options.client ?? client).patch({
2187
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}",
2159
+ url: "/api/v1/sessions/{session_id}",
2188
2160
  ...options,
2189
2161
  headers: {
2190
2162
  "Content-Type": "application/json",
@@ -2193,18 +2165,6 @@ var Sessions = class {
2193
2165
  });
2194
2166
  }
2195
2167
  /**
2196
- * List session messages
2197
- *
2198
- * Returns messages in the session with simplified roles (user/assistant) instead of raw actor IDs.
2199
- *
2200
- */
2201
- static listAgentSessionMessages(options) {
2202
- return (options.client ?? client).get({
2203
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}/messages",
2204
- ...options
2205
- });
2206
- }
2207
- /**
2208
2168
  * Add a user message
2209
2169
  *
2210
2170
  * Saves a user message to the session. When autoGenerate is enabled on the session and no generation is currently in progress, generation is triggered automatically and the response mirrors GenerateSessionResponse. Otherwise returns the saved user message.
@@ -2212,7 +2172,7 @@ var Sessions = class {
2212
2172
  */
2213
2173
  static addSessionMessage(options) {
2214
2174
  return (options.client ?? client).post({
2215
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}/messages",
2175
+ url: "/api/v1/sessions/{session_id}/messages",
2216
2176
  ...options,
2217
2177
  headers: {
2218
2178
  "Content-Type": "application/json",
@@ -2228,7 +2188,7 @@ var Sessions = class {
2228
2188
  */
2229
2189
  static generateSessionResponse(options) {
2230
2190
  return (options.client ?? client).post({
2231
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}/generate",
2191
+ url: "/api/v1/sessions/{session_id}/generate",
2232
2192
  ...options,
2233
2193
  headers: {
2234
2194
  "Content-Type": "application/json",
@@ -2244,7 +2204,7 @@ var Sessions = class {
2244
2204
  */
2245
2205
  static submitSessionToolOutputs(options) {
2246
2206
  return (options.client ?? client).post({
2247
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}/tool-outputs",
2207
+ url: "/api/v1/sessions/{session_id}/tool-outputs",
2248
2208
  ...options,
2249
2209
  headers: {
2250
2210
  "Content-Type": "application/json",
@@ -2259,7 +2219,7 @@ var Sessions = class {
2259
2219
  */
2260
2220
  static getSessionTags(options) {
2261
2221
  return (options.client ?? client).get({
2262
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}/tags",
2222
+ url: "/api/v1/sessions/{session_id}/tags",
2263
2223
  ...options
2264
2224
  });
2265
2225
  }
@@ -2270,7 +2230,7 @@ var Sessions = class {
2270
2230
  */
2271
2231
  static mergeSessionTags(options) {
2272
2232
  return (options.client ?? client).patch({
2273
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}/tags",
2233
+ url: "/api/v1/sessions/{session_id}/tags",
2274
2234
  ...options,
2275
2235
  headers: {
2276
2236
  "Content-Type": "application/json",
@@ -2285,7 +2245,7 @@ var Sessions = class {
2285
2245
  */
2286
2246
  static replaceSessionTags(options) {
2287
2247
  return (options.client ?? client).put({
2288
- url: "/api/v1/agents/{agent_id}/sessions/{session_id}/tags",
2248
+ url: "/api/v1/sessions/{session_id}/tags",
2289
2249
  ...options,
2290
2250
  headers: {
2291
2251
  "Content-Type": "application/json",
@@ -2412,17 +2372,6 @@ var Traces = class {
2412
2372
  ...options
2413
2373
  });
2414
2374
  }
2415
- /**
2416
- * Get generation IDs for a trace
2417
- *
2418
- * Returns all generation IDs associated with the trace.
2419
- */
2420
- static getTraceGenerations(options) {
2421
- return (options.client ?? client).get({
2422
- url: "/api/v1/traces/{trace_id}/generations",
2423
- ...options
2424
- });
2425
- }
2426
2375
  };
2427
2376
  var Users = class {
2428
2377
  /**
@@ -2515,17 +2464,6 @@ var Users = class {
2515
2464
  });
2516
2465
  }
2517
2466
  /**
2518
- * Get policies attached to a user
2519
- *
2520
- * Returns the list of policies attached to a user. Requires admin role.
2521
- */
2522
- static getUserPolicies(options) {
2523
- return (options.client ?? client).get({
2524
- url: "/api/v1/users/{user_id}/policies",
2525
- ...options
2526
- });
2527
- }
2528
- /**
2529
2467
  * Attach policies to a user
2530
2468
  *
2531
2469
  * Replaces the user's policy list with the provided policy IDs. Requires admin role.
@@ -2606,13 +2544,13 @@ var Webhooks = class {
2606
2544
  });
2607
2545
  }
2608
2546
  /**
2609
- * List deliveries for a webhook
2547
+ * List webhook deliveries
2610
2548
  *
2611
- * Lists all event deliveries for a specific webhook
2549
+ * Lists event deliveries for a webhook (webhook_id is required).
2612
2550
  */
2613
2551
  static listWebhookDeliveries(options) {
2614
2552
  return (options.client ?? client).get({
2615
- url: "/api/v1/webhooks/{webhook_id}/deliveries",
2553
+ url: "/api/v1/webhook-deliveries",
2616
2554
  ...options
2617
2555
  });
2618
2556
  }
@@ -2623,7 +2561,7 @@ var Webhooks = class {
2623
2561
  */
2624
2562
  static getWebhookDelivery(options) {
2625
2563
  return (options.client ?? client).get({
2626
- url: "/api/v1/webhooks/{webhook_id}/deliveries/{delivery_id}",
2564
+ url: "/api/v1/webhook-deliveries/{delivery_id}",
2627
2565
  ...options
2628
2566
  });
2629
2567
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soat/sdk",
3
- "version": "0.12.5",
3
+ "version": "0.13.0",
4
4
  "description": "TypeScript SDK for the SOAT API",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",