@leaflow/sdk 0.0.0-dev.437.gc278ab8 → 0.0.0-dev.441.gdbb8c45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assistant/v1/generated/functions.d.ts +25 -58
- package/dist/assistant/v1/generated/functions.js +16 -54
- package/dist/assistant/v1/generated/models.d.ts +3 -105
- package/dist/assistant/v1/generated/models.js +0 -25
- package/dist/assistant/v1/generated/schemas.zod.d.ts +11 -12
- package/dist/assistant/v1/generated/schemas.zod.js +14 -12
- package/dist/assistant/v1/generated/validators/answerQuestionRequestBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/answerQuestionRequestBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/approvalMode.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/approvalMode.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/attachmentResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/attachmentResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/bindingCodeResponseBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/bindingCodeResponseBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/bindingResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/bindingResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/channelResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/channelResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/channelWithSecretResponseBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/channelWithSecretResponseBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/checkSenderParams.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/checkSenderParams.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/choiceResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/choiceResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/clientActionRequest.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/clientActionRequest.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/clientContextPart.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/clientContextPart.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/clientContextRequest.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/clientContextRequest.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/clientFunctionRequest.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/clientFunctionRequest.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/completeUploadRequestBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/completeUploadRequestBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/contextUsageResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/contextUsageResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/createChannelRequestBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/createChannelRequestBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/createFolderRequestBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/createFolderRequestBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/createTaskRequestBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/createTaskRequestBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/createThreadRequestBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/createThreadRequestBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/createThreadResponseBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/createThreadResponseBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/createUploadRequestBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/createUploadRequestBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/credentialFieldResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/credentialFieldResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/cursorPagination.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/cursorPagination.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/decideToolCallsRequestBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/decideToolCallsRequestBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/defaultModelResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/defaultModelResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/error.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/error.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/errorStatus.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/errorStatus.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/fieldViolation.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/fieldViolation.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/fileDiffResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/fileDiffResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/folderCountsResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/folderCountsResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/folderListResponseBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/folderListResponseBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/folderResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/folderResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/itemSourceResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/itemSourceResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/lastTurnResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/lastTurnResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/lengthAwarePageBindingResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/lengthAwarePageBindingResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/lengthAwarePageChannelResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/lengthAwarePageChannelResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/listBindingsParams.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/listBindingsParams.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/listChannelRejectionsParams.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/listChannelRejectionsParams.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/listChannelsParams.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/listChannelsParams.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/listTaskRunsParams.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/listTaskRunsParams.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/listThreadItemsParams.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/listThreadItemsParams.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/listThreadMessagesParams.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/listThreadMessagesParams.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/listThreadTurnsParams.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/listThreadTurnsParams.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/loginResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/loginResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/memoryListResponseBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/memoryListResponseBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/memoryResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/memoryResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/messagePart.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/messagePart.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/moveFolderRequestBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/moveFolderRequestBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/offsetPagination.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/offsetPagination.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/partResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/partResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/pendingActionResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/pendingActionResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/placeThreadRequestBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/placeThreadRequestBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/platformListResponseBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/platformListResponseBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/platformResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/platformResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/presentationResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/presentationResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/putUploadPartHeaders.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/putUploadPartHeaders.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/putUploadPartParams.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/putUploadPartParams.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/questionResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/questionResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/reasoningEffort.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/reasoningEffort.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/rejectionListResponseBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/rejectionListResponseBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/rejectionResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/rejectionResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/resumeThreadRequestBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/resumeThreadRequestBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/revertRequestBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/revertRequestBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/revertedCountResponseBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/revertedCountResponseBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/rotateSecretRequestBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/rotateSecretRequestBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/searchTasksRequestBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/searchTasksRequestBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/searchThreadsRequestBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/searchThreadsRequestBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/sendMessageRequestBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/sendMessageRequestBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/sendMessageResponseBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/sendMessageResponseBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/senderCheckResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/senderCheckResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/settingsResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/settingsResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/skillEnabledRequestBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/skillEnabledRequestBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/skillListResponseBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/skillListResponseBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/skillRequestBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/skillRequestBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/skillResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/skillResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/subagentCountResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/subagentCountResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/taskAction.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/taskAction.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/taskListResponseBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/taskListResponseBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/taskResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/taskResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/taskRunListResponseBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/taskRunListResponseBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/taskRunResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/taskRunResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/taskTrigger.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/taskTrigger.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/threadCountsResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/threadCountsResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/threadItemListResponseBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/threadItemListResponseBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/threadItemResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/threadItemResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/threadListResponseBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/threadListResponseBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/threadMessageListResponseBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/threadMessageListResponseBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/threadMessageResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/threadMessageResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/threadResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/threadResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/threadStatus.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/threadStatus.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/threadTurnListResponseBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/threadTurnListResponseBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/threadTurnResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/threadTurnResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/todoResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/todoResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/toolCallResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/toolCallResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/toolResultRequestBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/toolResultRequestBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/turnStartedResponseBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/turnStartedResponseBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/turnStatus.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/turnStatus.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/turnType.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/turnType.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/updateChannelRequestBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/updateChannelRequestBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/updateFolderRequestBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/updateFolderRequestBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/updateSettingsRequestBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/updateSettingsRequestBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/updateTaskRequestBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/updateTaskRequestBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/updateThreadRequestBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/updateThreadRequestBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/updateUploadRequestBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/updateUploadRequestBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/uploadAttachmentParams.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/uploadAttachmentParams.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/uploadConfigurationResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/uploadConfigurationResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/uploadListResponseBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/uploadListResponseBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/uploadPartResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/uploadPartResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/uploadResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/uploadResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/uploadedResource.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/uploadedResource.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/usage.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/usage.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/verifyCodeRequestBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/verifyCodeRequestBody.zod.js +3 -2
- package/dist/assistant/v1/generated/validators/webhookSecretResponseBody.zod.d.ts +3 -2
- package/dist/assistant/v1/generated/validators/webhookSecretResponseBody.zod.js +3 -2
- package/dist/eventbus/v1/generated/functions.d.ts +316 -41
- package/dist/eventbus/v1/generated/functions.js +202 -16
- package/dist/eventbus/v1/generated/models.d.ts +230 -26
- package/dist/eventbus/v1/generated/models.js +4 -0
- package/dist/eventbus/v1/generated/schemas.zod.d.ts +163 -30
- package/dist/eventbus/v1/generated/schemas.zod.js +173 -32
- package/dist/eventbus/v1/generated/validators/createEventRequest.zod.d.ts +58 -14
- package/dist/eventbus/v1/generated/validators/createEventRequest.zod.js +58 -14
- package/dist/eventbus/v1/generated/validators/createNamespaceRequest.zod.d.ts +93 -0
- package/dist/eventbus/v1/generated/validators/createNamespaceRequest.zod.js +98 -0
- package/dist/eventbus/v1/generated/validators/createVersionRequest.zod.d.ts +58 -14
- package/dist/eventbus/v1/generated/validators/createVersionRequest.zod.js +58 -14
- package/dist/eventbus/v1/generated/validators/cursorPagination.zod.d.ts +58 -14
- package/dist/eventbus/v1/generated/validators/cursorPagination.zod.js +58 -14
- package/dist/eventbus/v1/generated/validators/error.zod.d.ts +58 -14
- package/dist/eventbus/v1/generated/validators/error.zod.js +58 -14
- package/dist/eventbus/v1/generated/validators/errorStatus.zod.d.ts +58 -14
- package/dist/eventbus/v1/generated/validators/errorStatus.zod.js +58 -14
- package/dist/eventbus/v1/generated/validators/eventDetail.zod.d.ts +60 -14
- package/dist/eventbus/v1/generated/validators/eventDetail.zod.js +67 -15
- package/dist/eventbus/v1/generated/validators/eventList.zod.d.ts +59 -14
- package/dist/eventbus/v1/generated/validators/eventList.zod.js +58 -14
- package/dist/eventbus/v1/generated/validators/eventMessage.zod.d.ts +103 -0
- package/dist/eventbus/v1/generated/validators/eventMessage.zod.js +105 -0
- package/dist/eventbus/v1/generated/validators/eventResource.zod.d.ts +60 -14
- package/dist/eventbus/v1/generated/validators/eventResource.zod.js +67 -15
- package/dist/eventbus/v1/generated/validators/eventStatus.zod.d.ts +58 -14
- package/dist/eventbus/v1/generated/validators/eventStatus.zod.js +58 -14
- package/dist/eventbus/v1/generated/validators/eventVersion.zod.d.ts +58 -14
- package/dist/eventbus/v1/generated/validators/eventVersion.zod.js +58 -14
- package/dist/eventbus/v1/generated/validators/fieldViolation.zod.d.ts +58 -14
- package/dist/eventbus/v1/generated/validators/fieldViolation.zod.js +58 -14
- package/dist/eventbus/v1/generated/validators/listEventsParams.zod.d.ts +58 -14
- package/dist/eventbus/v1/generated/validators/listEventsParams.zod.js +58 -14
- package/dist/eventbus/v1/generated/validators/listNamespacesParams.zod.d.ts +97 -0
- package/dist/eventbus/v1/generated/validators/listNamespacesParams.zod.js +99 -0
- package/dist/eventbus/v1/generated/validators/namespaceList.zod.d.ts +102 -0
- package/dist/eventbus/v1/generated/validators/namespaceList.zod.js +94 -0
- package/dist/eventbus/v1/generated/validators/namespaceResource.zod.d.ts +98 -0
- package/dist/eventbus/v1/generated/validators/namespaceResource.zod.js +100 -0
- package/dist/eventbus/v1/generated/validators/namespaceStatus.zod.d.ts +89 -0
- package/dist/eventbus/v1/generated/validators/namespaceStatus.zod.js +86 -0
- package/dist/eventbus/v1/generated/validators/offsetPagination.zod.d.ts +58 -14
- package/dist/eventbus/v1/generated/validators/offsetPagination.zod.js +58 -14
- package/dist/eventbus/v1/generated/validators/publication.zod.d.ts +98 -0
- package/dist/eventbus/v1/generated/validators/publication.zod.js +106 -0
- package/dist/eventbus/v1/generated/validators/publicationRecipient.zod.d.ts +89 -0
- package/dist/eventbus/v1/generated/validators/publicationRecipient.zod.js +89 -0
- package/dist/eventbus/v1/generated/validators/publishRequest.zod.d.ts +70 -20
- package/dist/eventbus/v1/generated/validators/publishRequest.zod.js +65 -26
- package/dist/eventbus/v1/generated/validators/publishResponse.zod.d.ts +64 -18
- package/dist/eventbus/v1/generated/validators/publishResponse.zod.js +62 -20
- package/dist/eventbus/v1/generated/validators/publishedMessage.zod.d.ts +91 -0
- package/dist/eventbus/v1/generated/validators/publishedMessage.zod.js +91 -0
- package/dist/eventbus/v1/generated/validators/realtimeTicket.zod.d.ts +59 -15
- package/dist/eventbus/v1/generated/validators/realtimeTicket.zod.js +65 -17
- package/dist/eventbus/v1/generated/validators/realtimeTicketRequest.zod.d.ts +90 -0
- package/dist/eventbus/v1/generated/validators/realtimeTicketRequest.zod.js +92 -0
- package/dist/eventbus/v1/generated/validators/recipient.zod.d.ts +89 -0
- package/dist/eventbus/v1/generated/validators/recipient.zod.js +89 -0
- package/dist/eventbus/v1/generated/validators/sender.zod.d.ts +89 -0
- package/dist/eventbus/v1/generated/validators/sender.zod.js +92 -0
- package/dist/eventbus/v1/generated/validators/updateEventRequest.zod.d.ts +58 -14
- package/dist/eventbus/v1/generated/validators/updateEventRequest.zod.js +58 -14
- package/dist/eventbus/v1/generated/validators/updateNamespaceRequest.zod.d.ts +93 -0
- package/dist/eventbus/v1/generated/validators/updateNamespaceRequest.zod.js +89 -0
- package/dist/notification/v1/generated/functions.d.ts +3 -58
- package/dist/notification/v1/generated/functions.js +2 -64
- package/dist/notification/v1/generated/models.d.ts +0 -47
- package/dist/notification/v1/generated/schemas.zod.d.ts +2 -17
- package/dist/notification/v1/generated/schemas.zod.js +2 -15
- package/dist/routes.d.ts +58 -34
- package/dist/routes.js +65 -38
- package/package.json +1 -1
- package/dist/assistant/v1/generated/validators/itemFrame.zod.d.ts +0 -36
- package/dist/assistant/v1/generated/validators/itemFrame.zod.js +0 -32
- package/dist/assistant/v1/generated/validators/openRealtimeParams.zod.d.ts +0 -31
- package/dist/assistant/v1/generated/validators/openRealtimeParams.zod.js +0 -29
- package/dist/assistant/v1/generated/validators/realtimeClientMessage.zod.d.ts +0 -38
- package/dist/assistant/v1/generated/validators/realtimeClientMessage.zod.js +0 -42
- package/dist/assistant/v1/generated/validators/realtimeExchange.zod.d.ts +0 -285
- package/dist/assistant/v1/generated/validators/realtimeExchange.zod.js +0 -33
- package/dist/assistant/v1/generated/validators/realtimeServerMessage.zod.d.ts +0 -274
- package/dist/assistant/v1/generated/validators/realtimeServerMessage.zod.js +0 -64
- package/dist/assistant/v1/generated/validators/realtimeTicketResource.zod.d.ts +0 -32
- package/dist/assistant/v1/generated/validators/realtimeTicketResource.zod.js +0 -30
- package/dist/notification/v1/generated/validators/authorizeRealtimeChannelRequestBody.zod.d.ts +0 -70
- package/dist/notification/v1/generated/validators/authorizeRealtimeChannelRequestBody.zod.js +0 -76
- package/dist/notification/v1/generated/validators/realtimeAuthResource.zod.d.ts +0 -67
- package/dist/notification/v1/generated/validators/realtimeAuthResource.zod.js +0 -67
- package/dist/notification/v1/generated/validators/realtimeConnectionResource.zod.d.ts +0 -76
- 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
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
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,131 @@
|
|
|
25
23
|
*
|
|
26
24
|
* ## Publishing
|
|
27
25
|
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
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 a
|
|
32
|
+
* `recipient`, a member of the project; it is then sent to that member only. Without a recipient
|
|
33
|
+
* it is sent to every member of the project.
|
|
34
|
+
*
|
|
35
|
+
* Every message names its `sender`: an `id` and the `name` the publisher had when the message was
|
|
36
|
+
* accepted. A publication may also carry a `client_id`, any label the client chooses, such as one
|
|
37
|
+
* per browser tab. Receivers get it unchanged, so a client can recognise its own messages by
|
|
38
|
+
* `sender` and `client_id`. A client ID need not be unique; a realtime connection is identified
|
|
39
|
+
* by its `connection_id`.
|
|
31
40
|
*
|
|
32
41
|
* ## Realtime
|
|
33
42
|
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
43
|
+
* Every message has a topic `{event}/{recipient project_id|-}/{recipient id|-}/{key levels}`, where
|
|
44
|
+
* `-` stands 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. For a platform event they cover messages sent to the caller, messages sent to no recipient and,
|
|
52
|
+
* where the caller's permissions allow, messages sent within the project; for a project event
|
|
53
|
+
* they cover messages sent within the project. Without a selected project, use
|
|
54
|
+
* `POST /api/v1/account/realtime/tickets`; such a ticket covers only messages sent to the
|
|
55
|
+
* caller or to no recipient, and cannot publish.
|
|
56
|
+
* 2. Open a WebSocket to `wss://eventbus.leaflow.cloud/realtime` and send, within 15 seconds:
|
|
57
|
+
* `{"type":"authenticate","ticket":"…","client_id":"…"}`, where `client_id` is optional. The
|
|
58
|
+
* reply is `{"type":"authenticated","client_id":"…","connection_id":"…","expires_at":"…"}`.
|
|
59
|
+
* `connection_id` identifies this connection; it is assigned by EventBus and changes on
|
|
60
|
+
* every reconnection.
|
|
61
|
+
* 3. Only after `authenticated`, send `{"type":"subscribe","id":"…","topics":[…]}`; a
|
|
62
|
+
* subscription sent before is rejected. 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`.
|
|
66
|
+
* 4. Messages arrive as `{"type":"messages","messages":[…]}`, each element an `EventMessage`. A
|
|
67
|
+
* message matching several subscriptions on one connection arrives once for each of them.
|
|
68
|
+
* 5. A connection may switch to another ticket of the same user at any time by sending
|
|
69
|
+
* `authenticate` again: to renew before `expires_at`, to move from an account ticket to a
|
|
70
|
+
* project ticket, or to move to another project. Wait for its `authenticated` reply before
|
|
71
|
+
* changing subscriptions; if it is rejected, the previous ticket stays in effect. `client_id`
|
|
72
|
+
* may be omitted to keep the current one. Subscriptions the new ticket does not cover are removed at once and reported in a
|
|
73
|
+
* `{"type":"revoked","topics":[…]}` frame. A ticket for another user closes the connection
|
|
74
|
+
* with code 4401, as does letting the ticket expire.
|
|
75
|
+
*
|
|
76
|
+
* A connection holding a project ticket may publish the project's own events with
|
|
77
|
+
* `{"type":"publish","id":"…","messages":[{"event":"…","key":"…","recipient":{"id":"…"},"data":{…}}]}`;
|
|
78
|
+
* the reply is `published` with the identity of each message. `ping` is answered with `pong`.
|
|
79
|
+
* A rejected request is answered with `{"type":"error","id":"…","code":"…","message":"…"}`.
|
|
80
|
+
* Every reply carries the `id` of the request it answers.
|
|
37
81
|
* OpenAPI spec version: 1.0.0
|
|
38
82
|
*/
|
|
39
83
|
import * as zod from "zod";
|
|
40
84
|
/**
|
|
41
|
-
* Returns the
|
|
42
|
-
*
|
|
85
|
+
* Returns the platform namespaces followed by the project's own, each group ordered by name.
|
|
86
|
+
* Archived namespaces are omitted unless `include_archived` is true.
|
|
87
|
+
* @summary List namespaces
|
|
88
|
+
*/
|
|
89
|
+
export declare const listNamespacesQueryPageDefault = 1;
|
|
90
|
+
export declare const listNamespacesQueryPageMax = 2147483647;
|
|
91
|
+
export declare const listNamespacesQueryPageSizeDefault = 50;
|
|
92
|
+
export declare const listNamespacesQueryPageSizeMax = 200;
|
|
93
|
+
export declare const listNamespacesQueryKeywordMax = 128;
|
|
94
|
+
export declare const listNamespacesQueryIncludeArchivedDefault = false;
|
|
95
|
+
export declare const ListNamespacesQueryParams: zod.ZodObject<{
|
|
96
|
+
page: zod.ZodDefault<zod.ZodInt>;
|
|
97
|
+
page_size: zod.ZodDefault<zod.ZodInt>;
|
|
98
|
+
keyword: zod.ZodOptional<zod.ZodString>;
|
|
99
|
+
include_archived: zod.ZodDefault<zod.ZodBoolean>;
|
|
100
|
+
}, zod.z.core.$strict>;
|
|
101
|
+
/**
|
|
102
|
+
* Creates a namespace in the current project. Its name is a single segment, unique within the
|
|
103
|
+
* project; names reserved for the platform are rejected.
|
|
104
|
+
* @summary Create a namespace
|
|
105
|
+
*/
|
|
106
|
+
export declare const CreateNamespaceBody: zod.ZodObject<{
|
|
107
|
+
name: zod.ZodString;
|
|
108
|
+
description: zod.ZodDefault<zod.ZodString>;
|
|
109
|
+
}, zod.z.core.$strict>;
|
|
110
|
+
/**
|
|
111
|
+
* Returns a platform namespace or one of the project's own.
|
|
112
|
+
* @summary Get a namespace
|
|
113
|
+
*/
|
|
114
|
+
export declare const getNamespacePathNamespaceNameMax = 64;
|
|
115
|
+
export declare const getNamespacePathNamespaceNameRegExp: RegExp;
|
|
116
|
+
export declare const GetNamespaceParams: zod.ZodObject<{
|
|
117
|
+
namespaceName: zod.ZodString;
|
|
118
|
+
}, zod.z.core.$strict>;
|
|
119
|
+
/**
|
|
120
|
+
* Changes the description or status of one of the project's namespaces. Only the fields
|
|
121
|
+
* present in the request are changed. While a namespace is archived, its events cannot be
|
|
122
|
+
* created, published or subscribed to; restoring it lifts that. Platform namespaces cannot be
|
|
123
|
+
* changed.
|
|
124
|
+
* @summary Update a namespace
|
|
125
|
+
*/
|
|
126
|
+
export declare const updateNamespacePathNamespaceNameMax = 64;
|
|
127
|
+
export declare const updateNamespacePathNamespaceNameRegExp: RegExp;
|
|
128
|
+
export declare const UpdateNamespaceParams: zod.ZodObject<{
|
|
129
|
+
namespaceName: zod.ZodString;
|
|
130
|
+
}, zod.z.core.$strict>;
|
|
131
|
+
export declare const UpdateNamespaceBody: zod.ZodObject<{
|
|
132
|
+
description: zod.ZodOptional<zod.ZodString>;
|
|
133
|
+
status: zod.ZodOptional<zod.ZodEnum<{
|
|
134
|
+
active: "active";
|
|
135
|
+
archived: "archived";
|
|
136
|
+
}>>;
|
|
137
|
+
}, zod.z.core.$strict>;
|
|
138
|
+
/**
|
|
139
|
+
* Deletes one of the project's namespaces together with every event and version in it.
|
|
140
|
+
* Publishing or subscribing to those events fails from then on. Platform namespaces cannot be
|
|
141
|
+
* deleted.
|
|
142
|
+
* @summary Delete a namespace
|
|
143
|
+
*/
|
|
144
|
+
export declare const deleteNamespacePathNamespaceNameMax = 64;
|
|
145
|
+
export declare const deleteNamespacePathNamespaceNameRegExp: RegExp;
|
|
146
|
+
export declare const DeleteNamespaceParams: zod.ZodObject<{
|
|
147
|
+
namespaceName: zod.ZodString;
|
|
148
|
+
}, zod.z.core.$strict>;
|
|
149
|
+
/**
|
|
150
|
+
* Returns the platform events and the project's own events. Ordered by name.
|
|
43
151
|
* @summary List event definitions
|
|
44
152
|
*/
|
|
45
153
|
export declare const listEventsQueryPageDefault = 1;
|
|
@@ -57,8 +165,8 @@ export declare const ListEventsQueryParams: zod.ZodObject<{
|
|
|
57
165
|
include_archived: zod.ZodDefault<zod.ZodBoolean>;
|
|
58
166
|
}, zod.z.core.$strict>;
|
|
59
167
|
/**
|
|
60
|
-
* Creates
|
|
61
|
-
*
|
|
168
|
+
* Creates an event with its first version in one of the project's namespaces. The first
|
|
169
|
+
* segment of the name is that namespace, followed by at least a resource and an action.
|
|
62
170
|
* @summary Create an event definition
|
|
63
171
|
*/
|
|
64
172
|
export declare const CreateEventBody: zod.ZodObject<{
|
|
@@ -121,18 +229,43 @@ export declare const GetEventVersionParams: zod.ZodObject<{
|
|
|
121
229
|
version: zod.ZodInt;
|
|
122
230
|
}, zod.z.core.$strict>;
|
|
123
231
|
/**
|
|
124
|
-
* Validates
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
232
|
+
* Validates every message against its selected version and publishes the batch. If any message
|
|
233
|
+
* is rejected, none is published. The response carries the identity of each message in request
|
|
234
|
+
* order; it does not mean a consumer received it. Only events defined by the current project can
|
|
235
|
+
* be published here.
|
|
236
|
+
* @summary Publish event messages
|
|
128
237
|
*/
|
|
129
|
-
export declare const
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
238
|
+
export declare const PublishEventsBody: zod.ZodObject<{
|
|
239
|
+
client_id: zod.ZodOptional<zod.ZodString>;
|
|
240
|
+
messages: zod.ZodArray<zod.ZodObject<{
|
|
241
|
+
event: zod.ZodString;
|
|
242
|
+
version: zod.ZodDefault<zod.ZodInt>;
|
|
243
|
+
key: zod.ZodOptional<zod.ZodString>;
|
|
244
|
+
recipient: zod.ZodOptional<zod.ZodObject<{
|
|
245
|
+
id: zod.ZodString;
|
|
246
|
+
}, zod.z.core.$strict>>;
|
|
247
|
+
data: zod.ZodRecord<zod.ZodString, zod.ZodUnknown>;
|
|
248
|
+
}, zod.z.core.$strict>>;
|
|
133
249
|
}, zod.z.core.$strict>;
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
250
|
+
/**
|
|
251
|
+
* Issues a short-lived ticket for the named events in the current project. For an event defined
|
|
252
|
+
* by the project, the ticket covers messages sent to the members of the project and messages
|
|
253
|
+
* sent to the caller within it. For a platform event, it also covers messages sent to the caller
|
|
254
|
+
* outside any project and messages sent to no recipient; messages sent within the project are
|
|
255
|
+
* covered as far as the caller's current permissions allow, which may be limited to some
|
|
256
|
+
* resources or to none. The caller must still be a member of the project. The ticket lives no
|
|
257
|
+
* longer than the scoped token it was created with. It is not a bearer token for other APIs.
|
|
258
|
+
* @summary Create a realtime ticket
|
|
259
|
+
*/
|
|
260
|
+
export declare const CreateRealtimeTicketBody: zod.ZodObject<{
|
|
261
|
+
events: zod.ZodArray<zod.ZodString>;
|
|
262
|
+
}, zod.z.core.$strict>;
|
|
263
|
+
/**
|
|
264
|
+
* Issues a short-lived ticket for a caller who has not selected a project, or belongs to none. Only
|
|
265
|
+
* platform events are accepted, and the ticket covers only messages sent to the caller outside
|
|
266
|
+
* any project or to no recipient. The ticket cannot publish. The 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
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
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,158 @@
|
|
|
25
23
|
*
|
|
26
24
|
* ## Publishing
|
|
27
25
|
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
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 a
|
|
32
|
+
* `recipient`, a member of the project; it is then sent to that member only. Without a recipient
|
|
33
|
+
* it is sent to every member of the project.
|
|
34
|
+
*
|
|
35
|
+
* Every message names its `sender`: an `id` and the `name` the publisher had when the message was
|
|
36
|
+
* accepted. A publication may also carry a `client_id`, any label the client chooses, such as one
|
|
37
|
+
* per browser tab. Receivers get it unchanged, so a client can recognise its own messages by
|
|
38
|
+
* `sender` and `client_id`. A client ID need not be unique; a realtime connection is identified
|
|
39
|
+
* by its `connection_id`.
|
|
31
40
|
*
|
|
32
41
|
* ## Realtime
|
|
33
42
|
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
43
|
+
* Every message has a topic `{event}/{recipient project_id|-}/{recipient id|-}/{key levels}`, where
|
|
44
|
+
* `-` stands 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. For a platform event they cover messages sent to the caller, messages sent to no recipient and,
|
|
52
|
+
* where the caller's permissions allow, messages sent within the project; for a project event
|
|
53
|
+
* they cover messages sent within the project. Without a selected project, use
|
|
54
|
+
* `POST /api/v1/account/realtime/tickets`; such a ticket covers only messages sent to the
|
|
55
|
+
* caller or to no recipient, and cannot publish.
|
|
56
|
+
* 2. Open a WebSocket to `wss://eventbus.leaflow.cloud/realtime` and send, within 15 seconds:
|
|
57
|
+
* `{"type":"authenticate","ticket":"…","client_id":"…"}`, where `client_id` is optional. The
|
|
58
|
+
* reply is `{"type":"authenticated","client_id":"…","connection_id":"…","expires_at":"…"}`.
|
|
59
|
+
* `connection_id` identifies this connection; it is assigned by EventBus and changes on
|
|
60
|
+
* every reconnection.
|
|
61
|
+
* 3. Only after `authenticated`, send `{"type":"subscribe","id":"…","topics":[…]}`; a
|
|
62
|
+
* subscription sent before is rejected. 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`.
|
|
66
|
+
* 4. Messages arrive as `{"type":"messages","messages":[…]}`, each element an `EventMessage`. A
|
|
67
|
+
* message matching several subscriptions on one connection arrives once for each of them.
|
|
68
|
+
* 5. A connection may switch to another ticket of the same user at any time by sending
|
|
69
|
+
* `authenticate` again: to renew before `expires_at`, to move from an account ticket to a
|
|
70
|
+
* project ticket, or to move to another project. Wait for its `authenticated` reply before
|
|
71
|
+
* changing subscriptions; if it is rejected, the previous ticket stays in effect. `client_id`
|
|
72
|
+
* may be omitted to keep the current one. Subscriptions the new ticket does not cover are removed at once and reported in a
|
|
73
|
+
* `{"type":"revoked","topics":[…]}` frame. A ticket for another user closes the connection
|
|
74
|
+
* with code 4401, as does letting the ticket expire.
|
|
75
|
+
*
|
|
76
|
+
* A connection holding a project ticket may publish the project's own events with
|
|
77
|
+
* `{"type":"publish","id":"…","messages":[{"event":"…","key":"…","recipient":{"id":"…"},"data":{…}}]}`;
|
|
78
|
+
* the reply is `published` with the identity of each message. `ping` is answered with `pong`.
|
|
79
|
+
* A rejected request is answered with `{"type":"error","id":"…","code":"…","message":"…"}`.
|
|
80
|
+
* Every reply carries the `id` of the request it answers.
|
|
37
81
|
* OpenAPI spec version: 1.0.0
|
|
38
82
|
*/
|
|
39
83
|
import * as zod from "zod";
|
|
40
84
|
import { CreateEventRequest } from "./validators/createEventRequest.zod.js";
|
|
85
|
+
import { CreateNamespaceRequest } from "./validators/createNamespaceRequest.zod.js";
|
|
41
86
|
import { CreateVersionRequest } from "./validators/createVersionRequest.zod.js";
|
|
42
87
|
import { PublishRequest } from "./validators/publishRequest.zod.js";
|
|
88
|
+
import { RealtimeTicketRequest } from "./validators/realtimeTicketRequest.zod.js";
|
|
43
89
|
import { UpdateEventRequest } from "./validators/updateEventRequest.zod.js";
|
|
90
|
+
import { UpdateNamespaceRequest } from "./validators/updateNamespaceRequest.zod.js";
|
|
91
|
+
/**
|
|
92
|
+
* Returns the platform namespaces followed by the project's own, each group ordered by name.
|
|
93
|
+
* Archived namespaces are omitted unless `include_archived` is true.
|
|
94
|
+
* @summary List namespaces
|
|
95
|
+
*/
|
|
96
|
+
export const listNamespacesQueryPageDefault = 1;
|
|
97
|
+
export const listNamespacesQueryPageMax = 2147483647;
|
|
98
|
+
export const listNamespacesQueryPageSizeDefault = 50;
|
|
99
|
+
export const listNamespacesQueryPageSizeMax = 200;
|
|
100
|
+
export const listNamespacesQueryKeywordMax = 128;
|
|
101
|
+
export const listNamespacesQueryIncludeArchivedDefault = false;
|
|
102
|
+
export const ListNamespacesQueryParams = zod.strictObject({
|
|
103
|
+
page: zod
|
|
104
|
+
.int()
|
|
105
|
+
.min(1)
|
|
106
|
+
.max(listNamespacesQueryPageMax)
|
|
107
|
+
.default(listNamespacesQueryPageDefault)
|
|
108
|
+
.describe("1-based page number. Defaults to 1."),
|
|
109
|
+
page_size: zod
|
|
110
|
+
.int()
|
|
111
|
+
.min(1)
|
|
112
|
+
.max(listNamespacesQueryPageSizeMax)
|
|
113
|
+
.default(listNamespacesQueryPageSizeDefault)
|
|
114
|
+
.describe("Items per page. Defaults to 50; at most 200."),
|
|
115
|
+
keyword: zod
|
|
116
|
+
.string()
|
|
117
|
+
.max(listNamespacesQueryKeywordMax)
|
|
118
|
+
.optional()
|
|
119
|
+
.describe("Match the namespace name or description, case-insensitively"),
|
|
120
|
+
include_archived: zod
|
|
121
|
+
.boolean()
|
|
122
|
+
.default(listNamespacesQueryIncludeArchivedDefault)
|
|
123
|
+
.describe("Include archived namespaces; defaults to false"),
|
|
124
|
+
});
|
|
44
125
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
126
|
+
* Creates a namespace in the current project. Its name is a single segment, unique within the
|
|
127
|
+
* project; names reserved for the platform are rejected.
|
|
128
|
+
* @summary Create a namespace
|
|
129
|
+
*/
|
|
130
|
+
export const CreateNamespaceBody = CreateNamespaceRequest;
|
|
131
|
+
/**
|
|
132
|
+
* Returns a platform namespace or one of the project's own.
|
|
133
|
+
* @summary Get a namespace
|
|
134
|
+
*/
|
|
135
|
+
export const getNamespacePathNamespaceNameMax = 64;
|
|
136
|
+
export const getNamespacePathNamespaceNameRegExp = new RegExp("^[a-z](?:[a-z0-9_]*[a-z0-9])?(?:\\.[a-z](?:[a-z0-9_]*[a-z0-9])?)*$");
|
|
137
|
+
export const GetNamespaceParams = zod.strictObject({
|
|
138
|
+
namespaceName: zod
|
|
139
|
+
.string()
|
|
140
|
+
.max(getNamespacePathNamespaceNameMax)
|
|
141
|
+
.regex(getNamespacePathNamespaceNameRegExp)
|
|
142
|
+
.describe("The namespace's name, such as `acme`"),
|
|
143
|
+
});
|
|
144
|
+
/**
|
|
145
|
+
* Changes the description or status of one of the project's namespaces. Only the fields
|
|
146
|
+
* present in the request are changed. While a namespace is archived, its events cannot be
|
|
147
|
+
* created, published or subscribed to; restoring it lifts that. Platform namespaces cannot be
|
|
148
|
+
* changed.
|
|
149
|
+
* @summary Update a namespace
|
|
150
|
+
*/
|
|
151
|
+
export const updateNamespacePathNamespaceNameMax = 64;
|
|
152
|
+
export const updateNamespacePathNamespaceNameRegExp = new RegExp("^[a-z](?:[a-z0-9_]*[a-z0-9])?(?:\\.[a-z](?:[a-z0-9_]*[a-z0-9])?)*$");
|
|
153
|
+
export const UpdateNamespaceParams = zod.strictObject({
|
|
154
|
+
namespaceName: zod
|
|
155
|
+
.string()
|
|
156
|
+
.max(updateNamespacePathNamespaceNameMax)
|
|
157
|
+
.regex(updateNamespacePathNamespaceNameRegExp)
|
|
158
|
+
.describe("The namespace's name, such as `acme`"),
|
|
159
|
+
});
|
|
160
|
+
export const UpdateNamespaceBody = UpdateNamespaceRequest;
|
|
161
|
+
/**
|
|
162
|
+
* Deletes one of the project's namespaces together with every event and version in it.
|
|
163
|
+
* Publishing or subscribing to those events fails from then on. Platform namespaces cannot be
|
|
164
|
+
* deleted.
|
|
165
|
+
* @summary Delete a namespace
|
|
166
|
+
*/
|
|
167
|
+
export const deleteNamespacePathNamespaceNameMax = 64;
|
|
168
|
+
export const deleteNamespacePathNamespaceNameRegExp = new RegExp("^[a-z](?:[a-z0-9_]*[a-z0-9])?(?:\\.[a-z](?:[a-z0-9_]*[a-z0-9])?)*$");
|
|
169
|
+
export const DeleteNamespaceParams = zod.strictObject({
|
|
170
|
+
namespaceName: zod
|
|
171
|
+
.string()
|
|
172
|
+
.max(deleteNamespacePathNamespaceNameMax)
|
|
173
|
+
.regex(deleteNamespacePathNamespaceNameRegExp)
|
|
174
|
+
.describe("The namespace's name, such as `acme`"),
|
|
175
|
+
});
|
|
176
|
+
/**
|
|
177
|
+
* Returns the platform events and the project's own events. Ordered by name.
|
|
47
178
|
* @summary List event definitions
|
|
48
179
|
*/
|
|
49
180
|
export const listEventsQueryPageDefault = 1;
|
|
@@ -82,8 +213,8 @@ export const ListEventsQueryParams = zod.strictObject({
|
|
|
82
213
|
.describe("Include archived events; defaults to false"),
|
|
83
214
|
});
|
|
84
215
|
/**
|
|
85
|
-
* Creates
|
|
86
|
-
*
|
|
216
|
+
* Creates an event with its first version in one of the project's namespaces. The first
|
|
217
|
+
* segment of the name is that namespace, followed by at least a resource and an action.
|
|
87
218
|
* @summary Create an event definition
|
|
88
219
|
*/
|
|
89
220
|
export const CreateEventBody = CreateEventRequest;
|
|
@@ -146,18 +277,28 @@ export const GetEventVersionParams = zod.strictObject({
|
|
|
146
277
|
version: zod.int().min(1).describe("The version number, starting at 1"),
|
|
147
278
|
});
|
|
148
279
|
/**
|
|
149
|
-
* Validates
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
*
|
|
280
|
+
* Validates every message against its selected version and publishes the batch. If any message
|
|
281
|
+
* is rejected, none is published. The response carries the identity of each message in request
|
|
282
|
+
* order; it does not mean a consumer received it. Only events defined by the current project can
|
|
283
|
+
* be published here.
|
|
284
|
+
* @summary Publish event messages
|
|
153
285
|
*/
|
|
154
|
-
export const
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
286
|
+
export const PublishEventsBody = PublishRequest;
|
|
287
|
+
/**
|
|
288
|
+
* Issues a short-lived ticket for the named events in the current project. For an event defined
|
|
289
|
+
* by the project, the ticket covers messages sent to the members of the project and messages
|
|
290
|
+
* sent to the caller within it. For a platform event, it also covers messages sent to the caller
|
|
291
|
+
* outside any project and messages sent to no recipient; messages sent within the project are
|
|
292
|
+
* covered as far as the caller's current permissions allow, which may be limited to some
|
|
293
|
+
* resources or to none. The caller must still be a member of the project. The ticket lives no
|
|
294
|
+
* longer than the scoped token it was created with. It is not a bearer token for other APIs.
|
|
295
|
+
* @summary Create a realtime ticket
|
|
296
|
+
*/
|
|
297
|
+
export const CreateRealtimeTicketBody = RealtimeTicketRequest;
|
|
298
|
+
/**
|
|
299
|
+
* Issues a short-lived ticket for a caller who has not selected a project, or belongs to none. Only
|
|
300
|
+
* platform events are accepted, and the ticket covers only messages sent to the caller outside
|
|
301
|
+
* any project or to no recipient. The ticket cannot publish. The ticket lives no longer than the token it was created with.
|
|
302
|
+
* @summary Create an account realtime ticket
|
|
303
|
+
*/
|
|
304
|
+
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
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
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,61 @@
|
|
|
25
23
|
*
|
|
26
24
|
* ## Publishing
|
|
27
25
|
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
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 a
|
|
32
|
+
* `recipient`, a member of the project; it is then sent to that member only. Without a recipient
|
|
33
|
+
* it is sent to every member of the project.
|
|
34
|
+
*
|
|
35
|
+
* Every message names its `sender`: an `id` and the `name` the publisher had when the message was
|
|
36
|
+
* accepted. A publication may also carry a `client_id`, any label the client chooses, such as one
|
|
37
|
+
* per browser tab. Receivers get it unchanged, so a client can recognise its own messages by
|
|
38
|
+
* `sender` and `client_id`. A client ID need not be unique; a realtime connection is identified
|
|
39
|
+
* by its `connection_id`.
|
|
31
40
|
*
|
|
32
41
|
* ## Realtime
|
|
33
42
|
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
43
|
+
* Every message has a topic `{event}/{recipient project_id|-}/{recipient id|-}/{key levels}`, where
|
|
44
|
+
* `-` stands 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. For a platform event they cover messages sent to the caller, messages sent to no recipient and,
|
|
52
|
+
* where the caller's permissions allow, messages sent within the project; for a project event
|
|
53
|
+
* they cover messages sent within the project. Without a selected project, use
|
|
54
|
+
* `POST /api/v1/account/realtime/tickets`; such a ticket covers only messages sent to the
|
|
55
|
+
* caller or to no recipient, and cannot publish.
|
|
56
|
+
* 2. Open a WebSocket to `wss://eventbus.leaflow.cloud/realtime` and send, within 15 seconds:
|
|
57
|
+
* `{"type":"authenticate","ticket":"…","client_id":"…"}`, where `client_id` is optional. The
|
|
58
|
+
* reply is `{"type":"authenticated","client_id":"…","connection_id":"…","expires_at":"…"}`.
|
|
59
|
+
* `connection_id` identifies this connection; it is assigned by EventBus and changes on
|
|
60
|
+
* every reconnection.
|
|
61
|
+
* 3. Only after `authenticated`, send `{"type":"subscribe","id":"…","topics":[…]}`; a
|
|
62
|
+
* subscription sent before is rejected. 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`.
|
|
66
|
+
* 4. Messages arrive as `{"type":"messages","messages":[…]}`, each element an `EventMessage`. A
|
|
67
|
+
* message matching several subscriptions on one connection arrives once for each of them.
|
|
68
|
+
* 5. A connection may switch to another ticket of the same user at any time by sending
|
|
69
|
+
* `authenticate` again: to renew before `expires_at`, to move from an account ticket to a
|
|
70
|
+
* project ticket, or to move to another project. Wait for its `authenticated` reply before
|
|
71
|
+
* changing subscriptions; if it is rejected, the previous ticket stays in effect. `client_id`
|
|
72
|
+
* may be omitted to keep the current one. Subscriptions the new ticket does not cover are removed at once and reported in a
|
|
73
|
+
* `{"type":"revoked","topics":[…]}` frame. A ticket for another user closes the connection
|
|
74
|
+
* with code 4401, as does letting the ticket expire.
|
|
75
|
+
*
|
|
76
|
+
* A connection holding a project ticket may publish the project's own events with
|
|
77
|
+
* `{"type":"publish","id":"…","messages":[{"event":"…","key":"…","recipient":{"id":"…"},"data":{…}}]}`;
|
|
78
|
+
* the reply is `published` with the identity of each message. `ping` is answered with `pong`.
|
|
79
|
+
* A rejected request is answered with `{"type":"error","id":"…","code":"…","message":"…"}`.
|
|
80
|
+
* Every reply carries the `id` of the request it answers.
|
|
37
81
|
* OpenAPI spec version: 1.0.0
|
|
38
82
|
*/
|
|
39
83
|
import * as zod from "zod";
|