@epam/ai-dial-chat-hooks 1.1.0-dev.383 → 1.1.0-dev.390
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-DuLNy43N.js +45 -0
- package/attachment-types-AAoN9E95.js +7760 -0
- package/{attachment/useAttachmentValidation/useAttachmentValidation.d.ts → attachments.d.ts} +88 -44
- package/attachments.js +2 -0
- package/browser-Btsa0Lmr.js +607 -0
- package/catalog.d.ts +946 -0
- package/catalog.js +3 -0
- package/{conversation-sources/useConversationSources/useConversationSources.d.ts → conversation-sources.d.ts} +25 -20
- package/conversation-sources.js +2 -0
- package/conversation-transfer.d.ts +189 -0
- package/conversation-transfer.js +3 -0
- package/conversation.d.ts +907 -0
- package/conversation.js +2 -0
- package/cron-weekday-B4w29eAC.js +4 -0
- package/date-BeuD8G79.js +4 -0
- package/deployment-id-CxWgJTs9.js +6 -0
- package/file-manager.d.ts +1344 -0
- package/file-manager.js +4 -0
- package/formatting-CZyyxBG3.js +4 -0
- package/index.d.ts +4945 -126
- package/index.js +27 -19152
- package/oauth.d.ts +440 -0
- package/oauth.js +3 -0
- package/package.json +142 -21
- package/prompt-resource-Bt1I-8ri.js +41 -0
- package/scheduled-task-trigger-D9RZCk52.js +145 -0
- package/{scheduled-task/scheduled-task-trigger.d.ts → scheduled-tasks.d.ts} +51 -27
- package/scheduled-tasks.js +2 -0
- package/{conversation/useConversationScroll/useConversationScroll.d.ts → scroll-anchoring.d.ts} +50 -46
- package/scroll-anchoring.js +2 -0
- package/{useShareRecipientsCount/useShareRecipientsCount.d.ts → sharing.d.ts} +65 -36
- package/sharing.js +3 -0
- package/skill-editor.d.ts +503 -0
- package/skill-editor.js +3 -0
- package/skill-manifest-CCX8s4nn.js +4035 -0
- package/{skill/useSkillsState/useSkillsState.d.ts → skills-state.d.ts} +40 -35
- package/skills-state.js +2 -0
- package/string-utils-iBi2Y55C.js +10 -0
- package/toolset-id-CkxRHyU0.js +10 -0
- package/useAttachmentValidation-CkMTd5lA.js +102 -0
- package/useConversationImport-C2h1GBY4.js +807 -0
- package/useConversationScroll-CliIMnjP.js +122 -0
- package/useConversationSources-DKaKvjXZ.js +47 -0
- package/useDialFileManagerTabConfig-DGQw8H8H.js +2289 -0
- package/usePanelMaxWidth-BEZYuqF9.js +44 -0
- package/useShareLink-xkiaxATt.js +44 -0
- package/useShareRecipientsCount-BgwCLKY0.js +37 -0
- package/useSkillFileActions-BU5PzZ_8.js +373 -0
- package/useSkillFilePreview-BYfZUJhr.js +1005 -0
- package/useSkillsState-BoLlwmzb.js +52 -0
- package/useToolsMenu-BXdahO0i.js +1874 -0
- package/useToolsetLogin-GhFtKs4D.js +276 -0
- package/useUsageData-D7BxloKZ.js +201 -0
- package/utils.d.ts +373 -0
- package/utils.js +7 -0
- package/{usePageFileDrag/usePageFileDrag.d.ts → viewport-layout.d.ts} +27 -16
- package/viewport-layout.js +2 -0
- package/api-error/api-error.d.ts +0 -18
- package/api-error/api-error.d.ts.map +0 -1
- package/api-transport/create-csrf-middleware.d.ts +0 -15
- package/api-transport/create-csrf-middleware.d.ts.map +0 -1
- package/api-transport/create-unauthorized-middleware.d.ts +0 -40
- package/api-transport/create-unauthorized-middleware.d.ts.map +0 -1
- package/attachment/useAttachmentAction/useAttachmentAction.d.ts +0 -32
- package/attachment/useAttachmentAction/useAttachmentAction.d.ts.map +0 -1
- package/attachment/useAttachmentValidation/useAttachmentValidation.d.ts.map +0 -1
- package/catalog/catalog-derivations.d.ts +0 -27
- package/catalog/catalog-derivations.d.ts.map +0 -1
- package/catalog/catalog-primary-action.d.ts +0 -47
- package/catalog/catalog-primary-action.d.ts.map +0 -1
- package/catalog/create-publish-api.d.ts +0 -32
- package/catalog/create-publish-api.d.ts.map +0 -1
- package/catalog/deployment-endpoint-url.d.ts +0 -19
- package/catalog/deployment-endpoint-url.d.ts.map +0 -1
- package/catalog/deployment-id.d.ts +0 -21
- package/catalog/deployment-id.d.ts.map +0 -1
- package/catalog/entity-details.d.ts +0 -132
- package/catalog/entity-details.d.ts.map +0 -1
- package/catalog/map-deployment-limits-to-catalog.d.ts +0 -33
- package/catalog/map-deployment-limits-to-catalog.d.ts.map +0 -1
- package/catalog/map-deployment-limits-to-input.d.ts +0 -15
- package/catalog/map-deployment-limits-to-input.d.ts.map +0 -1
- package/catalog/map-deployment-to-catalog-item.d.ts +0 -60
- package/catalog/map-deployment-to-catalog-item.d.ts.map +0 -1
- package/catalog/map-entity-details-to-catalog.d.ts +0 -23
- package/catalog/map-entity-details-to-catalog.d.ts.map +0 -1
- package/catalog/map-prompt-to-catalog-item.d.ts +0 -43
- package/catalog/map-prompt-to-catalog-item.d.ts.map +0 -1
- package/catalog/map-skill-to-catalog-item.d.ts +0 -87
- package/catalog/map-skill-to-catalog-item.d.ts.map +0 -1
- package/catalog/mcp-endpoint-url.d.ts +0 -18
- package/catalog/mcp-endpoint-url.d.ts.map +0 -1
- package/catalog/publish.d.ts +0 -17
- package/catalog/publish.d.ts.map +0 -1
- package/catalog/useCatalogItemDetails.d.ts +0 -73
- package/catalog/useCatalogItemDetails.d.ts.map +0 -1
- package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.d.ts +0 -37
- package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.d.ts.map +0 -1
- package/catalog/usePublishFolders/usePublishFolders.d.ts +0 -73
- package/catalog/usePublishFolders/usePublishFolders.d.ts.map +0 -1
- package/conversation/announcement-message.d.ts +0 -34
- package/conversation/announcement-message.d.ts.map +0 -1
- package/conversation/conversation-transfer/async.d.ts +0 -10
- package/conversation/conversation-transfer/async.d.ts.map +0 -1
- package/conversation/conversation-transfer/attachment-refs.d.ts +0 -12
- package/conversation/conversation-transfer/attachment-refs.d.ts.map +0 -1
- package/conversation/conversation-transfer/build-upload-path.d.ts +0 -40
- package/conversation/conversation-transfer/build-upload-path.d.ts.map +0 -1
- package/conversation/conversation-transfer/date.d.ts +0 -5
- package/conversation/conversation-transfer/date.d.ts.map +0 -1
- package/conversation/conversation-transfer/dial-file-resolve.d.ts +0 -10
- package/conversation/conversation-transfer/dial-file-resolve.d.ts.map +0 -1
- package/conversation/conversation-transfer/export-conversation.d.ts +0 -8
- package/conversation/conversation-transfer/export-conversation.d.ts.map +0 -1
- package/conversation/conversation-transfer/import-conversation.d.ts +0 -82
- package/conversation/conversation-transfer/import-conversation.d.ts.map +0 -1
- package/conversation/conversation-transfer/progress.d.ts +0 -60
- package/conversation/conversation-transfer/progress.d.ts.map +0 -1
- package/conversation/conversation-transfer/queue.d.ts +0 -54
- package/conversation/conversation-transfer/queue.d.ts.map +0 -1
- package/conversation/conversation-transfer/types.d.ts +0 -36
- package/conversation/conversation-transfer/types.d.ts.map +0 -1
- package/conversation/conversation-transfer/zip-export.d.ts +0 -31
- package/conversation/conversation-transfer/zip-export.d.ts.map +0 -1
- package/conversation/conversation-transfer/zip-import.d.ts +0 -17
- package/conversation/conversation-transfer/zip-import.d.ts.map +0 -1
- package/conversation/create-chat-stream-api.d.ts +0 -38
- package/conversation/create-chat-stream-api.d.ts.map +0 -1
- package/conversation/deriveConversationRowActionState/deriveConversationRowActionState.d.ts +0 -39
- package/conversation/deriveConversationRowActionState/deriveConversationRowActionState.d.ts.map +0 -1
- package/conversation/display-name-watch.d.ts +0 -4
- package/conversation/display-name-watch.d.ts.map +0 -1
- package/conversation/footer-message.d.ts +0 -10
- package/conversation/footer-message.d.ts.map +0 -1
- package/conversation/get-model-id-from-conversation-id.d.ts +0 -27
- package/conversation/get-model-id-from-conversation-id.d.ts.map +0 -1
- package/conversation/greeting.d.ts +0 -18
- package/conversation/greeting.d.ts.map +0 -1
- package/conversation/message-factory.d.ts +0 -7
- package/conversation/message-factory.d.ts.map +0 -1
- package/conversation/message-utils.d.ts +0 -27
- package/conversation/message-utils.d.ts.map +0 -1
- package/conversation/overlay-messages.d.ts +0 -5
- package/conversation/overlay-messages.d.ts.map +0 -1
- package/conversation/quick-app-conversation-starters.d.ts +0 -10
- package/conversation/quick-app-conversation-starters.d.ts.map +0 -1
- package/conversation/starter-option.d.ts +0 -21
- package/conversation/starter-option.d.ts.map +0 -1
- package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts +0 -34
- package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts.map +0 -1
- package/conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.d.ts +0 -46
- package/conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.d.ts.map +0 -1
- package/conversation/useAttachmentUpload/useAttachmentUpload.d.ts +0 -26
- package/conversation/useAttachmentUpload/useAttachmentUpload.d.ts.map +0 -1
- package/conversation/useConversationExport/useConversationExport.d.ts +0 -72
- package/conversation/useConversationExport/useConversationExport.d.ts.map +0 -1
- package/conversation/useConversationHandlers/attachment-to-dto.d.ts +0 -7
- package/conversation/useConversationHandlers/attachment-to-dto.d.ts.map +0 -1
- package/conversation/useConversationHandlers/message-factory.d.ts +0 -9
- package/conversation/useConversationHandlers/message-factory.d.ts.map +0 -1
- package/conversation/useConversationHandlers/message-utils.d.ts +0 -14
- package/conversation/useConversationHandlers/message-utils.d.ts.map +0 -1
- package/conversation/useConversationHandlers/starter-option.d.ts +0 -14
- package/conversation/useConversationHandlers/starter-option.d.ts.map +0 -1
- package/conversation/useConversationHandlers/useConversationHandlers.d.ts +0 -66
- package/conversation/useConversationHandlers/useConversationHandlers.d.ts.map +0 -1
- package/conversation/useConversationImport/useConversationImport.d.ts +0 -53
- package/conversation/useConversationImport/useConversationImport.d.ts.map +0 -1
- package/conversation/useConversationLookupMaps/useConversationLookupMaps.d.ts +0 -24
- package/conversation/useConversationLookupMaps/useConversationLookupMaps.d.ts.map +0 -1
- package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts +0 -58
- package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts.map +0 -1
- package/conversation/useConversationScroll/useConversationScroll.d.ts.map +0 -1
- package/conversation/useConversationStream/apply-chunk.d.ts +0 -20
- package/conversation/useConversationStream/apply-chunk.d.ts.map +0 -1
- package/conversation/useConversationStream/buffered-generation.d.ts +0 -15
- package/conversation/useConversationStream/buffered-generation.d.ts.map +0 -1
- package/conversation/useConversationStream/conversation-path.d.ts +0 -7
- package/conversation/useConversationStream/conversation-path.d.ts.map +0 -1
- package/conversation/useConversationStream/generation-resume.d.ts +0 -39
- package/conversation/useConversationStream/generation-resume.d.ts.map +0 -1
- package/conversation/useConversationStream/useConversationStream.d.ts +0 -92
- package/conversation/useConversationStream/useConversationStream.d.ts.map +0 -1
- package/conversation/useImportFilePicker/useImportFilePicker.d.ts +0 -32
- package/conversation/useImportFilePicker/useImportFilePicker.d.ts.map +0 -1
- package/conversation-sources/useConversationSources/useConversationSources.d.ts.map +0 -1
- package/files/annotation.d.ts +0 -10
- package/files/annotation.d.ts.map +0 -1
- package/files/attachment-canvas.d.ts +0 -104
- package/files/attachment-canvas.d.ts.map +0 -1
- package/files/attachment-dto-to-display.d.ts +0 -10
- package/files/attachment-dto-to-display.d.ts.map +0 -1
- package/files/attachment-types.d.ts +0 -14
- package/files/attachment-types.d.ts.map +0 -1
- package/files/create-files-api.d.ts +0 -52
- package/files/create-files-api.d.ts.map +0 -1
- package/files/create-upload-file-with-progress.d.ts +0 -24
- package/files/create-upload-file-with-progress.d.ts.map +0 -1
- package/files/dial-file-manager-copy-move.util.d.ts +0 -15
- package/files/dial-file-manager-copy-move.util.d.ts.map +0 -1
- package/files/dial-file-manager-mapping.util.d.ts +0 -35
- package/files/dial-file-manager-mapping.util.d.ts.map +0 -1
- package/files/dial-file-manager-path.util.d.ts +0 -39
- package/files/dial-file-manager-path.util.d.ts.map +0 -1
- package/files/dial-file-manager.model.d.ts +0 -26
- package/files/dial-file-manager.model.d.ts.map +0 -1
- package/files/dial-file-manager.types.d.ts +0 -317
- package/files/dial-file-manager.types.d.ts.map +0 -1
- package/files/dial-file-to-attachment.d.ts +0 -26
- package/files/dial-file-to-attachment.d.ts.map +0 -1
- package/files/dial-file.d.ts +0 -17
- package/files/dial-file.d.ts.map +0 -1
- package/files/dial-files-api.d.ts +0 -71
- package/files/dial-files-api.d.ts.map +0 -1
- package/files/download-destination.d.ts +0 -31
- package/files/download-destination.d.ts.map +0 -1
- package/files/file-manager-variant.d.ts +0 -4
- package/files/file-manager-variant.d.ts.map +0 -1
- package/files/file-name.d.ts +0 -19
- package/files/file-name.d.ts.map +0 -1
- package/files/prepare-download-destination.d.ts +0 -8
- package/files/prepare-download-destination.d.ts.map +0 -1
- package/files/resolve-dial-file-api-path.d.ts +0 -13
- package/files/resolve-dial-file-api-path.d.ts.map +0 -1
- package/files/useDialFileListing/useDialFileListing.d.ts +0 -73
- package/files/useDialFileListing/useDialFileListing.d.ts.map +0 -1
- package/files/useDialFileManager/useDialFileManager.d.ts +0 -16
- package/files/useDialFileManager/useDialFileManager.d.ts.map +0 -1
- package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.d.ts +0 -14
- package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.d.ts.map +0 -1
- package/files/useDialFileMetadata/useDialFileMetadata.d.ts +0 -28
- package/files/useDialFileMetadata/useDialFileMetadata.d.ts.map +0 -1
- package/files/useDialFileMutations/useDialFileMutations.d.ts +0 -68
- package/files/useDialFileMutations/useDialFileMutations.d.ts.map +0 -1
- package/files/useDialFileSharing/useDialFileSharing.d.ts +0 -30
- package/files/useDialFileSharing/useDialFileSharing.d.ts.map +0 -1
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts +0 -45
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts.map +0 -1
- package/index.d.ts.map +0 -1
- package/oauth/authorize-url.d.ts +0 -16
- package/oauth/authorize-url.d.ts.map +0 -1
- package/oauth/handshake.d.ts +0 -30
- package/oauth/handshake.d.ts.map +0 -1
- package/oauth/models.d.ts +0 -81
- package/oauth/models.d.ts.map +0 -1
- package/oauth/popup.d.ts +0 -30
- package/oauth/popup.d.ts.map +0 -1
- package/oauth/toolset-id.d.ts +0 -23
- package/oauth/toolset-id.d.ts.map +0 -1
- package/oauth/types.d.ts +0 -84
- package/oauth/types.d.ts.map +0 -1
- package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.d.ts +0 -54
- package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.d.ts.map +0 -1
- package/oauth/useToolsetLogin/useToolsetLogin.d.ts +0 -79
- package/oauth/useToolsetLogin/useToolsetLogin.d.ts.map +0 -1
- package/prompt/export-prompt.d.ts +0 -31
- package/prompt/export-prompt.d.ts.map +0 -1
- package/prompt/prompt-resource.d.ts +0 -30
- package/prompt/prompt-resource.d.ts.map +0 -1
- package/prompt/prompt.d.ts +0 -34
- package/prompt/prompt.d.ts.map +0 -1
- package/prompt/usePromptsState/usePromptsState.d.ts +0 -34
- package/prompt/usePromptsState/usePromptsState.d.ts.map +0 -1
- package/scheduled-task/scheduled-task-mapping.d.ts +0 -19
- package/scheduled-task/scheduled-task-mapping.d.ts.map +0 -1
- package/scheduled-task/scheduled-task-trigger.d.ts.map +0 -1
- package/shared/application-schema.d.ts +0 -10
- package/shared/application-schema.d.ts.map +0 -1
- package/shared/browser-timezone.d.ts +0 -7
- package/shared/browser-timezone.d.ts.map +0 -1
- package/shared/cron-weekday.d.ts +0 -5
- package/shared/cron-weekday.d.ts.map +0 -1
- package/shared/custom-apps.d.ts +0 -7
- package/shared/custom-apps.d.ts.map +0 -1
- package/shared/external-services.d.ts +0 -16
- package/shared/external-services.d.ts.map +0 -1
- package/shared/formatting.d.ts +0 -5
- package/shared/formatting.d.ts.map +0 -1
- package/shared/locale.d.ts +0 -45
- package/shared/locale.d.ts.map +0 -1
- package/shared/string-utils.d.ts +0 -9
- package/shared/string-utils.d.ts.map +0 -1
- package/shared/toolset-login-events.d.ts +0 -15
- package/shared/toolset-login-events.d.ts.map +0 -1
- package/skill/skill-file-batch-validation.d.ts +0 -70
- package/skill/skill-file-batch-validation.d.ts.map +0 -1
- package/skill/skill-file-preview.d.ts +0 -25
- package/skill/skill-file-preview.d.ts.map +0 -1
- package/skill/skill-manifest.d.ts +0 -28
- package/skill/skill-manifest.d.ts.map +0 -1
- package/skill/skill-types.d.ts +0 -42
- package/skill/skill-types.d.ts.map +0 -1
- package/skill/skill.d.ts +0 -114
- package/skill/skill.d.ts.map +0 -1
- package/skill/useSkillEditorLoad.d.ts +0 -74
- package/skill/useSkillEditorLoad.d.ts.map +0 -1
- package/skill/useSkillEditorSubmit.d.ts +0 -105
- package/skill/useSkillEditorSubmit.d.ts.map +0 -1
- package/skill/useSkillFileActions.d.ts +0 -53
- package/skill/useSkillFileActions.d.ts.map +0 -1
- package/skill/useSkillFilePreview.d.ts +0 -38
- package/skill/useSkillFilePreview.d.ts.map +0 -1
- package/skill/useSkillsState/useSkillsState.d.ts.map +0 -1
- package/test-setup.d.ts +0 -2
- package/test-setup.d.ts.map +0 -1
- package/usage/useUsageData/useUsageData.d.ts +0 -20
- package/usage/useUsageData/useUsageData.d.ts.map +0 -1
- package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts +0 -128
- package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts.map +0 -1
- package/usePageFileDrag/usePageFileDrag.d.ts.map +0 -1
- package/usePanelMaxWidth/usePanelMaxWidth.d.ts +0 -6
- package/usePanelMaxWidth/usePanelMaxWidth.d.ts.map +0 -1
- package/useShareLink/useShareLink.d.ts +0 -23
- package/useShareLink/useShareLink.d.ts.map +0 -1
- package/useShareRecipientsCount/useShareRecipientsCount.d.ts.map +0 -1
- package/useToolsMenu/useToolsMenu.d.ts +0 -31
- package/useToolsMenu/useToolsMenu.d.ts.map +0 -1
- package/useViewportWidth/useViewportWidth.d.ts +0 -3
- package/useViewportWidth/useViewportWidth.d.ts.map +0 -1
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { CatalogItem, CatalogItemDetailsFetchResult } from '@epam/ai-dial-catalog';
|
|
2
|
-
import { DeploymentDetailsDto, DeploymentLimitsResponseDto, PromptResponseDto, SkillFileListResponseDto, SkillMetadataItemDto } from '@epam/ai-dial-chat-api-client';
|
|
3
|
-
import { SkillFileContent } from '../skill/skill-file-preview';
|
|
4
|
-
import { DeploymentLimitsLabels } from './map-deployment-limits-to-catalog';
|
|
5
|
-
import { PromptOverviewLabels } from './map-prompt-to-catalog-item';
|
|
6
|
-
import { SkillOverviewLabels } from './map-skill-to-catalog-item';
|
|
7
|
-
/** Injected API port for catalog item detail fetching. Mirrors exact server-api wrapper signatures. */
|
|
8
|
-
export interface CatalogDetailsApi {
|
|
9
|
-
/** Fetches deployment-level details for a model, agent, toolset, or application. */
|
|
10
|
-
getDeploymentDetails(deploymentId: string): Promise<DeploymentDetailsDto>;
|
|
11
|
-
/** Fetches rate-limit data for a deployment. */
|
|
12
|
-
getDeploymentLimits(deploymentId: string): Promise<DeploymentLimitsResponseDto>;
|
|
13
|
-
/** Fetches a personal or shared prompt by its full `prompts/{bucket}/{path}` resource id. */
|
|
14
|
-
getPrompt(id: string): Promise<PromptResponseDto>;
|
|
15
|
-
/** Fetches a public (organisation) prompt by its bucket-relative path. */
|
|
16
|
-
getPublicPrompt(path: string): Promise<PromptResponseDto>;
|
|
17
|
-
/** Downloads a raw skill file, returning the raw fetch `Response`. */
|
|
18
|
-
downloadSkillFile(bucket: string, path: string, filePath: string, signal?: AbortSignal): Promise<Response>;
|
|
19
|
-
/** Lists files inside a skill package. */
|
|
20
|
-
listSkillFiles(params: {
|
|
21
|
-
bucket: string;
|
|
22
|
-
filePath: string;
|
|
23
|
-
path?: string;
|
|
24
|
-
token?: string;
|
|
25
|
-
limit?: number;
|
|
26
|
-
recursive?: boolean;
|
|
27
|
-
}, signal?: AbortSignal): Promise<SkillFileListResponseDto>;
|
|
28
|
-
}
|
|
29
|
-
/** Options accepted by `useCatalogItemDetails`. */
|
|
30
|
-
export interface UseCatalogItemDetailsOptions {
|
|
31
|
-
/** Configured API adapter used for all network calls. */
|
|
32
|
-
api: CatalogDetailsApi;
|
|
33
|
-
/**
|
|
34
|
-
* Combined array of all skills visible to this user
|
|
35
|
-
* (personal + shared + public) for overview metadata lookup.
|
|
36
|
-
*/
|
|
37
|
-
skills: SkillMetadataItemDto[];
|
|
38
|
-
/** Whether the current user has admin privileges (affects toolset credential visibility). */
|
|
39
|
-
isAdmin: boolean;
|
|
40
|
-
/** DIAL Core external base URL used for Connect-tab endpoint construction. */
|
|
41
|
-
dialCoreExternalUrl: string | null | undefined;
|
|
42
|
-
/** Labels for skill overview section headers. */
|
|
43
|
-
skillOverviewLabels: SkillOverviewLabels;
|
|
44
|
-
/** Labels for prompt overview section headers. */
|
|
45
|
-
promptOverviewLabels: PromptOverviewLabels;
|
|
46
|
-
/** Labels for deployment limits table. */
|
|
47
|
-
deploymentLimitsLabels: DeploymentLimitsLabels;
|
|
48
|
-
}
|
|
49
|
-
/** Returned callbacks from `useCatalogItemDetails`. All callbacks are stable for stable inputs. */
|
|
50
|
-
export interface UseCatalogItemDetailsResult {
|
|
51
|
-
/**
|
|
52
|
-
* Fetches full detail data for a catalog item.
|
|
53
|
-
* Returns `undefined` on failure (error handled by caller).
|
|
54
|
-
*/
|
|
55
|
-
onFetchDetails(item: CatalogItem): Promise<CatalogItemDetailsFetchResult | undefined>;
|
|
56
|
-
/**
|
|
57
|
-
* Loads the text content of a file inside the currently open skill's package.
|
|
58
|
-
* Returns `undefined` when the file cannot be read or is a directory.
|
|
59
|
-
*/
|
|
60
|
-
onLoadContentFile(fileId: string): Promise<string | undefined>;
|
|
61
|
-
/**
|
|
62
|
-
* Downloads and returns preview bytes for a file inside the currently open skill's package.
|
|
63
|
-
* Throws on HTTP errors, unparseable ids, and size-limit violations.
|
|
64
|
-
*/
|
|
65
|
-
onLoadSkillDetailsFile(fileId: string): Promise<SkillFileContent>;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Headless hook that encapsulates catalog item detail fetching.
|
|
69
|
-
* Extracts the inline dispatch logic from `CatalogView` into a reusable,
|
|
70
|
-
* library-isolated unit.
|
|
71
|
-
*/
|
|
72
|
-
export declare const useCatalogItemDetails: ({ api, skills, isAdmin, dialCoreExternalUrl, skillOverviewLabels, promptOverviewLabels, deploymentLimitsLabels, }: UseCatalogItemDetailsOptions) => UseCatalogItemDetailsResult;
|
|
73
|
-
//# sourceMappingURL=useCatalogItemDetails.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useCatalogItemDetails.d.ts","sourceRoot":"","sources":["../../src/catalog/useCatalogItemDetails.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,6BAA6B,EAC9B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,oBAAoB,EACpB,2BAA2B,EAC3B,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,+BAA+B,CAAC;AAKvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAKpE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAWjF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AASzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAGvE,uGAAuG;AACvG,MAAM,WAAW,iBAAiB;IAChC,oFAAoF;IACpF,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC1E,gDAAgD;IAChD,mBAAmB,CACjB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACxC,6FAA6F;IAC7F,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAClD,0EAA0E;IAC1E,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC1D,sEAAsE;IACtE,iBAAiB,CACf,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,QAAQ,CAAC,CAAC;IACrB,0CAA0C;IAC1C,cAAc,CACZ,MAAM,EAAE;QACN,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,OAAO,CAAC;KACrB,EACD,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,wBAAwB,CAAC,CAAC;CACtC;AAED,mDAAmD;AACnD,MAAM,WAAW,4BAA4B;IAC3C,yDAAyD;IACzD,GAAG,EAAE,iBAAiB,CAAC;IACvB;;;OAGG;IACH,MAAM,EAAE,oBAAoB,EAAE,CAAC;IAC/B,6FAA6F;IAC7F,OAAO,EAAE,OAAO,CAAC;IACjB,8EAA8E;IAC9E,mBAAmB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/C,iDAAiD;IACjD,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,kDAAkD;IAClD,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,0CAA0C;IAC1C,sBAAsB,EAAE,sBAAsB,CAAC;CAChD;AAED,mGAAmG;AACnG,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,cAAc,CACZ,IAAI,EAAE,WAAW,GAChB,OAAO,CAAC,6BAA6B,GAAG,SAAS,CAAC,CAAC;IACtD;;;OAGG;IACH,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC/D;;;OAGG;IACH,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;CACnE;AAiBD;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,mHAQnC,4BAA4B,KAAG,2BA8MjC,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/** Entity kind used to route a favorite toggle to the correct backend section. */
|
|
2
|
-
export declare enum FavoriteEntityType {
|
|
3
|
-
Deployment = "deployment",
|
|
4
|
-
Toolset = "toolset",
|
|
5
|
-
Prompt = "prompt",
|
|
6
|
-
Skill = "skill"
|
|
7
|
-
}
|
|
8
|
-
/** Raw favorites payload returned by `loadFavorites`. */
|
|
9
|
-
export interface FavoritesPayload {
|
|
10
|
-
deployments: string[];
|
|
11
|
-
toolsets: string[];
|
|
12
|
-
prompts: string[];
|
|
13
|
-
skills: string[];
|
|
14
|
-
}
|
|
15
|
-
/** Parameters for {@link useFavoriteEntitiesState}. */
|
|
16
|
-
export interface UseFavoriteEntitiesStateParams {
|
|
17
|
-
/** Fetches the initial set of favorite ids from the server. */
|
|
18
|
-
loadFavorites: () => Promise<FavoritesPayload>;
|
|
19
|
-
/** Persists a single favorite toggle for the given entity type. */
|
|
20
|
-
updateFavorite: (id: string, isFavorite: boolean, entityType: FavoriteEntityType) => Promise<void>;
|
|
21
|
-
}
|
|
22
|
-
/** Result returned by {@link useFavoriteEntitiesState}. */
|
|
23
|
-
export interface UseFavoriteEntitiesStateResult {
|
|
24
|
-
/** Union of all installed entity ids across every category. */
|
|
25
|
-
favoriteIds: ReadonlySet<string>;
|
|
26
|
-
/** True until the initial load has settled. */
|
|
27
|
-
isLoading: boolean;
|
|
28
|
-
/** Optimistically toggles a favorite and rolls back on persistence failure. */
|
|
29
|
-
toggleFavorite: (id: string, isFavorite: boolean, entityType?: FavoriteEntityType) => Promise<void>;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Manages the set of favorited entity ids: loads on mount, applies optimistic
|
|
33
|
-
* toggle with exact-inverse rollback on failure, and re-throws persistence
|
|
34
|
-
* errors so callers can react. Does not import any app context or server-api.
|
|
35
|
-
*/
|
|
36
|
-
export declare const useFavoriteEntitiesState: ({ loadFavorites, updateFavorite, }: UseFavoriteEntitiesStateParams) => UseFavoriteEntitiesStateResult;
|
|
37
|
-
//# sourceMappingURL=useFavoriteEntitiesState.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useFavoriteEntitiesState.d.ts","sourceRoot":"","sources":["../../../src/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.ts"],"names":[],"mappings":"AAEA,kFAAkF;AAClF,oBAAY,kBAAkB;IAC5B,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AAED,yDAAyD;AACzD,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,uDAAuD;AACvD,MAAM,WAAW,8BAA8B;IAC7C,+DAA+D;IAC/D,aAAa,EAAE,MAAM,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC/C,mEAAmE;IACnE,cAAc,EAAE,CACd,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,OAAO,EACnB,UAAU,EAAE,kBAAkB,KAC3B,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB;AAED,2DAA2D;AAC3D,MAAM,WAAW,8BAA8B;IAC7C,+DAA+D;IAC/D,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACjC,+CAA+C;IAC/C,SAAS,EAAE,OAAO,CAAC;IACnB,+EAA+E;IAC/E,cAAc,EAAE,CACd,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,OAAO,EACnB,UAAU,CAAC,EAAE,kBAAkB,KAC5B,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB;AAED;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GAAI,oCAGtC,8BAA8B,KAAG,8BA4EnC,CAAC"}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { ListFilesResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
2
|
-
import { PublishFolderNode } from '@epam/ai-dial-publish-panel';
|
|
3
|
-
/** Parameters for {@link usePublishFolders}. */
|
|
4
|
-
export interface UsePublishFoldersParams {
|
|
5
|
-
/** Lists one folder level of the Organization/public files bucket. */
|
|
6
|
-
listPublicFiles: (params: {
|
|
7
|
-
path?: string;
|
|
8
|
-
}) => Promise<ListFilesResponseDto>;
|
|
9
|
-
/**
|
|
10
|
-
* Folder path keys (`path.join('/')`) the user has published to before.
|
|
11
|
-
* Owned by the host, which is also what persists them — this hook never
|
|
12
|
-
* touches browser storage (library isolation).
|
|
13
|
-
*/
|
|
14
|
-
rememberedFolderKeys?: string[];
|
|
15
|
-
/**
|
|
16
|
-
* Called with the next remembered-key list when {@link
|
|
17
|
-
* UsePublishFoldersResult.rememberPublishFolder} records a destination.
|
|
18
|
-
* Omit it for a host that does not persist destinations.
|
|
19
|
-
*/
|
|
20
|
-
onRememberedFolderKeysChange?: (folderKeys: string[]) => void;
|
|
21
|
-
}
|
|
22
|
-
/** Result returned by {@link usePublishFolders}. */
|
|
23
|
-
export interface UsePublishFoldersResult {
|
|
24
|
-
/** Folder tree loaded so far from the Organization/public bucket. */
|
|
25
|
-
folderItems: PublishFolderNode[];
|
|
26
|
-
/** Folder path keys currently expanded in the tree. */
|
|
27
|
-
expandedPaths: Set<string>;
|
|
28
|
-
/** Folder path keys whose children have already been fetched. */
|
|
29
|
-
loadedPaths: Set<string>;
|
|
30
|
-
/** Folder path keys currently being fetched. */
|
|
31
|
-
loadingPaths: Set<string>;
|
|
32
|
-
/** Called by the folder tree when the set of expanded folders changes. */
|
|
33
|
-
onExpandedPathsChange: (paths: Set<string>) => void;
|
|
34
|
-
/**
|
|
35
|
-
* Adds a folder under `parentPath` to the in-memory tree only — it is
|
|
36
|
-
* never created on the backend here. The path becomes real once the user
|
|
37
|
-
* actually publishes to it: the publish request writes to the nested
|
|
38
|
-
* `folderPath`, which DIAL Core storage creates implicitly, the same way
|
|
39
|
-
* writing a file to a new prefix does. This avoids leaving an orphaned
|
|
40
|
-
* empty folder behind when the user picks a new-folder name and then
|
|
41
|
-
* cancels the publish. Because the folder exists only locally, it is kept
|
|
42
|
-
* apart from the listing cache, so a listing that arrives afterwards
|
|
43
|
-
* cannot drop it again.
|
|
44
|
-
*/
|
|
45
|
-
onCreatePublishFolder: (parentPath: string[], name: string) => Promise<void>;
|
|
46
|
-
/**
|
|
47
|
-
* Records `folderPath` as a publish destination the user has actually used,
|
|
48
|
-
* so it keeps appearing in the tree on later publishes. Call it after a
|
|
49
|
-
* successful publish.
|
|
50
|
-
*/
|
|
51
|
-
rememberPublishFolder: (folderPath: string[]) => void;
|
|
52
|
-
/** Heuristic write-access check for a folder path (see the TODO above). */
|
|
53
|
-
hasPublishWriteAccess: (folderPath: string[]) => boolean;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Loads the Organization/public bucket's folder tree lazily (one listing per
|
|
57
|
-
* expanded folder, cached by API path) for the Publish flow's folder picker,
|
|
58
|
-
* shared by catalog-entity publish and conversation publish. Scoped to folders
|
|
59
|
-
* only — unlike `useDialFileManager`, it does not list files, rename,
|
|
60
|
-
* copy/move, or upload.
|
|
61
|
-
*
|
|
62
|
-
* Destinations the user has already published to are merged into that tree
|
|
63
|
-
* from `rememberedFolderKeys`. Publishing creates a DIAL Core publication
|
|
64
|
-
* *request*, so a folder picked during publish is not a listable resource in
|
|
65
|
-
* the public files bucket this tree is built from — the remembered list is
|
|
66
|
-
* what keeps such a folder selectable for the next publish instead of
|
|
67
|
-
* vanishing when the panel is reopened.
|
|
68
|
-
*
|
|
69
|
-
* Takes `listPublicFiles` as a parameter and hands remembered destinations
|
|
70
|
-
* back through a callback, so it imports no app context and no storage API.
|
|
71
|
-
*/
|
|
72
|
-
export declare const usePublishFolders: ({ listPublicFiles, rememberedFolderKeys, onRememberedFolderKeysChange, }: UsePublishFoldersParams) => UsePublishFoldersResult;
|
|
73
|
-
//# sourceMappingURL=usePublishFolders.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usePublishFolders.d.ts","sourceRoot":"","sources":["../../../src/catalog/usePublishFolders/usePublishFolders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,oBAAoB,EACrB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,6BAA6B,CAAC;AAuCrC,gDAAgD;AAChD,MAAM,WAAW,uBAAuB;IACtC,sEAAsE;IACtE,eAAe,EAAE,CAAC,MAAM,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC9E;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC;;;;OAIG;IACH,4BAA4B,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CAC/D;AAED,oDAAoD;AACpD,MAAM,WAAW,uBAAuB;IACtC,qEAAqE;IACrE,WAAW,EAAE,iBAAiB,EAAE,CAAC;IACjC,uDAAuD;IACvD,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,iEAAiE;IACjE,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACzB,gDAAgD;IAChD,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC1B,0EAA0E;IAC1E,qBAAqB,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;IACpD;;;;;;;;;;OAUG;IACH,qBAAqB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7E;;;;OAIG;IACH,qBAAqB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACtD,2EAA2E;IAC3E,qBAAqB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC;CAC1D;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,iBAAiB,GAAI,0EAI/B,uBAAuB,KAAG,uBAuH5B,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/** Structured announcement banner content. */
|
|
2
|
-
export interface AnnouncementContent {
|
|
3
|
-
title: string | null;
|
|
4
|
-
description: string | null;
|
|
5
|
-
html: string | null;
|
|
6
|
-
}
|
|
7
|
-
/** Sanitizes announcement HTML to the allowed inline tag/attribute set. */
|
|
8
|
-
export declare const sanitizeAnnouncementHtml: (html: string) => string;
|
|
9
|
-
/**
|
|
10
|
-
* Sanitizes the legacy `ANNOUNCEMENT_HTML_MESSAGE` banner, which permits the
|
|
11
|
-
* block-level markup the inline pass strips. See
|
|
12
|
-
* `ANNOUNCEMENT_MESSAGE_SANITIZE_OPTIONS` for why the two lists differ.
|
|
13
|
-
*/
|
|
14
|
-
export declare const sanitizeAnnouncementMessageHtml: (html: string) => string;
|
|
15
|
-
/**
|
|
16
|
-
* Whether the operator configured the structured banner (title and/or
|
|
17
|
-
* description) rather than only the legacy HTML message. Drives which of the
|
|
18
|
-
* two banner layouts renders.
|
|
19
|
-
*/
|
|
20
|
-
export declare const hasStructuredAnnouncement: ({ title, description, }: AnnouncementContent) => boolean;
|
|
21
|
-
/** True when the announcement has any renderable content (structured or legacy HTML). */
|
|
22
|
-
export declare const hasAnnouncementContent: (content: AnnouncementContent) => boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Builds the value persisted under `StorageKey.TextOfClosedAnnouncement` when
|
|
25
|
-
* the user dismisses the banner. Dismissal is content-keyed: the banner stays
|
|
26
|
-
* hidden only while the current announcement produces the same signature, so
|
|
27
|
-
* editing any part of it brings the banner back with no version counter.
|
|
28
|
-
*
|
|
29
|
-
* A legacy-only announcement returns the raw HTML string — byte-identical to
|
|
30
|
-
* what shipped before the structured fields existed — so dismissals recorded
|
|
31
|
-
* by older builds keep working without a storage migration.
|
|
32
|
-
*/
|
|
33
|
-
export declare const buildAnnouncementSignature: (content: AnnouncementContent) => string;
|
|
34
|
-
//# sourceMappingURL=announcement-message.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"announcement-message.d.ts","sourceRoot":"","sources":["../../src/conversation/announcement-message.ts"],"names":[],"mappings":"AA+BA,8CAA8C;AAC9C,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAQD,2EAA2E;AAC3E,eAAO,MAAM,wBAAwB,GAAI,MAAM,MAAM,KAAG,MACgB,CAAC;AAEzE;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,GAAI,MAAM,MAAM,KAAG,MACY,CAAC;AAK5E;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,GAAI,yBAGvC,mBAAmB,KAAG,OACqB,CAAC;AAE/C,yFAAyF;AACzF,eAAO,MAAM,sBAAsB,GAAI,SAAS,mBAAmB,KAAG,OACN,CAAC;AAEjE;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,GACrC,SAAS,mBAAmB,KAC3B,MASF,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Runs `worker` over `items` with at most `limit` concurrent invocations.
|
|
3
|
-
* Preserves no particular result order beyond "worker completed"; a worker
|
|
4
|
-
* that returns `undefined`, or throws, contributes nothing to the result
|
|
5
|
-
* array (used to skip failed/invalid items without aborting the whole
|
|
6
|
-
* batch) — a throwing worker is caught here so the other concurrent items
|
|
7
|
-
* keep being tracked instead of continuing unobserved in the background.
|
|
8
|
-
*/
|
|
9
|
-
export declare const runWithConcurrency: <T, R>(items: T[], limit: number, worker: (item: T) => Promise<R | undefined>) => Promise<R[]>;
|
|
10
|
-
//# sourceMappingURL=async.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../../../src/conversation/conversation-transfer/async.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAAU,CAAC,EAAE,CAAC,EAC3C,OAAO,CAAC,EAAE,EACV,OAAO,MAAM,EACb,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,KAC1C,OAAO,CAAC,CAAC,EAAE,CAqBb,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Conversation } from '@epam/ai-dial-chat-shared';
|
|
2
|
-
/** A unique DIAL file reference found in a conversation's messages. */
|
|
3
|
-
export interface AttachmentRef {
|
|
4
|
-
fileId: string;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Collects unique attachment references across all messages. The same file
|
|
8
|
-
* can be attached to more than one message (e.g. re-shared in a later
|
|
9
|
-
* turn) — dedupe by `fileId` so it is only processed once.
|
|
10
|
-
*/
|
|
11
|
-
export declare const collectAttachmentRefs: (conversation: Conversation) => AttachmentRef[];
|
|
12
|
-
//# sourceMappingURL=attachment-refs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attachment-refs.d.ts","sourceRoot":"","sources":["../../../src/conversation/conversation-transfer/attachment-refs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAK9D,uEAAuE;AACvE,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAChC,cAAc,YAAY,KACzB,aAAa,EAWf,CAAC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Builds the `uploads/<YYYY-MM>/<safe-name>` upload path for a file.
|
|
3
|
-
* `date` defaults to now (regular attachment upload); conversation import
|
|
4
|
-
* passes a date fixed for the whole job so all its attachments land in the
|
|
5
|
-
* same month folder. Does not de-duplicate: a name collision is left for the
|
|
6
|
-
* upload call to reject (`create-only` mode) — use `createUploadPathAllocator`
|
|
7
|
-
* when collisions must be resolved with a ` (n)` suffix instead.
|
|
8
|
-
*/
|
|
9
|
-
export declare const buildUploadPath: (fileName: string, date?: Date) => string;
|
|
10
|
-
/** A file name the allocator has handed out, in the forms the caller needs. */
|
|
11
|
-
export interface AllocatedUploadPath {
|
|
12
|
-
/** Bucket-relative, percent-encoded upload path, e.g. `uploads/2026-08/report%20(1).pdf`. */
|
|
13
|
-
path: string;
|
|
14
|
-
/** Decoded name actually reserved, e.g. `report (1).pdf` — pass this as the uploaded `File`'s name. */
|
|
15
|
-
fileName: string;
|
|
16
|
-
/** Whether a ` (n)` suffix had to be appended because the requested name was taken. */
|
|
17
|
-
isRenamed: boolean;
|
|
18
|
-
}
|
|
19
|
-
/** Stateful allocator that hands out collision-free upload paths inside one month folder. */
|
|
20
|
-
export interface UploadPathAllocator {
|
|
21
|
-
/** Reserves the next free name derived from `fileName` and returns its upload path. */
|
|
22
|
-
allocate: (fileName: string) => AllocatedUploadPath;
|
|
23
|
-
/** Records `fileName` as taken — used when the server rejects a name the registry believed free. */
|
|
24
|
-
markTaken: (fileName: string) => void;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Creates an allocator that assigns ` (1)`, ` (2)`, … suffixes to repeated or
|
|
28
|
-
* pre-existing file names so every allocation lands on a distinct path inside
|
|
29
|
-
* one `uploads/<YYYY-MM>/` folder. Mutation is deliberately confined to the
|
|
30
|
-
* private `Set` closed over here — an explicit, contained exception to the
|
|
31
|
-
* immutable-by-default rule, needed because collision-free naming is
|
|
32
|
-
* inherently a sequential, stateful decision.
|
|
33
|
-
*/
|
|
34
|
-
export declare const createUploadPathAllocator: (params?: {
|
|
35
|
-
/** Month folder to allocate into. Defaults to now. */
|
|
36
|
-
date?: Date;
|
|
37
|
-
/** Decoded names already present in the destination folder, e.g. from `listFiles`. */
|
|
38
|
-
existingNames?: Iterable<string>;
|
|
39
|
-
}) => UploadPathAllocator;
|
|
40
|
-
//# sourceMappingURL=build-upload-path.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-upload-path.d.ts","sourceRoot":"","sources":["../../../src/conversation/conversation-transfer/build-upload-path.ts"],"names":[],"mappings":"AAmBA;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAC1B,UAAU,MAAM,EAChB,OAAM,IAAiB,KACtB,MAIF,CAAC;AAUF,+EAA+E;AAC/E,MAAM,WAAW,mBAAmB;IAClC,6FAA6F;IAC7F,IAAI,EAAE,MAAM,CAAC;IACb,uGAAuG;IACvG,QAAQ,EAAE,MAAM,CAAC;IACjB,uFAAuF;IACvF,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,6FAA6F;AAC7F,MAAM,WAAW,mBAAmB;IAClC,uFAAuF;IACvF,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,mBAAmB,CAAC;IACpD,oGAAoG;IACpG,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,GAAI,SAAS;IACjD,sDAAsD;IACtD,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,sFAAsF;IACtF,aAAa,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAClC,KAAG,mBA4BH,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/** Formats a `Date` as `YYYY-MM-DD` using its local-time components. */
|
|
2
|
-
export declare const formatDateYMD: (date: Date) => string;
|
|
3
|
-
/** Formats a `Date` as `YYYY-MM` using its local-time components. */
|
|
4
|
-
export declare const formatDateYM: (date: Date) => string;
|
|
5
|
-
//# sourceMappingURL=date.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../../src/conversation/conversation-transfer/date.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,eAAO,MAAM,aAAa,GAAI,MAAM,IAAI,KAAG,MAK1C,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,YAAY,GAAI,MAAM,IAAI,KAAG,MAIzC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Extracts the bucket and decoded relative path from a DIAL file ID
|
|
3
|
-
* (`files/{bucket}/{path}`). Returns `undefined` if the input does not start
|
|
4
|
-
* with `files/` or has no path segment after the bucket.
|
|
5
|
-
*/
|
|
6
|
-
export declare const resolveDialFileBucketAndPath: (fileId: string) => {
|
|
7
|
-
bucket: string;
|
|
8
|
-
path: string;
|
|
9
|
-
} | undefined;
|
|
10
|
-
//# sourceMappingURL=dial-file-resolve.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dial-file-resolve.d.ts","sourceRoot":"","sources":["../../../src/conversation/conversation-transfer/dial-file-resolve.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,GACvC,QAAQ,MAAM,KACb;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,SAcrC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Conversation, ExportFolder, ExportFormat } from '@epam/ai-dial-chat-shared';
|
|
2
|
-
import { ExportFileNameKind } from './types';
|
|
3
|
-
/** Placeholder app name used in every export file name — this branch has no app display-name config yet. */
|
|
4
|
-
export declare const EXPORT_APP_NAME = "ai_dial";
|
|
5
|
-
export declare const buildExportEnvelope: (conversations: Conversation[], folders?: ExportFolder[]) => ExportFormat;
|
|
6
|
-
export declare const serializeExportEnvelope: (envelope: ExportFormat) => Blob;
|
|
7
|
-
export declare const buildExportFileName: (kind: ExportFileNameKind, appName: string, date?: Date) => string;
|
|
8
|
-
//# sourceMappingURL=export-conversation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"export-conversation.d.ts","sourceRoot":"","sources":["../../../src/conversation/conversation-transfer/export-conversation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,YAAY,EACb,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,4GAA4G;AAC5G,eAAO,MAAM,eAAe,YAAY,CAAC;AAEzC,eAAO,MAAM,mBAAmB,GAC9B,eAAe,YAAY,EAAE,EAC7B,UAAS,YAAY,EAAO,KAC3B,YAID,CAAC;AAEH,eAAO,MAAM,uBAAuB,GAAI,UAAU,YAAY,KAAG,IACY,CAAC;AAQ9E,eAAO,MAAM,mBAAmB,GAC9B,MAAM,kBAAkB,EACxB,SAAS,MAAM,EACf,OAAM,IAAiB,KACtB,MACyE,CAAC"}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { Conversation, ExportFormat } from '@epam/ai-dial-chat-shared';
|
|
2
|
-
import { AllocatedUploadPath, UploadPathAllocator } from './build-upload-path';
|
|
3
|
-
/** Thrown when an imported file cannot be parsed as a supported export envelope. */
|
|
4
|
-
export declare class UnsupportedImportFormatError extends Error {
|
|
5
|
-
constructor(message: string);
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Parses raw file text into a supported export envelope (`version: 5`) with
|
|
9
|
-
* an array `history` — conversations are returned unmodified.
|
|
10
|
-
* Throws `UnsupportedImportFormatError` for malformed JSON or any other shape.
|
|
11
|
-
*/
|
|
12
|
-
export declare const parseImportEnvelope: (text: string) => ExportFormat;
|
|
13
|
-
export interface RebasedConversationId {
|
|
14
|
-
/** The conversation with `id`/`folderId` rebased to `bucket` and a fresh UUID. */
|
|
15
|
-
conversation: Conversation;
|
|
16
|
-
/** Bucket-relative path to pass to `saveConversation`. */
|
|
17
|
-
subPath: string;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Rebases a conversation's id/folderId to the current user's bucket and
|
|
21
|
-
* regenerates its trailing UUID segment, so importing it can never collide
|
|
22
|
-
* with an existing conversation and needs no replace/skip dialog. Folder
|
|
23
|
-
* path segments between the bucket and the filename are preserved (not
|
|
24
|
-
* flattened) — the new chat currently displays everything at the root, but
|
|
25
|
-
* the conversation keeps its original folder location for when the folder
|
|
26
|
-
* feature ships.
|
|
27
|
-
*/
|
|
28
|
-
export declare const rebaseConversationId: (conversation: Conversation, bucket: string) => RebasedConversationId;
|
|
29
|
-
/**
|
|
30
|
-
* Derives the queue row's secondary breadcrumb line from a conversation's
|
|
31
|
-
* source `folderId` (`{bucket}[/<folder>/...]`) — the segments after the
|
|
32
|
-
* leading bucket, joined with " / ". Returns `undefined` for a root
|
|
33
|
-
* conversation (no folder segments).
|
|
34
|
-
*/
|
|
35
|
-
export declare const getFolderBreadcrumb: (conversation: Conversation) => string | undefined;
|
|
36
|
-
/**
|
|
37
|
-
* Formats a list of names for the aggregate success/failure notifications,
|
|
38
|
-
* each individually quoted and comma-separated (e.g. `"A", "B", "C"`) so the
|
|
39
|
-
* i18n template only needs to append the trailing verb phrase.
|
|
40
|
-
*/
|
|
41
|
-
export declare const formatQuotedNameList: (names: string[]) => string;
|
|
42
|
-
/** New location — and, when the import renamed it, new display name — for an imported attachment. */
|
|
43
|
-
export interface RewrittenAttachmentTarget {
|
|
44
|
-
/** New `files/{bucket}/{path}` id to write into `url`/`reference_url`. */
|
|
45
|
-
url: string;
|
|
46
|
-
/** New display name — present only when a ` (n)` disambiguation suffix was applied. */
|
|
47
|
-
title?: string;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Rewrites every message's attachment `url`/`reference_url` referencing an
|
|
51
|
-
* old file id to its new uploaded location, and its `title` when the target
|
|
52
|
-
* carries a renamed one. Attachments not present in `targetMap` are left
|
|
53
|
-
* untouched (immutable — returns a new conversation).
|
|
54
|
-
*/
|
|
55
|
-
export declare const rewriteAttachmentUrls: (conversation: Conversation, targetMap: Map<string, RewrittenAttachmentTarget>) => Conversation;
|
|
56
|
-
/** Best-effort display name for a fileId that failed to resolve to a `{bucket, path}` pair. */
|
|
57
|
-
export declare const fileIdDisplayName: (fileId: string) => string;
|
|
58
|
-
/** One attachment reference planned for upload, with its collision-free destination already allocated. */
|
|
59
|
-
export interface PlannedAttachmentUpload {
|
|
60
|
-
/** Original DIAL file id this attachment is uploaded from — the key `rewriteAttachmentUrls` rewrites. */
|
|
61
|
-
fileId: string;
|
|
62
|
-
/** Raw bytes read from the archive. */
|
|
63
|
-
bytes: Uint8Array;
|
|
64
|
-
/** Basename a 409 retry re-derives its next attempt from (never the already-suffixed name). */
|
|
65
|
-
originalFileName: string;
|
|
66
|
-
/** Destination allocated for the first upload attempt. */
|
|
67
|
-
allocated: AllocatedUploadPath;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Resolves a conversation's unique attachment references to archive bytes
|
|
71
|
-
* and allocates each a collision-free upload destination, in
|
|
72
|
-
* `collectAttachmentRefs` order — a synchronous pre-pass so suffix
|
|
73
|
-
* assignment stays deterministic regardless of later upload concurrency.
|
|
74
|
-
* A reference that cannot be resolved to a `{bucket, path}` pair, or has no
|
|
75
|
-
* matching bytes in the archive, is reported in `skippedNames` and does not
|
|
76
|
-
* consume an allocator slot.
|
|
77
|
-
*/
|
|
78
|
-
export declare const planAttachmentUploads: (conversation: Conversation, attachmentBytes: Map<string, Uint8Array>, allocator: UploadPathAllocator) => {
|
|
79
|
-
plan: PlannedAttachmentUpload[];
|
|
80
|
-
skippedNames: string[];
|
|
81
|
-
};
|
|
82
|
-
//# sourceMappingURL=import-conversation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"import-conversation.d.ts","sourceRoot":"","sources":["../../../src/conversation/conversation-transfer/import-conversation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EAEZ,YAAY,EACb,MAAM,2BAA2B,CAAC;AAEnC,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAG7B,oFAAoF;AACpF,qBAAa,4BAA6B,SAAQ,KAAK;gBACzC,OAAO,EAAE,MAAM;CAI5B;AAOD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,KAAG,YA2BlD,CAAC;AAeF,MAAM,WAAW,qBAAqB;IACpC,kFAAkF;IAClF,YAAY,EAAE,YAAY,CAAC;IAC3B,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAC;CACjB;AAgBD;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,GAC/B,cAAc,YAAY,EAC1B,QAAQ,MAAM,KACb,qBA6CF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAC9B,cAAc,YAAY,KACzB,MAAM,GAAG,SAMX,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,OAAO,MAAM,EAAE,KAAG,MACV,CAAC;AAE9C,qGAAqG;AACrG,MAAM,WAAW,yBAAyB;IACxC,0EAA0E;IAC1E,GAAG,EAAE,MAAM,CAAC;IACZ,uFAAuF;IACvF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAChC,cAAc,YAAY,EAC1B,WAAW,GAAG,CAAC,MAAM,EAAE,yBAAyB,CAAC,KAChD,YAgCD,CAAC;AAEH,+FAA+F;AAC/F,eAAO,MAAM,iBAAiB,GAAI,QAAQ,MAAM,KAAG,MAChB,CAAC;AAEpC,0GAA0G;AAC1G,MAAM,WAAW,uBAAuB;IACtC,yGAAyG;IACzG,MAAM,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,KAAK,EAAE,UAAU,CAAC;IAClB,+FAA+F;IAC/F,gBAAgB,EAAE,MAAM,CAAC;IACzB,0DAA0D;IAC1D,SAAS,EAAE,mBAAmB,CAAC;CAChC;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,GAChC,cAAc,YAAY,EAC1B,iBAAiB,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,EACxC,WAAW,mBAAmB,KAC7B;IAAE,IAAI,EAAE,uBAAuB,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CA2B3D,CAAC"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { ConversationTransferProgress, ConversationTransferProgressUnits } from '@epam/ai-dial-chat-shared';
|
|
2
|
-
/**
|
|
3
|
-
* The three stages every transfer job moves through. `Transfer` is the only
|
|
4
|
-
* one whose work is subdivided, because its unit count is discovered rather
|
|
5
|
-
* than known at enqueue time.
|
|
6
|
-
*/
|
|
7
|
-
export declare enum ConversationTransferPhase {
|
|
8
|
-
/** Fetching the conversation, listing conversations, or parsing the import file. */
|
|
9
|
-
Prepare = "prepare",
|
|
10
|
-
/** Downloading or uploading the discovered units. */
|
|
11
|
-
Transfer = "transfer",
|
|
12
|
-
/** Serializing, building the archive, or saving the conversations. */
|
|
13
|
-
Finalize = "finalize"
|
|
14
|
-
}
|
|
15
|
-
/** Which weight table a job uses. */
|
|
16
|
-
export declare enum ConversationTransferKind {
|
|
17
|
-
ExportSingle = "exportSingle",
|
|
18
|
-
ExportSingleWithAttachments = "exportSingleWithAttachments",
|
|
19
|
-
ExportAll = "exportAll",
|
|
20
|
-
Import = "import"
|
|
21
|
-
}
|
|
22
|
-
/** Share of a job's 100 percentage points that each phase is worth. */
|
|
23
|
-
interface PhaseWeights {
|
|
24
|
-
[ConversationTransferPhase.Prepare]: number;
|
|
25
|
-
[ConversationTransferPhase.Transfer]: number;
|
|
26
|
-
[ConversationTransferPhase.Finalize]: number;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Per-kind phase weights, each summing to 100. Fixed rather than derived from
|
|
30
|
-
* the unit count so that discovering how many attachments a job has subdivides
|
|
31
|
-
* work still to do instead of moving the indicator backwards.
|
|
32
|
-
*/
|
|
33
|
-
export declare const TRANSFER_PHASE_WEIGHTS: Record<ConversationTransferKind, PhaseWeights>;
|
|
34
|
-
/** Percentage a fully settled job reports. */
|
|
35
|
-
export declare const TRANSFER_PROGRESS_COMPLETE = 100;
|
|
36
|
-
/** Arguments for {@link computeTransferPercent}. */
|
|
37
|
-
export interface ComputeTransferPercentParams {
|
|
38
|
-
/** Which weight table applies. */
|
|
39
|
-
kind: ConversationTransferKind;
|
|
40
|
-
/** The phase currently advancing. */
|
|
41
|
-
phase: ConversationTransferPhase;
|
|
42
|
-
/**
|
|
43
|
-
* Units settled within `phase`. Omit (or pass `total: 0`) for a phase whose
|
|
44
|
-
* work is not subdivided; its whole weight is then credited at once.
|
|
45
|
-
*/
|
|
46
|
-
completed?: number;
|
|
47
|
-
/** Units `phase` will settle in total. */
|
|
48
|
-
total?: number;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Returns the job's completion as an integer 0–100: every earlier phase's
|
|
52
|
-
* weight in full, plus `phase`'s weight scaled by `completed / total`. A phase
|
|
53
|
-
* with no units to settle is credited in full, so a conversation with no
|
|
54
|
-
* attachments never stalls at the start of the transfer phase.
|
|
55
|
-
*/
|
|
56
|
-
export declare const computeTransferPercent: ({ kind, phase, completed, total, }: ComputeTransferPercentParams) => number;
|
|
57
|
-
/** Builds the progress patch for a phase, carrying its unit readout when the phase has units. */
|
|
58
|
-
export declare const buildTransferProgress: (params: ComputeTransferPercentParams, units?: ConversationTransferProgressUnits) => ConversationTransferProgress;
|
|
59
|
-
export {};
|
|
60
|
-
//# sourceMappingURL=progress.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../src/conversation/conversation-transfer/progress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,4BAA4B,EAC5B,iCAAiC,EAClC,MAAM,2BAA2B,CAAC;AAEnC;;;;GAIG;AACH,oBAAY,yBAAyB;IACnC,oFAAoF;IACpF,OAAO,YAAY;IACnB,qDAAqD;IACrD,QAAQ,aAAa;IACrB,sEAAsE;IACtE,QAAQ,aAAa;CACtB;AAED,qCAAqC;AACrC,oBAAY,wBAAwB;IAClC,YAAY,iBAAiB;IAC7B,2BAA2B,gCAAgC;IAC3D,SAAS,cAAc;IACvB,MAAM,WAAW;CAClB;AAED,uEAAuE;AACvE,UAAU,YAAY;IACpB,CAAC,yBAAyB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC5C,CAAC,yBAAyB,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC7C,CAAC,yBAAyB,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC9C;AAED;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CACzC,wBAAwB,EACxB,YAAY,CAsBb,CAAC;AAEF,8CAA8C;AAC9C,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAkB9C,oDAAoD;AACpD,MAAM,WAAW,4BAA4B;IAC3C,kCAAkC;IAClC,IAAI,EAAE,wBAAwB,CAAC;IAC/B,qCAAqC;IACrC,KAAK,EAAE,yBAAyB,CAAC;IACjC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GAAI,oCAKpC,4BAA4B,KAAG,MAOjC,CAAC;AAEF,iGAAiG;AACjG,eAAO,MAAM,qBAAqB,GAChC,QAAQ,4BAA4B,EACpC,QAAQ,iCAAiC,KACxC,4BAGD,CAAC"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { ConversationTransferErrorCode, ConversationTransferJob, ConversationTransferProgress, ConversationTransferSubject, ConversationTransferWarningCode } from '@epam/ai-dial-chat-shared';
|
|
2
|
-
/** Shared job-queue primitive underlying both `useConversationExport` and `useConversationImport`. */
|
|
3
|
-
export interface ConversationTransferQueue {
|
|
4
|
-
/** Queued jobs, most recently added last. */
|
|
5
|
-
jobs: ConversationTransferJob[];
|
|
6
|
-
/** Adds a new `InProgress` job for `subject`, named `fileName`, at 0% and returns its id. */
|
|
7
|
-
addJob: (subject: ConversationTransferSubject, fileName: string) => string;
|
|
8
|
-
/** Merges `patch` into the job identified by `jobId`. */
|
|
9
|
-
updateJob: (jobId: string, patch: Partial<ConversationTransferJob>) => void;
|
|
10
|
-
/**
|
|
11
|
-
* Advances the job's progress. A write whose `percent` is lower than the
|
|
12
|
-
* stored value is discarded, so out-of-order completions from concurrent
|
|
13
|
-
* transfers cannot move the indicator backwards, and a write to a job that
|
|
14
|
-
* has already settled is ignored, so an aborted run unwinding in the
|
|
15
|
-
* background cannot advance a canceled or failed row.
|
|
16
|
-
*/
|
|
17
|
-
setJobProgress: (jobId: string, progress: ConversationTransferProgress) => void;
|
|
18
|
-
/** Marks the job `Success` at 100%. */
|
|
19
|
-
succeedJob: (jobId: string) => void;
|
|
20
|
-
/**
|
|
21
|
-
* Marks the job `Warning` at 100%, recording what was incomplete. The file
|
|
22
|
-
* was still delivered, so this settles the job exactly as `succeedJob` does
|
|
23
|
-
* apart from the status and the attached code.
|
|
24
|
-
*/
|
|
25
|
-
warnJob: (jobId: string, warningCode: ConversationTransferWarningCode) => void;
|
|
26
|
-
/** Marks the job `Failed`, recording why. Progress freezes where it stopped. */
|
|
27
|
-
failJob: (jobId: string, errorCode: ConversationTransferErrorCode) => void;
|
|
28
|
-
/**
|
|
29
|
-
* Aborts the job's in-flight request(s) and marks it `Canceled`, keeping the
|
|
30
|
-
* row so the user has a record of what they stopped. The job stays retryable.
|
|
31
|
-
*/
|
|
32
|
-
cancelJob: (jobId: string) => void;
|
|
33
|
-
/** Aborts the job's in-flight request (if any) and removes it from `jobs`. */
|
|
34
|
-
dismissJob: (jobId: string) => void;
|
|
35
|
-
/** Re-invokes the job's registered run function under a fresh `AbortController`. */
|
|
36
|
-
retryJob: (jobId: string) => void;
|
|
37
|
-
/** Aborts every in-flight job and clears the queue. */
|
|
38
|
-
dismissAll: () => void;
|
|
39
|
-
/**
|
|
40
|
-
* Runs `run` under a fresh `AbortController` registered for `jobId`, and
|
|
41
|
-
* registers the same `run` function to be re-invoked (under a new
|
|
42
|
-
* controller) on `retryJob`.
|
|
43
|
-
*/
|
|
44
|
-
startJob: (jobId: string, run: (signal: AbortSignal) => Promise<void>) => Promise<void>;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Owns the export/import job queue: job list state, per-job
|
|
48
|
-
* `AbortController` tracking, monotonic progress, retry-function
|
|
49
|
-
* registration, and unmount cleanup. Shared by `useConversationExport` and
|
|
50
|
-
* `useConversationImport` so both hooks have identical cancellation,
|
|
51
|
-
* retry, and dismissal semantics.
|
|
52
|
-
*/
|
|
53
|
-
export declare const useConversationTransferQueue: () => ConversationTransferQueue;
|
|
54
|
-
//# sourceMappingURL=queue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../../../src/conversation/conversation-transfer/queue.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,6BAA6B,EAClC,KAAK,uBAAuB,EAE5B,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,EAChC,KAAK,+BAA+B,EAErC,MAAM,2BAA2B,CAAC;AAInC,sGAAsG;AACtG,MAAM,WAAW,yBAAyB;IACxC,6CAA6C;IAC7C,IAAI,EAAE,uBAAuB,EAAE,CAAC;IAChC,6FAA6F;IAC7F,MAAM,EAAE,CAAC,OAAO,EAAE,2BAA2B,EAAE,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3E,yDAAyD;IACzD,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,uBAAuB,CAAC,KAAK,IAAI,CAAC;IAC5E;;;;;;OAMG;IACH,cAAc,EAAE,CACd,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,4BAA4B,KACnC,IAAI,CAAC;IACV,uCAAuC;IACvC,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC;;;;OAIG;IACH,OAAO,EAAE,CACP,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,+BAA+B,KACzC,IAAI,CAAC;IACV,gFAAgF;IAChF,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,6BAA6B,KAAK,IAAI,CAAC;IAC3E;;;OAGG;IACH,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,8EAA8E;IAC9E,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,oFAAoF;IACpF,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,uDAAuD;IACvD,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB;;;;OAIG;IACH,QAAQ,EAAE,CACR,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,KACxC,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,QAAO,yBA2K/C,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { ConversationTransferErrorCode, ConversationTransferWarningCode } from '@epam/ai-dial-chat-shared';
|
|
2
|
-
/** Whether an export includes the conversation's attachments. */
|
|
3
|
-
export declare enum ConversationExportMode {
|
|
4
|
-
WithAttachments = "withAttachments",
|
|
5
|
-
WithoutAttachments = "withoutAttachments"
|
|
6
|
-
}
|
|
7
|
-
/** Which export file was produced, used to derive its file name/extension. */
|
|
8
|
-
export declare enum ExportFileNameKind {
|
|
9
|
-
SingleConversation = "chat_conversation",
|
|
10
|
-
SingleConversationWithAttachments = "chat_with_attachments",
|
|
11
|
-
AllConversationsHistory = "chat_conversations_history"
|
|
12
|
-
}
|
|
13
|
-
/** Structured, translation-free error report for a transfer job. */
|
|
14
|
-
export interface ConversationTransferErrorEvent {
|
|
15
|
-
jobId: string;
|
|
16
|
-
code: ConversationTransferErrorCode;
|
|
17
|
-
/** Conversation title(s) relevant to the error, when applicable. */
|
|
18
|
-
titles?: string[];
|
|
19
|
-
/** Resolved trace id for the failing request, when the host's `resolveErrorTraceId` supplies one. */
|
|
20
|
-
traceId?: string;
|
|
21
|
-
}
|
|
22
|
-
export { ConversationTransferErrorCode, ConversationTransferWarningCode };
|
|
23
|
-
/** Structured, translation-free warning report for a transfer job. */
|
|
24
|
-
export interface ConversationTransferWarningEvent {
|
|
25
|
-
jobId: string;
|
|
26
|
-
code: ConversationTransferWarningCode;
|
|
27
|
-
/** Names relevant to the warning (e.g. skipped attachment file names). */
|
|
28
|
-
names?: string[];
|
|
29
|
-
}
|
|
30
|
-
/** Structured, translation-free success report for a transfer job. */
|
|
31
|
-
export interface ConversationTransferSuccessEvent {
|
|
32
|
-
jobId: string;
|
|
33
|
-
/** Conversation title(s) affected, when applicable. */
|
|
34
|
-
titles?: string[];
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/conversation/conversation-transfer/types.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,oBAAY,sBAAsB;IAChC,eAAe,oBAAoB;IACnC,kBAAkB,uBAAuB;CAC1C;AAED,OAAO,EACL,6BAA6B,EAC7B,+BAA+B,EAChC,MAAM,2BAA2B,CAAC;AAEnC,8EAA8E;AAC9E,oBAAY,kBAAkB;IAC5B,kBAAkB,sBAAsB;IACxC,iCAAiC,0BAA0B;IAC3D,uBAAuB,+BAA+B;CACvD;AAED,oEAAoE;AACpE,MAAM,WAAW,8BAA8B;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,6BAA6B,CAAC;IACpC,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,qGAAqG;IACrG,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAQD,OAAO,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,CAAC;AAE1E,sEAAsE;AACtE,MAAM,WAAW,gCAAgC;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,+BAA+B,CAAC;IACtC,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,sEAAsE;AACtE,MAAM,WAAW,gCAAgC;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB"}
|