@epam/ai-dial-chat-hooks 1.3.0-dev.35 → 1.3.0-dev.37
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/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 -1436
- 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.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 -1250
- 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.types.d.ts +327 -0
- package/files/dial-file-manager.types.d.ts.map +1 -0
- 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/useDialFileManager/useDialFileManager.d.ts +16 -0
- package/files/useDialFileManager/useDialFileManager.d.ts.map +1 -0
- 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/useDialFileSharing/useDialFileSharing.d.ts +34 -0
- package/files/useDialFileSharing/useDialFileSharing.d.ts.map +1 -0
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts +47 -0
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts.map +1 -0
- package/files/useFileAttachmentPicker/useFileAttachmentPicker.d.ts +59 -0
- package/files/useFileAttachmentPicker/useFileAttachmentPicker.d.ts.map +1 -0
- package/index.d.ts +152 -6996
- package/index.d.ts.map +1 -0
- 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 +15 -15
- 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-tasks.d.ts +28 -0
- package/scheduled-task/use-scheduled-tasks.d.ts.map +1 -0
- package/scheduled-tasks.d.ts +2 -256
- package/scroll-anchoring.d.ts +2 -50
- package/shared/application-schema.d.ts +16 -0
- package/shared/application-schema.d.ts.map +1 -0
- 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 +54 -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/useUsageData/useUsageData.d.ts +28 -0
- package/usage/useUsageData/useUsageData.d.ts.map +1 -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/viewport-layout.d.ts +2 -27
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/** Phase of a skill-archive import, driving the host's loading/success/error presentation. */
|
|
2
|
+
export declare enum SkillArchiveImportStatus {
|
|
3
|
+
Idle = "idle",
|
|
4
|
+
Uploading = "uploading",
|
|
5
|
+
Success = "success",
|
|
6
|
+
Error = "error"
|
|
7
|
+
}
|
|
8
|
+
/** Semantic classification of an import request failure. */
|
|
9
|
+
export declare enum SkillArchiveImportErrorKind {
|
|
10
|
+
Validation = "validation",
|
|
11
|
+
Collision = "collision",
|
|
12
|
+
RateLimited = "rateLimited",
|
|
13
|
+
ServiceUnavailable = "serviceUnavailable",
|
|
14
|
+
Generic = "generic"
|
|
15
|
+
}
|
|
16
|
+
/** Reason a selected/dropped file was rejected before any request was made. */
|
|
17
|
+
export declare enum SkillArchiveSelectionRejectionReason {
|
|
18
|
+
UnsupportedFilename = "unsupportedFilename"
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Classifies an import request's HTTP status into a semantic outcome: 400/413/422 are
|
|
22
|
+
* archive-content problems, 409 is a name collision, 429 is rate limiting, 502/503 mean the
|
|
23
|
+
* backend is unavailable, and anything else (including no status at all) is generic.
|
|
24
|
+
*/
|
|
25
|
+
export declare const classifySkillArchiveImportError: (status: number | undefined) => SkillArchiveImportErrorKind;
|
|
26
|
+
/** Options accepted by {@link useSkillArchiveImport}. */
|
|
27
|
+
export interface UseSkillArchiveImportOptions<TResult> {
|
|
28
|
+
/** Submits the selected archive; the host owns the client. `signal` aborts when the dialog closes or the hook unmounts mid-upload. */
|
|
29
|
+
importArchive: (file: File, signal: AbortSignal) => Promise<TResult>;
|
|
30
|
+
/** Called once after a successful import (and any awaited host follow-up) settles. */
|
|
31
|
+
onImported: (result: TResult) => void | Promise<void>;
|
|
32
|
+
/** Called once when the import request, or the host's follow-up in {@link onImported}, fails. */
|
|
33
|
+
onError: (error: unknown, kind: SkillArchiveImportErrorKind) => void;
|
|
34
|
+
/** Exact filename treated as the skill manifest. Defaults to `'SKILL.md'`. */
|
|
35
|
+
manifestFileName?: string;
|
|
36
|
+
}
|
|
37
|
+
/** Result returned by {@link useSkillArchiveImport}. */
|
|
38
|
+
export interface UseSkillArchiveImportResult {
|
|
39
|
+
/** Whether the upload dialog is open. */
|
|
40
|
+
isDialogOpen: boolean;
|
|
41
|
+
/** Current phase of the import. */
|
|
42
|
+
status: SkillArchiveImportStatus;
|
|
43
|
+
/** Whether an import request is in flight; the dialog stays open until it succeeds. */
|
|
44
|
+
isUploading: boolean;
|
|
45
|
+
/** Reason the current/last selection was rejected locally; `undefined` once cleared. */
|
|
46
|
+
selectionRejectionReason: SkillArchiveSelectionRejectionReason | undefined;
|
|
47
|
+
/** Classified failure of the last import request; `undefined` outside a request failure. */
|
|
48
|
+
errorKind: SkillArchiveImportErrorKind | undefined;
|
|
49
|
+
/** Opens the dialog and clears any previous rejection or request failure. */
|
|
50
|
+
openDialog: () => void;
|
|
51
|
+
/** Closes the dialog, aborting an in-flight import, and clears any rejection reason. */
|
|
52
|
+
closeDialog: () => void;
|
|
53
|
+
/** Wire to the dialog drop zone's `onChange`. */
|
|
54
|
+
handleFilesSelected: (files: File[]) => void;
|
|
55
|
+
/** Wire to the dialog drop zone's `onReject`. */
|
|
56
|
+
handleFilesRejected: () => void;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Headless controller for the skill-archive upload flow: dialog visibility, the exact-filename
|
|
60
|
+
* precheck, in-flight exclusion, abort-on-close, and import completion. The host supplies the configured request
|
|
61
|
+
* and observes completion/failure through the injected callbacks; the hook never imports app
|
|
62
|
+
* contexts, i18n, or a configured API client.
|
|
63
|
+
*/
|
|
64
|
+
export declare const useSkillArchiveImport: <TResult>({ importArchive, onImported, onError, manifestFileName, }: UseSkillArchiveImportOptions<TResult>) => UseSkillArchiveImportResult;
|
|
65
|
+
//# sourceMappingURL=useSkillArchiveImport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSkillArchiveImport.d.ts","sourceRoot":"","sources":["../../../src/skill/useSkillAr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AI,CAAC;IACvB,wFAAwF;IACxF,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,iDAAiD;IACjD,mBAAmB,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IAC7C,iDAAiD;IACjD,mBAAmB,EAAE,MAAM,IAAI,CAAC;CACjC;AAED;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAAI,OAAO,EAAE,2DAK5C,4BAA4B,CAAC,OAAO,CAAC,KAAG,2BA0H1C,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { SkillFileListResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
import { SkillEditorValues, SkillFileTreeNode } from '@epam/ai-dial-skill-editor';
|
|
3
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
4
|
+
import { SkillFileContent } from './skill-file-preview';
|
|
5
|
+
/** Edit-mode load state for a skill-authoring form; create mode never leaves `Loaded`. */
|
|
6
|
+
export declare enum SkillEditorLoadState {
|
|
7
|
+
/** The edit-mode download/parse flow is in flight. */
|
|
8
|
+
Loading = "loading",
|
|
9
|
+
/** The skill loaded successfully (or create mode, which starts here). */
|
|
10
|
+
Loaded = "loaded",
|
|
11
|
+
/** The download/parse flow failed for a reason other than 403/404. */
|
|
12
|
+
Error = "error",
|
|
13
|
+
/** The caller lacks permission to read the skill. */
|
|
14
|
+
Forbidden = "forbidden",
|
|
15
|
+
/** The skill no longer exists at the given path. */
|
|
16
|
+
NotFound = "not-found"
|
|
17
|
+
}
|
|
18
|
+
/** Already-configured DIAL Core download operations `useSkillEditorLoad` needs. */
|
|
19
|
+
export interface SkillEditorLoadClient {
|
|
20
|
+
/** Downloads the whole-skill ZIP archive. */
|
|
21
|
+
downloadSkill: (bucket: string, path: string) => Promise<Response>;
|
|
22
|
+
/** Downloads one file within the skill (the manifest or a supporting file). */
|
|
23
|
+
downloadSkillFile: (bucket: string, path: string, filePath: string) => Promise<Response>;
|
|
24
|
+
/** Lists the skill's files when the whole-skill ZIP route is unusable. */
|
|
25
|
+
listSkillFiles: (params: {
|
|
26
|
+
bucket: string;
|
|
27
|
+
path?: string;
|
|
28
|
+
filePath: string;
|
|
29
|
+
recursive?: boolean;
|
|
30
|
+
}) => Promise<SkillFileListResponseDto>;
|
|
31
|
+
}
|
|
32
|
+
/** Parameters accepted by {@link useSkillEditorLoad}. */
|
|
33
|
+
export interface UseSkillEditorLoadParams {
|
|
34
|
+
/** Whether the form is editing an existing skill rather than creating a new one. */
|
|
35
|
+
isEditMode: boolean;
|
|
36
|
+
/** DIAL Core bucket holding the skill. Load is skipped until this resolves. */
|
|
37
|
+
bucket: string | undefined;
|
|
38
|
+
/** Path to the skill within `bucket`. */
|
|
39
|
+
skillPath: string | null | undefined;
|
|
40
|
+
/** Already-configured download operations. */
|
|
41
|
+
client: SkillEditorLoadClient;
|
|
42
|
+
}
|
|
43
|
+
/** Return value of {@link useSkillEditorLoad}. */
|
|
44
|
+
export interface UseSkillEditorLoadResult {
|
|
45
|
+
/** Current load-state machine value driving the form's presentation. */
|
|
46
|
+
loadState: SkillEditorLoadState;
|
|
47
|
+
/** The loaded (or, in create mode, seeded) manifest values. */
|
|
48
|
+
loadedValues: SkillEditorValues | undefined;
|
|
49
|
+
/** Updates `loadedValues`, e.g. after a manifest import. */
|
|
50
|
+
setLoadedValues: Dispatch<SetStateAction<SkillEditorValues | undefined>>;
|
|
51
|
+
/** The loaded supporting-file tree. */
|
|
52
|
+
files: SkillFileTreeNode[];
|
|
53
|
+
/** Updates `files`, e.g. after a batch commit or node removal. */
|
|
54
|
+
setFiles: Dispatch<SetStateAction<SkillFileTreeNode[]>>;
|
|
55
|
+
/** In-memory bytes for every supporting file, keyed by relative path. */
|
|
56
|
+
filesContentRef: React.MutableRefObject<Map<string, SkillFileContent>>;
|
|
57
|
+
/** The loaded manifest's full parsed frontmatter, including fields the form never renders. */
|
|
58
|
+
frontmatterRef: React.MutableRefObject<Record<string, unknown>>;
|
|
59
|
+
/** The concurrency ETag from the load, sent back as `If-Match` on save. */
|
|
60
|
+
etagRef: React.MutableRefObject<string | undefined>;
|
|
61
|
+
/** The skill path the currently loaded state belongs to. */
|
|
62
|
+
loadedPathRef: React.MutableRefObject<string | undefined>;
|
|
63
|
+
/** Re-attempts the edit-mode download (load-error retry or post-conflict reload). */
|
|
64
|
+
retryLoad: () => void;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Owns the edit-mode skill download/unpack/parse flow: the in-memory
|
|
68
|
+
* supporting-file map, the loaded manifest values and frontmatter, the
|
|
69
|
+
* concurrency ETag, and the load-state machine driving the form's
|
|
70
|
+
* loading/error/forbidden/not-found presentation. Create mode never leaves
|
|
71
|
+
* `'loaded'` and starts with empty state.
|
|
72
|
+
*/
|
|
73
|
+
export declare const useSkillEditorLoad: ({ isEditMode, bucket, skillPath, client, }: UseSkillEditorLoadParams) => UseSkillEditorLoadResult;
|
|
74
|
+
//# sourceMappingURL=useSkillEditorLoad.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSkillEditorLoad.d.ts","sourceRoot":"","sources":["../../src/skill/useSkillEditorLoad.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EAEzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAgBtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,0FAA0F;AAC1F,oBAAY,oBAAoB;IAC9B,sDAAsD;IACtD,OAAO,YAAY;IACnB,yEAAyE;IACzE,MAAM,WAAW;IACjB,sEAAsE;IACtE,KAAK,UAAU;IACf,qDAAqD;IACrD,SAAS,cAAc;IACvB,oDAAoD;IACpD,QAAQ,cAAc;CACvB;AAED,mFAAmF;AACnF,M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AC,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC;IACvE,8FAA8F;IAC9F,cAAc,EAAE,KAAK,CAAC,gBAAgB,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAChE,2EAA2E;IAC3E,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACpD,4DAA4D;IAC5D,aAAa,EAAE,KAAK,CAAC,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC1D,qFAAqF;IACrF,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAAI,4CAKhC,wBAAwB,KAAG,wBAwH7B,CAAC"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { SkillUploadResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
import { SkillEditorErrors, SkillEditorValues, SkillFileTreeNode } from '@epam/ai-dial-skill-editor';
|
|
3
|
+
import { NotificationVariant } from '@epam/ai-dial-ui-kit';
|
|
4
|
+
import { SkillFileContent } from './skill-file-preview';
|
|
5
|
+
type SubmitPhase = 'idle' | 'submitting' | 'success' | 'failure';
|
|
6
|
+
/** Already-configured DIAL Core write operations `useSkillEditorSubmit` needs. */
|
|
7
|
+
export interface SkillEditorSubmitClient {
|
|
8
|
+
/** Creates a new skill. */
|
|
9
|
+
createSkill: (bucket: string, path: string, skillManifest: string, filePaths: string[], files: Blob[]) => Promise<SkillUploadResponseDto>;
|
|
10
|
+
/** Updates an existing skill, sending `ifMatch` as the concurrency guard. */
|
|
11
|
+
updateSkill: (bucket: string, path: string, skillManifest: string, filePaths: string[], files: Blob[], ifMatch: string) => Promise<SkillUploadResponseDto>;
|
|
12
|
+
}
|
|
13
|
+
/** Localized messages `useSkillEditorSubmit` needs. */
|
|
14
|
+
export interface SkillEditorSubmitMessages {
|
|
15
|
+
/** Shown when a required field is empty. */
|
|
16
|
+
required: string;
|
|
17
|
+
/** Shown when a name, description or instructions value exceeds its length limit, given that limit. */
|
|
18
|
+
tooLong: (maxLength: number) => string;
|
|
19
|
+
/**
|
|
20
|
+
* Shown when the Instructions value opens with its own YAML frontmatter
|
|
21
|
+
* block — pasting a whole `SKILL.md` in there would otherwise produce a
|
|
22
|
+
* manifest with two frontmatter blocks.
|
|
23
|
+
*/
|
|
24
|
+
instructionsFrontmatter: string;
|
|
25
|
+
/** Shown when the normalized skill name fails DIAL's naming rules. */
|
|
26
|
+
nameInvalid: string;
|
|
27
|
+
/** Shown when the skill name already exists (409), or defensively on an unreachable create-mode 412. */
|
|
28
|
+
nameConflict: string;
|
|
29
|
+
/** Shown when the submitted package exceeds the server's size limit (413). */
|
|
30
|
+
archiveTooLarge: string;
|
|
31
|
+
/** Shown when the backend is temporarily unavailable (503). */
|
|
32
|
+
serviceUnavailable: string;
|
|
33
|
+
/** Fallback shown for a 400 whose response body carries no message. */
|
|
34
|
+
pathInvalid: string;
|
|
35
|
+
/** Generic fallback shown for any other error status. */
|
|
36
|
+
saveError: string;
|
|
37
|
+
/** Notification title on a successful create. */
|
|
38
|
+
saveSuccessTitle: string;
|
|
39
|
+
/** Notification message on a successful create, given the created name. */
|
|
40
|
+
createSuccess: (name: string) => string;
|
|
41
|
+
/** Notification title on a successful update. */
|
|
42
|
+
updateSuccessTitle: string;
|
|
43
|
+
/** Notification message on a successful update, given the skill's name. */
|
|
44
|
+
updateSuccess: (name: string) => string;
|
|
45
|
+
/** Shown when a save hits a stale-ETag conflict (412) in edit mode. */
|
|
46
|
+
conflictMessage: string;
|
|
47
|
+
}
|
|
48
|
+
/** A host notification `useSkillEditorSubmit` asks to be shown. */
|
|
49
|
+
export interface SkillEditorSubmitNotification {
|
|
50
|
+
/** Notification style. */
|
|
51
|
+
variant: NotificationVariant;
|
|
52
|
+
/** Optional heading. */
|
|
53
|
+
title?: string;
|
|
54
|
+
/** Body text. */
|
|
55
|
+
message: string;
|
|
56
|
+
/** W3C trace ID, when the triggering error carried one. */
|
|
57
|
+
requestId?: string;
|
|
58
|
+
}
|
|
59
|
+
/** Parameters accepted by {@link useSkillEditorSubmit}. */
|
|
60
|
+
export interface UseSkillEditorSubmitParams {
|
|
61
|
+
/** DIAL Core bucket the skill is saved to. */
|
|
62
|
+
bucket: string | undefined;
|
|
63
|
+
/** Whether the form is editing an existing skill rather than creating a new one. */
|
|
64
|
+
isEditMode: boolean;
|
|
65
|
+
/** The editor's current supporting-file tree. */
|
|
66
|
+
files: SkillFileTreeNode[];
|
|
67
|
+
/** In-memory bytes for every supporting file, keyed by relative path. */
|
|
68
|
+
filesContentRef: React.MutableRefObject<Map<string, SkillFileContent>>;
|
|
69
|
+
/** The loaded (or imported) manifest's full parsed frontmatter. */
|
|
70
|
+
frontmatterRef: React.MutableRefObject<Record<string, unknown>>;
|
|
71
|
+
/** The path the currently loaded edit-mode state belongs to. */
|
|
72
|
+
loadedPathRef: React.MutableRefObject<string | undefined>;
|
|
73
|
+
/** The concurrency ETag from the load, sent back as `If-Match` on save. */
|
|
74
|
+
etagRef: React.MutableRefObject<string | undefined>;
|
|
75
|
+
/** Where to navigate on a successful save. */
|
|
76
|
+
returnUrl: string;
|
|
77
|
+
/** Resolves the destination after creation from the normalized skill path. Defaults to `returnUrl`. */
|
|
78
|
+
getCreateReturnUrl?: (path: string) => string;
|
|
79
|
+
/** Refetches the host's skill listing after a successful save. */
|
|
80
|
+
refetchSkills: () => Promise<void>;
|
|
81
|
+
/** Already-configured create/update operations. */
|
|
82
|
+
client: SkillEditorSubmitClient;
|
|
83
|
+
/** Localized messages, resolved by the host. */
|
|
84
|
+
messages: SkillEditorSubmitMessages;
|
|
85
|
+
/** Called with `returnUrl` after a successful save. */
|
|
86
|
+
onNavigate: (url: string) => void;
|
|
87
|
+
/** Called to surface a host notification (success toast or unexpected-error toast). */
|
|
88
|
+
onNotify: (notification: SkillEditorSubmitNotification) => void;
|
|
89
|
+
}
|
|
90
|
+
/** Return value of {@link useSkillEditorSubmit}. */
|
|
91
|
+
export interface UseSkillEditorSubmitResult {
|
|
92
|
+
/** Current submit-phase. */
|
|
93
|
+
phase: SubmitPhase;
|
|
94
|
+
/** Inline field validation errors. */
|
|
95
|
+
errors: SkillEditorErrors;
|
|
96
|
+
/** General submit-time error, distinct from a stale-edit `conflict`. */
|
|
97
|
+
submitError: string | undefined;
|
|
98
|
+
/** Whether `submitError` was caused by something a plain re-send can clear, rather than by the submission itself. */
|
|
99
|
+
isSubmitErrorRetryable: boolean;
|
|
100
|
+
/** Re-submits the values of the attempt that produced `submitError`. No-op before the first submit. */
|
|
101
|
+
retrySubmit: () => void;
|
|
102
|
+
/** Present when the last save hit a stale-ETag conflict. */
|
|
103
|
+
conflict: {
|
|
104
|
+
message: string;
|
|
105
|
+
} | undefined;
|
|
106
|
+
/** Clears `conflict`, e.g. once the host has reloaded the latest skill. */
|
|
107
|
+
clearConflict: () => void;
|
|
108
|
+
/** Validates and submits the given form values. */
|
|
109
|
+
handleSubmit: (values: SkillEditorValues) => Promise<void>;
|
|
110
|
+
/**
|
|
111
|
+
* Re-runs the Instructions frontmatter check against the editor's current
|
|
112
|
+
* values, so a pasted `SKILL.md` is flagged as the text lands rather than
|
|
113
|
+
* only on submit. Pass as the editor's `onValuesChange`.
|
|
114
|
+
*/
|
|
115
|
+
handleValuesChange: (values: SkillEditorValues) => void;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Owns the Skill Editor's create/edit submission flow: field validation,
|
|
119
|
+
* building and (in edit mode) merging the `SKILL.md` manifest, calling
|
|
120
|
+
* `client.createSkill`/`client.updateSkill`, and mapping the resulting
|
|
121
|
+
* success/error/conflict outcomes to presentable state.
|
|
122
|
+
*/
|
|
123
|
+
export declare const useSkillEditorSubmit: ({ bucket, isEditMode, files, filesContentRef, frontmatterRef, loadedPathRef, etagRef, returnUrl, getCreateReturnUrl, refetchSkills, client, messages, onNavigate, onNotify, }: UseSkillEditorSubmitParams) => UseSkillEditorSubmitResult;
|
|
124
|
+
export {};
|
|
125
|
+
//# sourceMappingURL=useSkillEditorSubmit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSkillEditorSubmit.d.ts","sourceRoot":"","sources":["../../src/skill/useSkillEditorSubmit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAa3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAQ7D,KAAK,WAAW,GAAG,MAAM,GAAG,YAAY,GAAG,SAAS,GAAG,SAAS,CAAC;AAyBjE,kFAAkF;AAClF,MAAM,WAAW,uBAAuB;IACtC,2BAA2B;IAC3B,WAAW,EAAE,CACX,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,EAAE,EACnB,KAAK,EAAE,IAAI,EAAE,KACV,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACrC,6EAA6E;IAC7E,WAAW,EAAE,CACX,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,EAAE,EACnB,KAAK,EAAE,IAAI,EAAE,EACb,OAAO,EAAE,MAAM,KACZ,OAAO,CAAC,sBAAsB,CAAC,CAAC;CACtC;AAED,uDAAuD;AACvD,MAAM,WAAW,yBAAyB;IACxC,4CAA4C;IAC5C,QAAQ,EAAE,MAAM,CAAC;IACjB,uGAAuG;IACvG,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;IACvC;;;;OAIG;IACH,uBAAuB,EAAE,MAAM,CAAC;IAChC,sE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AAED;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAAI,+KAelC,0BAA0B,KAAG,0BAyU/B,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { SkillEditorFileActions, SkillEditorValues, SkillFileSourceEntry, SkillFileTreeNode } from '@epam/ai-dial-skill-editor';
|
|
2
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
3
|
+
import { SkillFileBatchValidationMessages } from './skill-file-batch-validation';
|
|
4
|
+
import { SkillFileContent } from './skill-file-preview';
|
|
5
|
+
/** Localized messages `useSkillFileActions` needs beyond per-candidate batch validation. */
|
|
6
|
+
export interface SkillFileActionsMessages extends SkillFileBatchValidationMessages {
|
|
7
|
+
/** Returned as the commit error when an imported manifest's `name` doesn't match the skill being edited. */
|
|
8
|
+
manifestNameMismatch: string;
|
|
9
|
+
/** Returned as the commit error when the user declines the manifest-import confirmation. */
|
|
10
|
+
manifestImportDeclined: string;
|
|
11
|
+
/** Generic fallback commit error for a batch with invalid candidates but no specific batch error. */
|
|
12
|
+
saveError: string;
|
|
13
|
+
}
|
|
14
|
+
/** Parameters accepted by {@link useSkillFileActions}. */
|
|
15
|
+
export interface UseSkillFileActionsParams {
|
|
16
|
+
/** The editor's current supporting-file tree. */
|
|
17
|
+
files: SkillFileTreeNode[];
|
|
18
|
+
/** Updates `files`. */
|
|
19
|
+
setFiles: Dispatch<SetStateAction<SkillFileTreeNode[]>>;
|
|
20
|
+
/** In-memory bytes for every supporting file, keyed by relative path. */
|
|
21
|
+
filesContentRef: React.MutableRefObject<Map<string, SkillFileContent>>;
|
|
22
|
+
/** The loaded (or imported) manifest's full parsed frontmatter. */
|
|
23
|
+
frontmatterRef: React.MutableRefObject<Record<string, unknown>>;
|
|
24
|
+
/** The seeded baseline manifest values, used to approximate the projected total size. */
|
|
25
|
+
loadedValues: SkillEditorValues | undefined;
|
|
26
|
+
/** Updates `loadedValues` after a manifest import. */
|
|
27
|
+
setLoadedValues: Dispatch<SetStateAction<SkillEditorValues | undefined>>;
|
|
28
|
+
/** Whether the form is editing an existing skill rather than creating a new one. */
|
|
29
|
+
isEditMode: boolean;
|
|
30
|
+
/** Whether the form currently diverges from its seeded baseline. */
|
|
31
|
+
isDirty: boolean;
|
|
32
|
+
/** Updates the currently selected file-tree node path. */
|
|
33
|
+
setSelectedPath: Dispatch<SetStateAction<string>>;
|
|
34
|
+
/** Localized messages, resolved by the host. */
|
|
35
|
+
messages: SkillFileActionsMessages;
|
|
36
|
+
/**
|
|
37
|
+
* Opens the host's file-system picker; passed through unchanged as
|
|
38
|
+
* `fileActions.pickFromFileSystem`. Omit to hide the editor's "Open DIAL
|
|
39
|
+
* file system" entry.
|
|
40
|
+
*/
|
|
41
|
+
pickFromFileSystem?: () => Promise<SkillFileSourceEntry[] | undefined>;
|
|
42
|
+
}
|
|
43
|
+
/** Return value of {@link useSkillFileActions}. */
|
|
44
|
+
export interface UseSkillFileActionsResult {
|
|
45
|
+
/** File-tree mutation operations, passed straight to `SkillEditor`'s `fileActions` prop. */
|
|
46
|
+
fileActions: SkillEditorFileActions;
|
|
47
|
+
/** Whether the "replace Skill metadata?" confirmation prompt should be shown. */
|
|
48
|
+
pendingManifestImport: boolean;
|
|
49
|
+
/** Resolves the in-flight manifest-import confirmation with the user's choice. */
|
|
50
|
+
resolveManifestImport: (accepted: boolean) => void;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Owns the Skill Editor's batch file upload workflow: validating a staged
|
|
54
|
+
* batch, committing it atomically (supporting files plus an optional
|
|
55
|
+
* `SKILL.md` manifest import, with a confirmation gate), creating empty
|
|
56
|
+
* folders, expanding `.zip` archives for staging, and removing
|
|
57
|
+
* already-committed nodes.
|
|
58
|
+
*/
|
|
59
|
+
export declare const useSkillFileActions: ({ files, setFiles, filesContentRef, frontmatterRef, loadedValues, setLoadedValues, isEditMode, isDirty, setSelectedPath, messages, pickFromFileSystem, }: UseSkillFileActionsParams) => UseSkillFileActionsResult;
|
|
60
|
+
//# sourceMappingURL=useSkillFileActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSkillFileActions.d.ts","sourceRoot":"","sources":["../../src/skill/useSkillFileActions.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EAEvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAUtD,OAAO,EAEL,KAAK,gCAAgC,EACtC,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,4FAA4F;AAC5F,MAAM,WAAW,wBAAyB,SAAQ,gCAAgC;IAChF,4GAA4G;IAC5G,oBAAoB,EAAE,MAAM,CAAC;IAC7B,4FAA4F;IAC5F,sBAAsB,EAAE,MAAM,CAAC;IAC/B,qGAAqG;IACrG,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,0DAA0D;AAC1D,MAAM,WAAW,yBAAyB;IACxC,iDAAiD;IACjD,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,uBAAuB;IACvB,QAAQ,EAAE,QAAQ,CAAC,cAAc,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC;IACxD,yEAAyE;IACzE,eAAe,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC;IACvE,mEAAmE;IACnE,cAAc,EAAE,KAAK,CAAC,gBAAgB,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAChE,yFAAyF;IACzF,YAAY,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAC5C,sDAAsD;IACtD,eAAe,EAAE,QAAQ,CAAC,cAAc,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAAC,CAAC;IACzE,oFAAoF;IACpF,UAAU,EAAE,OAAO,CAAC;IACpB,oEAAoE;IACpE,OAAO,EAAE,OAAO,CAAC;IACjB,0DAA0D;IAC1D,eAAe,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IAClD,gDAAgD;IAChD,QAAQ,EAAE,wBAAwB,CAAC;IACnC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,OAAO,CAAC,oBAAoB,EAAE,GAAG,SAAS,CAAC,CAAC;CACxE;AAED,mDAAmD;AACnD,MAAM,WAAW,yBAAyB;IACxC,4FAA4F;IAC5F,WAAW,EAAE,sBAAsB,CAAC;IACpC,iFAAiF;IACjF,qBAAqB,EAAE,OAAO,CAAC;IAC/B,kFAAkF;IAClF,qBAAqB,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CACpD;AAQD;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,GAAI,0JAYjC,yBAAyB,KAAG,yBA2M9B,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { SkillFileContent } from './skill-file-preview';
|
|
2
|
+
/** Discriminant for the kind of error a `useSkillFilePreview` load can produce. */
|
|
3
|
+
export declare enum SkillPreviewErrorKind {
|
|
4
|
+
/** HTTP 403 — the caller lacks permission to read this file. */
|
|
5
|
+
Forbidden = "forbidden",
|
|
6
|
+
/** Any non-403 load failure. */
|
|
7
|
+
Generic = "generic"
|
|
8
|
+
}
|
|
9
|
+
/** Options accepted by `useSkillFilePreview`. */
|
|
10
|
+
export interface UseSkillFilePreviewOptions {
|
|
11
|
+
/**
|
|
12
|
+
* Opaque id of the selected skill file. Changing this resets all state
|
|
13
|
+
* and starts a new load; stale resolutions from the previous id are discarded.
|
|
14
|
+
*/
|
|
15
|
+
fileId: string;
|
|
16
|
+
/**
|
|
17
|
+
* App-owned loader; resolves with the raw file bytes when the request
|
|
18
|
+
* succeeds. The hook never constructs a URL or imports a REST client.
|
|
19
|
+
*/
|
|
20
|
+
onLoadFile: (fileId: string) => Promise<SkillFileContent>;
|
|
21
|
+
}
|
|
22
|
+
/** State returned by `useSkillFilePreview`. */
|
|
23
|
+
export interface UseSkillFilePreviewResult {
|
|
24
|
+
/** `true` while the async load is in flight. */
|
|
25
|
+
isLoading: boolean;
|
|
26
|
+
/** Resolved file content, or `null` while loading or after an error. */
|
|
27
|
+
content: SkillFileContent | null;
|
|
28
|
+
/** Classified load error, or `null` while loading or after a success. */
|
|
29
|
+
error: SkillPreviewErrorKind | null;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Headless hook that manages the skill-file preview loading lifecycle.
|
|
33
|
+
* Starts a new load on mount and whenever `fileId` changes; classifies errors
|
|
34
|
+
* as `Forbidden` (HTTP 403) or `Generic`; discards settlements from superseded
|
|
35
|
+
* or unmounted loads.
|
|
36
|
+
*/
|
|
37
|
+
export declare const useSkillFilePreview: ({ fileId, onLoadFile, }: UseSkillFilePreviewOptions) => UseSkillFilePreviewResult;
|
|
38
|
+
//# sourceMappingURL=useSkillFilePreview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSkillFilePreview.d.ts","sourceRoot":"","sources":["../../src/skill/useSkillFilePreview.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,mFAAmF;AACnF,oBAAY,qBAAqB;IAC/B,gEAAgE;IAChE,SAAS,cAAc;IACvB,gCAAgC;IAChC,OAAO,YAAY;CACpB;AAED,iDAAiD;AACjD,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;CAC3D;AAED,+CAA+C;AAC/C,MAAM,WAAW,yBAAyB;IACxC,gDAAgD;IAChD,SAAS,EAAE,OAAO,CAAC;IACnB,wEAAwE;IACxE,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACjC,yEAAyE;IACzE,KAAK,EAAE,qBAAqB,GAAG,IAAI,CAAC;CACrC;AAED;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAAI,yBAGjC,0BAA0B,KAAG,yBAoC/B,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { SkillCatalogListResponseDto, SkillMetadataItemDto } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
/** Parameters for {@link useSkillsState}. */
|
|
3
|
+
export interface UseSkillsStateParams {
|
|
4
|
+
/** Fetches the aggregate skill listing from the server. */
|
|
5
|
+
listSkills: () => Promise<SkillCatalogListResponseDto>;
|
|
6
|
+
/** Whether the Skills feature is enabled in the current overlay/tenant config. */
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
/** Whether the user session is ready for API calls (auth has settled). */
|
|
9
|
+
ready: boolean;
|
|
10
|
+
}
|
|
11
|
+
/** Result returned by {@link useSkillsState}. */
|
|
12
|
+
export interface UseSkillsStateResult {
|
|
13
|
+
/** Skills in the caller's own bucket. */
|
|
14
|
+
skills: SkillMetadataItemDto[];
|
|
15
|
+
/** Skills in the organisation bucket. */
|
|
16
|
+
publicSkills: SkillMetadataItemDto[];
|
|
17
|
+
/** Skills other users shared with the caller. */
|
|
18
|
+
sharedWithMe: SkillMetadataItemDto[];
|
|
19
|
+
/** True until the aggregate listing has settled. */
|
|
20
|
+
isLoading: boolean;
|
|
21
|
+
/** Rejection reason of the most recent failed listing, or `null`. */
|
|
22
|
+
error: unknown;
|
|
23
|
+
/** Re-reads personal, shared, and organisation skills. */
|
|
24
|
+
refetch: () => Promise<void>;
|
|
25
|
+
/** Upserts a single skill into the shared-with-me list by URL identity. */
|
|
26
|
+
mergeSharedSkill: (item: SkillMetadataItemDto) => void;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Fetches all skill namespaces with a gated single request: clears state
|
|
30
|
+
* immediately when `enabled` is false, defers the fetch until `ready` is true,
|
|
31
|
+
* and exposes `refetch` / `mergeSharedSkill` for manual updates.
|
|
32
|
+
* Does not import any feature-flag hook, auth enum, or app context.
|
|
33
|
+
*/
|
|
34
|
+
export declare const useSkillsState: ({ listSkills, enabled, ready, }: UseSkillsStateParams) => UseSkillsStateResult;
|
|
35
|
+
//# sourceMappingURL=useSkillsState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSkillsState.d.ts","sourceRoot":"","sources":["../../../src/skill/useSkillsState/useSkillsState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,oBAAoB,EACrB,MAAM,+BAA+B,CAAC;AAGvC,6CAA6C;AAC7C,MAAM,WAAW,oBAAoB;IACnC,2DAA2D;IAC3D,UAAU,EAAE,MAAM,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACvD,kFAAkF;IAClF,OAAO,EAAE,OAAO,CAAC;IACjB,0EAA0E;IAC1E,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,iDAAiD;AACjD,MAAM,WAAW,oBAAoB;IACnC,yCAAyC;IACzC,MAAM,EAAE,oBAAoB,EAAE,CAAC;IAC/B,yCAAyC;IACzC,YAAY,EAAE,oBAAoB,EAAE,CAAC;IACrC,iDAAiD;IACjD,YAAY,EAAE,oBAAoB,EAAE,CAAC;IACrC,oDAAoD;IACpD,SAAS,EAAE,OAAO,CAAC;IACnB,qEAAqE;IACrE,KAAK,EAAE,OAAO,CAAC;IACf,0DAA0D;IAC1D,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,2EAA2E;IAC3E,gBAAgB,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAC;CACxD;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,iCAI5B,oBAAoB,KAAG,oBAqFzB,CAAC"}
|