@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
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { n as e } from "./formatting-CZyyxBG3.js";
|
|
2
|
+
import { n as t, t as n } from "./cron-weekday-B4w29eAC.js";
|
|
3
|
+
import { ScheduledTaskRepeat as r } from "@epam/ai-dial-scheduled-tasks";
|
|
4
|
+
//#region src/scheduled-task/scheduled-task-mapping.ts
|
|
5
|
+
var i = /* @__PURE__ */ function(e) {
|
|
6
|
+
return e.UnsupportedCronShape = "unsupportedCronShape", e.UnsupportedTriggerType = "unsupportedTriggerType", e.MissingRequiredFields = "missingRequiredFields", e;
|
|
7
|
+
}({}), a = new Set([
|
|
8
|
+
"hour",
|
|
9
|
+
"minute",
|
|
10
|
+
"day_of_week",
|
|
11
|
+
"day"
|
|
12
|
+
]), o = "09:00", s = (e) => {
|
|
13
|
+
if (e.repeat === r.Hourly) {
|
|
14
|
+
let t = /* @__PURE__ */ new Date();
|
|
15
|
+
return t.setHours(0, Number(e.minute), 0, 0), {
|
|
16
|
+
hour: "*",
|
|
17
|
+
minute: String(t.getUTCMinutes())
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
let [i, a] = e.time.split(":"), o = Number(i), s = Number(a), c = /* @__PURE__ */ new Date();
|
|
21
|
+
c.setHours(o, s, 0, 0);
|
|
22
|
+
let l = e.repeat === r.Weekly && !!e.dayOfWeek, u = e.repeat === r.Monthly && !!e.dayOfMonth;
|
|
23
|
+
if (l) {
|
|
24
|
+
let t = (n(Number(e.dayOfWeek)) - c.getDay() + 7) % 7;
|
|
25
|
+
c.setDate(c.getDate() + t);
|
|
26
|
+
} else u && c.setDate(Number(e.dayOfMonth));
|
|
27
|
+
let d = {
|
|
28
|
+
hour: String(c.getUTCHours()),
|
|
29
|
+
minute: String(c.getUTCMinutes())
|
|
30
|
+
};
|
|
31
|
+
return l && (d.day_of_week = String(t(c.getUTCDay()))), u && (d.day = String(c.getUTCDate())), d;
|
|
32
|
+
}, c = (e, t) => {
|
|
33
|
+
let [n, r, i] = e.split("-").map(Number), a = new Date(n, r - 1, i);
|
|
34
|
+
return t === "start" ? a.setHours(0, 0, 0, 0) : a.setHours(23, 59, 59, 999), a.toISOString();
|
|
35
|
+
}, l = (e) => {
|
|
36
|
+
let t = e.repeat === r.OneTime ? { date: new Date(e.runAt ?? "").toISOString() } : { cron: {
|
|
37
|
+
fields: s(e),
|
|
38
|
+
...e.startDate ? { startDate: c(e.startDate, "start") } : {},
|
|
39
|
+
...e.endDate ? { endDate: c(e.endDate, "end") } : {}
|
|
40
|
+
} }, n = e.description?.trim();
|
|
41
|
+
return {
|
|
42
|
+
displayName: e.displayName.trim(),
|
|
43
|
+
trigger: t,
|
|
44
|
+
model: e.modelId,
|
|
45
|
+
prompt: e.prompt.trim(),
|
|
46
|
+
...n ? { description: n } : {}
|
|
47
|
+
};
|
|
48
|
+
}, u = (e) => l(e), d = (t) => {
|
|
49
|
+
let n = new Date(t);
|
|
50
|
+
return `${n.getFullYear()}-${e(n.getMonth() + 1)}-${e(n.getDate())}T${e(n.getHours())}:${e(n.getMinutes())}`;
|
|
51
|
+
}, f = (t) => {
|
|
52
|
+
let n = new Date(t);
|
|
53
|
+
return `${n.getFullYear()}-${e(n.getMonth() + 1)}-${e(n.getDate())}`;
|
|
54
|
+
}, p = (r) => {
|
|
55
|
+
let i = new Set(Object.entries(r).filter(([, e]) => e != null).map(([e]) => e)), o = [...i].filter((e) => !a.has(e)), s = i.has("day_of_week"), c = i.has("day");
|
|
56
|
+
if (o.length > 0 || s && c || !i.has("hour") || !i.has("minute")) return { ok: !1 };
|
|
57
|
+
if (r.hour === "*" && /^\d+$/.test(String(r.minute)) && !s && !c) {
|
|
58
|
+
let e = /* @__PURE__ */ new Date();
|
|
59
|
+
return e.setUTCHours(0, Number(r.minute), 0, 0), {
|
|
60
|
+
ok: !0,
|
|
61
|
+
isHourly: !0,
|
|
62
|
+
minute: String(e.getMinutes())
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
let l = Number(r.hour), u = Number(r.minute);
|
|
66
|
+
if (Number.isNaN(l) || Number.isNaN(u)) return { ok: !1 };
|
|
67
|
+
let d = /* @__PURE__ */ new Date();
|
|
68
|
+
if (d.setUTCHours(l, u, 0, 0), s) {
|
|
69
|
+
let e = Number(r.day_of_week);
|
|
70
|
+
if (Number.isNaN(e)) return { ok: !1 };
|
|
71
|
+
let t = (n(e) - d.getUTCDay() + 7) % 7;
|
|
72
|
+
d.setUTCDate(d.getUTCDate() + t);
|
|
73
|
+
} else if (c) {
|
|
74
|
+
let e = Number(r.day);
|
|
75
|
+
if (Number.isNaN(e)) return { ok: !1 };
|
|
76
|
+
d.setUTCDate(e);
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
ok: !0,
|
|
80
|
+
isHourly: !1,
|
|
81
|
+
time: `${e(d.getHours())}:${e(d.getMinutes())}`,
|
|
82
|
+
...s ? { dayOfWeek: String(t(d.getDay())) } : {},
|
|
83
|
+
...c ? { dayOfMonth: String(d.getDate()) } : {}
|
|
84
|
+
};
|
|
85
|
+
}, m = (e) => {
|
|
86
|
+
if (!e.model || !e.prompt) return {
|
|
87
|
+
ok: !1,
|
|
88
|
+
reason: i.MissingRequiredFields
|
|
89
|
+
};
|
|
90
|
+
let { date: t, cron: n } = e.trigger, a = !!t;
|
|
91
|
+
if (a === !!n) return {
|
|
92
|
+
ok: !1,
|
|
93
|
+
reason: i.UnsupportedTriggerType
|
|
94
|
+
};
|
|
95
|
+
let s = {
|
|
96
|
+
displayName: e.displayName,
|
|
97
|
+
modelId: e.model,
|
|
98
|
+
prompt: e.prompt,
|
|
99
|
+
...e.description ? { description: e.description } : {}
|
|
100
|
+
};
|
|
101
|
+
if (a) return {
|
|
102
|
+
ok: !0,
|
|
103
|
+
values: {
|
|
104
|
+
...s,
|
|
105
|
+
repeat: r.OneTime,
|
|
106
|
+
runAt: d(t),
|
|
107
|
+
time: o
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
if (!n) return {
|
|
111
|
+
ok: !1,
|
|
112
|
+
reason: i.UnsupportedTriggerType
|
|
113
|
+
};
|
|
114
|
+
let c = p(n.fields);
|
|
115
|
+
if (!c.ok) return {
|
|
116
|
+
ok: !1,
|
|
117
|
+
reason: i.UnsupportedCronShape
|
|
118
|
+
};
|
|
119
|
+
if (c.isHourly) return {
|
|
120
|
+
ok: !0,
|
|
121
|
+
values: {
|
|
122
|
+
...s,
|
|
123
|
+
repeat: r.Hourly,
|
|
124
|
+
time: o,
|
|
125
|
+
minute: c.minute,
|
|
126
|
+
...n.startDate ? { startDate: f(n.startDate) } : {},
|
|
127
|
+
...n.endDate ? { endDate: f(n.endDate) } : {}
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
let l = r.Daily;
|
|
131
|
+
return c.dayOfWeek ? l = r.Weekly : c.dayOfMonth && (l = r.Monthly), {
|
|
132
|
+
ok: !0,
|
|
133
|
+
values: {
|
|
134
|
+
...s,
|
|
135
|
+
repeat: l,
|
|
136
|
+
time: c.time,
|
|
137
|
+
...c.dayOfWeek ? { dayOfWeek: c.dayOfWeek } : {},
|
|
138
|
+
...c.dayOfMonth ? { dayOfMonth: c.dayOfMonth } : {},
|
|
139
|
+
...n.startDate ? { startDate: f(n.startDate) } : {},
|
|
140
|
+
...n.endDate ? { endDate: f(n.endDate) } : {}
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
//#endregion
|
|
145
|
+
export { i, u as n, m as r, l as t };
|
|
@@ -1,27 +1,51 @@
|
|
|
1
|
-
import { CreateScheduledTaskBodyDto
|
|
2
|
-
import { ScheduledTaskCreateFormValues } from '@epam/ai-dial-scheduled-tasks';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
import { CreateScheduledTaskBodyDto } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
import { ScheduledTaskCreateFormValues } from '@epam/ai-dial-scheduled-tasks';
|
|
3
|
+
import { ScheduledTaskDto } from '@epam/ai-dial-chat-api-client';
|
|
4
|
+
import { UpdateScheduledTaskBodyDto } from '@epam/ai-dial-chat-api-client';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Maps validated create-form values to the `POST /api/v1/scheduled-tasks`
|
|
8
|
+
* request body, building `trigger.date` for a one-shot schedule or
|
|
9
|
+
* `trigger.cron.fields` for a recurring one. Assumes the caller has already
|
|
10
|
+
* validated required fields (name, model, prompt, and the active schedule
|
|
11
|
+
* section's fields) — this function does not re-validate.
|
|
12
|
+
*/
|
|
13
|
+
export declare const mapFormValuesToCreateBody: (values: ScheduledTaskCreateFormValues) => CreateScheduledTaskBodyDto;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Maps validated edit-form values to the `PUT /api/v1/scheduled-tasks/:scheduleId`
|
|
17
|
+
* request body. `UpdateScheduledTaskBodyDto` has the same shape as
|
|
18
|
+
* `CreateScheduledTaskBodyDto`, so this reuses the same trigger-building logic.
|
|
19
|
+
*/
|
|
20
|
+
export declare const mapFormValuesToUpdateBody: (values: ScheduledTaskCreateFormValues) => UpdateScheduledTaskBodyDto;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Attempts to map a {@link ScheduledTaskDto} back to editable
|
|
24
|
+
* {@link ScheduledTaskCreateFormValues}, inverting {@link buildCronFields}/
|
|
25
|
+
* {@link buildCronWindowBoundary}. Fails closed — returning a reason instead
|
|
26
|
+
* of a value — whenever the task's trigger or required fields cannot be
|
|
27
|
+
* represented losslessly by the editor, so an unsupported schedule is never
|
|
28
|
+
* silently coerced and re-submitted.
|
|
29
|
+
*/
|
|
30
|
+
export declare const mapScheduledTaskDtoToFormValues: (dto: ScheduledTaskDto) => ScheduledTaskDtoMappingResult;
|
|
31
|
+
|
|
32
|
+
/** Result of mapping a scheduled task DTO back to editable form values. */
|
|
33
|
+
export declare type ScheduledTaskDtoMappingResult = {
|
|
34
|
+
ok: true;
|
|
35
|
+
values: ScheduledTaskCreateFormValues;
|
|
36
|
+
} | {
|
|
37
|
+
ok: false;
|
|
38
|
+
reason: UnsupportedTriggerReason;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** Why a scheduled task DTO could not be mapped back to editable form values. */
|
|
42
|
+
export declare enum UnsupportedTriggerReason {
|
|
43
|
+
/** `trigger.cron.fields` uses a shape (extra keys, or both `day_of_week` and `day`) the editor's schedule controls cannot represent. */
|
|
44
|
+
UnsupportedCronShape = "unsupportedCronShape",
|
|
45
|
+
/** Neither or both of `trigger.date`/`trigger.cron` are set, so the schedule type cannot be determined. */
|
|
46
|
+
UnsupportedTriggerType = "unsupportedTriggerType",
|
|
47
|
+
/** The task is missing `model` or `prompt`, so it cannot be represented as a valid update payload. */
|
|
48
|
+
MissingRequiredFields = "missingRequiredFields"
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { }
|
package/{conversation/useConversationScroll/useConversationScroll.d.ts → scroll-anchoring.d.ts}
RENAMED
|
@@ -1,46 +1,50 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Owns chat-list scrolling: anchors a new turn near the viewport top, keeps
|
|
5
|
+
* the position stable while the response streams, and reports whether the
|
|
6
|
+
* scroll-to-bottom button should be shown.
|
|
7
|
+
*
|
|
8
|
+
* The temporary spacer is technical scroll room, not user-visible content:
|
|
9
|
+
* it is sized to the minimum required to make the anchor reachable and manual
|
|
10
|
+
* scrolling is clamped before the user can move past the real message content.
|
|
11
|
+
*/
|
|
12
|
+
export declare const useConversationScroll: <T>({ messages, isAssistantTyping, conversationId, }: UseConversationScrollParams<T>) => UseConversationScrollResult;
|
|
13
|
+
|
|
14
|
+
/** Parameters for {@link useConversationScroll}. `T` is never read — only `messages.length` is used to detect growth/reset. */
|
|
15
|
+
export declare interface UseConversationScrollParams<T> {
|
|
16
|
+
/** Messages currently rendered in the list. */
|
|
17
|
+
messages: T[];
|
|
18
|
+
/** Whether an assistant response is currently streaming in. */
|
|
19
|
+
isAssistantTyping: boolean;
|
|
20
|
+
/** Identifier of the conversation being displayed. */
|
|
21
|
+
conversationId: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** Return value of {@link useConversationScroll}. */
|
|
25
|
+
export declare interface UseConversationScrollResult {
|
|
26
|
+
/** Attach to the scrollable message-list element. */
|
|
27
|
+
containerRef: RefObject<HTMLDivElement | null>;
|
|
28
|
+
/** Attach to the element wrapping all rendered messages (used to detect content growth). */
|
|
29
|
+
contentRef: RefObject<HTMLDivElement | null>;
|
|
30
|
+
/**
|
|
31
|
+
* Attach to a spacer element, a sibling rendered right after `contentRef`
|
|
32
|
+
* inside `containerRef`. Its height is set imperatively, not via React
|
|
33
|
+
* state. Render it with `shrink-0` and an initial `style={{ height: 0 }}`.
|
|
34
|
+
*/
|
|
35
|
+
spacerRef: RefObject<HTMLDivElement | null>;
|
|
36
|
+
/** Callback ref to register/unregister a rendered message's DOM node by index. */
|
|
37
|
+
setMessageRef: (index: number, el: HTMLDivElement | null) => void;
|
|
38
|
+
/** Whether the scroll-to-bottom button should be shown. */
|
|
39
|
+
isScrollButtonVisible: boolean;
|
|
40
|
+
/** Smoothly scrolls to the current bottom of the actual message content. */
|
|
41
|
+
scrollToBottom: () => void;
|
|
42
|
+
/**
|
|
43
|
+
* Arms the message at `index` to be scrolled near the top of the viewport
|
|
44
|
+
* on the next render — call right before triggering a send, regenerate,
|
|
45
|
+
* or edit-and-resubmit so the resulting message anchors near the top.
|
|
46
|
+
*/
|
|
47
|
+
armAnchor: (index: number) => void;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { }
|
|
@@ -1,36 +1,65 @@
|
|
|
1
|
-
import { ShareApi } from '@epam/ai-dial-chat-api-client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Resolved
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
export
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
1
|
+
import { ShareApi } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
import { ShareLinkAccess } from '@epam/ai-dial-share';
|
|
3
|
+
import { ShareLinkData } from '@epam/ai-dial-share';
|
|
4
|
+
|
|
5
|
+
/** State of one resource's recipient-count lookup. */
|
|
6
|
+
export declare interface RecipientsCountEntry {
|
|
7
|
+
/** Where the lookup for this resource currently stands. */
|
|
8
|
+
status: RecipientsCountStatus;
|
|
9
|
+
/** Number of users holding access; present only once the status is `Resolved`. */
|
|
10
|
+
count?: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** Lifecycle of an on-demand recipient-count lookup for one resource. */
|
|
14
|
+
export declare enum RecipientsCountStatus {
|
|
15
|
+
/** Nothing requested yet for this resource. */
|
|
16
|
+
Idle = "idle",
|
|
17
|
+
/** A lookup is in flight. */
|
|
18
|
+
Loading = "loading",
|
|
19
|
+
/** A count came back and is known exactly. */
|
|
20
|
+
Resolved = "resolved",
|
|
21
|
+
/** The lookup failed, so the count is unknown. */
|
|
22
|
+
Unknown = "unknown"
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Resolves and manages share-link data for a DIAL Core resource.
|
|
27
|
+
*
|
|
28
|
+
* Accepts an already-configured `ShareApi` instance — this hook owns only
|
|
29
|
+
* the request lifecycle (loading/error, a stale-response guard, and
|
|
30
|
+
* re-fetch on access change), not the client's base URL, auth, or CSRF
|
|
31
|
+
* setup, which stay the caller's responsibility.
|
|
32
|
+
*/
|
|
33
|
+
export declare const useShareLink: (shareApi: Pick<ShareApi, "createShareLink">, itemId: string, origin?: string) => UseShareLinkResult;
|
|
34
|
+
|
|
35
|
+
/** Result returned by {@link useShareLink}. */
|
|
36
|
+
export declare interface UseShareLinkResult {
|
|
37
|
+
/** Resolved share-link data, or `undefined` while loading or on error. */
|
|
38
|
+
data: ShareLinkData | undefined;
|
|
39
|
+
/** Whether the share link is still being created. */
|
|
40
|
+
isLoading: boolean;
|
|
41
|
+
/** Set when the share link could not be created. */
|
|
42
|
+
error: Error | null;
|
|
43
|
+
/** Requests a new share link for the given access levels. */
|
|
44
|
+
setAccess: (access: ShareLinkAccess[]) => void;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Resolves how many users hold shared access to a resource, one resource at
|
|
49
|
+
* a time and only when asked. Accepts an already-configured `ShareApi`
|
|
50
|
+
* instance — this hook owns only the dedup/cache state machine, not the
|
|
51
|
+
* client's base URL, auth, or CSRF setup.
|
|
52
|
+
*/
|
|
53
|
+
export declare const useShareRecipientsCount: (shareApi: Pick<ShareApi, "getShareRecipientsCount">) => UseShareRecipientsCountResult;
|
|
54
|
+
|
|
55
|
+
/** Per-resource recipient-count lookups resolved on demand. */
|
|
56
|
+
export declare interface UseShareRecipientsCountResult {
|
|
57
|
+
/** Starts a lookup for the resource unless one already ran for it. */
|
|
58
|
+
requestRecipientsCount: (itemId: string) => void;
|
|
59
|
+
/** Current lookup state for the resource. */
|
|
60
|
+
getRecipientsCount: (itemId: string) => RecipientsCountEntry;
|
|
61
|
+
/** Drops the resource's cached result so the next request fetches it again. */
|
|
62
|
+
invalidateRecipientsCount: (itemId: string) => void;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export { }
|
package/sharing.js
ADDED