@epam/ai-dial-chat-hooks 1.3.0-dev.5 → 1.3.0-dev.55
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/api-error/api-error.d.ts +30 -0
- package/api-error/api-error.d.ts.map +1 -0
- package/api-transport/create-csrf-middleware.d.ts +15 -0
- package/api-transport/create-csrf-middleware.d.ts.map +1 -0
- package/api-transport/create-unauthorized-middleware.d.ts +40 -0
- package/api-transport/create-unauthorized-middleware.d.ts.map +1 -0
- package/attachment/useAttachmentAction/useAttachmentAction.d.ts +32 -0
- package/attachment/useAttachmentAction/useAttachmentAction.d.ts.map +1 -0
- package/attachment/useAttachmentValidation/useAttachmentValidation.d.ts +50 -0
- package/attachment/useAttachmentValidation/useAttachmentValidation.d.ts.map +1 -0
- package/attachments.d.ts +2 -94
- package/catalog/catalog-derivations.d.ts +27 -0
- package/catalog/catalog-derivations.d.ts.map +1 -0
- package/catalog/catalog-primary-action.d.ts +47 -0
- package/catalog/catalog-primary-action.d.ts.map +1 -0
- package/catalog/create-publish-api.d.ts +32 -0
- package/catalog/create-publish-api.d.ts.map +1 -0
- package/catalog/deployment-endpoint-url.d.ts +19 -0
- package/catalog/deployment-endpoint-url.d.ts.map +1 -0
- package/catalog/deployment-id.d.ts +42 -0
- package/catalog/deployment-id.d.ts.map +1 -0
- package/catalog/entity-details.d.ts +146 -0
- package/catalog/entity-details.d.ts.map +1 -0
- package/catalog/map-deployment-limits-to-catalog.d.ts +34 -0
- package/catalog/map-deployment-limits-to-catalog.d.ts.map +1 -0
- package/catalog/map-deployment-limits-to-input.d.ts +28 -0
- package/catalog/map-deployment-limits-to-input.d.ts.map +1 -0
- package/catalog/map-deployment-to-catalog-item.d.ts +61 -0
- package/catalog/map-deployment-to-catalog-item.d.ts.map +1 -0
- package/catalog/map-entity-details-to-catalog.d.ts +81 -0
- package/catalog/map-entity-details-to-catalog.d.ts.map +1 -0
- package/catalog/map-prompt-to-catalog-item.d.ts +43 -0
- package/catalog/map-prompt-to-catalog-item.d.ts.map +1 -0
- package/catalog/map-skill-to-catalog-item.d.ts +113 -0
- package/catalog/map-skill-to-catalog-item.d.ts.map +1 -0
- package/catalog/mcp-endpoint-url.d.ts +18 -0
- package/catalog/mcp-endpoint-url.d.ts.map +1 -0
- package/catalog/publish.d.ts +35 -0
- package/catalog/publish.d.ts.map +1 -0
- package/catalog/useApplicationCredentials/useApplicationCredentials.d.ts +19 -0
- package/catalog/useApplicationCredentials/useApplicationCredentials.d.ts.map +1 -0
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts +100 -0
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts.map +1 -0
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.js +139 -122
- package/catalog/useCatalogItemDetails.d.ts +70 -0
- package/catalog/useCatalogItemDetails.d.ts.map +1 -0
- package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.d.ts +76 -0
- package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.d.ts.map +1 -0
- package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.d.ts +37 -0
- package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.d.ts.map +1 -0
- package/catalog/usePublishFolders/usePublishFolders.d.ts +73 -0
- package/catalog/usePublishFolders/usePublishFolders.d.ts.map +1 -0
- package/catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.d.ts +54 -0
- package/catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.d.ts.map +1 -0
- package/catalog/useSkillItemDetails.d.ts +64 -0
- package/catalog/useSkillItemDetails.d.ts.map +1 -0
- package/catalog.d.ts +2 -1433
- package/conversation/announcement-message.d.ts +61 -0
- package/conversation/announcement-message.d.ts.map +1 -0
- package/conversation/conversation-transfer/async.d.ts +10 -0
- package/conversation/conversation-transfer/async.d.ts.map +1 -0
- package/conversation/conversation-transfer/attachment-refs.d.ts +42 -0
- package/conversation/conversation-transfer/attachment-refs.d.ts.map +1 -0
- package/conversation/conversation-transfer/build-upload-path.d.ts +42 -0
- package/conversation/conversation-transfer/build-upload-path.d.ts.map +1 -0
- package/conversation/conversation-transfer/date.d.ts +5 -0
- package/conversation/conversation-transfer/date.d.ts.map +1 -0
- package/conversation/conversation-transfer/dial-file-resolve.d.ts +10 -0
- package/conversation/conversation-transfer/dial-file-resolve.d.ts.map +1 -0
- package/conversation/conversation-transfer/export-conversation.d.ts +10 -0
- package/conversation/conversation-transfer/export-conversation.d.ts.map +1 -0
- package/conversation/conversation-transfer/import-conversation.d.ts +106 -0
- package/conversation/conversation-transfer/import-conversation.d.ts.map +1 -0
- package/conversation/conversation-transfer/progress.d.ts +60 -0
- package/conversation/conversation-transfer/progress.d.ts.map +1 -0
- package/conversation/conversation-transfer/queue.d.ts +54 -0
- package/conversation/conversation-transfer/queue.d.ts.map +1 -0
- package/conversation/conversation-transfer/types.d.ts +36 -0
- package/conversation/conversation-transfer/types.d.ts.map +1 -0
- package/conversation/conversation-transfer/zip-export.d.ts +31 -0
- package/conversation/conversation-transfer/zip-export.d.ts.map +1 -0
- package/conversation/conversation-transfer/zip-import.d.ts +17 -0
- package/conversation/conversation-transfer/zip-import.d.ts.map +1 -0
- package/conversation/create-chat-stream-api.d.ts +92 -0
- package/conversation/create-chat-stream-api.d.ts.map +1 -0
- package/conversation/deriveConversationRowActionState/deriveConversationRowActionState.d.ts +39 -0
- package/conversation/deriveConversationRowActionState/deriveConversationRowActionState.d.ts.map +1 -0
- package/conversation/display-name-watch.d.ts +4 -0
- package/conversation/display-name-watch.d.ts.map +1 -0
- package/conversation/footer-message.d.ts +10 -0
- package/conversation/footer-message.d.ts.map +1 -0
- package/conversation/get-model-id-from-conversation-id.d.ts +38 -0
- package/conversation/get-model-id-from-conversation-id.d.ts.map +1 -0
- package/conversation/greeting.d.ts +18 -0
- package/conversation/greeting.d.ts.map +1 -0
- package/conversation/message-factory.d.ts +7 -0
- package/conversation/message-factory.d.ts.map +1 -0
- package/conversation/message-utils.d.ts +67 -0
- package/conversation/message-utils.d.ts.map +1 -0
- package/conversation/overlay-messages.d.ts +5 -0
- package/conversation/overlay-messages.d.ts.map +1 -0
- package/conversation/quick-app-conversation-starters.d.ts +10 -0
- package/conversation/quick-app-conversation-starters.d.ts.map +1 -0
- package/conversation/stage.d.ts +77 -0
- package/conversation/stage.d.ts.map +1 -0
- package/conversation/starter-option.d.ts +21 -0
- package/conversation/starter-option.d.ts.map +1 -0
- package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts +35 -0
- package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts.map +1 -0
- package/conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.d.ts +46 -0
- package/conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.d.ts.map +1 -0
- package/conversation/useAttachmentUpload/useAttachmentUpload.d.ts +27 -0
- package/conversation/useAttachmentUpload/useAttachmentUpload.d.ts.map +1 -0
- package/conversation/useConversationExport/useConversationExport.d.ts +72 -0
- package/conversation/useConversationExport/useConversationExport.d.ts.map +1 -0
- package/conversation/useConversationHandlers/attachment-to-dto.d.ts +7 -0
- package/conversation/useConversationHandlers/attachment-to-dto.d.ts.map +1 -0
- package/conversation/useConversationHandlers/message-factory.d.ts +9 -0
- package/conversation/useConversationHandlers/message-factory.d.ts.map +1 -0
- package/conversation/useConversationHandlers/message-utils.d.ts +38 -0
- package/conversation/useConversationHandlers/message-utils.d.ts.map +1 -0
- package/conversation/useConversationHandlers/starter-option.d.ts +24 -0
- package/conversation/useConversationHandlers/starter-option.d.ts.map +1 -0
- package/conversation/useConversationHandlers/useConversationHandlers.d.ts +66 -0
- package/conversation/useConversationHandlers/useConversationHandlers.d.ts.map +1 -0
- package/conversation/useConversationImport/useConversationImport.d.ts +54 -0
- package/conversation/useConversationImport/useConversationImport.d.ts.map +1 -0
- package/conversation/useConversationLookupMaps/useConversationLookupMaps.d.ts +24 -0
- package/conversation/useConversationLookupMaps/useConversationLookupMaps.d.ts.map +1 -0
- package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts +64 -0
- package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts.map +1 -0
- package/conversation/useConversationScroll/useConversationScroll.d.ts +46 -0
- package/conversation/useConversationScroll/useConversationScroll.d.ts.map +1 -0
- package/conversation/useConversationStream/apply-chunk.d.ts +35 -0
- package/conversation/useConversationStream/apply-chunk.d.ts.map +1 -0
- package/conversation/useConversationStream/buffered-generation.d.ts +15 -0
- package/conversation/useConversationStream/buffered-generation.d.ts.map +1 -0
- package/conversation/useConversationStream/conversation-path.d.ts +7 -0
- package/conversation/useConversationStream/conversation-path.d.ts.map +1 -0
- package/conversation/useConversationStream/frame-scheduler.d.ts +14 -0
- package/conversation/useConversationStream/frame-scheduler.d.ts.map +1 -0
- package/conversation/useConversationStream/generation-resume.d.ts +85 -0
- package/conversation/useConversationStream/generation-resume.d.ts.map +1 -0
- package/conversation/useConversationStream/useConversationStream.d.ts +145 -0
- package/conversation/useConversationStream/useConversationStream.d.ts.map +1 -0
- package/conversation/useImportFilePicker/useImportFilePicker.d.ts +32 -0
- package/conversation/useImportFilePicker/useImportFilePicker.d.ts.map +1 -0
- package/conversation/useMessageSelectionReply/useMessageSelectionReply.d.ts +42 -0
- package/conversation/useMessageSelectionReply/useMessageSelectionReply.d.ts.map +1 -0
- package/conversation/useTranscribeAudio/audio-transcription-error.d.ts +19 -0
- package/conversation/useTranscribeAudio/audio-transcription-error.d.ts.map +1 -0
- package/conversation/useTranscribeAudio/transcription-retry.d.ts +2 -0
- package/conversation/useTranscribeAudio/transcription-retry.d.ts.map +1 -0
- package/conversation/useTranscribeAudio/useTranscribeAudio.d.ts +43 -0
- package/conversation/useTranscribeAudio/useTranscribeAudio.d.ts.map +1 -0
- package/conversation-overlay.d.ts +2 -7
- package/conversation-sources/useConversationSources/useConversationSources.d.ts +20 -0
- package/conversation-sources/useConversationSources/useConversationSources.d.ts.map +1 -0
- package/conversation-sources.d.ts +2 -25
- package/conversation-transfer.d.ts +2 -190
- package/conversation.d.ts +2 -1372
- package/entry-points/attachments.d.ts +3 -0
- package/entry-points/attachments.d.ts.map +1 -0
- package/entry-points/catalog.d.ts +25 -0
- package/entry-points/catalog.d.ts.map +1 -0
- package/entry-points/conversation-overlay.d.ts +2 -0
- package/entry-points/conversation-overlay.d.ts.map +1 -0
- package/entry-points/conversation-sources.d.ts +2 -0
- package/entry-points/conversation-sources.d.ts.map +1 -0
- package/entry-points/conversation-transfer.d.ts +7 -0
- package/entry-points/conversation-transfer.d.ts.map +1 -0
- package/entry-points/conversation.d.ts +33 -0
- package/entry-points/conversation.d.ts.map +1 -0
- package/entry-points/file-manager-canvas.d.ts +2 -0
- package/entry-points/file-manager-canvas.d.ts.map +1 -0
- package/entry-points/file-manager.d.ts +31 -0
- package/entry-points/file-manager.d.ts.map +1 -0
- package/entry-points/mcp-apps.d.ts +6 -0
- package/entry-points/mcp-apps.d.ts.map +1 -0
- package/entry-points/oauth.d.ts +10 -0
- package/entry-points/oauth.d.ts.map +1 -0
- package/entry-points/scheduled-tasks.d.ts +8 -0
- package/entry-points/scheduled-tasks.d.ts.map +1 -0
- package/entry-points/scroll-anchoring.d.ts +2 -0
- package/entry-points/scroll-anchoring.d.ts.map +1 -0
- package/entry-points/sharing.d.ts +3 -0
- package/entry-points/sharing.d.ts.map +1 -0
- package/entry-points/skill-editor.d.ts +9 -0
- package/entry-points/skill-editor.d.ts.map +1 -0
- package/entry-points/skills-state.d.ts +2 -0
- package/entry-points/skills-state.d.ts.map +1 -0
- package/entry-points/source-content.d.ts +2 -0
- package/entry-points/source-content.d.ts.map +1 -0
- package/entry-points/usage-limits.d.ts +8 -0
- package/entry-points/usage-limits.d.ts.map +1 -0
- package/entry-points/usage.d.ts +3 -0
- package/entry-points/usage.d.ts.map +1 -0
- package/entry-points/utils.d.ts +17 -0
- package/entry-points/utils.d.ts.map +1 -0
- package/entry-points/viewport-layout.d.ts +4 -0
- package/entry-points/viewport-layout.d.ts.map +1 -0
- package/file-manager-canvas.d.ts +2 -418
- package/file-manager.d.ts +2 -1237
- package/file-manager.js +25 -25
- package/files/annotation.d.ts +10 -0
- package/files/annotation.d.ts.map +1 -0
- package/files/attachment-canvas.d.ts +123 -0
- package/files/attachment-canvas.d.ts.map +1 -0
- package/files/attachment-dto-to-display.d.ts +10 -0
- package/files/attachment-dto-to-display.d.ts.map +1 -0
- package/files/attachment-types.d.ts +21 -0
- package/files/attachment-types.d.ts.map +1 -0
- package/files/create-files-api.d.ts +52 -0
- package/files/create-files-api.d.ts.map +1 -0
- package/files/create-upload-file-with-progress.d.ts +24 -0
- package/files/create-upload-file-with-progress.d.ts.map +1 -0
- package/files/dial-file-manager-copy-move.util.d.ts +15 -0
- package/files/dial-file-manager-copy-move.util.d.ts.map +1 -0
- package/files/dial-file-manager-mapping.util.d.ts +35 -0
- package/files/dial-file-manager-mapping.util.d.ts.map +1 -0
- package/files/dial-file-manager-path.util.d.ts +48 -0
- package/files/dial-file-manager-path.util.d.ts.map +1 -0
- package/files/dial-file-manager.model.d.ts +36 -0
- package/files/dial-file-manager.model.d.ts.map +1 -0
- package/files/dial-file-manager.model.js +7 -3
- package/files/dial-file-manager.types.d.ts +327 -0
- package/files/dial-file-manager.types.d.ts.map +1 -0
- package/files/dial-file-manager.types.js +1 -1
- package/files/dial-file-to-attachment.d.ts +26 -0
- package/files/dial-file-to-attachment.d.ts.map +1 -0
- package/files/dial-file.d.ts +17 -0
- package/files/dial-file.d.ts.map +1 -0
- package/files/dial-files-api.d.ts +71 -0
- package/files/dial-files-api.d.ts.map +1 -0
- package/files/download-destination.d.ts +31 -0
- package/files/download-destination.d.ts.map +1 -0
- package/files/file-manager-variant.d.ts +3 -0
- package/files/file-manager-variant.d.ts.map +1 -0
- package/files/file-name.d.ts +19 -0
- package/files/file-name.d.ts.map +1 -0
- package/files/prepare-download-destination.d.ts +8 -0
- package/files/prepare-download-destination.d.ts.map +1 -0
- package/files/resolve-dial-file-api-path.d.ts +12 -0
- package/files/resolve-dial-file-api-path.d.ts.map +1 -0
- package/files/source-content.d.ts +28 -0
- package/files/source-content.d.ts.map +1 -0
- package/files/useDialFileListing/useDialFileListing.d.ts +82 -0
- package/files/useDialFileListing/useDialFileListing.d.ts.map +1 -0
- package/files/useDialFileListing/useDialFileListing.js +24 -14
- package/files/useDialFileManager/useDialFileManager.d.ts +16 -0
- package/files/useDialFileManager/useDialFileManager.d.ts.map +1 -0
- package/files/useDialFileManager/useDialFileManager.js +148 -140
- package/files/useDialFileManagerSections/useDialFileManagerSections.d.ts +25 -0
- package/files/useDialFileManagerSections/useDialFileManagerSections.d.ts.map +1 -0
- package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.d.ts +15 -0
- package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.d.ts.map +1 -0
- package/files/useDialFileMetadata/useDialFileMetadata.d.ts +28 -0
- package/files/useDialFileMetadata/useDialFileMetadata.d.ts.map +1 -0
- package/files/useDialFileMutations/useDialFileMutations.d.ts +68 -0
- package/files/useDialFileMutations/useDialFileMutations.d.ts.map +1 -0
- package/files/useDialFileMutations/useDialFileMutations.js +206 -204
- package/files/useDialFileSharing/useDialFileSharing.d.ts +34 -0
- package/files/useDialFileSharing/useDialFileSharing.d.ts.map +1 -0
- package/files/useDialFileSharing/useDialFileSharing.js +45 -39
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts +47 -0
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts.map +1 -0
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +8 -4
- package/files/useFileAttachmentPicker/useFileAttachmentPicker.d.ts +59 -0
- package/files/useFileAttachmentPicker/useFileAttachmentPicker.d.ts.map +1 -0
- package/index.d.ts +159 -6974
- package/index.d.ts.map +1 -0
- package/index.js +124 -117
- package/mcp-apps/mcp-apps-api-client.d.ts +28 -0
- package/mcp-apps/mcp-apps-api-client.d.ts.map +1 -0
- package/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.d.ts +14 -0
- package/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.d.ts.map +1 -0
- package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.d.ts +29 -0
- package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.d.ts.map +1 -0
- package/mcp-apps/useMcpAppTools/useMcpAppTools.d.ts +22 -0
- package/mcp-apps/useMcpAppTools/useMcpAppTools.d.ts.map +1 -0
- package/mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.d.ts +36 -0
- package/mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.d.ts.map +1 -0
- package/mcp-apps.d.ts +2 -256
- package/oauth/authorize-url.d.ts +16 -0
- package/oauth/authorize-url.d.ts.map +1 -0
- package/oauth/handshake.d.ts +30 -0
- package/oauth/handshake.d.ts.map +1 -0
- package/oauth/models.d.ts +81 -0
- package/oauth/models.d.ts.map +1 -0
- package/oauth/popup.d.ts +30 -0
- package/oauth/popup.d.ts.map +1 -0
- package/oauth/toolset-id.d.ts +53 -0
- package/oauth/toolset-id.d.ts.map +1 -0
- package/oauth/types.d.ts +84 -0
- package/oauth/types.d.ts.map +1 -0
- package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.d.ts +54 -0
- package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.d.ts.map +1 -0
- package/oauth/useToolsetLogin/useToolsetLogin.d.ts +79 -0
- package/oauth/useToolsetLogin/useToolsetLogin.d.ts.map +1 -0
- package/oauth.d.ts +2 -472
- package/package.json +26 -17
- package/prompt/export-prompt.d.ts +31 -0
- package/prompt/export-prompt.d.ts.map +1 -0
- package/prompt/prompt-resource.d.ts +30 -0
- package/prompt/prompt-resource.d.ts.map +1 -0
- package/prompt/prompt.d.ts +34 -0
- package/prompt/prompt.d.ts.map +1 -0
- package/prompt/usePromptsState/usePromptsState.d.ts +34 -0
- package/prompt/usePromptsState/usePromptsState.d.ts.map +1 -0
- package/scheduled-task/scheduled-task-description.d.ts +38 -0
- package/scheduled-task/scheduled-task-description.d.ts.map +1 -0
- package/scheduled-task/scheduled-task-mapping.d.ts +19 -0
- package/scheduled-task/scheduled-task-mapping.d.ts.map +1 -0
- package/scheduled-task/scheduled-task-preparation.d.ts +19 -0
- package/scheduled-task/scheduled-task-preparation.d.ts.map +1 -0
- package/scheduled-task/scheduled-task-trigger.d.ts +26 -0
- package/scheduled-task/scheduled-task-trigger.d.ts.map +1 -0
- package/scheduled-task/scheduled-tasks-api-client.d.ts +67 -0
- package/scheduled-task/scheduled-tasks-api-client.d.ts.map +1 -0
- package/scheduled-task/use-scheduled-task-runs.d.ts +40 -0
- package/scheduled-task/use-scheduled-task-runs.d.ts.map +1 -0
- package/scheduled-task/use-scheduled-task-runs.js +67 -67
- package/scheduled-task/use-scheduled-tasks.d.ts +28 -0
- package/scheduled-task/use-scheduled-tasks.d.ts.map +1 -0
- package/scheduled-tasks.d.ts +2 -250
- package/scroll-anchoring.d.ts +2 -50
- package/shared/application-schema.d.ts +18 -0
- package/shared/application-schema.d.ts.map +1 -0
- package/shared/application-schema.js +2 -2
- package/shared/browser-timezone.d.ts +7 -0
- package/shared/browser-timezone.d.ts.map +1 -0
- package/shared/cron-day-of-month.d.ts +21 -0
- package/shared/cron-day-of-month.d.ts.map +1 -0
- package/shared/cron-weekday.d.ts +5 -0
- package/shared/cron-weekday.d.ts.map +1 -0
- package/shared/custom-apps.d.ts +7 -0
- package/shared/custom-apps.d.ts.map +1 -0
- package/shared/external-services.d.ts +16 -0
- package/shared/external-services.d.ts.map +1 -0
- package/shared/formatting.d.ts +5 -0
- package/shared/formatting.d.ts.map +1 -0
- package/shared/locale.d.ts +45 -0
- package/shared/locale.d.ts.map +1 -0
- package/shared/string-utils.d.ts +11 -0
- package/shared/string-utils.d.ts.map +1 -0
- package/shared/toolset-login-events.d.ts +15 -0
- package/shared/toolset-login-events.d.ts.map +1 -0
- package/sharing.d.ts +2 -65
- package/skill/skill-archive.d.ts +7 -0
- package/skill/skill-archive.d.ts.map +1 -0
- package/skill/skill-file-batch-validation.d.ts +70 -0
- package/skill/skill-file-batch-validation.d.ts.map +1 -0
- package/skill/skill-file-preview.d.ts +25 -0
- package/skill/skill-file-preview.d.ts.map +1 -0
- package/skill/skill-manifest.d.ts +28 -0
- package/skill/skill-manifest.d.ts.map +1 -0
- package/skill/skill-types.d.ts +46 -0
- package/skill/skill-types.d.ts.map +1 -0
- package/skill/skill.d.ts +160 -0
- package/skill/skill.d.ts.map +1 -0
- package/skill/useSkillArchiveImport/useSkillArchiveImport.d.ts +65 -0
- package/skill/useSkillArchiveImport/useSkillArchiveImport.d.ts.map +1 -0
- package/skill/useSkillEditorLoad.d.ts +74 -0
- package/skill/useSkillEditorLoad.d.ts.map +1 -0
- package/skill/useSkillEditorSubmit.d.ts +125 -0
- package/skill/useSkillEditorSubmit.d.ts.map +1 -0
- package/skill/useSkillFileActions.d.ts +60 -0
- package/skill/useSkillFileActions.d.ts.map +1 -0
- package/skill/useSkillFilePreview.d.ts +38 -0
- package/skill/useSkillFilePreview.d.ts.map +1 -0
- package/skill/useSkillsState/useSkillsState.d.ts +35 -0
- package/skill/useSkillsState/useSkillsState.d.ts.map +1 -0
- package/skill-editor.d.ts +2 -655
- package/skills-state.d.ts +2 -40
- package/source-content.d.ts +2 -29
- package/usage/map-usage-data-to-dashboard.d.ts +39 -0
- package/usage/map-usage-data-to-dashboard.d.ts.map +1 -0
- package/usage/map-user-usage-to-model-limits.d.ts +62 -0
- package/usage/map-user-usage-to-model-limits.d.ts.map +1 -0
- package/usage/usage-banner-source.d.ts +23 -0
- package/usage/usage-banner-source.d.ts.map +1 -0
- package/usage/usage-banner-source.js +36 -0
- package/usage/usage-period.d.ts +7 -0
- package/usage/usage-period.d.ts.map +1 -0
- package/usage/usage-period.js +6 -0
- package/usage/usage-reset-time.d.ts +69 -0
- package/usage/usage-reset-time.d.ts.map +1 -0
- package/usage/usage-reset-time.js +72 -0
- package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts +32 -0
- package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts.map +1 -0
- package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.js +39 -0
- package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.d.ts +16 -0
- package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.d.ts.map +1 -0
- package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.js +14 -0
- package/usage/useUsageData/useUsageData.d.ts +28 -0
- package/usage/useUsageData/useUsageData.d.ts.map +1 -0
- package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts +56 -0
- package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts.map +1 -0
- package/usage/useUsageLimitBanner/useUsageLimitBanner.js +67 -0
- package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.d.ts +14 -0
- package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.d.ts.map +1 -0
- package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.js +19 -0
- package/usage-limits.d.ts +2 -0
- package/usage-limits.js +8 -0
- package/usage.d.ts +2 -125
- package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts +128 -0
- package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts.map +1 -0
- package/usePageFileDrag/usePageFileDrag.d.ts +16 -0
- package/usePageFileDrag/usePageFileDrag.d.ts.map +1 -0
- package/usePanelMaxWidth/usePanelMaxWidth.d.ts +6 -0
- package/usePanelMaxWidth/usePanelMaxWidth.d.ts.map +1 -0
- package/useShareLink/useShareLink.d.ts +23 -0
- package/useShareLink/useShareLink.d.ts.map +1 -0
- package/useShareRecipientsCount/useShareRecipientsCount.d.ts +36 -0
- package/useShareRecipientsCount/useShareRecipientsCount.d.ts.map +1 -0
- package/useToolsMenu/useToolsMenu.d.ts +31 -0
- package/useToolsMenu/useToolsMenu.d.ts.map +1 -0
- package/useViewportWidth/useViewportWidth.d.ts +3 -0
- package/useViewportWidth/useViewportWidth.d.ts.map +1 -0
- package/utils.d.ts +2 -404
- package/utils.js +10 -10
- package/viewport-layout.d.ts +2 -27
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** Which prompt namespace a catalog prompt item came from. */
|
|
2
|
+
export declare enum PromptSource {
|
|
3
|
+
/** The caller's own prompt, editable and deletable by them. */
|
|
4
|
+
Personal = "personal",
|
|
5
|
+
/** Shared with the caller by another user; permissions determine editability. */
|
|
6
|
+
SharedWithMe = "sharedWithMe",
|
|
7
|
+
/** Organisation-wide prompt; read-only for every user. */
|
|
8
|
+
Public = "public"
|
|
9
|
+
}
|
|
10
|
+
/** A prompt resource URL split into the bucket and the path within it. */
|
|
11
|
+
export interface ParsedPromptResourceUrl {
|
|
12
|
+
/** DIAL Core bucket name. */
|
|
13
|
+
bucket: string;
|
|
14
|
+
/** Path to the prompt within that bucket. */
|
|
15
|
+
path: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Splits a `prompts/{bucket}/{path}` resource URL into its parts, mirroring the
|
|
19
|
+
* backend's parser. Returns `null` for a different prefix, an empty bucket, or
|
|
20
|
+
* an empty path, so callers can treat "not a prompt resource id" as one case.
|
|
21
|
+
*
|
|
22
|
+
* `CatalogItem.id` for a prompt is always this full resource path — the read,
|
|
23
|
+
* update, delete, and move endpoints all take it unmodified. The one caller
|
|
24
|
+
* that still needs the bucket-relative sub-path on its own is the
|
|
25
|
+
* organisation (public) prompt read, whose endpoint kept its bucket-relative
|
|
26
|
+
* `path` argument because it only ever operates on the fixed `public`
|
|
27
|
+
* namespace.
|
|
28
|
+
*/
|
|
29
|
+
export declare const parsePromptResourceUrl: (url: string) => ParsedPromptResourceUrl | null;
|
|
30
|
+
//# sourceMappingURL=prompt-resource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-resource.d.ts","sourceRoot":"","sources":["../../src/prompt/prompt-resource.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,oBAAY,YAAY;IACtB,+DAA+D;IAC/D,QAAQ,aAAa;IACrB,iFAAiF;IACjF,YAAY,iBAAiB;IAC7B,0DAA0D;IAC1D,MAAM,WAAW;CAClB;AAKD,0EAA0E;AAC1E,MAAM,WAAW,uBAAuB;IACtC,6BAA6B;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,GACjC,KAAK,MAAM,KACV,uBAAuB,GAAG,IAS5B,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** Why a prompt-editor field failed client-side validation. */
|
|
2
|
+
export declare enum PromptFieldError {
|
|
3
|
+
/** The field is required and was left empty. */
|
|
4
|
+
Required = "required",
|
|
5
|
+
/** The value exceeds the backend's length limit for the field. */
|
|
6
|
+
TooLong = "tooLong",
|
|
7
|
+
/** The name contains characters the backend's allowlist rejects. */
|
|
8
|
+
InvalidName = "invalidName",
|
|
9
|
+
/** The backend reported an existing prompt or folder at the target path. */
|
|
10
|
+
Conflict = "conflict"
|
|
11
|
+
}
|
|
12
|
+
/** Maximum name length accepted by `CreatePromptDto.name`. */
|
|
13
|
+
export declare const PROMPT_NAME_MAX_LENGTH = 256;
|
|
14
|
+
/** Maximum description length accepted by `CreatePromptDto.description`. */
|
|
15
|
+
export declare const PROMPT_DESCRIPTION_MAX_LENGTH = 2000;
|
|
16
|
+
/** Maximum body length accepted by `CreatePromptDto.content`. */
|
|
17
|
+
export declare const PROMPT_CONTENT_MAX_LENGTH = 50000;
|
|
18
|
+
/** How close to a length limit the remaining-characters counter starts announcing. */
|
|
19
|
+
export declare const PROMPT_COUNTER_ANNOUNCE_THRESHOLD = 10;
|
|
20
|
+
/** Validates a prompt or folder name against the backend's own rules. */
|
|
21
|
+
export declare const validatePromptName: (name: string) => PromptFieldError | null;
|
|
22
|
+
/** Validates a prompt description; an empty description is valid. */
|
|
23
|
+
export declare const validatePromptDescription: (description: string) => PromptFieldError | null;
|
|
24
|
+
/** Validates a prompt body: required, and within the backend's length limit. */
|
|
25
|
+
export declare const validatePromptContent: (content: string) => PromptFieldError | null;
|
|
26
|
+
/**
|
|
27
|
+
* Returns the characters left before a limit, or `null` while still further
|
|
28
|
+
* away than the announce threshold — a counter that fires on every keystroke
|
|
29
|
+
* is unusable noise in a live region.
|
|
30
|
+
*/
|
|
31
|
+
export declare const getRemainingCharacters: (value: string, maxLength: number) => number | null;
|
|
32
|
+
/** Joins a folder path and a prompt name into the DIAL prompt path used as an id. */
|
|
33
|
+
export declare const buildPromptPath: (folderId: string, name: string) => string;
|
|
34
|
+
//# sourceMappingURL=prompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../src/prompt/prompt.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,oBAAY,gBAAgB;IAC1B,gDAAgD;IAChD,QAAQ,aAAa;IACrB,kEAAkE;IAClE,OAAO,YAAY;IACnB,oEAAoE;IACpE,WAAW,gBAAgB;IAC3B,4EAA4E;IAC5E,QAAQ,aAAa;CACtB;AAiBD,8DAA8D;AAC9D,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C,4EAA4E;AAC5E,eAAO,MAAM,6BAA6B,OAAO,CAAC;AAElD,iEAAiE;AACjE,eAAO,MAAM,yBAAyB,QAAQ,CAAC;AAE/C,sFAAsF;AACtF,eAAO,MAAM,iCAAiC,KAAK,CAAC;AAEpD,yEAAyE;AACzE,eAAO,MAAM,kBAAkB,GAAI,MAAM,MAAM,KAAG,gBAAgB,GAAG,IAMpE,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,yBAAyB,GACpC,aAAa,MAAM,KAClB,gBAAgB,GAAG,IAGZ,CAAC;AAEX,gFAAgF;AAChF,eAAO,MAAM,qBAAqB,GAChC,SAAS,MAAM,KACd,gBAAgB,GAAG,IAMrB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GACjC,OAAO,MAAM,EACb,WAAW,MAAM,KAChB,MAAM,GAAG,IAGX,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,EAAE,MAAM,MAAM,KAAG,MACxB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { PromptFolderResponseDto, PromptListResponseDto, PromptResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
/** Parameters for {@link usePromptsState}. */
|
|
3
|
+
export interface UsePromptsStateParams {
|
|
4
|
+
/** Fetches the aggregate prompt listing from the server. */
|
|
5
|
+
listPrompts: () => Promise<PromptListResponseDto>;
|
|
6
|
+
}
|
|
7
|
+
/** Result returned by {@link usePromptsState}. */
|
|
8
|
+
export interface UsePromptsStateResult {
|
|
9
|
+
/** The caller's own prompts. */
|
|
10
|
+
prompts: PromptResponseDto[];
|
|
11
|
+
/** Folders in the caller's own prompt namespace. */
|
|
12
|
+
folders: PromptFolderResponseDto[];
|
|
13
|
+
/** Prompts other users have shared with the caller. */
|
|
14
|
+
sharedWithMe: PromptResponseDto[];
|
|
15
|
+
/** Organisation-wide (public) prompts, read-only for every user. */
|
|
16
|
+
publicPrompts: PromptResponseDto[];
|
|
17
|
+
/** Folders in the organisation prompt namespace. */
|
|
18
|
+
publicFolders: PromptFolderResponseDto[];
|
|
19
|
+
/** True until the aggregate prompt listing has settled. */
|
|
20
|
+
isLoading: boolean;
|
|
21
|
+
/** Rejection reason of the most recent failed list request, or `null`. */
|
|
22
|
+
error: unknown;
|
|
23
|
+
/** Re-reads personal, shared-with-me, and organisation prompts. */
|
|
24
|
+
refetch: () => Promise<void>;
|
|
25
|
+
/** Compatibility alias for the aggregate refetch — same function reference as `refetch`. */
|
|
26
|
+
refetchPublicPrompts: () => Promise<void>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Fetches all prompt namespaces (personal, shared, public) with a single
|
|
30
|
+
* aggregate request. Exposes `refetch` / `refetchPublicPrompts` for
|
|
31
|
+
* manual refresh. Does not import any app context, routing, or i18n.
|
|
32
|
+
*/
|
|
33
|
+
export declare const usePromptsState: ({ listPrompts, }: UsePromptsStateParams) => UsePromptsStateResult;
|
|
34
|
+
//# sourceMappingURL=usePromptsState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePromptsState.d.ts","sourceRoot":"","sources":["../../../src/prompt/usePromptsState/usePromptsState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,qBAAqB,EACrB,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAGvC,8CAA8C;AAC9C,MAAM,WAAW,qBAAqB;IACpC,4DAA4D;IAC5D,WAAW,EAAE,MAAM,OAAO,CAAC,qBAAqB,CAAC,CAAC;CACnD;AAED,kDAAkD;AAClD,MAAM,WAAW,qBAAqB;IACpC,gCAAgC;IAChC,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,oDAAoD;IACpD,OAAO,EAAE,uBAAuB,EAAE,CAAC;IACnC,uDAAuD;IACvD,YAAY,EAAE,iBAAiB,EAAE,CAAC;IAClC,oEAAoE;IACpE,aAAa,EAAE,iBAAiB,EAAE,CAAC;IACnC,oDAAoD;IACpD,aAAa,EAAE,uBAAuB,EAAE,CAAC;IACzC,2DAA2D;IAC3D,SAAS,EAAE,OAAO,CAAC;IACnB,0EAA0E;IAC1E,KAAK,EAAE,OAAO,CAAC;IACf,mEAAmE;IACnE,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,4FAA4F;IAC5F,oBAAoB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3C;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,kBAE7B,qBAAqB,KAAG,qBA6E1B,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ScheduleTriggerDto } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
/** Display categories are independent of task editability. */
|
|
3
|
+
export declare enum ScheduledTaskTriggerDescriptionKind {
|
|
4
|
+
OneTime = "oneTime",
|
|
5
|
+
Hourly = "hourly",
|
|
6
|
+
EveryNMinutes = "everyNMinutes",
|
|
7
|
+
Daily = "daily",
|
|
8
|
+
Weekly = "weekly",
|
|
9
|
+
Monthly = "monthly",
|
|
10
|
+
Custom = "custom",
|
|
11
|
+
Invalid = "invalid"
|
|
12
|
+
}
|
|
13
|
+
export interface ScheduledTaskTriggerDescription {
|
|
14
|
+
kind: ScheduledTaskTriggerDescriptionKind;
|
|
15
|
+
time?: string;
|
|
16
|
+
dayOfWeek?: string;
|
|
17
|
+
dayOfMonth?: string;
|
|
18
|
+
intervalMinutes?: number;
|
|
19
|
+
date?: Date;
|
|
20
|
+
expression?: string;
|
|
21
|
+
sourceTimezone: 'utc';
|
|
22
|
+
}
|
|
23
|
+
export interface ScheduledTaskTriggerDescriptionOptions {
|
|
24
|
+
/** Display timezone; defaults to UTC for backwards compatibility. */
|
|
25
|
+
timeZone?: string;
|
|
26
|
+
/** Date whose timezone offset is used. Defaults to now (the existing UTC-storage policy). */
|
|
27
|
+
referenceDate?: Date;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Describes the complete trigger without requiring unrelated task metadata.
|
|
31
|
+
* Unsupported constraints remain Custom, with the full source expression.
|
|
32
|
+
* Calendar-month shifts crossing month boundaries or days 29–31 remain
|
|
33
|
+
* Custom because a shifted monthly day is not equivalent around short months.
|
|
34
|
+
* The one exception is `day: 'last'` one day behind local time, which is
|
|
35
|
+
* exactly the local 1st.
|
|
36
|
+
*/
|
|
37
|
+
export declare const describeScheduledTaskTrigger: (trigger: ScheduleTriggerDto, { timeZone, referenceDate, }?: ScheduledTaskTriggerDescriptionOptions) => ScheduledTaskTriggerDescription;
|
|
38
|
+
//# sourceMappingURL=scheduled-task-description.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduled-task-description.d.ts","sourceRoot":"","sources":["../../src/scheduled-task/scheduled-task-description.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAGxE,8DAA8D;AAC9D,oBAAY,mCAAmC;IAC7C,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,aAAa,kBAAkB;IAC/B,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,mCAAmC,CAAC;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,KAAK,CAAC;CACvB;AAED,MAAM,WAAW,sCAAsC;IACrD,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6FAA6F;IAC7F,aAAa,CAAC,EAAE,IAAI,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,GACvC,SAAS,kBAAkB,EAC3B,+BAGG,sCAA2C,KAC7C,+BA8JF,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ScheduledTaskCreateFormValues } from '@epam/ai-dial-scheduled-tasks';
|
|
2
|
+
/** Why a scheduled task DTO could not be mapped back to editable form values. */
|
|
3
|
+
export declare enum UnsupportedTriggerReason {
|
|
4
|
+
/** `trigger.cron.fields` uses a shape (extra keys, or both `day_of_week` and `day`) the editor's schedule controls cannot represent. */
|
|
5
|
+
UnsupportedCronShape = "unsupportedCronShape",
|
|
6
|
+
/** Neither or both of `trigger.date`/`trigger.cron` are set, so the schedule type cannot be determined. */
|
|
7
|
+
UnsupportedTriggerType = "unsupportedTriggerType",
|
|
8
|
+
/** The task is missing `model` or `prompt`, so it cannot be represented as a valid update payload. */
|
|
9
|
+
MissingRequiredFields = "missingRequiredFields"
|
|
10
|
+
}
|
|
11
|
+
/** Result of mapping a scheduled task DTO back to editable form values. */
|
|
12
|
+
export type ScheduledTaskDtoMappingResult = {
|
|
13
|
+
ok: true;
|
|
14
|
+
values: ScheduledTaskCreateFormValues;
|
|
15
|
+
} | {
|
|
16
|
+
ok: false;
|
|
17
|
+
reason: UnsupportedTriggerReason;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=scheduled-task-mapping.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduled-task-mapping.d.ts","sourceRoot":"","sources":["../../src/scheduled-task/scheduled-task-mapping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AAEnF,iFAAiF;AACjF,oBAAY,wBAAwB;IAClC,wIAAwI;IACxI,oBAAoB,yBAAyB;IAC7C,2GAA2G;IAC3G,sBAAsB,2BAA2B;IACjD,sGAAsG;IACtG,qBAAqB,0BAA0B;CAChD;AAED,2EAA2E;AAC3E,MAAM,MAAM,6BAA6B,GACrC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,6BAA6B,CAAA;CAAE,GACnD;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,wBAAwB,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CreateScheduledTaskBodyDto, UpdateScheduledTaskBodyDto } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
import { ScheduledTaskCreateFormValues } from '@epam/ai-dial-scheduled-tasks';
|
|
3
|
+
import { ScheduledTaskValidationErrors, ScheduledTaskValidationOptions } from '../../libs/scheduled-tasks/validation';
|
|
4
|
+
/** A checked request preparation result that never serializes invalid values. */
|
|
5
|
+
export type ScheduledTaskPreparationResult<TBody> = {
|
|
6
|
+
ok: true;
|
|
7
|
+
body: TBody;
|
|
8
|
+
} | {
|
|
9
|
+
ok: false;
|
|
10
|
+
errors: ScheduledTaskValidationErrors;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Validates form values before creating a request body. Hosts translate the
|
|
14
|
+
* returned field codes and must not issue a write when `ok` is false.
|
|
15
|
+
*/
|
|
16
|
+
export declare const prepareScheduledTaskCreateBody: (values: ScheduledTaskCreateFormValues, options: ScheduledTaskValidationOptions) => ScheduledTaskPreparationResult<CreateScheduledTaskBodyDto>;
|
|
17
|
+
/** Validates form values before preparing an update request body. */
|
|
18
|
+
export declare const prepareScheduledTaskUpdateBody: (values: ScheduledTaskCreateFormValues, options: ScheduledTaskValidationOptions) => ScheduledTaskPreparationResult<UpdateScheduledTaskBodyDto>;
|
|
19
|
+
//# sourceMappingURL=scheduled-task-preparation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduled-task-preparation.d.ts","sourceRoot":"","sources":["../../src/scheduled-task/scheduled-task-preparation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,0BAA0B,EAC3B,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AACnF,OAAO,EAEL,KAAK,6BAA6B,EAClC,KAAK,8BAA8B,EACpC,MAAM,0CAA0C,CAAC;AAMlD,iFAAiF;AACjF,MAAM,MAAM,8BAA8B,CAAC,KAAK,IAC5C;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,KAAK,CAAA;CAAE,GACzB;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,6BAA6B,CAAA;CAAE,CAAC;AAEzD;;;GAGG;AACH,eAAO,MAAM,8BAA8B,GACzC,QAAQ,6BAA6B,EACrC,SAAS,8BAA8B,KACtC,8BAA8B,CAAC,0BAA0B,CAK3D,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,8BAA8B,GACzC,QAAQ,6BAA6B,EACrC,SAAS,8BAA8B,KACtC,8BAA8B,CAAC,0BAA0B,CAK3D,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { CreateScheduledTaskBodyDto, ScheduledTaskDto, UpdateScheduledTaskBodyDto } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
import { ScheduledTaskCreateFormValues } from '@epam/ai-dial-scheduled-tasks';
|
|
3
|
+
import { ScheduledTaskDtoMappingResult } from './scheduled-task-mapping';
|
|
4
|
+
/**
|
|
5
|
+
* Maps validated create-form values to the `POST /api/v1/scheduled-tasks`
|
|
6
|
+
* request body, building `trigger.date` for a one-shot schedule or
|
|
7
|
+
* `trigger.cron.fields` for a recurring one. Assumes the caller has already
|
|
8
|
+
* validated required fields (name, model, prompt, and the active schedule
|
|
9
|
+
* section's fields) — this function does not re-validate.
|
|
10
|
+
*/
|
|
11
|
+
export declare const mapFormValuesToCreateBody: (values: ScheduledTaskCreateFormValues) => CreateScheduledTaskBodyDto;
|
|
12
|
+
/**
|
|
13
|
+
* Maps a complete, validated edit draft to an update body. An unset skill
|
|
14
|
+
* emits null to remove the saved reference; hydrate from detail before editing.
|
|
15
|
+
*/
|
|
16
|
+
export declare const mapFormValuesToUpdateBody: (values: ScheduledTaskCreateFormValues) => UpdateScheduledTaskBodyDto;
|
|
17
|
+
/**
|
|
18
|
+
* Attempts to map a {@link ScheduledTaskDto} back to editable
|
|
19
|
+
* {@link ScheduledTaskCreateFormValues}, inverting {@link buildCronFields}/
|
|
20
|
+
* {@link buildCronWindowBoundary}. Fails closed — returning a reason instead
|
|
21
|
+
* of a value — whenever the task's trigger or required fields cannot be
|
|
22
|
+
* represented losslessly by the editor, so an unsupported schedule is never
|
|
23
|
+
* silently coerced and re-submitted.
|
|
24
|
+
*/
|
|
25
|
+
export declare const mapScheduledTaskDtoToFormValues: (dto: ScheduledTaskDto) => ScheduledTaskDtoMappingResult;
|
|
26
|
+
//# sourceMappingURL=scheduled-task-trigger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduled-task-trigger.d.ts","sourceRoot":"","sources":["../../src/scheduled-task/scheduled-task-trigger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,gBAAgB,EAEhB,0BAA0B,EAC3B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,6BAA6B,EAE9B,MAAM,+BAA+B,CAAC;AAWvC,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,0BAA0B,CAAC;AAuGlC;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,GACpC,QAAQ,6BAA6B,KACpC,0BAsCF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,GACpC,QAAQ,6BAA6B,KACpC,0BAGD,CAAC;AAqHH;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B,GAC1C,KAAK,gBAAgB,KACpB,6BA8FF,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { CreateScheduledTaskBodyDto, CreatedScheduledTaskDto, ListScheduledTaskRunsResponseDto, ListScheduledTasksResponseDto, ListScheduledTasksSortEnum, ScheduledTaskDto, UpdateScheduledTaskBodyDto, UpdatedScheduledTaskDto } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
/** Narrow configured generated-client surface required by scheduler hooks. */
|
|
3
|
+
export interface ScheduledTasksConfiguredClient {
|
|
4
|
+
listScheduledTasks: (request: {
|
|
5
|
+
limit?: number;
|
|
6
|
+
offset?: number;
|
|
7
|
+
search?: string;
|
|
8
|
+
sort?: ListScheduledTasksSortEnum;
|
|
9
|
+
model?: string;
|
|
10
|
+
}, options?: RequestInit) => Promise<ListScheduledTasksResponseDto>;
|
|
11
|
+
listScheduledTaskRuns: (request: {
|
|
12
|
+
scheduleId: string;
|
|
13
|
+
limit?: number;
|
|
14
|
+
offset?: number;
|
|
15
|
+
}, options?: RequestInit) => Promise<ListScheduledTaskRunsResponseDto>;
|
|
16
|
+
createScheduledTask: (request: {
|
|
17
|
+
createScheduledTaskBodyDto: CreateScheduledTaskBodyDto;
|
|
18
|
+
}) => Promise<CreatedScheduledTaskDto>;
|
|
19
|
+
getScheduledTask: (request: {
|
|
20
|
+
scheduleId: string;
|
|
21
|
+
}) => Promise<ScheduledTaskDto>;
|
|
22
|
+
updateScheduledTask: (request: {
|
|
23
|
+
scheduleId: string;
|
|
24
|
+
updateScheduledTaskBodyDto: UpdateScheduledTaskBodyDto;
|
|
25
|
+
}) => Promise<UpdatedScheduledTaskDto>;
|
|
26
|
+
pauseScheduledTask: (request: {
|
|
27
|
+
scheduleId: string;
|
|
28
|
+
}) => Promise<ScheduledTaskDto>;
|
|
29
|
+
resumeScheduledTask: (request: {
|
|
30
|
+
scheduleId: string;
|
|
31
|
+
}) => Promise<ScheduledTaskDto>;
|
|
32
|
+
deleteScheduledTask: (request: {
|
|
33
|
+
scheduleId: string;
|
|
34
|
+
}) => Promise<void>;
|
|
35
|
+
}
|
|
36
|
+
/** App-agnostic request options accepted by the scheduler facade. */
|
|
37
|
+
export interface ScheduledTasksListRequest {
|
|
38
|
+
limit?: number;
|
|
39
|
+
offset?: number;
|
|
40
|
+
search?: string;
|
|
41
|
+
sort?: ListScheduledTasksSortEnum;
|
|
42
|
+
/** Only tasks that run against this model/application id, exactly as stored. */
|
|
43
|
+
model?: string;
|
|
44
|
+
signal?: AbortSignal;
|
|
45
|
+
}
|
|
46
|
+
export interface ScheduledTaskRunsListRequest {
|
|
47
|
+
scheduleId: string;
|
|
48
|
+
limit?: number;
|
|
49
|
+
offset?: number;
|
|
50
|
+
signal?: AbortSignal;
|
|
51
|
+
}
|
|
52
|
+
export interface ScheduledTasksApiClient {
|
|
53
|
+
listScheduledTasks: (request?: ScheduledTasksListRequest) => Promise<ListScheduledTasksResponseDto>;
|
|
54
|
+
listScheduledTaskRuns: (request: ScheduledTaskRunsListRequest) => Promise<ListScheduledTaskRunsResponseDto>;
|
|
55
|
+
createScheduledTask: (body: CreateScheduledTaskBodyDto) => Promise<CreatedScheduledTaskDto>;
|
|
56
|
+
getScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
|
|
57
|
+
updateScheduledTask: (scheduleId: string, body: UpdateScheduledTaskBodyDto) => Promise<UpdatedScheduledTaskDto>;
|
|
58
|
+
pauseScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
|
|
59
|
+
resumeScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
|
|
60
|
+
deleteScheduledTask: (scheduleId: string) => Promise<void>;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Composes scheduler operations over an already configured generated client.
|
|
64
|
+
* Authentication, base URL, CSRF, and retries remain host responsibilities.
|
|
65
|
+
*/
|
|
66
|
+
export declare const createScheduledTasksApiClient: (client: ScheduledTasksConfiguredClient) => ScheduledTasksApiClient;
|
|
67
|
+
//# sourceMappingURL=scheduled-tasks-api-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduled-tasks-api-client.d.ts","sourceRoot":"","sources":["../../src/scheduled-task/scheduled-tasks-api-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,uBAAuB,EACvB,gCAAgC,EAChC,6BAA6B,EAC7B,0BAA0B,EAC1B,gBAAgB,EAChB,0BAA0B,EAC1B,uBAAuB,EACxB,MAAM,+BAA+B,CAAC;AAEvC,8EAA8E;AAC9E,MAAM,WAAW,8BAA8B;IAC7C,kBAAkB,EAAE,CAClB,OAAO,EAAE;QACP,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,0BAA0B,CAAC;QAClC,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,EACD,OAAO,CAAC,EAAE,WAAW,KAClB,OAAO,CAAC,6BAA6B,CAAC,CAAC;IAC5C,qBAAqB,EAAE,CACrB,OAAO,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,EAChE,OAAO,CAAC,EAAE,WAAW,KAClB,OAAO,CAAC,gCAAgC,CAAC,CAAC;IAC/C,mBAAmB,EAAE,CAAC,OAAO,EAAE;QAC7B,0BAA0B,EAAE,0BAA0B,CAAC;KACxD,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACvC,gBAAgB,EAAE,CAAC,OAAO,EAAE;QAC1B,UAAU,EAAE,MAAM,CAAC;KACpB,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAChC,mBAAmB,EAAE,CAAC,OAAO,EAAE;QAC7B,UAAU,EAAE,MAAM,CAAC;QACnB,0BAA0B,EAAE,0BAA0B,CAAC;KACxD,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACvC,kBAAkB,EAAE,CAAC,OAAO,EAAE;QAC5B,UAAU,EAAE,MAAM,CAAC;KACpB,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAChC,mBAAmB,EAAE,CAAC,OAAO,EAAE;QAC7B,UAAU,EAAE,MAAM,CAAC;KACpB,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAChC,mBAAmB,EAAE,CAAC,OAAO,EAAE;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACzE;AAED,qEAAqE;AACrE,MAAM,WAAW,yBAAyB;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,0BAA0B,CAAC;IAClC,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,WAAW,4BAA4B;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,WAAW,uBAAuB;IACtC,kBAAkB,EAAE,CAClB,OAAO,CAAC,EAAE,yBAAyB,KAChC,OAAO,CAAC,6BAA6B,CAAC,CAAC;IAC5C,qBAAqB,EAAE,CACrB,OAAO,EAAE,4BAA4B,KAClC,OAAO,CAAC,gCAAgC,CAAC,CAAC;IAC/C,mBAAmB,EAAE,CACnB,IAAI,EAAE,0BAA0B,KAC7B,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACtC,gBAAgB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACpE,mBAAmB,EAAE,CACnB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,0BAA0B,KAC7B,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACtC,kBAAkB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACtE,mBAAmB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACvE,mBAAmB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5D;AAWD;;;GAGG;AACH,eAAO,MAAM,6BAA6B,GACxC,QAAQ,8BAA8B,KACrC,uBAyBD,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ScheduledTaskRunDto } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
import { ScheduledTasksApiClient } from './scheduled-tasks-api-client';
|
|
3
|
+
export interface UseScheduledTaskRunsOptions {
|
|
4
|
+
scheduleId: string;
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
pageSize?: number;
|
|
7
|
+
/**
|
|
8
|
+
* The task's next scheduled run time (ISO string), when known. Drives the
|
|
9
|
+
* one-shot background refresh described on {@link useScheduledTaskRuns}.
|
|
10
|
+
* The caller already holds the task DTO — this hook never fetches it.
|
|
11
|
+
*/
|
|
12
|
+
nextRunTime?: string | null;
|
|
13
|
+
/**
|
|
14
|
+
* Keeps the 15s background poll running even when no loaded run is
|
|
15
|
+
* `InProgress`. For a run the caller started itself and tracks outside this
|
|
16
|
+
* hook, which the first poll then merges into `items`.
|
|
17
|
+
*/
|
|
18
|
+
pollWhileActive?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Merges a freshly-fetched page 0 into the currently-loaded run list: an
|
|
22
|
+
* already-known id is replaced in place at its existing array position, an
|
|
23
|
+
* unseen id is prepended (upstream order is `created_at desc`, so it is the
|
|
24
|
+
* newest), and an id absent from `incoming` is left untouched — a background
|
|
25
|
+
* refresh never removes a loaded run.
|
|
26
|
+
*/
|
|
27
|
+
export declare const mergeRunsById: (current: ScheduledTaskRunDto[], incoming: ScheduledTaskRunDto[]) => ScheduledTaskRunDto[];
|
|
28
|
+
/** Shared, cancellation-safe pagination and background refresh for one schedule's run history. */
|
|
29
|
+
export declare const useScheduledTaskRuns: (client: ScheduledTasksApiClient, { scheduleId, enabled, pageSize, nextRunTime, pollWhileActive, }: UseScheduledTaskRunsOptions) => {
|
|
30
|
+
items: ScheduledTaskRunDto[];
|
|
31
|
+
isLoading: boolean;
|
|
32
|
+
isLoadingMore: boolean;
|
|
33
|
+
initialError: Error | null;
|
|
34
|
+
loadMoreError: Error | null;
|
|
35
|
+
hasMore: boolean;
|
|
36
|
+
loadMore: () => void;
|
|
37
|
+
retryLoadMore: () => void;
|
|
38
|
+
refetch: () => void;
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=use-scheduled-task-runs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-scheduled-task-runs.d.ts","sourceRoot":"","sources":["../../src/scheduled-task/use-scheduled-task-runs.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAE5E,MAAM,WAAW,2BAA2B;IAC1C,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAoCD;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,GACxB,SAAS,mBAAmB,EAAE,EAC9B,UAAU,mBAAmB,EAAE,KAC9B,mBAAmB,EAMrB,CAAC;AA0BF,kGAAkG;AAClG,eAAO,MAAM,oBAAoB,GAC/B,QAAQ,uBAAuB,EAC/B,kEAMG,2BAA2B;;;;;;;;;;CA4U/B,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCallback as e, useEffect as t, useRef as n, useState as r } from "react";
|
|
2
2
|
import { ScheduledTaskRunDtoStatusEnum as i } from "@epam/ai-dial-chat-api-client";
|
|
3
3
|
//#region src/scheduled-task/use-scheduled-task-runs.ts
|
|
4
|
-
var a = 15e3, o =
|
|
4
|
+
var a = 15e3, o = 48, s = 5e3, c = 2147483647, l = (e, t) => {
|
|
5
5
|
if (e <= c) {
|
|
6
6
|
let n = setTimeout(t, Math.max(e, 0));
|
|
7
7
|
return () => clearTimeout(n);
|
|
@@ -20,18 +20,18 @@ var a = 15e3, o = 20, s = 5e3, c = 2147483647, l = (e, t) => {
|
|
|
20
20
|
let t = n.get(e.id);
|
|
21
21
|
return !t || JSON.stringify(t) !== JSON.stringify(e);
|
|
22
22
|
});
|
|
23
|
-
}, f = (c, { scheduleId: f, enabled: p = !0, pageSize: m = 10, nextRunTime: h }) => {
|
|
24
|
-
let [
|
|
25
|
-
|
|
26
|
-
let
|
|
23
|
+
}, f = (c, { scheduleId: f, enabled: p = !0, pageSize: m = 10, nextRunTime: h, pollWhileActive: g = !1 }) => {
|
|
24
|
+
let [_, v] = r([]), [y, b] = r(p), [x, S] = r(!1), [C, w] = r(null), [T, E] = r(null), [D, O] = r(!1), [k, A] = r(0), j = n(0), M = n(0), N = n(!1), P = n(null), F = n(_), I = n(y), L = n(x), R = n(null), z = n(0), B = n(null), V = n(!1);
|
|
25
|
+
F.current = _, I.current = y, L.current = x;
|
|
26
|
+
let H = g || _.some((e) => e.status === i.InProgress);
|
|
27
27
|
t(() => {
|
|
28
|
-
let e = ++
|
|
29
|
-
|
|
28
|
+
let e = ++j.current, t = new AbortController();
|
|
29
|
+
P.current?.abort(), P.current = null, R.current?.abort(), R.current = null, N.current = !1, z.current = 0, B.current = null, V.current = !1, S(!1), w(null), E(null), v([]), O(!1), M.current = 0;
|
|
30
30
|
let n = () => {
|
|
31
|
-
++
|
|
31
|
+
++j.current, t.abort(), P.current?.abort(), P.current = null, R.current?.abort(), R.current = null;
|
|
32
32
|
};
|
|
33
|
-
return !p || !f ? (
|
|
34
|
-
|
|
33
|
+
return !p || !f ? (b(!1), v([]), O(!1), n) : ((async () => {
|
|
34
|
+
b(!0);
|
|
35
35
|
try {
|
|
36
36
|
let n = await c.listScheduledTaskRuns({
|
|
37
37
|
scheduleId: f,
|
|
@@ -39,29 +39,29 @@ var a = 15e3, o = 20, s = 5e3, c = 2147483647, l = (e, t) => {
|
|
|
39
39
|
offset: 0,
|
|
40
40
|
signal: t.signal
|
|
41
41
|
});
|
|
42
|
-
if (
|
|
43
|
-
|
|
42
|
+
if (j.current !== e) return;
|
|
43
|
+
v(n.items), M.current = n.items.length, O(n.next != null || (n.count == null ? n.items.length === m : n.items.length < n.count));
|
|
44
44
|
} catch (t) {
|
|
45
|
-
|
|
45
|
+
j.current === e && w(t instanceof Error ? t : /* @__PURE__ */ Error("Failed to load scheduled task runs"));
|
|
46
46
|
} finally {
|
|
47
|
-
|
|
47
|
+
j.current === e && b(!1);
|
|
48
48
|
}
|
|
49
49
|
})(), n);
|
|
50
50
|
}, [
|
|
51
51
|
c,
|
|
52
52
|
p,
|
|
53
53
|
m,
|
|
54
|
-
|
|
54
|
+
k,
|
|
55
55
|
f
|
|
56
56
|
]);
|
|
57
|
-
let
|
|
58
|
-
if (!p || !f || !
|
|
59
|
-
|
|
57
|
+
let U = e(() => {
|
|
58
|
+
if (!p || !f || !D || y || N.current) return;
|
|
59
|
+
N.current = !0;
|
|
60
60
|
let e = new AbortController();
|
|
61
|
-
|
|
62
|
-
let t =
|
|
61
|
+
P.current = e;
|
|
62
|
+
let t = j.current, n = M.current;
|
|
63
63
|
(async () => {
|
|
64
|
-
|
|
64
|
+
S(!0), E(null);
|
|
65
65
|
try {
|
|
66
66
|
let r = await c.listScheduledTaskRuns({
|
|
67
67
|
scheduleId: f,
|
|
@@ -69,28 +69,28 @@ var a = 15e3, o = 20, s = 5e3, c = 2147483647, l = (e, t) => {
|
|
|
69
69
|
offset: n,
|
|
70
70
|
signal: e.signal
|
|
71
71
|
});
|
|
72
|
-
if (
|
|
73
|
-
|
|
72
|
+
if (j.current !== t) return;
|
|
73
|
+
v((e) => {
|
|
74
74
|
let t = new Set(e.map(({ id: e }) => e));
|
|
75
75
|
return [...e, ...r.items.filter(({ id: e }) => t.has(e) ? !1 : (t.add(e), !0))];
|
|
76
|
-
}),
|
|
76
|
+
}), M.current = n + r.items.length, O(r.next != null || (r.count == null ? r.items.length === m : n + r.items.length < r.count));
|
|
77
77
|
} catch (e) {
|
|
78
|
-
|
|
78
|
+
j.current === t && E(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load more scheduled task runs"));
|
|
79
79
|
} finally {
|
|
80
|
-
|
|
80
|
+
j.current === t && (S(!1), N.current = !1, P.current = null);
|
|
81
81
|
}
|
|
82
82
|
})();
|
|
83
83
|
}, [
|
|
84
84
|
c,
|
|
85
85
|
p,
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
D,
|
|
87
|
+
y,
|
|
88
88
|
m,
|
|
89
89
|
f
|
|
90
|
-
]),
|
|
91
|
-
if (
|
|
92
|
-
let e =
|
|
93
|
-
|
|
90
|
+
]), W = e(async () => {
|
|
91
|
+
if (I.current || L.current) return "skipped";
|
|
92
|
+
let e = j.current, t = new AbortController();
|
|
93
|
+
R.current?.abort(), R.current = t;
|
|
94
94
|
try {
|
|
95
95
|
let n = await c.listScheduledTaskRuns({
|
|
96
96
|
scheduleId: f,
|
|
@@ -98,40 +98,40 @@ var a = 15e3, o = 20, s = 5e3, c = 2147483647, l = (e, t) => {
|
|
|
98
98
|
offset: 0,
|
|
99
99
|
signal: t.signal
|
|
100
100
|
});
|
|
101
|
-
if (
|
|
102
|
-
let r =
|
|
103
|
-
return a && (
|
|
101
|
+
if (j.current !== e || I.current || L.current) return "skipped";
|
|
102
|
+
let r = F.current, i = u(r, n.items), a = d(r, i);
|
|
103
|
+
return a && (F.current = i, v(i)), a ? "changed" : "unchanged";
|
|
104
104
|
} catch {
|
|
105
105
|
return "error";
|
|
106
106
|
} finally {
|
|
107
|
-
|
|
107
|
+
R.current === t && (R.current = null);
|
|
108
108
|
}
|
|
109
109
|
}, [
|
|
110
110
|
c,
|
|
111
111
|
f,
|
|
112
112
|
m
|
|
113
|
-
]),
|
|
113
|
+
]), G = e(() => {
|
|
114
114
|
if (document.visibilityState !== "visible") {
|
|
115
|
-
|
|
115
|
+
V.current = !0;
|
|
116
116
|
return;
|
|
117
117
|
}
|
|
118
|
-
|
|
119
|
-
}, [
|
|
118
|
+
W();
|
|
119
|
+
}, [W]);
|
|
120
120
|
return t(() => {
|
|
121
|
-
if (!p || !f || !
|
|
122
|
-
|
|
121
|
+
if (!p || !f || !H) return;
|
|
122
|
+
z.current = 0;
|
|
123
123
|
let e = setInterval(() => {
|
|
124
124
|
if (document.visibilityState !== "visible") {
|
|
125
|
-
|
|
125
|
+
V.current = !0;
|
|
126
126
|
return;
|
|
127
127
|
}
|
|
128
128
|
(async () => {
|
|
129
|
-
let t = await
|
|
129
|
+
let t = await W();
|
|
130
130
|
if (t === "changed") {
|
|
131
|
-
|
|
131
|
+
z.current = 0;
|
|
132
132
|
return;
|
|
133
133
|
}
|
|
134
|
-
(t === "unchanged" || t === "error") && (
|
|
134
|
+
(t === "unchanged" || t === "error") && (z.current += 1, z.current >= o && e !== null && (clearInterval(e), e = null));
|
|
135
135
|
})();
|
|
136
136
|
}, a);
|
|
137
137
|
return () => {
|
|
@@ -140,24 +140,24 @@ var a = 15e3, o = 20, s = 5e3, c = 2147483647, l = (e, t) => {
|
|
|
140
140
|
}, [
|
|
141
141
|
p,
|
|
142
142
|
f,
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
H,
|
|
144
|
+
W
|
|
145
145
|
]), t(() => {
|
|
146
146
|
if (!p || !f || !h) return;
|
|
147
147
|
let e = new Date(h).getTime();
|
|
148
148
|
if (!(Number.isNaN(e) || e <= Date.now())) return l(e - Date.now() + s, () => {
|
|
149
|
-
|
|
149
|
+
B.current = h, G();
|
|
150
150
|
});
|
|
151
151
|
}, [
|
|
152
152
|
p,
|
|
153
153
|
f,
|
|
154
154
|
h,
|
|
155
|
-
|
|
155
|
+
G
|
|
156
156
|
]), t(() => {
|
|
157
157
|
if (!p || !f) return;
|
|
158
158
|
let e = () => {
|
|
159
|
-
document.visibilityState !== "visible" || !
|
|
160
|
-
await
|
|
159
|
+
document.visibilityState !== "visible" || !V.current || (async () => {
|
|
160
|
+
await W() !== "skipped" && (V.current = !1);
|
|
161
161
|
})();
|
|
162
162
|
};
|
|
163
163
|
return document.addEventListener("visibilitychange", e), () => {
|
|
@@ -166,28 +166,28 @@ var a = 15e3, o = 20, s = 5e3, c = 2147483647, l = (e, t) => {
|
|
|
166
166
|
}, [
|
|
167
167
|
p,
|
|
168
168
|
f,
|
|
169
|
-
|
|
169
|
+
W
|
|
170
170
|
]), t(() => {
|
|
171
|
-
if (!p || !f || !h ||
|
|
171
|
+
if (!p || !f || !h || y || x) return;
|
|
172
172
|
let e = new Date(h).getTime();
|
|
173
|
-
Number.isNaN(e) || e > Date.now() ||
|
|
173
|
+
Number.isNaN(e) || e > Date.now() || B.current !== h && (B.current = h, G());
|
|
174
174
|
}, [
|
|
175
175
|
p,
|
|
176
176
|
f,
|
|
177
177
|
h,
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
178
|
+
y,
|
|
179
|
+
x,
|
|
180
|
+
G
|
|
181
181
|
]), {
|
|
182
|
-
items:
|
|
183
|
-
isLoading:
|
|
184
|
-
isLoadingMore:
|
|
185
|
-
initialError:
|
|
186
|
-
loadMoreError:
|
|
187
|
-
hasMore:
|
|
188
|
-
loadMore:
|
|
189
|
-
retryLoadMore:
|
|
190
|
-
refetch: e(() =>
|
|
182
|
+
items: _,
|
|
183
|
+
isLoading: y,
|
|
184
|
+
isLoadingMore: x,
|
|
185
|
+
initialError: C,
|
|
186
|
+
loadMoreError: T,
|
|
187
|
+
hasMore: D,
|
|
188
|
+
loadMore: U,
|
|
189
|
+
retryLoadMore: U,
|
|
190
|
+
refetch: e(() => A((e) => e + 1), [])
|
|
191
191
|
};
|
|
192
192
|
};
|
|
193
193
|
//#endregion
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ListScheduledTasksSortEnum, ScheduledTaskDto } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
import { ScheduledTasksApiClient } from './scheduled-tasks-api-client';
|
|
3
|
+
export interface UseScheduledTasksOptions {
|
|
4
|
+
enabled?: boolean;
|
|
5
|
+
pageSize?: number;
|
|
6
|
+
debounceMs?: number;
|
|
7
|
+
initialSearch?: string;
|
|
8
|
+
initialSort?: ListScheduledTasksSortEnum;
|
|
9
|
+
/** Restricts the list to tasks of one model/application; changing it reloads from the first page. */
|
|
10
|
+
model?: string;
|
|
11
|
+
}
|
|
12
|
+
/** Shared scheduler-list lifecycle with generation-scoped stale-response guards. */
|
|
13
|
+
export declare const useScheduledTasks: (client: ScheduledTasksApiClient, { enabled, pageSize, debounceMs, initialSearch, initialSort, model, }?: UseScheduledTasksOptions) => {
|
|
14
|
+
items: ScheduledTaskDto[];
|
|
15
|
+
searchQuery: string;
|
|
16
|
+
setSearchQuery: import('react').Dispatch<import('react').SetStateAction<string>>;
|
|
17
|
+
sortKey: "firstToRun" | "lastToRun" | "newest" | "nameAZ";
|
|
18
|
+
setSortKey: import('react').Dispatch<import('react').SetStateAction<"firstToRun" | "lastToRun" | "newest" | "nameAZ">>;
|
|
19
|
+
isLoading: boolean;
|
|
20
|
+
isLoadingMore: boolean;
|
|
21
|
+
initialError: Error | null;
|
|
22
|
+
loadMoreError: Error | null;
|
|
23
|
+
hasMore: boolean;
|
|
24
|
+
loadMore: () => void;
|
|
25
|
+
retryLoadMore: () => void;
|
|
26
|
+
refetch: () => void;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=use-scheduled-tasks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-scheduled-tasks.d.ts","sourceRoot":"","sources":["../../src/scheduled-task/use-scheduled-tasks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,gBAAgB,EACjB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAE5E,MAAM,WAAW,wBAAwB;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,0BAA0B,CAAC;IACzC,qGAAqG;IACrG,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,oFAAoF;AACpF,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,uBAAuB,EAC/B,wEAOG,wBAA6B;;;;;;;;;;;;;;CAuJjC,CAAC"}
|