@leaflow/sdk 0.0.0-dev.358.gbb34078 → 0.0.0-dev.361.gefdc428

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 (943) hide show
  1. package/dist/assistant/v1/generated/functions.d.ts +1280 -560
  2. package/dist/assistant/v1/generated/functions.js +1288 -447
  3. package/dist/assistant/v1/generated/models.d.ts +1777 -979
  4. package/dist/assistant/v1/generated/models.js +196 -83
  5. package/dist/assistant/v1/generated/schemas.zod.d.ts +728 -313
  6. package/dist/assistant/v1/generated/schemas.zod.js +635 -274
  7. package/dist/assistant/v1/generated/validators/answerQuestionRequestBody.zod.d.ts +30 -0
  8. package/dist/assistant/v1/generated/validators/answerQuestionRequestBody.zod.js +28 -0
  9. package/dist/assistant/v1/generated/validators/approvalMode.zod.d.ts +32 -0
  10. package/dist/assistant/v1/generated/validators/approvalMode.zod.js +28 -0
  11. package/dist/assistant/v1/generated/validators/attachmentResource.zod.d.ts +19 -43
  12. package/dist/assistant/v1/generated/validators/attachmentResource.zod.js +23 -47
  13. package/dist/assistant/v1/generated/validators/bindingCodeResponseBody.zod.d.ts +15 -39
  14. package/dist/assistant/v1/generated/validators/bindingCodeResponseBody.zod.js +15 -39
  15. package/dist/assistant/v1/generated/validators/bindingResource.zod.d.ts +16 -40
  16. package/dist/assistant/v1/generated/validators/bindingResource.zod.js +16 -40
  17. package/dist/assistant/v1/generated/validators/channelResource.zod.d.ts +18 -42
  18. package/dist/assistant/v1/generated/validators/channelResource.zod.js +17 -41
  19. package/dist/assistant/v1/generated/validators/channelWithSecretResponseBody.zod.d.ts +18 -42
  20. package/dist/assistant/v1/generated/validators/channelWithSecretResponseBody.zod.js +17 -41
  21. package/dist/assistant/v1/generated/validators/checkSenderParams.zod.d.ts +15 -39
  22. package/dist/assistant/v1/generated/validators/checkSenderParams.zod.js +15 -39
  23. package/dist/assistant/v1/generated/validators/choiceResource.zod.d.ts +31 -0
  24. package/dist/assistant/v1/generated/validators/choiceResource.zod.js +29 -0
  25. package/dist/assistant/v1/generated/validators/clientActionRequest.zod.d.ts +21 -45
  26. package/dist/assistant/v1/generated/validators/clientActionRequest.zod.js +20 -47
  27. package/dist/assistant/v1/generated/validators/clientContextPart.zod.d.ts +16 -40
  28. package/dist/assistant/v1/generated/validators/clientContextPart.zod.js +17 -41
  29. package/dist/assistant/v1/generated/validators/clientContextRequest.zod.d.ts +23 -47
  30. package/dist/assistant/v1/generated/validators/clientContextRequest.zod.js +24 -48
  31. package/dist/assistant/v1/generated/validators/clientFunctionRequest.zod.d.ts +18 -42
  32. package/dist/assistant/v1/generated/validators/clientFunctionRequest.zod.js +24 -50
  33. package/dist/assistant/v1/generated/validators/commandListResponseBody.zod.d.ts +35 -0
  34. package/dist/assistant/v1/generated/validators/commandListResponseBody.zod.js +29 -0
  35. package/dist/assistant/v1/generated/validators/commandResource.zod.d.ts +33 -0
  36. package/dist/assistant/v1/generated/validators/commandResource.zod.js +33 -0
  37. package/dist/assistant/v1/generated/validators/commandResultResource.zod.d.ts +201 -0
  38. package/dist/assistant/v1/generated/validators/commandResultResource.zod.js +37 -0
  39. package/dist/assistant/v1/generated/validators/completeUploadRequestBody.zod.d.ts +30 -0
  40. package/dist/assistant/v1/generated/validators/completeUploadRequestBody.zod.js +28 -0
  41. package/dist/assistant/v1/generated/validators/contextUsageResource.zod.d.ts +31 -0
  42. package/dist/assistant/v1/generated/validators/contextUsageResource.zod.js +37 -0
  43. package/dist/assistant/v1/generated/validators/createChannelRequestBody.zod.d.ts +15 -39
  44. package/dist/assistant/v1/generated/validators/createChannelRequestBody.zod.js +15 -39
  45. package/dist/assistant/v1/generated/validators/createFolderRequestBody.zod.d.ts +15 -39
  46. package/dist/assistant/v1/generated/validators/createFolderRequestBody.zod.js +15 -39
  47. package/dist/assistant/v1/generated/validators/createTaskRequestBody.zod.d.ts +61 -0
  48. package/dist/assistant/v1/generated/validators/createTaskRequestBody.zod.js +35 -0
  49. package/dist/assistant/v1/generated/validators/createThreadRequestBody.zod.d.ts +51 -41
  50. package/dist/assistant/v1/generated/validators/createThreadRequestBody.zod.js +33 -47
  51. package/dist/assistant/v1/generated/validators/createThreadResponseBody.zod.d.ts +118 -0
  52. package/dist/assistant/v1/generated/validators/createThreadResponseBody.zod.js +33 -0
  53. package/dist/assistant/v1/generated/validators/createUploadRequestBody.zod.d.ts +37 -0
  54. package/dist/assistant/v1/generated/validators/createUploadRequestBody.zod.js +35 -0
  55. package/dist/assistant/v1/generated/validators/credentialFieldResource.zod.d.ts +15 -39
  56. package/dist/assistant/v1/generated/validators/credentialFieldResource.zod.js +15 -39
  57. package/dist/assistant/v1/generated/validators/cursorPagination.zod.d.ts +15 -39
  58. package/dist/assistant/v1/generated/validators/cursorPagination.zod.js +15 -39
  59. package/dist/assistant/v1/generated/validators/decideToolCallsRequestBody.zod.d.ts +33 -0
  60. package/dist/assistant/v1/generated/validators/decideToolCallsRequestBody.zod.js +38 -0
  61. package/dist/assistant/v1/generated/validators/defaultModelResource.zod.d.ts +39 -0
  62. package/dist/assistant/v1/generated/validators/defaultModelResource.zod.js +38 -0
  63. package/dist/assistant/v1/generated/validators/error.zod.d.ts +15 -39
  64. package/dist/assistant/v1/generated/validators/error.zod.js +15 -39
  65. package/dist/assistant/v1/generated/validators/fileDiffResource.zod.d.ts +18 -42
  66. package/dist/assistant/v1/generated/validators/fileDiffResource.zod.js +22 -46
  67. package/dist/assistant/v1/generated/validators/folderCountsResource.zod.d.ts +35 -0
  68. package/dist/assistant/v1/generated/validators/folderCountsResource.zod.js +35 -0
  69. package/dist/assistant/v1/generated/validators/folderListResponseBody.zod.d.ts +28 -43
  70. package/dist/assistant/v1/generated/validators/folderListResponseBody.zod.js +16 -40
  71. package/dist/assistant/v1/generated/validators/folderResource.zod.d.ts +27 -41
  72. package/dist/assistant/v1/generated/validators/folderResource.zod.js +23 -43
  73. package/dist/assistant/v1/generated/validators/itemFrame.zod.d.ts +36 -0
  74. package/dist/assistant/v1/generated/validators/itemFrame.zod.js +32 -0
  75. package/dist/assistant/v1/generated/validators/itemSourceResource.zod.d.ts +36 -0
  76. package/dist/assistant/v1/generated/validators/itemSourceResource.zod.js +31 -0
  77. package/dist/assistant/v1/generated/validators/lastTurnResource.zod.d.ts +43 -0
  78. package/dist/assistant/v1/generated/validators/lastTurnResource.zod.js +37 -0
  79. package/dist/assistant/v1/generated/validators/lengthAwarePageBindingResource.zod.d.ts +16 -40
  80. package/dist/assistant/v1/generated/validators/lengthAwarePageBindingResource.zod.js +15 -39
  81. package/dist/assistant/v1/generated/validators/lengthAwarePageChannelResource.zod.d.ts +18 -42
  82. package/dist/assistant/v1/generated/validators/lengthAwarePageChannelResource.zod.js +15 -39
  83. package/dist/assistant/v1/generated/validators/listBindingsParams.zod.d.ts +15 -39
  84. package/dist/assistant/v1/generated/validators/listBindingsParams.zod.js +15 -39
  85. package/dist/assistant/v1/generated/validators/listChannelRejectionsParams.zod.d.ts +15 -39
  86. package/dist/assistant/v1/generated/validators/listChannelRejectionsParams.zod.js +15 -39
  87. package/dist/assistant/v1/generated/validators/listChannelsParams.zod.d.ts +15 -39
  88. package/dist/assistant/v1/generated/validators/listChannelsParams.zod.js +15 -39
  89. package/dist/assistant/v1/generated/validators/listTaskRunsParams.zod.d.ts +34 -0
  90. package/dist/assistant/v1/generated/validators/listTaskRunsParams.zod.js +32 -0
  91. package/dist/assistant/v1/generated/validators/listThreadItemsParams.zod.d.ts +38 -0
  92. package/dist/assistant/v1/generated/validators/listThreadItemsParams.zod.js +40 -0
  93. package/dist/assistant/v1/generated/validators/listThreadTurnsParams.zod.d.ts +36 -0
  94. package/dist/assistant/v1/generated/validators/listThreadTurnsParams.zod.js +38 -0
  95. package/dist/assistant/v1/generated/validators/loginResource.zod.d.ts +15 -39
  96. package/dist/assistant/v1/generated/validators/loginResource.zod.js +15 -39
  97. package/dist/assistant/v1/generated/validators/memoryListResponseBody.zod.d.ts +15 -39
  98. package/dist/assistant/v1/generated/validators/memoryListResponseBody.zod.js +15 -39
  99. package/dist/assistant/v1/generated/validators/memoryResource.zod.d.ts +15 -39
  100. package/dist/assistant/v1/generated/validators/memoryResource.zod.js +15 -39
  101. package/dist/assistant/v1/generated/validators/messagePart.zod.d.ts +17 -41
  102. package/dist/assistant/v1/generated/validators/messagePart.zod.js +20 -47
  103. package/dist/assistant/v1/generated/validators/moveFolderRequestBody.zod.d.ts +32 -0
  104. package/dist/assistant/v1/generated/validators/moveFolderRequestBody.zod.js +30 -0
  105. package/dist/assistant/v1/generated/validators/offsetPagination.zod.d.ts +15 -39
  106. package/dist/assistant/v1/generated/validators/offsetPagination.zod.js +15 -39
  107. package/dist/assistant/v1/generated/validators/openRealtimeParams.zod.d.ts +31 -0
  108. package/dist/assistant/v1/generated/validators/openRealtimeParams.zod.js +29 -0
  109. package/dist/assistant/v1/generated/validators/partResource.zod.d.ts +17 -41
  110. package/dist/assistant/v1/generated/validators/partResource.zod.js +21 -45
  111. package/dist/assistant/v1/generated/validators/pendingActionResource.zod.d.ts +35 -0
  112. package/dist/assistant/v1/generated/validators/pendingActionResource.zod.js +37 -0
  113. package/dist/assistant/v1/generated/validators/placeThreadRequestBody.zod.d.ts +33 -0
  114. package/dist/assistant/v1/generated/validators/placeThreadRequestBody.zod.js +34 -0
  115. package/dist/assistant/v1/generated/validators/platformListResponseBody.zod.d.ts +15 -39
  116. package/dist/assistant/v1/generated/validators/platformListResponseBody.zod.js +15 -39
  117. package/dist/assistant/v1/generated/validators/platformResource.zod.d.ts +15 -39
  118. package/dist/assistant/v1/generated/validators/platformResource.zod.js +15 -39
  119. package/dist/assistant/v1/generated/validators/presentationResource.zod.d.ts +23 -47
  120. package/dist/assistant/v1/generated/validators/presentationResource.zod.js +20 -42
  121. package/dist/assistant/v1/generated/validators/putUploadPartHeaders.zod.d.ts +30 -0
  122. package/dist/assistant/v1/generated/validators/putUploadPartHeaders.zod.js +28 -0
  123. package/dist/assistant/v1/generated/validators/putUploadPartParams.zod.d.ts +30 -0
  124. package/dist/assistant/v1/generated/validators/putUploadPartParams.zod.js +28 -0
  125. package/dist/assistant/v1/generated/validators/questionResource.zod.d.ts +36 -0
  126. package/dist/assistant/v1/generated/validators/questionResource.zod.js +34 -0
  127. package/dist/assistant/v1/generated/validators/realtimeClientMessage.zod.d.ts +38 -0
  128. package/dist/assistant/v1/generated/validators/realtimeClientMessage.zod.js +42 -0
  129. package/dist/assistant/v1/generated/validators/realtimeExchange.zod.d.ts +278 -0
  130. package/dist/assistant/v1/generated/validators/realtimeExchange.zod.js +33 -0
  131. package/dist/assistant/v1/generated/validators/realtimeServerMessage.zod.d.ts +267 -0
  132. package/dist/assistant/v1/generated/validators/realtimeServerMessage.zod.js +64 -0
  133. package/dist/assistant/v1/generated/validators/realtimeTicketResource.zod.d.ts +32 -0
  134. package/dist/assistant/v1/generated/validators/realtimeTicketResource.zod.js +30 -0
  135. package/dist/assistant/v1/generated/validators/reasoningEffort.zod.d.ts +32 -0
  136. package/dist/assistant/v1/generated/validators/reasoningEffort.zod.js +28 -0
  137. package/dist/assistant/v1/generated/validators/rejectionListResponseBody.zod.d.ts +15 -39
  138. package/dist/assistant/v1/generated/validators/rejectionListResponseBody.zod.js +15 -39
  139. package/dist/assistant/v1/generated/validators/rejectionResource.zod.d.ts +15 -39
  140. package/dist/assistant/v1/generated/validators/rejectionResource.zod.js +15 -39
  141. package/dist/assistant/v1/generated/validators/resumeThreadRequestBody.zod.d.ts +31 -0
  142. package/dist/assistant/v1/generated/validators/resumeThreadRequestBody.zod.js +33 -0
  143. package/dist/assistant/v1/generated/validators/revertRequestBody.zod.d.ts +16 -39
  144. package/dist/assistant/v1/generated/validators/revertRequestBody.zod.js +18 -40
  145. package/dist/assistant/v1/generated/validators/revertedCountResponseBody.zod.d.ts +16 -39
  146. package/dist/assistant/v1/generated/validators/revertedCountResponseBody.zod.js +17 -40
  147. package/dist/assistant/v1/generated/validators/rotateSecretRequestBody.zod.d.ts +15 -39
  148. package/dist/assistant/v1/generated/validators/rotateSecretRequestBody.zod.js +15 -39
  149. package/dist/assistant/v1/generated/validators/runCommandRequestBody.zod.d.ts +33 -0
  150. package/dist/assistant/v1/generated/validators/runCommandRequestBody.zod.js +39 -0
  151. package/dist/assistant/v1/generated/validators/searchTasksRequestBody.zod.d.ts +52 -0
  152. package/dist/assistant/v1/generated/validators/searchTasksRequestBody.zod.js +45 -0
  153. package/dist/assistant/v1/generated/validators/searchThreadsRequestBody.zod.d.ts +62 -0
  154. package/dist/assistant/v1/generated/validators/searchThreadsRequestBody.zod.js +83 -0
  155. package/dist/assistant/v1/generated/validators/sendMessageRequestBody.zod.d.ts +28 -52
  156. package/dist/assistant/v1/generated/validators/sendMessageRequestBody.zod.js +17 -41
  157. package/dist/assistant/v1/generated/validators/sendMessageResponseBody.zod.d.ts +33 -0
  158. package/dist/assistant/v1/generated/validators/sendMessageResponseBody.zod.js +37 -0
  159. package/dist/assistant/v1/generated/validators/senderCheckResource.zod.d.ts +15 -39
  160. package/dist/assistant/v1/generated/validators/senderCheckResource.zod.js +15 -39
  161. package/dist/assistant/v1/generated/validators/settingsResource.zod.d.ts +47 -0
  162. package/dist/assistant/v1/generated/validators/settingsResource.zod.js +34 -0
  163. package/dist/assistant/v1/generated/validators/skillEnabledRequestBody.zod.d.ts +15 -39
  164. package/dist/assistant/v1/generated/validators/skillEnabledRequestBody.zod.js +15 -39
  165. package/dist/assistant/v1/generated/validators/skillListResponseBody.zod.d.ts +15 -39
  166. package/dist/assistant/v1/generated/validators/skillListResponseBody.zod.js +15 -39
  167. package/dist/assistant/v1/generated/validators/skillRequestBody.zod.d.ts +15 -39
  168. package/dist/assistant/v1/generated/validators/skillRequestBody.zod.js +15 -39
  169. package/dist/assistant/v1/generated/validators/skillResource.zod.d.ts +15 -39
  170. package/dist/assistant/v1/generated/validators/skillResource.zod.js +15 -39
  171. package/dist/assistant/v1/generated/validators/statusReportResource.zod.d.ts +108 -0
  172. package/dist/assistant/v1/generated/validators/statusReportResource.zod.js +48 -0
  173. package/dist/assistant/v1/generated/validators/subagentCountResource.zod.d.ts +33 -0
  174. package/dist/assistant/v1/generated/validators/subagentCountResource.zod.js +31 -0
  175. package/dist/assistant/v1/generated/validators/taskAction.zod.d.ts +41 -0
  176. package/dist/assistant/v1/generated/validators/taskAction.zod.js +51 -0
  177. package/dist/assistant/v1/generated/validators/taskListResponseBody.zod.d.ts +89 -0
  178. package/dist/assistant/v1/generated/validators/taskListResponseBody.zod.js +30 -0
  179. package/dist/assistant/v1/generated/validators/taskResource.zod.d.ts +86 -0
  180. package/dist/assistant/v1/generated/validators/taskResource.zod.js +45 -0
  181. package/dist/assistant/v1/generated/validators/taskRunListResponseBody.zod.d.ts +47 -0
  182. package/dist/assistant/v1/generated/validators/taskRunListResponseBody.zod.js +30 -0
  183. package/dist/assistant/v1/generated/validators/taskRunResource.zod.d.ts +44 -0
  184. package/dist/assistant/v1/generated/validators/taskRunResource.zod.js +38 -0
  185. package/dist/assistant/v1/generated/validators/taskTrigger.zod.d.ts +51 -0
  186. package/dist/assistant/v1/generated/validators/taskTrigger.zod.js +64 -0
  187. package/dist/assistant/v1/generated/validators/threadCountsResource.zod.d.ts +37 -0
  188. package/dist/assistant/v1/generated/validators/threadCountsResource.zod.js +37 -0
  189. package/dist/assistant/v1/generated/validators/threadItemListResponseBody.zod.d.ts +234 -0
  190. package/dist/assistant/v1/generated/validators/threadItemListResponseBody.zod.js +46 -0
  191. package/dist/assistant/v1/generated/validators/threadItemResource.zod.d.ts +127 -0
  192. package/dist/assistant/v1/generated/validators/threadItemResource.zod.js +84 -0
  193. package/dist/assistant/v1/generated/validators/threadListResponseBody.zod.d.ts +102 -48
  194. package/dist/assistant/v1/generated/validators/threadListResponseBody.zod.js +22 -45
  195. package/dist/assistant/v1/generated/validators/threadResource.zod.d.ts +116 -0
  196. package/dist/assistant/v1/generated/validators/threadResource.zod.js +94 -0
  197. package/dist/assistant/v1/generated/validators/threadStatus.zod.d.ts +35 -0
  198. package/dist/assistant/v1/generated/validators/threadStatus.zod.js +28 -0
  199. package/dist/assistant/v1/generated/validators/threadTurnListResponseBody.zod.d.ts +74 -0
  200. package/dist/assistant/v1/generated/validators/threadTurnListResponseBody.zod.js +30 -0
  201. package/dist/assistant/v1/generated/validators/threadTurnResource.zod.d.ts +72 -0
  202. package/dist/assistant/v1/generated/validators/threadTurnResource.zod.js +69 -0
  203. package/dist/assistant/v1/generated/validators/todoResource.zod.d.ts +17 -41
  204. package/dist/assistant/v1/generated/validators/todoResource.zod.js +18 -42
  205. package/dist/assistant/v1/generated/validators/toolCallResource.zod.d.ts +64 -0
  206. package/dist/assistant/v1/generated/validators/toolCallResource.zod.js +71 -0
  207. package/dist/assistant/v1/generated/validators/toolResultRequestBody.zod.d.ts +36 -0
  208. package/dist/assistant/v1/generated/validators/toolResultRequestBody.zod.js +48 -0
  209. package/dist/assistant/v1/generated/validators/turnStartedResponseBody.zod.d.ts +30 -0
  210. package/dist/assistant/v1/generated/validators/turnStartedResponseBody.zod.js +28 -0
  211. package/dist/assistant/v1/generated/validators/turnStatus.zod.d.ts +34 -0
  212. package/dist/assistant/v1/generated/validators/turnStatus.zod.js +28 -0
  213. package/dist/assistant/v1/generated/validators/turnType.zod.d.ts +31 -0
  214. package/dist/assistant/v1/generated/validators/turnType.zod.js +28 -0
  215. package/dist/assistant/v1/generated/validators/updateChannelRequestBody.zod.d.ts +15 -39
  216. package/dist/assistant/v1/generated/validators/updateChannelRequestBody.zod.js +15 -39
  217. package/dist/assistant/v1/generated/validators/updateFolderRequestBody.zod.d.ts +15 -39
  218. package/dist/assistant/v1/generated/validators/updateFolderRequestBody.zod.js +15 -39
  219. package/dist/assistant/v1/generated/validators/updateSettingsRequestBody.zod.d.ts +36 -0
  220. package/dist/assistant/v1/generated/validators/updateSettingsRequestBody.zod.js +31 -0
  221. package/dist/assistant/v1/generated/validators/updateTaskRequestBody.zod.d.ts +59 -0
  222. package/dist/assistant/v1/generated/validators/updateTaskRequestBody.zod.js +33 -0
  223. package/dist/assistant/v1/generated/validators/updateThreadRequestBody.zod.d.ts +23 -44
  224. package/dist/assistant/v1/generated/validators/updateThreadRequestBody.zod.js +22 -59
  225. package/dist/assistant/v1/generated/validators/updateUploadRequestBody.zod.d.ts +31 -0
  226. package/dist/assistant/v1/generated/validators/updateUploadRequestBody.zod.js +29 -0
  227. package/dist/assistant/v1/generated/validators/uploadAttachmentParams.zod.d.ts +15 -39
  228. package/dist/assistant/v1/generated/validators/uploadAttachmentParams.zod.js +15 -39
  229. package/dist/assistant/v1/generated/validators/uploadConfigurationResource.zod.d.ts +35 -0
  230. package/dist/assistant/v1/generated/validators/uploadConfigurationResource.zod.js +33 -0
  231. package/dist/assistant/v1/generated/validators/uploadListResponseBody.zod.d.ts +44 -0
  232. package/dist/assistant/v1/generated/validators/uploadListResponseBody.zod.js +29 -0
  233. package/dist/assistant/v1/generated/validators/uploadPartResource.zod.d.ts +32 -0
  234. package/dist/assistant/v1/generated/validators/uploadPartResource.zod.js +30 -0
  235. package/dist/assistant/v1/generated/validators/uploadResource.zod.d.ts +42 -0
  236. package/dist/assistant/v1/generated/validators/uploadResource.zod.js +37 -0
  237. package/dist/assistant/v1/generated/validators/uploadedResource.zod.d.ts +16 -40
  238. package/dist/assistant/v1/generated/validators/uploadedResource.zod.js +18 -42
  239. package/dist/assistant/v1/generated/validators/usage.zod.d.ts +44 -0
  240. package/dist/assistant/v1/generated/validators/usage.zod.js +61 -0
  241. package/dist/assistant/v1/generated/validators/verifyCodeRequestBody.zod.d.ts +15 -39
  242. package/dist/assistant/v1/generated/validators/verifyCodeRequestBody.zod.js +15 -39
  243. package/dist/assistant/v1/generated/validators/webhookSecretResponseBody.zod.d.ts +15 -39
  244. package/dist/assistant/v1/generated/validators/webhookSecretResponseBody.zod.js +15 -39
  245. package/dist/billing/type/order/v1/generated/models.d.ts +71 -33
  246. package/dist/billing/type/order/v1/generated/models.js +2 -1
  247. package/dist/billing/type/order/v1/generated/validators/allowance.zod.d.ts +1 -1
  248. package/dist/billing/type/order/v1/generated/validators/allowanceList.zod.d.ts +1 -1
  249. package/dist/billing/type/order/v1/generated/validators/cancelSubscriptionRequest.zod.js +2 -2
  250. package/dist/billing/type/order/v1/generated/validators/cancellation.zod.js +2 -2
  251. package/dist/billing/type/order/v1/generated/validators/cancellationCreate.zod.js +2 -2
  252. package/dist/billing/type/order/v1/generated/validators/{terminationPolicy.zod.d.ts → cancellationPolicy.zod.d.ts} +3 -3
  253. package/dist/billing/type/order/v1/generated/validators/{terminationPolicy.zod.js → cancellationPolicy.zod.js} +2 -2
  254. package/dist/billing/type/order/v1/generated/validators/cancellationRefundPreview.zod.d.ts +2 -0
  255. package/dist/billing/type/order/v1/generated/validators/cancellationRefundPreview.zod.js +4 -3
  256. package/dist/billing/type/order/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +1 -0
  257. package/dist/billing/type/order/v1/generated/validators/cancellationRefundPreviewItem.zod.js +1 -0
  258. package/dist/billing/type/order/v1/generated/validators/creditGrant.zod.d.ts +1 -1
  259. package/dist/billing/type/order/v1/generated/validators/creditGrantList.zod.d.ts +1 -1
  260. package/dist/billing/type/order/v1/generated/validators/discount.zod.d.ts +1 -1
  261. package/dist/billing/type/order/v1/generated/validators/discountList.zod.d.ts +1 -1
  262. package/dist/billing/type/order/v1/generated/validators/featureGrant.zod.d.ts +1 -1
  263. package/dist/billing/type/order/v1/generated/validators/featureGrantList.zod.d.ts +1 -1
  264. package/dist/billing/type/order/v1/generated/validators/featureGrantStatus.zod.d.ts +1 -1
  265. package/dist/billing/type/order/v1/generated/validators/order.zod.d.ts +7 -5
  266. package/dist/billing/type/order/v1/generated/validators/orderItem.zod.d.ts +6 -4
  267. package/dist/billing/type/order/v1/generated/validators/orderItem.zod.js +10 -6
  268. package/dist/billing/type/order/v1/generated/validators/orderItemList.zod.d.ts +6 -4
  269. package/dist/billing/type/order/v1/generated/validators/orderItemStatus.zod.d.ts +1 -1
  270. package/dist/billing/type/order/v1/generated/validators/orderList.zod.d.ts +7 -5
  271. package/dist/billing/type/order/v1/generated/validators/orderRefundQuote.zod.js +1 -1
  272. package/dist/billing/type/order/v1/generated/validators/orderStatus.zod.d.ts +1 -1
  273. package/dist/billing/type/order/v1/generated/validators/paymentMethod.zod.d.ts +1 -1
  274. package/dist/billing/type/order/v1/generated/validators/paymentMethodList.zod.d.ts +1 -1
  275. package/dist/billing/type/order/v1/generated/validators/paymentResult.zod.d.ts +1 -1
  276. package/dist/billing/type/order/v1/generated/validators/price.zod.d.ts +4 -1
  277. package/dist/billing/type/order/v1/generated/validators/price.zod.js +10 -2
  278. package/dist/billing/type/order/v1/generated/validators/priceList.zod.d.ts +4 -1
  279. package/dist/billing/type/order/v1/generated/validators/quote.zod.d.ts +2 -0
  280. package/dist/billing/type/order/v1/generated/validators/quoteCancellation.zod.js +2 -2
  281. package/dist/billing/type/order/v1/generated/validators/quoteItemInput.zod.d.ts +1 -1
  282. package/dist/billing/type/order/v1/generated/validators/quoteItemInput.zod.js +2 -2
  283. package/dist/billing/type/order/v1/generated/validators/quoteRenewal.zod.d.ts +1 -1
  284. package/dist/billing/type/order/v1/generated/validators/quoteRenewal.zod.js +3 -3
  285. package/dist/billing/type/order/v1/generated/validators/quoteRequest.zod.d.ts +2 -2
  286. package/dist/billing/type/order/v1/generated/validators/refund.zod.d.ts +2 -2
  287. package/dist/billing/type/order/v1/generated/validators/refundList.zod.d.ts +2 -2
  288. package/dist/billing/type/order/v1/generated/validators/refundPolicy.zod.d.ts +1 -0
  289. package/dist/billing/type/order/v1/generated/validators/refundPolicy.zod.js +2 -2
  290. package/dist/billing/type/order/v1/generated/validators/refundReason.zod.js +1 -1
  291. package/dist/billing/type/order/v1/generated/validators/renewRequest.zod.d.ts +1 -1
  292. package/dist/billing/type/order/v1/generated/validators/renewRequest.zod.js +3 -3
  293. package/dist/billing/type/order/v1/generated/validators/renewalOrderRequest.zod.d.ts +1 -1
  294. package/dist/billing/type/order/v1/generated/validators/renewalOrderRequest.zod.js +2 -2
  295. package/dist/billing/type/order/v1/generated/validators/renewalPrice.zod.d.ts +4 -1
  296. package/dist/billing/type/order/v1/generated/validators/renewalPrice.zod.js +4 -2
  297. package/dist/billing/type/order/v1/generated/validators/renewalPriceList.zod.d.ts +4 -1
  298. package/dist/billing/type/order/v1/generated/validators/scheduledChange.zod.d.ts +1 -1
  299. package/dist/billing/type/order/v1/generated/validators/subscription.zod.d.ts +6 -2
  300. package/dist/billing/type/order/v1/generated/validators/subscription.zod.js +14 -2
  301. package/dist/billing/type/order/v1/generated/validators/subscriptionList.zod.d.ts +6 -2
  302. package/dist/billing/type/order/v1/generated/validators/topUp.zod.d.ts +1 -1
  303. package/dist/billing/type/order/v1/generated/validators/topUpList.zod.d.ts +1 -1
  304. package/dist/billing/type/order/v1/generated/validators/transaction.zod.d.ts +1 -1
  305. package/dist/billing/type/order/v1/generated/validators/transactionList.zod.d.ts +1 -1
  306. package/dist/billing/type/order/v1/generated/validators/withdrawal.zod.d.ts +1 -1
  307. package/dist/billing/type/order/v1/generated/validators/withdrawalItem.zod.d.ts +1 -1
  308. package/dist/billing/type/order/v1/generated/validators/withdrawalItemList.zod.d.ts +1 -1
  309. package/dist/billing/type/order/v1/generated/validators/withdrawalList.zod.d.ts +1 -1
  310. package/dist/billing/v1/generated/functions.d.ts +1 -1
  311. package/dist/billing/v1/generated/functions.js +1 -1
  312. package/dist/billing/v1/generated/models.d.ts +71 -33
  313. package/dist/billing/v1/generated/models.js +2 -1
  314. package/dist/billing/v1/generated/schemas.zod.d.ts +8 -8
  315. package/dist/billing/v1/generated/schemas.zod.js +1 -1
  316. package/dist/billing/v1/generated/validators/allowance.zod.d.ts +1 -1
  317. package/dist/billing/v1/generated/validators/allowanceList.zod.d.ts +1 -1
  318. package/dist/billing/v1/generated/validators/cancelSubscriptionRequest.zod.js +2 -2
  319. package/dist/billing/v1/generated/validators/cancellation.zod.js +2 -2
  320. package/dist/billing/v1/generated/validators/cancellationCreate.zod.js +2 -2
  321. package/dist/billing/v1/generated/validators/{terminationPolicy.zod.d.ts → cancellationPolicy.zod.d.ts} +3 -3
  322. package/dist/billing/v1/generated/validators/{terminationPolicy.zod.js → cancellationPolicy.zod.js} +2 -2
  323. package/dist/billing/v1/generated/validators/cancellationRefundPreview.zod.d.ts +2 -0
  324. package/dist/billing/v1/generated/validators/cancellationRefundPreview.zod.js +4 -3
  325. package/dist/billing/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +1 -0
  326. package/dist/billing/v1/generated/validators/cancellationRefundPreviewItem.zod.js +1 -0
  327. package/dist/billing/v1/generated/validators/creditGrant.zod.d.ts +1 -1
  328. package/dist/billing/v1/generated/validators/creditGrantList.zod.d.ts +1 -1
  329. package/dist/billing/v1/generated/validators/discount.zod.d.ts +1 -1
  330. package/dist/billing/v1/generated/validators/discountList.zod.d.ts +1 -1
  331. package/dist/billing/v1/generated/validators/featureGrant.zod.d.ts +1 -1
  332. package/dist/billing/v1/generated/validators/featureGrantList.zod.d.ts +1 -1
  333. package/dist/billing/v1/generated/validators/featureGrantStatus.zod.d.ts +1 -1
  334. package/dist/billing/v1/generated/validators/listAllowancesParams.zod.d.ts +1 -1
  335. package/dist/billing/v1/generated/validators/listCancellationsParams.zod.d.ts +1 -1
  336. package/dist/billing/v1/generated/validators/listCreditGrantsParams.zod.d.ts +1 -1
  337. package/dist/billing/v1/generated/validators/listFeatureGrantsParams.zod.d.ts +1 -1
  338. package/dist/billing/v1/generated/validators/listOrdersParams.zod.d.ts +1 -1
  339. package/dist/billing/v1/generated/validators/order.zod.d.ts +7 -5
  340. package/dist/billing/v1/generated/validators/orderItem.zod.d.ts +6 -4
  341. package/dist/billing/v1/generated/validators/orderItem.zod.js +10 -6
  342. package/dist/billing/v1/generated/validators/orderItemList.zod.d.ts +6 -4
  343. package/dist/billing/v1/generated/validators/orderItemStatus.zod.d.ts +1 -1
  344. package/dist/billing/v1/generated/validators/orderList.zod.d.ts +7 -5
  345. package/dist/billing/v1/generated/validators/orderRefundQuote.zod.js +1 -1
  346. package/dist/billing/v1/generated/validators/orderStatus.zod.d.ts +1 -1
  347. package/dist/billing/v1/generated/validators/paymentMethod.zod.d.ts +1 -1
  348. package/dist/billing/v1/generated/validators/paymentMethodList.zod.d.ts +1 -1
  349. package/dist/billing/v1/generated/validators/paymentResult.zod.d.ts +1 -1
  350. package/dist/billing/v1/generated/validators/price.zod.d.ts +4 -1
  351. package/dist/billing/v1/generated/validators/price.zod.js +10 -2
  352. package/dist/billing/v1/generated/validators/priceList.zod.d.ts +4 -1
  353. package/dist/billing/v1/generated/validators/quote.zod.d.ts +2 -0
  354. package/dist/billing/v1/generated/validators/quoteCancellation.zod.js +2 -2
  355. package/dist/billing/v1/generated/validators/quoteItemInput.zod.d.ts +1 -1
  356. package/dist/billing/v1/generated/validators/quoteItemInput.zod.js +2 -2
  357. package/dist/billing/v1/generated/validators/quoteRenewal.zod.d.ts +1 -1
  358. package/dist/billing/v1/generated/validators/quoteRenewal.zod.js +3 -3
  359. package/dist/billing/v1/generated/validators/quoteRequest.zod.d.ts +2 -2
  360. package/dist/billing/v1/generated/validators/refund.zod.d.ts +2 -2
  361. package/dist/billing/v1/generated/validators/refundList.zod.d.ts +2 -2
  362. package/dist/billing/v1/generated/validators/refundPolicy.zod.d.ts +1 -0
  363. package/dist/billing/v1/generated/validators/refundPolicy.zod.js +2 -2
  364. package/dist/billing/v1/generated/validators/refundReason.zod.js +1 -1
  365. package/dist/billing/v1/generated/validators/renewRequest.zod.d.ts +1 -1
  366. package/dist/billing/v1/generated/validators/renewRequest.zod.js +3 -3
  367. package/dist/billing/v1/generated/validators/renewalOrderRequest.zod.d.ts +1 -1
  368. package/dist/billing/v1/generated/validators/renewalOrderRequest.zod.js +2 -2
  369. package/dist/billing/v1/generated/validators/renewalPrice.zod.d.ts +4 -1
  370. package/dist/billing/v1/generated/validators/renewalPrice.zod.js +4 -2
  371. package/dist/billing/v1/generated/validators/renewalPriceList.zod.d.ts +4 -1
  372. package/dist/billing/v1/generated/validators/scheduledChange.zod.d.ts +1 -1
  373. package/dist/billing/v1/generated/validators/subscription.zod.d.ts +6 -2
  374. package/dist/billing/v1/generated/validators/subscription.zod.js +14 -2
  375. package/dist/billing/v1/generated/validators/subscriptionList.zod.d.ts +6 -2
  376. package/dist/billing/v1/generated/validators/topUp.zod.d.ts +1 -1
  377. package/dist/billing/v1/generated/validators/topUpList.zod.d.ts +1 -1
  378. package/dist/billing/v1/generated/validators/transaction.zod.d.ts +1 -1
  379. package/dist/billing/v1/generated/validators/transactionList.zod.d.ts +1 -1
  380. package/dist/billing/v1/generated/validators/withdrawal.zod.d.ts +1 -1
  381. package/dist/billing/v1/generated/validators/withdrawalItem.zod.d.ts +1 -1
  382. package/dist/billing/v1/generated/validators/withdrawalItemList.zod.d.ts +1 -1
  383. package/dist/billing/v1/generated/validators/withdrawalList.zod.d.ts +1 -1
  384. package/dist/canopy/v1/generated/functions.d.ts +81 -6
  385. package/dist/canopy/v1/generated/functions.js +110 -6
  386. package/dist/canopy/v1/generated/models.d.ts +105 -49
  387. package/dist/canopy/v1/generated/models.js +7 -6
  388. package/dist/canopy/v1/generated/schemas.zod.d.ts +39 -5
  389. package/dist/canopy/v1/generated/schemas.zod.js +38 -5
  390. package/dist/canopy/v1/generated/validators/aPIKeyResource.zod.d.ts +12 -4
  391. package/dist/canopy/v1/generated/validators/aPIKeyResource.zod.js +12 -4
  392. package/dist/canopy/v1/generated/validators/aPIKeyUsageListResponseBody.zod.d.ts +12 -4
  393. package/dist/canopy/v1/generated/validators/aPIKeyUsageListResponseBody.zod.js +12 -4
  394. package/dist/canopy/v1/generated/validators/aPIKeyUsageResource.zod.d.ts +12 -4
  395. package/dist/canopy/v1/generated/validators/aPIKeyUsageResource.zod.js +12 -4
  396. package/dist/canopy/v1/generated/validators/accountBalance.zod.d.ts +12 -4
  397. package/dist/canopy/v1/generated/validators/accountBalance.zod.js +12 -4
  398. package/dist/canopy/v1/generated/validators/accountIdentity.zod.d.ts +12 -4
  399. package/dist/canopy/v1/generated/validators/accountIdentity.zod.js +12 -4
  400. package/dist/canopy/v1/generated/validators/activeResource.zod.d.ts +12 -4
  401. package/dist/canopy/v1/generated/validators/activeResource.zod.js +12 -4
  402. package/dist/canopy/v1/generated/validators/activeResourceList.zod.d.ts +12 -4
  403. package/dist/canopy/v1/generated/validators/activeResourceList.zod.js +12 -4
  404. package/dist/canopy/v1/generated/validators/allowance.zod.d.ts +13 -5
  405. package/dist/canopy/v1/generated/validators/allowance.zod.js +12 -4
  406. package/dist/canopy/v1/generated/validators/allowanceList.zod.d.ts +13 -5
  407. package/dist/canopy/v1/generated/validators/allowanceList.zod.js +12 -4
  408. package/dist/canopy/v1/generated/validators/applicability.zod.d.ts +12 -4
  409. package/dist/canopy/v1/generated/validators/applicability.zod.js +12 -4
  410. package/dist/canopy/v1/generated/validators/applicablePlan.zod.d.ts +12 -4
  411. package/dist/canopy/v1/generated/validators/applicablePlan.zod.js +12 -4
  412. package/dist/canopy/v1/generated/validators/appliedCredit.zod.d.ts +12 -4
  413. package/dist/canopy/v1/generated/validators/appliedCredit.zod.js +12 -4
  414. package/dist/canopy/v1/generated/validators/autoRenewSet.zod.d.ts +12 -4
  415. package/dist/canopy/v1/generated/validators/autoRenewSet.zod.js +12 -4
  416. package/dist/canopy/v1/generated/validators/billingAccount.zod.d.ts +12 -4
  417. package/dist/canopy/v1/generated/validators/billingAccount.zod.js +12 -4
  418. package/dist/canopy/v1/generated/validators/billingAccountCreate.zod.d.ts +12 -4
  419. package/dist/canopy/v1/generated/validators/billingAccountCreate.zod.js +12 -4
  420. package/dist/canopy/v1/generated/validators/billingAccountList.zod.d.ts +12 -4
  421. package/dist/canopy/v1/generated/validators/billingAccountList.zod.js +12 -4
  422. package/dist/canopy/v1/generated/validators/billingAccountUpdate.zod.d.ts +12 -4
  423. package/dist/canopy/v1/generated/validators/billingAccountUpdate.zod.js +12 -4
  424. package/dist/canopy/v1/generated/validators/billingScheme.zod.d.ts +12 -4
  425. package/dist/canopy/v1/generated/validators/billingScheme.zod.js +12 -4
  426. package/dist/canopy/v1/generated/validators/cancelSubscriptionRequest.zod.d.ts +12 -4
  427. package/dist/canopy/v1/generated/validators/cancelSubscriptionRequest.zod.js +14 -6
  428. package/dist/canopy/v1/generated/validators/cancellation.zod.d.ts +12 -4
  429. package/dist/canopy/v1/generated/validators/cancellation.zod.js +14 -6
  430. package/dist/canopy/v1/generated/validators/cancellationCreate.zod.d.ts +12 -4
  431. package/dist/canopy/v1/generated/validators/cancellationCreate.zod.js +14 -6
  432. package/dist/canopy/v1/generated/validators/cancellationItem.zod.d.ts +12 -4
  433. package/dist/canopy/v1/generated/validators/cancellationItem.zod.js +12 -4
  434. package/dist/canopy/v1/generated/validators/cancellationList.zod.d.ts +12 -4
  435. package/dist/canopy/v1/generated/validators/cancellationList.zod.js +12 -4
  436. package/dist/canopy/v1/generated/validators/cancellationPolicy.zod.d.ts +47 -0
  437. package/dist/canopy/v1/generated/validators/cancellationPolicy.zod.js +44 -0
  438. package/dist/canopy/v1/generated/validators/cancellationRefundPreview.zod.d.ts +14 -4
  439. package/dist/canopy/v1/generated/validators/cancellationRefundPreview.zod.js +16 -7
  440. package/dist/canopy/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +13 -4
  441. package/dist/canopy/v1/generated/validators/cancellationRefundPreviewItem.zod.js +13 -4
  442. package/dist/canopy/v1/generated/validators/chatCompletion.zod.d.ts +12 -4
  443. package/dist/canopy/v1/generated/validators/chatCompletion.zod.js +12 -4
  444. package/dist/canopy/v1/generated/validators/chatCompletionRequest.zod.d.ts +12 -4
  445. package/dist/canopy/v1/generated/validators/chatCompletionRequest.zod.js +12 -4
  446. package/dist/canopy/v1/generated/validators/checkoutMode.zod.d.ts +12 -4
  447. package/dist/canopy/v1/generated/validators/checkoutMode.zod.js +12 -4
  448. package/dist/canopy/v1/generated/validators/checkoutOptions.zod.d.ts +12 -4
  449. package/dist/canopy/v1/generated/validators/checkoutOptions.zod.js +12 -4
  450. package/dist/canopy/v1/generated/validators/contact.zod.d.ts +12 -4
  451. package/dist/canopy/v1/generated/validators/contact.zod.js +12 -4
  452. package/dist/canopy/v1/generated/validators/contactCreate.zod.d.ts +12 -4
  453. package/dist/canopy/v1/generated/validators/contactCreate.zod.js +12 -4
  454. package/dist/canopy/v1/generated/validators/contactList.zod.d.ts +12 -4
  455. package/dist/canopy/v1/generated/validators/contactList.zod.js +12 -4
  456. package/dist/canopy/v1/generated/validators/contactUpdate.zod.d.ts +12 -4
  457. package/dist/canopy/v1/generated/validators/contactUpdate.zod.js +12 -4
  458. package/dist/canopy/v1/generated/validators/createAPIKeyRequestBody.zod.d.ts +12 -4
  459. package/dist/canopy/v1/generated/validators/createAPIKeyRequestBody.zod.js +12 -4
  460. package/dist/canopy/v1/generated/validators/createServiceRequestBody.zod.d.ts +12 -4
  461. package/dist/canopy/v1/generated/validators/createServiceRequestBody.zod.js +12 -4
  462. package/dist/canopy/v1/generated/validators/createServiceResponseBody.zod.d.ts +13 -5
  463. package/dist/canopy/v1/generated/validators/createServiceResponseBody.zod.js +12 -4
  464. package/dist/canopy/v1/generated/validators/creditGrant.zod.d.ts +13 -5
  465. package/dist/canopy/v1/generated/validators/creditGrant.zod.js +12 -4
  466. package/dist/canopy/v1/generated/validators/creditGrantList.zod.d.ts +13 -5
  467. package/dist/canopy/v1/generated/validators/creditGrantList.zod.js +12 -4
  468. package/dist/canopy/v1/generated/validators/creditGroup.zod.d.ts +12 -4
  469. package/dist/canopy/v1/generated/validators/creditGroup.zod.js +12 -4
  470. package/dist/canopy/v1/generated/validators/creditNote.zod.d.ts +12 -4
  471. package/dist/canopy/v1/generated/validators/creditNote.zod.js +12 -4
  472. package/dist/canopy/v1/generated/validators/creditNoteItem.zod.d.ts +12 -4
  473. package/dist/canopy/v1/generated/validators/creditNoteItem.zod.js +12 -4
  474. package/dist/canopy/v1/generated/validators/creditNoteItemList.zod.d.ts +12 -4
  475. package/dist/canopy/v1/generated/validators/creditNoteItemList.zod.js +12 -4
  476. package/dist/canopy/v1/generated/validators/creditNoteList.zod.d.ts +12 -4
  477. package/dist/canopy/v1/generated/validators/creditNoteList.zod.js +12 -4
  478. package/dist/canopy/v1/generated/validators/currency.zod.d.ts +12 -4
  479. package/dist/canopy/v1/generated/validators/currency.zod.js +12 -4
  480. package/dist/canopy/v1/generated/validators/currencyList.zod.d.ts +12 -4
  481. package/dist/canopy/v1/generated/validators/currencyList.zod.js +12 -4
  482. package/dist/canopy/v1/generated/validators/cursorPageRequestResource.zod.d.ts +12 -10
  483. package/dist/canopy/v1/generated/validators/cursorPageRequestResource.zod.js +12 -4
  484. package/dist/canopy/v1/generated/validators/cursorPagination.zod.d.ts +12 -4
  485. package/dist/canopy/v1/generated/validators/cursorPagination.zod.js +12 -4
  486. package/dist/canopy/v1/generated/validators/discount.zod.d.ts +13 -5
  487. package/dist/canopy/v1/generated/validators/discount.zod.js +12 -4
  488. package/dist/canopy/v1/generated/validators/discountList.zod.d.ts +13 -5
  489. package/dist/canopy/v1/generated/validators/discountList.zod.js +12 -4
  490. package/dist/canopy/v1/generated/validators/embeddingRequest.zod.d.ts +12 -4
  491. package/dist/canopy/v1/generated/validators/embeddingRequest.zod.js +12 -4
  492. package/dist/canopy/v1/generated/validators/embeddingResponse.zod.d.ts +12 -4
  493. package/dist/canopy/v1/generated/validators/embeddingResponse.zod.js +12 -4
  494. package/dist/canopy/v1/generated/validators/endpointCapabilities.zod.d.ts +12 -4
  495. package/dist/canopy/v1/generated/validators/endpointCapabilities.zod.js +12 -4
  496. package/dist/canopy/v1/generated/validators/entitlement.zod.d.ts +12 -4
  497. package/dist/canopy/v1/generated/validators/entitlement.zod.js +12 -4
  498. package/dist/canopy/v1/generated/validators/entitlementList.zod.d.ts +12 -4
  499. package/dist/canopy/v1/generated/validators/entitlementList.zod.js +12 -4
  500. package/dist/canopy/v1/generated/validators/error.zod.d.ts +12 -4
  501. package/dist/canopy/v1/generated/validators/error.zod.js +12 -4
  502. package/dist/canopy/v1/generated/validators/errorA200529.zod.d.ts +12 -4
  503. package/dist/canopy/v1/generated/validators/errorA200529.zod.js +12 -4
  504. package/dist/canopy/v1/generated/validators/featureGrant.zod.d.ts +13 -5
  505. package/dist/canopy/v1/generated/validators/featureGrant.zod.js +12 -4
  506. package/dist/canopy/v1/generated/validators/featureGrantList.zod.d.ts +13 -5
  507. package/dist/canopy/v1/generated/validators/featureGrantList.zod.js +12 -4
  508. package/dist/canopy/v1/generated/validators/featureGrantStatus.zod.d.ts +13 -5
  509. package/dist/canopy/v1/generated/validators/featureGrantStatus.zod.js +12 -4
  510. package/dist/canopy/v1/generated/validators/funds.zod.d.ts +12 -4
  511. package/dist/canopy/v1/generated/validators/funds.zod.js +12 -4
  512. package/dist/canopy/v1/generated/validators/getUsageSummaryParams.zod.d.ts +12 -4
  513. package/dist/canopy/v1/generated/validators/getUsageSummaryParams.zod.js +12 -4
  514. package/dist/canopy/v1/generated/validators/getUsageTimelineParams.zod.d.ts +12 -4
  515. package/dist/canopy/v1/generated/validators/getUsageTimelineParams.zod.js +12 -4
  516. package/dist/canopy/v1/generated/validators/inferenceError.zod.d.ts +12 -4
  517. package/dist/canopy/v1/generated/validators/inferenceError.zod.js +12 -4
  518. package/dist/canopy/v1/generated/validators/invoice.zod.d.ts +12 -4
  519. package/dist/canopy/v1/generated/validators/invoice.zod.js +12 -4
  520. package/dist/canopy/v1/generated/validators/invoiceItem.zod.d.ts +12 -4
  521. package/dist/canopy/v1/generated/validators/invoiceItem.zod.js +12 -4
  522. package/dist/canopy/v1/generated/validators/invoiceItemList.zod.d.ts +12 -4
  523. package/dist/canopy/v1/generated/validators/invoiceItemList.zod.js +12 -4
  524. package/dist/canopy/v1/generated/validators/invoiceItemProration.zod.d.ts +12 -4
  525. package/dist/canopy/v1/generated/validators/invoiceItemProration.zod.js +12 -4
  526. package/dist/canopy/v1/generated/validators/invoiceList.zod.d.ts +12 -4
  527. package/dist/canopy/v1/generated/validators/invoiceList.zod.js +12 -4
  528. package/dist/canopy/v1/generated/validators/invoiceStatus.zod.d.ts +12 -4
  529. package/dist/canopy/v1/generated/validators/invoiceStatus.zod.js +12 -4
  530. package/dist/canopy/v1/generated/validators/invoiceSummary.zod.d.ts +12 -4
  531. package/dist/canopy/v1/generated/validators/invoiceSummary.zod.js +12 -4
  532. package/dist/canopy/v1/generated/validators/issuedAPIKeyResource.zod.d.ts +12 -4
  533. package/dist/canopy/v1/generated/validators/issuedAPIKeyResource.zod.js +12 -4
  534. package/dist/canopy/v1/generated/validators/lengthAwarePageAPIKeyResource.zod.d.ts +12 -4
  535. package/dist/canopy/v1/generated/validators/lengthAwarePageAPIKeyResource.zod.js +12 -4
  536. package/dist/canopy/v1/generated/validators/listApiKeysParams.zod.d.ts +12 -4
  537. package/dist/canopy/v1/generated/validators/listApiKeysParams.zod.js +12 -4
  538. package/dist/canopy/v1/generated/validators/listRequestsParams.zod.d.ts +12 -4
  539. package/dist/canopy/v1/generated/validators/listRequestsParams.zod.js +12 -4
  540. package/dist/canopy/v1/generated/validators/listUsageByApiKeyParams.zod.d.ts +12 -4
  541. package/dist/canopy/v1/generated/validators/listUsageByApiKeyParams.zod.js +12 -4
  542. package/dist/canopy/v1/generated/validators/listUsageByModelParams.zod.d.ts +12 -4
  543. package/dist/canopy/v1/generated/validators/listUsageByModelParams.zod.js +12 -4
  544. package/dist/canopy/v1/generated/validators/modality.zod.d.ts +12 -4
  545. package/dist/canopy/v1/generated/validators/modality.zod.js +12 -4
  546. package/dist/canopy/v1/generated/validators/model.zod.d.ts +14 -4
  547. package/dist/canopy/v1/generated/validators/model.zod.js +12 -4
  548. package/dist/canopy/v1/generated/validators/modelCapabilities.zod.d.ts +12 -4
  549. package/dist/canopy/v1/generated/validators/modelCapabilities.zod.js +12 -4
  550. package/dist/canopy/v1/generated/validators/modelEndpoint.zod.d.ts +14 -4
  551. package/dist/canopy/v1/generated/validators/modelEndpoint.zod.js +14 -4
  552. package/dist/canopy/v1/generated/validators/modelList.zod.d.ts +14 -4
  553. package/dist/canopy/v1/generated/validators/modelList.zod.js +12 -4
  554. package/dist/canopy/v1/generated/validators/modelListResponseBody.zod.d.ts +14 -4
  555. package/dist/canopy/v1/generated/validators/modelListResponseBody.zod.js +12 -4
  556. package/dist/canopy/v1/generated/validators/modelPricing.zod.d.ts +12 -4
  557. package/dist/canopy/v1/generated/validators/modelPricing.zod.js +12 -4
  558. package/dist/canopy/v1/generated/validators/modelResource.zod.d.ts +14 -4
  559. package/dist/canopy/v1/generated/validators/modelResource.zod.js +12 -4
  560. package/dist/canopy/v1/generated/validators/modelUsageListResponseBody.zod.d.ts +12 -4
  561. package/dist/canopy/v1/generated/validators/modelUsageListResponseBody.zod.js +12 -4
  562. package/dist/canopy/v1/generated/validators/modelUsageResource.zod.d.ts +12 -4
  563. package/dist/canopy/v1/generated/validators/modelUsageResource.zod.js +12 -4
  564. package/dist/canopy/v1/generated/validators/money.zod.d.ts +12 -4
  565. package/dist/canopy/v1/generated/validators/money.zod.js +12 -4
  566. package/dist/canopy/v1/generated/validators/monthlyStatement.zod.d.ts +12 -4
  567. package/dist/canopy/v1/generated/validators/monthlyStatement.zod.js +12 -4
  568. package/dist/canopy/v1/generated/validators/monthlyStatementList.zod.d.ts +12 -4
  569. package/dist/canopy/v1/generated/validators/monthlyStatementList.zod.js +12 -4
  570. package/dist/canopy/v1/generated/validators/namedIdentity.zod.d.ts +12 -4
  571. package/dist/canopy/v1/generated/validators/namedIdentity.zod.js +12 -4
  572. package/dist/canopy/v1/generated/validators/nativeRequest.zod.d.ts +44 -0
  573. package/dist/canopy/v1/generated/validators/nativeRequest.zod.js +44 -0
  574. package/dist/canopy/v1/generated/validators/nativeResponse.zod.d.ts +44 -0
  575. package/dist/canopy/v1/generated/validators/{terminationPolicy.zod.js → nativeResponse.zod.js} +15 -7
  576. package/dist/canopy/v1/generated/validators/objectIdentity.zod.d.ts +12 -4
  577. package/dist/canopy/v1/generated/validators/objectIdentity.zod.js +12 -4
  578. package/dist/canopy/v1/generated/validators/offsetPagination.zod.d.ts +12 -4
  579. package/dist/canopy/v1/generated/validators/offsetPagination.zod.js +12 -4
  580. package/dist/canopy/v1/generated/validators/order.zod.d.ts +19 -9
  581. package/dist/canopy/v1/generated/validators/order.zod.js +12 -4
  582. package/dist/canopy/v1/generated/validators/orderCancel.zod.d.ts +12 -4
  583. package/dist/canopy/v1/generated/validators/orderCancel.zod.js +12 -4
  584. package/dist/canopy/v1/generated/validators/orderItem.zod.d.ts +18 -8
  585. package/dist/canopy/v1/generated/validators/orderItem.zod.js +22 -10
  586. package/dist/canopy/v1/generated/validators/orderItemList.zod.d.ts +18 -8
  587. package/dist/canopy/v1/generated/validators/orderItemList.zod.js +12 -4
  588. package/dist/canopy/v1/generated/validators/orderItemStatus.zod.d.ts +13 -5
  589. package/dist/canopy/v1/generated/validators/orderItemStatus.zod.js +12 -4
  590. package/dist/canopy/v1/generated/validators/orderList.zod.d.ts +19 -9
  591. package/dist/canopy/v1/generated/validators/orderList.zod.js +12 -4
  592. package/dist/canopy/v1/generated/validators/orderRefundQuote.zod.d.ts +12 -4
  593. package/dist/canopy/v1/generated/validators/orderRefundQuote.zod.js +13 -5
  594. package/dist/canopy/v1/generated/validators/orderRefundQuoteInput.zod.d.ts +12 -4
  595. package/dist/canopy/v1/generated/validators/orderRefundQuoteInput.zod.js +12 -4
  596. package/dist/canopy/v1/generated/validators/orderStatus.zod.d.ts +13 -5
  597. package/dist/canopy/v1/generated/validators/orderStatus.zod.js +12 -4
  598. package/dist/canopy/v1/generated/validators/paidWith.zod.d.ts +12 -4
  599. package/dist/canopy/v1/generated/validators/paidWith.zod.js +12 -4
  600. package/dist/canopy/v1/generated/validators/payInvoiceRequest.zod.d.ts +12 -4
  601. package/dist/canopy/v1/generated/validators/payInvoiceRequest.zod.js +12 -4
  602. package/dist/canopy/v1/generated/validators/payTogetherRequest.zod.d.ts +12 -4
  603. package/dist/canopy/v1/generated/validators/payTogetherRequest.zod.js +12 -4
  604. package/dist/canopy/v1/generated/validators/paymentAction.zod.d.ts +12 -4
  605. package/dist/canopy/v1/generated/validators/paymentAction.zod.js +12 -4
  606. package/dist/canopy/v1/generated/validators/paymentCancellationReason.zod.d.ts +12 -4
  607. package/dist/canopy/v1/generated/validators/paymentCancellationReason.zod.js +12 -4
  608. package/dist/canopy/v1/generated/validators/paymentMethod.zod.d.ts +13 -5
  609. package/dist/canopy/v1/generated/validators/paymentMethod.zod.js +12 -4
  610. package/dist/canopy/v1/generated/validators/paymentMethodList.zod.d.ts +13 -5
  611. package/dist/canopy/v1/generated/validators/paymentMethodList.zod.js +12 -4
  612. package/dist/canopy/v1/generated/validators/paymentMethodSetup.zod.d.ts +12 -4
  613. package/dist/canopy/v1/generated/validators/paymentMethodSetup.zod.js +12 -4
  614. package/dist/canopy/v1/generated/validators/paymentMethodSetupResult.zod.d.ts +12 -4
  615. package/dist/canopy/v1/generated/validators/paymentMethodSetupResult.zod.js +12 -4
  616. package/dist/canopy/v1/generated/validators/paymentOption.zod.d.ts +12 -4
  617. package/dist/canopy/v1/generated/validators/paymentOption.zod.js +12 -4
  618. package/dist/canopy/v1/generated/validators/paymentOptionList.zod.d.ts +12 -4
  619. package/dist/canopy/v1/generated/validators/paymentOptionList.zod.js +12 -4
  620. package/dist/canopy/v1/generated/validators/paymentOptionMethod.zod.d.ts +12 -4
  621. package/dist/canopy/v1/generated/validators/paymentOptionMethod.zod.js +12 -4
  622. package/dist/canopy/v1/generated/validators/paymentPreview.zod.d.ts +12 -4
  623. package/dist/canopy/v1/generated/validators/paymentPreview.zod.js +12 -4
  624. package/dist/canopy/v1/generated/validators/paymentPreviewInvoice.zod.d.ts +12 -4
  625. package/dist/canopy/v1/generated/validators/paymentPreviewInvoice.zod.js +12 -4
  626. package/dist/canopy/v1/generated/validators/paymentResult.zod.d.ts +13 -5
  627. package/dist/canopy/v1/generated/validators/paymentResult.zod.js +12 -4
  628. package/dist/canopy/v1/generated/validators/paymentStatus.zod.d.ts +12 -4
  629. package/dist/canopy/v1/generated/validators/paymentStatus.zod.js +12 -4
  630. package/dist/canopy/v1/generated/validators/placedOrder.zod.d.ts +12 -4
  631. package/dist/canopy/v1/generated/validators/placedOrder.zod.js +12 -4
  632. package/dist/canopy/v1/generated/validators/plan.zod.d.ts +12 -4
  633. package/dist/canopy/v1/generated/validators/plan.zod.js +12 -4
  634. package/dist/canopy/v1/generated/validators/planFeature.zod.d.ts +12 -4
  635. package/dist/canopy/v1/generated/validators/planFeature.zod.js +12 -4
  636. package/dist/canopy/v1/generated/validators/planList.zod.d.ts +12 -4
  637. package/dist/canopy/v1/generated/validators/planList.zod.js +12 -4
  638. package/dist/canopy/v1/generated/validators/price.zod.d.ts +16 -5
  639. package/dist/canopy/v1/generated/validators/price.zod.js +22 -6
  640. package/dist/canopy/v1/generated/validators/priceList.zod.d.ts +16 -5
  641. package/dist/canopy/v1/generated/validators/priceList.zod.js +12 -4
  642. package/dist/canopy/v1/generated/validators/priceOption.zod.d.ts +12 -4
  643. package/dist/canopy/v1/generated/validators/priceOption.zod.js +12 -4
  644. package/dist/canopy/v1/generated/validators/priceType.zod.d.ts +12 -4
  645. package/dist/canopy/v1/generated/validators/priceType.zod.js +12 -4
  646. package/dist/canopy/v1/generated/validators/product.zod.d.ts +12 -4
  647. package/dist/canopy/v1/generated/validators/product.zod.js +12 -4
  648. package/dist/canopy/v1/generated/validators/productID.zod.d.ts +12 -4
  649. package/dist/canopy/v1/generated/validators/productID.zod.js +12 -4
  650. package/dist/canopy/v1/generated/validators/productList.zod.d.ts +12 -4
  651. package/dist/canopy/v1/generated/validators/productList.zod.js +12 -4
  652. package/dist/canopy/v1/generated/validators/projectAssignment.zod.d.ts +12 -4
  653. package/dist/canopy/v1/generated/validators/projectAssignment.zod.js +12 -4
  654. package/dist/canopy/v1/generated/validators/projectAssignmentList.zod.d.ts +12 -4
  655. package/dist/canopy/v1/generated/validators/projectAssignmentList.zod.js +12 -4
  656. package/dist/canopy/v1/generated/validators/purchaseOperation.zod.d.ts +12 -4
  657. package/dist/canopy/v1/generated/validators/purchaseOperation.zod.js +12 -4
  658. package/dist/canopy/v1/generated/validators/quote.zod.d.ts +12 -4
  659. package/dist/canopy/v1/generated/validators/quote.zod.js +12 -4
  660. package/dist/canopy/v1/generated/validators/quote5f60d00.zod.d.ts +14 -4
  661. package/dist/canopy/v1/generated/validators/quote5f60d00.zod.js +12 -4
  662. package/dist/canopy/v1/generated/validators/quoteA200529.zod.d.ts +14 -4
  663. package/dist/canopy/v1/generated/validators/quoteA200529.zod.js +12 -4
  664. package/dist/canopy/v1/generated/validators/quoteCancellation.zod.d.ts +12 -4
  665. package/dist/canopy/v1/generated/validators/quoteCancellation.zod.js +14 -6
  666. package/dist/canopy/v1/generated/validators/quoteItem.zod.d.ts +12 -4
  667. package/dist/canopy/v1/generated/validators/quoteItem.zod.js +12 -4
  668. package/dist/canopy/v1/generated/validators/quoteItemDc1fddb.zod.d.ts +12 -4
  669. package/dist/canopy/v1/generated/validators/quoteItemDc1fddb.zod.js +12 -4
  670. package/dist/canopy/v1/generated/validators/quoteItemInput.zod.d.ts +13 -5
  671. package/dist/canopy/v1/generated/validators/quoteItemInput.zod.js +14 -6
  672. package/dist/canopy/v1/generated/validators/quoteRenewal.zod.d.ts +13 -5
  673. package/dist/canopy/v1/generated/validators/quoteRenewal.zod.js +15 -7
  674. package/dist/canopy/v1/generated/validators/quoteRenewalResult.zod.d.ts +12 -4
  675. package/dist/canopy/v1/generated/validators/quoteRenewalResult.zod.js +12 -4
  676. package/dist/canopy/v1/generated/validators/quoteRequest.zod.d.ts +14 -6
  677. package/dist/canopy/v1/generated/validators/quoteRequest.zod.js +12 -4
  678. package/dist/canopy/v1/generated/validators/quotedDiscount.zod.d.ts +12 -4
  679. package/dist/canopy/v1/generated/validators/quotedDiscount.zod.js +12 -4
  680. package/dist/canopy/v1/generated/validators/rate.zod.d.ts +12 -4
  681. package/dist/canopy/v1/generated/validators/rate.zod.js +12 -4
  682. package/dist/canopy/v1/generated/validators/rateList.zod.d.ts +12 -4
  683. package/dist/canopy/v1/generated/validators/rateList.zod.js +12 -4
  684. package/dist/canopy/v1/generated/validators/reasoningCapabilities.zod.d.ts +12 -4
  685. package/dist/canopy/v1/generated/validators/reasoningCapabilities.zod.js +13 -5
  686. package/dist/canopy/v1/generated/validators/reasoningDiagnostics.zod.d.ts +12 -10
  687. package/dist/canopy/v1/generated/validators/reasoningDiagnostics.zod.js +12 -6
  688. package/dist/canopy/v1/generated/validators/refund.zod.d.ts +14 -6
  689. package/dist/canopy/v1/generated/validators/refund.zod.js +12 -4
  690. package/dist/canopy/v1/generated/validators/refundList.zod.d.ts +14 -6
  691. package/dist/canopy/v1/generated/validators/refundList.zod.js +12 -4
  692. package/dist/canopy/v1/generated/validators/refundPolicy.zod.d.ts +13 -4
  693. package/dist/canopy/v1/generated/validators/refundPolicy.zod.js +14 -6
  694. package/dist/canopy/v1/generated/validators/refundReason.zod.d.ts +12 -4
  695. package/dist/canopy/v1/generated/validators/refundReason.zod.js +13 -5
  696. package/dist/canopy/v1/generated/validators/renewRequest.zod.d.ts +13 -5
  697. package/dist/canopy/v1/generated/validators/renewRequest.zod.js +15 -7
  698. package/dist/canopy/v1/generated/validators/renewalOrderRequest.zod.d.ts +13 -5
  699. package/dist/canopy/v1/generated/validators/renewalOrderRequest.zod.js +14 -6
  700. package/dist/canopy/v1/generated/validators/renewalPrice.zod.d.ts +16 -5
  701. package/dist/canopy/v1/generated/validators/renewalPrice.zod.js +16 -6
  702. package/dist/canopy/v1/generated/validators/renewalPriceList.zod.d.ts +16 -5
  703. package/dist/canopy/v1/generated/validators/renewalPriceList.zod.js +12 -4
  704. package/dist/canopy/v1/generated/validators/requestResource.zod.d.ts +12 -10
  705. package/dist/canopy/v1/generated/validators/requestResource.zod.js +12 -4
  706. package/dist/canopy/v1/generated/validators/responseCreate.zod.d.ts +12 -4
  707. package/dist/canopy/v1/generated/validators/responseCreate.zod.js +12 -4
  708. package/dist/canopy/v1/generated/validators/responseDeleted.zod.d.ts +12 -4
  709. package/dist/canopy/v1/generated/validators/responseDeleted.zod.js +12 -4
  710. package/dist/canopy/v1/generated/validators/responseResource.zod.d.ts +12 -4
  711. package/dist/canopy/v1/generated/validators/responseResource.zod.js +12 -4
  712. package/dist/canopy/v1/generated/validators/scheduledChange.zod.d.ts +13 -5
  713. package/dist/canopy/v1/generated/validators/scheduledChange.zod.js +12 -4
  714. package/dist/canopy/v1/generated/validators/serviceResource.zod.d.ts +13 -5
  715. package/dist/canopy/v1/generated/validators/serviceResource.zod.js +12 -4
  716. package/dist/canopy/v1/generated/validators/setProjectAssignmentRequest.zod.d.ts +12 -4
  717. package/dist/canopy/v1/generated/validators/setProjectAssignmentRequest.zod.js +12 -4
  718. package/dist/canopy/v1/generated/validators/spendRow.zod.d.ts +12 -4
  719. package/dist/canopy/v1/generated/validators/spendRow.zod.js +12 -4
  720. package/dist/canopy/v1/generated/validators/spendRowList.zod.d.ts +12 -4
  721. package/dist/canopy/v1/generated/validators/spendRowList.zod.js +12 -4
  722. package/dist/canopy/v1/generated/validators/statement.zod.d.ts +12 -4
  723. package/dist/canopy/v1/generated/validators/statement.zod.js +12 -4
  724. package/dist/canopy/v1/generated/validators/statementAmounts.zod.d.ts +12 -4
  725. package/dist/canopy/v1/generated/validators/statementAmounts.zod.js +12 -4
  726. package/dist/canopy/v1/generated/validators/statementItem.zod.d.ts +12 -4
  727. package/dist/canopy/v1/generated/validators/statementItem.zod.js +12 -4
  728. package/dist/canopy/v1/generated/validators/statementList.zod.d.ts +12 -4
  729. package/dist/canopy/v1/generated/validators/statementList.zod.js +12 -4
  730. package/dist/canopy/v1/generated/validators/statementStatus.zod.d.ts +12 -4
  731. package/dist/canopy/v1/generated/validators/statementStatus.zod.js +12 -4
  732. package/dist/canopy/v1/generated/validators/statementSummary.zod.d.ts +12 -4
  733. package/dist/canopy/v1/generated/validators/statementSummary.zod.js +12 -4
  734. package/dist/canopy/v1/generated/validators/statementType.zod.d.ts +12 -4
  735. package/dist/canopy/v1/generated/validators/statementType.zod.js +12 -4
  736. package/dist/canopy/v1/generated/validators/streamGenerateContentParams.zod.d.ts +48 -0
  737. package/dist/canopy/v1/generated/validators/{terminationPolicy.zod.d.ts → streamGenerateContentParams.zod.js} +15 -10
  738. package/dist/canopy/v1/generated/validators/subscription.zod.d.ts +18 -6
  739. package/dist/canopy/v1/generated/validators/subscription.zod.js +26 -6
  740. package/dist/canopy/v1/generated/validators/subscriptionCancellation.zod.d.ts +12 -4
  741. package/dist/canopy/v1/generated/validators/subscriptionCancellation.zod.js +12 -4
  742. package/dist/canopy/v1/generated/validators/subscriptionList.zod.d.ts +18 -6
  743. package/dist/canopy/v1/generated/validators/subscriptionList.zod.js +12 -4
  744. package/dist/canopy/v1/generated/validators/subscriptionRestriction.zod.d.ts +12 -4
  745. package/dist/canopy/v1/generated/validators/subscriptionRestriction.zod.js +12 -4
  746. package/dist/canopy/v1/generated/validators/taxItem.zod.d.ts +12 -4
  747. package/dist/canopy/v1/generated/validators/taxItem.zod.js +12 -4
  748. package/dist/canopy/v1/generated/validators/tier.zod.d.ts +12 -4
  749. package/dist/canopy/v1/generated/validators/tier.zod.js +12 -4
  750. package/dist/canopy/v1/generated/validators/tokenPrice.zod.d.ts +12 -4
  751. package/dist/canopy/v1/generated/validators/tokenPrice.zod.js +12 -4
  752. package/dist/canopy/v1/generated/validators/topUp.zod.d.ts +13 -5
  753. package/dist/canopy/v1/generated/validators/topUp.zod.js +12 -4
  754. package/dist/canopy/v1/generated/validators/topUpCreate.zod.d.ts +12 -4
  755. package/dist/canopy/v1/generated/validators/topUpCreate.zod.js +12 -4
  756. package/dist/canopy/v1/generated/validators/topUpList.zod.d.ts +13 -5
  757. package/dist/canopy/v1/generated/validators/topUpList.zod.js +12 -4
  758. package/dist/canopy/v1/generated/validators/totalsResource.zod.d.ts +12 -4
  759. package/dist/canopy/v1/generated/validators/totalsResource.zod.js +12 -4
  760. package/dist/canopy/v1/generated/validators/transaction.zod.d.ts +13 -5
  761. package/dist/canopy/v1/generated/validators/transaction.zod.js +12 -4
  762. package/dist/canopy/v1/generated/validators/transactionList.zod.d.ts +13 -5
  763. package/dist/canopy/v1/generated/validators/transactionList.zod.js +12 -4
  764. package/dist/canopy/v1/generated/validators/transactionType.zod.d.ts +12 -4
  765. package/dist/canopy/v1/generated/validators/transactionType.zod.js +12 -4
  766. package/dist/canopy/v1/generated/validators/updateAPIKeyRequestBody.zod.d.ts +12 -4
  767. package/dist/canopy/v1/generated/validators/updateAPIKeyRequestBody.zod.js +12 -4
  768. package/dist/canopy/v1/generated/validators/usageBucketResource.zod.d.ts +12 -4
  769. package/dist/canopy/v1/generated/validators/usageBucketResource.zod.js +12 -4
  770. package/dist/canopy/v1/generated/validators/usageCharge.zod.d.ts +12 -4
  771. package/dist/canopy/v1/generated/validators/usageCharge.zod.js +12 -4
  772. package/dist/canopy/v1/generated/validators/usageChargeList.zod.d.ts +12 -4
  773. package/dist/canopy/v1/generated/validators/usageChargeList.zod.js +12 -4
  774. package/dist/canopy/v1/generated/validators/usageTimelineResponseBody.zod.d.ts +12 -4
  775. package/dist/canopy/v1/generated/validators/usageTimelineResponseBody.zod.js +12 -4
  776. package/dist/canopy/v1/generated/validators/usageType.zod.d.ts +12 -4
  777. package/dist/canopy/v1/generated/validators/usageType.zod.js +12 -4
  778. package/dist/canopy/v1/generated/validators/withdrawal.zod.d.ts +13 -5
  779. package/dist/canopy/v1/generated/validators/withdrawal.zod.js +12 -4
  780. package/dist/canopy/v1/generated/validators/withdrawalAllocation.zod.d.ts +12 -4
  781. package/dist/canopy/v1/generated/validators/withdrawalAllocation.zod.js +12 -4
  782. package/dist/canopy/v1/generated/validators/withdrawalCreate.zod.d.ts +12 -4
  783. package/dist/canopy/v1/generated/validators/withdrawalCreate.zod.js +12 -4
  784. package/dist/canopy/v1/generated/validators/withdrawalItem.zod.d.ts +13 -5
  785. package/dist/canopy/v1/generated/validators/withdrawalItem.zod.js +12 -4
  786. package/dist/canopy/v1/generated/validators/withdrawalItemList.zod.d.ts +13 -5
  787. package/dist/canopy/v1/generated/validators/withdrawalItemList.zod.js +12 -4
  788. package/dist/canopy/v1/generated/validators/withdrawalList.zod.d.ts +13 -5
  789. package/dist/canopy/v1/generated/validators/withdrawalList.zod.js +12 -4
  790. package/dist/canopy/v1/generated/validators/withdrawalPreview.zod.d.ts +12 -4
  791. package/dist/canopy/v1/generated/validators/withdrawalPreview.zod.js +12 -4
  792. package/dist/canopy/v1/generated/validators/withdrawalPreviewItem.zod.d.ts +12 -4
  793. package/dist/canopy/v1/generated/validators/withdrawalPreviewItem.zod.js +12 -4
  794. package/dist/canopy/v1/generated/validators/withdrawalPreviewRequest.zod.d.ts +12 -4
  795. package/dist/canopy/v1/generated/validators/withdrawalPreviewRequest.zod.js +12 -4
  796. package/dist/canopy/v1/generated/validators/withdrawalSource.zod.d.ts +12 -4
  797. package/dist/canopy/v1/generated/validators/withdrawalSource.zod.js +12 -4
  798. package/dist/compute/v1/generated/validators/allocateFloatingIPResponseBody.zod.d.ts +1 -1
  799. package/dist/compute/v1/generated/validators/backupCapacityPack.zod.d.ts +1 -1
  800. package/dist/compute/v1/generated/validators/backupCapacityPackListResponseBody.zod.d.ts +1 -1
  801. package/dist/compute/v1/generated/validators/backupService.zod.d.ts +1 -1
  802. package/dist/compute/v1/generated/validators/createBackupCapacityPackResponseBody.zod.d.ts +1 -1
  803. package/dist/compute/v1/generated/validators/createBackupServiceResponseBody.zod.d.ts +1 -1
  804. package/dist/compute/v1/generated/validators/createDiskResponseBody.zod.d.ts +1 -1
  805. package/dist/compute/v1/generated/validators/createImageResponseBody.zod.d.ts +1 -1
  806. package/dist/compute/v1/generated/validators/diskListResponseBody.zod.d.ts +1 -1
  807. package/dist/compute/v1/generated/validators/diskResource.zod.d.ts +1 -1
  808. package/dist/compute/v1/generated/validators/floatingIPListResponseBody.zod.d.ts +1 -1
  809. package/dist/compute/v1/generated/validators/floatingIPResource.zod.d.ts +1 -1
  810. package/dist/compute/v1/generated/validators/imageListResponseBody.zod.d.ts +1 -1
  811. package/dist/compute/v1/generated/validators/imageResource.zod.d.ts +1 -1
  812. package/dist/compute/v1/generated/validators/instanceListResponseBody.zod.d.ts +3 -3
  813. package/dist/compute/v1/generated/validators/instanceResource.zod.d.ts +3 -3
  814. package/dist/compute/v1/generated/validators/launchInstanceResponseBody.zod.d.ts +3 -3
  815. package/dist/compute/v1/generated/validators/peeringListResponseBody.zod.d.ts +1 -1
  816. package/dist/compute/v1/generated/validators/peeringResource.zod.d.ts +1 -1
  817. package/dist/compute/v1/generated/validators/rebuildInstanceResponseBody.zod.d.ts +3 -3
  818. package/dist/compute/v1/generated/validators/resizeDiskResponseBody.zod.d.ts +1 -1
  819. package/dist/compute/v1/generated/validators/resizeInstanceResponseBody.zod.d.ts +3 -3
  820. package/dist/compute/v1/generated/validators/setFloatingIPBandwidthResponseBody.zod.d.ts +1 -1
  821. package/dist/compute/v1/generated/validators/setSnapshotQuotaResponseBody.zod.d.ts +1 -1
  822. package/dist/compute/v1/generated/validators/snapshotListResponseBody.zod.d.ts +1 -1
  823. package/dist/compute/v1/generated/validators/snapshotQuota.zod.d.ts +1 -1
  824. package/dist/compute/v1/generated/validators/snapshotResource.zod.d.ts +1 -1
  825. package/dist/membership/v1/generated/models.d.ts +71 -33
  826. package/dist/membership/v1/generated/models.js +2 -1
  827. package/dist/membership/v1/generated/validators/allowance.zod.d.ts +1 -1
  828. package/dist/membership/v1/generated/validators/allowanceList.zod.d.ts +1 -1
  829. package/dist/membership/v1/generated/validators/cancelSubscriptionRequest.zod.js +2 -2
  830. package/dist/membership/v1/generated/validators/cancellation.zod.js +2 -2
  831. package/dist/membership/v1/generated/validators/cancellationCreate.zod.js +2 -2
  832. package/dist/membership/v1/generated/validators/{terminationPolicy.zod.d.ts → cancellationPolicy.zod.d.ts} +3 -3
  833. package/dist/membership/v1/generated/validators/{terminationPolicy.zod.js → cancellationPolicy.zod.js} +2 -2
  834. package/dist/membership/v1/generated/validators/cancellationRefundPreview.zod.d.ts +2 -0
  835. package/dist/membership/v1/generated/validators/cancellationRefundPreview.zod.js +4 -3
  836. package/dist/membership/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +1 -0
  837. package/dist/membership/v1/generated/validators/cancellationRefundPreviewItem.zod.js +1 -0
  838. package/dist/membership/v1/generated/validators/creditGrant.zod.d.ts +1 -1
  839. package/dist/membership/v1/generated/validators/creditGrantList.zod.d.ts +1 -1
  840. package/dist/membership/v1/generated/validators/discount.zod.d.ts +1 -1
  841. package/dist/membership/v1/generated/validators/discountList.zod.d.ts +1 -1
  842. package/dist/membership/v1/generated/validators/featureGrant.zod.d.ts +1 -1
  843. package/dist/membership/v1/generated/validators/featureGrantList.zod.d.ts +1 -1
  844. package/dist/membership/v1/generated/validators/featureGrantStatus.zod.d.ts +1 -1
  845. package/dist/membership/v1/generated/validators/order.zod.d.ts +7 -5
  846. package/dist/membership/v1/generated/validators/orderItem.zod.d.ts +6 -4
  847. package/dist/membership/v1/generated/validators/orderItem.zod.js +10 -6
  848. package/dist/membership/v1/generated/validators/orderItemList.zod.d.ts +6 -4
  849. package/dist/membership/v1/generated/validators/orderItemStatus.zod.d.ts +1 -1
  850. package/dist/membership/v1/generated/validators/orderList.zod.d.ts +7 -5
  851. package/dist/membership/v1/generated/validators/orderRefundQuote.zod.js +1 -1
  852. package/dist/membership/v1/generated/validators/orderStatus.zod.d.ts +1 -1
  853. package/dist/membership/v1/generated/validators/paymentMethod.zod.d.ts +1 -1
  854. package/dist/membership/v1/generated/validators/paymentMethodList.zod.d.ts +1 -1
  855. package/dist/membership/v1/generated/validators/paymentResult.zod.d.ts +1 -1
  856. package/dist/membership/v1/generated/validators/price.zod.d.ts +4 -1
  857. package/dist/membership/v1/generated/validators/price.zod.js +10 -2
  858. package/dist/membership/v1/generated/validators/priceList.zod.d.ts +4 -1
  859. package/dist/membership/v1/generated/validators/quote.zod.d.ts +2 -0
  860. package/dist/membership/v1/generated/validators/quoteCancellation.zod.js +2 -2
  861. package/dist/membership/v1/generated/validators/quoteItemInput.zod.d.ts +1 -1
  862. package/dist/membership/v1/generated/validators/quoteItemInput.zod.js +2 -2
  863. package/dist/membership/v1/generated/validators/quoteRenewal.zod.d.ts +1 -1
  864. package/dist/membership/v1/generated/validators/quoteRenewal.zod.js +3 -3
  865. package/dist/membership/v1/generated/validators/quoteRequest.zod.d.ts +2 -2
  866. package/dist/membership/v1/generated/validators/refund.zod.d.ts +2 -2
  867. package/dist/membership/v1/generated/validators/refundList.zod.d.ts +2 -2
  868. package/dist/membership/v1/generated/validators/refundPolicy.zod.d.ts +1 -0
  869. package/dist/membership/v1/generated/validators/refundPolicy.zod.js +2 -2
  870. package/dist/membership/v1/generated/validators/refundReason.zod.js +1 -1
  871. package/dist/membership/v1/generated/validators/renewRequest.zod.d.ts +1 -1
  872. package/dist/membership/v1/generated/validators/renewRequest.zod.js +3 -3
  873. package/dist/membership/v1/generated/validators/renewalOrderRequest.zod.d.ts +1 -1
  874. package/dist/membership/v1/generated/validators/renewalOrderRequest.zod.js +2 -2
  875. package/dist/membership/v1/generated/validators/renewalPrice.zod.d.ts +4 -1
  876. package/dist/membership/v1/generated/validators/renewalPrice.zod.js +4 -2
  877. package/dist/membership/v1/generated/validators/renewalPriceList.zod.d.ts +4 -1
  878. package/dist/membership/v1/generated/validators/scheduledChange.zod.d.ts +1 -1
  879. package/dist/membership/v1/generated/validators/subscription.zod.d.ts +6 -2
  880. package/dist/membership/v1/generated/validators/subscription.zod.js +14 -2
  881. package/dist/membership/v1/generated/validators/subscriptionList.zod.d.ts +6 -2
  882. package/dist/membership/v1/generated/validators/topUp.zod.d.ts +1 -1
  883. package/dist/membership/v1/generated/validators/topUpList.zod.d.ts +1 -1
  884. package/dist/membership/v1/generated/validators/transaction.zod.d.ts +1 -1
  885. package/dist/membership/v1/generated/validators/transactionList.zod.d.ts +1 -1
  886. package/dist/membership/v1/generated/validators/withdrawal.zod.d.ts +1 -1
  887. package/dist/membership/v1/generated/validators/withdrawalItem.zod.d.ts +1 -1
  888. package/dist/membership/v1/generated/validators/withdrawalItemList.zod.d.ts +1 -1
  889. package/dist/membership/v1/generated/validators/withdrawalList.zod.d.ts +1 -1
  890. package/dist/notification/v1/generated/schemas.zod.d.ts +3 -3
  891. package/dist/notification/v1/generated/validators/channelListResponseBody.zod.d.ts +1 -1
  892. package/dist/notification/v1/generated/validators/channelResource.zod.d.ts +1 -1
  893. package/dist/notification/v1/generated/validators/channelScope.zod.d.ts +1 -1
  894. package/dist/notification/v1/generated/validators/createChannelRequestBody.zod.d.ts +1 -1
  895. package/dist/notification/v1/generated/validators/listUserChannelsParams.zod.d.ts +1 -1
  896. package/dist/notification/v1/generated/validators/notificationChannel.zod.d.ts +1 -1
  897. package/dist/notification/v1/generated/validators/notificationTypeDescriptor.zod.d.ts +2 -2
  898. package/dist/notification/v1/generated/validators/notificationTypeListResponseBody.zod.d.ts +2 -2
  899. package/dist/notification/v1/generated/validators/typePreferenceListResponseBody.zod.d.ts +1 -1
  900. package/dist/notification/v1/generated/validators/typePreferenceResource.zod.d.ts +1 -1
  901. package/dist/notification/v1/generated/validators/updateTypePreferenceRequestBody.zod.d.ts +1 -1
  902. package/dist/routes.d.ts +350 -78
  903. package/dist/routes.js +384 -78
  904. package/dist/type/resource/v1/generated/validators/reclamationState.zod.d.ts +1 -1
  905. package/package.json +1 -1
  906. package/dist/assistant/v1/generated/validators/answerRequestBody.zod.d.ts +0 -54
  907. package/dist/assistant/v1/generated/validators/answerRequestBody.zod.js +0 -54
  908. package/dist/assistant/v1/generated/validators/choice.zod.d.ts +0 -55
  909. package/dist/assistant/v1/generated/validators/choice.zod.js +0 -53
  910. package/dist/assistant/v1/generated/validators/contextResource.zod.d.ts +0 -59
  911. package/dist/assistant/v1/generated/validators/contextResource.zod.js +0 -62
  912. package/dist/assistant/v1/generated/validators/decideRequestBody.zod.d.ts +0 -55
  913. package/dist/assistant/v1/generated/validators/decideRequestBody.zod.js +0 -53
  914. package/dist/assistant/v1/generated/validators/documentResource.zod.d.ts +0 -181
  915. package/dist/assistant/v1/generated/validators/documentResource.zod.js +0 -71
  916. package/dist/assistant/v1/generated/validators/dynamicCallResultRequestBody.zod.d.ts +0 -60
  917. package/dist/assistant/v1/generated/validators/dynamicCallResultRequestBody.zod.js +0 -72
  918. package/dist/assistant/v1/generated/validators/earlierResource.zod.d.ts +0 -55
  919. package/dist/assistant/v1/generated/validators/earlierResource.zod.js +0 -53
  920. package/dist/assistant/v1/generated/validators/earlierResponseBody.zod.d.ts +0 -130
  921. package/dist/assistant/v1/generated/validators/earlierResponseBody.zod.js +0 -55
  922. package/dist/assistant/v1/generated/validators/itemResource.zod.d.ts +0 -124
  923. package/dist/assistant/v1/generated/validators/itemResource.zod.js +0 -101
  924. package/dist/assistant/v1/generated/validators/listEarlierItemsParams.zod.d.ts +0 -55
  925. package/dist/assistant/v1/generated/validators/listEarlierItemsParams.zod.js +0 -56
  926. package/dist/assistant/v1/generated/validators/listThreadsParams.zod.d.ts +0 -63
  927. package/dist/assistant/v1/generated/validators/listThreadsParams.zod.js +0 -72
  928. package/dist/assistant/v1/generated/validators/modelListResponseBody.zod.d.ts +0 -69
  929. package/dist/assistant/v1/generated/validators/modelListResponseBody.zod.js +0 -65
  930. package/dist/assistant/v1/generated/validators/modelResource.zod.d.ts +0 -65
  931. package/dist/assistant/v1/generated/validators/modelResource.zod.js +0 -81
  932. package/dist/assistant/v1/generated/validators/question.zod.d.ts +0 -60
  933. package/dist/assistant/v1/generated/validators/question.zod.js +0 -56
  934. package/dist/assistant/v1/generated/validators/streamResource.zod.d.ts +0 -55
  935. package/dist/assistant/v1/generated/validators/streamResource.zod.js +0 -53
  936. package/dist/assistant/v1/generated/validators/threadSummaryResource.zod.d.ts +0 -68
  937. package/dist/assistant/v1/generated/validators/threadSummaryResource.zod.js +0 -73
  938. package/dist/assistant/v1/generated/validators/turnIDResponseBody.zod.d.ts +0 -56
  939. package/dist/assistant/v1/generated/validators/turnIDResponseBody.zod.js +0 -61
  940. package/dist/assistant/v1/generated/validators/turnResource.zod.d.ts +0 -58
  941. package/dist/assistant/v1/generated/validators/turnResource.zod.js +0 -52
  942. package/dist/assistant/v1/generated/validators/waitResource.zod.d.ts +0 -71
  943. package/dist/assistant/v1/generated/validators/waitResource.zod.js +0 -59
@@ -2,493 +2,525 @@
2
2
  * Generated by orval 🍺
3
3
  * Do not edit manually.
4
4
  * Leaflow Assistant API
5
- * The AI assistant inside the console: conversations, messages, tool calls and their approval, attachments, and connecting the assistant to instant messaging platforms such as WeChat, Feishu and Telegram.
5
+ * Conversations with agents that operate the Leaflow platform, plus their folders, tasks, files and
6
+ * chat-app channels.
6
7
  *
7
- * ## A conversation
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.
8
12
  *
9
- * The path one conversation takes, end to end. It names the operations that path needs, not all of them — the full list is below, and it also covers folders, attachments, memories, skills and the instant messaging side.
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.
10
16
  *
11
- * 1. `POST /api/v1/threads` creates one;
12
- * 2. `POST /api/v1/threads/{thread}/messages` sends a message and returns a `turnId` at once; the assistant runs in the background;
13
- * 3. `GET /api/v1/threads/{thread}` returns the conversation document to render, whose `stream` is where live output arrives;
14
- * 4. When the assistant needs the user, the document's `wait` says which kind: approving a batch of tool calls (`POST /api/v1/threads/{thread}/approvals/{batch}`), or answering a few questions (`POST /api/v1/threads/{thread}/questions/{item}`). It continues on its own once that is handled.
17
+ * Read a thread's state with get-thread and its transcript with list-thread-items. Follow both live
18
+ * over the WebSocket described under /api/v1/realtime/tickets. Slash commands such as /status and
19
+ * /compact are listed by list-commands and work the same in the console and in chat apps.
15
20
  *
16
- * Sending a file takes two steps: `POST /api/v1/attachments` for an id, then put that id in `attachmentIds` when sending the message. Images, text and arbitrary binaries all go through the same two steps; what differs is how the assistant reads them afterwards, which the upload response's `kind` says.
17
- *
18
- * ## Models
19
- *
20
- * Canopy owns the model catalogue and capabilities. Model ids in this API, conversation preferences and historical entries are Canopy model ids, with no separate assistant model registration. GET /api/v1/models returns the allowed, usable choices and allowModelSelection. Hide the selector when selection is disabled; the service enforces the same rule.
21
- *
22
- * preferredModelId is the user's choice. Null follows the platform default, including later changes. Disabled selection preserves but ignores preferences for new turns. A model removed from the allowlist, retired in Canopy or otherwise unusable falls back to the default without clearing the preference.
23
- *
24
- * Users can switch an existing conversation through PATCH /api/v1/threads/{thread} with preferredModelId. This preserves the transcript, starts no turn and makes no inference request. Null returns to following the default. Changes apply from the next turn; a running or waiting turn and messages queued into it retain their captured choices and fallback policy.
25
- *
26
- * If the chosen model cannot serve a request, the service may safely fall back to the default without confirmation or an additional switching message. If the default also fails, the turn fails normally; no third model is selected for ordinary answers. Fallback preserves executed tool results and never splices answers from different models. Invalid input, cancellation and a declined tool call do not trigger model fallback. Each entry's model records its actual Canopy author, not the saved preference.
27
- *
28
- * Users cannot choose a compaction model. Normal compaction reuses the effective model and reasoning settings for context-cache reuse. Only if that model cannot handle the compaction request or produce a summary fitting the target window may the service automatically use another allowed Canopy model with suitable capabilities. This does not change the preference or ordinary answer model, and is permitted even when user model selection is disabled.
29
- *
30
- * After compaction, the full next request, including instructions, tools and retained messages, must fit the target's usable prompt budget with room left for an answer, respecting its output limit. If still too large, further compaction attempts are bounded; exhaustion fails with CANNOT_FOLD instead of sending an oversized request or silently discarding history or images. The same checks apply when switching models or falling back. Each compaction entry records its actual author.
31
- *
32
- * An empty allowlist or unavailable default does not prevent reading conversations or saving permitted preference changes. A failed Canopy catalogue read is not evidence that a model was removed: use a valid cached snapshot or return MODEL_CATALOG_UNAVAILABLE, without deleting references or inventing capabilities. Catalogue presence is configuration information, not a live provider health check.
33
- *
34
- * ## Live output
35
- *
36
- * ```
37
- * GET /api/v1/turns/{turn}/stream?ticket=<ticket>&cursor=<cursor>
38
- * ```
39
- *
40
- * This is a Server-Sent Events stream, which is why it is not in the operation list below and why generated clients have no method for it. Open it with `EventSource`, or any SSE client. It is how live output arrives; polling the document on a timer is not the intended way to follow a conversation.
41
- *
42
- * - `path` and `ticket` both come from the conversation document's `stream`. `path` is relative, resolved against the address the document was fetched from;
43
- * - `cursor` is where to start, from the document's `cursor`. Omit it to start at the beginning of what is still available;
44
- * - every event is one incremental edit to that same document, so the same rendering logic applies;
45
- * - the connection has a lifetime and closes cleanly when it ends. With `EventSource` the browser reconnects with `Last-Event-ID` and resumes by itself, so nothing needs handling;
46
- * - three terminal events: `done` this turn finished (carrying its final status), `paused` the assistant is waiting on the user (fetch the document again and read `wait`), `stalled` execution was interrupted and will not resume — do not reconnect.
47
- * OpenAPI spec version: 1.0.0
21
+ * Upload large files with /api/v1/uploads: read /api/v1/upload-configuration first, send exact-sized
22
+ * parts, then complete the upload and send its attachment id in a message.
23
+ * OpenAPI spec version: 2.0.0
48
24
  */
49
- import type { AnswerRequestBody, BindingCodeResponseBody, BindingResource, ChannelResource, ChannelWithSecretResponseBody, CheckSenderParams, CreateChannelRequestBody, CreateFolderRequestBody, CreateThreadRequestBody, DecideRequestBody, DocumentResource, DynamicCallResultRequestBody, EarlierResponseBody, Error, FolderListResponseBody, FolderResource, LengthAwarePageBindingResource, LengthAwarePageChannelResource, ListBindingsParams, ListChannelRejectionsParams, ListChannelsParams, ListEarlierItemsParams, ListThreadsParams, LoginResource, MemoryListResponseBody, ModelListResponseBody, PlatformListResponseBody, RejectionListResponseBody, RevertRequestBody, RevertedCountResponseBody, RotateSecretRequestBody, SendMessageRequestBody, SenderCheckResource, SkillEnabledRequestBody, SkillListResponseBody, SkillRequestBody, SkillResource, ThreadListResponseBody, ThreadSummaryResource, TurnIDResponseBody, UpdateChannelRequestBody, UpdateFolderRequestBody, UpdateThreadRequestBody, UploadAttachmentParams, UploadedResource, VerifyCodeRequestBody, WebhookSecretResponseBody } from "./models.js";
25
+ import type { AnswerQuestionRequestBody, BindingCodeResponseBody, BindingResource, ChannelResource, ChannelWithSecretResponseBody, CheckSenderParams, CommandListResponseBody, CommandResultResource, CompleteUploadRequestBody, CreateChannelRequestBody, CreateFolderRequestBody, CreateTaskRequestBody, CreateThreadRequestBody, CreateThreadResponseBody, CreateUploadRequestBody, DecideToolCallsRequestBody, ErrorResponse, FolderListResponseBody, FolderResource, LengthAwarePageBindingResource, LengthAwarePageChannelResource, ListBindingsParams, ListChannelRejectionsParams, ListChannelsParams, ListTaskRunsParams, ListThreadItemsParams, ListThreadTurnsParams, LoginResource, MemoryListResponseBody, MoveFolderRequestBody, OpenRealtimeParams, PlaceThreadRequestBody, PlatformListResponseBody, PutUploadPartHeaders, PutUploadPartParams, RealtimeExchange, RealtimeTicketResource, RejectionListResponseBody, ResumeThreadRequestBody, RevertRequestBody, RevertedCountResponseBody, RotateSecretRequestBody, RunCommandRequestBody, SearchTasksRequestBody, SearchThreadsRequestBody, SendMessageRequestBody, SendMessageResponseBody, SenderCheckResource, SettingsResource, SkillEnabledRequestBody, SkillListResponseBody, SkillRequestBody, SkillResource, TaskListResponseBody, TaskResource, TaskRunListResponseBody, TaskRunResource, ThreadItemListResponseBody, ThreadItemResource, ThreadListResponseBody, ThreadResource, ThreadTurnListResponseBody, ToolResultRequestBody, TurnStartedResponseBody, UpdateChannelRequestBody, UpdateFolderRequestBody, UpdateSettingsRequestBody, UpdateTaskRequestBody, UpdateThreadRequestBody, UpdateUploadRequestBody, UploadAttachmentParams, UploadConfigurationResource, UploadListResponseBody, UploadPartResource, UploadResource, UploadedResource, VerifyCodeRequestBody, WebhookSecretResponseBody } from "./models.js";
50
26
  export type HTTPStatusCode1xx = 100 | 101 | 102 | 103;
51
27
  export type HTTPStatusCode2xx = 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207;
52
28
  export type HTTPStatusCode3xx = 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308;
53
29
  export type HTTPStatusCode4xx = 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 426 | 428 | 429 | 431 | 451;
54
30
  export type HTTPStatusCode5xx = 500 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
55
31
  export type HTTPStatusCodes = HTTPStatusCode1xx | HTTPStatusCode2xx | HTTPStatusCode3xx | HTTPStatusCode4xx | HTTPStatusCode5xx;
56
- export type listModelsResponse200 = {
57
- data: ModelListResponseBody;
58
- status: 200;
59
- };
60
- export type listModelsResponseDefault = {
61
- data: Error;
62
- status: Exclude<HTTPStatusCodes, 200>;
63
- };
64
- export type listModelsResponseSuccess = listModelsResponse200 & {
65
- headers: Headers;
66
- };
67
- export type listModelsResponseError = listModelsResponseDefault & {
68
- headers: Headers;
69
- };
70
- export type listModelsResponse = listModelsResponseSuccess | listModelsResponseError;
71
- export declare const getListModelsUrl: () => string;
72
- /**
73
- * Returns Canopy's models filtered by Assistant's saved allowlist and selection policy. There is no separately maintained assistant catalogue. The complete list is not paginated and is ordered by displayName, then id.
74
- *
75
- * When allowModelSelection is true, models contains allowed Canopy models that remain callable, support tools and have positive context and output limits. When false, only the default is returned if it meets those conditions. defaultModelId is null if no usable default is known. Disallowed, retired and incompatible models are omitted, while saved preferences may still reference them.
76
- *
77
- * This operation reads capabilities without making an inference request. It does not check live provider health or the inference key's model restrictions. If Canopy cannot be read and no usable cached snapshot exists, it returns 503 with code MODEL_CATALOG_UNAVAILABLE; a failed read is not an empty catalogue. An empty allowlist returns an empty list without needing Canopy. Supplier connection details and credentials are not returned.
78
- * @summary List assistant model choices
79
- */
80
- export declare const listModels: (options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<listModelsResponse>;
81
- export type uploadAttachmentResponse201 = {
82
- data: UploadedResource;
32
+ export type createThreadResponse201 = {
33
+ data: CreateThreadResponseBody;
83
34
  status: 201;
84
35
  };
85
- export type uploadAttachmentResponseDefault = {
86
- data: Error;
36
+ export type createThreadResponseDefault = {
37
+ data: ErrorResponse;
87
38
  status: Exclude<HTTPStatusCodes, 201>;
88
39
  };
89
- export type uploadAttachmentResponseSuccess = uploadAttachmentResponse201 & {
40
+ export type createThreadResponseSuccess = createThreadResponse201 & {
90
41
  headers: Headers;
91
42
  };
92
- export type uploadAttachmentResponseError = uploadAttachmentResponseDefault & {
43
+ export type createThreadResponseError = createThreadResponseDefault & {
93
44
  headers: Headers;
94
45
  };
95
- export type uploadAttachmentResponse = uploadAttachmentResponseSuccess | uploadAttachmentResponseError;
96
- export declare const getUploadAttachmentUrl: (params?: UploadAttachmentParams) => string;
46
+ export type createThreadResponse = createThreadResponseSuccess | createThreadResponseError;
47
+ export declare const getCreateThreadUrl: () => string;
97
48
  /**
98
- * The body is the file bytes themselves, not multipart, one file per request. The kind is determined from the content, not from Content-Type or from the name. Put the returned id in attachmentIds when sending a message.
49
+ * Creates a conversation and, when `message` is given, sends it as the first message in the same
50
+ * request, so starting a task is one round trip.
99
51
  *
100
- * An upload that no message ever references is a draft, and drafts are collected — `draftExpiresAt` in the response says when this one goes. Sending a message with the id makes it permanent.
52
+ * The model is chosen in this order: `modelId` from the request, the caller's default from
53
+ * /api/v1/settings, then the first model in the Canopy catalogue that can run an agent. Fails with
54
+ * 422 and code MODEL_UNAVAILABLE when the chosen model cannot run an agent, and with 422 and code
55
+ * REASONING_UNSUPPORTED when `reasoningEffort` is given for a model without reasoning.
101
56
  *
102
- * The returned `kind` says how the assistant will see it. An `image` is read directly, and only by models that accept image input. A small `text` file is placed inline in the message. A large `text` file, and anything `binary`, arrives as a reference the assistant reads on demand — for a binary that usually means downloading it onto one of the project's cloud instances.
103
- * @summary Upload a file
57
+ * Without `message`, creating a conversation does not contact a model provider.
58
+ * @summary Create a conversation
104
59
  */
105
- export declare const uploadAttachment: (uploadAttachmentBody: Blob, params?: UploadAttachmentParams, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<uploadAttachmentResponse>;
106
- export type downloadAttachmentResponse200 = {
107
- data: Blob;
60
+ export declare const createThread: (createThreadRequestBody: CreateThreadRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<createThreadResponse>;
61
+ export type searchThreadsResponse200 = {
62
+ data: ThreadListResponseBody;
108
63
  status: 200;
109
64
  };
110
- export type downloadAttachmentResponseDefault = {
111
- data: Error;
65
+ export type searchThreadsResponseDefault = {
66
+ data: ErrorResponse;
112
67
  status: Exclude<HTTPStatusCodes, 200>;
113
68
  };
114
- export type downloadAttachmentResponseSuccess = downloadAttachmentResponse200 & {
69
+ export type searchThreadsResponseSuccess = searchThreadsResponse200 & {
115
70
  headers: Headers;
116
71
  };
117
- export type downloadAttachmentResponseError = downloadAttachmentResponseDefault & {
72
+ export type searchThreadsResponseError = searchThreadsResponseDefault & {
118
73
  headers: Headers;
119
74
  };
120
- export type downloadAttachmentResponse = downloadAttachmentResponseSuccess | downloadAttachmentResponseError;
121
- export declare const getDownloadAttachmentUrl: (attachment: string) => string;
75
+ export type searchThreadsResponse = searchThreadsResponseSuccess | searchThreadsResponseError;
76
+ export declare const getSearchThreadsUrl: () => string;
122
77
  /**
123
- * 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.
78
+ * Lists the caller's conversations in this project with their state, progress and usage. The
79
+ * criteria travel in the request body. Keep the same criteria when following `nextCursor`.
124
80
  *
125
- * Only an attachment whose `kind` 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.
126
- * @summary Download a file
81
+ * Subagents are conversations too. They are excluded unless `parentId` or `role` asks for them.
82
+ * `ids` reads a bounded batch, including subagents and archived conversations, and cannot be
83
+ * combined with a cursor.
84
+ *
85
+ * Counts over everything the criteria match cost more than the page itself; ask for them with
86
+ * `include: [counts]`, typically on the first page only.
87
+ * @summary Search conversations
127
88
  */
128
- export declare const downloadAttachment: (attachment: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<downloadAttachmentResponse>;
129
- export type listBindingsResponse200 = {
130
- data: LengthAwarePageBindingResource;
89
+ export declare const searchThreads: (searchThreadsRequestBody: SearchThreadsRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<searchThreadsResponse>;
90
+ export type getThreadResponse200 = {
91
+ data: ThreadResource;
131
92
  status: 200;
132
93
  };
133
- export type listBindingsResponseDefault = {
134
- data: Error;
94
+ export type getThreadResponseDefault = {
95
+ data: ErrorResponse;
135
96
  status: Exclude<HTTPStatusCodes, 200>;
136
97
  };
137
- export type listBindingsResponseSuccess = listBindingsResponse200 & {
98
+ export type getThreadResponseSuccess = getThreadResponse200 & {
138
99
  headers: Headers;
139
100
  };
140
- export type listBindingsResponseError = listBindingsResponseDefault & {
101
+ export type getThreadResponseError = getThreadResponseDefault & {
141
102
  headers: Headers;
142
103
  };
143
- export type listBindingsResponse = listBindingsResponseSuccess | listBindingsResponseError;
144
- export declare const getListBindingsUrl: (params?: ListBindingsParams) => string;
104
+ export type getThreadResponse = getThreadResponseSuccess | getThreadResponseError;
105
+ export declare const getGetThreadUrl: (thread: string) => string;
145
106
  /**
146
- * Filter by channelId to show, per channel, who is bound to it.
147
- * @summary List bindings
107
+ * The conversation's state: model, reasoning effort, approval mode, what it is doing now, its
108
+ * plan, what it is waiting for, context usage and token usage. The transcript is read separately
109
+ * from /items.
110
+ * @summary Get a conversation
148
111
  */
149
- export declare const listBindings: (params?: ListBindingsParams, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<listBindingsResponse>;
150
- export type getBindingResponse200 = {
151
- data: BindingResource;
112
+ export declare const getThread: (thread: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<getThreadResponse>;
113
+ export type updateThreadResponse200 = {
114
+ data: ThreadResource;
152
115
  status: 200;
153
116
  };
154
- export type getBindingResponseDefault = {
155
- data: Error;
117
+ export type updateThreadResponseDefault = {
118
+ data: ErrorResponse;
156
119
  status: Exclude<HTTPStatusCodes, 200>;
157
120
  };
158
- export type getBindingResponseSuccess = getBindingResponse200 & {
121
+ export type updateThreadResponseSuccess = updateThreadResponse200 & {
159
122
  headers: Headers;
160
123
  };
161
- export type getBindingResponseError = getBindingResponseDefault & {
124
+ export type updateThreadResponseError = updateThreadResponseDefault & {
162
125
  headers: Headers;
163
126
  };
164
- export type getBindingResponse = getBindingResponseSuccess | getBindingResponseError;
165
- export declare const getGetBindingUrl: (binding: string) => string;
127
+ export type updateThreadResponse = updateThreadResponseSuccess | updateThreadResponseError;
128
+ export declare const getUpdateThreadUrl: (thread: string) => string;
166
129
  /**
167
- * @summary Get a binding
130
+ * Changes the title, model, reasoning effort, approval mode, or whether the conversation is
131
+ * archived. Omitted fields stay as they are.
132
+ *
133
+ * Model, reasoning and approval changes apply to the next model request; a request already in
134
+ * flight keeps its settings. A model that cannot run an agent fails with 422 and code
135
+ * MODEL_UNAVAILABLE. Switching to a model without reasoning clears `reasoningEffort`.
136
+ *
137
+ * Archiving makes the conversation read-only and fails with 409 and code THREAD_RUNNING while a
138
+ * turn is running.
139
+ * @summary Update a conversation
168
140
  */
169
- export declare const getBinding: (binding: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<getBindingResponse>;
170
- export type deleteBindingResponse204 = {
141
+ export declare const updateThread: (thread: string, updateThreadRequestBody: UpdateThreadRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<updateThreadResponse>;
142
+ export type deleteThreadResponse204 = {
171
143
  data: void;
172
144
  status: 204;
173
145
  };
174
- export type deleteBindingResponseDefault = {
175
- data: Error;
146
+ export type deleteThreadResponseDefault = {
147
+ data: ErrorResponse;
176
148
  status: Exclude<HTTPStatusCodes, 204>;
177
149
  };
178
- export type deleteBindingResponseSuccess = deleteBindingResponse204 & {
150
+ export type deleteThreadResponseSuccess = deleteThreadResponse204 & {
179
151
  headers: Headers;
180
152
  };
181
- export type deleteBindingResponseError = deleteBindingResponseDefault & {
153
+ export type deleteThreadResponseError = deleteThreadResponseDefault & {
182
154
  headers: Headers;
183
155
  };
184
- export type deleteBindingResponse = deleteBindingResponseSuccess | deleteBindingResponseError;
185
- export declare const getDeleteBindingUrl: (binding: string) => string;
156
+ export type deleteThreadResponse = deleteThreadResponseSuccess | deleteThreadResponseError;
157
+ export declare const getDeleteThreadUrl: (thread: string) => string;
186
158
  /**
187
- * @summary Remove a binding
159
+ * Removes the conversation and its subagents from every list and makes them unreachable by id,
160
+ * including for the assistant. Deleting cannot be undone; archive instead to keep it readable.
161
+ *
162
+ * Fails with 409 and code THREAD_RUNNING while a turn is running. Deleting an already deleted
163
+ * conversation succeeds.
164
+ * @summary Delete a conversation
188
165
  */
189
- export declare const deleteBinding: (binding: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<deleteBindingResponse>;
190
- export type listChannelsResponse200 = {
191
- data: LengthAwarePageChannelResource;
192
- status: 200;
166
+ export declare const deleteThread: (thread: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<deleteThreadResponse>;
167
+ export type interruptThreadResponse204 = {
168
+ data: void;
169
+ status: 204;
193
170
  };
194
- export type listChannelsResponseDefault = {
195
- data: Error;
196
- status: Exclude<HTTPStatusCodes, 200>;
171
+ export type interruptThreadResponseDefault = {
172
+ data: ErrorResponse;
173
+ status: Exclude<HTTPStatusCodes, 204>;
197
174
  };
198
- export type listChannelsResponseSuccess = listChannelsResponse200 & {
175
+ export type interruptThreadResponseSuccess = interruptThreadResponse204 & {
199
176
  headers: Headers;
200
177
  };
201
- export type listChannelsResponseError = listChannelsResponseDefault & {
178
+ export type interruptThreadResponseError = interruptThreadResponseDefault & {
202
179
  headers: Headers;
203
180
  };
204
- export type listChannelsResponse = listChannelsResponseSuccess | listChannelsResponseError;
205
- export declare const getListChannelsUrl: (params?: ListChannelsParams) => string;
181
+ export type interruptThreadResponse = interruptThreadResponseSuccess | interruptThreadResponseError;
182
+ export declare const getInterruptThreadUrl: (thread: string) => string;
206
183
  /**
207
- * @summary List channels
184
+ * Stops this conversation's running turn and discards its queued messages. Subagents keep
185
+ * running; stop them through their own conversations.
186
+ *
187
+ * Succeeds when nothing is running, because pressing stop races with the turn finishing on its
188
+ * own. Available while the project is suspended or being cleaned up.
189
+ * @summary Stop the running turn
208
190
  */
209
- export declare const listChannels: (params?: ListChannelsParams, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<listChannelsResponse>;
210
- export type createChannelResponse201 = {
211
- data: ChannelWithSecretResponseBody;
212
- status: 201;
191
+ export declare const interruptThread: (thread: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<interruptThreadResponse>;
192
+ export type resumeThreadResponse202 = {
193
+ data: TurnStartedResponseBody;
194
+ status: 202;
213
195
  };
214
- export type createChannelResponseDefault = {
215
- data: Error;
216
- status: Exclude<HTTPStatusCodes, 201>;
196
+ export type resumeThreadResponseDefault = {
197
+ data: ErrorResponse;
198
+ status: Exclude<HTTPStatusCodes, 202>;
217
199
  };
218
- export type createChannelResponseSuccess = createChannelResponse201 & {
200
+ export type resumeThreadResponseSuccess = resumeThreadResponse202 & {
219
201
  headers: Headers;
220
202
  };
221
- export type createChannelResponseError = createChannelResponseDefault & {
203
+ export type resumeThreadResponseError = resumeThreadResponseDefault & {
222
204
  headers: Headers;
223
205
  };
224
- export type createChannelResponse = createChannelResponseSuccess | createChannelResponseError;
225
- export declare const getCreateChannelUrl: () => string;
206
+ export type resumeThreadResponse = resumeThreadResponseSuccess | resumeThreadResponseError;
207
+ export declare const getResumeThreadUrl: (thread: string) => string;
226
208
  /**
227
- * Which side owns the webhook secret is decided by the platform; see secretSource on list-platforms. For a `generated` platform, do not send webhookSecret — the one we generate is returned exactly once in this response and cannot be retrieved again; miss it and the only way forward is rotating to a new one. For a `supplied` platform you must pass the secret from that platform's own console, and webhookSecret in the response is null.
228
- * @summary Create a channel
209
+ * Starts a new turn that continues from where the conversation stopped, for example after it
210
+ * was interrupted or failed. An optional message is added first.
211
+ *
212
+ * Fails with 409 and code THREAD_RUNNING while a turn is running.
213
+ * @summary Resume a stopped conversation
229
214
  */
230
- export declare const createChannel: (createChannelRequestBody: CreateChannelRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<createChannelResponse>;
231
- export type getChannelResponse200 = {
232
- data: ChannelResource;
233
- status: 200;
215
+ export declare const resumeThread: (thread: string, resumeThreadRequestBody: ResumeThreadRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<resumeThreadResponse>;
216
+ export type compactThreadResponse202 = {
217
+ data: TurnStartedResponseBody;
218
+ status: 202;
234
219
  };
235
- export type getChannelResponseDefault = {
236
- data: Error;
237
- status: Exclude<HTTPStatusCodes, 200>;
220
+ export type compactThreadResponseDefault = {
221
+ data: ErrorResponse;
222
+ status: Exclude<HTTPStatusCodes, 202>;
238
223
  };
239
- export type getChannelResponseSuccess = getChannelResponse200 & {
224
+ export type compactThreadResponseSuccess = compactThreadResponse202 & {
240
225
  headers: Headers;
241
226
  };
242
- export type getChannelResponseError = getChannelResponseDefault & {
227
+ export type compactThreadResponseError = compactThreadResponseDefault & {
243
228
  headers: Headers;
244
229
  };
245
- export type getChannelResponse = getChannelResponseSuccess | getChannelResponseError;
246
- export declare const getGetChannelUrl: (channel: string) => string;
230
+ export type compactThreadResponse = compactThreadResponseSuccess | compactThreadResponseError;
231
+ export declare const getCompactThreadUrl: (thread: string) => string;
247
232
  /**
248
- * @summary Get a channel
233
+ * Starts a compaction turn that summarizes the history before the latest user message, the same
234
+ * way the service does automatically when the context window fills up. The result appears in the
235
+ * transcript as a `compaction` item and the turn reports its own token usage.
236
+ *
237
+ * Fails with 409 and code THREAD_RUNNING while a turn is running, and with 409 and code
238
+ * NOTHING_TO_COMPACT when there is no history to summarize.
239
+ * @summary Compact the conversation now
249
240
  */
250
- export declare const getChannel: (channel: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<getChannelResponse>;
251
- export type updateChannelResponse200 = {
252
- data: ChannelResource;
241
+ export declare const compactThread: (thread: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<compactThreadResponse>;
242
+ export type revertThreadResponse200 = {
243
+ data: RevertedCountResponseBody;
253
244
  status: 200;
254
245
  };
255
- export type updateChannelResponseDefault = {
256
- data: Error;
246
+ export type revertThreadResponseDefault = {
247
+ data: ErrorResponse;
257
248
  status: Exclude<HTTPStatusCodes, 200>;
258
249
  };
259
- export type updateChannelResponseSuccess = updateChannelResponse200 & {
250
+ export type revertThreadResponseSuccess = revertThreadResponse200 & {
260
251
  headers: Headers;
261
252
  };
262
- export type updateChannelResponseError = updateChannelResponseDefault & {
253
+ export type revertThreadResponseError = revertThreadResponseDefault & {
263
254
  headers: Headers;
264
255
  };
265
- export type updateChannelResponse = updateChannelResponseSuccess | updateChannelResponseError;
266
- export declare const getUpdateChannelUrl: (channel: string) => string;
256
+ export type revertThreadResponse = revertThreadResponseSuccess | revertThreadResponseError;
257
+ export declare const getRevertThreadUrl: (thread: string) => string;
267
258
  /**
268
- * Only the fields present are changed. senderPolicy and allowFrom go together, and senderPolicy decides whether they are replaced. For platforms held open by a long-lived connection the change applies once that connection is rebuilt; for webhook platforms it applies at once.
269
- * @summary Update a channel
259
+ * Reverts the item at `ordinal` and everything after it. Reverted items stay in the transcript
260
+ * marked `reverted` and are left out of later model requests; ordinals are not renumbered.
261
+ * Executed tools and external changes are not undone. Returns how many items were reverted.
262
+ * @summary Revert from a given point
270
263
  */
271
- export declare const updateChannel: (channel: string, updateChannelRequestBody: UpdateChannelRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<updateChannelResponse>;
272
- export type deleteChannelResponse204 = {
264
+ export declare const revertThread: (thread: string, revertRequestBody: RevertRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<revertThreadResponse>;
265
+ export type markThreadReadResponse204 = {
273
266
  data: void;
274
267
  status: 204;
275
268
  };
276
- export type deleteChannelResponseDefault = {
277
- data: Error;
269
+ export type markThreadReadResponseDefault = {
270
+ data: ErrorResponse;
278
271
  status: Exclude<HTTPStatusCodes, 204>;
279
272
  };
280
- export type deleteChannelResponseSuccess = deleteChannelResponse204 & {
273
+ export type markThreadReadResponseSuccess = markThreadReadResponse204 & {
281
274
  headers: Headers;
282
275
  };
283
- export type deleteChannelResponseError = deleteChannelResponseDefault & {
276
+ export type markThreadReadResponseError = markThreadReadResponseDefault & {
284
277
  headers: Headers;
285
278
  };
286
- export type deleteChannelResponse = deleteChannelResponseSuccess | deleteChannelResponseError;
287
- export declare const getDeleteChannelUrl: (channel: string) => string;
279
+ export type markThreadReadResponse = markThreadReadResponseSuccess | markThreadReadResponseError;
280
+ export declare const getMarkThreadReadUrl: (thread: string) => string;
288
281
  /**
289
- * The channel stops accepting inbound messages and every binding on it stops working. This operation remains available while the project is suspended or being cleaned up.
290
- * @summary Delete a channel
282
+ * Clears `unread` until the assistant replies again.
283
+ * @summary Mark a conversation as read
291
284
  */
292
- export declare const deleteChannel: (channel: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<deleteChannelResponse>;
293
- export type createBindingCodeResponse201 = {
294
- data: BindingCodeResponseBody;
295
- status: 201;
285
+ export declare const markThreadRead: (thread: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<markThreadReadResponse>;
286
+ export type listThreadItemsResponse200 = {
287
+ data: ThreadItemListResponseBody;
288
+ status: 200;
296
289
  };
297
- export type createBindingCodeResponseDefault = {
298
- data: Error;
299
- status: Exclude<HTTPStatusCodes, 201>;
290
+ export type listThreadItemsResponseDefault = {
291
+ data: ErrorResponse;
292
+ status: Exclude<HTTPStatusCodes, 200>;
300
293
  };
301
- export type createBindingCodeResponseSuccess = createBindingCodeResponse201 & {
294
+ export type listThreadItemsResponseSuccess = listThreadItemsResponse200 & {
302
295
  headers: Headers;
303
296
  };
304
- export type createBindingCodeResponseError = createBindingCodeResponseDefault & {
297
+ export type listThreadItemsResponseError = listThreadItemsResponseDefault & {
305
298
  headers: Headers;
306
299
  };
307
- export type createBindingCodeResponse = createBindingCodeResponseSuccess | createBindingCodeResponseError;
308
- export declare const getCreateBindingCodeUrl: (channel: string) => string;
300
+ export type listThreadItemsResponse = listThreadItemsResponseSuccess | listThreadItemsResponseError;
301
+ export declare const getListThreadItemsUrl: (thread: string, params?: ListThreadItemsParams) => string;
309
302
  /**
310
- * Produces a single-use code to hand to the person being bound. They send that code to the assistant from their own account on that platform, which completes the binding. A binding can only be established this way, by the person themselves — a platform account cannot be named directly. Codes expire and have to be reissued.
311
- * @summary Issue a binding code
303
+ * A window of the conversation's transcript, oldest first: messages, reasoning, tool calls and
304
+ * compaction markers. A window holds whole turns, so a turn's messages and tool calls arrive
305
+ * together; a single turn larger than the size limit is split across windows.
306
+ *
307
+ * Without a position the window ends at the latest item. `before` reads the window above an
308
+ * ordinal and `after` the window below it; pass `startOrdinal` and `endOrdinal` from the response.
309
+ * `around` opens a window that contains an ordinal, for jumping to a turn from list-thread-turns or
310
+ * to a search result.
311
+ *
312
+ * Long reasoning and tool arguments are cut to a preview and marked `truncated`; read the item for
313
+ * all of it. Messages are never cut.
314
+ *
315
+ * When the window reaches the end, `queued` holds the messages waiting for the assistant and
316
+ * `streamCursor` is set: subscribe to `thread:{id}` on /api/v1/realtime from it to follow what is
317
+ * written next.
318
+ * @summary List transcript items
312
319
  */
313
- export declare const createBindingCode: (channel: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<createBindingCodeResponse>;
314
- export type listChannelRejectionsResponse200 = {
315
- data: RejectionListResponseBody;
320
+ export declare const listThreadItems: (thread: string, params?: ListThreadItemsParams, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<listThreadItemsResponse>;
321
+ export type getThreadItemResponse200 = {
322
+ data: ThreadItemResource;
316
323
  status: 200;
317
324
  };
318
- export type listChannelRejectionsResponseDefault = {
319
- data: Error;
325
+ export type getThreadItemResponseDefault = {
326
+ data: ErrorResponse;
320
327
  status: Exclude<HTTPStatusCodes, 200>;
321
328
  };
322
- export type listChannelRejectionsResponseSuccess = listChannelRejectionsResponse200 & {
329
+ export type getThreadItemResponseSuccess = getThreadItemResponse200 & {
323
330
  headers: Headers;
324
331
  };
325
- export type listChannelRejectionsResponseError = listChannelRejectionsResponseDefault & {
332
+ export type getThreadItemResponseError = getThreadItemResponseDefault & {
326
333
  headers: Headers;
327
334
  };
328
- export type listChannelRejectionsResponse = listChannelRejectionsResponseSuccess | listChannelRejectionsResponseError;
329
- export declare const getListChannelRejectionsUrl: (channel: string, params?: ListChannelRejectionsParams) => string;
335
+ export type getThreadItemResponse = getThreadItemResponseSuccess | getThreadItemResponseError;
336
+ export declare const getGetThreadItemUrl: (thread: string, item: string) => string;
330
337
  /**
331
- * For diagnosing "I sent a message and the assistant never answered". Returns the inbound messages this channel rejected most recently, newest first, each with its reason. The most common reason is that the sender is not bound yet.
332
- * @summary List recently rejected inbound messages
338
+ * One item in full, including what list-thread-items cut from it.
339
+ * @summary Get a transcript item
333
340
  */
334
- export declare const listChannelRejections: (channel: string, params?: ListChannelRejectionsParams, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<listChannelRejectionsResponse>;
335
- export type rotateChannelSecretResponse200 = {
336
- data: WebhookSecretResponseBody;
337
- status: 200;
341
+ export declare const getThreadItem: (thread: string, item: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<getThreadItemResponse>;
342
+ export type sendMessageResponse202 = {
343
+ data: SendMessageResponseBody;
344
+ status: 202;
338
345
  };
339
- export type rotateChannelSecretResponseDefault = {
340
- data: Error;
341
- status: Exclude<HTTPStatusCodes, 200>;
346
+ export type sendMessageResponseDefault = {
347
+ data: ErrorResponse;
348
+ status: Exclude<HTTPStatusCodes, 202>;
342
349
  };
343
- export type rotateChannelSecretResponseSuccess = rotateChannelSecretResponse200 & {
350
+ export type sendMessageResponseSuccess = sendMessageResponse202 & {
344
351
  headers: Headers;
345
352
  };
346
- export type rotateChannelSecretResponseError = rotateChannelSecretResponseDefault & {
353
+ export type sendMessageResponseError = sendMessageResponseDefault & {
347
354
  headers: Headers;
348
355
  };
349
- export type rotateChannelSecretResponse = rotateChannelSecretResponseSuccess | rotateChannelSecretResponseError;
350
- export declare const getRotateChannelSecretUrl: (channel: string) => string;
356
+ export type sendMessageResponse = sendMessageResponseSuccess | sendMessageResponseError;
357
+ export declare const getSendMessageUrl: (thread: string) => string;
351
358
  /**
352
- * Replaces the webhook secret. The old one stops working immediately and the channel drops back to awaiting confirmation from the platform. Which side owns the secret is decided by the platform; see secretSource on list-platforms. For a `generated` platform, send no body — the new secret is returned in this response only and cannot be retrieved again. For a `supplied` platform you must pass the new secret from that platform's own console.
353
- * @summary Rotate the webhook secret
359
+ * Starts a turn and returns at once; a turn can run for tens of minutes and its progress arrives
360
+ * on /api/v1/realtime. Sending while the assistant is working is allowed: the message is queued
361
+ * and read at the next step of the running turn, and `queued` is true.
362
+ *
363
+ * Fails with 409 and code THREAD_ARCHIVED for an archived conversation.
364
+ * @summary Send a message
354
365
  */
355
- export declare const rotateChannelSecret: (channel: string, rotateSecretRequestBody?: RotateSecretRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<rotateChannelSecretResponse>;
356
- export type checkSenderResponse200 = {
357
- data: SenderCheckResource;
358
- status: 200;
366
+ export declare const sendMessage: (thread: string, sendMessageRequestBody: SendMessageRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<sendMessageResponse>;
367
+ export type decideToolCallsResponse204 = {
368
+ data: void;
369
+ status: 204;
359
370
  };
360
- export type checkSenderResponseDefault = {
361
- data: Error;
362
- status: Exclude<HTTPStatusCodes, 200>;
371
+ export type decideToolCallsResponseDefault = {
372
+ data: ErrorResponse;
373
+ status: Exclude<HTTPStatusCodes, 204>;
363
374
  };
364
- export type checkSenderResponseSuccess = checkSenderResponse200 & {
375
+ export type decideToolCallsResponseSuccess = decideToolCallsResponse204 & {
365
376
  headers: Headers;
366
377
  };
367
- export type checkSenderResponseError = checkSenderResponseDefault & {
378
+ export type decideToolCallsResponseError = decideToolCallsResponseDefault & {
368
379
  headers: Headers;
369
380
  };
370
- export type checkSenderResponse = checkSenderResponseSuccess | checkSenderResponseError;
371
- export declare const getCheckSenderUrl: (channel: string, params: CheckSenderParams) => string;
381
+ export type decideToolCallsResponse = decideToolCallsResponseSuccess | decideToolCallsResponseError;
382
+ export declare const getDecideToolCallsUrl: (thread: string) => string;
372
383
  /**
373
- * For checking a sender policy after changing it. Sends nothing and changes nothing: it runs exactly the same decision a real inbound message goes through, and says which rule produced the answer. The binding-code rule cannot be tested this way — whether something is a binding code depends on what the sender actually wrote.
374
- * @summary Test whether a sender would be let through
384
+ * Decides the tool calls the conversation is waiting on, listed in `pendingAction.itemIds`. One
385
+ * decision applies to the whole batch, so `itemIds` must name exactly the calls awaiting approval.
386
+ *
387
+ * Repeating a decision that is already in effect succeeds. Fails with 409 and code
388
+ * APPROVAL_MISMATCH when `itemIds` is not the current batch, for example because another tab
389
+ * decided first and the assistant has moved on.
390
+ * @summary Approve or decline tool calls
375
391
  */
376
- export declare const checkSender: (channel: string, params: CheckSenderParams, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<checkSenderResponse>;
377
- export type beginWeixinLoginResponse201 = {
378
- data: LoginResource;
379
- status: 201;
392
+ export declare const decideToolCalls: (thread: string, decideToolCallsRequestBody: DecideToolCallsRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<decideToolCallsResponse>;
393
+ export type answerQuestionResponse204 = {
394
+ data: void;
395
+ status: 204;
380
396
  };
381
- export type beginWeixinLoginResponseDefault = {
382
- data: Error;
383
- status: Exclude<HTTPStatusCodes, 201>;
397
+ export type answerQuestionResponseDefault = {
398
+ data: ErrorResponse;
399
+ status: Exclude<HTTPStatusCodes, 204>;
384
400
  };
385
- export type beginWeixinLoginResponseSuccess = beginWeixinLoginResponse201 & {
401
+ export type answerQuestionResponseSuccess = answerQuestionResponse204 & {
386
402
  headers: Headers;
387
403
  };
388
- export type beginWeixinLoginResponseError = beginWeixinLoginResponseDefault & {
404
+ export type answerQuestionResponseError = answerQuestionResponseDefault & {
389
405
  headers: Headers;
390
406
  };
391
- export type beginWeixinLoginResponse = beginWeixinLoginResponseSuccess | beginWeixinLoginResponseError;
392
- export declare const getBeginWeixinLoginUrl: (channel: string) => string;
407
+ export type answerQuestionResponse = answerQuestionResponseSuccess | answerQuestionResponseError;
408
+ export declare const getAnswerQuestionUrl: (thread: string, item: string) => string;
393
409
  /**
394
- * A personal WeChat channel can only send and receive once its owner has signed in by scanning a QR code. This returns that code; poll `GET /v1/weixin-logins/{login}` for progress, and when the status asks for a verification code, submit it with `POST /v1/weixin-logins/{login}/verify-code`.
395
- * @summary Begin a WeChat QR login
410
+ * Answers an `ask` tool call. Its questions are in the item's `questions`. An item that is already
411
+ * answered also succeeds: another tab may have answered first, or the auto-answer window may have
412
+ * passed, and either way the turn has continued.
413
+ * @summary Answer the assistant's questions
396
414
  */
397
- export declare const beginWeixinLogin: (channel: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<beginWeixinLoginResponse>;
398
- export type listPlatformsResponse200 = {
399
- data: PlatformListResponseBody;
400
- status: 200;
415
+ export declare const answerQuestion: (thread: string, item: string, answerQuestionRequestBody: AnswerQuestionRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<answerQuestionResponse>;
416
+ export type submitToolResultResponse204 = {
417
+ data: void;
418
+ status: 204;
401
419
  };
402
- export type listPlatformsResponseDefault = {
403
- data: Error;
404
- status: Exclude<HTTPStatusCodes, 200>;
420
+ export type submitToolResultResponseDefault = {
421
+ data: ErrorResponse;
422
+ status: Exclude<HTTPStatusCodes, 204>;
405
423
  };
406
- export type listPlatformsResponseSuccess = listPlatformsResponse200 & {
424
+ export type submitToolResultResponseSuccess = submitToolResultResponse204 & {
407
425
  headers: Headers;
408
426
  };
409
- export type listPlatformsResponseError = listPlatformsResponseDefault & {
427
+ export type submitToolResultResponseError = submitToolResultResponseDefault & {
410
428
  headers: Headers;
411
429
  };
412
- export type listPlatformsResponse = listPlatformsResponseSuccess | listPlatformsResponseError;
413
- export declare const getListPlatformsUrl: () => string;
430
+ export type submitToolResultResponse = submitToolResultResponseSuccess | submitToolResultResponseError;
431
+ export declare const getSubmitToolResultUrl: (thread: string, item: string) => string;
414
432
  /**
415
- * The instant messaging platforms that can currently be connected, along with the flow and the credential fields each one needs. The create-channel form is driven entirely by this response: setupMethod decides between a credential form and a QR flow, credentialFields is what to ask for, and secretSource decides whether there is a webhook secret field at all.
416
- * @summary List platforms that can be connected
433
+ * The assistant asks the client to run one of the actions it declared by writing a tool call with
434
+ * the namespace `client`; the client runs it when the item turns in_progress and reports here.
435
+ *
436
+ * The first result counts. A later one fails with 409 and code RESULT_ALREADY_SUBMITTED.
437
+ * @summary Report what a client tool produced
417
438
  */
418
- export declare const listPlatforms: (options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<listPlatformsResponse>;
419
- export type getWeixinLoginResponse200 = {
420
- data: LoginResource;
439
+ export declare const submitToolResult: (thread: string, item: string, toolResultRequestBody: ToolResultRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<submitToolResultResponse>;
440
+ export type listThreadTurnsResponse200 = {
441
+ data: ThreadTurnListResponseBody;
421
442
  status: 200;
422
443
  };
423
- export type getWeixinLoginResponseDefault = {
424
- data: Error;
444
+ export type listThreadTurnsResponseDefault = {
445
+ data: ErrorResponse;
425
446
  status: Exclude<HTTPStatusCodes, 200>;
426
447
  };
427
- export type getWeixinLoginResponseSuccess = getWeixinLoginResponse200 & {
448
+ export type listThreadTurnsResponseSuccess = listThreadTurnsResponse200 & {
428
449
  headers: Headers;
429
450
  };
430
- export type getWeixinLoginResponseError = getWeixinLoginResponseDefault & {
451
+ export type listThreadTurnsResponseError = listThreadTurnsResponseDefault & {
431
452
  headers: Headers;
432
453
  };
433
- export type getWeixinLoginResponse = getWeixinLoginResponseSuccess | getWeixinLoginResponseError;
434
- export declare const getGetWeixinLoginUrl: (login: string) => string;
454
+ export type listThreadTurnsResponse = listThreadTurnsResponseSuccess | listThreadTurnsResponseError;
455
+ export declare const getListThreadTurnsUrl: (thread: string, params?: ListThreadTurnsParams) => string;
435
456
  /**
436
- * Poll this until the status is success or failure. When the status asks for a verification code, submit it with the verification-code operation.
437
- * @summary Get the state of a QR login
457
+ * The conversation's turns, newest first, each with the model and reasoning effort it ran with,
458
+ * how long it took and the tokens it used. Cache hit rate is `cachedInputTokens / inputTokens`.
459
+ *
460
+ * Each turn names the ordinals it wrote and the message that started it, so a client can draw a
461
+ * timeline from this list and open a turn with list-thread-items `around`.
462
+ *
463
+ * `ids` reads the turns behind a page of transcript items in one request and cannot be combined
464
+ * with a cursor.
465
+ * @summary List turns
438
466
  */
439
- export declare const getWeixinLogin: (login: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<getWeixinLoginResponse>;
440
- export type submitWeixinVerifyCodeResponse200 = {
441
- data: LoginResource;
467
+ export declare const listThreadTurns: (thread: string, params?: ListThreadTurnsParams, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<listThreadTurnsResponse>;
468
+ export type listCommandsResponse200 = {
469
+ data: CommandListResponseBody;
442
470
  status: 200;
443
471
  };
444
- export type submitWeixinVerifyCodeResponseDefault = {
445
- data: Error;
472
+ export type listCommandsResponseDefault = {
473
+ data: ErrorResponse;
446
474
  status: Exclude<HTTPStatusCodes, 200>;
447
475
  };
448
- export type submitWeixinVerifyCodeResponseSuccess = submitWeixinVerifyCodeResponse200 & {
476
+ export type listCommandsResponseSuccess = listCommandsResponse200 & {
449
477
  headers: Headers;
450
478
  };
451
- export type submitWeixinVerifyCodeResponseError = submitWeixinVerifyCodeResponseDefault & {
479
+ export type listCommandsResponseError = listCommandsResponseDefault & {
452
480
  headers: Headers;
453
481
  };
454
- export type submitWeixinVerifyCodeResponse = submitWeixinVerifyCodeResponseSuccess | submitWeixinVerifyCodeResponseError;
455
- export declare const getSubmitWeixinVerifyCodeUrl: (login: string) => string;
482
+ export type listCommandsResponse = listCommandsResponseSuccess | listCommandsResponseError;
483
+ export declare const getListCommandsUrl: () => string;
456
484
  /**
457
- * For when WeChat asks for an SMS or device code after the scan. The person who started the login gets that code on their own phone.
458
- * @summary Submit a login verification code
485
+ * The slash commands a person can type in a conversation, such as /status or /compact. The same
486
+ * commands work in the console and in chat apps, so a client builds its command menu from this
487
+ * list.
488
+ * @summary List commands
459
489
  */
460
- export declare const submitWeixinVerifyCode: (login: string, verifyCodeRequestBody: VerifyCodeRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<submitWeixinVerifyCodeResponse>;
461
- export type submitDynamicCallResultResponse204 = {
462
- data: void;
463
- status: 204;
490
+ export declare const listCommands: (options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<listCommandsResponse>;
491
+ export type runCommandResponse200 = {
492
+ data: CommandResultResource;
493
+ status: 200;
464
494
  };
465
- export type submitDynamicCallResultResponseDefault = {
466
- data: Error;
467
- status: Exclude<HTTPStatusCodes, 204>;
495
+ export type runCommandResponseDefault = {
496
+ data: ErrorResponse;
497
+ status: Exclude<HTTPStatusCodes, 200>;
468
498
  };
469
- export type submitDynamicCallResultResponseSuccess = submitDynamicCallResultResponse204 & {
499
+ export type runCommandResponseSuccess = runCommandResponse200 & {
470
500
  headers: Headers;
471
501
  };
472
- export type submitDynamicCallResultResponseError = submitDynamicCallResultResponseDefault & {
502
+ export type runCommandResponseError = runCommandResponseDefault & {
473
503
  headers: Headers;
474
504
  };
475
- export type submitDynamicCallResultResponse = submitDynamicCallResultResponseSuccess | submitDynamicCallResultResponseError;
476
- export declare const getSubmitDynamicCallResultUrl: (call: string) => string;
505
+ export type runCommandResponse = runCommandResponseSuccess | runCommandResponseError;
506
+ export declare const getRunCommandUrl: (thread: string) => string;
477
507
  /**
478
- * The assistant asks the client to run an action by adding a tool call to the conversation
479
- * with the namespace `dynamic`; the client acts when that entry turns in_progress and reports
480
- * back here.
508
+ * Runs a slash command against the conversation. Commands act directly and never reach the model.
509
+ * The result carries a plain-text `message`, which is what a chat app shows, and structured fields
510
+ * for clients that render more, such as `status` for /status.
481
511
  *
482
- * The first result is the one that counts. A later one is refused rather than replacing it.
483
- * @summary Report what an action produced
512
+ * /new is carried out by the client, which opens an empty conversation, and fails here with 422
513
+ * and code COMMAND_CLIENT_ONLY. Fails with 404 and code COMMAND_NOT_FOUND for an unknown command,
514
+ * and with 422 and code COMMAND_ARGUMENTS_INVALID when the arguments do not fit.
515
+ * @summary Run a command
484
516
  */
485
- export declare const submitDynamicCallResult: (call: string, dynamicCallResultRequestBody: DynamicCallResultRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<submitDynamicCallResultResponse>;
517
+ export declare const runCommand: (thread: string, runCommandRequestBody: RunCommandRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<runCommandResponse>;
486
518
  export type listFoldersResponse200 = {
487
519
  data: FolderListResponseBody;
488
520
  status: 200;
489
521
  };
490
522
  export type listFoldersResponseDefault = {
491
- data: Error;
523
+ data: ErrorResponse;
492
524
  status: Exclude<HTTPStatusCodes, 200>;
493
525
  };
494
526
  export type listFoldersResponseSuccess = listFoldersResponse200 & {
@@ -500,7 +532,9 @@ export type listFoldersResponseError = listFoldersResponseDefault & {
500
532
  export type listFoldersResponse = listFoldersResponseSuccess | listFoldersResponseError;
501
533
  export declare const getListFoldersUrl: () => string;
502
534
  /**
503
- * The current account's folders in this project, oldest first. That order is fixed and does not react to what happens inside a folder: a folder is a place on the screen, and a place that moves whenever something is put into it is not one anybody can aim at. Not paginated — there is a cap on how many there can be, and all of them come back at once.
535
+ * The caller's folders in this project in their own order, inbox first. Every conversation is in
536
+ * exactly one folder; the inbox holds the ones nobody filed. Not paginated: the number of folders
537
+ * is capped and all of them come back at once.
504
538
  * @summary List folders
505
539
  */
506
540
  export declare const listFolders: (options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<listFoldersResponse>;
@@ -509,7 +543,7 @@ export type createFolderResponse201 = {
509
543
  status: 201;
510
544
  };
511
545
  export type createFolderResponseDefault = {
512
- data: Error;
546
+ data: ErrorResponse;
513
547
  status: Exclude<HTTPStatusCodes, 201>;
514
548
  };
515
549
  export type createFolderResponseSuccess = createFolderResponse201 & {
@@ -521,9 +555,11 @@ export type createFolderResponseError = createFolderResponseDefault & {
521
555
  export type createFolderResponse = createFolderResponseSuccess | createFolderResponseError;
522
556
  export declare const getCreateFolderUrl: () => string;
523
557
  /**
524
- * A folder groups conversations in the sidebar and does nothing else. The assistant is never told which folder a conversation is in, and a conversation behaves exactly the same inside one as outside: no shared instructions, no shared files, no shared memory.
558
+ * A folder groups conversations on the board and does nothing else: the assistant is never told
559
+ * which folder a conversation is in. New folders go after the existing ones.
525
560
  *
526
- * Names are unique within an account's folders in this project, because the only way to aim at a folder is to read its name.
561
+ * Names are unique among the caller's folders in this project; a duplicate fails with 409 and
562
+ * code FOLDER_EXISTS.
527
563
  * @summary Create a folder
528
564
  */
529
565
  export declare const createFolder: (createFolderRequestBody: CreateFolderRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<createFolderResponse>;
@@ -532,7 +568,7 @@ export type getFolderResponse200 = {
532
568
  status: 200;
533
569
  };
534
570
  export type getFolderResponseDefault = {
535
- data: Error;
571
+ data: ErrorResponse;
536
572
  status: Exclude<HTTPStatusCodes, 200>;
537
573
  };
538
574
  export type getFolderResponseSuccess = getFolderResponse200 & {
@@ -544,8 +580,8 @@ export type getFolderResponseError = getFolderResponseDefault & {
544
580
  export type getFolderResponse = getFolderResponseSuccess | getFolderResponseError;
545
581
  export declare const getGetFolderUrl: (folder: string) => string;
546
582
  /**
547
- * The list returns every folder at once, so this is for the case the list does not cover: a page opened straight at a folder, holding nothing but the id from the address bar. Its conversations are a separate request — `GET /api/v1/threads?folder=<id>`.
548
- * @summary Fetch one folder
583
+ * Its conversations are read with search-threads and `folderId`.
584
+ * @summary Get a folder
549
585
  */
550
586
  export declare const getFolder: (folder: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<getFolderResponse>;
551
587
  export type updateFolderResponse200 = {
@@ -553,7 +589,7 @@ export type updateFolderResponse200 = {
553
589
  status: 200;
554
590
  };
555
591
  export type updateFolderResponseDefault = {
556
- data: Error;
592
+ data: ErrorResponse;
557
593
  status: Exclude<HTTPStatusCodes, 200>;
558
594
  };
559
595
  export type updateFolderResponseSuccess = updateFolderResponse200 & {
@@ -565,7 +601,7 @@ export type updateFolderResponseError = updateFolderResponseDefault & {
565
601
  export type updateFolderResponse = updateFolderResponseSuccess | updateFolderResponseError;
566
602
  export declare const getUpdateFolderUrl: (folder: string) => string;
567
603
  /**
568
- * The conversations in it are untouched, and none of them move in the list — a folder's name is not part of what any conversation is about.
604
+ * The inbox cannot be renamed and fails with 409 and code INBOX_READ_ONLY.
569
605
  * @summary Rename a folder
570
606
  */
571
607
  export declare const updateFolder: (folder: string, updateFolderRequestBody: UpdateFolderRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<updateFolderResponse>;
@@ -574,7 +610,7 @@ export type deleteFolderResponse204 = {
574
610
  status: 204;
575
611
  };
576
612
  export type deleteFolderResponseDefault = {
577
- data: Error;
613
+ data: ErrorResponse;
578
614
  status: Exclude<HTTPStatusCodes, 204>;
579
615
  };
580
616
  export type deleteFolderResponseSuccess = deleteFolderResponse204 & {
@@ -586,438 +622,1122 @@ export type deleteFolderResponseError = deleteFolderResponseDefault & {
586
622
  export type deleteFolderResponse = deleteFolderResponseSuccess | deleteFolderResponseError;
587
623
  export declare const getDeleteFolderUrl: (folder: string) => string;
588
624
  /**
589
- * The conversations inside are **not** deleted. They leave the folder and go back to the ungrouped list, where they can be filed again. Emptying a shelf is not the same as throwing out what was on it, and deleting a conversation is a different request.
590
- *
591
- * Idempotent: deleting a folder that is already gone succeeds and changes nothing.
625
+ * The conversations inside are not deleted; they move to the end of the inbox. The inbox cannot
626
+ * be deleted and fails with 409 and code INBOX_READ_ONLY. Deleting a folder that is already gone
627
+ * succeeds.
592
628
  * @summary Delete a folder
593
629
  */
594
630
  export declare const deleteFolder: (folder: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<deleteFolderResponse>;
595
- export type listMemoriesResponse200 = {
596
- data: MemoryListResponseBody;
631
+ export type moveFolderResponse200 = {
632
+ data: FolderResource;
597
633
  status: 200;
598
634
  };
599
- export type listMemoriesResponseDefault = {
600
- data: Error;
635
+ export type moveFolderResponseDefault = {
636
+ data: ErrorResponse;
601
637
  status: Exclude<HTTPStatusCodes, 200>;
602
638
  };
603
- export type listMemoriesResponseSuccess = listMemoriesResponse200 & {
639
+ export type moveFolderResponseSuccess = moveFolderResponse200 & {
604
640
  headers: Headers;
605
641
  };
606
- export type listMemoriesResponseError = listMemoriesResponseDefault & {
642
+ export type moveFolderResponseError = moveFolderResponseDefault & {
607
643
  headers: Headers;
608
644
  };
609
- export type listMemoriesResponse = listMemoriesResponseSuccess | listMemoriesResponseError;
610
- export declare const getListMemoriesUrl: () => string;
645
+ export type moveFolderResponse = moveFolderResponseSuccess | moveFolderResponseError;
646
+ export declare const getMoveFolderUrl: (folder: string) => string;
611
647
  /**
612
- * Facts the assistant has written down for the current account in this project. They appear at the start of every later conversation. Members of the same project each have their own, and this returns only the current account's. Not paginated: there is a cap on how many there can be, and all of them come back at once.
613
- * @summary List what the assistant remembers
648
+ * Places the folder before `beforeFolderId`, or last when it is null. The inbox stays first.
649
+ * Fails with 409 and code ORDER_CHANGED when `expectedVersion` is stale; read the folders again
650
+ * and retry.
651
+ * @summary Reorder a folder
614
652
  */
615
- export declare const listMemories: (options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<listMemoriesResponse>;
616
- export type deleteMemoryResponse204 = {
617
- data: void;
618
- status: 204;
653
+ export declare const moveFolder: (folder: string, moveFolderRequestBody: MoveFolderRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<moveFolderResponse>;
654
+ export type placeThreadResponse200 = {
655
+ data: ThreadResource;
656
+ status: 200;
619
657
  };
620
- export type deleteMemoryResponseDefault = {
621
- data: Error;
622
- status: Exclude<HTTPStatusCodes, 204>;
658
+ export type placeThreadResponseDefault = {
659
+ data: ErrorResponse;
660
+ status: Exclude<HTTPStatusCodes, 200>;
623
661
  };
624
- export type deleteMemoryResponseSuccess = deleteMemoryResponse204 & {
662
+ export type placeThreadResponseSuccess = placeThreadResponse200 & {
625
663
  headers: Headers;
626
664
  };
627
- export type deleteMemoryResponseError = deleteMemoryResponseDefault & {
665
+ export type placeThreadResponseError = placeThreadResponseDefault & {
628
666
  headers: Headers;
629
667
  };
630
- export type deleteMemoryResponse = deleteMemoryResponseSuccess | deleteMemoryResponseError;
631
- export declare const getDeleteMemoryUrl: (memory: string) => string;
668
+ export type placeThreadResponse = placeThreadResponseSuccess | placeThreadResponseError;
669
+ export declare const getPlaceThreadUrl: (folder: string, thread: string) => string;
632
670
  /**
633
- * The assistant stops remembering this. It takes effect at once, so the next conversation will not carry it. The assistant may well learn the same thing again.
634
- * @summary Delete one memory
671
+ * Puts the conversation into this folder at the given position, moving it out of the folder it
672
+ * was in. Give `beforeThreadId` or `afterThreadId` to place it next to a conversation of this
673
+ * folder; with neither it goes last. Moving does not change the conversation's activity time.
674
+ *
675
+ * Subagents are not filed and fail with 409 and code SUBAGENT_NOT_FILED. Fails with 409 and code
676
+ * ORDER_CHANGED when `expectedVersion` is stale.
677
+ * @summary Place a conversation in a folder
635
678
  */
636
- export declare const deleteMemory: (memory: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<deleteMemoryResponse>;
637
- export type listSkillsResponse200 = {
638
- data: SkillListResponseBody;
639
- status: 200;
679
+ export declare const placeThread: (folder: string, thread: string, placeThreadRequestBody: PlaceThreadRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<placeThreadResponse>;
680
+ export type createTaskResponse201 = {
681
+ data: TaskResource;
682
+ status: 201;
640
683
  };
641
- export type listSkillsResponseDefault = {
642
- data: Error;
643
- status: Exclude<HTTPStatusCodes, 200>;
684
+ export type createTaskResponseDefault = {
685
+ data: ErrorResponse;
686
+ status: Exclude<HTTPStatusCodes, 201>;
644
687
  };
645
- export type listSkillsResponseSuccess = listSkillsResponse200 & {
688
+ export type createTaskResponseSuccess = createTaskResponse201 & {
646
689
  headers: Headers;
647
690
  };
648
- export type listSkillsResponseError = listSkillsResponseDefault & {
691
+ export type createTaskResponseError = createTaskResponseDefault & {
649
692
  headers: Headers;
650
693
  };
651
- export type listSkillsResponse = listSkillsResponseSuccess | listSkillsResponseError;
652
- export declare const getListSkillsUrl: () => string;
694
+ export type createTaskResponse = createTaskResponseSuccess | createTaskResponseError;
695
+ export declare const getCreateTaskUrl: () => string;
653
696
  /**
654
- * Everything the assistant can reach in this project, including the ones that are turned off —
655
- * an entry that disappeared once it was switched off could not be switched back on.
697
+ * A task does something on a trigger and reports to a conversation. Its action either sends a
698
+ * prompt to the conversation, which starts a turn there, or runs a command on an instance and
699
+ * sends the result to the conversation when it ends.
656
700
  *
657
- * `origin` says whether a skill can be edited here. Skills belonging to the project are
658
- * visible to everyone in it, whoever wrote them.
659
- * @summary List the skills this project can use
701
+ * `trigger.type` `now` runs once immediately; `at` runs once at `runAt`; `interval` repeats every
702
+ * `intervalSeconds` from `anchorAt`; `cron` repeats on a cron expression in `timezone`. Each
703
+ * execution is a run, listed under /runs.
704
+ *
705
+ * Fails with 404 when the conversation does not exist and with 409 and code THREAD_ARCHIVED when
706
+ * it is archived.
707
+ * @summary Create a task
660
708
  */
661
- export declare const listSkills: (options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<listSkillsResponse>;
662
- export type putSkillResponse200 = {
663
- data: SkillResource;
709
+ export declare const createTask: (createTaskRequestBody: CreateTaskRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<createTaskResponse>;
710
+ export type searchTasksResponse200 = {
711
+ data: TaskListResponseBody;
664
712
  status: 200;
665
713
  };
666
- export type putSkillResponseDefault = {
667
- data: Error;
714
+ export type searchTasksResponseDefault = {
715
+ data: ErrorResponse;
668
716
  status: Exclude<HTTPStatusCodes, 200>;
669
717
  };
670
- export type putSkillResponseSuccess = putSkillResponse200 & {
718
+ export type searchTasksResponseSuccess = searchTasksResponse200 & {
671
719
  headers: Headers;
672
720
  };
673
- export type putSkillResponseError = putSkillResponseDefault & {
721
+ export type searchTasksResponseError = searchTasksResponseDefault & {
674
722
  headers: Headers;
675
723
  };
676
- export type putSkillResponse = putSkillResponseSuccess | putSkillResponseError;
677
- export declare const getPutSkillUrl: () => string;
724
+ export type searchTasksResponse = searchTasksResponseSuccess | searchTasksResponseError;
725
+ export declare const getSearchTasksUrl: () => string;
678
726
  /**
679
- * Creates it, or replaces the project's skill of that name. The whole package goes in each
680
- * time: files left out of a write are removed, so the stored skill is what was sent and not
681
- * what accumulated.
682
- *
683
- * A project skill takes precedence over a built-in one of the same name for this project only.
684
- * The built-in is untouched and reappears if the project's is deleted.
685
- * @summary Write a skill for this project
727
+ * The caller's tasks in this project, most recently created first.
728
+ * @summary Search tasks
686
729
  */
687
- export declare const putSkill: (skillRequestBody: SkillRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<putSkillResponse>;
688
- export type getSkillResponse200 = {
689
- data: SkillResource;
730
+ export declare const searchTasks: (searchTasksRequestBody: SearchTasksRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<searchTasksResponse>;
731
+ export type getTaskResponse200 = {
732
+ data: TaskResource;
690
733
  status: 200;
691
734
  };
692
- export type getSkillResponseDefault = {
693
- data: Error;
735
+ export type getTaskResponseDefault = {
736
+ data: ErrorResponse;
694
737
  status: Exclude<HTTPStatusCodes, 200>;
695
738
  };
696
- export type getSkillResponseSuccess = getSkillResponse200 & {
739
+ export type getTaskResponseSuccess = getTaskResponse200 & {
697
740
  headers: Headers;
698
741
  };
699
- export type getSkillResponseError = getSkillResponseDefault & {
742
+ export type getTaskResponseError = getTaskResponseDefault & {
700
743
  headers: Headers;
701
744
  };
702
- export type getSkillResponse = getSkillResponseSuccess | getSkillResponseError;
703
- export declare const getGetSkillUrl: (skill: string) => string;
745
+ export type getTaskResponse = getTaskResponseSuccess | getTaskResponseError;
746
+ export declare const getGetTaskUrl: (task: string) => string;
704
747
  /**
705
- * Works for built-in skills too; they simply cannot be written.
706
- * @summary Read one skill, with its files
748
+ * @summary Get a task
707
749
  */
708
- export declare const getSkill: (skill: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<getSkillResponse>;
709
- export type setSkillEnabledResponse200 = {
710
- data: SkillResource;
750
+ export declare const getTask: (task: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<getTaskResponse>;
751
+ export type updateTaskResponse200 = {
752
+ data: TaskResource;
711
753
  status: 200;
712
754
  };
713
- export type setSkillEnabledResponseDefault = {
714
- data: Error;
755
+ export type updateTaskResponseDefault = {
756
+ data: ErrorResponse;
715
757
  status: Exclude<HTTPStatusCodes, 200>;
716
758
  };
717
- export type setSkillEnabledResponseSuccess = setSkillEnabledResponse200 & {
759
+ export type updateTaskResponseSuccess = updateTaskResponse200 & {
718
760
  headers: Headers;
719
761
  };
720
- export type setSkillEnabledResponseError = setSkillEnabledResponseDefault & {
762
+ export type updateTaskResponseError = updateTaskResponseDefault & {
721
763
  headers: Headers;
722
764
  };
723
- export type setSkillEnabledResponse = setSkillEnabledResponseSuccess | setSkillEnabledResponseError;
724
- export declare const getSetSkillEnabledUrl: (skill: string) => string;
765
+ export type updateTaskResponse = updateTaskResponseSuccess | updateTaskResponseError;
766
+ export declare const getUpdateTaskUrl: (task: string) => string;
725
767
  /**
726
- * Separate from writing it, because this is the frequent one: a skill that is off costs
727
- * nothing and stays where it is.
728
- *
729
- * Only skills belonging to the project can be switched. To keep a built-in one out of the
730
- * way, write a project skill of the same name and turn that off.
731
- * @summary Turn a skill on or off
768
+ * Changes the name, trigger or action. Omitted fields stay as they are; `trigger` and `action`
769
+ * are replaced as a whole. A run already in progress keeps the settings it started with.
770
+ * @summary Update a task
732
771
  */
733
- export declare const setSkillEnabled: (skill: string, skillEnabledRequestBody: SkillEnabledRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<setSkillEnabledResponse>;
734
- export type deleteSkillResponse204 = {
772
+ export declare const updateTask: (task: string, updateTaskRequestBody: UpdateTaskRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<updateTaskResponse>;
773
+ export type deleteTaskResponse204 = {
735
774
  data: void;
736
775
  status: 204;
737
776
  };
738
- export type deleteSkillResponseDefault = {
739
- data: Error;
777
+ export type deleteTaskResponseDefault = {
778
+ data: ErrorResponse;
740
779
  status: Exclude<HTTPStatusCodes, 204>;
741
780
  };
742
- export type deleteSkillResponseSuccess = deleteSkillResponse204 & {
781
+ export type deleteTaskResponseSuccess = deleteTaskResponse204 & {
743
782
  headers: Headers;
744
783
  };
745
- export type deleteSkillResponseError = deleteSkillResponseDefault & {
784
+ export type deleteTaskResponseError = deleteTaskResponseDefault & {
746
785
  headers: Headers;
747
786
  };
748
- export type deleteSkillResponse = deleteSkillResponseSuccess | deleteSkillResponseError;
749
- export declare const getDeleteSkillUrl: (skill: string) => string;
787
+ export type deleteTaskResponse = deleteTaskResponseSuccess | deleteTaskResponseError;
788
+ export declare const getDeleteTaskUrl: (task: string) => string;
750
789
  /**
751
- * A built-in skill of the same name, if there was one, becomes visible again.
752
- * @summary Delete this project's skill
790
+ * Cancels a run in progress and removes the task. Its runs stay readable in the conversation's transcript.
791
+ * @summary Delete a task
753
792
  */
754
- export declare const deleteSkill: (skill: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<deleteSkillResponse>;
755
- export type listThreadsResponse200 = {
756
- data: ThreadListResponseBody;
757
- status: 200;
793
+ export declare const deleteTask: (task: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<deleteTaskResponse>;
794
+ export type runTaskResponse202 = {
795
+ data: TaskRunResource;
796
+ status: 202;
758
797
  };
759
- export type listThreadsResponseDefault = {
760
- data: Error;
761
- status: Exclude<HTTPStatusCodes, 200>;
798
+ export type runTaskResponseDefault = {
799
+ data: ErrorResponse;
800
+ status: Exclude<HTTPStatusCodes, 202>;
762
801
  };
763
- export type listThreadsResponseSuccess = listThreadsResponse200 & {
802
+ export type runTaskResponseSuccess = runTaskResponse202 & {
764
803
  headers: Headers;
765
804
  };
766
- export type listThreadsResponseError = listThreadsResponseDefault & {
805
+ export type runTaskResponseError = runTaskResponseDefault & {
767
806
  headers: Headers;
768
807
  };
769
- export type listThreadsResponse = listThreadsResponseSuccess | listThreadsResponseError;
770
- export declare const getListThreadsUrl: (params?: ListThreadsParams) => string;
808
+ export type runTaskResponse = runTaskResponseSuccess | runTaskResponseError;
809
+ export declare const getRunTaskUrl: (task: string) => string;
771
810
  /**
772
- * Ordered by most recent activity, limited to the current account's conversations in the current project. `archived` selects between two sets rather than widening one: archived conversations are absent from the default list, and turning the flag on shows those instead.
773
- *
774
- * Pass the returned nextCursor as cursor; omit cursor on the first page. Continue with the same q, archived and folder filters. The cursor marks a position in the activity order, so changing filters between pages does not continue the same list.
775
- * @summary List conversations
811
+ * Starts a run immediately, outside its trigger. Fails with 409 and code TASK_RUNNING when a run
812
+ * is already in progress and the overlap policy is `skip`.
813
+ * @summary Run a task now
776
814
  */
777
- export declare const listThreads: (params?: ListThreadsParams, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<listThreadsResponse>;
778
- export type createThreadResponse201 = {
779
- data: ThreadSummaryResource;
780
- status: 201;
815
+ export declare const runTask: (task: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<runTaskResponse>;
816
+ export type pauseTaskResponse200 = {
817
+ data: TaskResource;
818
+ status: 200;
781
819
  };
782
- export type createThreadResponseDefault = {
783
- data: Error;
784
- status: Exclude<HTTPStatusCodes, 201>;
820
+ export type pauseTaskResponseDefault = {
821
+ data: ErrorResponse;
822
+ status: Exclude<HTTPStatusCodes, 200>;
785
823
  };
786
- export type createThreadResponseSuccess = createThreadResponse201 & {
824
+ export type pauseTaskResponseSuccess = pauseTaskResponse200 & {
787
825
  headers: Headers;
788
826
  };
789
- export type createThreadResponseError = createThreadResponseDefault & {
827
+ export type pauseTaskResponseError = pauseTaskResponseDefault & {
790
828
  headers: Headers;
791
829
  };
792
- export type createThreadResponse = createThreadResponseSuccess | createThreadResponseError;
793
- export declare const getCreateThreadUrl: () => string;
830
+ export type pauseTaskResponse = pauseTaskResponseSuccess | pauseTaskResponseError;
831
+ export declare const getPauseTaskUrl: (task: string) => string;
794
832
  /**
795
- * Omit preferredModelId or set it to null to follow the platform default. A non-null preference is accepted only while model selection is enabled; otherwise the request fails with 403 and code MODEL_SELECTION_DISABLED.
796
- *
797
- * A well-formed preference for a Canopy model that is no longer allowed or has been retired or removed is retained and uses the default when a turn starts. This also handles a catalogue change between displaying the selector and submitting the choice. Creating a conversation does not contact a model provider and remains possible when generation is unavailable.
798
- * @summary Create a conversation
833
+ * Stops future runs from its trigger. A run in progress continues. Pausing a paused task succeeds.
834
+ * @summary Pause a task
799
835
  */
800
- export declare const createThread: (createThreadRequestBody: CreateThreadRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<createThreadResponse>;
801
- export type getThreadResponse200 = {
802
- data: DocumentResource;
836
+ export declare const pauseTask: (task: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<pauseTaskResponse>;
837
+ export type resumeTaskResponse200 = {
838
+ data: TaskResource;
803
839
  status: 200;
804
840
  };
805
- export type getThreadResponseDefault = {
806
- data: Error;
841
+ export type resumeTaskResponseDefault = {
842
+ data: ErrorResponse;
807
843
  status: Exclude<HTTPStatusCodes, 200>;
808
844
  };
809
- export type getThreadResponseSuccess = getThreadResponse200 & {
845
+ export type resumeTaskResponseSuccess = resumeTaskResponse200 & {
810
846
  headers: Headers;
811
847
  };
812
- export type getThreadResponseError = getThreadResponseDefault & {
848
+ export type resumeTaskResponseError = resumeTaskResponseDefault & {
813
849
  headers: Headers;
814
850
  };
815
- export type getThreadResponse = getThreadResponseSuccess | getThreadResponseError;
816
- export declare const getGetThreadUrl: (thread: string) => string;
851
+ export type resumeTaskResponse = resumeTaskResponseSuccess | resumeTaskResponseError;
852
+ export declare const getResumeTaskUrl: (task: string) => string;
817
853
  /**
818
- * The complete current state of a conversation, for the first render. Its `stream` gives the address and admission ticket for live output, and what that stream pushes are incremental edits to this same document, so the same rendering logic applies.
819
- * @summary Fetch the conversation document
854
+ * Lets its trigger start runs again. Missed runs within `catchupSeconds` are started. Resuming an active task succeeds.
855
+ * @summary Resume a task
820
856
  */
821
- export declare const getThread: (thread: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<getThreadResponse>;
822
- export type updateThreadResponse200 = {
823
- data: ThreadSummaryResource;
857
+ export declare const resumeTask: (task: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<resumeTaskResponse>;
858
+ export type cancelTaskRunResponse200 = {
859
+ data: TaskResource;
824
860
  status: 200;
825
861
  };
826
- export type updateThreadResponseDefault = {
827
- data: Error;
862
+ export type cancelTaskRunResponseDefault = {
863
+ data: ErrorResponse;
828
864
  status: Exclude<HTTPStatusCodes, 200>;
829
865
  };
830
- export type updateThreadResponseSuccess = updateThreadResponse200 & {
866
+ export type cancelTaskRunResponseSuccess = cancelTaskRunResponse200 & {
831
867
  headers: Headers;
832
868
  };
833
- export type updateThreadResponseError = updateThreadResponseDefault & {
869
+ export type cancelTaskRunResponseError = cancelTaskRunResponseDefault & {
834
870
  headers: Headers;
835
871
  };
836
- export type updateThreadResponse = updateThreadResponseSuccess | updateThreadResponseError;
837
- export declare const getUpdateThreadUrl: (thread: string) => string;
872
+ export type cancelTaskRunResponse = cancelTaskRunResponseSuccess | cancelTaskRunResponseError;
873
+ export declare const getCancelTaskRunUrl: (task: string) => string;
838
874
  /**
839
- * Changes the title, folder, approval mode, model preference, and whether the conversation is archived. Approval and model preference changes take effect from the next turn; a turn already running keeps the settings it started with.
840
- *
841
- * Omit preferredModelId to leave the preference unchanged, or set it to null to follow the platform default. A non-null preference is accepted only while model selection is enabled; otherwise the whole request fails with 403 and code MODEL_SELECTION_DISABLED and none of its fields are changed. Clearing a preference remains allowed while selection is disabled. A well-formed preference for a disallowed, retired or removed Canopy model is retained and falls back to the default when used.
842
- *
843
- * Model switching is allowed on an existing conversation, including while a turn is generating or waiting for approval or an answer. The response immediately returns the saved preferredModelId, while model continues to identify the running turn's effective model until it finishes. Messages queued into that running turn also keep its captured model choices. The next turn uses the latest saved preference.
844
- *
845
- * Changing the preference does not create a new conversation, start a turn, call a model provider, clear the transcript, or rewrite historical model attribution. Before the next turn sends its first request to the selected model, the service checks that model's input capabilities and usable context budget. A switch to a smaller window may require compaction under the compaction policy above; saving the preference alone does not establish that the conversation fits.
846
- *
847
- * Archiving makes a conversation read-only: it stays in the list under "archived", stays readable, and the assistant can still find it when it searches past conversations — it just takes no new input. Unarchive it to continue. Archiving fails while a turn is running; stop it first.
848
- * @summary Update conversation settings
875
+ * Stops the run in progress. The conversation is told the run was cancelled. Succeeds when nothing is running.
876
+ * @summary Cancel the running run
849
877
  */
850
- export declare const updateThread: (thread: string, updateThreadRequestBody: UpdateThreadRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<updateThreadResponse>;
851
- export type deleteThreadResponse204 = {
852
- data: void;
853
- status: 204;
878
+ export declare const cancelTaskRun: (task: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<cancelTaskRunResponse>;
879
+ export type listTaskRunsResponse200 = {
880
+ data: TaskRunListResponseBody;
881
+ status: 200;
854
882
  };
855
- export type deleteThreadResponseDefault = {
856
- data: Error;
857
- status: Exclude<HTTPStatusCodes, 204>;
883
+ export type listTaskRunsResponseDefault = {
884
+ data: ErrorResponse;
885
+ status: Exclude<HTTPStatusCodes, 200>;
858
886
  };
859
- export type deleteThreadResponseSuccess = deleteThreadResponse204 & {
887
+ export type listTaskRunsResponseSuccess = listTaskRunsResponse200 & {
860
888
  headers: Headers;
861
889
  };
862
- export type deleteThreadResponseError = deleteThreadResponseDefault & {
890
+ export type listTaskRunsResponseError = listTaskRunsResponseDefault & {
863
891
  headers: Headers;
864
892
  };
865
- export type deleteThreadResponse = deleteThreadResponseSuccess | deleteThreadResponseError;
866
- export declare const getDeleteThreadUrl: (thread: string) => string;
893
+ export type listTaskRunsResponse = listTaskRunsResponseSuccess | listTaskRunsResponseError;
894
+ export declare const getListTaskRunsUrl: (task: string, params?: ListTaskRunsParams) => string;
867
895
  /**
868
- * Removes the conversation from every list and makes it unreachable by id. The assistant can no longer find it either — neither by searching past conversations nor by reading one back.
869
- *
870
- * Deleting is not the same as archiving, and the two are not degrees of the same thing. An archived conversation is still there and still readable, it just takes no new input; a deleted one is gone from view. Archiving can be undone; this cannot.
871
- *
872
- * What survives is the record itself, because a conversation with this assistant is an account of what was done to real infrastructure — which machine was changed, which disk was removed. That record is kept even though nobody can reach it here.
873
- *
874
- * Fails while a turn is running: stop it first. Deleting an already deleted conversation succeeds and changes nothing.
875
- * @summary Delete a conversation
896
+ * Newest first, without output; read a run with get-task-run for it.
897
+ * @summary List a task's runs
876
898
  */
877
- export declare const deleteThread: (thread: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<deleteThreadResponse>;
878
- export type decideApprovalResponse204 = {
879
- data: void;
880
- status: 204;
899
+ export declare const listTaskRuns: (task: string, params?: ListTaskRunsParams, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<listTaskRunsResponse>;
900
+ export type getTaskRunResponse200 = {
901
+ data: TaskRunResource;
902
+ status: 200;
881
903
  };
882
- export type decideApprovalResponseDefault = {
883
- data: Error;
884
- status: Exclude<HTTPStatusCodes, 204>;
904
+ export type getTaskRunResponseDefault = {
905
+ data: ErrorResponse;
906
+ status: Exclude<HTTPStatusCodes, 200>;
885
907
  };
886
- export type decideApprovalResponseSuccess = decideApprovalResponse204 & {
908
+ export type getTaskRunResponseSuccess = getTaskRunResponse200 & {
887
909
  headers: Headers;
888
910
  };
889
- export type decideApprovalResponseError = decideApprovalResponseDefault & {
911
+ export type getTaskRunResponseError = getTaskRunResponseDefault & {
890
912
  headers: Headers;
891
913
  };
892
- export type decideApprovalResponse = decideApprovalResponseSuccess | decideApprovalResponseError;
893
- export declare const getDecideApprovalUrl: (thread: string, batch: string) => string;
914
+ export type getTaskRunResponse = getTaskRunResponseSuccess | getTaskRunResponseError;
915
+ export declare const getGetTaskRunUrl: (task: string, run: string) => string;
894
916
  /**
895
- * The batch id comes from the conversation document's `wait`. This is idempotent: submitting the same batch again neither changes a decision already in effect nor reports an error. Returns 404 when the batch does not belong to that conversation.
896
- * @summary Approve or decline a batch of tool calls
917
+ * One run with the end of its output.
918
+ * @summary Get a task run
897
919
  */
898
- export declare const decideApproval: (thread: string, batch: string, decideRequestBody: DecideRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<decideApprovalResponse>;
899
- export type listEarlierItemsResponse200 = {
900
- data: EarlierResponseBody;
920
+ export declare const getTaskRun: (task: string, run: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<getTaskRunResponse>;
921
+ export type getSettingsResponse200 = {
922
+ data: SettingsResource;
901
923
  status: 200;
902
924
  };
903
- export type listEarlierItemsResponseDefault = {
904
- data: Error;
925
+ export type getSettingsResponseDefault = {
926
+ data: ErrorResponse;
905
927
  status: Exclude<HTTPStatusCodes, 200>;
906
928
  };
907
- export type listEarlierItemsResponseSuccess = listEarlierItemsResponse200 & {
929
+ export type getSettingsResponseSuccess = getSettingsResponse200 & {
908
930
  headers: Headers;
909
931
  };
910
- export type listEarlierItemsResponseError = listEarlierItemsResponseDefault & {
932
+ export type getSettingsResponseError = getSettingsResponseDefault & {
911
933
  headers: Headers;
912
934
  };
913
- export type listEarlierItemsResponse = listEarlierItemsResponseSuccess | listEarlierItemsResponseError;
914
- export declare const getListEarlierItemsUrl: (thread: string, params: ListEarlierItemsParams) => string;
935
+ export type getSettingsResponse = getSettingsResponseSuccess | getSettingsResponseError;
936
+ export declare const getGetSettingsUrl: () => string;
915
937
  /**
916
- * The first render only carries the latest stretch of a conversation; anything above it is fetched here, one stretch at a time. Pass the document's earlier.before as `before`; the `earlier` in the response is the cursor for the stretch above that, and null means the top has been reached. The entries have the same shape and the same order (oldest first) as `items` in the document, so they can be prepended as they are.
917
- * @summary Fetch earlier parts of a conversation
938
+ * The caller's assistant settings in this project. `defaultModel` is what a new conversation uses
939
+ * when it names no model: the caller's choice, or the first model in the Canopy catalogue that can
940
+ * run an agent.
941
+ * @summary Get settings
918
942
  */
919
- export declare const listEarlierItems: (thread: string, params: ListEarlierItemsParams, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<listEarlierItemsResponse>;
920
- export type interruptThreadResponse204 = {
921
- data: void;
922
- status: 204;
943
+ export declare const getSettings: (options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<getSettingsResponse>;
944
+ export type updateSettingsResponse200 = {
945
+ data: SettingsResource;
946
+ status: 200;
923
947
  };
924
- export type interruptThreadResponseDefault = {
925
- data: Error;
926
- status: Exclude<HTTPStatusCodes, 204>;
948
+ export type updateSettingsResponseDefault = {
949
+ data: ErrorResponse;
950
+ status: Exclude<HTTPStatusCodes, 200>;
927
951
  };
928
- export type interruptThreadResponseSuccess = interruptThreadResponse204 & {
952
+ export type updateSettingsResponseSuccess = updateSettingsResponse200 & {
929
953
  headers: Headers;
930
954
  };
931
- export type interruptThreadResponseError = interruptThreadResponseDefault & {
955
+ export type updateSettingsResponseError = updateSettingsResponseDefault & {
932
956
  headers: Headers;
933
957
  };
934
- export type interruptThreadResponse = interruptThreadResponseSuccess | interruptThreadResponseError;
935
- export declare const getInterruptThreadUrl: (thread: string) => string;
958
+ export type updateSettingsResponse = updateSettingsResponseSuccess | updateSettingsResponseError;
959
+ export declare const getUpdateSettingsUrl: () => string;
936
960
  /**
937
- * Calling this on a conversation with no running turn also returns 204 rather than an error — the user pressing stop races with the turn finishing on its own, and both outcomes are the same. This operation remains available while the project is suspended or being cleaned up.
938
- * @summary Interrupt a running turn
961
+ * Omitted fields stay as they are; null clears a choice so the catalogue default applies again.
962
+ * Existing conversations keep their models.
963
+ *
964
+ * Fails with 422 and code MODEL_UNAVAILABLE when the model cannot run an agent, and with 422 and
965
+ * code REASONING_UNSUPPORTED when a reasoning effort is set for a model without reasoning.
966
+ * @summary Update settings
939
967
  */
940
- export declare const interruptThread: (thread: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<interruptThreadResponse>;
941
- export type sendMessageResponse202 = {
942
- data: TurnIDResponseBody;
943
- status: 202;
968
+ export declare const updateSettings: (updateSettingsRequestBody: UpdateSettingsRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<updateSettingsResponse>;
969
+ export type createRealtimeTicketResponse201 = {
970
+ data: RealtimeTicketResource;
971
+ status: 201;
944
972
  };
945
- export type sendMessageResponseDefault = {
946
- data: Error;
947
- status: Exclude<HTTPStatusCodes, 202>;
973
+ export type createRealtimeTicketResponseDefault = {
974
+ data: ErrorResponse;
975
+ status: Exclude<HTTPStatusCodes, 201>;
948
976
  };
949
- export type sendMessageResponseSuccess = sendMessageResponse202 & {
977
+ export type createRealtimeTicketResponseSuccess = createRealtimeTicketResponse201 & {
950
978
  headers: Headers;
951
979
  };
952
- export type sendMessageResponseError = sendMessageResponseDefault & {
980
+ export type createRealtimeTicketResponseError = createRealtimeTicketResponseDefault & {
953
981
  headers: Headers;
954
982
  };
955
- export type sendMessageResponse = sendMessageResponseSuccess | sendMessageResponseError;
956
- export declare const getSendMessageUrl: (thread: string) => string;
983
+ export type createRealtimeTicketResponse = createRealtimeTicketResponseSuccess | createRealtimeTicketResponseError;
984
+ export declare const getCreateRealtimeTicketUrl: () => string;
957
985
  /**
958
- * Returns a turnId immediately without waiting for execution — a turn can run for tens of minutes. Progress arrives on the live stream the conversation document's `stream` points at, not in this response. Sending while the assistant is still working is allowed: the message is put in line and `queued` comes back true, to be read at the next step of the turn already running — so the editor should stay open rather than blocking on a busy conversation.
959
- * @summary Send a message and start a turn
986
+ * Returns the address and a short-lived ticket for the realtime WebSocket. Open
987
+ * `{url}?ticket={ticket}`; the ticket stands in for the bearer token, which a browser cannot set
988
+ * on a WebSocket. One connection carries every subscription of a client.
989
+ *
990
+ * Messages are JSON text frames. The client sends `RealtimeClientMessage` and receives
991
+ * `RealtimeServerMessage`. Subscribe to `workspace` for every conversation, folder and task of the
992
+ * caller in this project, and to `thread:{id}` for the transcript of one conversation. A
993
+ * transcript subscription takes the `streamCursor` from list-thread-items and replays what was
994
+ * written after it; when the cursor is too old the server sends `resync` and the client reads the
995
+ * items again.
996
+ *
997
+ * Reconnect with a new ticket after the connection closes. Ping at least every 30 seconds.
998
+ * @summary Issue a realtime ticket
960
999
  */
961
- export declare const sendMessage: (thread: string, sendMessageRequestBody: SendMessageRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<sendMessageResponse>;
962
- export type answerQuestionResponse204 = {
963
- data: void;
964
- status: 204;
1000
+ export declare const createRealtimeTicket: (options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<createRealtimeTicketResponse>;
1001
+ export type openRealtimeResponse200 = {
1002
+ data: RealtimeExchange;
1003
+ status: 200;
965
1004
  };
966
- export type answerQuestionResponseDefault = {
967
- data: Error;
968
- status: Exclude<HTTPStatusCodes, 204>;
1005
+ export type openRealtimeResponseDefault = {
1006
+ data: ErrorResponse;
1007
+ status: Exclude<HTTPStatusCodes, 200>;
969
1008
  };
970
- export type answerQuestionResponseSuccess = answerQuestionResponse204 & {
1009
+ export type openRealtimeResponseSuccess = openRealtimeResponse200 & {
971
1010
  headers: Headers;
972
1011
  };
973
- export type answerQuestionResponseError = answerQuestionResponseDefault & {
1012
+ export type openRealtimeResponseError = openRealtimeResponseDefault & {
974
1013
  headers: Headers;
975
1014
  };
976
- export type answerQuestionResponse = answerQuestionResponseSuccess | answerQuestionResponseError;
977
- export declare const getAnswerQuestionUrl: (thread: string, item: string) => string;
1015
+ export type openRealtimeResponse = openRealtimeResponseSuccess | openRealtimeResponseError;
1016
+ export declare const getOpenRealtimeUrl: (params: OpenRealtimeParams) => string;
978
1017
  /**
979
- * The question id comes from the conversation document's `wait`. An already-answered question also returns 204 — another tab may have submitted first, or the auto-answer window may have expired, and in both cases the turn has already continued with an answer.
980
- * @summary Answer the assistant's questions
1018
+ * Upgrades to a WebSocket. The ticket from create-realtime-ticket authenticates the connection;
1019
+ * a missing, expired or foreign ticket closes it with code 4401. The 200 response documents the
1020
+ * message a client receives on the socket; the endpoint never answers with a plain HTTP body.
1021
+ * @summary Open the realtime WebSocket
981
1022
  */
982
- export declare const answerQuestion: (thread: string, item: string, answerRequestBody: AnswerRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<answerQuestionResponse>;
983
- export type markThreadReadResponse204 = {
1023
+ export declare const openRealtime: (params: OpenRealtimeParams, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<openRealtimeResponse>;
1024
+ export type uploadAttachmentResponse201 = {
1025
+ data: UploadedResource;
1026
+ status: 201;
1027
+ };
1028
+ export type uploadAttachmentResponseDefault = {
1029
+ data: ErrorResponse;
1030
+ status: Exclude<HTTPStatusCodes, 201>;
1031
+ };
1032
+ export type uploadAttachmentResponseSuccess = uploadAttachmentResponse201 & {
1033
+ headers: Headers;
1034
+ };
1035
+ export type uploadAttachmentResponseError = uploadAttachmentResponseDefault & {
1036
+ headers: Headers;
1037
+ };
1038
+ export type uploadAttachmentResponse = uploadAttachmentResponseSuccess | uploadAttachmentResponseError;
1039
+ export declare const getUploadAttachmentUrl: (params?: UploadAttachmentParams) => string;
1040
+ /**
1041
+ * The body is the file bytes themselves, not multipart, one file per request. The type is determined from the content, not from Content-Type or from the name. Put the returned id in attachmentIds when sending a message.
1042
+ *
1043
+ * An upload that no message ever references is a draft, and drafts are collected — `draftExpiresAt` in the response says when this one goes. Sending a message with the id makes it permanent.
1044
+ *
1045
+ * The returned `type` says how the assistant will see it. An `image` is read directly, and only by models that accept image input. A small `text` file is placed inline in the message. A large `text` file, and anything `binary`, arrives as a reference the assistant reads on demand — for a binary that usually means downloading it onto one of the project's cloud instances.
1046
+ * @summary Upload a file
1047
+ */
1048
+ export declare const uploadAttachment: (uploadAttachmentBody: Blob, params?: UploadAttachmentParams, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<uploadAttachmentResponse>;
1049
+ export type downloadAttachmentResponse200 = {
1050
+ data: Blob;
1051
+ status: 200;
1052
+ };
1053
+ export type downloadAttachmentResponseDefault = {
1054
+ data: ErrorResponse;
1055
+ status: Exclude<HTTPStatusCodes, 200>;
1056
+ };
1057
+ export type downloadAttachmentResponseSuccess = downloadAttachmentResponse200 & {
1058
+ headers: Headers;
1059
+ };
1060
+ export type downloadAttachmentResponseError = downloadAttachmentResponseDefault & {
1061
+ headers: Headers;
1062
+ };
1063
+ export type downloadAttachmentResponse = downloadAttachmentResponseSuccess | downloadAttachmentResponseError;
1064
+ export declare const getDownloadAttachmentUrl: (attachment: string) => string;
1065
+ /**
1066
+ * 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.
1067
+ *
1068
+ * 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.
1069
+ * @summary Download a file
1070
+ */
1071
+ export declare const downloadAttachment: (attachment: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<downloadAttachmentResponse>;
1072
+ export type getUploadConfigurationResponse200 = {
1073
+ data: UploadConfigurationResource;
1074
+ status: 200;
1075
+ };
1076
+ export type getUploadConfigurationResponseDefault = {
1077
+ data: ErrorResponse;
1078
+ status: Exclude<HTTPStatusCodes, 200>;
1079
+ };
1080
+ export type getUploadConfigurationResponseSuccess = getUploadConfigurationResponse200 & {
1081
+ headers: Headers;
1082
+ };
1083
+ export type getUploadConfigurationResponseError = getUploadConfigurationResponseDefault & {
1084
+ headers: Headers;
1085
+ };
1086
+ export type getUploadConfigurationResponse = getUploadConfigurationResponseSuccess | getUploadConfigurationResponseError;
1087
+ export declare const getGetUploadConfigurationUrl: () => string;
1088
+ /**
1089
+ * @summary Get upload configuration
1090
+ */
1091
+ export declare const getUploadConfiguration: (options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<getUploadConfigurationResponse>;
1092
+ export type createUploadResponse200 = {
1093
+ data: UploadResource;
1094
+ status: 200;
1095
+ };
1096
+ export type createUploadResponseDefault = {
1097
+ data: ErrorResponse;
1098
+ status: Exclude<HTTPStatusCodes, 200>;
1099
+ };
1100
+ export type createUploadResponseSuccess = createUploadResponse200 & {
1101
+ headers: Headers;
1102
+ };
1103
+ export type createUploadResponseError = createUploadResponseDefault & {
1104
+ headers: Headers;
1105
+ };
1106
+ export type createUploadResponse = createUploadResponseSuccess | createUploadResponseError;
1107
+ export declare const getCreateUploadUrl: () => string;
1108
+ /**
1109
+ * @summary Create upload
1110
+ */
1111
+ export declare const createUpload: (createUploadRequestBody: CreateUploadRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<createUploadResponse>;
1112
+ export type listUploadsResponse200 = {
1113
+ data: UploadListResponseBody;
1114
+ status: 200;
1115
+ };
1116
+ export type listUploadsResponseDefault = {
1117
+ data: ErrorResponse;
1118
+ status: Exclude<HTTPStatusCodes, 200>;
1119
+ };
1120
+ export type listUploadsResponseSuccess = listUploadsResponse200 & {
1121
+ headers: Headers;
1122
+ };
1123
+ export type listUploadsResponseError = listUploadsResponseDefault & {
1124
+ headers: Headers;
1125
+ };
1126
+ export type listUploadsResponse = listUploadsResponseSuccess | listUploadsResponseError;
1127
+ export declare const getListUploadsUrl: () => string;
1128
+ /**
1129
+ * @summary List uploads
1130
+ */
1131
+ export declare const listUploads: (options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<listUploadsResponse>;
1132
+ export type getUploadResponse200 = {
1133
+ data: UploadResource;
1134
+ status: 200;
1135
+ };
1136
+ export type getUploadResponseDefault = {
1137
+ data: ErrorResponse;
1138
+ status: Exclude<HTTPStatusCodes, 200>;
1139
+ };
1140
+ export type getUploadResponseSuccess = getUploadResponse200 & {
1141
+ headers: Headers;
1142
+ };
1143
+ export type getUploadResponseError = getUploadResponseDefault & {
1144
+ headers: Headers;
1145
+ };
1146
+ export type getUploadResponse = getUploadResponseSuccess | getUploadResponseError;
1147
+ export declare const getGetUploadUrl: (upload: string) => string;
1148
+ /**
1149
+ * @summary Get upload
1150
+ */
1151
+ export declare const getUpload: (upload: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<getUploadResponse>;
1152
+ export type updateUploadResponse200 = {
1153
+ data: UploadResource;
1154
+ status: 200;
1155
+ };
1156
+ export type updateUploadResponseDefault = {
1157
+ data: ErrorResponse;
1158
+ status: Exclude<HTTPStatusCodes, 200>;
1159
+ };
1160
+ export type updateUploadResponseSuccess = updateUploadResponse200 & {
1161
+ headers: Headers;
1162
+ };
1163
+ export type updateUploadResponseError = updateUploadResponseDefault & {
1164
+ headers: Headers;
1165
+ };
1166
+ export type updateUploadResponse = updateUploadResponseSuccess | updateUploadResponseError;
1167
+ export declare const getUpdateUploadUrl: (upload: string) => string;
1168
+ /**
1169
+ * @summary Update upload
1170
+ */
1171
+ export declare const updateUpload: (upload: string, updateUploadRequestBody: UpdateUploadRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<updateUploadResponse>;
1172
+ export type deleteUploadResponse200 = {
1173
+ data: void;
1174
+ status: 200;
1175
+ };
1176
+ export type deleteUploadResponseDefault = {
1177
+ data: ErrorResponse;
1178
+ status: Exclude<HTTPStatusCodes, 200>;
1179
+ };
1180
+ export type deleteUploadResponseSuccess = deleteUploadResponse200 & {
1181
+ headers: Headers;
1182
+ };
1183
+ export type deleteUploadResponseError = deleteUploadResponseDefault & {
1184
+ headers: Headers;
1185
+ };
1186
+ export type deleteUploadResponse = deleteUploadResponseSuccess | deleteUploadResponseError;
1187
+ export declare const getDeleteUploadUrl: (upload: string) => string;
1188
+ /**
1189
+ * @summary Delete upload
1190
+ */
1191
+ export declare const deleteUpload: (upload: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<deleteUploadResponse>;
1192
+ export type cancelUploadResponse200 = {
1193
+ data: void;
1194
+ status: 200;
1195
+ };
1196
+ export type cancelUploadResponseDefault = {
1197
+ data: ErrorResponse;
1198
+ status: Exclude<HTTPStatusCodes, 200>;
1199
+ };
1200
+ export type cancelUploadResponseSuccess = cancelUploadResponse200 & {
1201
+ headers: Headers;
1202
+ };
1203
+ export type cancelUploadResponseError = cancelUploadResponseDefault & {
1204
+ headers: Headers;
1205
+ };
1206
+ export type cancelUploadResponse = cancelUploadResponseSuccess | cancelUploadResponseError;
1207
+ export declare const getCancelUploadUrl: (upload: string) => string;
1208
+ /**
1209
+ * @summary Cancel upload
1210
+ */
1211
+ export declare const cancelUpload: (upload: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<cancelUploadResponse>;
1212
+ export type completeUploadResponse200 = {
1213
+ data: UploadedResource;
1214
+ status: 200;
1215
+ };
1216
+ export type completeUploadResponseDefault = {
1217
+ data: ErrorResponse;
1218
+ status: Exclude<HTTPStatusCodes, 200>;
1219
+ };
1220
+ export type completeUploadResponseSuccess = completeUploadResponse200 & {
1221
+ headers: Headers;
1222
+ };
1223
+ export type completeUploadResponseError = completeUploadResponseDefault & {
1224
+ headers: Headers;
1225
+ };
1226
+ export type completeUploadResponse = completeUploadResponseSuccess | completeUploadResponseError;
1227
+ export declare const getCompleteUploadUrl: (upload: string) => string;
1228
+ /**
1229
+ * @summary Complete upload
1230
+ */
1231
+ export declare const completeUpload: (upload: string, completeUploadRequestBody: CompleteUploadRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<completeUploadResponse>;
1232
+ export type putUploadPartResponse200 = {
1233
+ data: UploadPartResource;
1234
+ status: 200;
1235
+ };
1236
+ export type putUploadPartResponseDefault = {
1237
+ data: ErrorResponse;
1238
+ status: Exclude<HTTPStatusCodes, 200>;
1239
+ };
1240
+ export type putUploadPartResponseSuccess = putUploadPartResponse200 & {
1241
+ headers: Headers;
1242
+ };
1243
+ export type putUploadPartResponseError = putUploadPartResponseDefault & {
1244
+ headers: Headers;
1245
+ };
1246
+ export type putUploadPartResponse = putUploadPartResponseSuccess | putUploadPartResponseError;
1247
+ export declare const getPutUploadPartUrl: (upload: string, part: number, params: PutUploadPartParams) => string;
1248
+ /**
1249
+ * @summary Put upload part
1250
+ */
1251
+ export declare const putUploadPart: (upload: string, part: number, putUploadPartBody: Blob, params: PutUploadPartParams, headers: PutUploadPartHeaders, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<putUploadPartResponse>;
1252
+ export type listMemoriesResponse200 = {
1253
+ data: MemoryListResponseBody;
1254
+ status: 200;
1255
+ };
1256
+ export type listMemoriesResponseDefault = {
1257
+ data: ErrorResponse;
1258
+ status: Exclude<HTTPStatusCodes, 200>;
1259
+ };
1260
+ export type listMemoriesResponseSuccess = listMemoriesResponse200 & {
1261
+ headers: Headers;
1262
+ };
1263
+ export type listMemoriesResponseError = listMemoriesResponseDefault & {
1264
+ headers: Headers;
1265
+ };
1266
+ export type listMemoriesResponse = listMemoriesResponseSuccess | listMemoriesResponseError;
1267
+ export declare const getListMemoriesUrl: () => string;
1268
+ /**
1269
+ * Facts the assistant has written down for the current account in this project. They appear at the start of every later conversation. Members of the same project each have their own, and this returns only the current account's. Not paginated: there is a cap on how many there can be, and all of them come back at once.
1270
+ * @summary List what the assistant remembers
1271
+ */
1272
+ export declare const listMemories: (options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<listMemoriesResponse>;
1273
+ export type deleteMemoryResponse204 = {
1274
+ data: void;
1275
+ status: 204;
1276
+ };
1277
+ export type deleteMemoryResponseDefault = {
1278
+ data: ErrorResponse;
1279
+ status: Exclude<HTTPStatusCodes, 204>;
1280
+ };
1281
+ export type deleteMemoryResponseSuccess = deleteMemoryResponse204 & {
1282
+ headers: Headers;
1283
+ };
1284
+ export type deleteMemoryResponseError = deleteMemoryResponseDefault & {
1285
+ headers: Headers;
1286
+ };
1287
+ export type deleteMemoryResponse = deleteMemoryResponseSuccess | deleteMemoryResponseError;
1288
+ export declare const getDeleteMemoryUrl: (memory: string) => string;
1289
+ /**
1290
+ * The assistant stops remembering this. It takes effect at once, so the next conversation will not carry it. The assistant may well learn the same thing again.
1291
+ * @summary Delete one memory
1292
+ */
1293
+ export declare const deleteMemory: (memory: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<deleteMemoryResponse>;
1294
+ export type listSkillsResponse200 = {
1295
+ data: SkillListResponseBody;
1296
+ status: 200;
1297
+ };
1298
+ export type listSkillsResponseDefault = {
1299
+ data: ErrorResponse;
1300
+ status: Exclude<HTTPStatusCodes, 200>;
1301
+ };
1302
+ export type listSkillsResponseSuccess = listSkillsResponse200 & {
1303
+ headers: Headers;
1304
+ };
1305
+ export type listSkillsResponseError = listSkillsResponseDefault & {
1306
+ headers: Headers;
1307
+ };
1308
+ export type listSkillsResponse = listSkillsResponseSuccess | listSkillsResponseError;
1309
+ export declare const getListSkillsUrl: () => string;
1310
+ /**
1311
+ * Everything the assistant can reach in this project, including the ones that are turned off —
1312
+ * an entry that disappeared once it was switched off could not be switched back on.
1313
+ *
1314
+ * `origin` says whether a skill can be edited here. Skills belonging to the project are
1315
+ * visible to everyone in it, whoever wrote them.
1316
+ * @summary List the skills this project can use
1317
+ */
1318
+ export declare const listSkills: (options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<listSkillsResponse>;
1319
+ export type putSkillResponse200 = {
1320
+ data: SkillResource;
1321
+ status: 200;
1322
+ };
1323
+ export type putSkillResponseDefault = {
1324
+ data: ErrorResponse;
1325
+ status: Exclude<HTTPStatusCodes, 200>;
1326
+ };
1327
+ export type putSkillResponseSuccess = putSkillResponse200 & {
1328
+ headers: Headers;
1329
+ };
1330
+ export type putSkillResponseError = putSkillResponseDefault & {
1331
+ headers: Headers;
1332
+ };
1333
+ export type putSkillResponse = putSkillResponseSuccess | putSkillResponseError;
1334
+ export declare const getPutSkillUrl: () => string;
1335
+ /**
1336
+ * Creates it, or replaces the project's skill of that name. The whole package goes in each
1337
+ * time: files left out of a write are removed, so the stored skill is what was sent and not
1338
+ * what accumulated.
1339
+ *
1340
+ * A project skill takes precedence over a built-in one of the same name for this project only.
1341
+ * The built-in is untouched and reappears if the project's is deleted.
1342
+ * @summary Write a skill for this project
1343
+ */
1344
+ export declare const putSkill: (skillRequestBody: SkillRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<putSkillResponse>;
1345
+ export type getSkillResponse200 = {
1346
+ data: SkillResource;
1347
+ status: 200;
1348
+ };
1349
+ export type getSkillResponseDefault = {
1350
+ data: ErrorResponse;
1351
+ status: Exclude<HTTPStatusCodes, 200>;
1352
+ };
1353
+ export type getSkillResponseSuccess = getSkillResponse200 & {
1354
+ headers: Headers;
1355
+ };
1356
+ export type getSkillResponseError = getSkillResponseDefault & {
1357
+ headers: Headers;
1358
+ };
1359
+ export type getSkillResponse = getSkillResponseSuccess | getSkillResponseError;
1360
+ export declare const getGetSkillUrl: (skill: string) => string;
1361
+ /**
1362
+ * Works for built-in skills too; they simply cannot be written.
1363
+ * @summary Read one skill, with its files
1364
+ */
1365
+ export declare const getSkill: (skill: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<getSkillResponse>;
1366
+ export type setSkillEnabledResponse200 = {
1367
+ data: SkillResource;
1368
+ status: 200;
1369
+ };
1370
+ export type setSkillEnabledResponseDefault = {
1371
+ data: ErrorResponse;
1372
+ status: Exclude<HTTPStatusCodes, 200>;
1373
+ };
1374
+ export type setSkillEnabledResponseSuccess = setSkillEnabledResponse200 & {
1375
+ headers: Headers;
1376
+ };
1377
+ export type setSkillEnabledResponseError = setSkillEnabledResponseDefault & {
1378
+ headers: Headers;
1379
+ };
1380
+ export type setSkillEnabledResponse = setSkillEnabledResponseSuccess | setSkillEnabledResponseError;
1381
+ export declare const getSetSkillEnabledUrl: (skill: string) => string;
1382
+ /**
1383
+ * Separate from writing it, because this is the frequent one: a skill that is off costs
1384
+ * nothing and stays where it is.
1385
+ *
1386
+ * Only skills belonging to the project can be switched. To keep a built-in one out of the
1387
+ * way, write a project skill of the same name and turn that off.
1388
+ * @summary Turn a skill on or off
1389
+ */
1390
+ export declare const setSkillEnabled: (skill: string, skillEnabledRequestBody: SkillEnabledRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<setSkillEnabledResponse>;
1391
+ export type deleteSkillResponse204 = {
1392
+ data: void;
1393
+ status: 204;
1394
+ };
1395
+ export type deleteSkillResponseDefault = {
1396
+ data: ErrorResponse;
1397
+ status: Exclude<HTTPStatusCodes, 204>;
1398
+ };
1399
+ export type deleteSkillResponseSuccess = deleteSkillResponse204 & {
1400
+ headers: Headers;
1401
+ };
1402
+ export type deleteSkillResponseError = deleteSkillResponseDefault & {
1403
+ headers: Headers;
1404
+ };
1405
+ export type deleteSkillResponse = deleteSkillResponseSuccess | deleteSkillResponseError;
1406
+ export declare const getDeleteSkillUrl: (skill: string) => string;
1407
+ /**
1408
+ * A built-in skill of the same name, if there was one, becomes visible again.
1409
+ * @summary Delete this project's skill
1410
+ */
1411
+ export declare const deleteSkill: (skill: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<deleteSkillResponse>;
1412
+ export type listBindingsResponse200 = {
1413
+ data: LengthAwarePageBindingResource;
1414
+ status: 200;
1415
+ };
1416
+ export type listBindingsResponseDefault = {
1417
+ data: ErrorResponse;
1418
+ status: Exclude<HTTPStatusCodes, 200>;
1419
+ };
1420
+ export type listBindingsResponseSuccess = listBindingsResponse200 & {
1421
+ headers: Headers;
1422
+ };
1423
+ export type listBindingsResponseError = listBindingsResponseDefault & {
1424
+ headers: Headers;
1425
+ };
1426
+ export type listBindingsResponse = listBindingsResponseSuccess | listBindingsResponseError;
1427
+ export declare const getListBindingsUrl: (params?: ListBindingsParams) => string;
1428
+ /**
1429
+ * Filter by channelId to show, per channel, who is bound to it.
1430
+ * @summary List bindings
1431
+ */
1432
+ export declare const listBindings: (params?: ListBindingsParams, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<listBindingsResponse>;
1433
+ export type getBindingResponse200 = {
1434
+ data: BindingResource;
1435
+ status: 200;
1436
+ };
1437
+ export type getBindingResponseDefault = {
1438
+ data: ErrorResponse;
1439
+ status: Exclude<HTTPStatusCodes, 200>;
1440
+ };
1441
+ export type getBindingResponseSuccess = getBindingResponse200 & {
1442
+ headers: Headers;
1443
+ };
1444
+ export type getBindingResponseError = getBindingResponseDefault & {
1445
+ headers: Headers;
1446
+ };
1447
+ export type getBindingResponse = getBindingResponseSuccess | getBindingResponseError;
1448
+ export declare const getGetBindingUrl: (binding: string) => string;
1449
+ /**
1450
+ * @summary Get a binding
1451
+ */
1452
+ export declare const getBinding: (binding: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<getBindingResponse>;
1453
+ export type deleteBindingResponse204 = {
1454
+ data: void;
1455
+ status: 204;
1456
+ };
1457
+ export type deleteBindingResponseDefault = {
1458
+ data: ErrorResponse;
1459
+ status: Exclude<HTTPStatusCodes, 204>;
1460
+ };
1461
+ export type deleteBindingResponseSuccess = deleteBindingResponse204 & {
1462
+ headers: Headers;
1463
+ };
1464
+ export type deleteBindingResponseError = deleteBindingResponseDefault & {
1465
+ headers: Headers;
1466
+ };
1467
+ export type deleteBindingResponse = deleteBindingResponseSuccess | deleteBindingResponseError;
1468
+ export declare const getDeleteBindingUrl: (binding: string) => string;
1469
+ /**
1470
+ * @summary Remove a binding
1471
+ */
1472
+ export declare const deleteBinding: (binding: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<deleteBindingResponse>;
1473
+ export type listChannelsResponse200 = {
1474
+ data: LengthAwarePageChannelResource;
1475
+ status: 200;
1476
+ };
1477
+ export type listChannelsResponseDefault = {
1478
+ data: ErrorResponse;
1479
+ status: Exclude<HTTPStatusCodes, 200>;
1480
+ };
1481
+ export type listChannelsResponseSuccess = listChannelsResponse200 & {
1482
+ headers: Headers;
1483
+ };
1484
+ export type listChannelsResponseError = listChannelsResponseDefault & {
1485
+ headers: Headers;
1486
+ };
1487
+ export type listChannelsResponse = listChannelsResponseSuccess | listChannelsResponseError;
1488
+ export declare const getListChannelsUrl: (params?: ListChannelsParams) => string;
1489
+ /**
1490
+ * @summary List channels
1491
+ */
1492
+ export declare const listChannels: (params?: ListChannelsParams, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<listChannelsResponse>;
1493
+ export type createChannelResponse201 = {
1494
+ data: ChannelWithSecretResponseBody;
1495
+ status: 201;
1496
+ };
1497
+ export type createChannelResponseDefault = {
1498
+ data: ErrorResponse;
1499
+ status: Exclude<HTTPStatusCodes, 201>;
1500
+ };
1501
+ export type createChannelResponseSuccess = createChannelResponse201 & {
1502
+ headers: Headers;
1503
+ };
1504
+ export type createChannelResponseError = createChannelResponseDefault & {
1505
+ headers: Headers;
1506
+ };
1507
+ export type createChannelResponse = createChannelResponseSuccess | createChannelResponseError;
1508
+ export declare const getCreateChannelUrl: () => string;
1509
+ /**
1510
+ * Which side owns the webhook secret is decided by the platform; see secretSource on list-platforms. For a `generated` platform, do not send webhookSecret — the one we generate is returned exactly once in this response and cannot be retrieved again; miss it and the only way forward is rotating to a new one. For a `supplied` platform you must pass the secret from that platform's own console, and webhookSecret in the response is null.
1511
+ * @summary Create a channel
1512
+ */
1513
+ export declare const createChannel: (createChannelRequestBody: CreateChannelRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<createChannelResponse>;
1514
+ export type getChannelResponse200 = {
1515
+ data: ChannelResource;
1516
+ status: 200;
1517
+ };
1518
+ export type getChannelResponseDefault = {
1519
+ data: ErrorResponse;
1520
+ status: Exclude<HTTPStatusCodes, 200>;
1521
+ };
1522
+ export type getChannelResponseSuccess = getChannelResponse200 & {
1523
+ headers: Headers;
1524
+ };
1525
+ export type getChannelResponseError = getChannelResponseDefault & {
1526
+ headers: Headers;
1527
+ };
1528
+ export type getChannelResponse = getChannelResponseSuccess | getChannelResponseError;
1529
+ export declare const getGetChannelUrl: (channel: string) => string;
1530
+ /**
1531
+ * @summary Get a channel
1532
+ */
1533
+ export declare const getChannel: (channel: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<getChannelResponse>;
1534
+ export type updateChannelResponse200 = {
1535
+ data: ChannelResource;
1536
+ status: 200;
1537
+ };
1538
+ export type updateChannelResponseDefault = {
1539
+ data: ErrorResponse;
1540
+ status: Exclude<HTTPStatusCodes, 200>;
1541
+ };
1542
+ export type updateChannelResponseSuccess = updateChannelResponse200 & {
1543
+ headers: Headers;
1544
+ };
1545
+ export type updateChannelResponseError = updateChannelResponseDefault & {
1546
+ headers: Headers;
1547
+ };
1548
+ export type updateChannelResponse = updateChannelResponseSuccess | updateChannelResponseError;
1549
+ export declare const getUpdateChannelUrl: (channel: string) => string;
1550
+ /**
1551
+ * Only the fields present are changed. senderPolicy and allowFrom go together, and senderPolicy decides whether they are replaced. For platforms held open by a long-lived connection the change applies once that connection is rebuilt; for webhook platforms it applies at once.
1552
+ * @summary Update a channel
1553
+ */
1554
+ export declare const updateChannel: (channel: string, updateChannelRequestBody: UpdateChannelRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<updateChannelResponse>;
1555
+ export type deleteChannelResponse204 = {
984
1556
  data: void;
985
1557
  status: 204;
986
1558
  };
987
- export type markThreadReadResponseDefault = {
988
- data: Error;
1559
+ export type deleteChannelResponseDefault = {
1560
+ data: ErrorResponse;
989
1561
  status: Exclude<HTTPStatusCodes, 204>;
990
1562
  };
991
- export type markThreadReadResponseSuccess = markThreadReadResponse204 & {
1563
+ export type deleteChannelResponseSuccess = deleteChannelResponse204 & {
992
1564
  headers: Headers;
993
1565
  };
994
- export type markThreadReadResponseError = markThreadReadResponseDefault & {
1566
+ export type deleteChannelResponseError = deleteChannelResponseDefault & {
995
1567
  headers: Headers;
996
1568
  };
997
- export type markThreadReadResponse = markThreadReadResponseSuccess | markThreadReadResponseError;
998
- export declare const getMarkThreadReadUrl: (thread: string) => string;
1569
+ export type deleteChannelResponse = deleteChannelResponseSuccess | deleteChannelResponseError;
1570
+ export declare const getDeleteChannelUrl: (channel: string) => string;
999
1571
  /**
1000
- * @summary Mark a conversation as read
1572
+ * The channel stops accepting inbound messages and every binding on it stops working. This operation remains available while the project is suspended or being cleaned up.
1573
+ * @summary Delete a channel
1001
1574
  */
1002
- export declare const markThreadRead: (thread: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<markThreadReadResponse>;
1003
- export type revertThreadResponse200 = {
1004
- data: RevertedCountResponseBody;
1575
+ export declare const deleteChannel: (channel: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<deleteChannelResponse>;
1576
+ export type createBindingCodeResponse201 = {
1577
+ data: BindingCodeResponseBody;
1578
+ status: 201;
1579
+ };
1580
+ export type createBindingCodeResponseDefault = {
1581
+ data: ErrorResponse;
1582
+ status: Exclude<HTTPStatusCodes, 201>;
1583
+ };
1584
+ export type createBindingCodeResponseSuccess = createBindingCodeResponse201 & {
1585
+ headers: Headers;
1586
+ };
1587
+ export type createBindingCodeResponseError = createBindingCodeResponseDefault & {
1588
+ headers: Headers;
1589
+ };
1590
+ export type createBindingCodeResponse = createBindingCodeResponseSuccess | createBindingCodeResponseError;
1591
+ export declare const getCreateBindingCodeUrl: (channel: string) => string;
1592
+ /**
1593
+ * Produces a single-use code to hand to the person being bound. They send that code to the assistant from their own account on that platform, which completes the binding. A binding can only be established this way, by the person themselves — a platform account cannot be named directly. Codes expire and have to be reissued.
1594
+ * @summary Issue a binding code
1595
+ */
1596
+ export declare const createBindingCode: (channel: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<createBindingCodeResponse>;
1597
+ export type listChannelRejectionsResponse200 = {
1598
+ data: RejectionListResponseBody;
1005
1599
  status: 200;
1006
1600
  };
1007
- export type revertThreadResponseDefault = {
1008
- data: Error;
1601
+ export type listChannelRejectionsResponseDefault = {
1602
+ data: ErrorResponse;
1009
1603
  status: Exclude<HTTPStatusCodes, 200>;
1010
1604
  };
1011
- export type revertThreadResponseSuccess = revertThreadResponse200 & {
1605
+ export type listChannelRejectionsResponseSuccess = listChannelRejectionsResponse200 & {
1012
1606
  headers: Headers;
1013
1607
  };
1014
- export type revertThreadResponseError = revertThreadResponseDefault & {
1608
+ export type listChannelRejectionsResponseError = listChannelRejectionsResponseDefault & {
1015
1609
  headers: Headers;
1016
1610
  };
1017
- export type revertThreadResponse = revertThreadResponseSuccess | revertThreadResponseError;
1018
- export declare const getRevertThreadUrl: (thread: string) => string;
1611
+ export type listChannelRejectionsResponse = listChannelRejectionsResponseSuccess | listChannelRejectionsResponseError;
1612
+ export declare const getListChannelRejectionsUrl: (channel: string, params?: ListChannelRejectionsParams) => string;
1019
1613
  /**
1020
- * Reverts the entry at `ordinal` and everything after it. Reverted entries stay in the transcript marked `reverted`, and ordinals are not renumbered. Returns how many were actually reverted.
1021
- * @summary Revert from a given point
1614
+ * For diagnosing "I sent a message and the assistant never answered". Returns the inbound messages this channel rejected most recently, newest first, each with its reason. The most common reason is that the sender is not bound yet.
1615
+ * @summary List recently rejected inbound messages
1022
1616
  */
1023
- export declare const revertThread: (thread: string, revertRequestBody: RevertRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<revertThreadResponse>;
1617
+ export declare const listChannelRejections: (channel: string, params?: ListChannelRejectionsParams, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<listChannelRejectionsResponse>;
1618
+ export type rotateChannelSecretResponse200 = {
1619
+ data: WebhookSecretResponseBody;
1620
+ status: 200;
1621
+ };
1622
+ export type rotateChannelSecretResponseDefault = {
1623
+ data: ErrorResponse;
1624
+ status: Exclude<HTTPStatusCodes, 200>;
1625
+ };
1626
+ export type rotateChannelSecretResponseSuccess = rotateChannelSecretResponse200 & {
1627
+ headers: Headers;
1628
+ };
1629
+ export type rotateChannelSecretResponseError = rotateChannelSecretResponseDefault & {
1630
+ headers: Headers;
1631
+ };
1632
+ export type rotateChannelSecretResponse = rotateChannelSecretResponseSuccess | rotateChannelSecretResponseError;
1633
+ export declare const getRotateChannelSecretUrl: (channel: string) => string;
1634
+ /**
1635
+ * Replaces the webhook secret. The old one stops working immediately and the channel drops back to awaiting confirmation from the platform. Which side owns the secret is decided by the platform; see secretSource on list-platforms. For a `generated` platform, send no body — the new secret is returned in this response only and cannot be retrieved again. For a `supplied` platform you must pass the new secret from that platform's own console.
1636
+ * @summary Rotate the webhook secret
1637
+ */
1638
+ export declare const rotateChannelSecret: (channel: string, rotateSecretRequestBody?: RotateSecretRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<rotateChannelSecretResponse>;
1639
+ export type checkSenderResponse200 = {
1640
+ data: SenderCheckResource;
1641
+ status: 200;
1642
+ };
1643
+ export type checkSenderResponseDefault = {
1644
+ data: ErrorResponse;
1645
+ status: Exclude<HTTPStatusCodes, 200>;
1646
+ };
1647
+ export type checkSenderResponseSuccess = checkSenderResponse200 & {
1648
+ headers: Headers;
1649
+ };
1650
+ export type checkSenderResponseError = checkSenderResponseDefault & {
1651
+ headers: Headers;
1652
+ };
1653
+ export type checkSenderResponse = checkSenderResponseSuccess | checkSenderResponseError;
1654
+ export declare const getCheckSenderUrl: (channel: string, params: CheckSenderParams) => string;
1655
+ /**
1656
+ * For checking a sender policy after changing it. Sends nothing and changes nothing: it runs exactly the same decision a real inbound message goes through, and says which rule produced the answer. The binding-code rule cannot be tested this way — whether something is a binding code depends on what the sender actually wrote.
1657
+ * @summary Test whether a sender would be let through
1658
+ */
1659
+ export declare const checkSender: (channel: string, params: CheckSenderParams, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<checkSenderResponse>;
1660
+ export type beginWeixinLoginResponse201 = {
1661
+ data: LoginResource;
1662
+ status: 201;
1663
+ };
1664
+ export type beginWeixinLoginResponseDefault = {
1665
+ data: ErrorResponse;
1666
+ status: Exclude<HTTPStatusCodes, 201>;
1667
+ };
1668
+ export type beginWeixinLoginResponseSuccess = beginWeixinLoginResponse201 & {
1669
+ headers: Headers;
1670
+ };
1671
+ export type beginWeixinLoginResponseError = beginWeixinLoginResponseDefault & {
1672
+ headers: Headers;
1673
+ };
1674
+ export type beginWeixinLoginResponse = beginWeixinLoginResponseSuccess | beginWeixinLoginResponseError;
1675
+ export declare const getBeginWeixinLoginUrl: (channel: string) => string;
1676
+ /**
1677
+ * A personal WeChat channel can only send and receive once its owner has signed in by scanning a QR code. This returns that code; poll `GET /v1/weixin-logins/{login}` for progress, and when the status asks for a verification code, submit it with `POST /v1/weixin-logins/{login}/verify-code`.
1678
+ * @summary Begin a WeChat QR login
1679
+ */
1680
+ export declare const beginWeixinLogin: (channel: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<beginWeixinLoginResponse>;
1681
+ export type listPlatformsResponse200 = {
1682
+ data: PlatformListResponseBody;
1683
+ status: 200;
1684
+ };
1685
+ export type listPlatformsResponseDefault = {
1686
+ data: ErrorResponse;
1687
+ status: Exclude<HTTPStatusCodes, 200>;
1688
+ };
1689
+ export type listPlatformsResponseSuccess = listPlatformsResponse200 & {
1690
+ headers: Headers;
1691
+ };
1692
+ export type listPlatformsResponseError = listPlatformsResponseDefault & {
1693
+ headers: Headers;
1694
+ };
1695
+ export type listPlatformsResponse = listPlatformsResponseSuccess | listPlatformsResponseError;
1696
+ export declare const getListPlatformsUrl: () => string;
1697
+ /**
1698
+ * The instant messaging platforms that can currently be connected, along with the flow and the credential fields each one needs. The create-channel form is driven entirely by this response: setupMethod decides between a credential form and a QR flow, credentialFields is what to ask for, and secretSource decides whether there is a webhook secret field at all.
1699
+ * @summary List platforms that can be connected
1700
+ */
1701
+ export declare const listPlatforms: (options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<listPlatformsResponse>;
1702
+ export type getWeixinLoginResponse200 = {
1703
+ data: LoginResource;
1704
+ status: 200;
1705
+ };
1706
+ export type getWeixinLoginResponseDefault = {
1707
+ data: ErrorResponse;
1708
+ status: Exclude<HTTPStatusCodes, 200>;
1709
+ };
1710
+ export type getWeixinLoginResponseSuccess = getWeixinLoginResponse200 & {
1711
+ headers: Headers;
1712
+ };
1713
+ export type getWeixinLoginResponseError = getWeixinLoginResponseDefault & {
1714
+ headers: Headers;
1715
+ };
1716
+ export type getWeixinLoginResponse = getWeixinLoginResponseSuccess | getWeixinLoginResponseError;
1717
+ export declare const getGetWeixinLoginUrl: (login: string) => string;
1718
+ /**
1719
+ * Poll this until the status is success or failure. When the status asks for a verification code, submit it with the verification-code operation.
1720
+ * @summary Get the state of a QR login
1721
+ */
1722
+ export declare const getWeixinLogin: (login: string, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<getWeixinLoginResponse>;
1723
+ export type submitWeixinVerifyCodeResponse200 = {
1724
+ data: LoginResource;
1725
+ status: 200;
1726
+ };
1727
+ export type submitWeixinVerifyCodeResponseDefault = {
1728
+ data: ErrorResponse;
1729
+ status: Exclude<HTTPStatusCodes, 200>;
1730
+ };
1731
+ export type submitWeixinVerifyCodeResponseSuccess = submitWeixinVerifyCodeResponse200 & {
1732
+ headers: Headers;
1733
+ };
1734
+ export type submitWeixinVerifyCodeResponseError = submitWeixinVerifyCodeResponseDefault & {
1735
+ headers: Headers;
1736
+ };
1737
+ export type submitWeixinVerifyCodeResponse = submitWeixinVerifyCodeResponseSuccess | submitWeixinVerifyCodeResponseError;
1738
+ export declare const getSubmitWeixinVerifyCodeUrl: (login: string) => string;
1739
+ /**
1740
+ * For when WeChat asks for an SMS or device code after the scan. The person who started the login gets that code on their own phone.
1741
+ * @summary Submit a login verification code
1742
+ */
1743
+ export declare const submitWeixinVerifyCode: (login: string, verifyCodeRequestBody: VerifyCodeRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<submitWeixinVerifyCodeResponse>;