@leaflow/sdk 0.198.0 → 0.200.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.
Files changed (252) hide show
  1. package/dist/assistant/v1/generated/functions.d.ts +104 -2
  2. package/dist/assistant/v1/generated/functions.js +115 -2
  3. package/dist/assistant/v1/generated/models.d.ts +102 -0
  4. package/dist/assistant/v1/generated/models.js +13 -0
  5. package/dist/assistant/v1/generated/schemas.zod.d.ts +36 -1
  6. package/dist/assistant/v1/generated/schemas.zod.js +35 -1
  7. package/dist/assistant/v1/generated/validators/answerQuestionRequestBody.zod.d.ts +3 -0
  8. package/dist/assistant/v1/generated/validators/answerQuestionRequestBody.zod.js +3 -0
  9. package/dist/assistant/v1/generated/validators/approvalMode.zod.d.ts +3 -0
  10. package/dist/assistant/v1/generated/validators/approvalMode.zod.js +3 -0
  11. package/dist/assistant/v1/generated/validators/attachmentCountsResource.zod.d.ts +35 -0
  12. package/dist/assistant/v1/generated/validators/attachmentCountsResource.zod.js +35 -0
  13. package/dist/assistant/v1/generated/validators/attachmentFileResource.zod.d.ts +47 -0
  14. package/dist/assistant/v1/generated/validators/attachmentFileResource.zod.js +44 -0
  15. package/dist/assistant/v1/generated/validators/attachmentListResponseBody.zod.d.ts +54 -0
  16. package/dist/assistant/v1/generated/validators/attachmentListResponseBody.zod.js +38 -0
  17. package/dist/assistant/v1/generated/validators/attachmentResource.zod.d.ts +3 -0
  18. package/dist/assistant/v1/generated/validators/attachmentResource.zod.js +3 -0
  19. package/dist/assistant/v1/generated/validators/bindingCodeResponseBody.zod.d.ts +3 -0
  20. package/dist/assistant/v1/generated/validators/bindingCodeResponseBody.zod.js +3 -0
  21. package/dist/assistant/v1/generated/validators/bindingResource.zod.d.ts +3 -0
  22. package/dist/assistant/v1/generated/validators/bindingResource.zod.js +3 -0
  23. package/dist/assistant/v1/generated/validators/channelResource.zod.d.ts +3 -0
  24. package/dist/assistant/v1/generated/validators/channelResource.zod.js +3 -0
  25. package/dist/assistant/v1/generated/validators/channelWithSecretResponseBody.zod.d.ts +3 -0
  26. package/dist/assistant/v1/generated/validators/channelWithSecretResponseBody.zod.js +3 -0
  27. package/dist/assistant/v1/generated/validators/checkSenderParams.zod.d.ts +3 -0
  28. package/dist/assistant/v1/generated/validators/checkSenderParams.zod.js +3 -0
  29. package/dist/assistant/v1/generated/validators/choiceResource.zod.d.ts +3 -0
  30. package/dist/assistant/v1/generated/validators/choiceResource.zod.js +3 -0
  31. package/dist/assistant/v1/generated/validators/clientActionRequest.zod.d.ts +3 -0
  32. package/dist/assistant/v1/generated/validators/clientActionRequest.zod.js +3 -0
  33. package/dist/assistant/v1/generated/validators/clientContextPart.zod.d.ts +3 -0
  34. package/dist/assistant/v1/generated/validators/clientContextPart.zod.js +3 -0
  35. package/dist/assistant/v1/generated/validators/clientContextRequest.zod.d.ts +3 -0
  36. package/dist/assistant/v1/generated/validators/clientContextRequest.zod.js +3 -0
  37. package/dist/assistant/v1/generated/validators/clientFunctionRequest.zod.d.ts +3 -0
  38. package/dist/assistant/v1/generated/validators/clientFunctionRequest.zod.js +3 -0
  39. package/dist/assistant/v1/generated/validators/completeUploadRequestBody.zod.d.ts +3 -0
  40. package/dist/assistant/v1/generated/validators/completeUploadRequestBody.zod.js +3 -0
  41. package/dist/assistant/v1/generated/validators/contextUsageResource.zod.d.ts +3 -0
  42. package/dist/assistant/v1/generated/validators/contextUsageResource.zod.js +3 -0
  43. package/dist/assistant/v1/generated/validators/createChannelRequestBody.zod.d.ts +3 -0
  44. package/dist/assistant/v1/generated/validators/createChannelRequestBody.zod.js +3 -0
  45. package/dist/assistant/v1/generated/validators/createFolderRequestBody.zod.d.ts +3 -0
  46. package/dist/assistant/v1/generated/validators/createFolderRequestBody.zod.js +3 -0
  47. package/dist/assistant/v1/generated/validators/createTaskRequestBody.zod.d.ts +3 -0
  48. package/dist/assistant/v1/generated/validators/createTaskRequestBody.zod.js +3 -0
  49. package/dist/assistant/v1/generated/validators/createThreadRequestBody.zod.d.ts +3 -0
  50. package/dist/assistant/v1/generated/validators/createThreadRequestBody.zod.js +3 -0
  51. package/dist/assistant/v1/generated/validators/createThreadResponseBody.zod.d.ts +3 -0
  52. package/dist/assistant/v1/generated/validators/createThreadResponseBody.zod.js +3 -0
  53. package/dist/assistant/v1/generated/validators/createUploadRequestBody.zod.d.ts +3 -0
  54. package/dist/assistant/v1/generated/validators/createUploadRequestBody.zod.js +3 -0
  55. package/dist/assistant/v1/generated/validators/credentialFieldResource.zod.d.ts +3 -0
  56. package/dist/assistant/v1/generated/validators/credentialFieldResource.zod.js +3 -0
  57. package/dist/assistant/v1/generated/validators/cursorPagination.zod.d.ts +3 -0
  58. package/dist/assistant/v1/generated/validators/cursorPagination.zod.js +3 -0
  59. package/dist/assistant/v1/generated/validators/decideToolCallsRequestBody.zod.d.ts +3 -0
  60. package/dist/assistant/v1/generated/validators/decideToolCallsRequestBody.zod.js +3 -0
  61. package/dist/assistant/v1/generated/validators/defaultModelResource.zod.d.ts +3 -0
  62. package/dist/assistant/v1/generated/validators/defaultModelResource.zod.js +3 -0
  63. package/dist/assistant/v1/generated/validators/error.zod.d.ts +3 -0
  64. package/dist/assistant/v1/generated/validators/error.zod.js +3 -0
  65. package/dist/assistant/v1/generated/validators/errorStatus.zod.d.ts +3 -0
  66. package/dist/assistant/v1/generated/validators/errorStatus.zod.js +3 -0
  67. package/dist/assistant/v1/generated/validators/fieldViolation.zod.d.ts +3 -0
  68. package/dist/assistant/v1/generated/validators/fieldViolation.zod.js +3 -0
  69. package/dist/assistant/v1/generated/validators/fileDiffResource.zod.d.ts +3 -0
  70. package/dist/assistant/v1/generated/validators/fileDiffResource.zod.js +3 -0
  71. package/dist/assistant/v1/generated/validators/folderCountsResource.zod.d.ts +3 -0
  72. package/dist/assistant/v1/generated/validators/folderCountsResource.zod.js +3 -0
  73. package/dist/assistant/v1/generated/validators/folderListResponseBody.zod.d.ts +3 -0
  74. package/dist/assistant/v1/generated/validators/folderListResponseBody.zod.js +3 -0
  75. package/dist/assistant/v1/generated/validators/folderResource.zod.d.ts +3 -0
  76. package/dist/assistant/v1/generated/validators/folderResource.zod.js +3 -0
  77. package/dist/assistant/v1/generated/validators/itemSourceResource.zod.d.ts +3 -0
  78. package/dist/assistant/v1/generated/validators/itemSourceResource.zod.js +3 -0
  79. package/dist/assistant/v1/generated/validators/lastTurnResource.zod.d.ts +3 -0
  80. package/dist/assistant/v1/generated/validators/lastTurnResource.zod.js +3 -0
  81. package/dist/assistant/v1/generated/validators/lengthAwarePageBindingResource.zod.d.ts +3 -0
  82. package/dist/assistant/v1/generated/validators/lengthAwarePageBindingResource.zod.js +3 -0
  83. package/dist/assistant/v1/generated/validators/lengthAwarePageChannelResource.zod.d.ts +3 -0
  84. package/dist/assistant/v1/generated/validators/lengthAwarePageChannelResource.zod.js +3 -0
  85. package/dist/assistant/v1/generated/validators/listBindingsParams.zod.d.ts +3 -0
  86. package/dist/assistant/v1/generated/validators/listBindingsParams.zod.js +3 -0
  87. package/dist/assistant/v1/generated/validators/listChannelRejectionsParams.zod.d.ts +3 -0
  88. package/dist/assistant/v1/generated/validators/listChannelRejectionsParams.zod.js +3 -0
  89. package/dist/assistant/v1/generated/validators/listChannelsParams.zod.d.ts +3 -0
  90. package/dist/assistant/v1/generated/validators/listChannelsParams.zod.js +3 -0
  91. package/dist/assistant/v1/generated/validators/listTaskRunsParams.zod.d.ts +3 -0
  92. package/dist/assistant/v1/generated/validators/listTaskRunsParams.zod.js +3 -0
  93. package/dist/assistant/v1/generated/validators/listThreadItemsParams.zod.d.ts +3 -0
  94. package/dist/assistant/v1/generated/validators/listThreadItemsParams.zod.js +3 -0
  95. package/dist/assistant/v1/generated/validators/listThreadMessagesParams.zod.d.ts +3 -0
  96. package/dist/assistant/v1/generated/validators/listThreadMessagesParams.zod.js +3 -0
  97. package/dist/assistant/v1/generated/validators/listThreadTurnsParams.zod.d.ts +3 -0
  98. package/dist/assistant/v1/generated/validators/listThreadTurnsParams.zod.js +3 -0
  99. package/dist/assistant/v1/generated/validators/loginResource.zod.d.ts +3 -0
  100. package/dist/assistant/v1/generated/validators/loginResource.zod.js +3 -0
  101. package/dist/assistant/v1/generated/validators/memoryListResponseBody.zod.d.ts +3 -0
  102. package/dist/assistant/v1/generated/validators/memoryListResponseBody.zod.js +3 -0
  103. package/dist/assistant/v1/generated/validators/memoryResource.zod.d.ts +3 -0
  104. package/dist/assistant/v1/generated/validators/memoryResource.zod.js +3 -0
  105. package/dist/assistant/v1/generated/validators/messagePart.zod.d.ts +3 -0
  106. package/dist/assistant/v1/generated/validators/messagePart.zod.js +3 -0
  107. package/dist/assistant/v1/generated/validators/moveFolderRequestBody.zod.d.ts +3 -0
  108. package/dist/assistant/v1/generated/validators/moveFolderRequestBody.zod.js +3 -0
  109. package/dist/assistant/v1/generated/validators/offsetPagination.zod.d.ts +3 -0
  110. package/dist/assistant/v1/generated/validators/offsetPagination.zod.js +3 -0
  111. package/dist/assistant/v1/generated/validators/partResource.zod.d.ts +3 -0
  112. package/dist/assistant/v1/generated/validators/partResource.zod.js +3 -0
  113. package/dist/assistant/v1/generated/validators/pendingActionResource.zod.d.ts +3 -0
  114. package/dist/assistant/v1/generated/validators/pendingActionResource.zod.js +3 -0
  115. package/dist/assistant/v1/generated/validators/placeThreadRequestBody.zod.d.ts +3 -0
  116. package/dist/assistant/v1/generated/validators/placeThreadRequestBody.zod.js +3 -0
  117. package/dist/assistant/v1/generated/validators/platformListResponseBody.zod.d.ts +3 -0
  118. package/dist/assistant/v1/generated/validators/platformListResponseBody.zod.js +3 -0
  119. package/dist/assistant/v1/generated/validators/platformResource.zod.d.ts +3 -0
  120. package/dist/assistant/v1/generated/validators/platformResource.zod.js +3 -0
  121. package/dist/assistant/v1/generated/validators/presentationResource.zod.d.ts +3 -0
  122. package/dist/assistant/v1/generated/validators/presentationResource.zod.js +3 -0
  123. package/dist/assistant/v1/generated/validators/putUploadPartHeaders.zod.d.ts +3 -0
  124. package/dist/assistant/v1/generated/validators/putUploadPartHeaders.zod.js +3 -0
  125. package/dist/assistant/v1/generated/validators/putUploadPartParams.zod.d.ts +3 -0
  126. package/dist/assistant/v1/generated/validators/putUploadPartParams.zod.js +3 -0
  127. package/dist/assistant/v1/generated/validators/questionResource.zod.d.ts +3 -0
  128. package/dist/assistant/v1/generated/validators/questionResource.zod.js +3 -0
  129. package/dist/assistant/v1/generated/validators/reasoningEffort.zod.d.ts +3 -0
  130. package/dist/assistant/v1/generated/validators/reasoningEffort.zod.js +3 -0
  131. package/dist/assistant/v1/generated/validators/rejectionListResponseBody.zod.d.ts +3 -0
  132. package/dist/assistant/v1/generated/validators/rejectionListResponseBody.zod.js +3 -0
  133. package/dist/assistant/v1/generated/validators/rejectionResource.zod.d.ts +3 -0
  134. package/dist/assistant/v1/generated/validators/rejectionResource.zod.js +3 -0
  135. package/dist/assistant/v1/generated/validators/resumeThreadRequestBody.zod.d.ts +3 -0
  136. package/dist/assistant/v1/generated/validators/resumeThreadRequestBody.zod.js +3 -0
  137. package/dist/assistant/v1/generated/validators/revertRequestBody.zod.d.ts +3 -0
  138. package/dist/assistant/v1/generated/validators/revertRequestBody.zod.js +3 -0
  139. package/dist/assistant/v1/generated/validators/revertedCountResponseBody.zod.d.ts +3 -0
  140. package/dist/assistant/v1/generated/validators/revertedCountResponseBody.zod.js +3 -0
  141. package/dist/assistant/v1/generated/validators/rotateSecretRequestBody.zod.d.ts +3 -0
  142. package/dist/assistant/v1/generated/validators/rotateSecretRequestBody.zod.js +3 -0
  143. package/dist/assistant/v1/generated/validators/searchAttachmentsRequestBody.zod.d.ts +51 -0
  144. package/dist/assistant/v1/generated/validators/searchAttachmentsRequestBody.zod.js +65 -0
  145. package/dist/assistant/v1/generated/validators/searchTasksRequestBody.zod.d.ts +3 -0
  146. package/dist/assistant/v1/generated/validators/searchTasksRequestBody.zod.js +3 -0
  147. package/dist/assistant/v1/generated/validators/searchThreadsRequestBody.zod.d.ts +3 -0
  148. package/dist/assistant/v1/generated/validators/searchThreadsRequestBody.zod.js +3 -0
  149. package/dist/assistant/v1/generated/validators/sendMessageRequestBody.zod.d.ts +3 -0
  150. package/dist/assistant/v1/generated/validators/sendMessageRequestBody.zod.js +3 -0
  151. package/dist/assistant/v1/generated/validators/sendMessageResponseBody.zod.d.ts +3 -0
  152. package/dist/assistant/v1/generated/validators/sendMessageResponseBody.zod.js +3 -0
  153. package/dist/assistant/v1/generated/validators/senderCheckResource.zod.d.ts +3 -0
  154. package/dist/assistant/v1/generated/validators/senderCheckResource.zod.js +3 -0
  155. package/dist/assistant/v1/generated/validators/settingsResource.zod.d.ts +3 -0
  156. package/dist/assistant/v1/generated/validators/settingsResource.zod.js +3 -0
  157. package/dist/assistant/v1/generated/validators/skillEnabledRequestBody.zod.d.ts +3 -0
  158. package/dist/assistant/v1/generated/validators/skillEnabledRequestBody.zod.js +3 -0
  159. package/dist/assistant/v1/generated/validators/skillListResponseBody.zod.d.ts +3 -0
  160. package/dist/assistant/v1/generated/validators/skillListResponseBody.zod.js +3 -0
  161. package/dist/assistant/v1/generated/validators/skillRequestBody.zod.d.ts +3 -0
  162. package/dist/assistant/v1/generated/validators/skillRequestBody.zod.js +3 -0
  163. package/dist/assistant/v1/generated/validators/skillResource.zod.d.ts +3 -0
  164. package/dist/assistant/v1/generated/validators/skillResource.zod.js +3 -0
  165. package/dist/assistant/v1/generated/validators/subagentCountResource.zod.d.ts +3 -0
  166. package/dist/assistant/v1/generated/validators/subagentCountResource.zod.js +3 -0
  167. package/dist/assistant/v1/generated/validators/taskAction.zod.d.ts +3 -0
  168. package/dist/assistant/v1/generated/validators/taskAction.zod.js +3 -0
  169. package/dist/assistant/v1/generated/validators/taskListResponseBody.zod.d.ts +3 -0
  170. package/dist/assistant/v1/generated/validators/taskListResponseBody.zod.js +3 -0
  171. package/dist/assistant/v1/generated/validators/taskResource.zod.d.ts +3 -0
  172. package/dist/assistant/v1/generated/validators/taskResource.zod.js +3 -0
  173. package/dist/assistant/v1/generated/validators/taskRunEvent.zod.d.ts +3 -0
  174. package/dist/assistant/v1/generated/validators/taskRunEvent.zod.js +3 -0
  175. package/dist/assistant/v1/generated/validators/taskRunListResponseBody.zod.d.ts +3 -0
  176. package/dist/assistant/v1/generated/validators/taskRunListResponseBody.zod.js +3 -0
  177. package/dist/assistant/v1/generated/validators/taskRunResource.zod.d.ts +3 -0
  178. package/dist/assistant/v1/generated/validators/taskRunResource.zod.js +3 -0
  179. package/dist/assistant/v1/generated/validators/taskTrigger.zod.d.ts +3 -0
  180. package/dist/assistant/v1/generated/validators/taskTrigger.zod.js +3 -0
  181. package/dist/assistant/v1/generated/validators/threadCountsResource.zod.d.ts +3 -0
  182. package/dist/assistant/v1/generated/validators/threadCountsResource.zod.js +3 -0
  183. package/dist/assistant/v1/generated/validators/threadItemListResponseBody.zod.d.ts +3 -0
  184. package/dist/assistant/v1/generated/validators/threadItemListResponseBody.zod.js +3 -0
  185. package/dist/assistant/v1/generated/validators/threadItemResource.zod.d.ts +3 -0
  186. package/dist/assistant/v1/generated/validators/threadItemResource.zod.js +3 -0
  187. package/dist/assistant/v1/generated/validators/threadListResponseBody.zod.d.ts +3 -0
  188. package/dist/assistant/v1/generated/validators/threadListResponseBody.zod.js +3 -0
  189. package/dist/assistant/v1/generated/validators/threadMessageListResponseBody.zod.d.ts +3 -0
  190. package/dist/assistant/v1/generated/validators/threadMessageListResponseBody.zod.js +3 -0
  191. package/dist/assistant/v1/generated/validators/threadMessageResource.zod.d.ts +3 -0
  192. package/dist/assistant/v1/generated/validators/threadMessageResource.zod.js +3 -0
  193. package/dist/assistant/v1/generated/validators/threadResource.zod.d.ts +3 -0
  194. package/dist/assistant/v1/generated/validators/threadResource.zod.js +3 -0
  195. package/dist/assistant/v1/generated/validators/threadStatus.zod.d.ts +3 -0
  196. package/dist/assistant/v1/generated/validators/threadStatus.zod.js +3 -0
  197. package/dist/assistant/v1/generated/validators/threadTurnListResponseBody.zod.d.ts +3 -0
  198. package/dist/assistant/v1/generated/validators/threadTurnListResponseBody.zod.js +3 -0
  199. package/dist/assistant/v1/generated/validators/threadTurnResource.zod.d.ts +3 -0
  200. package/dist/assistant/v1/generated/validators/threadTurnResource.zod.js +3 -0
  201. package/dist/assistant/v1/generated/validators/todoResource.zod.d.ts +3 -0
  202. package/dist/assistant/v1/generated/validators/todoResource.zod.js +3 -0
  203. package/dist/assistant/v1/generated/validators/toolCallResource.zod.d.ts +3 -0
  204. package/dist/assistant/v1/generated/validators/toolCallResource.zod.js +3 -0
  205. package/dist/assistant/v1/generated/validators/toolResultRequestBody.zod.d.ts +3 -0
  206. package/dist/assistant/v1/generated/validators/toolResultRequestBody.zod.js +3 -0
  207. package/dist/assistant/v1/generated/validators/turnStartedResponseBody.zod.d.ts +3 -0
  208. package/dist/assistant/v1/generated/validators/turnStartedResponseBody.zod.js +3 -0
  209. package/dist/assistant/v1/generated/validators/turnStatus.zod.d.ts +3 -0
  210. package/dist/assistant/v1/generated/validators/turnStatus.zod.js +3 -0
  211. package/dist/assistant/v1/generated/validators/turnType.zod.d.ts +3 -0
  212. package/dist/assistant/v1/generated/validators/turnType.zod.js +3 -0
  213. package/dist/assistant/v1/generated/validators/updateAttachmentRequestBody.zod.d.ts +35 -0
  214. package/dist/assistant/v1/generated/validators/updateAttachmentRequestBody.zod.js +33 -0
  215. package/dist/assistant/v1/generated/validators/updateChannelRequestBody.zod.d.ts +3 -0
  216. package/dist/assistant/v1/generated/validators/updateChannelRequestBody.zod.js +3 -0
  217. package/dist/assistant/v1/generated/validators/updateFolderRequestBody.zod.d.ts +3 -0
  218. package/dist/assistant/v1/generated/validators/updateFolderRequestBody.zod.js +3 -0
  219. package/dist/assistant/v1/generated/validators/updateSettingsRequestBody.zod.d.ts +3 -0
  220. package/dist/assistant/v1/generated/validators/updateSettingsRequestBody.zod.js +3 -0
  221. package/dist/assistant/v1/generated/validators/updateTaskRequestBody.zod.d.ts +3 -0
  222. package/dist/assistant/v1/generated/validators/updateTaskRequestBody.zod.js +3 -0
  223. package/dist/assistant/v1/generated/validators/updateThreadRequestBody.zod.d.ts +3 -0
  224. package/dist/assistant/v1/generated/validators/updateThreadRequestBody.zod.js +3 -0
  225. package/dist/assistant/v1/generated/validators/updateUploadRequestBody.zod.d.ts +3 -0
  226. package/dist/assistant/v1/generated/validators/updateUploadRequestBody.zod.js +3 -0
  227. package/dist/assistant/v1/generated/validators/uploadAttachmentParams.zod.d.ts +3 -0
  228. package/dist/assistant/v1/generated/validators/uploadAttachmentParams.zod.js +3 -0
  229. package/dist/assistant/v1/generated/validators/uploadConfigurationResource.zod.d.ts +3 -0
  230. package/dist/assistant/v1/generated/validators/uploadConfigurationResource.zod.js +3 -0
  231. package/dist/assistant/v1/generated/validators/uploadListResponseBody.zod.d.ts +3 -0
  232. package/dist/assistant/v1/generated/validators/uploadListResponseBody.zod.js +3 -0
  233. package/dist/assistant/v1/generated/validators/uploadPartResource.zod.d.ts +3 -0
  234. package/dist/assistant/v1/generated/validators/uploadPartResource.zod.js +3 -0
  235. package/dist/assistant/v1/generated/validators/uploadResource.zod.d.ts +3 -0
  236. package/dist/assistant/v1/generated/validators/uploadResource.zod.js +3 -0
  237. package/dist/assistant/v1/generated/validators/uploadedResource.zod.d.ts +3 -0
  238. package/dist/assistant/v1/generated/validators/uploadedResource.zod.js +3 -0
  239. package/dist/assistant/v1/generated/validators/usage.zod.d.ts +3 -0
  240. package/dist/assistant/v1/generated/validators/usage.zod.js +3 -0
  241. package/dist/assistant/v1/generated/validators/verifyCodeRequestBody.zod.d.ts +3 -0
  242. package/dist/assistant/v1/generated/validators/verifyCodeRequestBody.zod.js +3 -0
  243. package/dist/assistant/v1/generated/validators/webhookSecretResponseBody.zod.d.ts +3 -0
  244. package/dist/assistant/v1/generated/validators/webhookSecretResponseBody.zod.js +3 -0
  245. package/dist/billing/v1/generated/models.d.ts +8 -0
  246. package/dist/billing/v1/generated/schemas.zod.d.ts +8 -0
  247. package/dist/billing/v1/generated/schemas.zod.js +2 -0
  248. package/dist/billing/v1/generated/validators/listPricesByPlanParams.zod.d.ts +8 -0
  249. package/dist/billing/v1/generated/validators/listPricesByPlanParams.zod.js +4 -0
  250. package/dist/routes.d.ts +32 -0
  251. package/dist/routes.js +36 -0
  252. package/package.json +1 -1
@@ -21,9 +21,12 @@
21
21
  *
22
22
  * Upload large files with /api/v1/uploads: read /api/v1/upload-configuration first, send exact-sized
23
23
  * parts, then complete the upload and send its attachment id in a message.
24
+ *
25
+ * Files uploaded that way are listed by search-attachments. Renaming or removing one does not change
26
+ * the conversations that already use it; downloading keeps working.
24
27
  * OpenAPI spec version: 2.0.0
25
28
  */
26
- import type { AnswerQuestionRequestBody, BindingCodeResponseBody, BindingResource, ChannelResource, ChannelWithSecretResponseBody, CheckSenderParams, CompleteUploadRequestBody, CreateChannelRequestBody, CreateFolderRequestBody, CreateTaskRequestBody, CreateThreadRequestBody, CreateThreadResponseBody, CreateUploadRequestBody, DecideToolCallsRequestBody, ErrorResponse, FolderListResponseBody, FolderResource, LengthAwarePageBindingResource, LengthAwarePageChannelResource, ListBindingsParams, ListChannelRejectionsParams, ListChannelsParams, ListTaskRunsParams, ListThreadItemsParams, ListThreadMessagesParams, ListThreadTurnsParams, LoginResource, MemoryListResponseBody, MoveFolderRequestBody, PlaceThreadRequestBody, PlatformListResponseBody, PutUploadPartHeaders, PutUploadPartParams, RejectionListResponseBody, ResumeThreadRequestBody, RevertRequestBody, RevertedCountResponseBody, RotateSecretRequestBody, SearchTasksRequestBody, SearchThreadsRequestBody, SendMessageRequestBody, SendMessageResponseBody, SenderCheckResource, SettingsResource, SkillEnabledRequestBody, SkillListResponseBody, SkillRequestBody, SkillResource, TaskListResponseBody, TaskResource, TaskRunListResponseBody, TaskRunResource, ThreadItemListResponseBody, ThreadItemResource, ThreadListResponseBody, ThreadMessageListResponseBody, ThreadResource, ThreadTurnListResponseBody, ToolResultRequestBody, TurnStartedResponseBody, UpdateChannelRequestBody, UpdateFolderRequestBody, UpdateSettingsRequestBody, UpdateTaskRequestBody, UpdateThreadRequestBody, UpdateUploadRequestBody, UploadAttachmentParams, UploadConfigurationResource, UploadListResponseBody, UploadPartResource, UploadResource, UploadedResource, VerifyCodeRequestBody, WebhookSecretResponseBody } from "./models.js";
29
+ import type { AnswerQuestionRequestBody, AttachmentFileResource, AttachmentListResponseBody, BindingCodeResponseBody, BindingResource, ChannelResource, ChannelWithSecretResponseBody, CheckSenderParams, CompleteUploadRequestBody, CreateChannelRequestBody, CreateFolderRequestBody, CreateTaskRequestBody, CreateThreadRequestBody, CreateThreadResponseBody, CreateUploadRequestBody, DecideToolCallsRequestBody, ErrorResponse, FolderListResponseBody, FolderResource, LengthAwarePageBindingResource, LengthAwarePageChannelResource, ListBindingsParams, ListChannelRejectionsParams, ListChannelsParams, ListTaskRunsParams, ListThreadItemsParams, ListThreadMessagesParams, ListThreadTurnsParams, LoginResource, MemoryListResponseBody, MoveFolderRequestBody, PlaceThreadRequestBody, PlatformListResponseBody, PutUploadPartHeaders, PutUploadPartParams, RejectionListResponseBody, ResumeThreadRequestBody, RevertRequestBody, RevertedCountResponseBody, RotateSecretRequestBody, SearchAttachmentsRequestBody, SearchTasksRequestBody, SearchThreadsRequestBody, SendMessageRequestBody, SendMessageResponseBody, SenderCheckResource, SettingsResource, SkillEnabledRequestBody, SkillListResponseBody, SkillRequestBody, SkillResource, TaskListResponseBody, TaskResource, TaskRunListResponseBody, TaskRunResource, ThreadItemListResponseBody, ThreadItemResource, ThreadListResponseBody, ThreadMessageListResponseBody, ThreadResource, ThreadTurnListResponseBody, ToolResultRequestBody, TurnStartedResponseBody, UpdateAttachmentRequestBody, UpdateChannelRequestBody, UpdateFolderRequestBody, UpdateSettingsRequestBody, UpdateTaskRequestBody, UpdateThreadRequestBody, UpdateUploadRequestBody, UploadAttachmentParams, UploadConfigurationResource, UploadListResponseBody, UploadPartResource, UploadResource, UploadedResource, VerifyCodeRequestBody, WebhookSecretResponseBody } from "./models.js";
27
30
  export type HTTPStatusCode1xx = 100 | 101 | 102 | 103;
28
31
  export type HTTPStatusCode2xx = 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207;
29
32
  export type HTTPStatusCode3xx = 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308;
@@ -970,6 +973,105 @@ export declare const getUploadAttachmentUrl: (params?: UploadAttachmentParams) =
970
973
  * @summary Upload a file
971
974
  */
972
975
  export declare const uploadAttachment: (uploadAttachmentBody: Blob, params?: UploadAttachmentParams, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<uploadAttachmentResponse>;
976
+ export type searchAttachmentsResponse200 = {
977
+ data: AttachmentListResponseBody;
978
+ status: 200;
979
+ };
980
+ export type searchAttachmentsResponseDefault = {
981
+ data: ErrorResponse;
982
+ status: Exclude<HTTPStatusCodes, 200>;
983
+ };
984
+ export type searchAttachmentsResponseSuccess = searchAttachmentsResponse200 & {
985
+ headers: Headers;
986
+ };
987
+ export type searchAttachmentsResponseError = searchAttachmentsResponseDefault & {
988
+ headers: Headers;
989
+ };
990
+ export type searchAttachmentsResponse = searchAttachmentsResponseSuccess | searchAttachmentsResponseError;
991
+ export declare const getSearchAttachmentsUrl: () => string;
992
+ /**
993
+ * The caller's files in this project, most recently uploaded first. These are the files
994
+ * uploaded while composing messages, plus uploads that no message has referenced yet.
995
+ *
996
+ * A file with no message referencing it is a draft: `draftExpiresAt` says when it is cleared.
997
+ * Sending a message with the id makes it permanent and that field becomes null.
998
+ *
999
+ * Files removed from the library are not listed, but conversations that already use them keep
1000
+ * them and download-by-id still works.
1001
+ * @summary Search attachments
1002
+ */
1003
+ export declare const searchAttachments: (searchAttachmentsRequestBody: SearchAttachmentsRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<searchAttachmentsResponse>;
1004
+ export type getAttachmentResponse200 = {
1005
+ data: AttachmentFileResource;
1006
+ status: 200;
1007
+ };
1008
+ export type getAttachmentResponseDefault = {
1009
+ data: ErrorResponse;
1010
+ status: Exclude<HTTPStatusCodes, 200>;
1011
+ };
1012
+ export type getAttachmentResponseSuccess = getAttachmentResponse200 & {
1013
+ headers: Headers;
1014
+ };
1015
+ export type getAttachmentResponseError = getAttachmentResponseDefault & {
1016
+ headers: Headers;
1017
+ };
1018
+ export type getAttachmentResponse = getAttachmentResponseSuccess | getAttachmentResponseError;
1019
+ export declare const getGetAttachmentUrl: (attachment: string) => string;
1020
+ /**
1021
+ * Metadata for one attachment. The bytes are at /api/v1/attachments/{attachment}:download.
1022
+ *
1023
+ * Returns 404 when the attachment does not exist, does not belong to the current user, or was
1024
+ * removed from the library. Removed files stay readable through their conversations but are no
1025
+ * longer described here.
1026
+ * @summary Get a file
1027
+ */
1028
+ export declare const getAttachment: (attachment: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<getAttachmentResponse>;
1029
+ export type updateAttachmentResponse200 = {
1030
+ data: AttachmentFileResource;
1031
+ status: 200;
1032
+ };
1033
+ export type updateAttachmentResponseDefault = {
1034
+ data: ErrorResponse;
1035
+ status: Exclude<HTTPStatusCodes, 200>;
1036
+ };
1037
+ export type updateAttachmentResponseSuccess = updateAttachmentResponse200 & {
1038
+ headers: Headers;
1039
+ };
1040
+ export type updateAttachmentResponseError = updateAttachmentResponseDefault & {
1041
+ headers: Headers;
1042
+ };
1043
+ export type updateAttachmentResponse = updateAttachmentResponseSuccess | updateAttachmentResponseError;
1044
+ export declare const getUpdateAttachmentUrl: (attachment: string) => string;
1045
+ /**
1046
+ * Changes the name shown in the library and given to the assistant. The bytes and the attachment
1047
+ * id do not change; conversations that already use it see the new name from their next request
1048
+ * on.
1049
+ * @summary Rename a file
1050
+ */
1051
+ export declare const updateAttachment: (attachment: string, updateAttachmentRequestBody: UpdateAttachmentRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<updateAttachmentResponse>;
1052
+ export type deleteAttachmentResponse204 = {
1053
+ data: void;
1054
+ status: 204;
1055
+ };
1056
+ export type deleteAttachmentResponseDefault = {
1057
+ data: ErrorResponse;
1058
+ status: Exclude<HTTPStatusCodes, 204>;
1059
+ };
1060
+ export type deleteAttachmentResponseSuccess = deleteAttachmentResponse204 & {
1061
+ headers: Headers;
1062
+ };
1063
+ export type deleteAttachmentResponseError = deleteAttachmentResponseDefault & {
1064
+ headers: Headers;
1065
+ };
1066
+ export type deleteAttachmentResponse = deleteAttachmentResponseSuccess | deleteAttachmentResponseError;
1067
+ export declare const getDeleteAttachmentUrl: (attachment: string) => string;
1068
+ /**
1069
+ * Hides the file from the library. Conversations that already use it keep it: the attachment
1070
+ * stays readable by id and keeps rendering in their history. Its bytes are released when the
1071
+ * project is deleted. A draft is cleared for good when its expiry passes. Idempotent.
1072
+ * @summary Remove a file from the library
1073
+ */
1074
+ export declare const deleteAttachment: (attachment: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<deleteAttachmentResponse>;
973
1075
  export type downloadAttachmentResponse200 = {
974
1076
  data: Blob;
975
1077
  status: 200;
@@ -987,7 +1089,7 @@ export type downloadAttachmentResponseError = downloadAttachmentResponseDefault
987
1089
  export type downloadAttachmentResponse = downloadAttachmentResponseSuccess | downloadAttachmentResponseError;
988
1090
  export declare const getDownloadAttachmentUrl: (attachment: string) => string;
989
1091
  /**
990
- * Returns the original bytes for an attachment id. The response carries long-lived cache headers because the content never changes. Returns 404 when the attachment does not exist or does not belong to the current user.
1092
+ * Returns the original bytes for an attachment id, including one removed from the library. The response carries long-lived cache headers because the content never changes. Returns 404 when the attachment does not exist or does not belong to the current user.
991
1093
  *
992
1094
  * Only an attachment whose `type` is `image` comes back with its own image type and is usable as the address of an `<img>`. Everything else is served as `application/octet-stream` with `Content-Disposition: attachment`, deliberately: an uploaded file is arbitrary bytes under a name its uploader chose, and serving it back inline would run it on this origin.
993
1095
  * @summary Download a file
@@ -1094,11 +1094,124 @@ export const uploadAttachment = async (uploadAttachmentBody, params, options, fe
1094
1094
  const data = body ? JSON.parse(body) : {};
1095
1095
  return { data, status: res.status, headers: res.headers };
1096
1096
  };
1097
- export const getDownloadAttachmentUrl = (attachment) => {
1097
+ export const getSearchAttachmentsUrl = () => {
1098
+ return `https://assistant.leaflow.cloud/api/v1/attachments`;
1099
+ };
1100
+ /**
1101
+ * The caller's files in this project, most recently uploaded first. These are the files
1102
+ * uploaded while composing messages, plus uploads that no message has referenced yet.
1103
+ *
1104
+ * A file with no message referencing it is a draft: `draftExpiresAt` says when it is cleared.
1105
+ * Sending a message with the id makes it permanent and that field becomes null.
1106
+ *
1107
+ * Files removed from the library are not listed, but conversations that already use them keep
1108
+ * them and download-by-id still works.
1109
+ * @summary Search attachments
1110
+ */
1111
+ export const searchAttachments = async (searchAttachmentsRequestBody, options, fetchFn) => {
1112
+ const getHeaders = (h) => {
1113
+ if (!h)
1114
+ return {};
1115
+ if (h instanceof Headers)
1116
+ return Object.fromEntries(h.entries());
1117
+ if (Symbol.iterator in h) {
1118
+ return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
1119
+ }
1120
+ const headers = {};
1121
+ for (const [name, value] of Object.entries(h)) {
1122
+ if (value !== undefined)
1123
+ headers[name] = value;
1124
+ }
1125
+ return headers;
1126
+ };
1127
+ const res = await (fetchFn ?? fetch)(getSearchAttachmentsUrl(), {
1128
+ ...options,
1129
+ method: "QUERY",
1130
+ headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
1131
+ body: JSON.stringify(searchAttachmentsRequestBody),
1132
+ });
1133
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
1134
+ const data = body ? JSON.parse(body) : {};
1135
+ return { data, status: res.status, headers: res.headers };
1136
+ };
1137
+ export const getGetAttachmentUrl = (attachment) => {
1098
1138
  return `https://assistant.leaflow.cloud/api/v1/attachments/${encodeURIComponent(String(attachment))}`;
1099
1139
  };
1100
1140
  /**
1101
- * Returns the original bytes for an attachment id. The response carries long-lived cache headers because the content never changes. Returns 404 when the attachment does not exist or does not belong to the current user.
1141
+ * Metadata for one attachment. The bytes are at /api/v1/attachments/{attachment}:download.
1142
+ *
1143
+ * Returns 404 when the attachment does not exist, does not belong to the current user, or was
1144
+ * removed from the library. Removed files stay readable through their conversations but are no
1145
+ * longer described here.
1146
+ * @summary Get a file
1147
+ */
1148
+ export const getAttachment = async (attachment, options, fetchFn) => {
1149
+ const res = await (fetchFn ?? fetch)(getGetAttachmentUrl(attachment), {
1150
+ ...options,
1151
+ method: "GET",
1152
+ });
1153
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
1154
+ const data = body ? JSON.parse(body) : {};
1155
+ return { data, status: res.status, headers: res.headers };
1156
+ };
1157
+ export const getUpdateAttachmentUrl = (attachment) => {
1158
+ return `https://assistant.leaflow.cloud/api/v1/attachments/${encodeURIComponent(String(attachment))}`;
1159
+ };
1160
+ /**
1161
+ * Changes the name shown in the library and given to the assistant. The bytes and the attachment
1162
+ * id do not change; conversations that already use it see the new name from their next request
1163
+ * on.
1164
+ * @summary Rename a file
1165
+ */
1166
+ export const updateAttachment = async (attachment, updateAttachmentRequestBody, options, fetchFn) => {
1167
+ const getHeaders = (h) => {
1168
+ if (!h)
1169
+ return {};
1170
+ if (h instanceof Headers)
1171
+ return Object.fromEntries(h.entries());
1172
+ if (Symbol.iterator in h) {
1173
+ return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
1174
+ }
1175
+ const headers = {};
1176
+ for (const [name, value] of Object.entries(h)) {
1177
+ if (value !== undefined)
1178
+ headers[name] = value;
1179
+ }
1180
+ return headers;
1181
+ };
1182
+ const res = await (fetchFn ?? fetch)(getUpdateAttachmentUrl(attachment), {
1183
+ ...options,
1184
+ method: "PATCH",
1185
+ headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
1186
+ body: JSON.stringify(updateAttachmentRequestBody),
1187
+ });
1188
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
1189
+ const data = body ? JSON.parse(body) : {};
1190
+ return { data, status: res.status, headers: res.headers };
1191
+ };
1192
+ export const getDeleteAttachmentUrl = (attachment) => {
1193
+ return `https://assistant.leaflow.cloud/api/v1/attachments/${encodeURIComponent(String(attachment))}`;
1194
+ };
1195
+ /**
1196
+ * Hides the file from the library. Conversations that already use it keep it: the attachment
1197
+ * stays readable by id and keeps rendering in their history. Its bytes are released when the
1198
+ * project is deleted. A draft is cleared for good when its expiry passes. Idempotent.
1199
+ * @summary Remove a file from the library
1200
+ */
1201
+ export const deleteAttachment = async (attachment, options, fetchFn) => {
1202
+ const res = await (fetchFn ?? fetch)(getDeleteAttachmentUrl(attachment), {
1203
+ ...options,
1204
+ method: "DELETE",
1205
+ });
1206
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
1207
+ const data = body ? JSON.parse(body) : undefined;
1208
+ return { data, status: res.status, headers: res.headers };
1209
+ };
1210
+ export const getDownloadAttachmentUrl = (attachment) => {
1211
+ return `https://assistant.leaflow.cloud/api/v1/attachments/${encodeURIComponent(String(attachment))}:download`;
1212
+ };
1213
+ /**
1214
+ * Returns the original bytes for an attachment id, including one removed from the library. The response carries long-lived cache headers because the content never changes. Returns 404 when the attachment does not exist or does not belong to the current user.
1102
1215
  *
1103
1216
  * Only an attachment whose `type` is `image` comes back with its own image type and is usable as the address of an `<img>`. Everything else is served as `application/octet-stream` with `Content-Disposition: attachment`, deliberately: an uploaded file is arbitrary bytes under a name its uploader chose, and serving it back inline would run it on this origin.
1104
1217
  * @summary Download a file
@@ -21,6 +21,9 @@
21
21
  *
22
22
  * Upload large files with /api/v1/uploads: read /api/v1/upload-configuration first, send exact-sized
23
23
  * parts, then complete the upload and send its attachment id in a message.
24
+ *
25
+ * Files uploaded that way are listed by search-attachments. Renaming or removing one does not change
26
+ * the conversations that already use it; downloading keeps working.
24
27
  * OpenAPI spec version: 2.0.0
25
28
  */
26
29
  export interface FieldViolation {
@@ -1519,6 +1522,105 @@ export interface UpdateSettingsRequestBody {
1519
1522
  defaultModelId?: string | null;
1520
1523
  defaultReasoningEffort?: ReasoningEffort | null;
1521
1524
  }
1525
+ /**
1526
+ * Counts over everything the criteria match, ignoring `ids` and the cursor.
1527
+ */
1528
+ export interface AttachmentCountsResource {
1529
+ total: number;
1530
+ totalBytes: number;
1531
+ }
1532
+ /**
1533
+ * How the assistant will see this file.
1534
+ */
1535
+ export type AttachmentFileResourceType = (typeof AttachmentFileResourceType)[keyof typeof AttachmentFileResourceType];
1536
+ export declare const AttachmentFileResourceType: {
1537
+ readonly image: "image";
1538
+ readonly text: "text";
1539
+ readonly binary: "binary";
1540
+ };
1541
+ export interface AttachmentFileResource {
1542
+ byteSize: number;
1543
+ createdAt: string;
1544
+ /**
1545
+ * When this draft is cleared if no message ever references it. Null once a message uses it —
1546
+ * a file that belongs to a conversation is kept as long as the conversation is.
1547
+ * @nullable
1548
+ */
1549
+ draftExpiresAt: string | null;
1550
+ filename: string;
1551
+ /**
1552
+ * Null unless type is image.
1553
+ * @nullable
1554
+ */
1555
+ height: number | null;
1556
+ id: string;
1557
+ /** Detected at intake, not the Content-Type the client sent. */
1558
+ mime: string;
1559
+ /** How the assistant will see this file. */
1560
+ type: AttachmentFileResourceType;
1561
+ updatedAt: string;
1562
+ /**
1563
+ * Null unless type is image.
1564
+ * @nullable
1565
+ */
1566
+ width: number | null;
1567
+ }
1568
+ export interface AttachmentListResponseBody {
1569
+ attachments: AttachmentFileResource[];
1570
+ /**
1571
+ * Null on the last page.
1572
+ * @nullable
1573
+ */
1574
+ nextCursor: string | null;
1575
+ /** Null unless `include` asked for it. */
1576
+ counts: AttachmentCountsResource | null;
1577
+ }
1578
+ /**
1579
+ * How the assistant sees the file.
1580
+ */
1581
+ export type SearchAttachmentsRequestBodyType = (typeof SearchAttachmentsRequestBodyType)[keyof typeof SearchAttachmentsRequestBodyType];
1582
+ export declare const SearchAttachmentsRequestBodyType: {
1583
+ readonly image: "image";
1584
+ readonly text: "text";
1585
+ readonly binary: "binary";
1586
+ };
1587
+ export type SearchAttachmentsRequestBodyIncludeItem = (typeof SearchAttachmentsRequestBodyIncludeItem)[keyof typeof SearchAttachmentsRequestBodyIncludeItem];
1588
+ export declare const SearchAttachmentsRequestBodyIncludeItem: {
1589
+ readonly counts: "counts";
1590
+ };
1591
+ export interface SearchAttachmentsRequestBody {
1592
+ /**
1593
+ * Read these attachments. Cannot be combined with cursor.
1594
+ * @minItems 1
1595
+ * @maxItems 200
1596
+ */
1597
+ ids?: string[];
1598
+ /**
1599
+ * Matches filenames, case-insensitively.
1600
+ * @maxLength 100
1601
+ */
1602
+ q?: string;
1603
+ /** How the assistant sees the file. */
1604
+ type?: SearchAttachmentsRequestBodyType;
1605
+ /** True for uploads no message references, false for the rest. */
1606
+ draft?: boolean;
1607
+ /** @maxLength 1024 */
1608
+ cursor?: string;
1609
+ /**
1610
+ * @minimum 1
1611
+ * @maximum 200
1612
+ */
1613
+ limit?: number;
1614
+ /** Optional parts of the response. `counts` adds `counts`. */
1615
+ include?: SearchAttachmentsRequestBodyIncludeItem[];
1616
+ }
1617
+ export interface UpdateAttachmentRequestBody {
1618
+ /**
1619
+ * @minLength 1
1620
+ * @maxLength 255
1621
+ */
1622
+ filename: string;
1623
+ }
1522
1624
  /**
1523
1625
  * How the assistant will see this file.
1524
1626
  *
@@ -175,6 +175,19 @@ export const DefaultModelResourceSource = {
175
175
  user: "user",
176
176
  catalog: "catalog",
177
177
  };
178
+ export const AttachmentFileResourceType = {
179
+ image: "image",
180
+ text: "text",
181
+ binary: "binary",
182
+ };
183
+ export const SearchAttachmentsRequestBodyType = {
184
+ image: "image",
185
+ text: "text",
186
+ binary: "binary",
187
+ };
188
+ export const SearchAttachmentsRequestBodyIncludeItem = {
189
+ counts: "counts",
190
+ };
178
191
  export const UploadedResourceType = {
179
192
  image: "image",
180
193
  text: "text",
@@ -21,6 +21,9 @@
21
21
  *
22
22
  * Upload large files with /api/v1/uploads: read /api/v1/upload-configuration first, send exact-sized
23
23
  * parts, then complete the upload and send its attachment id in a message.
24
+ *
25
+ * Files uploaded that way are listed by search-attachments. Renaming or removing one does not change
26
+ * the conversations that already use it; downloading keeps working.
24
27
  * OpenAPI spec version: 2.0.0
25
28
  */
26
29
  import * as zod from "zod";
@@ -645,7 +648,39 @@ export declare const UploadAttachmentQueryParams: zod.ZodObject<{
645
648
  filename: zod.ZodOptional<zod.ZodString>;
646
649
  }, zod.z.core.$strict>;
647
650
  /**
648
- * Returns the original bytes for an attachment id. The response carries long-lived cache headers because the content never changes. Returns 404 when the attachment does not exist or does not belong to the current user.
651
+ * Metadata for one attachment. The bytes are at /api/v1/attachments/{attachment}:download.
652
+ *
653
+ * Returns 404 when the attachment does not exist, does not belong to the current user, or was
654
+ * removed from the library. Removed files stay readable through their conversations but are no
655
+ * longer described here.
656
+ * @summary Get a file
657
+ */
658
+ export declare const GetAttachmentParams: zod.ZodObject<{
659
+ attachment: zod.ZodString;
660
+ }, zod.z.core.$strict>;
661
+ /**
662
+ * Changes the name shown in the library and given to the assistant. The bytes and the attachment
663
+ * id do not change; conversations that already use it see the new name from their next request
664
+ * on.
665
+ * @summary Rename a file
666
+ */
667
+ export declare const UpdateAttachmentParams: zod.ZodObject<{
668
+ attachment: zod.ZodString;
669
+ }, zod.z.core.$strict>;
670
+ export declare const UpdateAttachmentBody: zod.ZodObject<{
671
+ filename: zod.ZodString;
672
+ }, zod.z.core.$strict>;
673
+ /**
674
+ * Hides the file from the library. Conversations that already use it keep it: the attachment
675
+ * stays readable by id and keeps rendering in their history. Its bytes are released when the
676
+ * project is deleted. A draft is cleared for good when its expiry passes. Idempotent.
677
+ * @summary Remove a file from the library
678
+ */
679
+ export declare const DeleteAttachmentParams: zod.ZodObject<{
680
+ attachment: zod.ZodString;
681
+ }, zod.z.core.$strict>;
682
+ /**
683
+ * Returns the original bytes for an attachment id, including one removed from the library. The response carries long-lived cache headers because the content never changes. Returns 404 when the attachment does not exist or does not belong to the current user.
649
684
  *
650
685
  * Only an attachment whose `type` is `image` comes back with its own image type and is usable as the address of an `<img>`. Everything else is served as `application/octet-stream` with `Content-Disposition: attachment`, deliberately: an uploaded file is arbitrary bytes under a name its uploader chose, and serving it back inline would run it on this origin.
651
686
  * @summary Download a file
@@ -21,6 +21,9 @@
21
21
  *
22
22
  * Upload large files with /api/v1/uploads: read /api/v1/upload-configuration first, send exact-sized
23
23
  * parts, then complete the upload and send its attachment id in a message.
24
+ *
25
+ * Files uploaded that way are listed by search-attachments. Renaming or removing one does not change
26
+ * the conversations that already use it; downloading keeps working.
24
27
  * OpenAPI spec version: 2.0.0
25
28
  */
26
29
  import * as zod from "zod";
@@ -41,6 +44,7 @@ import { SendMessageRequestBody } from "./validators/sendMessageRequestBody.zod.
41
44
  import { SkillEnabledRequestBody } from "./validators/skillEnabledRequestBody.zod.js";
42
45
  import { SkillRequestBody } from "./validators/skillRequestBody.zod.js";
43
46
  import { ToolResultRequestBody } from "./validators/toolResultRequestBody.zod.js";
47
+ import { UpdateAttachmentRequestBody } from "./validators/updateAttachmentRequestBody.zod.js";
44
48
  import { UpdateChannelRequestBody } from "./validators/updateChannelRequestBody.zod.js";
45
49
  import { UpdateFolderRequestBody } from "./validators/updateFolderRequestBody.zod.js";
46
50
  import { UpdateSettingsRequestBody } from "./validators/updateSettingsRequestBody.zod.js";
@@ -585,7 +589,37 @@ export const UploadAttachmentQueryParams = zod.strictObject({
585
589
  .describe("The name to show and to give the assistant. Images do not need one; anything else does, because the name is most of what says what the file is. Falls back to a generated name."),
586
590
  });
587
591
  /**
588
- * Returns the original bytes for an attachment id. The response carries long-lived cache headers because the content never changes. Returns 404 when the attachment does not exist or does not belong to the current user.
592
+ * Metadata for one attachment. The bytes are at /api/v1/attachments/{attachment}:download.
593
+ *
594
+ * Returns 404 when the attachment does not exist, does not belong to the current user, or was
595
+ * removed from the library. Removed files stay readable through their conversations but are no
596
+ * longer described here.
597
+ * @summary Get a file
598
+ */
599
+ export const GetAttachmentParams = zod.strictObject({
600
+ attachment: zod.string(),
601
+ });
602
+ /**
603
+ * Changes the name shown in the library and given to the assistant. The bytes and the attachment
604
+ * id do not change; conversations that already use it see the new name from their next request
605
+ * on.
606
+ * @summary Rename a file
607
+ */
608
+ export const UpdateAttachmentParams = zod.strictObject({
609
+ attachment: zod.string(),
610
+ });
611
+ export const UpdateAttachmentBody = UpdateAttachmentRequestBody;
612
+ /**
613
+ * Hides the file from the library. Conversations that already use it keep it: the attachment
614
+ * stays readable by id and keeps rendering in their history. Its bytes are released when the
615
+ * project is deleted. A draft is cleared for good when its expiry passes. Idempotent.
616
+ * @summary Remove a file from the library
617
+ */
618
+ export const DeleteAttachmentParams = zod.strictObject({
619
+ attachment: zod.string(),
620
+ });
621
+ /**
622
+ * Returns the original bytes for an attachment id, including one removed from the library. The response carries long-lived cache headers because the content never changes. Returns 404 when the attachment does not exist or does not belong to the current user.
589
623
  *
590
624
  * Only an attachment whose `type` is `image` comes back with its own image type and is usable as the address of an `<img>`. Everything else is served as `application/octet-stream` with `Content-Disposition: attachment`, deliberately: an uploaded file is arbitrary bytes under a name its uploader chose, and serving it back inline would run it on this origin.
591
625
  * @summary Download a file
@@ -21,6 +21,9 @@
21
21
  *
22
22
  * Upload large files with /api/v1/uploads: read /api/v1/upload-configuration first, send exact-sized
23
23
  * parts, then complete the upload and send its attachment id in a message.
24
+ *
25
+ * Files uploaded that way are listed by search-attachments. Renaming or removing one does not change
26
+ * the conversations that already use it; downloading keeps working.
24
27
  * OpenAPI spec version: 2.0.0
25
28
  */
26
29
  import * as zod from "zod";
@@ -21,6 +21,9 @@
21
21
  *
22
22
  * Upload large files with /api/v1/uploads: read /api/v1/upload-configuration first, send exact-sized
23
23
  * parts, then complete the upload and send its attachment id in a message.
24
+ *
25
+ * Files uploaded that way are listed by search-attachments. Renaming or removing one does not change
26
+ * the conversations that already use it; downloading keeps working.
24
27
  * OpenAPI spec version: 2.0.0
25
28
  */
26
29
  import * as zod from "zod";
@@ -21,6 +21,9 @@
21
21
  *
22
22
  * Upload large files with /api/v1/uploads: read /api/v1/upload-configuration first, send exact-sized
23
23
  * parts, then complete the upload and send its attachment id in a message.
24
+ *
25
+ * Files uploaded that way are listed by search-attachments. Renaming or removing one does not change
26
+ * the conversations that already use it; downloading keeps working.
24
27
  * OpenAPI spec version: 2.0.0
25
28
  */
26
29
  import * as zod from "zod";
@@ -21,6 +21,9 @@
21
21
  *
22
22
  * Upload large files with /api/v1/uploads: read /api/v1/upload-configuration first, send exact-sized
23
23
  * parts, then complete the upload and send its attachment id in a message.
24
+ *
25
+ * Files uploaded that way are listed by search-attachments. Renaming or removing one does not change
26
+ * the conversations that already use it; downloading keeps working.
24
27
  * OpenAPI spec version: 2.0.0
25
28
  */
26
29
  import * as zod from "zod";
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Assistant API
5
+ * Conversations with agents that operate the Leaflow platform, plus their folders, tasks, files and
6
+ * chat-app channels.
7
+ *
8
+ * A conversation is a thread. A person talks to the main thread; the agent in it can start subagents,
9
+ * which are threads too and run on their own: stopping the main thread does not stop them, and each
10
+ * subagent tells its parent when it ends. A thread runs in turns; each turn records the model and
11
+ * reasoning effort it used and its token usage.
12
+ *
13
+ * Models come from the Canopy catalogue. A new thread uses the model it names, the caller's default
14
+ * from /api/v1/settings, or the first catalogue model that can run an agent. Reasoning models take one
15
+ * of three efforts — low, medium or high — which are sent to the model unchanged.
16
+ *
17
+ * Read a thread's state with get-thread and its transcript with list-thread-items. Follow both live
18
+ * through EventBus by subscribing to assistant.thread.frame and assistant.resource.updated; after a
19
+ * reconnection or an assistant.workspace.invalidated message, read them again. list-thread-messages
20
+ * outlines the person's messages for navigating a long conversation.
21
+ *
22
+ * Upload large files with /api/v1/uploads: read /api/v1/upload-configuration first, send exact-sized
23
+ * parts, then complete the upload and send its attachment id in a message.
24
+ *
25
+ * Files uploaded that way are listed by search-attachments. Renaming or removing one does not change
26
+ * the conversations that already use it; downloading keeps working.
27
+ * OpenAPI spec version: 2.0.0
28
+ */
29
+ import * as zod from "zod";
30
+ export declare const AttachmentCountsResource: zod.ZodObject<{
31
+ total: zod.ZodInt;
32
+ totalBytes: zod.ZodInt;
33
+ }, zod.z.core.$strict>;
34
+ export type AttachmentCountsResource = zod.input<typeof AttachmentCountsResource>;
35
+ export type AttachmentCountsResourceOutput = zod.output<typeof AttachmentCountsResource>;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Generated by orval 🍺
3
+ * Do not edit manually.
4
+ * Leaflow Assistant API
5
+ * Conversations with agents that operate the Leaflow platform, plus their folders, tasks, files and
6
+ * chat-app channels.
7
+ *
8
+ * A conversation is a thread. A person talks to the main thread; the agent in it can start subagents,
9
+ * which are threads too and run on their own: stopping the main thread does not stop them, and each
10
+ * subagent tells its parent when it ends. A thread runs in turns; each turn records the model and
11
+ * reasoning effort it used and its token usage.
12
+ *
13
+ * Models come from the Canopy catalogue. A new thread uses the model it names, the caller's default
14
+ * from /api/v1/settings, or the first catalogue model that can run an agent. Reasoning models take one
15
+ * of three efforts — low, medium or high — which are sent to the model unchanged.
16
+ *
17
+ * Read a thread's state with get-thread and its transcript with list-thread-items. Follow both live
18
+ * through EventBus by subscribing to assistant.thread.frame and assistant.resource.updated; after a
19
+ * reconnection or an assistant.workspace.invalidated message, read them again. list-thread-messages
20
+ * outlines the person's messages for navigating a long conversation.
21
+ *
22
+ * Upload large files with /api/v1/uploads: read /api/v1/upload-configuration first, send exact-sized
23
+ * parts, then complete the upload and send its attachment id in a message.
24
+ *
25
+ * Files uploaded that way are listed by search-attachments. Renaming or removing one does not change
26
+ * the conversations that already use it; downloading keeps working.
27
+ * OpenAPI spec version: 2.0.0
28
+ */
29
+ import * as zod from "zod";
30
+ export const AttachmentCountsResource = zod
31
+ .strictObject({
32
+ total: zod.int(),
33
+ totalBytes: zod.int(),
34
+ })
35
+ .describe("Counts over everything the criteria match, ignoring `ids` and the cursor.");