@leaflow/sdk 0.178.0 → 0.180.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (328) hide show
  1. package/dist/assistant/v1/generated/functions.d.ts +25 -58
  2. package/dist/assistant/v1/generated/functions.js +16 -54
  3. package/dist/assistant/v1/generated/models.d.ts +3 -105
  4. package/dist/assistant/v1/generated/models.js +0 -25
  5. package/dist/assistant/v1/generated/schemas.zod.d.ts +11 -12
  6. package/dist/assistant/v1/generated/schemas.zod.js +14 -12
  7. package/dist/assistant/v1/generated/validators/answerQuestionRequestBody.zod.d.ts +3 -2
  8. package/dist/assistant/v1/generated/validators/answerQuestionRequestBody.zod.js +3 -2
  9. package/dist/assistant/v1/generated/validators/approvalMode.zod.d.ts +3 -2
  10. package/dist/assistant/v1/generated/validators/approvalMode.zod.js +3 -2
  11. package/dist/assistant/v1/generated/validators/attachmentResource.zod.d.ts +3 -2
  12. package/dist/assistant/v1/generated/validators/attachmentResource.zod.js +3 -2
  13. package/dist/assistant/v1/generated/validators/bindingCodeResponseBody.zod.d.ts +3 -2
  14. package/dist/assistant/v1/generated/validators/bindingCodeResponseBody.zod.js +3 -2
  15. package/dist/assistant/v1/generated/validators/bindingResource.zod.d.ts +3 -2
  16. package/dist/assistant/v1/generated/validators/bindingResource.zod.js +3 -2
  17. package/dist/assistant/v1/generated/validators/channelResource.zod.d.ts +3 -2
  18. package/dist/assistant/v1/generated/validators/channelResource.zod.js +3 -2
  19. package/dist/assistant/v1/generated/validators/channelWithSecretResponseBody.zod.d.ts +3 -2
  20. package/dist/assistant/v1/generated/validators/channelWithSecretResponseBody.zod.js +3 -2
  21. package/dist/assistant/v1/generated/validators/checkSenderParams.zod.d.ts +3 -2
  22. package/dist/assistant/v1/generated/validators/checkSenderParams.zod.js +3 -2
  23. package/dist/assistant/v1/generated/validators/choiceResource.zod.d.ts +3 -2
  24. package/dist/assistant/v1/generated/validators/choiceResource.zod.js +3 -2
  25. package/dist/assistant/v1/generated/validators/clientActionRequest.zod.d.ts +3 -2
  26. package/dist/assistant/v1/generated/validators/clientActionRequest.zod.js +3 -2
  27. package/dist/assistant/v1/generated/validators/clientContextPart.zod.d.ts +3 -2
  28. package/dist/assistant/v1/generated/validators/clientContextPart.zod.js +3 -2
  29. package/dist/assistant/v1/generated/validators/clientContextRequest.zod.d.ts +3 -2
  30. package/dist/assistant/v1/generated/validators/clientContextRequest.zod.js +3 -2
  31. package/dist/assistant/v1/generated/validators/clientFunctionRequest.zod.d.ts +3 -2
  32. package/dist/assistant/v1/generated/validators/clientFunctionRequest.zod.js +3 -2
  33. package/dist/assistant/v1/generated/validators/completeUploadRequestBody.zod.d.ts +3 -2
  34. package/dist/assistant/v1/generated/validators/completeUploadRequestBody.zod.js +3 -2
  35. package/dist/assistant/v1/generated/validators/contextUsageResource.zod.d.ts +3 -2
  36. package/dist/assistant/v1/generated/validators/contextUsageResource.zod.js +3 -2
  37. package/dist/assistant/v1/generated/validators/createChannelRequestBody.zod.d.ts +3 -2
  38. package/dist/assistant/v1/generated/validators/createChannelRequestBody.zod.js +3 -2
  39. package/dist/assistant/v1/generated/validators/createFolderRequestBody.zod.d.ts +3 -2
  40. package/dist/assistant/v1/generated/validators/createFolderRequestBody.zod.js +3 -2
  41. package/dist/assistant/v1/generated/validators/createTaskRequestBody.zod.d.ts +3 -2
  42. package/dist/assistant/v1/generated/validators/createTaskRequestBody.zod.js +3 -2
  43. package/dist/assistant/v1/generated/validators/createThreadRequestBody.zod.d.ts +3 -2
  44. package/dist/assistant/v1/generated/validators/createThreadRequestBody.zod.js +3 -2
  45. package/dist/assistant/v1/generated/validators/createThreadResponseBody.zod.d.ts +3 -2
  46. package/dist/assistant/v1/generated/validators/createThreadResponseBody.zod.js +3 -2
  47. package/dist/assistant/v1/generated/validators/createUploadRequestBody.zod.d.ts +3 -2
  48. package/dist/assistant/v1/generated/validators/createUploadRequestBody.zod.js +3 -2
  49. package/dist/assistant/v1/generated/validators/credentialFieldResource.zod.d.ts +3 -2
  50. package/dist/assistant/v1/generated/validators/credentialFieldResource.zod.js +3 -2
  51. package/dist/assistant/v1/generated/validators/cursorPagination.zod.d.ts +3 -2
  52. package/dist/assistant/v1/generated/validators/cursorPagination.zod.js +3 -2
  53. package/dist/assistant/v1/generated/validators/decideToolCallsRequestBody.zod.d.ts +3 -2
  54. package/dist/assistant/v1/generated/validators/decideToolCallsRequestBody.zod.js +3 -2
  55. package/dist/assistant/v1/generated/validators/defaultModelResource.zod.d.ts +3 -2
  56. package/dist/assistant/v1/generated/validators/defaultModelResource.zod.js +3 -2
  57. package/dist/assistant/v1/generated/validators/error.zod.d.ts +3 -2
  58. package/dist/assistant/v1/generated/validators/error.zod.js +3 -2
  59. package/dist/assistant/v1/generated/validators/errorStatus.zod.d.ts +3 -2
  60. package/dist/assistant/v1/generated/validators/errorStatus.zod.js +3 -2
  61. package/dist/assistant/v1/generated/validators/fieldViolation.zod.d.ts +3 -2
  62. package/dist/assistant/v1/generated/validators/fieldViolation.zod.js +3 -2
  63. package/dist/assistant/v1/generated/validators/fileDiffResource.zod.d.ts +3 -2
  64. package/dist/assistant/v1/generated/validators/fileDiffResource.zod.js +3 -2
  65. package/dist/assistant/v1/generated/validators/folderCountsResource.zod.d.ts +3 -2
  66. package/dist/assistant/v1/generated/validators/folderCountsResource.zod.js +3 -2
  67. package/dist/assistant/v1/generated/validators/folderListResponseBody.zod.d.ts +3 -2
  68. package/dist/assistant/v1/generated/validators/folderListResponseBody.zod.js +3 -2
  69. package/dist/assistant/v1/generated/validators/folderResource.zod.d.ts +3 -2
  70. package/dist/assistant/v1/generated/validators/folderResource.zod.js +3 -2
  71. package/dist/assistant/v1/generated/validators/itemSourceResource.zod.d.ts +3 -2
  72. package/dist/assistant/v1/generated/validators/itemSourceResource.zod.js +3 -2
  73. package/dist/assistant/v1/generated/validators/lastTurnResource.zod.d.ts +3 -2
  74. package/dist/assistant/v1/generated/validators/lastTurnResource.zod.js +3 -2
  75. package/dist/assistant/v1/generated/validators/lengthAwarePageBindingResource.zod.d.ts +3 -2
  76. package/dist/assistant/v1/generated/validators/lengthAwarePageBindingResource.zod.js +3 -2
  77. package/dist/assistant/v1/generated/validators/lengthAwarePageChannelResource.zod.d.ts +3 -2
  78. package/dist/assistant/v1/generated/validators/lengthAwarePageChannelResource.zod.js +3 -2
  79. package/dist/assistant/v1/generated/validators/listBindingsParams.zod.d.ts +3 -2
  80. package/dist/assistant/v1/generated/validators/listBindingsParams.zod.js +3 -2
  81. package/dist/assistant/v1/generated/validators/listChannelRejectionsParams.zod.d.ts +3 -2
  82. package/dist/assistant/v1/generated/validators/listChannelRejectionsParams.zod.js +3 -2
  83. package/dist/assistant/v1/generated/validators/listChannelsParams.zod.d.ts +3 -2
  84. package/dist/assistant/v1/generated/validators/listChannelsParams.zod.js +3 -2
  85. package/dist/assistant/v1/generated/validators/listTaskRunsParams.zod.d.ts +3 -2
  86. package/dist/assistant/v1/generated/validators/listTaskRunsParams.zod.js +3 -2
  87. package/dist/assistant/v1/generated/validators/listThreadItemsParams.zod.d.ts +3 -2
  88. package/dist/assistant/v1/generated/validators/listThreadItemsParams.zod.js +3 -2
  89. package/dist/assistant/v1/generated/validators/listThreadMessagesParams.zod.d.ts +3 -2
  90. package/dist/assistant/v1/generated/validators/listThreadMessagesParams.zod.js +3 -2
  91. package/dist/assistant/v1/generated/validators/listThreadTurnsParams.zod.d.ts +3 -2
  92. package/dist/assistant/v1/generated/validators/listThreadTurnsParams.zod.js +3 -2
  93. package/dist/assistant/v1/generated/validators/loginResource.zod.d.ts +3 -2
  94. package/dist/assistant/v1/generated/validators/loginResource.zod.js +3 -2
  95. package/dist/assistant/v1/generated/validators/memoryListResponseBody.zod.d.ts +3 -2
  96. package/dist/assistant/v1/generated/validators/memoryListResponseBody.zod.js +3 -2
  97. package/dist/assistant/v1/generated/validators/memoryResource.zod.d.ts +3 -2
  98. package/dist/assistant/v1/generated/validators/memoryResource.zod.js +3 -2
  99. package/dist/assistant/v1/generated/validators/messagePart.zod.d.ts +3 -2
  100. package/dist/assistant/v1/generated/validators/messagePart.zod.js +3 -2
  101. package/dist/assistant/v1/generated/validators/moveFolderRequestBody.zod.d.ts +3 -2
  102. package/dist/assistant/v1/generated/validators/moveFolderRequestBody.zod.js +3 -2
  103. package/dist/assistant/v1/generated/validators/offsetPagination.zod.d.ts +3 -2
  104. package/dist/assistant/v1/generated/validators/offsetPagination.zod.js +3 -2
  105. package/dist/assistant/v1/generated/validators/partResource.zod.d.ts +3 -2
  106. package/dist/assistant/v1/generated/validators/partResource.zod.js +3 -2
  107. package/dist/assistant/v1/generated/validators/pendingActionResource.zod.d.ts +3 -2
  108. package/dist/assistant/v1/generated/validators/pendingActionResource.zod.js +3 -2
  109. package/dist/assistant/v1/generated/validators/placeThreadRequestBody.zod.d.ts +3 -2
  110. package/dist/assistant/v1/generated/validators/placeThreadRequestBody.zod.js +3 -2
  111. package/dist/assistant/v1/generated/validators/platformListResponseBody.zod.d.ts +3 -2
  112. package/dist/assistant/v1/generated/validators/platformListResponseBody.zod.js +3 -2
  113. package/dist/assistant/v1/generated/validators/platformResource.zod.d.ts +3 -2
  114. package/dist/assistant/v1/generated/validators/platformResource.zod.js +3 -2
  115. package/dist/assistant/v1/generated/validators/presentationResource.zod.d.ts +3 -2
  116. package/dist/assistant/v1/generated/validators/presentationResource.zod.js +3 -2
  117. package/dist/assistant/v1/generated/validators/putUploadPartHeaders.zod.d.ts +3 -2
  118. package/dist/assistant/v1/generated/validators/putUploadPartHeaders.zod.js +3 -2
  119. package/dist/assistant/v1/generated/validators/putUploadPartParams.zod.d.ts +3 -2
  120. package/dist/assistant/v1/generated/validators/putUploadPartParams.zod.js +3 -2
  121. package/dist/assistant/v1/generated/validators/questionResource.zod.d.ts +3 -2
  122. package/dist/assistant/v1/generated/validators/questionResource.zod.js +3 -2
  123. package/dist/assistant/v1/generated/validators/reasoningEffort.zod.d.ts +3 -2
  124. package/dist/assistant/v1/generated/validators/reasoningEffort.zod.js +3 -2
  125. package/dist/assistant/v1/generated/validators/rejectionListResponseBody.zod.d.ts +3 -2
  126. package/dist/assistant/v1/generated/validators/rejectionListResponseBody.zod.js +3 -2
  127. package/dist/assistant/v1/generated/validators/rejectionResource.zod.d.ts +3 -2
  128. package/dist/assistant/v1/generated/validators/rejectionResource.zod.js +3 -2
  129. package/dist/assistant/v1/generated/validators/resumeThreadRequestBody.zod.d.ts +3 -2
  130. package/dist/assistant/v1/generated/validators/resumeThreadRequestBody.zod.js +3 -2
  131. package/dist/assistant/v1/generated/validators/revertRequestBody.zod.d.ts +3 -2
  132. package/dist/assistant/v1/generated/validators/revertRequestBody.zod.js +3 -2
  133. package/dist/assistant/v1/generated/validators/revertedCountResponseBody.zod.d.ts +3 -2
  134. package/dist/assistant/v1/generated/validators/revertedCountResponseBody.zod.js +3 -2
  135. package/dist/assistant/v1/generated/validators/rotateSecretRequestBody.zod.d.ts +3 -2
  136. package/dist/assistant/v1/generated/validators/rotateSecretRequestBody.zod.js +3 -2
  137. package/dist/assistant/v1/generated/validators/searchTasksRequestBody.zod.d.ts +3 -2
  138. package/dist/assistant/v1/generated/validators/searchTasksRequestBody.zod.js +3 -2
  139. package/dist/assistant/v1/generated/validators/searchThreadsRequestBody.zod.d.ts +3 -2
  140. package/dist/assistant/v1/generated/validators/searchThreadsRequestBody.zod.js +3 -2
  141. package/dist/assistant/v1/generated/validators/sendMessageRequestBody.zod.d.ts +3 -2
  142. package/dist/assistant/v1/generated/validators/sendMessageRequestBody.zod.js +3 -2
  143. package/dist/assistant/v1/generated/validators/sendMessageResponseBody.zod.d.ts +3 -2
  144. package/dist/assistant/v1/generated/validators/sendMessageResponseBody.zod.js +3 -2
  145. package/dist/assistant/v1/generated/validators/senderCheckResource.zod.d.ts +3 -2
  146. package/dist/assistant/v1/generated/validators/senderCheckResource.zod.js +3 -2
  147. package/dist/assistant/v1/generated/validators/settingsResource.zod.d.ts +3 -2
  148. package/dist/assistant/v1/generated/validators/settingsResource.zod.js +3 -2
  149. package/dist/assistant/v1/generated/validators/skillEnabledRequestBody.zod.d.ts +3 -2
  150. package/dist/assistant/v1/generated/validators/skillEnabledRequestBody.zod.js +3 -2
  151. package/dist/assistant/v1/generated/validators/skillListResponseBody.zod.d.ts +3 -2
  152. package/dist/assistant/v1/generated/validators/skillListResponseBody.zod.js +3 -2
  153. package/dist/assistant/v1/generated/validators/skillRequestBody.zod.d.ts +3 -2
  154. package/dist/assistant/v1/generated/validators/skillRequestBody.zod.js +3 -2
  155. package/dist/assistant/v1/generated/validators/skillResource.zod.d.ts +3 -2
  156. package/dist/assistant/v1/generated/validators/skillResource.zod.js +3 -2
  157. package/dist/assistant/v1/generated/validators/subagentCountResource.zod.d.ts +3 -2
  158. package/dist/assistant/v1/generated/validators/subagentCountResource.zod.js +3 -2
  159. package/dist/assistant/v1/generated/validators/taskAction.zod.d.ts +3 -2
  160. package/dist/assistant/v1/generated/validators/taskAction.zod.js +3 -2
  161. package/dist/assistant/v1/generated/validators/taskListResponseBody.zod.d.ts +3 -2
  162. package/dist/assistant/v1/generated/validators/taskListResponseBody.zod.js +3 -2
  163. package/dist/assistant/v1/generated/validators/taskResource.zod.d.ts +3 -2
  164. package/dist/assistant/v1/generated/validators/taskResource.zod.js +3 -2
  165. package/dist/assistant/v1/generated/validators/taskRunListResponseBody.zod.d.ts +3 -2
  166. package/dist/assistant/v1/generated/validators/taskRunListResponseBody.zod.js +3 -2
  167. package/dist/assistant/v1/generated/validators/taskRunResource.zod.d.ts +3 -2
  168. package/dist/assistant/v1/generated/validators/taskRunResource.zod.js +3 -2
  169. package/dist/assistant/v1/generated/validators/taskTrigger.zod.d.ts +3 -2
  170. package/dist/assistant/v1/generated/validators/taskTrigger.zod.js +3 -2
  171. package/dist/assistant/v1/generated/validators/threadCountsResource.zod.d.ts +3 -2
  172. package/dist/assistant/v1/generated/validators/threadCountsResource.zod.js +3 -2
  173. package/dist/assistant/v1/generated/validators/threadItemListResponseBody.zod.d.ts +3 -2
  174. package/dist/assistant/v1/generated/validators/threadItemListResponseBody.zod.js +3 -2
  175. package/dist/assistant/v1/generated/validators/threadItemResource.zod.d.ts +3 -2
  176. package/dist/assistant/v1/generated/validators/threadItemResource.zod.js +3 -2
  177. package/dist/assistant/v1/generated/validators/threadListResponseBody.zod.d.ts +3 -2
  178. package/dist/assistant/v1/generated/validators/threadListResponseBody.zod.js +3 -2
  179. package/dist/assistant/v1/generated/validators/threadMessageListResponseBody.zod.d.ts +3 -2
  180. package/dist/assistant/v1/generated/validators/threadMessageListResponseBody.zod.js +3 -2
  181. package/dist/assistant/v1/generated/validators/threadMessageResource.zod.d.ts +3 -2
  182. package/dist/assistant/v1/generated/validators/threadMessageResource.zod.js +3 -2
  183. package/dist/assistant/v1/generated/validators/threadResource.zod.d.ts +3 -2
  184. package/dist/assistant/v1/generated/validators/threadResource.zod.js +3 -2
  185. package/dist/assistant/v1/generated/validators/threadStatus.zod.d.ts +3 -2
  186. package/dist/assistant/v1/generated/validators/threadStatus.zod.js +3 -2
  187. package/dist/assistant/v1/generated/validators/threadTurnListResponseBody.zod.d.ts +3 -2
  188. package/dist/assistant/v1/generated/validators/threadTurnListResponseBody.zod.js +3 -2
  189. package/dist/assistant/v1/generated/validators/threadTurnResource.zod.d.ts +3 -2
  190. package/dist/assistant/v1/generated/validators/threadTurnResource.zod.js +3 -2
  191. package/dist/assistant/v1/generated/validators/todoResource.zod.d.ts +3 -2
  192. package/dist/assistant/v1/generated/validators/todoResource.zod.js +3 -2
  193. package/dist/assistant/v1/generated/validators/toolCallResource.zod.d.ts +3 -2
  194. package/dist/assistant/v1/generated/validators/toolCallResource.zod.js +3 -2
  195. package/dist/assistant/v1/generated/validators/toolResultRequestBody.zod.d.ts +3 -2
  196. package/dist/assistant/v1/generated/validators/toolResultRequestBody.zod.js +3 -2
  197. package/dist/assistant/v1/generated/validators/turnStartedResponseBody.zod.d.ts +3 -2
  198. package/dist/assistant/v1/generated/validators/turnStartedResponseBody.zod.js +3 -2
  199. package/dist/assistant/v1/generated/validators/turnStatus.zod.d.ts +3 -2
  200. package/dist/assistant/v1/generated/validators/turnStatus.zod.js +3 -2
  201. package/dist/assistant/v1/generated/validators/turnType.zod.d.ts +3 -2
  202. package/dist/assistant/v1/generated/validators/turnType.zod.js +3 -2
  203. package/dist/assistant/v1/generated/validators/updateChannelRequestBody.zod.d.ts +3 -2
  204. package/dist/assistant/v1/generated/validators/updateChannelRequestBody.zod.js +3 -2
  205. package/dist/assistant/v1/generated/validators/updateFolderRequestBody.zod.d.ts +3 -2
  206. package/dist/assistant/v1/generated/validators/updateFolderRequestBody.zod.js +3 -2
  207. package/dist/assistant/v1/generated/validators/updateSettingsRequestBody.zod.d.ts +3 -2
  208. package/dist/assistant/v1/generated/validators/updateSettingsRequestBody.zod.js +3 -2
  209. package/dist/assistant/v1/generated/validators/updateTaskRequestBody.zod.d.ts +3 -2
  210. package/dist/assistant/v1/generated/validators/updateTaskRequestBody.zod.js +3 -2
  211. package/dist/assistant/v1/generated/validators/updateThreadRequestBody.zod.d.ts +3 -2
  212. package/dist/assistant/v1/generated/validators/updateThreadRequestBody.zod.js +3 -2
  213. package/dist/assistant/v1/generated/validators/updateUploadRequestBody.zod.d.ts +3 -2
  214. package/dist/assistant/v1/generated/validators/updateUploadRequestBody.zod.js +3 -2
  215. package/dist/assistant/v1/generated/validators/uploadAttachmentParams.zod.d.ts +3 -2
  216. package/dist/assistant/v1/generated/validators/uploadAttachmentParams.zod.js +3 -2
  217. package/dist/assistant/v1/generated/validators/uploadConfigurationResource.zod.d.ts +3 -2
  218. package/dist/assistant/v1/generated/validators/uploadConfigurationResource.zod.js +3 -2
  219. package/dist/assistant/v1/generated/validators/uploadListResponseBody.zod.d.ts +3 -2
  220. package/dist/assistant/v1/generated/validators/uploadListResponseBody.zod.js +3 -2
  221. package/dist/assistant/v1/generated/validators/uploadPartResource.zod.d.ts +3 -2
  222. package/dist/assistant/v1/generated/validators/uploadPartResource.zod.js +3 -2
  223. package/dist/assistant/v1/generated/validators/uploadResource.zod.d.ts +3 -2
  224. package/dist/assistant/v1/generated/validators/uploadResource.zod.js +3 -2
  225. package/dist/assistant/v1/generated/validators/uploadedResource.zod.d.ts +3 -2
  226. package/dist/assistant/v1/generated/validators/uploadedResource.zod.js +3 -2
  227. package/dist/assistant/v1/generated/validators/usage.zod.d.ts +3 -2
  228. package/dist/assistant/v1/generated/validators/usage.zod.js +3 -2
  229. package/dist/assistant/v1/generated/validators/verifyCodeRequestBody.zod.d.ts +3 -2
  230. package/dist/assistant/v1/generated/validators/verifyCodeRequestBody.zod.js +3 -2
  231. package/dist/assistant/v1/generated/validators/webhookSecretResponseBody.zod.d.ts +3 -2
  232. package/dist/assistant/v1/generated/validators/webhookSecretResponseBody.zod.js +3 -2
  233. package/dist/eventbus/v1/generated/functions.d.ts +318 -41
  234. package/dist/eventbus/v1/generated/functions.js +203 -16
  235. package/dist/eventbus/v1/generated/models.d.ts +217 -26
  236. package/dist/eventbus/v1/generated/models.js +4 -0
  237. package/dist/eventbus/v1/generated/schemas.zod.d.ts +163 -30
  238. package/dist/eventbus/v1/generated/schemas.zod.js +175 -32
  239. package/dist/eventbus/v1/generated/validators/createEventRequest.zod.d.ts +59 -14
  240. package/dist/eventbus/v1/generated/validators/createEventRequest.zod.js +59 -14
  241. package/dist/eventbus/v1/generated/validators/createNamespaceRequest.zod.d.ts +94 -0
  242. package/dist/eventbus/v1/generated/validators/createNamespaceRequest.zod.js +99 -0
  243. package/dist/eventbus/v1/generated/validators/createVersionRequest.zod.d.ts +59 -14
  244. package/dist/eventbus/v1/generated/validators/createVersionRequest.zod.js +59 -14
  245. package/dist/eventbus/v1/generated/validators/cursorPagination.zod.d.ts +59 -14
  246. package/dist/eventbus/v1/generated/validators/cursorPagination.zod.js +59 -14
  247. package/dist/eventbus/v1/generated/validators/error.zod.d.ts +59 -14
  248. package/dist/eventbus/v1/generated/validators/error.zod.js +59 -14
  249. package/dist/eventbus/v1/generated/validators/errorStatus.zod.d.ts +59 -14
  250. package/dist/eventbus/v1/generated/validators/errorStatus.zod.js +59 -14
  251. package/dist/eventbus/v1/generated/validators/eventDetail.zod.d.ts +61 -14
  252. package/dist/eventbus/v1/generated/validators/eventDetail.zod.js +68 -15
  253. package/dist/eventbus/v1/generated/validators/eventList.zod.d.ts +60 -14
  254. package/dist/eventbus/v1/generated/validators/eventList.zod.js +59 -14
  255. package/dist/eventbus/v1/generated/validators/eventMessage.zod.d.ts +99 -0
  256. package/dist/eventbus/v1/generated/validators/eventMessage.zod.js +104 -0
  257. package/dist/eventbus/v1/generated/validators/eventResource.zod.d.ts +61 -14
  258. package/dist/eventbus/v1/generated/validators/eventResource.zod.js +68 -15
  259. package/dist/eventbus/v1/generated/validators/eventStatus.zod.d.ts +59 -14
  260. package/dist/eventbus/v1/generated/validators/eventStatus.zod.js +59 -14
  261. package/dist/eventbus/v1/generated/validators/eventVersion.zod.d.ts +59 -14
  262. package/dist/eventbus/v1/generated/validators/eventVersion.zod.js +59 -14
  263. package/dist/eventbus/v1/generated/validators/fieldViolation.zod.d.ts +59 -14
  264. package/dist/eventbus/v1/generated/validators/fieldViolation.zod.js +59 -14
  265. package/dist/eventbus/v1/generated/validators/listEventsParams.zod.d.ts +59 -14
  266. package/dist/eventbus/v1/generated/validators/listEventsParams.zod.js +59 -14
  267. package/dist/eventbus/v1/generated/validators/listNamespacesParams.zod.d.ts +98 -0
  268. package/dist/eventbus/v1/generated/validators/listNamespacesParams.zod.js +100 -0
  269. package/dist/eventbus/v1/generated/validators/namespaceList.zod.d.ts +103 -0
  270. package/dist/eventbus/v1/generated/validators/namespaceList.zod.js +95 -0
  271. package/dist/eventbus/v1/generated/validators/namespaceResource.zod.d.ts +99 -0
  272. package/dist/eventbus/v1/generated/validators/namespaceResource.zod.js +101 -0
  273. package/dist/eventbus/v1/generated/validators/namespaceStatus.zod.d.ts +90 -0
  274. package/dist/eventbus/v1/generated/validators/namespaceStatus.zod.js +87 -0
  275. package/dist/eventbus/v1/generated/validators/offsetPagination.zod.d.ts +59 -14
  276. package/dist/eventbus/v1/generated/validators/offsetPagination.zod.js +59 -14
  277. package/dist/eventbus/v1/generated/validators/publication.zod.d.ts +98 -0
  278. package/dist/eventbus/v1/generated/validators/publication.zod.js +111 -0
  279. package/dist/eventbus/v1/generated/validators/publishRequest.zod.d.ts +69 -20
  280. package/dist/eventbus/v1/generated/validators/publishRequest.zod.js +66 -27
  281. package/dist/eventbus/v1/generated/validators/publishResponse.zod.d.ts +65 -18
  282. package/dist/eventbus/v1/generated/validators/publishResponse.zod.js +63 -20
  283. package/dist/eventbus/v1/generated/validators/publishedMessage.zod.d.ts +92 -0
  284. package/dist/eventbus/v1/generated/validators/publishedMessage.zod.js +92 -0
  285. package/dist/eventbus/v1/generated/validators/realtimeTicket.zod.d.ts +61 -15
  286. package/dist/eventbus/v1/generated/validators/realtimeTicket.zod.js +69 -17
  287. package/dist/eventbus/v1/generated/validators/realtimeTicketRequest.zod.d.ts +91 -0
  288. package/dist/eventbus/v1/generated/validators/realtimeTicketRequest.zod.js +93 -0
  289. package/dist/eventbus/v1/generated/validators/updateEventRequest.zod.d.ts +59 -14
  290. package/dist/eventbus/v1/generated/validators/updateEventRequest.zod.js +59 -14
  291. package/dist/eventbus/v1/generated/validators/updateNamespaceRequest.zod.d.ts +94 -0
  292. package/dist/eventbus/v1/generated/validators/updateNamespaceRequest.zod.js +90 -0
  293. package/dist/iam/v1/generated/models.d.ts +6 -0
  294. package/dist/iam/v1/generated/schemas.zod.d.ts +2 -0
  295. package/dist/iam/v1/generated/validators/applicationResource.zod.d.ts +1 -0
  296. package/dist/iam/v1/generated/validators/applicationResource.zod.js +3 -0
  297. package/dist/iam/v1/generated/validators/createApplicationRequestBody.zod.d.ts +1 -0
  298. package/dist/iam/v1/generated/validators/createApplicationRequestBody.zod.js +4 -0
  299. package/dist/iam/v1/generated/validators/createApplicationResponseBody.zod.d.ts +1 -0
  300. package/dist/iam/v1/generated/validators/lengthAwarePageApplicationResource.zod.d.ts +1 -0
  301. package/dist/iam/v1/generated/validators/updateApplicationRequestBody.zod.d.ts +1 -0
  302. package/dist/iam/v1/generated/validators/updateApplicationRequestBody.zod.js +4 -0
  303. package/dist/notification/v1/generated/functions.d.ts +3 -58
  304. package/dist/notification/v1/generated/functions.js +2 -64
  305. package/dist/notification/v1/generated/models.d.ts +0 -47
  306. package/dist/notification/v1/generated/schemas.zod.d.ts +2 -17
  307. package/dist/notification/v1/generated/schemas.zod.js +2 -15
  308. package/dist/routes.d.ts +58 -34
  309. package/dist/routes.js +65 -38
  310. package/package.json +1 -1
  311. package/dist/assistant/v1/generated/validators/itemFrame.zod.d.ts +0 -36
  312. package/dist/assistant/v1/generated/validators/itemFrame.zod.js +0 -32
  313. package/dist/assistant/v1/generated/validators/openRealtimeParams.zod.d.ts +0 -31
  314. package/dist/assistant/v1/generated/validators/openRealtimeParams.zod.js +0 -29
  315. package/dist/assistant/v1/generated/validators/realtimeClientMessage.zod.d.ts +0 -38
  316. package/dist/assistant/v1/generated/validators/realtimeClientMessage.zod.js +0 -42
  317. package/dist/assistant/v1/generated/validators/realtimeExchange.zod.d.ts +0 -285
  318. package/dist/assistant/v1/generated/validators/realtimeExchange.zod.js +0 -33
  319. package/dist/assistant/v1/generated/validators/realtimeServerMessage.zod.d.ts +0 -274
  320. package/dist/assistant/v1/generated/validators/realtimeServerMessage.zod.js +0 -64
  321. package/dist/assistant/v1/generated/validators/realtimeTicketResource.zod.d.ts +0 -32
  322. package/dist/assistant/v1/generated/validators/realtimeTicketResource.zod.js +0 -30
  323. package/dist/notification/v1/generated/validators/authorizeRealtimeChannelRequestBody.zod.d.ts +0 -70
  324. package/dist/notification/v1/generated/validators/authorizeRealtimeChannelRequestBody.zod.js +0 -76
  325. package/dist/notification/v1/generated/validators/realtimeAuthResource.zod.d.ts +0 -67
  326. package/dist/notification/v1/generated/validators/realtimeAuthResource.zod.js +0 -67
  327. package/dist/notification/v1/generated/validators/realtimeConnectionResource.zod.d.ts +0 -76
  328. package/dist/notification/v1/generated/validators/realtimeConnectionResource.zod.js +0 -88
@@ -4,20 +4,18 @@
4
4
  * Leaflow Event Bus API
5
5
  * Event definitions, versions, publishing, and realtime access.
6
6
  *
7
- * ## Authentication
8
- *
9
- * Every request carries a scoped token; see the `bearerAuth` security scheme. Neither the path
10
- * nor the headers carry a `project_id`: the current project is determined by the token.
11
- *
12
7
  * ## Definitions and messages
13
8
  *
14
9
  * An event is a definition: a name, a description, and one or more versions. A version carries a
15
10
  * JSON Schema that every published payload must satisfy. Messages are not stored here and are
16
11
  * not part of the event definition.
17
12
  *
18
- * A project event belongs to the current project. A global event has no `project_id`; it is
19
- * defined by a platform service and is read-only in this API. Global events are listed alongside
20
- * the project's own events.
13
+ * Every event belongs to a namespace, and its name is the namespace's name, a dot, and at least a
14
+ * resource and an action, such as `acme.order.created`. A project creates its own namespaces and
15
+ * defines events in them. Platform namespaces, such as `leaflow.notification`, are maintained by
16
+ * platform services: their events are listed alongside the project's own and can be subscribed
17
+ * to, but cannot be changed or published here, and the namespaces cannot be changed or deleted.
18
+ * Events in a platform namespace are called platform events below.
21
19
  *
22
20
  * A version number never changes meaning. Adding optional properties is allowed within a version;
23
21
  * a breaking change creates a new version. Publishing without a version uses the highest active
@@ -25,21 +23,132 @@
25
23
  *
26
24
  * ## Publishing
27
25
  *
28
- * Publishing returns the identity of the message and does not wait for consumers. Messages are
29
- * not stored and are not replayed: a consumer that connects later does not receive earlier
30
- * messages. Consumers receive messages through the realtime API or the platform's service API.
26
+ * Messages are published in batches of up to 64. A batch is validated as a whole: if any message
27
+ * is rejected, none is published. Publishing returns the identity of each message and does not
28
+ * wait for consumers. Messages are not stored and are not replayed: a consumer that connects
29
+ * later does not receive earlier messages.
30
+ *
31
+ * Messages published through this API are sent to the current project. A message may name one
32
+ * `subject`, a member of the project; it is then sent to that member only. Without a subject it is
33
+ * sent to every member of the project.
34
+ *
35
+ * Every publication names a `client_id`. It starts with the prefix returned with a realtime
36
+ * ticket, `user.{user_id}.project.{project_id}.`, followed by one segment chosen by the
37
+ * client, such as a random identifier per browser tab. Receivers get it unchanged, so a client
38
+ * can recognise its own messages. A client ID does not need to be unique: several connections
39
+ * may share one.
31
40
  *
32
41
  * ## Realtime
33
42
  *
34
- * Create a ticket, connect to the returned URL with the ticket, and authenticate the connection
35
- * with a scoped token. A ticket is single-use and short-lived. The connection ends when the
36
- * token expires unless it is refreshed with a new scoped token for the same user and project.
43
+ * Every message has a topic `{event}/{project_id|-}/{subject|-}/{key levels}`, where `-` stands
44
+ * for a missing recipient and the key, split at `/`, supplies the remaining levels. A topic filter
45
+ * uses `+` to match exactly one level and `#`, only as the last level, to match that level and
46
+ * every level below it, including none. For example, `{event}/{project_id}/-/#` matches every
47
+ * message sent to the members of a project, and `{event}/-/{user_id}/#` every message sent to one
48
+ * person outside any project.
49
+ *
50
+ * 1. Create a ticket with `POST /api/v1/realtime/tickets`, naming the events to receive. The
51
+ * response lists the topic filters the ticket covers and the `client_id_prefix` to use. For a
52
+ * platform event they cover messages sent to the caller, messages sent to no recipient and,
53
+ * where the caller's permissions allow, messages sent within the project; for a project event
54
+ * they cover messages sent within the project. Without a selected project, use
55
+ * `POST /api/v1/account/realtime/tickets`; such a ticket covers only messages sent to the
56
+ * caller or to no recipient, and cannot publish.
57
+ * 2. Open a WebSocket to `wss://eventbus.leaflow.cloud/realtime` and send, within 15 seconds:
58
+ * `{"type":"authenticate","ticket":"…","client_id":"…"}`. The reply is
59
+ * `{"type":"authenticated","client_id":"…","connection_id":"…","expires_at":"…"}`.
60
+ * `connection_id` identifies this connection; it is assigned by EventBus and changes on
61
+ * every reconnection.
62
+ * 3. Send `{"type":"subscribe","id":"…","topics":[…]}`. Each topic must be one of the returned
63
+ * `topics` or lie within one of them, for example by naming a key level where the ticket has
64
+ * `#`; a batch with any other topic is rejected as a whole. The reply is `subscribed`.
65
+ * `unsubscribe` takes the same form and replies `unsubscribed`. Both may be sent at any time
66
+ * while the connection is open.
67
+ * 4. Messages arrive as `{"type":"messages","messages":[…]}`, each element an `EventMessage`. A
68
+ * message matching several subscriptions on one connection arrives once for each of them.
69
+ * 5. A connection may switch to another ticket of the same user at any time by sending
70
+ * `authenticate` again: to renew before `expires_at`, to move from an account ticket to a
71
+ * project ticket, or to move to another project. `client_id` may be omitted while the
72
+ * `client_id_prefix` stays the same; when it changes, a client ID under the new prefix is
73
+ * required. Subscriptions the new ticket does not cover are removed at once and reported in a
74
+ * `{"type":"revoked","topics":[…]}` frame. A ticket for another user closes the connection
75
+ * with code 4401, as does letting the ticket expire.
76
+ *
77
+ * A connection holding a project ticket may publish the project's own events with
78
+ * `{"type":"publish","id":"…","messages":[{"event":"…","key":"…","subject":"…","data":{…}}]}`;
79
+ * the reply is `published` with the identity of each message. `ping` is answered with `pong`.
80
+ * A rejected request is answered with `{"type":"error","id":"…","code":"…","message":"…"}`.
81
+ * Every reply carries the `id` of the request it answers.
37
82
  * OpenAPI spec version: 1.0.0
38
83
  */
39
84
  import * as zod from "zod";
40
85
  /**
41
- * Returns the global events visible to the project and the project's own events. Ordered by
42
- * name.
86
+ * Returns the platform namespaces followed by the project's own, each group ordered by name.
87
+ * Archived namespaces are omitted unless `include_archived` is true.
88
+ * @summary List namespaces
89
+ */
90
+ export declare const listNamespacesQueryPageDefault = 1;
91
+ export declare const listNamespacesQueryPageMax = 2147483647;
92
+ export declare const listNamespacesQueryPageSizeDefault = 50;
93
+ export declare const listNamespacesQueryPageSizeMax = 200;
94
+ export declare const listNamespacesQueryKeywordMax = 128;
95
+ export declare const listNamespacesQueryIncludeArchivedDefault = false;
96
+ export declare const ListNamespacesQueryParams: zod.ZodObject<{
97
+ page: zod.ZodDefault<zod.ZodInt>;
98
+ page_size: zod.ZodDefault<zod.ZodInt>;
99
+ keyword: zod.ZodOptional<zod.ZodString>;
100
+ include_archived: zod.ZodDefault<zod.ZodBoolean>;
101
+ }, zod.z.core.$strict>;
102
+ /**
103
+ * Creates a namespace in the current project. Its name is a single segment, unique within the
104
+ * project; names reserved for the platform are rejected.
105
+ * @summary Create a namespace
106
+ */
107
+ export declare const CreateNamespaceBody: zod.ZodObject<{
108
+ name: zod.ZodString;
109
+ description: zod.ZodDefault<zod.ZodString>;
110
+ }, zod.z.core.$strict>;
111
+ /**
112
+ * Returns a platform namespace or one of the project's own.
113
+ * @summary Get a namespace
114
+ */
115
+ export declare const getNamespacePathNamespaceNameMax = 64;
116
+ export declare const getNamespacePathNamespaceNameRegExp: RegExp;
117
+ export declare const GetNamespaceParams: zod.ZodObject<{
118
+ namespaceName: zod.ZodString;
119
+ }, zod.z.core.$strict>;
120
+ /**
121
+ * Changes the description or status of one of the project's namespaces. Only the fields
122
+ * present in the request are changed. While a namespace is archived, its events cannot be
123
+ * created, published or subscribed to; restoring it lifts that. Platform namespaces cannot be
124
+ * changed.
125
+ * @summary Update a namespace
126
+ */
127
+ export declare const updateNamespacePathNamespaceNameMax = 64;
128
+ export declare const updateNamespacePathNamespaceNameRegExp: RegExp;
129
+ export declare const UpdateNamespaceParams: zod.ZodObject<{
130
+ namespaceName: zod.ZodString;
131
+ }, zod.z.core.$strict>;
132
+ export declare const UpdateNamespaceBody: zod.ZodObject<{
133
+ description: zod.ZodOptional<zod.ZodString>;
134
+ status: zod.ZodOptional<zod.ZodEnum<{
135
+ active: "active";
136
+ archived: "archived";
137
+ }>>;
138
+ }, zod.z.core.$strict>;
139
+ /**
140
+ * Deletes one of the project's namespaces together with every event and version in it.
141
+ * Publishing or subscribing to those events fails from then on. Platform namespaces cannot be
142
+ * deleted.
143
+ * @summary Delete a namespace
144
+ */
145
+ export declare const deleteNamespacePathNamespaceNameMax = 64;
146
+ export declare const deleteNamespacePathNamespaceNameRegExp: RegExp;
147
+ export declare const DeleteNamespaceParams: zod.ZodObject<{
148
+ namespaceName: zod.ZodString;
149
+ }, zod.z.core.$strict>;
150
+ /**
151
+ * Returns the platform events and the project's own events. Ordered by name.
43
152
  * @summary List event definitions
44
153
  */
45
154
  export declare const listEventsQueryPageDefault = 1;
@@ -57,8 +166,8 @@ export declare const ListEventsQueryParams: zod.ZodObject<{
57
166
  include_archived: zod.ZodDefault<zod.ZodBoolean>;
58
167
  }, zod.z.core.$strict>;
59
168
  /**
60
- * Creates a project event with its first version. The name is unique within the project. The
61
- * first segment of the name is the event's namespace and must not be a platform namespace.
169
+ * Creates an event with its first version in one of the project's namespaces. The first
170
+ * segment of the name is that namespace, followed by at least a resource and an action.
62
171
  * @summary Create an event definition
63
172
  */
64
173
  export declare const CreateEventBody: zod.ZodObject<{
@@ -121,18 +230,42 @@ export declare const GetEventVersionParams: zod.ZodObject<{
121
230
  version: zod.ZodInt;
122
231
  }, zod.z.core.$strict>;
123
232
  /**
124
- * Validates the payload against the selected version and publishes the message. The response
125
- * carries the message identity; it does not mean a consumer received it. A version of zero
126
- * selects the highest active version.
127
- * @summary Publish an event message
233
+ * Validates every message against its selected version and publishes the batch. If any message
234
+ * is rejected, none is published. The response carries the identity of each message in request
235
+ * order; it does not mean a consumer received it. Only events defined by the current project can
236
+ * be published here.
237
+ * @summary Publish event messages
128
238
  */
129
- export declare const publishEventPathEventNameMax = 128;
130
- export declare const publishEventPathEventNameRegExp: RegExp;
131
- export declare const PublishEventParams: zod.ZodObject<{
132
- eventName: zod.ZodString;
239
+ export declare const PublishEventsBody: zod.ZodObject<{
240
+ client_id: zod.ZodString;
241
+ messages: zod.ZodArray<zod.ZodObject<{
242
+ event: zod.ZodString;
243
+ version: zod.ZodDefault<zod.ZodInt>;
244
+ key: zod.ZodOptional<zod.ZodString>;
245
+ subject: zod.ZodOptional<zod.ZodString>;
246
+ data: zod.ZodRecord<zod.ZodString, zod.ZodUnknown>;
247
+ }, zod.z.core.$strict>>;
133
248
  }, zod.z.core.$strict>;
134
- export declare const PublishEventBody: zod.ZodObject<{
135
- version: zod.ZodDefault<zod.ZodInt>;
136
- key: zod.ZodOptional<zod.ZodString>;
137
- data: zod.ZodRecord<zod.ZodString, zod.ZodUnknown>;
249
+ /**
250
+ * Issues a short-lived ticket for the named events in the current project. For an event defined
251
+ * by the project, the ticket covers messages sent to the members of the project and messages
252
+ * sent to the caller within it. For a platform event, it also covers messages sent to the caller
253
+ * outside any project and messages sent to no recipient; messages sent within the project are
254
+ * covered as far as the caller's current permissions allow, which may be limited to some
255
+ * resources or to none. The caller must still be a member of the project. The ticket lives no
256
+ * longer than the scoped token it was created with. It is not a bearer token for other APIs.
257
+ * @summary Create a realtime ticket
258
+ */
259
+ export declare const CreateRealtimeTicketBody: zod.ZodObject<{
260
+ events: zod.ZodArray<zod.ZodString>;
261
+ }, zod.z.core.$strict>;
262
+ /**
263
+ * Issues a short-lived ticket for a caller who has not selected a project, or belongs to none. Only
264
+ * platform events are accepted, and the ticket covers only messages sent to the caller outside
265
+ * any project or to no recipient. The ticket cannot publish. Its `client_id_prefix` is `user.{user_id}.`. The
266
+ * ticket lives no longer than the token it was created with.
267
+ * @summary Create an account realtime ticket
268
+ */
269
+ export declare const CreateAccountRealtimeTicketBody: zod.ZodObject<{
270
+ events: zod.ZodArray<zod.ZodString>;
138
271
  }, zod.z.core.$strict>;
@@ -4,20 +4,18 @@
4
4
  * Leaflow Event Bus API
5
5
  * Event definitions, versions, publishing, and realtime access.
6
6
  *
7
- * ## Authentication
8
- *
9
- * Every request carries a scoped token; see the `bearerAuth` security scheme. Neither the path
10
- * nor the headers carry a `project_id`: the current project is determined by the token.
11
- *
12
7
  * ## Definitions and messages
13
8
  *
14
9
  * An event is a definition: a name, a description, and one or more versions. A version carries a
15
10
  * JSON Schema that every published payload must satisfy. Messages are not stored here and are
16
11
  * not part of the event definition.
17
12
  *
18
- * A project event belongs to the current project. A global event has no `project_id`; it is
19
- * defined by a platform service and is read-only in this API. Global events are listed alongside
20
- * the project's own events.
13
+ * Every event belongs to a namespace, and its name is the namespace's name, a dot, and at least a
14
+ * resource and an action, such as `acme.order.created`. A project creates its own namespaces and
15
+ * defines events in them. Platform namespaces, such as `leaflow.notification`, are maintained by
16
+ * platform services: their events are listed alongside the project's own and can be subscribed
17
+ * to, but cannot be changed or published here, and the namespaces cannot be changed or deleted.
18
+ * Events in a platform namespace are called platform events below.
21
19
  *
22
20
  * A version number never changes meaning. Adding optional properties is allowed within a version;
23
21
  * a breaking change creates a new version. Publishing without a version uses the highest active
@@ -25,25 +23,159 @@
25
23
  *
26
24
  * ## Publishing
27
25
  *
28
- * Publishing returns the identity of the message and does not wait for consumers. Messages are
29
- * not stored and are not replayed: a consumer that connects later does not receive earlier
30
- * messages. Consumers receive messages through the realtime API or the platform's service API.
26
+ * Messages are published in batches of up to 64. A batch is validated as a whole: if any message
27
+ * is rejected, none is published. Publishing returns the identity of each message and does not
28
+ * wait for consumers. Messages are not stored and are not replayed: a consumer that connects
29
+ * later does not receive earlier messages.
30
+ *
31
+ * Messages published through this API are sent to the current project. A message may name one
32
+ * `subject`, a member of the project; it is then sent to that member only. Without a subject it is
33
+ * sent to every member of the project.
34
+ *
35
+ * Every publication names a `client_id`. It starts with the prefix returned with a realtime
36
+ * ticket, `user.{user_id}.project.{project_id}.`, followed by one segment chosen by the
37
+ * client, such as a random identifier per browser tab. Receivers get it unchanged, so a client
38
+ * can recognise its own messages. A client ID does not need to be unique: several connections
39
+ * may share one.
31
40
  *
32
41
  * ## Realtime
33
42
  *
34
- * Create a ticket, connect to the returned URL with the ticket, and authenticate the connection
35
- * with a scoped token. A ticket is single-use and short-lived. The connection ends when the
36
- * token expires unless it is refreshed with a new scoped token for the same user and project.
43
+ * Every message has a topic `{event}/{project_id|-}/{subject|-}/{key levels}`, where `-` stands
44
+ * for a missing recipient and the key, split at `/`, supplies the remaining levels. A topic filter
45
+ * uses `+` to match exactly one level and `#`, only as the last level, to match that level and
46
+ * every level below it, including none. For example, `{event}/{project_id}/-/#` matches every
47
+ * message sent to the members of a project, and `{event}/-/{user_id}/#` every message sent to one
48
+ * person outside any project.
49
+ *
50
+ * 1. Create a ticket with `POST /api/v1/realtime/tickets`, naming the events to receive. The
51
+ * response lists the topic filters the ticket covers and the `client_id_prefix` to use. For a
52
+ * platform event they cover messages sent to the caller, messages sent to no recipient and,
53
+ * where the caller's permissions allow, messages sent within the project; for a project event
54
+ * they cover messages sent within the project. Without a selected project, use
55
+ * `POST /api/v1/account/realtime/tickets`; such a ticket covers only messages sent to the
56
+ * caller or to no recipient, and cannot publish.
57
+ * 2. Open a WebSocket to `wss://eventbus.leaflow.cloud/realtime` and send, within 15 seconds:
58
+ * `{"type":"authenticate","ticket":"…","client_id":"…"}`. The reply is
59
+ * `{"type":"authenticated","client_id":"…","connection_id":"…","expires_at":"…"}`.
60
+ * `connection_id` identifies this connection; it is assigned by EventBus and changes on
61
+ * every reconnection.
62
+ * 3. Send `{"type":"subscribe","id":"…","topics":[…]}`. Each topic must be one of the returned
63
+ * `topics` or lie within one of them, for example by naming a key level where the ticket has
64
+ * `#`; a batch with any other topic is rejected as a whole. The reply is `subscribed`.
65
+ * `unsubscribe` takes the same form and replies `unsubscribed`. Both may be sent at any time
66
+ * while the connection is open.
67
+ * 4. Messages arrive as `{"type":"messages","messages":[…]}`, each element an `EventMessage`. A
68
+ * message matching several subscriptions on one connection arrives once for each of them.
69
+ * 5. A connection may switch to another ticket of the same user at any time by sending
70
+ * `authenticate` again: to renew before `expires_at`, to move from an account ticket to a
71
+ * project ticket, or to move to another project. `client_id` may be omitted while the
72
+ * `client_id_prefix` stays the same; when it changes, a client ID under the new prefix is
73
+ * required. Subscriptions the new ticket does not cover are removed at once and reported in a
74
+ * `{"type":"revoked","topics":[…]}` frame. A ticket for another user closes the connection
75
+ * with code 4401, as does letting the ticket expire.
76
+ *
77
+ * A connection holding a project ticket may publish the project's own events with
78
+ * `{"type":"publish","id":"…","messages":[{"event":"…","key":"…","subject":"…","data":{…}}]}`;
79
+ * the reply is `published` with the identity of each message. `ping` is answered with `pong`.
80
+ * A rejected request is answered with `{"type":"error","id":"…","code":"…","message":"…"}`.
81
+ * Every reply carries the `id` of the request it answers.
37
82
  * OpenAPI spec version: 1.0.0
38
83
  */
39
84
  import * as zod from "zod";
40
85
  import { CreateEventRequest } from "./validators/createEventRequest.zod.js";
86
+ import { CreateNamespaceRequest } from "./validators/createNamespaceRequest.zod.js";
41
87
  import { CreateVersionRequest } from "./validators/createVersionRequest.zod.js";
42
88
  import { PublishRequest } from "./validators/publishRequest.zod.js";
89
+ import { RealtimeTicketRequest } from "./validators/realtimeTicketRequest.zod.js";
43
90
  import { UpdateEventRequest } from "./validators/updateEventRequest.zod.js";
91
+ import { UpdateNamespaceRequest } from "./validators/updateNamespaceRequest.zod.js";
92
+ /**
93
+ * Returns the platform namespaces followed by the project's own, each group ordered by name.
94
+ * Archived namespaces are omitted unless `include_archived` is true.
95
+ * @summary List namespaces
96
+ */
97
+ export const listNamespacesQueryPageDefault = 1;
98
+ export const listNamespacesQueryPageMax = 2147483647;
99
+ export const listNamespacesQueryPageSizeDefault = 50;
100
+ export const listNamespacesQueryPageSizeMax = 200;
101
+ export const listNamespacesQueryKeywordMax = 128;
102
+ export const listNamespacesQueryIncludeArchivedDefault = false;
103
+ export const ListNamespacesQueryParams = zod.strictObject({
104
+ page: zod
105
+ .int()
106
+ .min(1)
107
+ .max(listNamespacesQueryPageMax)
108
+ .default(listNamespacesQueryPageDefault)
109
+ .describe("1-based page number. Defaults to 1."),
110
+ page_size: zod
111
+ .int()
112
+ .min(1)
113
+ .max(listNamespacesQueryPageSizeMax)
114
+ .default(listNamespacesQueryPageSizeDefault)
115
+ .describe("Items per page. Defaults to 50; at most 200."),
116
+ keyword: zod
117
+ .string()
118
+ .max(listNamespacesQueryKeywordMax)
119
+ .optional()
120
+ .describe("Match the namespace name or description, case-insensitively"),
121
+ include_archived: zod
122
+ .boolean()
123
+ .default(listNamespacesQueryIncludeArchivedDefault)
124
+ .describe("Include archived namespaces; defaults to false"),
125
+ });
44
126
  /**
45
- * Returns the global events visible to the project and the project's own events. Ordered by
46
- * name.
127
+ * Creates a namespace in the current project. Its name is a single segment, unique within the
128
+ * project; names reserved for the platform are rejected.
129
+ * @summary Create a namespace
130
+ */
131
+ export const CreateNamespaceBody = CreateNamespaceRequest;
132
+ /**
133
+ * Returns a platform namespace or one of the project's own.
134
+ * @summary Get a namespace
135
+ */
136
+ export const getNamespacePathNamespaceNameMax = 64;
137
+ export const getNamespacePathNamespaceNameRegExp = new RegExp("^[a-z](?:[a-z0-9_]*[a-z0-9])?(?:\\.[a-z](?:[a-z0-9_]*[a-z0-9])?)*$");
138
+ export const GetNamespaceParams = zod.strictObject({
139
+ namespaceName: zod
140
+ .string()
141
+ .max(getNamespacePathNamespaceNameMax)
142
+ .regex(getNamespacePathNamespaceNameRegExp)
143
+ .describe("The namespace's name, such as `acme`"),
144
+ });
145
+ /**
146
+ * Changes the description or status of one of the project's namespaces. Only the fields
147
+ * present in the request are changed. While a namespace is archived, its events cannot be
148
+ * created, published or subscribed to; restoring it lifts that. Platform namespaces cannot be
149
+ * changed.
150
+ * @summary Update a namespace
151
+ */
152
+ export const updateNamespacePathNamespaceNameMax = 64;
153
+ export const updateNamespacePathNamespaceNameRegExp = new RegExp("^[a-z](?:[a-z0-9_]*[a-z0-9])?(?:\\.[a-z](?:[a-z0-9_]*[a-z0-9])?)*$");
154
+ export const UpdateNamespaceParams = zod.strictObject({
155
+ namespaceName: zod
156
+ .string()
157
+ .max(updateNamespacePathNamespaceNameMax)
158
+ .regex(updateNamespacePathNamespaceNameRegExp)
159
+ .describe("The namespace's name, such as `acme`"),
160
+ });
161
+ export const UpdateNamespaceBody = UpdateNamespaceRequest;
162
+ /**
163
+ * Deletes one of the project's namespaces together with every event and version in it.
164
+ * Publishing or subscribing to those events fails from then on. Platform namespaces cannot be
165
+ * deleted.
166
+ * @summary Delete a namespace
167
+ */
168
+ export const deleteNamespacePathNamespaceNameMax = 64;
169
+ export const deleteNamespacePathNamespaceNameRegExp = new RegExp("^[a-z](?:[a-z0-9_]*[a-z0-9])?(?:\\.[a-z](?:[a-z0-9_]*[a-z0-9])?)*$");
170
+ export const DeleteNamespaceParams = zod.strictObject({
171
+ namespaceName: zod
172
+ .string()
173
+ .max(deleteNamespacePathNamespaceNameMax)
174
+ .regex(deleteNamespacePathNamespaceNameRegExp)
175
+ .describe("The namespace's name, such as `acme`"),
176
+ });
177
+ /**
178
+ * Returns the platform events and the project's own events. Ordered by name.
47
179
  * @summary List event definitions
48
180
  */
49
181
  export const listEventsQueryPageDefault = 1;
@@ -82,8 +214,8 @@ export const ListEventsQueryParams = zod.strictObject({
82
214
  .describe("Include archived events; defaults to false"),
83
215
  });
84
216
  /**
85
- * Creates a project event with its first version. The name is unique within the project. The
86
- * first segment of the name is the event's namespace and must not be a platform namespace.
217
+ * Creates an event with its first version in one of the project's namespaces. The first
218
+ * segment of the name is that namespace, followed by at least a resource and an action.
87
219
  * @summary Create an event definition
88
220
  */
89
221
  export const CreateEventBody = CreateEventRequest;
@@ -146,18 +278,29 @@ export const GetEventVersionParams = zod.strictObject({
146
278
  version: zod.int().min(1).describe("The version number, starting at 1"),
147
279
  });
148
280
  /**
149
- * Validates the payload against the selected version and publishes the message. The response
150
- * carries the message identity; it does not mean a consumer received it. A version of zero
151
- * selects the highest active version.
152
- * @summary Publish an event message
281
+ * Validates every message against its selected version and publishes the batch. If any message
282
+ * is rejected, none is published. The response carries the identity of each message in request
283
+ * order; it does not mean a consumer received it. Only events defined by the current project can
284
+ * be published here.
285
+ * @summary Publish event messages
153
286
  */
154
- export const publishEventPathEventNameMax = 128;
155
- export const publishEventPathEventNameRegExp = new RegExp("^[a-z](?:[a-z0-9_]*[a-z0-9])?(?:\\.[a-z](?:[a-z0-9_]*[a-z0-9])?){2,}$");
156
- export const PublishEventParams = zod.strictObject({
157
- eventName: zod
158
- .string()
159
- .max(publishEventPathEventNameMax)
160
- .regex(publishEventPathEventNameRegExp)
161
- .describe("The event's full name, such as `acme.order.created`"),
162
- });
163
- export const PublishEventBody = PublishRequest;
287
+ export const PublishEventsBody = PublishRequest;
288
+ /**
289
+ * Issues a short-lived ticket for the named events in the current project. For an event defined
290
+ * by the project, the ticket covers messages sent to the members of the project and messages
291
+ * sent to the caller within it. For a platform event, it also covers messages sent to the caller
292
+ * outside any project and messages sent to no recipient; messages sent within the project are
293
+ * covered as far as the caller's current permissions allow, which may be limited to some
294
+ * resources or to none. The caller must still be a member of the project. The ticket lives no
295
+ * longer than the scoped token it was created with. It is not a bearer token for other APIs.
296
+ * @summary Create a realtime ticket
297
+ */
298
+ export const CreateRealtimeTicketBody = RealtimeTicketRequest;
299
+ /**
300
+ * Issues a short-lived ticket for a caller who has not selected a project, or belongs to none. Only
301
+ * platform events are accepted, and the ticket covers only messages sent to the caller outside
302
+ * any project or to no recipient. The ticket cannot publish. Its `client_id_prefix` is `user.{user_id}.`. The
303
+ * ticket lives no longer than the token it was created with.
304
+ * @summary Create an account realtime ticket
305
+ */
306
+ export const CreateAccountRealtimeTicketBody = RealtimeTicketRequest;
@@ -4,20 +4,18 @@
4
4
  * Leaflow Event Bus API
5
5
  * Event definitions, versions, publishing, and realtime access.
6
6
  *
7
- * ## Authentication
8
- *
9
- * Every request carries a scoped token; see the `bearerAuth` security scheme. Neither the path
10
- * nor the headers carry a `project_id`: the current project is determined by the token.
11
- *
12
7
  * ## Definitions and messages
13
8
  *
14
9
  * An event is a definition: a name, a description, and one or more versions. A version carries a
15
10
  * JSON Schema that every published payload must satisfy. Messages are not stored here and are
16
11
  * not part of the event definition.
17
12
  *
18
- * A project event belongs to the current project. A global event has no `project_id`; it is
19
- * defined by a platform service and is read-only in this API. Global events are listed alongside
20
- * the project's own events.
13
+ * Every event belongs to a namespace, and its name is the namespace's name, a dot, and at least a
14
+ * resource and an action, such as `acme.order.created`. A project creates its own namespaces and
15
+ * defines events in them. Platform namespaces, such as `leaflow.notification`, are maintained by
16
+ * platform services: their events are listed alongside the project's own and can be subscribed
17
+ * to, but cannot be changed or published here, and the namespaces cannot be changed or deleted.
18
+ * Events in a platform namespace are called platform events below.
21
19
  *
22
20
  * A version number never changes meaning. Adding optional properties is allowed within a version;
23
21
  * a breaking change creates a new version. Publishing without a version uses the highest active
@@ -25,15 +23,62 @@
25
23
  *
26
24
  * ## Publishing
27
25
  *
28
- * Publishing returns the identity of the message and does not wait for consumers. Messages are
29
- * not stored and are not replayed: a consumer that connects later does not receive earlier
30
- * messages. Consumers receive messages through the realtime API or the platform's service API.
26
+ * Messages are published in batches of up to 64. A batch is validated as a whole: if any message
27
+ * is rejected, none is published. Publishing returns the identity of each message and does not
28
+ * wait for consumers. Messages are not stored and are not replayed: a consumer that connects
29
+ * later does not receive earlier messages.
30
+ *
31
+ * Messages published through this API are sent to the current project. A message may name one
32
+ * `subject`, a member of the project; it is then sent to that member only. Without a subject it is
33
+ * sent to every member of the project.
34
+ *
35
+ * Every publication names a `client_id`. It starts with the prefix returned with a realtime
36
+ * ticket, `user.{user_id}.project.{project_id}.`, followed by one segment chosen by the
37
+ * client, such as a random identifier per browser tab. Receivers get it unchanged, so a client
38
+ * can recognise its own messages. A client ID does not need to be unique: several connections
39
+ * may share one.
31
40
  *
32
41
  * ## Realtime
33
42
  *
34
- * Create a ticket, connect to the returned URL with the ticket, and authenticate the connection
35
- * with a scoped token. A ticket is single-use and short-lived. The connection ends when the
36
- * token expires unless it is refreshed with a new scoped token for the same user and project.
43
+ * Every message has a topic `{event}/{project_id|-}/{subject|-}/{key levels}`, where `-` stands
44
+ * for a missing recipient and the key, split at `/`, supplies the remaining levels. A topic filter
45
+ * uses `+` to match exactly one level and `#`, only as the last level, to match that level and
46
+ * every level below it, including none. For example, `{event}/{project_id}/-/#` matches every
47
+ * message sent to the members of a project, and `{event}/-/{user_id}/#` every message sent to one
48
+ * person outside any project.
49
+ *
50
+ * 1. Create a ticket with `POST /api/v1/realtime/tickets`, naming the events to receive. The
51
+ * response lists the topic filters the ticket covers and the `client_id_prefix` to use. For a
52
+ * platform event they cover messages sent to the caller, messages sent to no recipient and,
53
+ * where the caller's permissions allow, messages sent within the project; for a project event
54
+ * they cover messages sent within the project. Without a selected project, use
55
+ * `POST /api/v1/account/realtime/tickets`; such a ticket covers only messages sent to the
56
+ * caller or to no recipient, and cannot publish.
57
+ * 2. Open a WebSocket to `wss://eventbus.leaflow.cloud/realtime` and send, within 15 seconds:
58
+ * `{"type":"authenticate","ticket":"…","client_id":"…"}`. The reply is
59
+ * `{"type":"authenticated","client_id":"…","connection_id":"…","expires_at":"…"}`.
60
+ * `connection_id` identifies this connection; it is assigned by EventBus and changes on
61
+ * every reconnection.
62
+ * 3. Send `{"type":"subscribe","id":"…","topics":[…]}`. Each topic must be one of the returned
63
+ * `topics` or lie within one of them, for example by naming a key level where the ticket has
64
+ * `#`; a batch with any other topic is rejected as a whole. The reply is `subscribed`.
65
+ * `unsubscribe` takes the same form and replies `unsubscribed`. Both may be sent at any time
66
+ * while the connection is open.
67
+ * 4. Messages arrive as `{"type":"messages","messages":[…]}`, each element an `EventMessage`. A
68
+ * message matching several subscriptions on one connection arrives once for each of them.
69
+ * 5. A connection may switch to another ticket of the same user at any time by sending
70
+ * `authenticate` again: to renew before `expires_at`, to move from an account ticket to a
71
+ * project ticket, or to move to another project. `client_id` may be omitted while the
72
+ * `client_id_prefix` stays the same; when it changes, a client ID under the new prefix is
73
+ * required. Subscriptions the new ticket does not cover are removed at once and reported in a
74
+ * `{"type":"revoked","topics":[…]}` frame. A ticket for another user closes the connection
75
+ * with code 4401, as does letting the ticket expire.
76
+ *
77
+ * A connection holding a project ticket may publish the project's own events with
78
+ * `{"type":"publish","id":"…","messages":[{"event":"…","key":"…","subject":"…","data":{…}}]}`;
79
+ * the reply is `published` with the identity of each message. `ping` is answered with `pong`.
80
+ * A rejected request is answered with `{"type":"error","id":"…","code":"…","message":"…"}`.
81
+ * Every reply carries the `id` of the request it answers.
37
82
  * OpenAPI spec version: 1.0.0
38
83
  */
39
84
  import * as zod from "zod";