@epam/ai-dial-chat-hooks 1.3.0-dev.37 → 1.3.0-dev.372

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.
Files changed (578) hide show
  1. package/api-error/api-error.d.ts +2 -0
  2. package/api-error/api-error.d.ts.map +1 -1
  3. package/api-error/api-error.js +31 -23
  4. package/api-transport/create-unauthorized-middleware.js +4 -1
  5. package/attachment/attach-constraints.d.ts +31 -0
  6. package/attachment/attach-constraints.d.ts.map +1 -0
  7. package/attachment/attach-constraints.js +18 -0
  8. package/attachment/useAttachmentAction/useAttachmentAction.d.ts +1 -1
  9. package/attachment/useAttachmentAction/useAttachmentAction.d.ts.map +1 -1
  10. package/attachment/useAttachmentAction/useAttachmentAction.js +25 -28
  11. package/attachments.js +2 -1
  12. package/catalog/application-credentials.d.ts +15 -0
  13. package/catalog/application-credentials.d.ts.map +1 -0
  14. package/catalog/application-credentials.js +28 -0
  15. package/catalog/catalog-derivations.d.ts +5 -3
  16. package/catalog/catalog-derivations.d.ts.map +1 -1
  17. package/catalog/catalog-derivations.js +13 -6
  18. package/catalog/catalog-entity-kind.d.ts +31 -0
  19. package/catalog/catalog-entity-kind.d.ts.map +1 -0
  20. package/catalog/catalog-entity-kind.js +21 -0
  21. package/catalog/catalog-preferences.d.ts +8 -0
  22. package/catalog/catalog-preferences.d.ts.map +1 -0
  23. package/catalog/catalog-preferences.js +5 -0
  24. package/catalog/create-publish-api.d.ts +3 -1
  25. package/catalog/create-publish-api.d.ts.map +1 -1
  26. package/catalog/create-publish-api.js +4 -0
  27. package/catalog/deployment-id.d.ts +13 -4
  28. package/catalog/deployment-id.d.ts.map +1 -1
  29. package/catalog/deployment-id.js +17 -3
  30. package/catalog/entity-details.d.ts +2 -0
  31. package/catalog/entity-details.d.ts.map +1 -1
  32. package/catalog/favorite-entity-type.d.ts +5 -0
  33. package/catalog/favorite-entity-type.d.ts.map +1 -0
  34. package/catalog/favorite-entity-type.js +10 -0
  35. package/catalog/map-deployment-limits-to-input.d.ts +4 -3
  36. package/catalog/map-deployment-limits-to-input.d.ts.map +1 -1
  37. package/catalog/map-deployment-limits-to-input.js +3 -4
  38. package/catalog/map-deployment-to-catalog-item.d.ts +12 -1
  39. package/catalog/map-deployment-to-catalog-item.d.ts.map +1 -1
  40. package/catalog/map-deployment-to-catalog-item.js +22 -15
  41. package/catalog/map-entity-details-to-catalog.d.ts.map +1 -1
  42. package/catalog/map-entity-details-to-catalog.js +69 -24
  43. package/catalog/map-skill-to-catalog-item.d.ts +4 -5
  44. package/catalog/map-skill-to-catalog-item.d.ts.map +1 -1
  45. package/catalog/map-skill-to-catalog-item.js +29 -38
  46. package/catalog/publish.d.ts +1 -1
  47. package/catalog/publish.d.ts.map +1 -1
  48. package/catalog/resource-folder.d.ts +8 -0
  49. package/catalog/resource-folder.d.ts.map +1 -0
  50. package/catalog/resource-folder.js +13 -0
  51. package/catalog/resource-name-conflict.d.ts +22 -0
  52. package/catalog/resource-name-conflict.d.ts.map +1 -0
  53. package/catalog/resource-name-conflict.js +32 -0
  54. package/catalog/resource-save-adapter.d.ts +36 -0
  55. package/catalog/resource-save-adapter.d.ts.map +1 -0
  56. package/catalog/resource-save-adapter.js +4 -0
  57. package/catalog/resource-save-adapters.d.ts +93 -0
  58. package/catalog/resource-save-adapters.d.ts.map +1 -0
  59. package/catalog/resource-save-adapters.js +116 -0
  60. package/catalog/resource-save.d.ts +76 -0
  61. package/catalog/resource-save.d.ts.map +1 -0
  62. package/catalog/resource-save.js +52 -0
  63. package/catalog/unpublishable-folders.d.ts +21 -0
  64. package/catalog/unpublishable-folders.d.ts.map +1 -0
  65. package/catalog/unpublishable-folders.js +21 -0
  66. package/catalog/usage-limit-rows.d.ts +14 -0
  67. package/catalog/usage-limit-rows.d.ts.map +1 -0
  68. package/catalog/usage-limit-rows.js +19 -0
  69. package/catalog/use-publish-history.d.ts +19 -0
  70. package/catalog/use-publish-history.d.ts.map +1 -0
  71. package/catalog/use-publish-history.js +25 -0
  72. package/catalog/useApplicationCredentialActions/useApplicationCredentialActions.d.ts +57 -0
  73. package/catalog/useApplicationCredentialActions/useApplicationCredentialActions.d.ts.map +1 -0
  74. package/catalog/useApplicationCredentialActions/useApplicationCredentialActions.js +67 -0
  75. package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts +23 -6
  76. package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts.map +1 -1
  77. package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.js +108 -107
  78. package/catalog/useCatalogItemDelete/useCatalogItemDelete.d.ts +41 -0
  79. package/catalog/useCatalogItemDelete/useCatalogItemDelete.d.ts.map +1 -0
  80. package/catalog/useCatalogItemDelete/useCatalogItemDelete.js +37 -0
  81. package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.d.ts.map +1 -1
  82. package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.js +72 -77
  83. package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.js +1 -1
  84. package/catalog/usePublishFolders/usePublishFolders.d.ts +8 -0
  85. package/catalog/usePublishFolders/usePublishFolders.d.ts.map +1 -1
  86. package/catalog/usePublishFolders/usePublishFolders.js +32 -29
  87. package/catalog/useResourceFolders/useResourceFolders.d.ts +33 -0
  88. package/catalog/useResourceFolders/useResourceFolders.d.ts.map +1 -0
  89. package/catalog/useResourceFolders/useResourceFolders.js +58 -0
  90. package/catalog/useResourceSavePanel/useResourceSavePanel.d.ts +64 -0
  91. package/catalog/useResourceSavePanel/useResourceSavePanel.d.ts.map +1 -0
  92. package/catalog/useResourceSavePanel/useResourceSavePanel.js +173 -0
  93. package/catalog/useSkillItemDetails.js +3 -3
  94. package/catalog/useUnpublishConfirmation/useUnpublishConfirmation.d.ts +43 -0
  95. package/catalog/useUnpublishConfirmation/useUnpublishConfirmation.d.ts.map +1 -0
  96. package/catalog/useUnpublishConfirmation/useUnpublishConfirmation.js +46 -0
  97. package/catalog/useUnpublishableFolders/useUnpublishableFolders.d.ts +22 -0
  98. package/catalog/useUnpublishableFolders/useUnpublishableFolders.d.ts.map +1 -0
  99. package/catalog/useUnpublishableFolders/useUnpublishableFolders.js +53 -0
  100. package/catalog.js +41 -23
  101. package/conversation/conversation-data-source.d.ts +47 -0
  102. package/conversation/conversation-data-source.d.ts.map +1 -0
  103. package/conversation/conversation-data-source.js +11 -0
  104. package/conversation/conversation-draft/conversation-draft-store.d.ts +21 -0
  105. package/conversation/conversation-draft/conversation-draft-store.d.ts.map +1 -0
  106. package/conversation/conversation-draft/conversation-draft-store.js +84 -0
  107. package/conversation/conversation-draft/conversation-draft.d.ts +48 -0
  108. package/conversation/conversation-draft/conversation-draft.d.ts.map +1 -0
  109. package/conversation/conversation-list.d.ts +6 -0
  110. package/conversation/conversation-list.d.ts.map +1 -0
  111. package/conversation/conversation-list.js +5 -0
  112. package/conversation/conversation-title-stream.d.ts +33 -0
  113. package/conversation/conversation-title-stream.d.ts.map +1 -0
  114. package/conversation/conversation-title-stream.js +103 -0
  115. package/conversation/conversation-transfer/attachment-refs.d.ts +10 -2
  116. package/conversation/conversation-transfer/attachment-refs.d.ts.map +1 -1
  117. package/conversation/conversation-transfer/attachment-refs.js +31 -9
  118. package/conversation/conversation-transfer/export-conversation.d.ts +5 -1
  119. package/conversation/conversation-transfer/export-conversation.d.ts.map +1 -1
  120. package/conversation/conversation-transfer/export-conversation.js +19 -18
  121. package/conversation/conversation-transfer/import-conversation.d.ts +11 -6
  122. package/conversation/conversation-transfer/import-conversation.d.ts.map +1 -1
  123. package/conversation/conversation-transfer/import-conversation.js +65 -69
  124. package/conversation/conversation-transfer/progress.js +1 -1
  125. package/conversation/conversation-transfer/zip-export.js +1 -7
  126. package/conversation/conversation-transfer/zip-import.js +1 -1
  127. package/conversation/create-chat-stream-api.d.ts +24 -3
  128. package/conversation/create-chat-stream-api.d.ts.map +1 -1
  129. package/conversation/create-chat-stream-api.js +67 -56
  130. package/conversation/generation-registry.d.ts +30 -0
  131. package/conversation/generation-registry.d.ts.map +1 -0
  132. package/conversation/generation-registry.js +33 -0
  133. package/conversation/get-model-id-from-conversation-id.d.ts.map +1 -1
  134. package/conversation/get-model-id-from-conversation-id.js +1 -1
  135. package/conversation/message-utils.d.ts +6 -0
  136. package/conversation/message-utils.d.ts.map +1 -1
  137. package/conversation/message-utils.js +14 -10
  138. package/conversation/scheduled-task-grouping.d.ts +53 -0
  139. package/conversation/scheduled-task-grouping.d.ts.map +1 -0
  140. package/conversation/scheduled-task-grouping.js +45 -0
  141. package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts +4 -2
  142. package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts.map +1 -1
  143. package/conversation/useActiveConversationSync/useActiveConversationSync.js +19 -12
  144. package/conversation/useAttachmentUpload/useAttachmentUpload.d.ts.map +1 -1
  145. package/conversation/useAttachmentUpload/useAttachmentUpload.js +4 -1
  146. package/conversation/useConversationComposerDraft/useConversationComposerDraft.d.ts +39 -0
  147. package/conversation/useConversationComposerDraft/useConversationComposerDraft.d.ts.map +1 -0
  148. package/conversation/useConversationComposerDraft/useConversationComposerDraft.js +128 -0
  149. package/conversation/useConversationDiscovery/useConversationDiscovery.d.ts +22 -0
  150. package/conversation/useConversationDiscovery/useConversationDiscovery.d.ts.map +1 -0
  151. package/conversation/useConversationDiscovery/useConversationDiscovery.js +60 -0
  152. package/conversation/useConversationExport/useConversationExport.d.ts.map +1 -1
  153. package/conversation/useConversationExport/useConversationExport.js +113 -122
  154. package/conversation/useConversationHandlers/message-utils.js +2 -2
  155. package/conversation/useConversationHandlers/useConversationHandlers.js +41 -41
  156. package/conversation/useConversationImport/useConversationImport.js +24 -24
  157. package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts +18 -5
  158. package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts.map +1 -1
  159. package/conversation/useConversationPanelItems/useConversationPanelItems.js +34 -30
  160. package/conversation/useConversationScroll/useConversationScroll.d.ts.map +1 -1
  161. package/conversation/useConversationScroll/useConversationScroll.js +69 -72
  162. package/conversation/useConversationStream/conversation-path.js +2 -2
  163. package/conversation/useConversationStream/conversation-stream.types.d.ts +142 -0
  164. package/conversation/useConversationStream/conversation-stream.types.d.ts.map +1 -0
  165. package/conversation/useConversationStream/frame-scheduler.js +17 -17
  166. package/conversation/useConversationStream/generation-resume.d.ts +24 -2
  167. package/conversation/useConversationStream/generation-resume.d.ts.map +1 -1
  168. package/conversation/useConversationStream/generation-resume.js +110 -121
  169. package/conversation/useConversationStream/stream-errors.d.ts +10 -0
  170. package/conversation/useConversationStream/stream-errors.d.ts.map +1 -0
  171. package/conversation/useConversationStream/stream-errors.js +10 -0
  172. package/conversation/useConversationStream/stream-session.d.ts +51 -0
  173. package/conversation/useConversationStream/stream-session.d.ts.map +1 -0
  174. package/conversation/useConversationStream/stream-session.js +179 -0
  175. package/conversation/useConversationStream/useConversationReloadErrors.d.ts +25 -0
  176. package/conversation/useConversationStream/useConversationReloadErrors.d.ts.map +1 -0
  177. package/conversation/useConversationStream/useConversationReloadErrors.js +38 -0
  178. package/conversation/useConversationStream/useConversationStream.d.ts +3 -136
  179. package/conversation/useConversationStream/useConversationStream.d.ts.map +1 -1
  180. package/conversation/useConversationStream/useConversationStream.js +141 -325
  181. package/conversation/useConversationStream/useStopGeneration.d.ts +29 -0
  182. package/conversation/useConversationStream/useStopGeneration.d.ts.map +1 -0
  183. package/conversation/useConversationStream/useStopGeneration.js +48 -0
  184. package/conversation/useConversationStream/useStreamPathState.d.ts +39 -0
  185. package/conversation/useConversationStream/useStreamPathState.d.ts.map +1 -0
  186. package/conversation/useConversationStream/useStreamPathState.js +55 -0
  187. package/conversation/useConversationTitleEnrichmentController.d.ts +64 -0
  188. package/conversation/useConversationTitleEnrichmentController.d.ts.map +1 -0
  189. package/conversation/useConversationTitleEnrichmentController.js +155 -0
  190. package/conversation/useDeploymentChangeTracking.d.ts +14 -0
  191. package/conversation/useDeploymentChangeTracking.d.ts.map +1 -0
  192. package/conversation/useDeploymentChangeTracking.js +23 -0
  193. package/conversation/useEntityPreselection/useEntityPreselection.d.ts +108 -0
  194. package/conversation/useEntityPreselection/useEntityPreselection.d.ts.map +1 -0
  195. package/conversation/useEntityPreselection/useEntityPreselection.js +78 -0
  196. package/conversation/useMessageSelectionReply/useMessageSelectionReply.js +4 -10
  197. package/conversation/useTranscribeAudio/useTranscribeAudio.d.ts +8 -1
  198. package/conversation/useTranscribeAudio/useTranscribeAudio.d.ts.map +1 -1
  199. package/conversation/useTranscribeAudio/useTranscribeAudio.js +36 -27
  200. package/conversation/useVisibleConversationIdsReporter/useVisibleConversationIdsReporter.d.ts +16 -0
  201. package/conversation/useVisibleConversationIdsReporter/useVisibleConversationIdsReporter.d.ts.map +1 -0
  202. package/conversation/useVisibleConversationIdsReporter/useVisibleConversationIdsReporter.js +17 -0
  203. package/conversation-overlay.js +1 -2
  204. package/conversation-sources/stage-citations.d.ts +9 -0
  205. package/conversation-sources/stage-citations.d.ts.map +1 -0
  206. package/conversation-sources/stage-citations.js +8 -0
  207. package/conversation-sources/useConversationAnnotationPool/useConversationAnnotationPool.d.ts +4 -0
  208. package/conversation-sources/useConversationAnnotationPool/useConversationAnnotationPool.d.ts.map +1 -0
  209. package/conversation-sources/useConversationAnnotationPool/useConversationAnnotationPool.js +5 -0
  210. package/conversation-sources.js +3 -1
  211. package/conversation.js +45 -33
  212. package/entry-points/attachments.d.ts +1 -0
  213. package/entry-points/attachments.d.ts.map +1 -1
  214. package/entry-points/catalog.d.ts +17 -0
  215. package/entry-points/catalog.d.ts.map +1 -1
  216. package/entry-points/conversation-sources.d.ts +2 -0
  217. package/entry-points/conversation-sources.d.ts.map +1 -1
  218. package/entry-points/conversation.d.ts +13 -0
  219. package/entry-points/conversation.d.ts.map +1 -1
  220. package/entry-points/external-services.d.ts +6 -0
  221. package/entry-points/external-services.d.ts.map +1 -0
  222. package/entry-points/file-manager-canvas.d.ts +1 -0
  223. package/entry-points/file-manager-canvas.d.ts.map +1 -1
  224. package/entry-points/file-manager.d.ts +2 -0
  225. package/entry-points/file-manager.d.ts.map +1 -1
  226. package/entry-points/oauth.d.ts +1 -0
  227. package/entry-points/oauth.d.ts.map +1 -1
  228. package/entry-points/offline-credentials.d.ts +7 -0
  229. package/entry-points/offline-credentials.d.ts.map +1 -0
  230. package/entry-points/project.d.ts +20 -0
  231. package/entry-points/project.d.ts.map +1 -0
  232. package/entry-points/scheduled-tasks.d.ts +7 -0
  233. package/entry-points/scheduled-tasks.d.ts.map +1 -1
  234. package/entry-points/sharing.d.ts +4 -0
  235. package/entry-points/sharing.d.ts.map +1 -1
  236. package/entry-points/skill-editor.d.ts +2 -0
  237. package/entry-points/skill-editor.d.ts.map +1 -1
  238. package/entry-points/skills-state.d.ts +1 -0
  239. package/entry-points/skills-state.d.ts.map +1 -1
  240. package/entry-points/usage-limits.d.ts +9 -0
  241. package/entry-points/usage-limits.d.ts.map +1 -0
  242. package/entry-points/utils.d.ts +6 -0
  243. package/entry-points/utils.d.ts.map +1 -1
  244. package/entry-points/viewport-layout.d.ts +1 -0
  245. package/entry-points/viewport-layout.d.ts.map +1 -1
  246. package/external-services/useExternalServiceLogin.d.ts +99 -0
  247. package/external-services/useExternalServiceLogin.d.ts.map +1 -0
  248. package/external-services/useExternalServiceLogin.js +93 -0
  249. package/external-services.d.ts +2 -0
  250. package/external-services.js +5 -0
  251. package/file-manager-canvas.js +3 -2
  252. package/file-manager.js +32 -30
  253. package/files/attachment-canvas.d.ts +12 -0
  254. package/files/attachment-canvas.d.ts.map +1 -1
  255. package/files/attachment-canvas.js +18 -10
  256. package/files/attachment-dto-to-display.d.ts.map +1 -1
  257. package/files/attachment-dto-to-display.js +13 -12
  258. package/files/attachment-types.js +1 -1
  259. package/files/browser-download.d.ts +9 -0
  260. package/files/browser-download.d.ts.map +1 -0
  261. package/files/browser-download.js +23 -0
  262. package/files/create-files-api.d.ts +3 -4
  263. package/files/create-files-api.d.ts.map +1 -1
  264. package/files/create-files-api.js +1 -1
  265. package/files/create-upload-file-with-progress.d.ts +21 -1
  266. package/files/create-upload-file-with-progress.d.ts.map +1 -1
  267. package/files/create-upload-file-with-progress.js +50 -34
  268. package/files/dial-file-manager-copy-move.util.d.ts.map +1 -1
  269. package/files/dial-file-manager-copy-move.util.js +28 -28
  270. package/files/dial-file-manager-mapping.util.d.ts +23 -3
  271. package/files/dial-file-manager-mapping.util.d.ts.map +1 -1
  272. package/files/dial-file-manager-mapping.util.js +97 -69
  273. package/files/dial-file-manager.types.d.ts +15 -5
  274. package/files/dial-file-manager.types.d.ts.map +1 -1
  275. package/files/dial-file-to-attachment.js +3 -3
  276. package/files/dial-file.d.ts +19 -0
  277. package/files/dial-file.d.ts.map +1 -1
  278. package/files/dial-file.js +20 -12
  279. package/files/dial-files-api.d.ts +2 -2
  280. package/files/dial-files-api.d.ts.map +1 -1
  281. package/files/download-progress.d.ts +33 -0
  282. package/files/download-progress.d.ts.map +1 -0
  283. package/files/download-progress.js +28 -0
  284. package/files/source-content.js +1 -1
  285. package/files/useDialFileListing/useDialFileListing.d.ts.map +1 -1
  286. package/files/useDialFileListing/useDialFileListing.js +97 -109
  287. package/files/useDialFileManager/useDialFileManager.d.ts.map +1 -1
  288. package/files/useDialFileManager/useDialFileManager.js +5 -2
  289. package/files/useDialFileManagerSections/useDialFileManagerSections.d.ts.map +1 -1
  290. package/files/useDialFileManagerSections/useDialFileManagerSections.js +59 -68
  291. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js +1 -1
  292. package/files/useDialFileMetadata/useDialFileMetadata.js +3 -3
  293. package/files/useDialFileMutations/useDialFileMutations.d.ts +9 -0
  294. package/files/useDialFileMutations/useDialFileMutations.d.ts.map +1 -1
  295. package/files/useDialFileMutations/useDialFileMutations.js +232 -159
  296. package/files/useDialFilePreview/useDialFilePreview.d.ts +33 -0
  297. package/files/useDialFilePreview/useDialFilePreview.d.ts.map +1 -0
  298. package/files/useDialFilePreview/useDialFilePreview.js +45 -0
  299. package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts.map +1 -1
  300. package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +114 -103
  301. package/files/useFileAttachmentModalState/useFileAttachmentModalState.d.ts +25 -0
  302. package/files/useFileAttachmentModalState/useFileAttachmentModalState.d.ts.map +1 -0
  303. package/files/useFileAttachmentModalState/useFileAttachmentModalState.js +19 -0
  304. package/files/useFileAttachmentPicker/useFileAttachmentPicker.js +2 -2
  305. package/files/useUnshareConfirmationState/useUnshareConfirmationState.d.ts +23 -0
  306. package/files/useUnshareConfirmationState/useUnshareConfirmationState.d.ts.map +1 -0
  307. package/files/useUnshareConfirmationState/useUnshareConfirmationState.js +18 -0
  308. package/index.d.ts +96 -0
  309. package/index.d.ts.map +1 -1
  310. package/index.js +244 -149
  311. package/mcp-apps/mcp-apps-api-client.d.ts.map +1 -1
  312. package/mcp-apps/mcp-apps-api-client.js +18 -17
  313. package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.d.ts +3 -2
  314. package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.d.ts.map +1 -1
  315. package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.js +28 -10
  316. package/mcp-apps/useMcpAppTools/useMcpAppTools.d.ts.map +1 -1
  317. package/mcp-apps/useMcpAppTools/useMcpAppTools.js +45 -45
  318. package/oauth/authorize-url.d.ts +7 -1
  319. package/oauth/authorize-url.d.ts.map +1 -1
  320. package/oauth/authorize-url.js +14 -4
  321. package/oauth/callback-exchange.d.ts +49 -0
  322. package/oauth/callback-exchange.d.ts.map +1 -0
  323. package/oauth/callback-exchange.js +29 -0
  324. package/oauth/handshake.js +3 -10
  325. package/oauth/models.d.ts +25 -0
  326. package/oauth/models.d.ts.map +1 -1
  327. package/oauth/popup.d.ts.map +1 -1
  328. package/oauth/popup.js +19 -17
  329. package/oauth/toolset-id.d.ts +7 -0
  330. package/oauth/toolset-id.d.ts.map +1 -1
  331. package/oauth/toolset-id.js +9 -2
  332. package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.d.ts.map +1 -1
  333. package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.js +41 -42
  334. package/oauth/useToolsetLogin/useToolsetLogin.d.ts +7 -1
  335. package/oauth/useToolsetLogin/useToolsetLogin.d.ts.map +1 -1
  336. package/oauth/useToolsetLogin/useToolsetLogin.js +51 -42
  337. package/oauth.js +9 -8
  338. package/offline-credentials/map-offline-credentials-response.d.ts +20 -0
  339. package/offline-credentials/map-offline-credentials-response.d.ts.map +1 -0
  340. package/offline-credentials/map-offline-credentials-response.js +17 -0
  341. package/offline-credentials/scheduled-tasks-login-banner.d.ts +31 -0
  342. package/offline-credentials/scheduled-tasks-login-banner.d.ts.map +1 -0
  343. package/offline-credentials/scheduled-tasks-login-banner.js +17 -0
  344. package/offline-credentials/useOfflineCredentialsAuth/useOfflineCredentialsAuth.d.ts +58 -0
  345. package/offline-credentials/useOfflineCredentialsAuth/useOfflineCredentialsAuth.d.ts.map +1 -0
  346. package/offline-credentials/useOfflineCredentialsAuth/useOfflineCredentialsAuth.js +37 -0
  347. package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.d.ts +61 -0
  348. package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.d.ts.map +1 -0
  349. package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.js +37 -0
  350. package/offline-credentials/useOfflineCredentialsLogin/useOfflineCredentialsLogin.d.ts +28 -0
  351. package/offline-credentials/useOfflineCredentialsLogin/useOfflineCredentialsLogin.d.ts.map +1 -0
  352. package/offline-credentials/useOfflineCredentialsLogin/useOfflineCredentialsLogin.js +29 -0
  353. package/offline-credentials.d.ts +2 -0
  354. package/offline-credentials.js +7 -0
  355. package/package.json +49 -25
  356. package/project/create-project-chat.d.ts +34 -0
  357. package/project/create-project-chat.d.ts.map +1 -0
  358. package/project/create-project-chat.js +27 -0
  359. package/project/project-conversation-data-source.d.ts +36 -0
  360. package/project/project-conversation-data-source.d.ts.map +1 -0
  361. package/project/project-conversation-data-source.js +67 -0
  362. package/project/project-events.d.ts +14 -0
  363. package/project/project-events.d.ts.map +1 -0
  364. package/project/project-events.js +25 -0
  365. package/project/project-file-preview.d.ts +32 -0
  366. package/project/project-file-preview.d.ts.map +1 -0
  367. package/project/project-file-preview.js +25 -0
  368. package/project/project-form-errors.d.ts +23 -0
  369. package/project/project-form-errors.d.ts.map +1 -0
  370. package/project/project-form-errors.js +46 -0
  371. package/project/project-limits.d.ts +17 -0
  372. package/project/project-limits.d.ts.map +1 -0
  373. package/project/project-limits.js +11 -0
  374. package/project/project-mapping.d.ts +16 -0
  375. package/project/project-mapping.d.ts.map +1 -0
  376. package/project/project-mapping.js +43 -0
  377. package/project/project-refresh.d.ts +12 -0
  378. package/project/project-refresh.d.ts.map +1 -0
  379. package/project/project-refresh.js +6 -0
  380. package/project/project-viewed-marks.d.ts +9 -0
  381. package/project/project-viewed-marks.d.ts.map +1 -0
  382. package/project/project-viewed-marks.js +8 -0
  383. package/project/project-watch-stream.d.ts +26 -0
  384. package/project/project-watch-stream.d.ts.map +1 -0
  385. package/project/project-watch-stream.js +39 -0
  386. package/project/projects-api-client.d.ts +179 -0
  387. package/project/projects-api-client.d.ts.map +1 -0
  388. package/project/projects-api-client.js +90 -0
  389. package/project/use-pinned-project-chats.d.ts +58 -0
  390. package/project/use-pinned-project-chats.d.ts.map +1 -0
  391. package/project/use-pinned-project-chats.js +269 -0
  392. package/project/use-project-actions.d.ts +53 -0
  393. package/project/use-project-actions.d.ts.map +1 -0
  394. package/project/use-project-actions.js +92 -0
  395. package/project/use-project-artifacts.d.ts +24 -0
  396. package/project/use-project-artifacts.d.ts.map +1 -0
  397. package/project/use-project-artifacts.js +78 -0
  398. package/project/use-project-conversations.d.ts +32 -0
  399. package/project/use-project-conversations.d.ts.map +1 -0
  400. package/project/use-project-conversations.js +200 -0
  401. package/project/use-project-draft.d.ts +46 -0
  402. package/project/use-project-draft.d.ts.map +1 -0
  403. package/project/use-project-draft.js +54 -0
  404. package/project/use-project-file-preview.d.ts +47 -0
  405. package/project/use-project-file-preview.d.ts.map +1 -0
  406. package/project/use-project-file-preview.js +50 -0
  407. package/project/use-project-submit.d.ts +49 -0
  408. package/project/use-project-submit.d.ts.map +1 -0
  409. package/project/use-project-submit.js +73 -0
  410. package/project/use-project-watch.d.ts +24 -0
  411. package/project/use-project-watch.d.ts.map +1 -0
  412. package/project/use-project-watch.js +41 -0
  413. package/project/use-project.d.ts +23 -0
  414. package/project/use-project.d.ts.map +1 -0
  415. package/project/use-project.js +73 -0
  416. package/project/use-projects.d.ts +27 -0
  417. package/project/use-projects.d.ts.map +1 -0
  418. package/project/use-projects.js +92 -0
  419. package/project.d.ts +2 -0
  420. package/project.js +20 -0
  421. package/prompt/prompt.d.ts +11 -0
  422. package/prompt/prompt.d.ts.map +1 -1
  423. package/prompt/prompt.js +7 -3
  424. package/scheduled-task/active-scheduled-task.d.ts +58 -0
  425. package/scheduled-task/active-scheduled-task.d.ts.map +1 -0
  426. package/scheduled-task/active-scheduled-task.js +18 -0
  427. package/scheduled-task/check-scheduled-task-auth-session-error.d.ts +27 -0
  428. package/scheduled-task/check-scheduled-task-auth-session-error.d.ts.map +1 -0
  429. package/scheduled-task/check-scheduled-task-auth-session-error.js +17 -0
  430. package/scheduled-task/scheduled-task-description.d.ts +2 -0
  431. package/scheduled-task/scheduled-task-description.d.ts.map +1 -1
  432. package/scheduled-task/scheduled-task-description.js +33 -24
  433. package/scheduled-task/scheduled-task-display.d.ts +106 -0
  434. package/scheduled-task/scheduled-task-display.d.ts.map +1 -0
  435. package/scheduled-task/scheduled-task-display.js +69 -0
  436. package/scheduled-task/scheduled-task-next-occurrence.d.ts +9 -0
  437. package/scheduled-task/scheduled-task-next-occurrence.d.ts.map +1 -0
  438. package/scheduled-task/scheduled-task-next-occurrence.js +20 -0
  439. package/scheduled-task/scheduled-task-preparation.d.ts +1 -1
  440. package/scheduled-task/scheduled-task-trigger.d.ts.map +1 -1
  441. package/scheduled-task/scheduled-task-trigger.js +75 -48
  442. package/scheduled-task/use-scheduled-task-runs.js +19 -31
  443. package/scheduled-task/use-scheduled-tasks.d.ts +2 -2
  444. package/scheduled-task/use-scheduled-tasks.js +1 -1
  445. package/scheduled-task/useActiveScheduledTaskDetails.d.ts +18 -0
  446. package/scheduled-task/useActiveScheduledTaskDetails.d.ts.map +1 -0
  447. package/scheduled-task/useActiveScheduledTaskDetails.js +40 -0
  448. package/scheduled-task/useScheduledTaskSkillDisplayNames/useScheduledTaskSkillDisplayNames.d.ts +17 -0
  449. package/scheduled-task/useScheduledTaskSkillDisplayNames/useScheduledTaskSkillDisplayNames.d.ts.map +1 -0
  450. package/scheduled-task/useScheduledTaskSkillDisplayNames/useScheduledTaskSkillDisplayNames.js +29 -0
  451. package/scheduled-task/useStartScheduledTask.d.ts +41 -0
  452. package/scheduled-task/useStartScheduledTask.d.ts.map +1 -0
  453. package/scheduled-task/useStartScheduledTask.js +169 -0
  454. package/scheduled-tasks.js +13 -6
  455. package/scroll-anchoring.js +1 -2
  456. package/share-invitation/models.d.ts +46 -0
  457. package/share-invitation/models.d.ts.map +1 -0
  458. package/share-invitation/share-invitation-error.d.ts +6 -0
  459. package/share-invitation/share-invitation-error.d.ts.map +1 -0
  460. package/share-invitation/share-invitation-error.js +37 -0
  461. package/share-invitation/types.d.ts +10 -0
  462. package/share-invitation/types.d.ts.map +1 -0
  463. package/share-invitation/types.js +6 -0
  464. package/share-invitation/useAcceptShareInvitation/useAcceptShareInvitation.d.ts +9 -0
  465. package/share-invitation/useAcceptShareInvitation/useAcceptShareInvitation.d.ts.map +1 -0
  466. package/share-invitation/useAcceptShareInvitation/useAcceptShareInvitation.js +26 -0
  467. package/shared/application-schema.js +3 -3
  468. package/shared/client-channel.d.ts +53 -0
  469. package/shared/client-channel.d.ts.map +1 -0
  470. package/shared/client-channel.js +6 -0
  471. package/shared/cron-day-of-month.js +10 -10
  472. package/shared/external-services.d.ts +1 -1
  473. package/shared/locale.d.ts +6 -2
  474. package/shared/locale.d.ts.map +1 -1
  475. package/shared/locale.js +4 -4
  476. package/shared/read-sse-events.d.ts +10 -0
  477. package/shared/read-sse-events.d.ts.map +1 -0
  478. package/shared/read-sse-events.js +33 -0
  479. package/shared/serialized-writer.d.ts +12 -0
  480. package/shared/serialized-writer.d.ts.map +1 -0
  481. package/shared/serialized-writer.js +44 -0
  482. package/shared/sleep.d.ts +3 -0
  483. package/shared/sleep.d.ts.map +1 -0
  484. package/shared/sleep.js +13 -0
  485. package/shared/theme-colors.d.ts +16 -0
  486. package/shared/theme-colors.d.ts.map +1 -0
  487. package/shared/theme-colors.js +14 -0
  488. package/shared/url-cleanup.d.ts +18 -0
  489. package/shared/url-cleanup.d.ts.map +1 -0
  490. package/shared/url-cleanup.js +18 -0
  491. package/shared/usage-stat.d.ts +3 -0
  492. package/shared/usage-stat.d.ts.map +1 -0
  493. package/shared/usage-stat.js +4 -0
  494. package/shared/useAppVersionCheck/useAppVersionCheck.d.ts +22 -0
  495. package/shared/useAppVersionCheck/useAppVersionCheck.d.ts.map +1 -0
  496. package/shared/useAppVersionCheck/useAppVersionCheck.js +36 -0
  497. package/shared/usePersistedState/usePersistedState.d.ts +28 -0
  498. package/shared/usePersistedState/usePersistedState.d.ts.map +1 -0
  499. package/shared/usePersistedState/usePersistedState.js +24 -0
  500. package/sharing.js +5 -2
  501. package/signin-interrupt/models.d.ts +48 -0
  502. package/signin-interrupt/models.d.ts.map +1 -0
  503. package/signin-interrupt/signin-row-info.d.ts +10 -0
  504. package/signin-interrupt/signin-row-info.d.ts.map +1 -0
  505. package/signin-interrupt/signin-row-info.js +21 -0
  506. package/signin-interrupt/types.d.ts +28 -0
  507. package/signin-interrupt/types.d.ts.map +1 -0
  508. package/signin-interrupt/types.js +10 -0
  509. package/signin-interrupt/useSigninInterrupt/useSigninInterrupt.d.ts +52 -0
  510. package/signin-interrupt/useSigninInterrupt/useSigninInterrupt.d.ts.map +1 -0
  511. package/signin-interrupt/useSigninInterrupt/useSigninInterrupt.js +270 -0
  512. package/skill/skill-file-batch-validation.d.ts +4 -0
  513. package/skill/skill-file-batch-validation.d.ts.map +1 -1
  514. package/skill/skill-file-batch-validation.js +34 -33
  515. package/skill/skill-lookup.d.ts +20 -0
  516. package/skill/skill-lookup.d.ts.map +1 -0
  517. package/skill/skill-lookup.js +12 -0
  518. package/skill/skill-types.js +1 -1
  519. package/skill/skill.d.ts +5 -1
  520. package/skill/skill.d.ts.map +1 -1
  521. package/skill/skill.js +27 -28
  522. package/skill/useSkillArchiveImport/useSkillArchiveImport.js +1 -7
  523. package/skill/useSkillEditorSubmit.d.ts +15 -1
  524. package/skill/useSkillEditorSubmit.d.ts.map +1 -1
  525. package/skill/useSkillEditorSubmit.js +164 -87
  526. package/skill/useSkillFileActions.d.ts +2 -0
  527. package/skill/useSkillFileActions.d.ts.map +1 -1
  528. package/skill/useSkillFileActions.js +36 -21
  529. package/skill-editor/useSkillFilePreviewSyncController.d.ts +41 -0
  530. package/skill-editor/useSkillFilePreviewSyncController.d.ts.map +1 -0
  531. package/skill-editor/useSkillFilePreviewSyncController.js +58 -0
  532. package/skill-editor/useSkillFileSystemPicker/useSkillFileSystemPicker.d.ts +23 -0
  533. package/skill-editor/useSkillFileSystemPicker/useSkillFileSystemPicker.d.ts.map +1 -0
  534. package/skill-editor/useSkillFileSystemPicker/useSkillFileSystemPicker.js +43 -0
  535. package/skill-editor.js +11 -9
  536. package/skills-state.js +3 -2
  537. package/source-content.js +1 -2
  538. package/usage/map-usage-data-to-dashboard.d.ts +1 -16
  539. package/usage/map-usage-data-to-dashboard.d.ts.map +1 -1
  540. package/usage/map-user-usage-to-model-limits.d.ts.map +1 -1
  541. package/usage/map-user-usage-to-model-limits.js +24 -24
  542. package/usage/usage-banner-source.d.ts +24 -0
  543. package/usage/usage-banner-source.d.ts.map +1 -0
  544. package/usage/usage-banner-source.js +61 -0
  545. package/usage/usage-gauge.d.ts +3 -0
  546. package/usage/usage-gauge.d.ts.map +1 -0
  547. package/usage/usage-gauge.js +4 -0
  548. package/usage/usage-period.d.ts +7 -0
  549. package/usage/usage-period.d.ts.map +1 -0
  550. package/usage/usage-period.js +6 -0
  551. package/usage/usage-reset-time.d.ts +78 -0
  552. package/usage/usage-reset-time.d.ts.map +1 -0
  553. package/usage/usage-reset-time.js +82 -0
  554. package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts +56 -0
  555. package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts.map +1 -0
  556. package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.js +34 -0
  557. package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.d.ts +16 -0
  558. package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.d.ts.map +1 -0
  559. package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.js +14 -0
  560. package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts +58 -0
  561. package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts.map +1 -0
  562. package/usage/useUsageLimitBanner/useUsageLimitBanner.js +70 -0
  563. package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.d.ts +14 -0
  564. package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.d.ts.map +1 -0
  565. package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.js +19 -0
  566. package/usage-limits.d.ts +2 -0
  567. package/usage-limits.js +10 -0
  568. package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts +2 -0
  569. package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts.map +1 -1
  570. package/useChatSettingsFormConfig/useChatSettingsFormConfig.js +25 -21
  571. package/usePageFileDrag/usePageFileDrag.js +3 -3
  572. package/useShareLink/useShareLink.d.ts.map +1 -1
  573. package/useShareLink/useShareLink.js +18 -17
  574. package/utils.js +23 -17
  575. package/viewport-layout/canvas-width.d.ts +39 -0
  576. package/viewport-layout/canvas-width.d.ts.map +1 -0
  577. package/viewport-layout/canvas-width.js +23 -0
  578. package/viewport-layout.js +2 -1
@@ -0,0 +1,28 @@
1
+ import { OfflineCredentialsConnectSettings, OfflineCredentialsStatusResult } from '../useOfflineCredentialsGate/useOfflineCredentialsGate';
2
+ export declare enum OfflineCredentialsLoginOutcomeType {
3
+ Success = "success",
4
+ Failure = "failure",
5
+ PopupBlocked = "popup-blocked",
6
+ Cancelled = "cancelled",
7
+ TimedOut = "timed-out"
8
+ }
9
+ export interface OfflineCredentialsLoginOutcome {
10
+ /** Which terminal branch the attempt resolved through. */
11
+ type: OfflineCredentialsLoginOutcomeType;
12
+ }
13
+ /** Options for `useOfflineCredentialsLogin`. */
14
+ export interface UseOfflineCredentialsLoginOptions {
15
+ /** Host route the OAuth popup posts its result back to, e.g. the app's toolset sign-in callback route. */
16
+ callbackPath: string;
17
+ }
18
+ /**
19
+ * Offline-credentials counterpart to `useToolsetLogin`/`useExternalServiceLogin`:
20
+ * reuses the exact same OAuth popup/`BroadcastChannel` handshake, but drives
21
+ * the `offline-credentials` BFF domain and treats a fresh
22
+ * status refetch as authoritative for reporting success. Callers that fetch
23
+ * settings after the click can pass a popup they already opened synchronously.
24
+ */
25
+ export declare const useOfflineCredentialsLogin: ({ callbackPath, }: UseOfflineCredentialsLoginOptions) => {
26
+ login: (connect: OfflineCredentialsConnectSettings, refetch: () => Promise<OfflineCredentialsStatusResult | null>, preparedPopup?: Window) => Promise<OfflineCredentialsLoginOutcome>;
27
+ };
28
+ //# sourceMappingURL=useOfflineCredentialsLogin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOfflineCredentialsLogin.d.ts","sourceRoot":"","sources":["../../../src/offline-credentials/useOfflineCredentialsLogin/useOfflineCredentialsLogin.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,iCAAiC,EACjC,8BAA8B,EAC/B,MAAM,wDAAwD,CAAC;AAsBhE,oBAAY,kCAAkC;IAC5C,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,YAAY,kBAAkB;IAC9B,SAAS,cAAc;IACvB,QAAQ,cAAc;CACvB;AAED,MAAM,WAAW,8BAA8B;IAC7C,0DAA0D;IAC1D,IAAI,EAAE,kCAAkC,CAAC;CAC1C;AAED,gDAAgD;AAChD,MAAM,WAAW,iCAAiC;IAChD,0GAA0G;IAC1G,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,GAAI,mBAExC,iCAAiC,KAAG;IACrC,KAAK,EAAE,CACL,OAAO,EAAE,iCAAiC,EAC1C,OAAO,EAAE,MAAM,OAAO,CAAC,8BAA8B,GAAG,IAAI,CAAC,EAC7D,aAAa,CAAC,EAAE,MAAM,KACnB,OAAO,CAAC,8BAA8B,CAAC,CAAC;CAoF9C,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { OAuthResourceKind as e, ToolsetAuthTypes as t, ToolsetCredentialsLevel as n, ToolsetOAuthInitiationResultType as r, ToolsetOAuthResultType as i, WithLogin as a } from "../../oauth/types.js";
2
+ import { waitForToolsetOAuthResult as o } from "../../oauth/handshake.js";
3
+ import { navigateToolsetOAuthPopup as s, openToolsetOAuthPopup as c } from "../../oauth/popup.js";
4
+ import { useCallback as l } from "react";
5
+ //#region src/offline-credentials/useOfflineCredentialsLogin/useOfflineCredentialsLogin.ts
6
+ var u = "offline-credentials", d = 3e5, f = /* @__PURE__ */ function(e) {
7
+ return e.Success = "success", e.Failure = "failure", e.PopupBlocked = "popup-blocked", e.Cancelled = "cancelled", e.TimedOut = "timed-out", e;
8
+ }({}), p = ({ callbackPath: f }) => ({ login: l(async (l, p, m) => {
9
+ let h = {
10
+ authenticationType: t.OAuth,
11
+ withLogin: a.WithConfig,
12
+ isLoggedIn: !1,
13
+ clientId: l.clientId,
14
+ authorizationEndpoint: l.authorizationEndpoint,
15
+ scopes: l.scopes
16
+ }, g = m ?? c();
17
+ if (!g) return { type: "popup-blocked" };
18
+ let _ = s(g, h, u, f, n.User, e.OfflineCredentials);
19
+ if (_.type !== r.Started) return { type: "failure" };
20
+ let v = Date.now(), y = await o(_.popup, _.flowId, {
21
+ toolsetId: u,
22
+ credentialsLevel: n.User,
23
+ callbackPath: f,
24
+ timeoutMs: d
25
+ }), b = Date.now() - v;
26
+ return (await p())?.connected ? { type: "success" } : y.type === i.Failure || y.type === i.Success ? { type: "failure" } : b >= 295e3 ? { type: "timed-out" } : { type: "cancelled" };
27
+ }, [f]) });
28
+ //#endregion
29
+ export { f as OfflineCredentialsLoginOutcomeType, p as useOfflineCredentialsLogin };
@@ -0,0 +1,2 @@
1
+ export * from './entry-points/offline-credentials.js'
2
+ export {}
@@ -0,0 +1,7 @@
1
+ import { OfflineCredentialsLoginOutcomeType as e, useOfflineCredentialsLogin as t } from "./offline-credentials/useOfflineCredentialsLogin/useOfflineCredentialsLogin.js";
2
+ import { mapOfflineCredentialsResponse as n, normalizeOfflineCredentialsConnectSettings as r } from "./offline-credentials/map-offline-credentials-response.js";
3
+ import { OfflineCredentialsGateStatus as i, useOfflineCredentialsGate as a } from "./offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.js";
4
+ import { OfflineCredentialsLogoutOutcomeType as o, useOfflineCredentialsAuth as s } from "./offline-credentials/useOfflineCredentialsAuth/useOfflineCredentialsAuth.js";
5
+ import { ScheduledTasksLoginBannerState as c, getScheduledTasksLoginRetryState as l, resolveScheduledTasksLoginBannerState as u } from "./offline-credentials/scheduled-tasks-login-banner.js";
6
+ import { SchedulerServiceConsentStatus as d } from "@epam/ai-dial-chat-api-client";
7
+ export { i as OfflineCredentialsGateStatus, e as OfflineCredentialsLoginOutcomeType, o as OfflineCredentialsLogoutOutcomeType, c as ScheduledTasksLoginBannerState, d as SchedulerServiceConsentStatus, l as getScheduledTasksLoginRetryState, n as mapOfflineCredentialsResponse, r as normalizeOfflineCredentialsConnectSettings, u as resolveScheduledTasksLoginBannerState, s as useOfflineCredentialsAuth, a as useOfflineCredentialsGate, t as useOfflineCredentialsLogin };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-chat-hooks",
3
3
  "description": "Framework-level React hooks extracted from AI DIAL Chat for building custom chat interfaces",
4
- "version": "1.3.0-dev.37",
4
+ "version": "1.3.0-dev.372",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -79,11 +79,21 @@
79
79
  "import": "./oauth.js",
80
80
  "default": "./oauth.js"
81
81
  },
82
+ "./offline-credentials": {
83
+ "types": "./offline-credentials.d.ts",
84
+ "import": "./offline-credentials.js",
85
+ "default": "./offline-credentials.js"
86
+ },
82
87
  "./scheduled-tasks": {
83
88
  "types": "./scheduled-tasks.d.ts",
84
89
  "import": "./scheduled-tasks.js",
85
90
  "default": "./scheduled-tasks.js"
86
91
  },
92
+ "./project": {
93
+ "types": "./project.d.ts",
94
+ "import": "./project.js",
95
+ "default": "./project.js"
96
+ },
87
97
  "./sharing": {
88
98
  "types": "./sharing.d.ts",
89
99
  "import": "./sharing.js",
@@ -104,40 +114,51 @@
104
114
  "import": "./usage.js",
105
115
  "default": "./usage.js"
106
116
  },
117
+ "./usage-limits": {
118
+ "types": "./usage-limits.d.ts",
119
+ "import": "./usage-limits.js",
120
+ "default": "./usage-limits.js"
121
+ },
107
122
  "./mcp-apps": {
108
123
  "types": "./mcp-apps.d.ts",
109
124
  "import": "./mcp-apps.js",
110
125
  "default": "./mcp-apps.js"
126
+ },
127
+ "./external-services": {
128
+ "types": "./external-services.d.ts",
129
+ "import": "./external-services.js",
130
+ "default": "./external-services.js"
111
131
  }
112
132
  },
113
133
  "dependencies": {
114
- "@epam/ai-dial-chat-api-client": "1.3.0-dev.37",
115
- "dompurify": "3.4.16",
134
+ "@epam/ai-dial-chat-api-client": "1.3.0-dev.372",
135
+ "dompurify": "3.4.17",
116
136
  "fflate": "^0.8.3",
117
137
  "lru-cache": "^10.4.3",
118
138
  "mime-types": "^3.0.2",
119
- "yaml": "^2.9.0"
139
+ "yaml": "^2.9.1"
120
140
  },
121
141
  "peerDependencies": {
122
142
  "react": "^19.2.8",
123
- "@epam/ai-dial-attachment-canvas": "1.3.0-dev.37",
124
- "@epam/ai-dial-attachment-input": "1.3.0-dev.37",
125
- "@epam/ai-dial-catalog": "1.3.0-dev.37",
126
- "@epam/ai-dial-chat-overlay": "1.3.0-dev.37",
127
- "@epam/ai-dial-chat-shared": "1.3.0-dev.37",
128
- "@epam/ai-dial-mcp-apps": "1.3.0-dev.37",
129
- "@epam/ai-dial-publish-panel": "1.3.0-dev.37",
130
- "@epam/ai-dial-quotations": "1.3.0-dev.37",
131
- "@epam/ai-dial-react-file-manager": "^0.3.4",
132
- "@epam/ai-dial-scheduled-tasks": "1.3.0-dev.37",
133
- "@epam/ai-dial-share": "1.3.0-dev.37",
134
- "@epam/ai-dial-skill-editor": "1.3.0-dev.37",
135
- "@epam/ai-dial-source-panel": "1.3.0-dev.37",
136
- "@epam/ai-dial-ui-kit": "^0.15.3",
137
- "@epam/ai-dial-usage-dashboard": "1.3.0-dev.37",
138
- "@modelcontextprotocol/sdk": "^1.32.1",
139
- "@epam/pdf-highlighter-kit": "^0.0.19",
140
- "@mcp-ui/client": "^7.1.1"
143
+ "@epam/ai-dial-attachment-canvas": "1.3.0-dev.372",
144
+ "@epam/ai-dial-attachment-input": "1.3.0-dev.372",
145
+ "@epam/ai-dial-catalog": "1.3.0-dev.372",
146
+ "@epam/ai-dial-chat-overlay": "1.3.0-dev.372",
147
+ "@epam/ai-dial-chat-shared": "1.3.0-dev.372",
148
+ "@epam/ai-dial-conversation-input": "1.3.0-dev.372",
149
+ "@epam/ai-dial-mcp-apps": "1.3.0-dev.372",
150
+ "@epam/ai-dial-projects": "1.3.0-dev.372",
151
+ "@epam/ai-dial-publish-panel": "1.3.0-dev.372",
152
+ "@epam/ai-dial-quotations": "1.3.0-dev.372",
153
+ "@epam/ai-dial-react-file-manager": "^0.4.1",
154
+ "@epam/ai-dial-scheduled-tasks": "1.3.0-dev.372",
155
+ "@epam/ai-dial-share": "1.3.0-dev.372",
156
+ "@epam/ai-dial-skill-editor": "1.3.0-dev.372",
157
+ "@epam/ai-dial-source-panel": "1.3.0-dev.372",
158
+ "@epam/ai-dial-ui-kit": "^0.16.0",
159
+ "@epam/ai-dial-usage-dashboard": "1.3.0-dev.372",
160
+ "@modelcontextprotocol/sdk": "^1.32.2",
161
+ "@epam/pdf-highlighter-kit": "^0.0.21"
141
162
  },
142
163
  "peerDependenciesMeta": {
143
164
  "@epam/ai-dial-attachment-canvas": {
@@ -155,9 +176,15 @@
155
176
  "@epam/ai-dial-chat-shared": {
156
177
  "optional": true
157
178
  },
179
+ "@epam/ai-dial-conversation-input": {
180
+ "optional": true
181
+ },
158
182
  "@epam/ai-dial-mcp-apps": {
159
183
  "optional": true
160
184
  },
185
+ "@epam/ai-dial-projects": {
186
+ "optional": true
187
+ },
161
188
  "@epam/ai-dial-publish-panel": {
162
189
  "optional": true
163
190
  },
@@ -185,9 +212,6 @@
185
212
  "@epam/ai-dial-usage-dashboard": {
186
213
  "optional": true
187
214
  },
188
- "@mcp-ui/client": {
189
- "optional": true
190
- },
191
215
  "@modelcontextprotocol/sdk": {
192
216
  "optional": true
193
217
  },
@@ -0,0 +1,34 @@
1
+ import { ConversationResponseDto } from '@epam/ai-dial-chat-api-client';
2
+ import { ChatSettingsValues } from '../useChatSettingsFormConfig/useChatSettingsFormConfig';
3
+ import { ConversationCreateRequest, ProjectsApiClient } from './projects-api-client';
4
+ /** Why creating a project chat failed, as the host explains it. */
5
+ export declare enum ProjectChatCreateFailure {
6
+ /** The project has no room left for another chat. */
7
+ StorageFull = "storage-full",
8
+ /** Any other failure. */
9
+ Failed = "failed"
10
+ }
11
+ /** A failed chat create, classified for the host's message. */
12
+ export interface ProjectChatCreateFailureDetails {
13
+ /** Why the create failed. */
14
+ failure: ProjectChatCreateFailure;
15
+ /** Trace id of the failed request, when the response carried one. */
16
+ requestId?: string;
17
+ }
18
+ /**
19
+ * Creates a project chat from its first message, saves the composer's chat
20
+ * settings onto it, and hands the saved chat to `onCreated` in every case where
21
+ * the chat exists, even when saving the settings fails (the chat exists either
22
+ * way, and opening it avoids a duplicate on retry). A failed save is rethrown
23
+ * after `onCreated` ran; a failed create rejects without calling it.
24
+ *
25
+ * @param client - Configured project requests, from `createProjectsApiClient`.
26
+ * @param projectId - The project's DIAL id.
27
+ * @param request - First message, deployment, attachments, tool configuration, form values and skills.
28
+ * @param settings - System prompt, temperature and response format saved onto the new chat.
29
+ * @param onCreated - Receives the chat with the settings applied, e.g. to open it.
30
+ */
31
+ export declare const createProjectChat: (client: Pick<ProjectsApiClient, "createProjectConversation" | "saveProjectConversation">, projectId: string, request: ConversationCreateRequest, settings: ChatSettingsValues, onCreated: (saved: ConversationResponseDto) => void) => Promise<ConversationResponseDto>;
32
+ /** Classifies a rejected project chat create as storage-full or a plain failure, with its trace id. */
33
+ export declare const classifyProjectChatCreateError: (error: unknown) => Promise<ProjectChatCreateFailureDetails>;
34
+ //# sourceMappingURL=create-project-chat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-project-chat.d.ts","sourceRoot":"","sources":["../../src/project/create-project-chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wDAAwD,CAAC;AACjG,OAAO,KAAK,EACV,yBAAyB,EACzB,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAE/B,mEAAmE;AACnE,oBAAY,wBAAwB;IAClC,qDAAqD;IACrD,WAAW,iBAAiB;IAC5B,yBAAyB;IACzB,MAAM,WAAW;CAClB;AAED,+DAA+D;AAC/D,MAAM,WAAW,+BAA+B;IAC9C,6BAA6B;IAC7B,OAAO,EAAE,wBAAwB,CAAC;IAClC,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,IAAI,CACV,iBAAiB,EACjB,2BAA2B,GAAG,yBAAyB,CACxD,EACD,WAAW,MAAM,EACjB,SAAS,yBAAyB,EAClC,UAAU,kBAAkB,EAC5B,WAAW,CAAC,KAAK,EAAE,uBAAuB,KAAK,IAAI,KAClD,OAAO,CAAC,uBAAuB,CAiBjC,CAAC;AAEF,uGAAuG;AACvG,eAAO,MAAM,8BAA8B,GACzC,OAAO,OAAO,KACb,OAAO,CAAC,+BAA+B,CASzC,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { getApiErrorDetails as e } from "../api-error/api-error.js";
2
+ import { ProjectCreateErrorCode as t } from "@epam/ai-dial-chat-api-client";
3
+ //#region src/project/create-project-chat.ts
4
+ var n = /* @__PURE__ */ function(e) {
5
+ return e.StorageFull = "storage-full", e.Failed = "failed", e;
6
+ }({}), r = async (e, t, n, r, i) => {
7
+ let a = await e.createProjectConversation(t, n), o = {
8
+ ...a,
9
+ prompt: r.systemPrompt,
10
+ temperature: r.temperature,
11
+ responseFormat: r.responseFormat
12
+ };
13
+ try {
14
+ await e.saveProjectConversation(a.id, o);
15
+ } finally {
16
+ i(o);
17
+ }
18
+ return o;
19
+ }, i = async (n) => {
20
+ let { code: r, traceId: i } = await e(n);
21
+ return {
22
+ failure: r === t.ProjectStorageFull ? "storage-full" : "failed",
23
+ requestId: i
24
+ };
25
+ };
26
+ //#endregion
27
+ export { n as ProjectChatCreateFailure, i as classifyProjectChatCreateError, r as createProjectChat };
@@ -0,0 +1,36 @@
1
+ import { ConversationDataSource } from '../conversation/conversation-data-source';
2
+ import { CreateChatStreamApiDeps } from '../conversation/create-chat-stream-api';
3
+ import { SerializedKeyedWriter } from '../shared/serialized-writer';
4
+ import { ProjectsApiClient } from './projects-api-client';
5
+ /** Host ports of {@link createProjectConversationDataSource}. */
6
+ export interface ProjectConversationDataSourceOptions {
7
+ /** The project's DIAL id. */
8
+ projectId: string;
9
+ /** Whether the caller may write the project's chats (the owner, or a recipient with edit access); a conversation opens read-only without it. */
10
+ canEdit: boolean;
11
+ /** Configured project requests, from `createProjectsApiClient`; only the conversation requests are used. */
12
+ client: Pick<ProjectsApiClient, 'getProjectConversation' | 'saveProjectConversation' | 'deleteProjectConversation' | 'attachToProjectGeneration'>;
13
+ /** Where and how the completion stream is sent: the host's base path under the project, and its CSRF token store. */
14
+ stream: Pick<CreateChatStreamApiDeps, 'getCsrfToken' | 'setCsrfToken' | 'completionsBasePath'>;
15
+ /** The host's routes: a project conversation's page, and where a deleted or missing one goes. */
16
+ routes: {
17
+ /** Returns the page route of a conversation. */
18
+ getConversationRoute: (id: string) => string;
19
+ /** Returns the route a deleted or missing conversation navigates to. */
20
+ getExitRoute: () => string;
21
+ };
22
+ /** The queue viewed marks go through, shared with the host's other pages so they write one at a time. */
23
+ viewedWriter: Pick<SerializedKeyedWriter, 'enqueue' | 'drop'>;
24
+ /** Translation key of the toast shown when the conversation cannot be loaded; the host resolves it. */
25
+ notFoundMessageKey?: string;
26
+ }
27
+ /**
28
+ * Returns the data source of a conversation stored inside a project: the
29
+ * project conversation requests for loads, saves and streams, the host's
30
+ * routes, read-only from `canEdit`, no sidebar list side effects and no
31
+ * Duplicate. A project chat has no sidebar row, so the open chat is marked
32
+ * viewed through `viewedWriter`, and a generation starting drops a mark still
33
+ * waiting for its chat.
34
+ */
35
+ export declare const createProjectConversationDataSource: ({ projectId, canEdit, client, stream, routes, viewedWriter, notFoundMessageKey, }: ProjectConversationDataSourceOptions) => ConversationDataSource;
36
+ //# sourceMappingURL=project-conversation-data-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-conversation-data-source.d.ts","sourceRoot":"","sources":["../../src/project/project-conversation-data-source.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,sBAAsB,EAE5B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,wCAAwC,CAAC;AAGhD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAU/D,iEAAiE;AACjE,MAAM,WAAW,oCAAoC;IACnD,6BAA6B;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,gJAAgJ;IAChJ,OAAO,EAAE,OAAO,CAAC;IACjB,4GAA4G;IAC5G,MAAM,EAAE,IAAI,CACV,iBAAiB,EACf,wBAAwB,GACxB,yBAAyB,GACzB,2BAA2B,GAC3B,2BAA2B,CAC9B,CAAC;IACF,qHAAqH;IACrH,MAAM,EAAE,IAAI,CACV,uBAAuB,EACvB,cAAc,GAAG,cAAc,GAAG,qBAAqB,CACxD,CAAC;IACF,iGAAiG;IACjG,MAAM,EAAE;QACN,gDAAgD;QAChD,oBAAoB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC;QAC7C,wEAAwE;QACxE,YAAY,EAAE,MAAM,MAAM,CAAC;KAC5B,CAAC;IACF,yGAAyG;IACzG,YAAY,EAAE,IAAI,CAAC,qBAAqB,EAAE,SAAS,GAAG,MAAM,CAAC,CAAC;IAC9D,uGAAuG;IACvG,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAsED;;;;;;;GAOG;AACH,eAAO,MAAM,mCAAmC,GAAI,mFAQjD,oCAAoC,KAAG,sBAiEzC,CAAC"}
@@ -0,0 +1,67 @@
1
+ import { createChatStreamApi as e } from "../conversation/create-chat-stream-api.js";
2
+ import { NO_CONVERSATION_LIST_SYNC as t } from "../conversation/conversation-data-source.js";
3
+ import { getBrowserTimezone as n } from "../shared/browser-timezone.js";
4
+ import { sleep as r } from "../shared/sleep.js";
5
+ //#region src/project/project-conversation-data-source.ts
6
+ var i = "projects/", a = 5, o = 2e3, s = 5e3, c = "data: {\"action\":\"UPDATE\"}\n\n", l = (e) => e.startsWith(i) ? e : `${i}${e}`, u = (e) => {
7
+ let t = new TextEncoder().encode(c);
8
+ return new ReadableStream({ async pull(n) {
9
+ await r(s, e), e.aborted ? n.close() : n.enqueue(t);
10
+ } }, { highWaterMark: 0 });
11
+ }, d = (e, t, n, i) => {
12
+ let s = new AbortController();
13
+ return (async () => {
14
+ for (let c = 0; c < a; c++) {
15
+ if (await r(o, s.signal), s.signal.aborted) return;
16
+ try {
17
+ let { name: r } = await e(t, s.signal);
18
+ if (s.signal.aborted) return;
19
+ if (r && r !== n) {
20
+ i(r);
21
+ return;
22
+ }
23
+ } catch {
24
+ if (s.signal.aborted) return;
25
+ }
26
+ }
27
+ })(), () => s.abort();
28
+ }, f = ({ projectId: r, canEdit: i, client: a, stream: o, routes: s, viewedWriter: c, notFoundMessageKey: f }) => {
29
+ let { streamCompletion: p, stopCompletion: m } = e({
30
+ ...o,
31
+ getTimezone: n
32
+ }), h = {
33
+ ...t,
34
+ markUnread: (e) => c.drop(e),
35
+ markViewed: async (e) => {
36
+ try {
37
+ await c.enqueue(e);
38
+ } catch {}
39
+ },
40
+ shouldMarkOpenChatViewed: !0
41
+ }, g = (e, t) => a.saveProjectConversation(l(e), t);
42
+ return {
43
+ transport: {
44
+ streamCompletion: p,
45
+ stopCompletion: m,
46
+ watchConversation: async (e, t) => u(t),
47
+ attachToGeneration: (e, t) => a.attachToProjectGeneration(r, e, t),
48
+ getConversation: async (e, t) => await a.getProjectConversation(e, t),
49
+ saveConversation: async (e, t) => await g(e, t)
50
+ },
51
+ getConversation: a.getProjectConversation,
52
+ saveConversation: g,
53
+ handlersApi: {
54
+ saveConversation: ({ path: e, saveConversationBodyDto: t }) => g(e, t.conversation),
55
+ deleteConversation: ({ path: e }) => a.deleteProjectConversation(l(e))
56
+ },
57
+ watchTitle: (e, t, n) => d(a.getProjectConversation, e, t, n),
58
+ getConversationRoute: s.getConversationRoute,
59
+ getExitRoute: s.getExitRoute,
60
+ isReadOnly: () => !i,
61
+ listSync: h,
62
+ canDuplicate: !1,
63
+ notFoundMessageKey: f
64
+ };
65
+ };
66
+ //#endregion
67
+ export { f as createProjectConversationDataSource };
@@ -0,0 +1,14 @@
1
+ import { ProjectWatchEventDto } from '@epam/ai-dial-chat-api-client';
2
+ import { ProjectItem } from '@epam/ai-dial-projects';
3
+ /** The part of a projects watch event the hooks react to; `etag` is the project's new aggregate ETag, absent on a delete. */
4
+ export type ProjectWatchEvent = Pick<ProjectWatchEventDto, 'id' | 'action' | 'timestamp' | 'etag'>;
5
+ /** Returns the payload as a {@link ProjectWatchEvent}, or `undefined` when it is not one. */
6
+ export declare const parseProjectWatchEvent: (payload: unknown) => ProjectWatchEvent | undefined;
7
+ /**
8
+ * Returns the projects after one watch event: a create or update moves the
9
+ * project's `updatedAt` forward (never back), a delete removes it, and an
10
+ * event for an unlisted project is ignored. Returns `items` itself when
11
+ * nothing changed.
12
+ */
13
+ export declare const applyProjectEvent: (items: ProjectItem[], event: ProjectWatchEvent) => ProjectItem[];
14
+ //# sourceMappingURL=project-events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-events.d.ts","sourceRoot":"","sources":["../../src/project/project-events.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,6HAA6H;AAC7H,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,oBAAoB,EACpB,IAAI,GAAG,QAAQ,GAAG,WAAW,GAAG,MAAM,CACvC,CAAC;AAMF,6FAA6F;AAC7F,eAAO,MAAM,sBAAsB,GACjC,SAAS,OAAO,KACf,iBAAiB,GAAG,SAiBtB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAC5B,OAAO,WAAW,EAAE,EACpB,OAAO,iBAAiB,KACvB,WAAW,EAab,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { ProjectWatchAction as e } from "@epam/ai-dial-chat-api-client";
2
+ //#region src/project/project-events.ts
3
+ var t = new Set(Object.values(e)), n = (e) => {
4
+ if (typeof e != "object" || !e) return;
5
+ let { id: n, action: r, timestamp: i, etag: a } = e;
6
+ if (typeof n == "string" && typeof r == "string" && t.has(r) && typeof i == "number") return {
7
+ id: n,
8
+ action: r,
9
+ timestamp: i,
10
+ ...typeof a == "string" ? { etag: a } : {}
11
+ };
12
+ }, r = (t, n) => {
13
+ let r = t.findIndex((e) => e.id === n.id);
14
+ if (r < 0) return t;
15
+ if (n.action === e.Delete) return t.filter((e, t) => t !== r);
16
+ let i = t[r];
17
+ if ((i.updatedAt ?? 0) >= n.timestamp) return t;
18
+ let a = [...t];
19
+ return a[r] = {
20
+ ...i,
21
+ updatedAt: n.timestamp
22
+ }, a;
23
+ };
24
+ //#endregion
25
+ export { r as applyProjectEvent, n as parseProjectWatchEvent };
@@ -0,0 +1,32 @@
1
+ import { DisplayAttachment } from '@epam/ai-dial-chat-shared';
2
+ import { ProjectContextFile, ProjectOutputItem } from '@epam/ai-dial-projects';
3
+ /** A project file card the page opens in the canvas: its card id, name and MIME type. */
4
+ export interface ProjectFileCard {
5
+ /** Id of the card on the page; also the attachment id. */
6
+ id: string;
7
+ /** File name shown in the canvas header. */
8
+ name: string;
9
+ /** MIME type of the file. */
10
+ contentType: string;
11
+ }
12
+ /** Builds the locator a canvas content resolver fetches for a project file, from the project id and the file name. The host owns the scheme. */
13
+ export type ProjectFileLocatorBuilder = (projectId: string, name: string) => string;
14
+ /** Resolves a project file locator to the URL that downloads it, or `undefined` when the host serves no download for it. The host owns the endpoints. */
15
+ export type ProjectFileDownloadUrlResolver = (locator: string) => string | undefined;
16
+ /** Returns the canvas key of a project file, `{scope}::{id}`; the scope keeps one file name in two projects apart. */
17
+ export declare const toProjectPreviewKey: (scope: string, id: string) => string;
18
+ /** Returns the card id behind a canvas key, or `undefined` when the key belongs to another scope or is not a project key. */
19
+ export declare const fromProjectPreviewKey: (scope: string, key: string | undefined) => string | undefined;
20
+ /** Returns the card id of an output in a project preview key, `artifacts/{name}`. */
21
+ export declare const toProjectOutputCardId: (name: string) => string;
22
+ /** Returns the output name behind a card id, or `undefined` when the card is not an output. */
23
+ export declare const fromProjectOutputCardId: (cardId: string | undefined) => string | undefined;
24
+ /** Returns the attachment for a file stored in a project; its `url` is the host-built locator the canvas content resolvers fetch like any DIAL file. */
25
+ export declare const toStoredProjectFileAttachment: ({ id, name, contentType }: ProjectFileCard, projectId: string, toLocator: ProjectFileLocatorBuilder) => DisplayAttachment;
26
+ /** Returns the attachment the project view opens in the canvas for one of its outputs; its `url` is the host-built output locator. */
27
+ export declare const toProjectOutputAttachment: ({ name, contentType }: ProjectOutputItem, projectId: string, toLocator: ProjectFileLocatorBuilder) => DisplayAttachment;
28
+ /** Returns the attachment a project form opens in the canvas for one of its cards: a file added in this session is its own attachment (it carries the `File`), a stored one is built from its project, and a stored file with no project yields `undefined`. */
29
+ export declare const toProjectContextFileAttachment: (file: ProjectContextFile, projectId: string | null, toLocator: ProjectFileLocatorBuilder) => DisplayAttachment | undefined;
30
+ /** Downloads a project file attachment, a file added in this session from its own `File` and a stored one from the URL the host resolves for its locator; returns whether a download started. */
31
+ export declare const downloadProjectFileAttachment: (attachment: DisplayAttachment, resolveDownloadUrl: ProjectFileDownloadUrlResolver | undefined) => boolean;
32
+ //# sourceMappingURL=project-file-preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-file-preview.d.ts","sourceRoot":"","sources":["../../src/project/project-file-preview.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,EAMvB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACvB,MAAM,wBAAwB,CAAC;AAMhC,yFAAyF;AACzF,MAAM,WAAW,eAAe;IAC9B,0DAA0D;IAC1D,EAAE,EAAE,MAAM,CAAC;IACX,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,6BAA6B;IAC7B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,gJAAgJ;AAChJ,MAAM,MAAM,yBAAyB,GAAG,CACtC,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,KACT,MAAM,CAAC;AAEZ,yJAAyJ;AACzJ,MAAM,MAAM,8BAA8B,GAAG,CAC3C,OAAO,EAAE,MAAM,KACZ,MAAM,GAAG,SAAS,CAAC;AAExB,sHAAsH;AACtH,eAAO,MAAM,mBAAmB,GAAI,OAAO,MAAM,EAAE,IAAI,MAAM,KAAG,MACvB,CAAC;AAE1C,6HAA6H;AAC7H,eAAO,MAAM,qBAAqB,GAChC,OAAO,MAAM,EACb,KAAK,MAAM,GAAG,SAAS,KACtB,MAAM,GAAG,SAGX,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,qBAAqB,GAAI,MAAM,MAAM,KAAG,MAClB,CAAC;AAEpC,+FAA+F;AAC/F,eAAO,MAAM,uBAAuB,GAClC,QAAQ,MAAM,GAAG,SAAS,KACzB,MAAM,GAAG,SAGG,CAAC;AAEhB,wJAAwJ;AACxJ,eAAO,MAAM,6BAA6B,GACxC,2BAA2B,eAAe,EAC1C,WAAW,MAAM,EACjB,WAAW,yBAAyB,KACnC,iBAOD,CAAC;AAEH,sIAAsI;AACtI,eAAO,MAAM,yBAAyB,GACpC,uBAAuB,iBAAiB,EACxC,WAAW,MAAM,EACjB,WAAW,yBAAyB,KACnC,iBAKA,CAAC;AAEJ,gQAAgQ;AAChQ,eAAO,MAAM,8BAA8B,GACzC,MAAM,kBAAkB,EACxB,WAAW,MAAM,GAAG,IAAI,EACxB,WAAW,yBAAyB,KACnC,iBAAiB,GAAG,SAKtB,CAAC;AAEF,iMAAiM;AACjM,eAAO,MAAM,6BAA6B,GACxC,YAAY,iBAAiB,EAC7B,oBAAoB,8BAA8B,GAAG,SAAS,KAC7D,OAeF,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { RequestStatus as e, ensureDownloadFilename as t, getAttachmentTypeFromMime as n, triggerAnchorDownload as r, triggerBlobDownload as i } from "@epam/ai-dial-chat-shared";
2
+ import { isStoredContextFile as a } from "@epam/ai-dial-projects";
3
+ //#region src/project/project-file-preview.ts
4
+ var o = "::", s = "artifacts/", c = (e, t) => `${e}${o}${t}`, l = (e, t) => {
5
+ let n = `${e}${o}`;
6
+ return t?.startsWith(n) ? t.slice(n.length) : void 0;
7
+ }, u = (e) => `${s}${e}`, d = (e) => e?.startsWith(s) ? e.slice(10) : void 0, f = ({ id: t, name: r, contentType: i }, a, o) => ({
8
+ id: t,
9
+ name: r,
10
+ contentType: i,
11
+ type: n(i),
12
+ status: e.Idle,
13
+ url: o(a, r)
14
+ }), p = ({ name: e, contentType: t }, n, r) => f({
15
+ id: e,
16
+ name: e,
17
+ contentType: t
18
+ }, n, r), m = (e, t, n) => a(e) ? t == null ? void 0 : f(e, t, n) : e, h = (e, n) => {
19
+ let { name: a, url: o, contentType: s } = e, c = t(a, o, s);
20
+ if ("file" in e && e.file instanceof Blob) return i(e.file, c), !0;
21
+ let l = o == null ? void 0 : n?.(o);
22
+ return l != null && (r(l, c), !0);
23
+ };
24
+ //#endregion
25
+ export { h as downloadProjectFileAttachment, d as fromProjectOutputCardId, l as fromProjectPreviewKey, m as toProjectContextFileAttachment, p as toProjectOutputAttachment, u as toProjectOutputCardId, c as toProjectPreviewKey, f as toStoredProjectFileAttachment };
@@ -0,0 +1,23 @@
1
+ /** Why the BFF rejected a project create or edit, as the form explains it. */
2
+ export declare enum ProjectFormErrorReason {
3
+ NameTaken = "name-taken",
4
+ NameInvalid = "name-invalid",
5
+ TooManyFiles = "too-many-files",
6
+ FilesRejected = "files-rejected",
7
+ UnknownFile = "unknown-file"
8
+ }
9
+ /** The project form field a rejection belongs to. */
10
+ export declare enum ProjectFormErrorField {
11
+ Name = "name",
12
+ Context = "context"
13
+ }
14
+ /** Where a rejected create or edit request's message goes on the project form. */
15
+ export interface ProjectFormError {
16
+ /** Field the message is shown under. */
17
+ field: ProjectFormErrorField;
18
+ /** Why the request was rejected; the host resolves the message. */
19
+ reason: ProjectFormErrorReason;
20
+ }
21
+ /** Returns the form field and reason a `ProjectCreateErrorCode` maps to, or `null` when the rejection belongs in a toast. */
22
+ export declare const getProjectFormError: (code: string | undefined) => ProjectFormError | null;
23
+ //# sourceMappingURL=project-form-errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-form-errors.d.ts","sourceRoot":"","sources":["../../src/project/project-form-errors.ts"],"names":[],"mappings":"AAEA,8EAA8E;AAC9E,oBAAY,sBAAsB;IAChC,SAAS,eAAe;IACxB,WAAW,iBAAiB;IAC5B,YAAY,mBAAmB;IAC/B,aAAa,mBAAmB;IAChC,WAAW,iBAAiB;CAC7B;AAED,qDAAqD;AACrD,oBAAY,qBAAqB;IAC/B,IAAI,SAAS;IACb,OAAO,YAAY;CACpB;AAED,kFAAkF;AAClF,MAAM,WAAW,gBAAgB;IAC/B,wCAAwC;IACxC,KAAK,EAAE,qBAAqB,CAAC;IAC7B,mEAAmE;IACnE,MAAM,EAAE,sBAAsB,CAAC;CAChC;AAyCD,6HAA6H;AAC7H,eAAO,MAAM,mBAAmB,GAC9B,MAAM,MAAM,GAAG,SAAS,KACvB,gBAAgB,GAAG,IACmC,CAAC"}
@@ -0,0 +1,46 @@
1
+ import { ProjectCreateErrorCode as e } from "@epam/ai-dial-chat-api-client";
2
+ //#region src/project/project-form-errors.ts
3
+ var t = /* @__PURE__ */ function(e) {
4
+ return e.NameTaken = "name-taken", e.NameInvalid = "name-invalid", e.TooManyFiles = "too-many-files", e.FilesRejected = "files-rejected", e.UnknownFile = "unknown-file", e;
5
+ }({}), n = /* @__PURE__ */ function(e) {
6
+ return e.Name = "name", e.Context = "context", e;
7
+ }({}), r = {
8
+ [e.NameTaken]: {
9
+ field: "name",
10
+ reason: "name-taken"
11
+ },
12
+ [e.InvalidName]: {
13
+ field: "name",
14
+ reason: "name-invalid"
15
+ },
16
+ [e.TooManyFiles]: {
17
+ field: "context",
18
+ reason: "too-many-files"
19
+ },
20
+ [e.UnsupportedFileType]: {
21
+ field: "context",
22
+ reason: "files-rejected"
23
+ },
24
+ [e.FileTooLarge]: {
25
+ field: "context",
26
+ reason: "files-rejected"
27
+ },
28
+ [e.CapacityExceeded]: {
29
+ field: "context",
30
+ reason: "files-rejected"
31
+ },
32
+ [e.InvalidFileName]: {
33
+ field: "context",
34
+ reason: "files-rejected"
35
+ },
36
+ [e.DuplicateFileName]: {
37
+ field: "context",
38
+ reason: "files-rejected"
39
+ },
40
+ [e.UnknownFile]: {
41
+ field: "context",
42
+ reason: "unknown-file"
43
+ }
44
+ }, i = (e) => (e == null ? void 0 : r[e]) ?? null;
45
+ //#endregion
46
+ export { n as ProjectFormErrorField, t as ProjectFormErrorReason, i as getProjectFormError };
@@ -0,0 +1,17 @@
1
+ /** Defaults matching the BFF's `PROJECT_CONTEXT_*` defaults, used before the client config loads. */
2
+ export declare const DEFAULT_PROJECT_CONTEXT_FILE_MAX_BYTES = 1048576;
3
+ export declare const DEFAULT_PROJECT_CONTEXT_TOTAL_MAX_BYTES = 10485760;
4
+ export declare const DEFAULT_PROJECT_CONTEXT_ALLOWED_EXTENSIONS: string[];
5
+ /** Returns `value` when it is a positive finite number, otherwise `fallback`. */
6
+ export declare const resolveByteLimit: (value: unknown, fallback: number) => number;
7
+ /**
8
+ * Returns `value` lower-cased when it is a non-empty array of non-empty
9
+ * strings, otherwise `fallback`. An older BFF omits the field entirely.
10
+ */
11
+ export declare const resolveExtensionList: (value: unknown, fallback: string[]) => string[];
12
+ /**
13
+ * Returns every MIME type `MIME_TYPE_EXT_MAP` maps to one of `extensions`,
14
+ * for the file manager's MIME-based `allowedTypes` filter.
15
+ */
16
+ export declare const getMimeTypesForExtensions: (extensions: string[], mimeTypeExtensions: Record<string, string>) => string[];
17
+ //# sourceMappingURL=project-limits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-limits.d.ts","sourceRoot":"","sources":["../../src/project/project-limits.ts"],"names":[],"mappings":"AAAA,qGAAqG;AACrG,eAAO,MAAM,sCAAsC,UAAY,CAAC;AAChE,eAAO,MAAM,uCAAuC,WAAa,CAAC;AAClE,eAAO,MAAM,0CAA0C,UAItD,CAAC;AAEF,iFAAiF;AACjF,eAAO,MAAM,gBAAgB,GAAI,OAAO,OAAO,EAAE,UAAU,MAAM,KAAG,MAGtD,CAAC;AAEf;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAC/B,OAAO,OAAO,EACd,UAAU,MAAM,EAAE,KACjB,MAAM,EAKK,CAAC;AAEf;;;GAGG;AACH,eAAO,MAAM,yBAAyB,GACpC,YAAY,MAAM,EAAE,EACpB,oBAAoB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KACzC,MAAM,EAOR,CAAC"}
@@ -0,0 +1,11 @@
1
+ //#region src/project/project-limits.ts
2
+ var e = 1048576, t = 10485760, n = [
3
+ "csv",
4
+ "pdf",
5
+ "xlsx"
6
+ ], r = (e, t) => typeof e == "number" && Number.isFinite(e) && e > 0 ? e : t, i = (e, t) => Array.isArray(e) && e.length > 0 && e.every((e) => typeof e == "string" && e.length > 0) ? e.map((e) => e.toLowerCase()) : t, a = (e, t) => {
7
+ let n = new Set(e.map((e) => e.toLowerCase()));
8
+ return Object.entries(t).filter(([, e]) => n.has(e)).map(([e]) => e);
9
+ };
10
+ //#endregion
11
+ export { n as DEFAULT_PROJECT_CONTEXT_ALLOWED_EXTENSIONS, e as DEFAULT_PROJECT_CONTEXT_FILE_MAX_BYTES, t as DEFAULT_PROJECT_CONTEXT_TOTAL_MAX_BYTES, a as getMimeTypesForExtensions, r as resolveByteLimit, i as resolveExtensionList };
@@ -0,0 +1,16 @@
1
+ import { ProjectSource as ProjectSourceDto, ProjectArtifactItemDto, ProjectDetailsDto, ProjectDto } from '@epam/ai-dial-chat-api-client';
2
+ import { FilterTab } from '@epam/ai-dial-chat-shared';
3
+ import { ProjectItem, ProjectOutputItem, ProjectSource, ProjectViewModel, StoredProjectContextFile } from '@epam/ai-dial-projects';
4
+ /** Maps a BFF project source onto the Projects lib's source. */
5
+ export declare const mapProjectSource: (source: ProjectSourceDto) => ProjectSource;
6
+ /** Maps a BFF project source onto the conversation list's Origin filter tab. */
7
+ export declare const mapProjectSourceToFilterTab: (source: ProjectSourceDto) => FilterTab;
8
+ /** Maps a BFF project to the card item the Projects lib renders; the sort date falls back to the creation time. */
9
+ export declare const mapProjectDtoToItem: (project: ProjectDto) => ProjectItem;
10
+ /** Maps a project's BFF details to the content the project view renders; content types come from the file names. */
11
+ export declare const mapProjectDetailsToViewModel: (project: ProjectDetailsDto) => ProjectViewModel;
12
+ /** Maps a project's stored context files to the cards the project form renders; ids are `stored:{name}`. */
13
+ export declare const mapStoredContextFiles: (project: ProjectDetailsDto) => StoredProjectContextFile[];
14
+ /** Maps a project's BFF artifact listing to the output cards the project view renders, keeping its order; content types come from the file names. */
15
+ export declare const mapProjectArtifactsToOutputs: (items: ProjectArtifactItemDto[]) => ProjectOutputItem[];
16
+ //# sourceMappingURL=project-mapping.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-mapping.d.ts","sourceRoot":"","sources":["../../src/project/project-mapping.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,IAAI,gBAAgB,EACjC,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,UAAU,EAChB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,SAAS,EAIV,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,aAAa,EACb,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC9B,MAAM,wBAAwB,CAAC;AAchC,gEAAgE;AAChE,eAAO,MAAM,gBAAgB,GAAI,QAAQ,gBAAgB,KAAG,aACnC,CAAC;AAQ1B,gFAAgF;AAChF,eAAO,MAAM,2BAA2B,GACtC,QAAQ,gBAAgB,KACvB,SAAwC,CAAC;AAE5C,mHAAmH;AACnH,eAAO,MAAM,mBAAmB,GAAI,SAAS,UAAU,KAAG,WAMxD,CAAC;AAEH,oHAAoH;AACpH,eAAO,MAAM,4BAA4B,GACvC,SAAS,iBAAiB,KACzB,gBAQD,CAAC;AAEH,4GAA4G;AAC5G,eAAO,MAAM,qBAAqB,GAChC,SAAS,iBAAiB,KACzB,wBAAwB,EAYvB,CAAC;AAEL,qJAAqJ;AACrJ,eAAO,MAAM,4BAA4B,GACvC,OAAO,sBAAsB,EAAE,KAC9B,iBAAiB,EAIf,CAAC"}