@vertesia/client 0.24.0-dev.202601221707

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.
Files changed (339) hide show
  1. package/LICENSE +13 -0
  2. package/README.md +110 -0
  3. package/lib/cjs/AccountApi.js +85 -0
  4. package/lib/cjs/AccountApi.js.map +1 -0
  5. package/lib/cjs/AccountsApi.js +16 -0
  6. package/lib/cjs/AccountsApi.js.map +1 -0
  7. package/lib/cjs/AnalyticsApi.js +41 -0
  8. package/lib/cjs/AnalyticsApi.js.map +1 -0
  9. package/lib/cjs/ApiKeysApi.js +63 -0
  10. package/lib/cjs/ApiKeysApi.js.map +1 -0
  11. package/lib/cjs/AppsApi.js +119 -0
  12. package/lib/cjs/AppsApi.js.map +1 -0
  13. package/lib/cjs/CommandsApi.js +19 -0
  14. package/lib/cjs/CommandsApi.js.map +1 -0
  15. package/lib/cjs/EnvironmentsApi.js +72 -0
  16. package/lib/cjs/EnvironmentsApi.js.map +1 -0
  17. package/lib/cjs/GroupsApi.js +78 -0
  18. package/lib/cjs/GroupsApi.js.map +1 -0
  19. package/lib/cjs/IamApi.js +53 -0
  20. package/lib/cjs/IamApi.js.map +1 -0
  21. package/lib/cjs/InteractionBase.js +44 -0
  22. package/lib/cjs/InteractionBase.js.map +1 -0
  23. package/lib/cjs/InteractionCatalogApi.js +64 -0
  24. package/lib/cjs/InteractionCatalogApi.js.map +1 -0
  25. package/lib/cjs/InteractionOutput.js +300 -0
  26. package/lib/cjs/InteractionOutput.js.map +1 -0
  27. package/lib/cjs/InteractionResult.example.js +57 -0
  28. package/lib/cjs/InteractionResult.example.js.map +1 -0
  29. package/lib/cjs/InteractionsApi.js +262 -0
  30. package/lib/cjs/InteractionsApi.js.map +1 -0
  31. package/lib/cjs/MCPOAuthApi.js +62 -0
  32. package/lib/cjs/MCPOAuthApi.js.map +1 -0
  33. package/lib/cjs/ProjectsApi.js +72 -0
  34. package/lib/cjs/ProjectsApi.js.map +1 -0
  35. package/lib/cjs/PromptsApi.js +133 -0
  36. package/lib/cjs/PromptsApi.js.map +1 -0
  37. package/lib/cjs/RefsApi.js +14 -0
  38. package/lib/cjs/RefsApi.js.map +1 -0
  39. package/lib/cjs/RunsApi.js +113 -0
  40. package/lib/cjs/RunsApi.js.map +1 -0
  41. package/lib/cjs/SkillsApi.js +39 -0
  42. package/lib/cjs/SkillsApi.js.map +1 -0
  43. package/lib/cjs/StreamSource.js +17 -0
  44. package/lib/cjs/StreamSource.js.map +1 -0
  45. package/lib/cjs/TrainingApi.js +54 -0
  46. package/lib/cjs/TrainingApi.js.map +1 -0
  47. package/lib/cjs/UsersApi.js +13 -0
  48. package/lib/cjs/UsersApi.js.map +1 -0
  49. package/lib/cjs/client.js +360 -0
  50. package/lib/cjs/client.js.map +1 -0
  51. package/lib/cjs/execute.js +158 -0
  52. package/lib/cjs/execute.js.map +1 -0
  53. package/lib/cjs/index.js +22 -0
  54. package/lib/cjs/index.js.map +1 -0
  55. package/lib/cjs/nodejs/NodeStreamSource.js +45 -0
  56. package/lib/cjs/nodejs/NodeStreamSource.js.map +1 -0
  57. package/lib/cjs/nodejs/index.js +18 -0
  58. package/lib/cjs/nodejs/index.js.map +1 -0
  59. package/lib/cjs/package.json +3 -0
  60. package/lib/cjs/store/AnalyzeDocApi.js +56 -0
  61. package/lib/cjs/store/AnalyzeDocApi.js.map +1 -0
  62. package/lib/cjs/store/CollectionsApi.js +131 -0
  63. package/lib/cjs/store/CollectionsApi.js.map +1 -0
  64. package/lib/cjs/store/CommandsApi.js +17 -0
  65. package/lib/cjs/store/CommandsApi.js.map +1 -0
  66. package/lib/cjs/store/DashboardApi.js +182 -0
  67. package/lib/cjs/store/DashboardApi.js.map +1 -0
  68. package/lib/cjs/store/DataApi.js +433 -0
  69. package/lib/cjs/store/DataApi.js.map +1 -0
  70. package/lib/cjs/store/EmailApi.js +103 -0
  71. package/lib/cjs/store/EmailApi.js.map +1 -0
  72. package/lib/cjs/store/EmbeddingsApi.js +29 -0
  73. package/lib/cjs/store/EmbeddingsApi.js.map +1 -0
  74. package/lib/cjs/store/FilesApi.js +237 -0
  75. package/lib/cjs/store/FilesApi.js.map +1 -0
  76. package/lib/cjs/store/ObjectsApi.js +314 -0
  77. package/lib/cjs/store/ObjectsApi.js.map +1 -0
  78. package/lib/cjs/store/PendingAsksApi.js +43 -0
  79. package/lib/cjs/store/PendingAsksApi.js.map +1 -0
  80. package/lib/cjs/store/SchedulesApi.js +103 -0
  81. package/lib/cjs/store/SchedulesApi.js.map +1 -0
  82. package/lib/cjs/store/ToolsApi.js +21 -0
  83. package/lib/cjs/store/ToolsApi.js.map +1 -0
  84. package/lib/cjs/store/TypesApi.js +57 -0
  85. package/lib/cjs/store/TypesApi.js.map +1 -0
  86. package/lib/cjs/store/WorkersApi.js +16 -0
  87. package/lib/cjs/store/WorkersApi.js.map +1 -0
  88. package/lib/cjs/store/WorkflowsApi.js +596 -0
  89. package/lib/cjs/store/WorkflowsApi.js.map +1 -0
  90. package/lib/cjs/store/client.js +81 -0
  91. package/lib/cjs/store/client.js.map +1 -0
  92. package/lib/cjs/store/errors.js +11 -0
  93. package/lib/cjs/store/errors.js.map +1 -0
  94. package/lib/cjs/store/index.js +27 -0
  95. package/lib/cjs/store/index.js.map +1 -0
  96. package/lib/cjs/store/version.js +6 -0
  97. package/lib/cjs/store/version.js.map +1 -0
  98. package/lib/esm/AccountApi.js +82 -0
  99. package/lib/esm/AccountApi.js.map +1 -0
  100. package/lib/esm/AccountsApi.js +13 -0
  101. package/lib/esm/AccountsApi.js.map +1 -0
  102. package/lib/esm/AnalyticsApi.js +38 -0
  103. package/lib/esm/AnalyticsApi.js.map +1 -0
  104. package/lib/esm/ApiKeysApi.js +59 -0
  105. package/lib/esm/ApiKeysApi.js.map +1 -0
  106. package/lib/esm/AppsApi.js +116 -0
  107. package/lib/esm/AppsApi.js.map +1 -0
  108. package/lib/esm/CommandsApi.js +16 -0
  109. package/lib/esm/CommandsApi.js.map +1 -0
  110. package/lib/esm/EnvironmentsApi.js +69 -0
  111. package/lib/esm/EnvironmentsApi.js.map +1 -0
  112. package/lib/esm/GroupsApi.js +74 -0
  113. package/lib/esm/GroupsApi.js.map +1 -0
  114. package/lib/esm/IamApi.js +47 -0
  115. package/lib/esm/IamApi.js.map +1 -0
  116. package/lib/esm/InteractionBase.js +40 -0
  117. package/lib/esm/InteractionBase.js.map +1 -0
  118. package/lib/esm/InteractionCatalogApi.js +60 -0
  119. package/lib/esm/InteractionCatalogApi.js.map +1 -0
  120. package/lib/esm/InteractionOutput.js +293 -0
  121. package/lib/esm/InteractionOutput.js.map +1 -0
  122. package/lib/esm/InteractionResult.example.js +55 -0
  123. package/lib/esm/InteractionResult.example.js.map +1 -0
  124. package/lib/esm/InteractionsApi.js +259 -0
  125. package/lib/esm/InteractionsApi.js.map +1 -0
  126. package/lib/esm/MCPOAuthApi.js +59 -0
  127. package/lib/esm/MCPOAuthApi.js.map +1 -0
  128. package/lib/esm/ProjectsApi.js +69 -0
  129. package/lib/esm/ProjectsApi.js.map +1 -0
  130. package/lib/esm/PromptsApi.js +130 -0
  131. package/lib/esm/PromptsApi.js.map +1 -0
  132. package/lib/esm/RefsApi.js +10 -0
  133. package/lib/esm/RefsApi.js.map +1 -0
  134. package/lib/esm/RunsApi.js +109 -0
  135. package/lib/esm/RunsApi.js.map +1 -0
  136. package/lib/esm/SkillsApi.js +36 -0
  137. package/lib/esm/SkillsApi.js.map +1 -0
  138. package/lib/esm/StreamSource.js +13 -0
  139. package/lib/esm/StreamSource.js.map +1 -0
  140. package/lib/esm/TrainingApi.js +51 -0
  141. package/lib/esm/TrainingApi.js.map +1 -0
  142. package/lib/esm/UsersApi.js +10 -0
  143. package/lib/esm/UsersApi.js.map +1 -0
  144. package/lib/esm/client.js +351 -0
  145. package/lib/esm/client.js.map +1 -0
  146. package/lib/esm/execute.js +118 -0
  147. package/lib/esm/execute.js.map +1 -0
  148. package/lib/esm/index.js +6 -0
  149. package/lib/esm/index.js.map +1 -0
  150. package/lib/esm/nodejs/NodeStreamSource.js +41 -0
  151. package/lib/esm/nodejs/NodeStreamSource.js.map +1 -0
  152. package/lib/esm/nodejs/index.js +2 -0
  153. package/lib/esm/nodejs/index.js.map +1 -0
  154. package/lib/esm/store/AnalyzeDocApi.js +52 -0
  155. package/lib/esm/store/AnalyzeDocApi.js.map +1 -0
  156. package/lib/esm/store/CollectionsApi.js +127 -0
  157. package/lib/esm/store/CollectionsApi.js.map +1 -0
  158. package/lib/esm/store/CommandsApi.js +13 -0
  159. package/lib/esm/store/CommandsApi.js.map +1 -0
  160. package/lib/esm/store/DashboardApi.js +178 -0
  161. package/lib/esm/store/DashboardApi.js.map +1 -0
  162. package/lib/esm/store/DataApi.js +429 -0
  163. package/lib/esm/store/DataApi.js.map +1 -0
  164. package/lib/esm/store/EmailApi.js +99 -0
  165. package/lib/esm/store/EmailApi.js.map +1 -0
  166. package/lib/esm/store/EmbeddingsApi.js +25 -0
  167. package/lib/esm/store/EmbeddingsApi.js.map +1 -0
  168. package/lib/esm/store/FilesApi.js +231 -0
  169. package/lib/esm/store/FilesApi.js.map +1 -0
  170. package/lib/esm/store/ObjectsApi.js +309 -0
  171. package/lib/esm/store/ObjectsApi.js.map +1 -0
  172. package/lib/esm/store/PendingAsksApi.js +39 -0
  173. package/lib/esm/store/PendingAsksApi.js.map +1 -0
  174. package/lib/esm/store/SchedulesApi.js +99 -0
  175. package/lib/esm/store/SchedulesApi.js.map +1 -0
  176. package/lib/esm/store/ToolsApi.js +17 -0
  177. package/lib/esm/store/ToolsApi.js.map +1 -0
  178. package/lib/esm/store/TypesApi.js +53 -0
  179. package/lib/esm/store/TypesApi.js.map +1 -0
  180. package/lib/esm/store/WorkersApi.js +12 -0
  181. package/lib/esm/store/WorkersApi.js.map +1 -0
  182. package/lib/esm/store/WorkflowsApi.js +590 -0
  183. package/lib/esm/store/WorkflowsApi.js.map +1 -0
  184. package/lib/esm/store/client.js +77 -0
  185. package/lib/esm/store/client.js.map +1 -0
  186. package/lib/esm/store/errors.js +7 -0
  187. package/lib/esm/store/errors.js.map +1 -0
  188. package/lib/esm/store/index.js +11 -0
  189. package/lib/esm/store/index.js.map +1 -0
  190. package/lib/esm/store/version.js +3 -0
  191. package/lib/esm/store/version.js.map +1 -0
  192. package/lib/tsconfig.tsbuildinfo +1 -0
  193. package/lib/types/AccountApi.d.ts +59 -0
  194. package/lib/types/AccountApi.d.ts.map +1 -0
  195. package/lib/types/AccountsApi.d.ts +7 -0
  196. package/lib/types/AccountsApi.d.ts.map +1 -0
  197. package/lib/types/AnalyticsApi.d.ts +11 -0
  198. package/lib/types/AnalyticsApi.d.ts.map +1 -0
  199. package/lib/types/ApiKeysApi.d.ts +42 -0
  200. package/lib/types/ApiKeysApi.d.ts.map +1 -0
  201. package/lib/types/AppsApi.d.ts +65 -0
  202. package/lib/types/AppsApi.d.ts.map +1 -0
  203. package/lib/types/CommandsApi.d.ts +10 -0
  204. package/lib/types/CommandsApi.d.ts.map +1 -0
  205. package/lib/types/EnvironmentsApi.d.ts +40 -0
  206. package/lib/types/EnvironmentsApi.d.ts.map +1 -0
  207. package/lib/types/GroupsApi.d.ts +65 -0
  208. package/lib/types/GroupsApi.d.ts.map +1 -0
  209. package/lib/types/IamApi.d.ts +41 -0
  210. package/lib/types/IamApi.d.ts.map +1 -0
  211. package/lib/types/InteractionBase.d.ts +22 -0
  212. package/lib/types/InteractionBase.d.ts.map +1 -0
  213. package/lib/types/InteractionCatalogApi.d.ts +36 -0
  214. package/lib/types/InteractionCatalogApi.d.ts.map +1 -0
  215. package/lib/types/InteractionOutput.d.ts +174 -0
  216. package/lib/types/InteractionOutput.d.ts.map +1 -0
  217. package/lib/types/InteractionResult.example.d.ts +6 -0
  218. package/lib/types/InteractionResult.example.d.ts.map +1 -0
  219. package/lib/types/InteractionsApi.d.ts +183 -0
  220. package/lib/types/InteractionsApi.d.ts.map +1 -0
  221. package/lib/types/MCPOAuthApi.d.ts +45 -0
  222. package/lib/types/MCPOAuthApi.d.ts.map +1 -0
  223. package/lib/types/ProjectsApi.d.ts +28 -0
  224. package/lib/types/ProjectsApi.d.ts.map +1 -0
  225. package/lib/types/PromptsApi.d.ts +106 -0
  226. package/lib/types/PromptsApi.d.ts.map +1 -0
  227. package/lib/types/RefsApi.d.ts +6 -0
  228. package/lib/types/RefsApi.d.ts.map +1 -0
  229. package/lib/types/RunsApi.d.ts +79 -0
  230. package/lib/types/RunsApi.d.ts.map +1 -0
  231. package/lib/types/SkillsApi.d.ts +26 -0
  232. package/lib/types/SkillsApi.d.ts.map +1 -0
  233. package/lib/types/StreamSource.d.ts +7 -0
  234. package/lib/types/StreamSource.d.ts.map +1 -0
  235. package/lib/types/TrainingApi.d.ts +27 -0
  236. package/lib/types/TrainingApi.d.ts.map +1 -0
  237. package/lib/types/UsersApi.d.ts +6 -0
  238. package/lib/types/UsersApi.d.ts.map +1 -0
  239. package/lib/types/client.d.ts +136 -0
  240. package/lib/types/client.d.ts.map +1 -0
  241. package/lib/types/execute.d.ts +37 -0
  242. package/lib/types/execute.d.ts.map +1 -0
  243. package/lib/types/index.d.ts +10 -0
  244. package/lib/types/index.d.ts.map +1 -0
  245. package/lib/types/nodejs/NodeStreamSource.d.ts +9 -0
  246. package/lib/types/nodejs/NodeStreamSource.d.ts.map +1 -0
  247. package/lib/types/nodejs/index.d.ts +1 -0
  248. package/lib/types/nodejs/index.d.ts.map +1 -0
  249. package/lib/types/store/AnalyzeDocApi.d.ts +17 -0
  250. package/lib/types/store/AnalyzeDocApi.d.ts.map +1 -0
  251. package/lib/types/store/CollectionsApi.d.ts +82 -0
  252. package/lib/types/store/CollectionsApi.d.ts.map +1 -0
  253. package/lib/types/store/CommandsApi.d.ts +10 -0
  254. package/lib/types/store/CommandsApi.d.ts.map +1 -0
  255. package/lib/types/store/DashboardApi.d.ts +149 -0
  256. package/lib/types/store/DashboardApi.d.ts.map +1 -0
  257. package/lib/types/store/DataApi.d.ts +392 -0
  258. package/lib/types/store/DataApi.d.ts.map +1 -0
  259. package/lib/types/store/EmailApi.d.ts +185 -0
  260. package/lib/types/store/EmailApi.d.ts.map +1 -0
  261. package/lib/types/store/EmbeddingsApi.d.ts +12 -0
  262. package/lib/types/store/EmbeddingsApi.d.ts.map +1 -0
  263. package/lib/types/store/FilesApi.d.ts +110 -0
  264. package/lib/types/store/FilesApi.d.ts.map +1 -0
  265. package/lib/types/store/ObjectsApi.d.ts +139 -0
  266. package/lib/types/store/ObjectsApi.d.ts.map +1 -0
  267. package/lib/types/store/PendingAsksApi.d.ts +79 -0
  268. package/lib/types/store/PendingAsksApi.d.ts.map +1 -0
  269. package/lib/types/store/SchedulesApi.d.ts +89 -0
  270. package/lib/types/store/SchedulesApi.d.ts.map +1 -0
  271. package/lib/types/store/ToolsApi.d.ts +13 -0
  272. package/lib/types/store/ToolsApi.d.ts.map +1 -0
  273. package/lib/types/store/TypesApi.d.ts +23 -0
  274. package/lib/types/store/TypesApi.d.ts.map +1 -0
  275. package/lib/types/store/WorkersApi.d.ts +6 -0
  276. package/lib/types/store/WorkersApi.d.ts.map +1 -0
  277. package/lib/types/store/WorkflowsApi.d.ts +167 -0
  278. package/lib/types/store/WorkflowsApi.d.ts.map +1 -0
  279. package/lib/types/store/client.d.ts +45 -0
  280. package/lib/types/store/client.d.ts.map +1 -0
  281. package/lib/types/store/errors.d.ts +4 -0
  282. package/lib/types/store/errors.d.ts.map +1 -0
  283. package/lib/types/store/index.d.ts +10 -0
  284. package/lib/types/store/index.d.ts.map +1 -0
  285. package/lib/types/store/version.d.ts +2 -0
  286. package/lib/types/store/version.d.ts.map +1 -0
  287. package/lib/vertesia-client.js +2 -0
  288. package/lib/vertesia-client.js.map +1 -0
  289. package/package.json +71 -0
  290. package/src/AccountApi.ts +96 -0
  291. package/src/AccountsApi.ts +22 -0
  292. package/src/AnalyticsApi.ts +36 -0
  293. package/src/ApiKeysApi.ts +67 -0
  294. package/src/AppsApi.ts +134 -0
  295. package/src/CommandsApi.ts +23 -0
  296. package/src/EnvironmentsApi.ts +94 -0
  297. package/src/GroupsApi.ts +92 -0
  298. package/src/IamApi.ts +70 -0
  299. package/src/InteractionBase.ts +44 -0
  300. package/src/InteractionCatalogApi.ts +72 -0
  301. package/src/InteractionOutput.test.ts +305 -0
  302. package/src/InteractionOutput.ts +328 -0
  303. package/src/InteractionResult.example.ts +72 -0
  304. package/src/InteractionsApi.ts +308 -0
  305. package/src/MCPOAuthApi.ts +67 -0
  306. package/src/ProjectsApi.ts +85 -0
  307. package/src/PromptsApi.ts +160 -0
  308. package/src/RefsApi.ts +18 -0
  309. package/src/RunsApi.ts +151 -0
  310. package/src/SkillsApi.ts +46 -0
  311. package/src/StreamSource.ts +3 -0
  312. package/src/TrainingApi.ts +71 -0
  313. package/src/UsersApi.ts +18 -0
  314. package/src/client.test.ts +99 -0
  315. package/src/client.ts +419 -0
  316. package/src/execute.ts +126 -0
  317. package/src/index.ts +10 -0
  318. package/src/nodejs/NodeStreamSource.ts +43 -0
  319. package/src/nodejs/index.ts +1 -0
  320. package/src/store/AnalyzeDocApi.ts +61 -0
  321. package/src/store/CollectionsApi.ts +166 -0
  322. package/src/store/CommandsApi.ts +15 -0
  323. package/src/store/DashboardApi.ts +216 -0
  324. package/src/store/DataApi.ts +516 -0
  325. package/src/store/EmailApi.ts +211 -0
  326. package/src/store/EmbeddingsApi.ts +39 -0
  327. package/src/store/FilesApi.ts +288 -0
  328. package/src/store/ObjectsApi.ts +432 -0
  329. package/src/store/PendingAsksApi.ts +98 -0
  330. package/src/store/SchedulesApi.ts +114 -0
  331. package/src/store/ToolsApi.ts +19 -0
  332. package/src/store/TypesApi.ts +65 -0
  333. package/src/store/WorkersApi.ts +17 -0
  334. package/src/store/WorkflowsApi.ts +752 -0
  335. package/src/store/client.ts +95 -0
  336. package/src/store/errors.ts +7 -0
  337. package/src/store/index.ts +11 -0
  338. package/src/store/version.ts +2 -0
  339. package/tsconfig.dist.json +20 -0
@@ -0,0 +1,106 @@
1
+ import { ComputePromptFacetPayload, PromptSearchPayload, PromptTemplate, PromptTemplateForkPayload, PromptTemplateCreatePayload, PromptTemplateRef, PromptTemplateUpdatePayload } from "@vertesia/common";
2
+ import { ApiTopic, ClientBase } from "@vertesia/api-fetch-client";
3
+ export interface ComputePromptFacetsResponse {
4
+ role?: {
5
+ _id: string;
6
+ count: number;
7
+ }[];
8
+ total?: {
9
+ count: number;
10
+ }[];
11
+ }
12
+ export default class PromptsApi extends ApiTopic {
13
+ constructor(parent: ClientBase);
14
+ /**
15
+ * Get the list of all prompt templates
16
+ * @param payload query payload to filter search
17
+ * @returns PromptTemplateRef[]
18
+ **/
19
+ list(payload?: PromptSearchPayload): Promise<PromptTemplateRef[]>;
20
+ /**
21
+ * Get the list of all prompt facets
22
+ * @param payload query payload to filter facet search
23
+ * @returns ComputePromptFacetsResponse[]
24
+ **/
25
+ computeFacets(query: ComputePromptFacetPayload): Promise<ComputePromptFacetsResponse>;
26
+ /**
27
+ * Create a new prompt template
28
+ * @param payload PromptTemplateCreatePayload
29
+ * @returns PromptTemplate
30
+ * @throws ApiError
31
+ * @throws 400 if payload is invalid
32
+ * @throws 500 if creation fails
33
+ **/
34
+ create(payload: PromptTemplateCreatePayload): Promise<PromptTemplate>;
35
+ /**
36
+ * Retrieve an existing prompt template
37
+ * @param id of the prompt template to retrieve
38
+ * @returns PromptTemplate
39
+ **/
40
+ retrieve(id: string): Promise<PromptTemplate>;
41
+ /**
42
+ * Update an existing prompt template
43
+ * @param id of the prompt template to update
44
+ * @param payload PromptTemplateCreatePayload
45
+ * @returns PromptTemplate
46
+ * @throws ApiError
47
+ * @throws 400 if payload is invalid
48
+ * @throws 500 if update fails
49
+ * @throws 404 if not found
50
+ **/
51
+ update(id: string, payload: PromptTemplateUpdatePayload): Promise<PromptTemplate>;
52
+ /**
53
+ * Delete an existing prompt template
54
+ * @param id of the prompt template to delete
55
+ * @returns void
56
+ */
57
+ delete(id: string): Promise<void>;
58
+ /**
59
+ * Fork an existing prompt template
60
+ * @param id of the prompt template to fork
61
+ * @param payload PromptTemplateForkPayload
62
+ * @returns Forked PromptTemplate
63
+ */
64
+ fork(id: string, payload: PromptTemplateForkPayload): Promise<PromptTemplate>;
65
+ /**
66
+ * Render a prompt template
67
+ * @param id of the prompt template to render
68
+ * @param payload that will be passed to the prompt template to generate the prompts
69
+ * @returns PromptTemplate
70
+ * @throws ApiError
71
+ * @throws 404 if not found
72
+ * @throws 400 if payload is invalid
73
+ * @throws 500 if render fails
74
+ **/
75
+ render(id: string, payload: {}): Promise<PromptTemplate>;
76
+ /**
77
+ * Get options for a field
78
+ * @param field name to get options for
79
+ * @returns string[]
80
+ */
81
+ options(field: string): Promise<string[]>;
82
+ /**
83
+ * List the versions of the prompt template. Returns an empty array if no versions are found
84
+ * @param id
85
+ * @returns the versions list or an empty array if no versions are found
86
+ */
87
+ listVersions(id: string): Promise<PromptTemplateRef[]>;
88
+ /**
89
+ * Retrieve list of interactions that use the prompt template
90
+ */
91
+ listInteractions(id: string): Promise<ListInteractionsResponse>;
92
+ /**
93
+ * List the forks of the prompt. Returns an empty array if no forks are found
94
+ * @param id of the prompt to search forks
95
+ * @returns the versions list or an empty array if no forks are found
96
+ */
97
+ listForks(id: string): Promise<PromptTemplateRef[]>;
98
+ }
99
+ export interface ListInteractionsResponse {
100
+ prompt: string;
101
+ interactions: {
102
+ id: string;
103
+ name: string;
104
+ versions: string[];
105
+ }[];
106
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PromptsApi.d.ts","sourceRoot":"","sources":["../../src/PromptsApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAqB,cAAc,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAC7N,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAElE,MAAM,WAAW,2BAA2B;IACxC,IAAI,CAAC,EAAE;QAAE,GAAG,EAAE,M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AAwB,CAAC;IAI/D;;;;OAIG;IACH,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;CAItD;AAED,MAAM,WAAW,wBAAwB;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE;QACV,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,EAAE,CAAC;KACtB,EAAE,CAAA;CACN"}
@@ -0,0 +1,6 @@
1
+ import { ResolvableRef, ResourceRef } from "@vertesia/common";
2
+ import { ApiTopic, ClientBase } from "@vertesia/api-fetch-client";
3
+ export declare class RefsApi extends ApiTopic {
4
+ constructor(parent: ClientBase);
5
+ resolve(refs: ResolvableRef[]): Promise<ResourceRef[]>;
6
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RefsApi.d.ts","sourceRoot":"","sources":["../../src/RefsApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC7D,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AAGjE,qBAAa,OAAQ,SAAQ,QAAQ;gBAErB,MAAM,EAAE,UAAU;IAK9B,OAAO,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;CAMzD"}
@@ -0,0 +1,79 @@
1
+ import type { ExecutionResponse } from "@llumiverse/common";
2
+ import { ApiTopic, ClientBase } from "@vertesia/api-fetch-client";
3
+ import { CheckpointConversationPayload, ComputeRunFacetPayload, ExecutionRun, ExecutionRunRef, FindPayload, PopulatedExecutionRun, RunCreatePayload, RunListingFilters, RunListingQueryOptions, RunSearchPayload, ToolResultsPayload, UserMessagePayload } from "@vertesia/common";
4
+ import { EnhancedExecutionRun } from "./InteractionOutput.js";
5
+ export interface FilterOption {
6
+ id: string;
7
+ name: string;
8
+ count: number;
9
+ }
10
+ export interface ComputeRunFacetsResponse {
11
+ environments?: {
12
+ _id: string;
13
+ count: number;
14
+ }[];
15
+ interactions?: {
16
+ _id: string;
17
+ count: number;
18
+ }[];
19
+ models?: {
20
+ _id: string;
21
+ count: number;
22
+ }[];
23
+ tags?: {
24
+ _id: string;
25
+ count: number;
26
+ }[];
27
+ status?: {
28
+ _id: string;
29
+ count: number;
30
+ }[];
31
+ total?: {
32
+ count: number;
33
+ }[];
34
+ }
35
+ export declare class RunsApi extends ApiTopic {
36
+ constructor(parent: ClientBase);
37
+ /**
38
+ * Get the list of all runs
39
+ * @param project optional project id to filter by
40
+ * @param interaction optional interaction id to filter by
41
+ * @returns InteractionResult[]
42
+ **/
43
+ list({ limit, offset, filters }: RunListingQueryOptions): Promise<ExecutionRunRef[]>;
44
+ find(payload: FindPayload): Promise<ExecutionRun[]>;
45
+ /**
46
+ * Get a run by id
47
+ *
48
+ * @param id
49
+ * @returns InteractionResult
50
+ **/
51
+ retrieve<ResultT = any, ParamsT = any>(id: string): Promise<EnhancedExecutionRun<ResultT, ParamsT>>;
52
+ retrievePopulated<P = any>(id: string): Promise<PopulatedExecutionRun<P>>;
53
+ /**
54
+ * Get filter options for a field
55
+ * return FilterOption[]
56
+ */
57
+ filterOptions(field: string, filters: RunListingFilters): Promise<FilterOption[]>;
58
+ create<ResultT = any, ParamsT = any>(payload: RunCreatePayload): Promise<EnhancedExecutionRun<ResultT, ParamsT>>;
59
+ /**
60
+ * Send tool results and continues the conversation
61
+ * @param payload
62
+ * @returns
63
+ */
64
+ sendToolResults(payload: ToolResultsPayload): Promise<ExecutionResponse>;
65
+ /**
66
+ *
67
+ * @param payload
68
+ * @returns
69
+ */
70
+ sendUserMessage(payload: UserMessagePayload): Promise<ExecutionResponse>;
71
+ createCheckpoint(payload: CheckpointConversationPayload): Promise<ExecutionResponse>;
72
+ /**
73
+ * Get the list of all runs facets
74
+ * @param payload query payload to filter facet search
75
+ * @returns ComputeRunFacetsResponse[]
76
+ **/
77
+ computeFacets(query: ComputeRunFacetPayload): Promise<ComputeRunFacetsResponse>;
78
+ search(payload: RunSearchPayload): Promise<ExecutionRunRef[]>;
79
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RunsApi.d.ts","sourceRoot":"","sources":["../../src/RunsApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EACH,6BAA6B,EAC7B,sBAAsB,EACtB,YAAY,EACZ,eAAe,EACf,WAAW,EACX,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EACrB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,oBAAoB,EAAuB,MAAM,wBAAwB,CAAC;AAEnF,MAAM,WAAW,YAAY;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,wBAAwB;IACrC,YAAY,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAChD,YAAY,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAChD,MAAM,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC1C,IAAI,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACxC,MAAM,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC1C,K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AAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;CAKhE"}
@@ -0,0 +1,26 @@
1
+ import { ApiTopic, ClientBase } from "@vertesia/api-fetch-client";
2
+ import { InjectedSkill, SkillContext } from "@vertesia/common";
3
+ /**
4
+ * API client for skill operations.
5
+ * Skills are interactions with agent_runner_options.is_skill = true.
6
+ * They provide contextual instructions to agents by executing/rendering
7
+ * the interaction and returning the result.
8
+ */
9
+ export default class SkillsApi extends ApiTopic {
10
+ constructor(parent: ClientBase);
11
+ /**
12
+ * Find skills relevant to a given context.
13
+ * This is the core skill matching API for auto-injection.
14
+ * @param context The context to match against
15
+ * @param limit Maximum number of skills to return (default: 5)
16
+ * @returns Array of injected skills with match scores
17
+ */
18
+ findRelevant(context: SkillContext, limit?: number): Promise<InjectedSkill[]>;
19
+ /**
20
+ * Convenience method to find relevant skills by task description
21
+ * @param taskDescription The task or prompt to match
22
+ * @param toolNames Optional list of tools being used
23
+ * @returns Array of injected skills
24
+ */
25
+ findRelevantForTask(taskDescription: string, toolNames?: string[]): Promise<InjectedSkill[]>;
26
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SkillsApi.d.ts","sourceRoot":"","sources":["../../src/SkillsApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAEH,aAAa,EACb,YAAY,EACf,MAAM,kBAAkB,CAAC;AAE1B;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,QAAQ;gBAC/B,MAAM,EAAE,UAAU;IAI9B;;;;;;OAMG;IACH,YAAY,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAK7E;;;;;OAKG;IACH,mBAAmB,CACf,eAAe,EAAE,MAAM,EACvB,SAAS,CAAC,EAAE,MAAM,EAAE,GACrB,OAAO,CAAC,aAAa,EAAE,CAAC;CAM9B"}
@@ -0,0 +1,7 @@
1
+ export declare class StreamSource {
2
+ stream: ReadableStream;
3
+ name: string;
4
+ type?: string | undefined;
5
+ id?: string | undefined;
6
+ constructor(stream: ReadableStream, name: string, type?: string | undefined, id?: string | undefined);
7
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StreamSource.d.ts","sourceRoot":"","sources":["../../src/StreamSource.ts"],"names":[],"mappings":"AAAA,qBAAa,YAAY;IACF,MAAM,EAAE,cAAc;IAAS,IAAI,EAAE,MAAM;IAAS,IAAI,CAAC,EAAE,MAAM;IAAS,EAAE,CAAC,EAAE,MAAM;gBAArF,MAAM,EAAE,cAAc,EAAS,IAAI,EAAE,MAAM,EAAS,IAAI,CAAC,EAAE,MAAM,YAAA,EAAS,EAAE,CAAC,EAAE,MAAM,YAAA;CAC3G"}
@@ -0,0 +1,27 @@
1
+ import type { TrainingJob } from "@llumiverse/common";
2
+ import { ExecutionRunRef, ListTrainingSessionsQuery, TrainingSession, TrainingSessionCreatePayload, TrainingSessionRef } from "@vertesia/common";
3
+ import { ApiTopic, ClientBase } from "@vertesia/api-fetch-client";
4
+ export default class TrainingApi extends ApiTopic {
5
+ constructor(parent: ClientBase);
6
+ listSessions(query?: ListTrainingSessionsQuery): Promise<TrainingSessionRef[]>;
7
+ listSessionNames(query?: ListTrainingSessionsQuery): Promise<{
8
+ id: string;
9
+ name: string;
10
+ }[]>;
11
+ createSession(payload: TrainingSessionCreatePayload): Promise<TrainingSession>;
12
+ getSession(sessionId: string): Promise<TrainingSession>;
13
+ addToSession(sessionId: string, runs: string[]): Promise<any>;
14
+ listSessionRuns(sessionId: string, limit?: number, offset?: number): Promise<ExecutionRunRef[]>;
15
+ buildSession(sessionId: string): Promise<any>;
16
+ getDataUrl(sessionId: string): Promise<{
17
+ url: string;
18
+ }>;
19
+ getDataUploadUrl(sessionId: string, isResumable?: boolean): Promise<{
20
+ url: string;
21
+ }>;
22
+ startTraining(sessionId: string): Promise<TrainingJob>;
23
+ cancelTraining(sessionId: string): Promise<TrainingJob>;
24
+ getTrainingJob(jobId: string): Promise<TrainingJob>;
25
+ getAndSyncTrainingJob(jobId: string): Promise<TrainingJob>;
26
+ setDataset(sessionId: string, name?: string): Promise<any>;
27
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrainingApi.d.ts","sourceRoot":"","sources":["../../src/TrainingApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,yBAAyB,EAAE,eAAe,EAAE,4BAA4B,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACjJ,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAGlE,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,QAAQ;gBAEjC,MAAM,EAAE,UAAU;IAI9B,YAAY,CAAC,KAAK,GAAE,yBAA8B,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAIlF,gBAAgB,CAAC,KAAK,GAAE,yBAA8B,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAIhG,aAAa,CAAC,OAAO,EAAE,4BAA4B,GAAG,OAAO,CAAC,eAAe,CAAC;IAI9E,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAIvD,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;IAI7D,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,SAAM,EAAE,MAAM,SAAI,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAIvF,YAAY,CAAC,SAAS,EAAE,MAAM;IAI9B,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAIvD,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,UAAQ,GAAG,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAKlF,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAItD,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAIvD,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAInD,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAM1D,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,GAAE,MAAkB,GAAG,OAAO,CAAC,GAAG,CAAC;CAIxE"}
@@ -0,0 +1,6 @@
1
+ import { User } from "@vertesia/common";
2
+ import { ApiTopic, ClientBase } from "@vertesia/api-fetch-client";
3
+ export default class UsersApi extends ApiTopic {
4
+ constructor(parent: ClientBase);
5
+ retrieve(userId: string): Promise<User>;
6
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UsersApi.d.ts","sourceRoot":"","sources":["../../src/UsersApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAKlE,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,QAAQ;gBAE9B,MAAM,EAAE,UAAU;IAI9B,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAK1C"}
@@ -0,0 +1,136 @@
1
+ import { AbstractFetchClient } from "@vertesia/api-fetch-client";
2
+ import { AuthTokenPayload, AuthTokenResponse } from "@vertesia/common";
3
+ import AccountApi from "./AccountApi.js";
4
+ import AccountsApi from "./AccountsApi.js";
5
+ import AnalyticsApi from "./AnalyticsApi.js";
6
+ import { ApiKeysApi } from "./ApiKeysApi.js";
7
+ import AppsApi from "./AppsApi.js";
8
+ import CommandsApi from "./CommandsApi.js";
9
+ import EnvironmentsApi from "./EnvironmentsApi.js";
10
+ import { IamApi } from "./IamApi.js";
11
+ import InteractionsApi from "./InteractionsApi.js";
12
+ import MCPOAuthApi from "./MCPOAuthApi.js";
13
+ import ProjectsApi from "./ProjectsApi.js";
14
+ import SkillsApi from "./SkillsApi.js";
15
+ import PromptsApi from "./PromptsApi.js";
16
+ import { RefsApi } from "./RefsApi.js";
17
+ import { RunsApi } from "./RunsApi.js";
18
+ import { ZenoClient } from "./store/client.js";
19
+ import TrainingApi from "./TrainingApi.js";
20
+ import UsersApi from "./UsersApi.js";
21
+ export type VertesiaClientProps = {
22
+ /**
23
+ * The site name of Vertesia.
24
+ *
25
+ * This is used to determine the API backend. It should not include the protocol. For more
26
+ * advanced configurations, use `serverUrl` and `storeUrl` instead.
27
+ *
28
+ * @example api.vertesia.io
29
+ * @example api-preview.vertesia.io
30
+ * @example api-staging.vertesia.io
31
+ * @default api.vertesia.io
32
+ * @since 0.52.0
33
+ */
34
+ site?: "api.vertesia.io" | "api-preview.vertesia.io" | "api-staging.vertesia.io";
35
+ serverUrl?: string;
36
+ storeUrl?: string;
37
+ tokenServerUrl?: string;
38
+ apikey?: string;
39
+ projectId?: string;
40
+ sessionTags?: string | string[];
41
+ onRequest?: (request: Request) => void;
42
+ onResponse?: (response: Response) => void;
43
+ };
44
+ export declare class VertesiaClient extends AbstractFetchClient<VertesiaClient> {
45
+ /**
46
+ * The JWT token linked to the API KEY (sk or pk)
47
+ */
48
+ _jwt: string | null;
49
+ /**
50
+ * The store client
51
+ */
52
+ store: ZenoClient;
53
+ /**
54
+ * The session name will be sent when executing an interaction as a tag
55
+ */
56
+ sessionTags?: string | string[];
57
+ /**
58
+ * tokenServerUrl
59
+ */
60
+ tokenServerUrl: string;
61
+ /**
62
+ * Create a client from the given token.
63
+ * If you already have the decoded token you can pass it as the second argument to avoid decodinf it again.
64
+ *
65
+ * @param token the raw JWT token
66
+ * @param payload the decoded JWT token as an AuthTokenPayload - optional
67
+ * @param endpoints optional endpoints to override those in the payload
68
+ */
69
+ static fromAuthToken(token: string, payload?: AuthTokenPayload, endpoints?: {
70
+ studio: string;
71
+ store: string;
72
+ token?: string;
73
+ }): Promise<VertesiaClient>;
74
+ static decodeEndpoints(): void;
75
+ constructor(opts?: VertesiaClientProps);
76
+ withApiVersion(version: string | number | null): this;
77
+ /**
78
+ * Overwrite to keep store and composable clients synchronized on the auth callback
79
+ * @param authCb
80
+ * @returns
81
+ */
82
+ withAuthCallback(authCb?: (() => Promise<string>) | null): this;
83
+ withApiKey(apiKey: string | null): Promise<this>;
84
+ getRawJWT(): Promise<string | null>;
85
+ getDecodedJWT(): Promise<AuthTokenPayload | null>;
86
+ getProject(): Promise<import("@vertesia/common").ProjectRef | null>;
87
+ getAccount(): Promise<import("@vertesia/common").AccountRef | null>;
88
+ /**
89
+ * Alias for store.workflows
90
+ */
91
+ get workflows(): import("./index.js").WorkflowsApi;
92
+ /**
93
+ * Alias for store.objects
94
+ */
95
+ get objects(): import("./index.js").ObjectsApi;
96
+ get files(): import("./index.js").FilesApi;
97
+ /**
98
+ * Alias for store.types
99
+ */
100
+ get types(): import("./index.js").TypesApi;
101
+ /**
102
+ * Alias for store.data
103
+ */
104
+ get data(): import("./index.js").DataApi;
105
+ get storeUrl(): string;
106
+ /**
107
+ *
108
+ * Generate a token for use with other Vertesia's services
109
+ *
110
+ * @returns AuthTokenResponse
111
+ */
112
+ getAuthToken(token?: string): Promise<AuthTokenResponse>;
113
+ get initialHeaders(): {
114
+ "x-api-version": string;
115
+ accept: string;
116
+ };
117
+ projects: ProjectsApi;
118
+ environments: EnvironmentsApi;
119
+ interactions: InteractionsApi;
120
+ skills: SkillsApi;
121
+ prompts: PromptsApi;
122
+ runs: RunsApi;
123
+ account: AccountApi;
124
+ accounts: AccountsApi;
125
+ apikeys: ApiKeysApi;
126
+ analytics: AnalyticsApi;
127
+ training: TrainingApi;
128
+ users: UsersApi;
129
+ iam: IamApi;
130
+ refs: RefsApi;
131
+ commands: CommandsApi;
132
+ apps: AppsApi;
133
+ mcpOAuth: MCPOAuthApi;
134
+ }
135
+ export declare function decodeJWT(jwt: string): AuthTokenPayload;
136
+ export declare function decodeEndpoints(endpoints: string | Record<string, string> | undefined): Record<string, string>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,eAAe,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,eAAe,MAAM,sBAAsB,CAAC;AACnD,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,QAAQ,MAAM,eAAe,CAAC;AASrC,MAAM,MAA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IAAI;IAkBhC,SAAS;IAWT,aAAa,IAAI,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAKjD,UAAU;IAKV,UAAU;IAKhB;;OAEG;IACH,IAAI,SAAS,sCAEZ;IAED;;OAEG;IACH,IAAI,OAAO,oCAEV;IAED,IAAI,KAAK,kCAER;IAED;;OAEG;IACH,IAAI,KAAK,kCAER;IAED;;OAEG;IACH,IAAI,IAAI,iCAEP;IAED,IAAI,QAAQ,WAEX;IAED;;;;;OAKG;IACG,YAAY,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAmB9D,IAAI,cAAc;;;MAKjB;IAED,QAAQ,cAAyB;IACjC,YAAY,kBAA6B;IACzC,YAAY,kBAA6B;IACzC,MAAM,YAAuB;IAC7B,OAAO,aAAwB;IAC/B,IAAI,UAAqB;IACzB,OAAO,aAAwB;IAC/B,QAAQ,cAAyB;IACjC,OAAO,aAAwB;IAC/B,SAAS,eAA0B;IACnC,QAAQ,cAAyB;IACjC,KAAK,WAAsB;IAC3B,GAAG,SAAoB;IACvB,IAAI,UAAqB;IACzB,QAAQ,cAAyB;IACjC,IAAI,UAAqB;IACzB,QAAQ,cAAyB;CACpC;AAiBD,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAIvD;AA2BD,wBAAgB,eAAe,CAC3B,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,GACvD,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CASxB"}
@@ -0,0 +1,37 @@
1
+ import { AsyncExecutionPayload, InteractionExecutionPayload, InteractionExecutionResult, RateLimitRequestPayload, RateLimitRequestResponse } from '@vertesia/common';
2
+ import { VertesiaClient } from './client.js';
3
+ export declare function EventSourceProvider(): Promise<typeof EventSource>;
4
+ /**
5
+ *
6
+ * Execute an interaction and return a promise which will be resolved with the executed run when
7
+ * the run completes or fails.
8
+ * If the onChunk callback is passed then the streaming of the result is enabled.
9
+ * The onChunk callback with be called with the next chunk of the result as soon as it is available.
10
+ * When all chunks are received the function will return the resolved promise
11
+ * @param id of the interaction to execute
12
+ * @param payload InteractionExecutionPayload
13
+ * @param onChunk callback to be called when the next chunk of the response is available
14
+ */
15
+ export declare function executeInteraction<P = any>(client: VertesiaClient, interactionId: string, payload?: InteractionExecutionPayload, onChunk?: (chunk: string) => void): Promise<InteractionExecutionResult<P>>;
16
+ /**
17
+ * Same as executeInteraction but uses the interaction name selector instead of the id.
18
+ * A name selector is the interaction endpoint name suffixed with an optional tag or version which is starting with a `@` character.
19
+ * The special `draft` tag is used to select the draft version of the interaction. If no tag or version is specified then the latest version is selected.
20
+ * Examples of selectors:
21
+ * - `ReviewContract` - select the latest version of the ReviewContract interaction
22
+ * - `ReviewContract@1` - select the version 1 of the ReviewContract interaction
23
+ * - `ReviewContract@draft` - select the draft version of the ReviewContract interaction
24
+ * - `ReviewContract@fixed` - select the ReviewContract interaction which is tagged with 'fixed' tag.
25
+ *
26
+ * @param client
27
+ * @param interaction
28
+ * @param payload
29
+ * @param onChunk
30
+ * @returns
31
+ */
32
+ export declare function executeInteractionByName<P = any>(client: VertesiaClient, interaction: string, payload?: InteractionExecutionPayload, onChunk?: (chunk: string) => void): Promise<InteractionExecutionResult<P>>;
33
+ export declare function executeInteractionAsync(client: VertesiaClient, payload: AsyncExecutionPayload): Promise<{
34
+ runId: string;
35
+ workflowId: string;
36
+ }>;
37
+ export declare function checkRateLimit(client: VertesiaClient, payload: RateLimitRequestPayload): Promise<RateLimitRequestResponse>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../src/execute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAsB,2BAA2B,EAAE,0BAA0B,EAAoC,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC3N,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,OAAO,WAAW,CAAC,CAMvE;AACD;;;;;;;;;;GAUG;AACH,wBAAsB,kBAAkB,CAAC,CAAC,GAAG,GAAG,EAAE,MAAM,EAAE,cAAc,EACpE,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE,2BAAgC,EACzC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC,CAAC,CAAC,CAY7E;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,wBAAwB,CAAC,CAAC,GAAG,GAAG,EAAE,MAAM,EAAE,cAAc,EAC1E,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,2BAAgC,EACzC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC,CAAC,CAAC,CAgB7E;AA0CD,wBAAsB,uBAAuB,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,CAIpJ;AAED,wBAAsB,cAAc,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAIhI"}
@@ -0,0 +1,10 @@
1
+ export type { OrphanedAppInstallation } from "./AppsApi.js";
2
+ export * from './client.js';
3
+ export type { GroupsQueryOptions } from './GroupsApi.js';
4
+ export * from './InteractionBase.js';
5
+ export * from './InteractionOutput.js';
6
+ export type { AsyncExecutionResult, ComputeInteractionFacetsResponse } from './InteractionsApi.js';
7
+ export type { ComputePromptFacetsResponse, ListInteractionsResponse } from './PromptsApi.js';
8
+ export type { ComputeRunFacetsResponse, FilterOption } from './RunsApi.js';
9
+ export * from "./store/index.js";
10
+ export * from "./StreamSource.js";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC5D,cAAc,aAAa,CAAC;AAC5B,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,YAAY,EAAE,oBAAoB,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAC;AACnG,YAAY,EAAE,2BAA2B,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC7F,YAAY,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC3E,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { Readable } from "node:stream";
2
+ import { StreamSource } from "../StreamSource.js";
3
+ /**
4
+ * A stream source that wraps a Node.js Readable stream.
5
+ * This class is only works in Node.js environments.
6
+ */
7
+ export declare class NodeStreamSource extends StreamSource {
8
+ constructor(stream: Readable, name: string, type?: string, id?: string);
9
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NodeStreamSource.d.ts","sourceRoot":"","sources":["../../../src/nodejs/NodeStreamSource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,YAAY;gBAClC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM;CAGzE"}
@@ -0,0 +1 @@
1
+ export * from "./NodeStreamSource.js";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/nodejs/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { ApiTopic, ClientBase } from "@vertesia/api-fetch-client";
2
+ import { AdaptedTable, AdaptTablesRequest, DocAnalyzerResultResponse, DocAnalyzeRunStatusResponse, DocImage, DocTableCsv, DocTableJson, ExportTableFormats, GetAdaptedTablesRequestQuery, PdfToRichtextOptions, WorkflowRunStatus } from "@vertesia/common";
3
+ export declare class AnalyzeDocApi extends ApiTopic {
4
+ objectId: string;
5
+ constructor(parent: ClientBase, objectId: string);
6
+ start(payload: PdfToRichtextOptions): Promise<DocAnalyzeRunStatusResponse>;
7
+ getStatus(): Promise<DocAnalyzeRunStatusResponse>;
8
+ getResults(): Promise<DocAnalyzerResultResponse>;
9
+ adaptTables(payload: AdaptTablesRequest): Promise<WorkflowRunStatus>;
10
+ getAdaptedTables(runId?: string, query?: GetAdaptedTablesRequestQuery): Promise<Record<number, AdaptedTable>>;
11
+ getXml(): Promise<string>;
12
+ getTables(format?: ExportTableFormats): Promise<DocTableCsv[] | DocTableJson[]>;
13
+ getImages(): Promise<DocImage[]>;
14
+ getAnnotated(): Promise<{
15
+ url: string;
16
+ }>;
17
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnalyzeDocApi.d.ts","sourceRoot":"","sources":["../../../src/store/AnalyzeDocApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,kBAAkB,EAAE,4BAA4B,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE5P,qBAAa,aAAc,SAAQ,QAAQ;IACA,QAAQ,EAAE,MAAM;gBAA3C,MAAM,EAAE,UAAU,EAAS,QAAQ,EAAE,MAAM;IAIjD,KAAK,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAI1E,SAAS,IAAI,OAAO,CAAC,2BAA2B,CAAC;IAIjD,UAAU,IAAI,OAAO,CAAC,yBAAyB,CAAC;IAIhD,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAIpE,gBAAgB,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,4BAA4B,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAiB7G,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC;IAIzB,SAAS,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,EAAE,GAAG,YAAY,EAAE,CAAC;IAQ/E,SAAS,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;IAIhC,YAAY,IAAI,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;CAGjD"}
@@ -0,0 +1,82 @@
1
+ import { ApiTopic, ClientBase } from "@vertesia/api-fetch-client";
2
+ import { Collection, ComplexCollectionSearchQuery, ComplexSearchPayload, ComputeCollectionFacetPayload, ComputeObjectFacetPayload, ContentObjectItem, ContentObjectStatus, CreateCollectionPayload, DynamicCollection } from "@vertesia/common";
3
+ import { ComputeFacetsResponse, SearchResponse } from "./ObjectsApi.js";
4
+ export declare class CollectionsApi extends ApiTopic {
5
+ constructor(parent: ClientBase);
6
+ /**
7
+ * List collections
8
+ * @param payload: CollectionSearchPayload
9
+ * @returns Collection[] list of collections
10
+ **/
11
+ search(payload: ComplexCollectionSearchQuery): Promise<Collection[]>;
12
+ /**
13
+ * Compute facets for List collections
14
+ * @param query: ComputeCollectionFacetPayload
15
+ * @returns ComputeFacetsResponse list of facets
16
+ **/
17
+ computeListFacets(query: ComputeCollectionFacetPayload): Promise<ComputeFacetsResponse>;
18
+ /**
19
+ * Get the collection data without members
20
+ * @param collectionId
21
+ * @returns
22
+ */
23
+ retrieve(collectionId: string): Promise<Collection | DynamicCollection>;
24
+ create(payload: CreateCollectionPayload): Promise<Collection>;
25
+ update(collectionId: string, payload: Partial<CreateCollectionPayload>): Promise<{
26
+ id: string;
27
+ }>;
28
+ addMembers(collectionId: string, members: string[]): Promise<{
29
+ id: string;
30
+ }>;
31
+ listMembers(collectionId: string, payload: {
32
+ limit?: number;
33
+ offset?: number;
34
+ status?: ContentObjectStatus;
35
+ type?: string;
36
+ }): Promise<ContentObjectItem[]>;
37
+ computeFacets(collectionId: string, query: ComputeObjectFacetPayload): Promise<ComputeFacetsResponse>;
38
+ searchMembers(collectionId: string, payload: ComplexSearchPayload): Promise<SearchResponse>;
39
+ deleteMembers(collectionId: string, members: string[]): Promise<{
40
+ id: string;
41
+ }>;
42
+ addChildren(collectionId: string, children: string[]): Promise<{
43
+ count: number;
44
+ }>;
45
+ deleteChildren(collectionId: string, children: string[]): Promise<{
46
+ count: number;
47
+ }>;
48
+ searchChildren(collectionId: string, query?: ComplexCollectionSearchQuery): Promise<Collection[]>;
49
+ delete(id: string): Promise<any>;
50
+ /**
51
+ * Update collection permissions and propagate to member objects
52
+ * @param collectionId - The collection ID
53
+ * @param permissions - Map of permission types to principal arrays
54
+ * @returns Object with collection id, updated security, and number of objects updated
55
+ */
56
+ updatePermissions(collectionId: string, permissions: Record<string, string[]>): Promise<{
57
+ id: string;
58
+ security: Record<string, string[]>;
59
+ }>;
60
+ /**
61
+ * Manually trigger permission propagation from collection to member objects
62
+ * Useful for debugging and fixing permission issues
63
+ * @param collectionId - The collection ID
64
+ * @returns Object with collection id, message, and number of objects updated
65
+ */
66
+ propagatePermissions(collectionId: string): Promise<{
67
+ id: string;
68
+ message: string;
69
+ security?: Record<string, string[]>;
70
+ }>;
71
+ /**
72
+ * Manually trigger shared properties propagation from collection to member objects
73
+ * Useful for debugging and fixing shared properties issues
74
+ * @param collectionId - The collection ID
75
+ * @returns Object with collection id, message, and number of objects updated
76
+ */
77
+ propagateSharedProperties(collectionId: string): Promise<{
78
+ id: string;
79
+ message: string;
80
+ shared_properties: string[];
81
+ }>;
82
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CollectionsApi.d.ts","sourceRoot":"","sources":["../../../src/store/CollectionsApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,4BAA4B,EAAE,oBAAoB,EAAE,6BAA6B,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAChP,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGxE,qBAAa,cAAe,SAAQ,QAAQ;gBAE5B,MAAM,EAAE,UAAU;IAI9B;;;;OAIG;IACH,MAAM,CAAC,OAAO,EAAE,4BAA4B,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAIpE;;;;OAIG;IACH,iBAAiB,CAAC,KAAK,EAAE,6BAA6B,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAMvF;;;;OAIG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,iBAAiB,CAAC;IAIvE,MAAM,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC;IAM7D,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,uBAAuB,CAAC,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IAMhG,UAAU,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IAS5E,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE;QACvC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M,CAAC;QACX,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;KACvC,CAAC;IAIF;;;;;OAKG;IACH,yBAAyB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC;QACrD,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,MAAM,CAAC;QAChB,iBAAiB,EAAE,MAAM,EAAE,CAAA;KAC9B,CAAC;CAKL"}
@@ -0,0 +1,10 @@
1
+ import { ApiTopic, ClientBase } from "@vertesia/api-fetch-client";
2
+ import { EmbeddingsApi } from "./EmbeddingsApi.js";
3
+ /**
4
+ * @deprecated use EmbeddingsApi instead
5
+ * @see EmbeddingsApi
6
+ */
7
+ export declare class CommandsApi extends ApiTopic {
8
+ constructor(parent: ClientBase);
9
+ embeddings: EmbeddingsApi;
10
+ }