@epam/ai-dial-chat-hooks 1.3.0-dev.5 → 1.3.0-dev.51
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 +136 -119
- 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.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 +152 -6974
- package/index.d.ts.map +1 -0
- package/index.js +43 -43
- 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 +17 -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 +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
package/skills-state.d.ts
CHANGED
|
@@ -1,40 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Fetches all skill namespaces with a gated single request: clears state
|
|
6
|
-
* immediately when `enabled` is false, defers the fetch until `ready` is true,
|
|
7
|
-
* and exposes `refetch` / `mergeSharedSkill` for manual updates.
|
|
8
|
-
* Does not import any feature-flag hook, auth enum, or app context.
|
|
9
|
-
*/
|
|
10
|
-
export declare const useSkillsState: ({ listSkills, enabled, ready, }: UseSkillsStateParams) => UseSkillsStateResult;
|
|
11
|
-
|
|
12
|
-
/** Parameters for {@link useSkillsState}. */
|
|
13
|
-
export declare interface UseSkillsStateParams {
|
|
14
|
-
/** Fetches the aggregate skill listing from the server. */
|
|
15
|
-
listSkills: () => Promise<SkillCatalogListResponseDto>;
|
|
16
|
-
/** Whether the Skills feature is enabled in the current overlay/tenant config. */
|
|
17
|
-
enabled: boolean;
|
|
18
|
-
/** Whether the user session is ready for API calls (auth has settled). */
|
|
19
|
-
ready: boolean;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/** Result returned by {@link useSkillsState}. */
|
|
23
|
-
export declare interface UseSkillsStateResult {
|
|
24
|
-
/** Skills in the caller's own bucket. */
|
|
25
|
-
skills: SkillMetadataItemDto[];
|
|
26
|
-
/** Skills in the organisation bucket. */
|
|
27
|
-
publicSkills: SkillMetadataItemDto[];
|
|
28
|
-
/** Skills other users shared with the caller. */
|
|
29
|
-
sharedWithMe: SkillMetadataItemDto[];
|
|
30
|
-
/** True until the aggregate listing has settled. */
|
|
31
|
-
isLoading: boolean;
|
|
32
|
-
/** Rejection reason of the most recent failed listing, or `null`. */
|
|
33
|
-
error: unknown;
|
|
34
|
-
/** Re-reads personal, shared, and organisation skills. */
|
|
35
|
-
refetch: () => Promise<void>;
|
|
36
|
-
/** Upserts a single skill into the shared-with-me list by URL identity. */
|
|
37
|
-
mergeSharedSkill: (item: SkillMetadataItemDto) => void;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export { }
|
|
1
|
+
export * from './entry-points/skills-state.js'
|
|
2
|
+
export {}
|
package/source-content.d.ts
CHANGED
|
@@ -1,29 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* URLs and DIAL-relative resource paths such as
|
|
4
|
-
* `files/<bucket>/qa-routed-source.html`. Any query string or hash is dropped
|
|
5
|
-
* and percent escapes are decoded. Returns an empty string when no segment can
|
|
6
|
-
* be extracted. Used to classify a resource by extension when its display name
|
|
7
|
-
* is a citation title rather than a file name.
|
|
8
|
-
*/
|
|
9
|
-
export declare const getUrlFileName: (url: string) => string;
|
|
10
|
-
|
|
11
|
-
/** Returns true when an external (non-DIAL) source URL should be opened in the canvas rather than a new browser tab. */
|
|
12
|
-
export declare const isExternalSourcePreviewable: (contentType: string, url: string) => boolean;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Returns the content type to trust for an external citation source: `contentType`
|
|
16
|
-
* unchanged when it is already an image/audio/PDF/document-renderer marker,
|
|
17
|
-
* otherwise the type implied by `url`'s path extension (`application/pdf` for
|
|
18
|
-
* `.pdf`, the canonical MIME for `.docx`/`.xlsx`/`.pptx`/`.csv`) when that
|
|
19
|
-
* extension is recognized, otherwise `contentType` unchanged.
|
|
20
|
-
*
|
|
21
|
-
* Web-search grounding APIs label every reference — PDFs and Office documents
|
|
22
|
-
* included — as `text/markdown`, so a mislabeled `contentType` must not win
|
|
23
|
-
* over a recognized URL extension: doing so previously sent a PDF's raw bytes
|
|
24
|
-
* into the markdown/text canvas viewer, rendering garbled text instead of
|
|
25
|
-
* opening the PDF/OOXML viewer.
|
|
26
|
-
*/
|
|
27
|
-
export declare const resolveExternalSourceContentType: (contentType: string, url: string) => string;
|
|
28
|
-
|
|
29
|
-
export { }
|
|
1
|
+
export * from './entry-points/source-content.js'
|
|
2
|
+
export {}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { UserLimitStatsResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
import { UsageLimitCardData } from '@epam/ai-dial-usage-dashboard';
|
|
3
|
+
/** A translate function compatible with i18next's `TFunction`. */
|
|
4
|
+
type Translate = (key: string, options?: Record<string, unknown>) => string;
|
|
5
|
+
/**
|
|
6
|
+
* One reset time, already parsed and formatted by the host. Declared
|
|
7
|
+
* structurally here so this library never imports an application type; the
|
|
8
|
+
* host passes a value that satisfies this shape (e.g. `apps/chat`'s own
|
|
9
|
+
* `ResetTimeDisplay`).
|
|
10
|
+
*/
|
|
11
|
+
export interface ResetTimeDisplay {
|
|
12
|
+
/** Exclusive end of the period as an epoch ms value, for the host's boundary scheduling. */
|
|
13
|
+
resetsAtMs: number;
|
|
14
|
+
/** Machine-readable instant for a `<time dateTime>` attribute. */
|
|
15
|
+
isoValue: string;
|
|
16
|
+
/** Visible reset line. */
|
|
17
|
+
label: string;
|
|
18
|
+
/** Accessible expansion of the reset line. */
|
|
19
|
+
ariaLabel: string;
|
|
20
|
+
}
|
|
21
|
+
/** Formats a raw `resetsAt` into display strings, or returns `undefined` when it cannot be formatted. */
|
|
22
|
+
export type FormatResetTime = (resetsAt: string | undefined) => ResetTimeDisplay | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* i18n key strings that the consuming app's translation bundle must define for
|
|
25
|
+
* `mapUsageDataToDashboard` to produce correctly translated strings. The
|
|
26
|
+
* values are the default key paths used by AI DIAL Chat.
|
|
27
|
+
*/
|
|
28
|
+
export declare const USAGE_DATA_I18N_KEYS: {
|
|
29
|
+
/** Title for the current-UTC-day card (e.g. `'Today'`). */
|
|
30
|
+
readonly todayTitle: "usage.todayTitle";
|
|
31
|
+
/** Accessible period description for the current-UTC-day card. */
|
|
32
|
+
readonly todayPeriodDescription: "usage.todayPeriodDescription";
|
|
33
|
+
/** Title for the current-UTC-week card (e.g. `'This week'`). */
|
|
34
|
+
readonly thisWeekTitle: "usage.thisWeekTitle";
|
|
35
|
+
/** Accessible period description for the current-UTC-week card. */
|
|
36
|
+
readonly thisWeekPeriodDescription: "usage.thisWeekPeriodDescription";
|
|
37
|
+
/** Title for the current-UTC-month card (e.g. `'This month'`). */
|
|
38
|
+
readonly thisMonthTitle: "usage.thisMonthTitle";
|
|
39
|
+
/** Accessible period description for the current-UTC-month card. */
|
|
40
|
+
readonly thisMonthPeriodDescription: "usage.thisMonthPeriodDescription";
|
|
41
|
+
/** Aria label when there is no limit. Receives `{ used: string }`. */
|
|
42
|
+
readonly unlimitedProgressAriaLabel: "usage.unlimitedProgressAriaLabel";
|
|
43
|
+
/** Aria label for a progress bar with a finite limit. Receives `{ used: string, total: string, percent: number }`. */
|
|
44
|
+
readonly progressAriaLabel: "usage.progressAriaLabel";
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Maps a `UserLimitStatsResponseDto` into `UsageLimitCardGroup`'s `cards` prop,
|
|
48
|
+
* in Today / This week / This month order. A period is omitted entirely when
|
|
49
|
+
* the response carries no usable stat for it. Each card's reset trio comes from
|
|
50
|
+
* `formatResetTime`, and is absent when that callback returns `undefined`.
|
|
51
|
+
*/
|
|
52
|
+
export declare const mapUsageDataToDashboard: (usage: UserLimitStatsResponseDto | undefined, t: Translate, formatResetTime: FormatResetTime) => UsageLimitCardData[];
|
|
53
|
+
export {};
|
|
54
|
+
//# sourceMappingURL=map-usage-data-to-dashboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"map-usage-data-to-dashboard.d.ts","sourceRoot":"","sources":["../../src/usage/map-usage-data-to-dashboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,yBAAyB,EAC1B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAGxE,kEAAkE;AAClE,KAAK,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC;AAE5E;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,4FAA4F;IAC5F,UAAU,EAAE,MAAM,CAAC;IACnB,kEAAkE;IAClE,QAAQ,EAAE,MAAM,CAAC;IACjB,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,yGAAyG;AACzG,MAAM,MAAM,eAAe,GAAG,CAC5B,QAAQ,EAAE,MAAM,GAAG,SAAS,KACzB,gBAAgB,GAAG,SAAS,CAAC;AAElC;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;IAC/B,2DAA2D;;IAE3D,kEAAkE;;IAElE,gEAAgE;;IAEhE,mEAAmE;;IAEnE,kEAAkE;;IAElE,oEAAoE;;IAEpE,sEAAsE;;IAEtE,sHAAsH;;CAE9G,CAAC;AA8FX;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,GAClC,OAAO,yBAAyB,GAAG,SAAS,EAC5C,GAAG,SAAS,EACZ,iBAAiB,eAAe,KAC/B,kBAAkB,EAoCpB,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { DeploymentItemDto, UserLimitStatsResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
import { ModelLimitPeriodStatuses, ModelLimitRow } from '@epam/ai-dial-usage-dashboard';
|
|
3
|
+
import { FormatResetTime } from './map-usage-data-to-dashboard';
|
|
4
|
+
export type { FormatResetTime } from './map-usage-data-to-dashboard';
|
|
5
|
+
/** A translate function compatible with i18next's `TFunction`. */
|
|
6
|
+
type Translate = (key: string, options?: Record<string, unknown>) => string;
|
|
7
|
+
/** A callback that resolves an icon URL from a deployment's raw `iconUrl` field. */
|
|
8
|
+
type ResolveIconUrl = (iconUrl: string | undefined) => string | undefined;
|
|
9
|
+
/** A callback that resolves a display name from a localized-text value. */
|
|
10
|
+
type ResolveDisplayName = (name: string | Record<string, string> | undefined | null, locale: string) => string;
|
|
11
|
+
/**
|
|
12
|
+
* i18n key strings that the consuming app's translation bundle must define for
|
|
13
|
+
* `mapUserUsageToModelLimits` and `mapOverallCostLimitsToPeriodStatuses` to produce
|
|
14
|
+
* correctly translated strings. The values are the default key paths used by AI DIAL Chat.
|
|
15
|
+
*/
|
|
16
|
+
export declare const USAGE_MODEL_LIMITS_I18N_KEYS: {
|
|
17
|
+
/** Period label used in tooltip text. Receives no interpolation. */
|
|
18
|
+
readonly todayPeriodDescription: "usage.todayPeriodDescription";
|
|
19
|
+
/** Period label used in tooltip text. Receives no interpolation. */
|
|
20
|
+
readonly thisWeekPeriodDescription: "usage.thisWeekPeriodDescription";
|
|
21
|
+
/** Period label used in tooltip text. Receives no interpolation. */
|
|
22
|
+
readonly thisMonthPeriodDescription: "usage.thisMonthPeriodDescription";
|
|
23
|
+
/** Tooltip when the overall cost limit is running low. Receives `{ period: string }`. */
|
|
24
|
+
readonly overallCostLimitRunningLowTooltip: "usage.overallCostLimitRunningLowTooltip";
|
|
25
|
+
/** Tooltip when the overall cost limit is reached. Receives `{ period: string }`. */
|
|
26
|
+
readonly overallCostLimitReachedTooltip: "usage.overallCostLimitReachedTooltip";
|
|
27
|
+
/** Aria label for a metric cell with no data. */
|
|
28
|
+
readonly unavailableLabel: "usage.unavailableLabel";
|
|
29
|
+
/** Supporting label when a token limit follows the cost limit. */
|
|
30
|
+
readonly followsCostLimitLabel: "usage.followsCostLimitLabel";
|
|
31
|
+
/** Supporting label when there is no per-deployment token limit. */
|
|
32
|
+
readonly noLimitLabel: "usage.noLimitLabel";
|
|
33
|
+
/** Aria label when token usage has no limit but follows the cost limit. Receives `{ used: string }`. */
|
|
34
|
+
readonly followsCostLimitAriaLabel: "usage.followsCostLimitAriaLabel";
|
|
35
|
+
/** Aria label when there is no limit. Receives `{ used: string }`. */
|
|
36
|
+
readonly unlimitedProgressAriaLabel: "usage.unlimitedProgressAriaLabel";
|
|
37
|
+
/** Aria label for a progress bar with a finite limit. Receives `{ used: string, total: string, percent: number }`. */
|
|
38
|
+
readonly progressAriaLabel: "usage.progressAriaLabel";
|
|
39
|
+
/** Label for the spent-cost cell. Receives `{ amount: string }`. */
|
|
40
|
+
readonly spentLabel: "usage.spentLabel";
|
|
41
|
+
/** Type caption for an application (agent) row. Receives no interpolation. */
|
|
42
|
+
readonly applicationTypeLabel: "usage.applicationTypeLabel";
|
|
43
|
+
/** Supporting label on an application row's spent cost. Receives no interpolation. */
|
|
44
|
+
readonly includesCalledModelsLabel: "usage.includesCalledModelsLabel";
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Maps the same top-level Cost budgets used by the aggregate cards into table-header state.
|
|
48
|
+
*
|
|
49
|
+
* @param formatResetTime - Formats each period's top-level `resetsAt` into the header's reset trio. Omit it to produce statuses with no reset fields.
|
|
50
|
+
*/
|
|
51
|
+
export declare const mapOverallCostLimitsToPeriodStatuses: (usage: UserLimitStatsResponseDto | undefined, activeLocale: string, t: Translate, formatResetTime?: FormatResetTime) => ModelLimitPeriodStatuses;
|
|
52
|
+
/**
|
|
53
|
+
* Maps `usage.deployments` into `ModelLimitsSection`'s `rows` prop, joined with model or application
|
|
54
|
+
* identity from `deploymentItems`. Rows are included only when any displayed period stat has nonzero
|
|
55
|
+
* usage (Cost stats only, for an application). Order follows `Object.keys(deployments)` —
|
|
56
|
+
* `deploymentItems` is enrichment-only.
|
|
57
|
+
*
|
|
58
|
+
* @param resolveIconUrl - Resolves a deployment's raw `iconUrl` to the URL the avatar should load.
|
|
59
|
+
* @param resolveDisplayName - Resolves a localized-text map or plain string to the display name for `activeLocale`.
|
|
60
|
+
*/
|
|
61
|
+
export declare const mapUserUsageToModelLimits: (usage: UserLimitStatsResponseDto | undefined, deploymentItems: DeploymentItemDto[], activeLocale: string, t: Translate, resolveIconUrl: ResolveIconUrl, resolveDisplayName: ResolveDisplayName) => ModelLimitRow[];
|
|
62
|
+
//# sourceMappingURL=map-user-usage-to-model-limits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"map-user-usage-to-model-limits.d.ts","sourceRoot":"","sources":["../../src/usage/map-user-usage-to-model-limits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EAGjB,yBAAyB,EAC1B,MAAM,+BAA+B,CAAC;AAGvC,OAAO,KAAK,EAIV,wBAAwB,EACxB,aAAa,EACd,MAAM,+BAA+B,CAAC;AAMvC,YAAY,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAErE,kEAAkE;AAClE,KAAK,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC;AAE5E,oFAAoF;AACpF,KAAK,cAAc,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,KAAK,MAAM,GAAG,SAAS,CAAC;AAE1E,2EAA2E;AAC3E,KAAK,kBAAkB,GAAG,CACxB,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,GAAG,IAAI,EACxD,MAAM,EAAE,MAAM,KACX,MAAM,CAAC;AAmBZ;;;;GAIG;AACH,eAAO,MAAM,4BAA4B;IACvC,oEAAoE;;IAEpE,oEAAoE;;IAEpE,oEAAoE;;IAEpE,yFAAyF;;IAEzF,qFAAqF;;IAErF,iDAAiD;;IAEjD,kEAAkE;;IAElE,oEAAoE;;IAEpE,wGAAwG;;IAExG,sEAAsE;;IAEtE,sHAAsH;;IAEtH,oEAAoE;;IAEpE,8EAA8E;;IAE9E,sFAAsF;;CAE9E,CAAC;AA6HX;;;;GAIG;AACH,eAAO,MAAM,oCAAoC,GAC/C,OAAO,yBAAyB,GAAG,SAAS,EAC5C,cAAc,MAAM,EACpB,GAAG,SAAS,EACZ,kBAAiB,eAA6B,KAC7C,wBAsBD,CAAC;AAkMH;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,GACpC,OAAO,yBAAyB,GAAG,SAAS,EAC5C,iBAAiB,iBAAiB,EAAE,EACpC,cAAc,MAAM,EACpB,GAAG,SAAS,EACZ,gBAAgB,cAAc,EAC9B,oBAAoB,kBAAkB,KACrC,aAAa,EAgIf,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { UserLimitStatsResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
/** Return shape of {@link useUsageData}. */
|
|
3
|
+
export interface UseUsageDataResult {
|
|
4
|
+
/** Calendar-period usage and rate-limit stats for every deployment the caller has used in the current UTC day, week, and month, plus the caller's global cost budget. Retained across a `refreshToken`-triggered re-fetch until the new response resolves. */
|
|
5
|
+
usage: UserLimitStatsResponseDto | undefined;
|
|
6
|
+
/** `true` while a fetch is in flight, including a `refreshToken`-triggered re-fetch. */
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
/** Set when the `getUserUsage` call rejects. */
|
|
9
|
+
usageError: Error | undefined;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Fetches usage stats via the provided `getUserUsage` function on mount, and
|
|
13
|
+
* again whenever `refreshToken` changes.
|
|
14
|
+
*
|
|
15
|
+
* `enabled` (default `true`) lets callers behind a feature flag skip the fetch
|
|
16
|
+
* entirely. The hook accepts the fetch function as a parameter so the caller
|
|
17
|
+
* supplies an already-configured API client — the hook never constructs or
|
|
18
|
+
* imports one itself.
|
|
19
|
+
*
|
|
20
|
+
* `refreshToken` (default `0`) is a caller-driven re-fetch trigger, subject to
|
|
21
|
+
* the same `enabled` gate. The hook owns no timer and reads no clock: the
|
|
22
|
+
* caller decides when to change the token. A previously resolved `usage` value
|
|
23
|
+
* is retained while a token-triggered re-fetch is in flight, so the consumer
|
|
24
|
+
* can keep rendering the last known figures and suppress a full-page loading
|
|
25
|
+
* state for a refresh.
|
|
26
|
+
*/
|
|
27
|
+
export declare const useUsageData: (getUserUsage: () => Promise<UserLimitStatsResponseDto>, enabled?: boolean, refreshToken?: number) => UseUsageDataResult;
|
|
28
|
+
//# sourceMappingURL=useUsageData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUsageData.d.ts","sourceRoot":"","sources":["../../../src/usage/useUsageData/useUsageData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAG/E,4CAA4C;AAC5C,MAAM,WAAW,kBAAkB;IACjC,8PAA8P;IAC9P,KAAK,EAAE,yBAAyB,GAAG,SAAS,CAAC;IAC7C,wFAAwF;IACxF,SAAS,EAAE,OAAO,CAAC;IACnB,gDAAgD;IAChD,UAAU,EAAE,KAAK,GAAG,SAAS,CAAC;CAC/B;AAKD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,YAAY,GACvB,cAAc,MAAM,OAAO,CAAC,yBAAyB,CAAC,EACtD,iBAAc,EACd,qBAAgB,KACf,kBAmCF,CAAC"}
|
package/usage.d.ts
CHANGED
|
@@ -1,125 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { ModelLimitRow } from '@epam/ai-dial-usage-dashboard';
|
|
4
|
-
import { UsageLimitCardData } from '@epam/ai-dial-usage-dashboard';
|
|
5
|
-
import { UserLimitStatsResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
6
|
-
|
|
7
|
-
/** Formats a raw `resetsAt` into display strings, or returns `undefined` when it cannot be formatted. */
|
|
8
|
-
export declare type FormatResetTime = (resetsAt: string | undefined) => ResetTimeDisplay | undefined;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Maps the same top-level Cost budgets used by the aggregate cards into table-header state.
|
|
12
|
-
*
|
|
13
|
-
* @param formatResetTime - Formats each period's top-level `resetsAt` into the header's reset trio. Omit it to produce statuses with no reset fields.
|
|
14
|
-
*/
|
|
15
|
-
export declare const mapOverallCostLimitsToPeriodStatuses: (usage: UserLimitStatsResponseDto | undefined, activeLocale: string, t: Translate_2, formatResetTime?: FormatResetTime) => ModelLimitPeriodStatuses;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Maps a `UserLimitStatsResponseDto` into `UsageLimitCardGroup`'s `cards` prop,
|
|
19
|
-
* in Today / This week / This month order. A period is omitted entirely when
|
|
20
|
-
* the response carries no usable stat for it. Each card's reset trio comes from
|
|
21
|
-
* `formatResetTime`, and is absent when that callback returns `undefined`.
|
|
22
|
-
*/
|
|
23
|
-
export declare const mapUsageDataToDashboard: (usage: UserLimitStatsResponseDto | undefined, t: Translate, formatResetTime: FormatResetTime) => UsageLimitCardData[];
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Maps `usage.deployments` into `ModelLimitsSection`'s `rows` prop, joined with model or application
|
|
27
|
-
* identity from `deploymentItems`. Rows are included only when any displayed period stat has nonzero
|
|
28
|
-
* usage (Cost stats only, for an application). Order follows `Object.keys(deployments)` —
|
|
29
|
-
* `deploymentItems` is enrichment-only.
|
|
30
|
-
*
|
|
31
|
-
* @param resolveIconUrl - Resolves a deployment's raw `iconUrl` to the URL the avatar should load.
|
|
32
|
-
* @param resolveDisplayName - Resolves a localized-text map or plain string to the display name for `activeLocale`.
|
|
33
|
-
*/
|
|
34
|
-
export declare const mapUserUsageToModelLimits: (usage: UserLimitStatsResponseDto | undefined, deploymentItems: DeploymentItemDto[], activeLocale: string, t: Translate_2, resolveIconUrl: ResolveIconUrl, resolveDisplayName: ResolveDisplayName) => ModelLimitRow[];
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* One reset time, already parsed and formatted by the host. Declared
|
|
38
|
-
* structurally here so this library never imports an application type; the
|
|
39
|
-
* host passes a value that satisfies this shape (e.g. `apps/chat`'s own
|
|
40
|
-
* `ResetTimeDisplay`).
|
|
41
|
-
*/
|
|
42
|
-
export declare interface ResetTimeDisplay {
|
|
43
|
-
/** Exclusive end of the period as an epoch ms value, for the host's boundary scheduling. */
|
|
44
|
-
resetsAtMs: number;
|
|
45
|
-
/** Machine-readable instant for a `<time dateTime>` attribute. */
|
|
46
|
-
isoValue: string;
|
|
47
|
-
/** Visible reset line. */
|
|
48
|
-
label: string;
|
|
49
|
-
/** Accessible expansion of the reset line. */
|
|
50
|
-
ariaLabel: string;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/** A callback that resolves a display name from a localized-text value. */
|
|
54
|
-
declare type ResolveDisplayName = (name: string | Record<string, string> | undefined | null, locale: string) => string;
|
|
55
|
-
|
|
56
|
-
/** A callback that resolves an icon URL from a deployment's raw `iconUrl` field. */
|
|
57
|
-
declare type ResolveIconUrl = (iconUrl: string | undefined) => string | undefined;
|
|
58
|
-
|
|
59
|
-
/** A translate function compatible with i18next's `TFunction`. */
|
|
60
|
-
declare type Translate = (key: string, options?: Record<string, unknown>) => string;
|
|
61
|
-
|
|
62
|
-
/** A translate function compatible with i18next's `TFunction`. */
|
|
63
|
-
declare type Translate_2 = (key: string, options?: Record<string, unknown>) => string;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* i18n key strings that the consuming app's translation bundle must define for
|
|
67
|
-
* `mapUsageDataToDashboard` to produce correctly translated strings. The
|
|
68
|
-
* values are the default key paths used by AI DIAL Chat.
|
|
69
|
-
*/
|
|
70
|
-
export declare const USAGE_DATA_I18N_KEYS: {
|
|
71
|
-
/** Title for the current-UTC-day card (e.g. `'Today'`). */
|
|
72
|
-
readonly todayTitle: "usage.todayTitle";
|
|
73
|
-
/** Accessible period description for the current-UTC-day card. */
|
|
74
|
-
readonly todayPeriodDescription: "usage.todayPeriodDescription";
|
|
75
|
-
/** Title for the current-UTC-week card (e.g. `'This week'`). */
|
|
76
|
-
readonly thisWeekTitle: "usage.thisWeekTitle";
|
|
77
|
-
/** Accessible period description for the current-UTC-week card. */
|
|
78
|
-
readonly thisWeekPeriodDescription: "usage.thisWeekPeriodDescription";
|
|
79
|
-
/** Title for the current-UTC-month card (e.g. `'This month'`). */
|
|
80
|
-
readonly thisMonthTitle: "usage.thisMonthTitle";
|
|
81
|
-
/** Accessible period description for the current-UTC-month card. */
|
|
82
|
-
readonly thisMonthPeriodDescription: "usage.thisMonthPeriodDescription";
|
|
83
|
-
/** Aria label when there is no limit. Receives `{ used: string }`. */
|
|
84
|
-
readonly unlimitedProgressAriaLabel: "usage.unlimitedProgressAriaLabel";
|
|
85
|
-
/** Aria label for a progress bar with a finite limit. Receives `{ used: string, total: string, percent: number }`. */
|
|
86
|
-
readonly progressAriaLabel: "usage.progressAriaLabel";
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* i18n key strings that the consuming app's translation bundle must define for
|
|
91
|
-
* `mapUserUsageToModelLimits` and `mapOverallCostLimitsToPeriodStatuses` to produce
|
|
92
|
-
* correctly translated strings. The values are the default key paths used by AI DIAL Chat.
|
|
93
|
-
*/
|
|
94
|
-
export declare const USAGE_MODEL_LIMITS_I18N_KEYS: {
|
|
95
|
-
/** Period label used in tooltip text. Receives no interpolation. */
|
|
96
|
-
readonly todayPeriodDescription: "usage.todayPeriodDescription";
|
|
97
|
-
/** Period label used in tooltip text. Receives no interpolation. */
|
|
98
|
-
readonly thisWeekPeriodDescription: "usage.thisWeekPeriodDescription";
|
|
99
|
-
/** Period label used in tooltip text. Receives no interpolation. */
|
|
100
|
-
readonly thisMonthPeriodDescription: "usage.thisMonthPeriodDescription";
|
|
101
|
-
/** Tooltip when the overall cost limit is running low. Receives `{ period: string }`. */
|
|
102
|
-
readonly overallCostLimitRunningLowTooltip: "usage.overallCostLimitRunningLowTooltip";
|
|
103
|
-
/** Tooltip when the overall cost limit is reached. Receives `{ period: string }`. */
|
|
104
|
-
readonly overallCostLimitReachedTooltip: "usage.overallCostLimitReachedTooltip";
|
|
105
|
-
/** Aria label for a metric cell with no data. */
|
|
106
|
-
readonly unavailableLabel: "usage.unavailableLabel";
|
|
107
|
-
/** Supporting label when a token limit follows the cost limit. */
|
|
108
|
-
readonly followsCostLimitLabel: "usage.followsCostLimitLabel";
|
|
109
|
-
/** Supporting label when there is no per-deployment token limit. */
|
|
110
|
-
readonly noLimitLabel: "usage.noLimitLabel";
|
|
111
|
-
/** Aria label when token usage has no limit but follows the cost limit. Receives `{ used: string }`. */
|
|
112
|
-
readonly followsCostLimitAriaLabel: "usage.followsCostLimitAriaLabel";
|
|
113
|
-
/** Aria label when there is no limit. Receives `{ used: string }`. */
|
|
114
|
-
readonly unlimitedProgressAriaLabel: "usage.unlimitedProgressAriaLabel";
|
|
115
|
-
/** Aria label for a progress bar with a finite limit. Receives `{ used: string, total: string, percent: number }`. */
|
|
116
|
-
readonly progressAriaLabel: "usage.progressAriaLabel";
|
|
117
|
-
/** Label for the spent-cost cell. Receives `{ amount: string }`. */
|
|
118
|
-
readonly spentLabel: "usage.spentLabel";
|
|
119
|
-
/** Type caption for an application (agent) row. Receives no interpolation. */
|
|
120
|
-
readonly applicationTypeLabel: "usage.applicationTypeLabel";
|
|
121
|
-
/** Supporting label on an application row's spent cost. Receives no interpolation. */
|
|
122
|
-
readonly includesCalledModelsLabel: "usage.includesCalledModelsLabel";
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
export { }
|
|
1
|
+
export * from './entry-points/usage.js'
|
|
2
|
+
export {}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { ResponseFormat, Conversation, DeploymentFeatures } from '@epam/ai-dial-chat-shared';
|
|
2
|
+
/** Values emitted by the chat-settings modal when the user clicks Save. */
|
|
3
|
+
export interface ChatSettingsValues {
|
|
4
|
+
/** Updated response format, present when the response-format field was shown. */
|
|
5
|
+
responseFormat?: ResponseFormat;
|
|
6
|
+
/** Updated system prompt, present when the system-prompt field was shown. */
|
|
7
|
+
systemPrompt?: string;
|
|
8
|
+
/** Updated temperature, present when the temperature field was shown. */
|
|
9
|
+
temperature?: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Translatable strings the chat-settings form surfaces. Every field defaults
|
|
13
|
+
* to an English fallback inside the hook; pass translated values from the
|
|
14
|
+
* consuming app (e.g. via a `useTranslation`-backed labels hook).
|
|
15
|
+
*/
|
|
16
|
+
export interface ChatSettingsFormLabels {
|
|
17
|
+
/** Dropdown item label and modal title. */
|
|
18
|
+
settings: string;
|
|
19
|
+
/** Toast/message text announced after a successful save. */
|
|
20
|
+
savedNotification: string;
|
|
21
|
+
/** Label for the response-format field. */
|
|
22
|
+
responseFormatLabel: string;
|
|
23
|
+
/** Helper text shown below the response-format field. */
|
|
24
|
+
responseFormatHint: string;
|
|
25
|
+
/** Label for the Markdown radio option. */
|
|
26
|
+
responseFormatMarkdown: string;
|
|
27
|
+
/** Label for the plain-text radio option. */
|
|
28
|
+
responseFormatPlainText: string;
|
|
29
|
+
/** Label for the system-prompt field. */
|
|
30
|
+
systemPromptLabel: string;
|
|
31
|
+
/** Tooltip for the system-prompt field. */
|
|
32
|
+
systemPromptTooltip: string;
|
|
33
|
+
/** Label for the temperature field. */
|
|
34
|
+
temperatureLabel: string;
|
|
35
|
+
/** Label for the precise end of the temperature slider. */
|
|
36
|
+
temperaturePrecise: string;
|
|
37
|
+
/** Label for the neutral midpoint of the temperature slider. */
|
|
38
|
+
temperatureNeutral: string;
|
|
39
|
+
/** Label for the creative end of the temperature slider. */
|
|
40
|
+
temperatureCreative: string;
|
|
41
|
+
/** Hint text shown below the temperature field. */
|
|
42
|
+
temperatureHint: string;
|
|
43
|
+
/** Save button label. */
|
|
44
|
+
saveLabel: string;
|
|
45
|
+
/** Tooltip shown on the disabled Save button. */
|
|
46
|
+
saveDisabledTooltip: string;
|
|
47
|
+
}
|
|
48
|
+
/** Configuration the chat-settings popover/modal consumes. */
|
|
49
|
+
export type UseChatSettingsFormConfigResult = {
|
|
50
|
+
/** Feature flags controlling which fields appear. */
|
|
51
|
+
features: {
|
|
52
|
+
systemPrompt: boolean;
|
|
53
|
+
temperature: boolean;
|
|
54
|
+
responseFormat: boolean;
|
|
55
|
+
};
|
|
56
|
+
/** Current response format pre-selected in the modal. */
|
|
57
|
+
responseFormat: ResponseFormat;
|
|
58
|
+
/** Current system prompt pre-populated in the modal. */
|
|
59
|
+
systemPrompt: string;
|
|
60
|
+
/** Current temperature pre-populated in the modal. */
|
|
61
|
+
temperature: number;
|
|
62
|
+
/** Called with updated values when the user clicks Save. */
|
|
63
|
+
onSave: (values: ChatSettingsValues) => void;
|
|
64
|
+
/** Label for the dropdown menu item. */
|
|
65
|
+
menuItemLabel: string;
|
|
66
|
+
/** Modal title. */
|
|
67
|
+
title: string;
|
|
68
|
+
/** Label for the response-format field. */
|
|
69
|
+
responseFormatLabel: string;
|
|
70
|
+
/** Helper text shown below the response-format field. */
|
|
71
|
+
responseFormatHint: string;
|
|
72
|
+
/** Label for the Markdown radio option. */
|
|
73
|
+
responseFormatMarkdownLabel: string;
|
|
74
|
+
/** Label for the plain-text radio option. */
|
|
75
|
+
responseFormatPlainTextLabel: string;
|
|
76
|
+
/** Label for the system-prompt field. */
|
|
77
|
+
systemPromptLabel: string;
|
|
78
|
+
/** Tooltip for the system-prompt field. */
|
|
79
|
+
systemPromptTooltip: string;
|
|
80
|
+
/** Label for the temperature field. */
|
|
81
|
+
temperatureLabel: string;
|
|
82
|
+
/** Slider endpoint labels, in `[precise, neutral, creative]` order. */
|
|
83
|
+
temperatureLabels: [string, string, string];
|
|
84
|
+
/** Hint text shown below the temperature field. */
|
|
85
|
+
temperatureHint: string;
|
|
86
|
+
/** Save button label. */
|
|
87
|
+
saveLabel: string;
|
|
88
|
+
/** Tooltip shown on the disabled Save button. */
|
|
89
|
+
saveDisabledTooltip: string;
|
|
90
|
+
};
|
|
91
|
+
interface LocalModeValues {
|
|
92
|
+
responseFormat: ResponseFormat;
|
|
93
|
+
systemPrompt: string;
|
|
94
|
+
temperature: number;
|
|
95
|
+
}
|
|
96
|
+
interface LocalModeParams {
|
|
97
|
+
mode: 'local';
|
|
98
|
+
values: LocalModeValues;
|
|
99
|
+
onValuesChange: (values: LocalModeValues) => void;
|
|
100
|
+
deploymentFeatures?: DeploymentFeatures;
|
|
101
|
+
/** True when the selected deployment is a Quick App. Its orchestrator sets its own fixed temperature, so the temperature field is forced off regardless of `deploymentFeatures`. */
|
|
102
|
+
isQuickApp?: boolean;
|
|
103
|
+
}
|
|
104
|
+
interface ConversationModeParams {
|
|
105
|
+
mode: 'conversation';
|
|
106
|
+
conversation: Conversation;
|
|
107
|
+
onConversationChange: (conversation: Conversation) => void;
|
|
108
|
+
deploymentFeatures?: DeploymentFeatures;
|
|
109
|
+
/** True when the conversation's deployment is a Quick App. Its orchestrator sets its own fixed temperature, so the temperature field is forced off regardless of `deploymentFeatures`. */
|
|
110
|
+
isQuickApp?: boolean;
|
|
111
|
+
}
|
|
112
|
+
type Params = LocalModeParams | ConversationModeParams;
|
|
113
|
+
/** Common, host-injected options shared by both modes. */
|
|
114
|
+
interface Options {
|
|
115
|
+
/** Translatable labels. Fields not provided fall back to English defaults. */
|
|
116
|
+
labels?: Partial<ChatSettingsFormLabels>;
|
|
117
|
+
/** Called after a successful save so the host can surface its own toast/notification. */
|
|
118
|
+
onSaved?: () => void;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Assembles the chat-settings form config (feature flags, current values, save
|
|
122
|
+
* handler, labels) for either an in-flight local composer or a persisted
|
|
123
|
+
* conversation. Headless: translation and notifications are the host's
|
|
124
|
+
* responsibility, supplied via `labels` and `onSaved`.
|
|
125
|
+
*/
|
|
126
|
+
export declare const useChatSettingsFormConfig: (params: Params & Options) => UseChatSettingsFormConfigResult;
|
|
127
|
+
export {};
|
|
128
|
+
//# sourceMappingURL=useChatSettingsFormConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useChatSettingsFormConfig.d.ts","sourceRoot":"","sources":["../../src/useChatSettingsFormConfig/useChatSettingsFormConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACxB,MAAM,2BAA2B,CAAC;AAGnC,2EAA2E;AAC3E,MAAM,WAAW,kBAAkB;IACjC,iFAAiF;IACjF,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,6EAA6E;IAC7E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,2CAA2C;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,4DAA4D;IAC5D,iBAAiB,EAAE,MAAM,CAAC;IAC1B,2CAA2C;IAC3C,mBAAmB,EAAE,MAAM,CAAC;IAC5B,yDAAyD;IACzD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,2CAA2C;IAC3C,sBAAsB,EAAE,MAAM,CAAC;IAC/B,6CAA6C;IAC7C,uBAAuB,EAAE,MAAM,CAAC;IAChC,yCAAyC;IACzC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,2CAA2C;IAC3C,mBAAmB,EAAE,MAAM,CAAC;IAC5B,uCAAuC;IACvC,gBAAgB,EAAE,MAAM,CAAC;IACzB,2DAA2D;IAC3D,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gEAAgE;IAChE,kBAAkB,EAAE,MAAM,CAAC;IAC3B,4DAA4D;IAC5D,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mDAAmD;IACnD,eAAe,EAAE,MAAM,CAAC;IACxB,yBAAyB;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,iDAAiD;IACjD,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,8DAA8D;AAC9D,MAAM,MAAM,+BAA+B,GAAG;IAC5C,qDAAqD;IACrD,QAAQ,EAAE;QACR,YAAY,EAAE,OAAO,CAAC;QACtB,WAAW,EAAE,OAAO,CAAC;QACrB,cAAc,EAAE,OAAO,CAAC;KACzB,CAAC;IACF,yDAAyD;IACzD,cAAc,EAAE,cAAc,CAAC;IAC/B,wDAAwD;IACxD,YAAY,EAAE,MAAM,CAAC;IACrB,sDAAsD;IACtD,WAAW,EAAE,MAAM,CAAC;IACpB,4DAA4D;IAC5D,MAAM,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC7C,wCAAwC;IACxC,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,mBAAmB,EAAE,MAAM,CAAC;IAC5B,yDAAyD;IACzD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,2CAA2C;IAC3C,2BAA2B,EAAE,MAAM,CAAC;IACpC,6CAA6C;IAC7C,4BAA4B,EAAE,MAAM,CAAC;IACrC,yCAAyC;IACzC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,2CAA2C;IAC3C,mBAAmB,EAAE,MAAM,CAAC;IAC5B,uCAAuC;IACvC,gBAAgB,EAAE,MAAM,CAAC;IACzB,uEAAuE;IACvE,iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,mDAAmD;IACnD,eAAe,EAAE,MAAM,CAAC;IACxB,yBAAyB;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,iDAAiD;IACjD,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,UAAU,eAAe;IACvB,cAAc,EAAE,cAAc,CAAC;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,eAAe;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,eAAe,CAAC;IACxB,cAAc,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAClD,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,oLAAoL;IACpL,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,UAAU,sBAAsB;IAC9B,IAAI,EAAE,cAAc,CAAC;IACrB,YAAY,EAAE,YAAY,CAAC;IAC3B,oBAAoB,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,IAAI,CAAC;IAC3D,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,0LAA0L;IAC1L,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,KAAK,MAAM,GAAG,eAAe,GAAG,sBAAsB,CAAC;AAEvD,0DAA0D;AAC1D,UAAU,OAAO;IACf,8EAA8E;IAC9E,MAAM,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACzC,yFAAyF;IACzF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AA4BD;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,GACpC,QAAQ,MAAM,GAAG,OAAO,KACvB,+BA+FF,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Return value of {@link usePageFileDrag}. */
|
|
2
|
+
export interface UsePageFileDragResult {
|
|
3
|
+
/** Whether a file drag is currently over the page. */
|
|
4
|
+
isDragging: boolean;
|
|
5
|
+
/** Files dropped on the page, pending consumption by the caller. */
|
|
6
|
+
pendingFiles: File[];
|
|
7
|
+
/** Clears `pendingFiles` after the caller has processed them. */
|
|
8
|
+
onFilesConsumed: () => void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Detects files being dragged over the whole page and exposes the dropped
|
|
12
|
+
* files, using only `document`-level drag events with an enter/leave
|
|
13
|
+
* counter to avoid flicker from child-element boundary crossings.
|
|
14
|
+
*/
|
|
15
|
+
export declare const usePageFileDrag: (isAttachmentsAllowed?: boolean, isEnabled?: boolean) => UsePageFileDragResult;
|
|
16
|
+
//# sourceMappingURL=usePageFileDrag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePageFileDrag.d.ts","sourceRoot":"","sources":["../../src/usePageFileDrag/usePageFileDrag.ts"],"names":[],"mappings":"AAQA,+CAA+C;AAC/C,MAAM,WAAW,qBAAqB;IACpC,sDAAsD;IACtD,UAAU,EAAE,OAAO,CAAC;IACpB,oEAAoE;IACpE,YAAY,EAAE,IAAI,EAAE,CAAC;IACrB,iEAAiE;IACjE,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAC1B,8BAA2B,EAC3B,mBAAgB,KACf,qBA0EF,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the maximum pixel width a resizable side panel may occupy without
|
|
3
|
+
* collapsing the main content area below `minContentAreaWidth`.
|
|
4
|
+
*/
|
|
5
|
+
export declare const usePanelMaxWidth: (minContentAreaWidth: number) => number;
|
|
6
|
+
//# sourceMappingURL=usePanelMaxWidth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePanelMaxWidth.d.ts","sourceRoot":"","sources":["../../src/usePanelMaxWidth/usePanelMaxWidth.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,qBAAqB,MAAM,KAAG,MAG9D,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ShareApi } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
import { ShareLinkAccess, ShareLinkData } from '@epam/ai-dial-share';
|
|
3
|
+
/** Result returned by {@link useShareLink}. */
|
|
4
|
+
export interface UseShareLinkResult {
|
|
5
|
+
/** Resolved share-link data, or `undefined` while loading or on error. */
|
|
6
|
+
data: ShareLinkData | undefined;
|
|
7
|
+
/** Whether the share link is still being created. */
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
/** Set when the share link could not be created. */
|
|
10
|
+
error: Error | null;
|
|
11
|
+
/** Requests a new share link for the given access levels. */
|
|
12
|
+
setAccess: (access: ShareLinkAccess[]) => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Resolves and manages share-link data for a DIAL Core resource.
|
|
16
|
+
*
|
|
17
|
+
* Accepts an already-configured `ShareApi` instance — this hook owns only
|
|
18
|
+
* the request lifecycle (loading/error, a stale-response guard, and
|
|
19
|
+
* re-fetch on access change), not the client's base URL, auth, or CSRF
|
|
20
|
+
* setup, which stay the caller's responsibility.
|
|
21
|
+
*/
|
|
22
|
+
export declare const useShareLink: (shareApi: Pick<ShareApi, "createShareLink">, itemId: string, origin?: string) => UseShareLinkResult;
|
|
23
|
+
//# sourceMappingURL=useShareLink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useShareLink.d.ts","sourceRoot":"","sources":["../../src/useShareLink/useShareLink.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,QAAQ,EACd,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAYrE,+CAA+C;AAC/C,MAAM,WAAW,kBAAkB;IACjC,0EAA0E;IAC1E,IAAI,EAAE,aAAa,GAAG,SAAS,CAAC;IAChC,qDAAqD;IACrD,SAAS,EAAE,OAAO,CAAC;IACnB,oDAAoD;IACpD,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,6DAA6D;IAC7D,SAAS,EAAE,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,IAAI,CAAC;CAChD;AAcD;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,GACvB,UAAU,IAAI,CAAC,QAAQ,EAAE,iBAAiB,CAAC,EAC3C,QAAQ,MAAM,EACd,SAAQ,MAA+B,KACtC,kBAwDF,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ShareApi } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
/** Lifecycle of an on-demand recipient-count lookup for one resource. */
|
|
3
|
+
export declare enum RecipientsCountStatus {
|
|
4
|
+
/** Nothing requested yet for this resource. */
|
|
5
|
+
Idle = "idle",
|
|
6
|
+
/** A lookup is in flight. */
|
|
7
|
+
Loading = "loading",
|
|
8
|
+
/** A count came back and is known exactly. */
|
|
9
|
+
Resolved = "resolved",
|
|
10
|
+
/** The lookup failed, so the count is unknown. */
|
|
11
|
+
Unknown = "unknown"
|
|
12
|
+
}
|
|
13
|
+
/** State of one resource's recipient-count lookup. */
|
|
14
|
+
export interface RecipientsCountEntry {
|
|
15
|
+
/** Where the lookup for this resource currently stands. */
|
|
16
|
+
status: RecipientsCountStatus;
|
|
17
|
+
/** Number of users holding access; present only once the status is `Resolved`. */
|
|
18
|
+
count?: number;
|
|
19
|
+
}
|
|
20
|
+
/** Per-resource recipient-count lookups resolved on demand. */
|
|
21
|
+
export interface UseShareRecipientsCountResult {
|
|
22
|
+
/** Starts a lookup for the resource unless one already ran for it. */
|
|
23
|
+
requestRecipientsCount: (itemId: string) => void;
|
|
24
|
+
/** Current lookup state for the resource. */
|
|
25
|
+
getRecipientsCount: (itemId: string) => RecipientsCountEntry;
|
|
26
|
+
/** Drops the resource's cached result so the next request fetches it again. */
|
|
27
|
+
invalidateRecipientsCount: (itemId: string) => void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Resolves how many users hold shared access to a resource, one resource at
|
|
31
|
+
* a time and only when asked. Accepts an already-configured `ShareApi`
|
|
32
|
+
* instance — this hook owns only the dedup/cache state machine, not the
|
|
33
|
+
* client's base URL, auth, or CSRF setup.
|
|
34
|
+
*/
|
|
35
|
+
export declare const useShareRecipientsCount: (shareApi: Pick<ShareApi, "getShareRecipientsCount">) => UseShareRecipientsCountResult;
|
|
36
|
+
//# sourceMappingURL=useShareRecipientsCount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useShareRecipientsCount.d.ts","sourceRoot":"","sources":["../../src/useShareRecipientsCount/useShareRecipientsCount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAG9D,yEAAyE;AACzE,oBAAY,qBAAqB;IAC/B,+CAA+C;IAC/C,IAAI,SAAS;IACb,6BAA6B;IAC7B,OAAO,YAAY;IACnB,8CAA8C;IAC9C,QAAQ,aAAa;IACrB,kDAAkD;IAClD,OAAO,YAAY;CACpB;AAED,sDAAsD;AACtD,MAAM,WAAW,oBAAoB;IACnC,2DAA2D;IAC3D,MAAM,EAAE,qBAAqB,CAAC;IAC9B,kFAAkF;IAClF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,+DAA+D;AAC/D,MAAM,WAAW,6BAA6B;IAC5C,sEAAsE;IACtE,sBAAsB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,6CAA6C;IAC7C,kBAAkB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,oBAAoB,CAAC;IAC7D,+EAA+E;IAC/E,yBAAyB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACrD;AAMD;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,GAClC,UAAU,IAAI,CAAC,QAAQ,EAAE,yBAAyB,CAAC,KAClD,6BA0DF,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { DeploymentConfigurationSchema, ToolMenuItem } from '@epam/ai-dial-chat-shared';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
/** Host-supplied inputs to {@link useToolsMenu}. */
|
|
4
|
+
export interface UseToolsMenuParams {
|
|
5
|
+
/** Id of the currently selected deployment, or `null` when none is selected. */
|
|
6
|
+
selectedItemId: string | null;
|
|
7
|
+
/** JSON-schema configuration for the selected deployment, or `null` when none. */
|
|
8
|
+
selectedDeploymentConfiguration: DeploymentConfigurationSchema | null;
|
|
9
|
+
/** Icon element rendered on every tool menu item. Defaults to `null`. */
|
|
10
|
+
toolIcon?: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
/** Result returned by {@link useToolsMenu}. */
|
|
13
|
+
export type UseToolsMenuResult = {
|
|
14
|
+
/** One item per boolean property of the deployment configuration schema, in schema order. */
|
|
15
|
+
toolsMenuItems: ToolMenuItem[];
|
|
16
|
+
/** Toggles the tool with the given id; ignores unknown ids. */
|
|
17
|
+
onToolToggle: (id: string) => void;
|
|
18
|
+
/** Stable record of tool ids to their current on/off state, for completion requests. */
|
|
19
|
+
toolConfigurationValue: Record<string, boolean>;
|
|
20
|
+
/** Restores toggle state from a persisted tool configuration record. */
|
|
21
|
+
restoreToolConfiguration: (configurationValue: Record<string, unknown> | undefined) => void;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Derives the tools submenu from the active deployment's configuration schema:
|
|
25
|
+
* every boolean property becomes a toggle. Manages toggle state locally, resets
|
|
26
|
+
* on deployment change, and exposes a stable `toolConfigurationValue` record for
|
|
27
|
+
* inclusion in completion requests. Headless: the tool icon is the host's
|
|
28
|
+
* responsibility, supplied via `toolIcon`.
|
|
29
|
+
*/
|
|
30
|
+
export declare const useToolsMenu: (params: UseToolsMenuParams) => UseToolsMenuResult;
|
|
31
|
+
//# sourceMappingURL=useToolsMenu.d.ts.map
|