@epam/ai-dial-chat-hooks 1.3.0-dev.5 → 1.3.0-dev.55

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 (422) hide show
  1. package/api-error/api-error.d.ts +30 -0
  2. package/api-error/api-error.d.ts.map +1 -0
  3. package/api-transport/create-csrf-middleware.d.ts +15 -0
  4. package/api-transport/create-csrf-middleware.d.ts.map +1 -0
  5. package/api-transport/create-unauthorized-middleware.d.ts +40 -0
  6. package/api-transport/create-unauthorized-middleware.d.ts.map +1 -0
  7. package/attachment/useAttachmentAction/useAttachmentAction.d.ts +32 -0
  8. package/attachment/useAttachmentAction/useAttachmentAction.d.ts.map +1 -0
  9. package/attachment/useAttachmentValidation/useAttachmentValidation.d.ts +50 -0
  10. package/attachment/useAttachmentValidation/useAttachmentValidation.d.ts.map +1 -0
  11. package/attachments.d.ts +2 -94
  12. package/catalog/catalog-derivations.d.ts +27 -0
  13. package/catalog/catalog-derivations.d.ts.map +1 -0
  14. package/catalog/catalog-primary-action.d.ts +47 -0
  15. package/catalog/catalog-primary-action.d.ts.map +1 -0
  16. package/catalog/create-publish-api.d.ts +32 -0
  17. package/catalog/create-publish-api.d.ts.map +1 -0
  18. package/catalog/deployment-endpoint-url.d.ts +19 -0
  19. package/catalog/deployment-endpoint-url.d.ts.map +1 -0
  20. package/catalog/deployment-id.d.ts +42 -0
  21. package/catalog/deployment-id.d.ts.map +1 -0
  22. package/catalog/entity-details.d.ts +146 -0
  23. package/catalog/entity-details.d.ts.map +1 -0
  24. package/catalog/map-deployment-limits-to-catalog.d.ts +34 -0
  25. package/catalog/map-deployment-limits-to-catalog.d.ts.map +1 -0
  26. package/catalog/map-deployment-limits-to-input.d.ts +28 -0
  27. package/catalog/map-deployment-limits-to-input.d.ts.map +1 -0
  28. package/catalog/map-deployment-to-catalog-item.d.ts +61 -0
  29. package/catalog/map-deployment-to-catalog-item.d.ts.map +1 -0
  30. package/catalog/map-entity-details-to-catalog.d.ts +81 -0
  31. package/catalog/map-entity-details-to-catalog.d.ts.map +1 -0
  32. package/catalog/map-prompt-to-catalog-item.d.ts +43 -0
  33. package/catalog/map-prompt-to-catalog-item.d.ts.map +1 -0
  34. package/catalog/map-skill-to-catalog-item.d.ts +113 -0
  35. package/catalog/map-skill-to-catalog-item.d.ts.map +1 -0
  36. package/catalog/mcp-endpoint-url.d.ts +18 -0
  37. package/catalog/mcp-endpoint-url.d.ts.map +1 -0
  38. package/catalog/publish.d.ts +35 -0
  39. package/catalog/publish.d.ts.map +1 -0
  40. package/catalog/useApplicationCredentials/useApplicationCredentials.d.ts +19 -0
  41. package/catalog/useApplicationCredentials/useApplicationCredentials.d.ts.map +1 -0
  42. package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts +100 -0
  43. package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts.map +1 -0
  44. package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.js +139 -122
  45. package/catalog/useCatalogItemDetails.d.ts +70 -0
  46. package/catalog/useCatalogItemDetails.d.ts.map +1 -0
  47. package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.d.ts +76 -0
  48. package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.d.ts.map +1 -0
  49. package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.d.ts +37 -0
  50. package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.d.ts.map +1 -0
  51. package/catalog/usePublishFolders/usePublishFolders.d.ts +73 -0
  52. package/catalog/usePublishFolders/usePublishFolders.d.ts.map +1 -0
  53. package/catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.d.ts +54 -0
  54. package/catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.d.ts.map +1 -0
  55. package/catalog/useSkillItemDetails.d.ts +64 -0
  56. package/catalog/useSkillItemDetails.d.ts.map +1 -0
  57. package/catalog.d.ts +2 -1433
  58. package/conversation/announcement-message.d.ts +61 -0
  59. package/conversation/announcement-message.d.ts.map +1 -0
  60. package/conversation/conversation-transfer/async.d.ts +10 -0
  61. package/conversation/conversation-transfer/async.d.ts.map +1 -0
  62. package/conversation/conversation-transfer/attachment-refs.d.ts +42 -0
  63. package/conversation/conversation-transfer/attachment-refs.d.ts.map +1 -0
  64. package/conversation/conversation-transfer/build-upload-path.d.ts +42 -0
  65. package/conversation/conversation-transfer/build-upload-path.d.ts.map +1 -0
  66. package/conversation/conversation-transfer/date.d.ts +5 -0
  67. package/conversation/conversation-transfer/date.d.ts.map +1 -0
  68. package/conversation/conversation-transfer/dial-file-resolve.d.ts +10 -0
  69. package/conversation/conversation-transfer/dial-file-resolve.d.ts.map +1 -0
  70. package/conversation/conversation-transfer/export-conversation.d.ts +10 -0
  71. package/conversation/conversation-transfer/export-conversation.d.ts.map +1 -0
  72. package/conversation/conversation-transfer/import-conversation.d.ts +106 -0
  73. package/conversation/conversation-transfer/import-conversation.d.ts.map +1 -0
  74. package/conversation/conversation-transfer/progress.d.ts +60 -0
  75. package/conversation/conversation-transfer/progress.d.ts.map +1 -0
  76. package/conversation/conversation-transfer/queue.d.ts +54 -0
  77. package/conversation/conversation-transfer/queue.d.ts.map +1 -0
  78. package/conversation/conversation-transfer/types.d.ts +36 -0
  79. package/conversation/conversation-transfer/types.d.ts.map +1 -0
  80. package/conversation/conversation-transfer/zip-export.d.ts +31 -0
  81. package/conversation/conversation-transfer/zip-export.d.ts.map +1 -0
  82. package/conversation/conversation-transfer/zip-import.d.ts +17 -0
  83. package/conversation/conversation-transfer/zip-import.d.ts.map +1 -0
  84. package/conversation/create-chat-stream-api.d.ts +92 -0
  85. package/conversation/create-chat-stream-api.d.ts.map +1 -0
  86. package/conversation/deriveConversationRowActionState/deriveConversationRowActionState.d.ts +39 -0
  87. package/conversation/deriveConversationRowActionState/deriveConversationRowActionState.d.ts.map +1 -0
  88. package/conversation/display-name-watch.d.ts +4 -0
  89. package/conversation/display-name-watch.d.ts.map +1 -0
  90. package/conversation/footer-message.d.ts +10 -0
  91. package/conversation/footer-message.d.ts.map +1 -0
  92. package/conversation/get-model-id-from-conversation-id.d.ts +38 -0
  93. package/conversation/get-model-id-from-conversation-id.d.ts.map +1 -0
  94. package/conversation/greeting.d.ts +18 -0
  95. package/conversation/greeting.d.ts.map +1 -0
  96. package/conversation/message-factory.d.ts +7 -0
  97. package/conversation/message-factory.d.ts.map +1 -0
  98. package/conversation/message-utils.d.ts +67 -0
  99. package/conversation/message-utils.d.ts.map +1 -0
  100. package/conversation/overlay-messages.d.ts +5 -0
  101. package/conversation/overlay-messages.d.ts.map +1 -0
  102. package/conversation/quick-app-conversation-starters.d.ts +10 -0
  103. package/conversation/quick-app-conversation-starters.d.ts.map +1 -0
  104. package/conversation/stage.d.ts +77 -0
  105. package/conversation/stage.d.ts.map +1 -0
  106. package/conversation/starter-option.d.ts +21 -0
  107. package/conversation/starter-option.d.ts.map +1 -0
  108. package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts +35 -0
  109. package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts.map +1 -0
  110. package/conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.d.ts +46 -0
  111. package/conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.d.ts.map +1 -0
  112. package/conversation/useAttachmentUpload/useAttachmentUpload.d.ts +27 -0
  113. package/conversation/useAttachmentUpload/useAttachmentUpload.d.ts.map +1 -0
  114. package/conversation/useConversationExport/useConversationExport.d.ts +72 -0
  115. package/conversation/useConversationExport/useConversationExport.d.ts.map +1 -0
  116. package/conversation/useConversationHandlers/attachment-to-dto.d.ts +7 -0
  117. package/conversation/useConversationHandlers/attachment-to-dto.d.ts.map +1 -0
  118. package/conversation/useConversationHandlers/message-factory.d.ts +9 -0
  119. package/conversation/useConversationHandlers/message-factory.d.ts.map +1 -0
  120. package/conversation/useConversationHandlers/message-utils.d.ts +38 -0
  121. package/conversation/useConversationHandlers/message-utils.d.ts.map +1 -0
  122. package/conversation/useConversationHandlers/starter-option.d.ts +24 -0
  123. package/conversation/useConversationHandlers/starter-option.d.ts.map +1 -0
  124. package/conversation/useConversationHandlers/useConversationHandlers.d.ts +66 -0
  125. package/conversation/useConversationHandlers/useConversationHandlers.d.ts.map +1 -0
  126. package/conversation/useConversationImport/useConversationImport.d.ts +54 -0
  127. package/conversation/useConversationImport/useConversationImport.d.ts.map +1 -0
  128. package/conversation/useConversationLookupMaps/useConversationLookupMaps.d.ts +24 -0
  129. package/conversation/useConversationLookupMaps/useConversationLookupMaps.d.ts.map +1 -0
  130. package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts +64 -0
  131. package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts.map +1 -0
  132. package/conversation/useConversationScroll/useConversationScroll.d.ts +46 -0
  133. package/conversation/useConversationScroll/useConversationScroll.d.ts.map +1 -0
  134. package/conversation/useConversationStream/apply-chunk.d.ts +35 -0
  135. package/conversation/useConversationStream/apply-chunk.d.ts.map +1 -0
  136. package/conversation/useConversationStream/buffered-generation.d.ts +15 -0
  137. package/conversation/useConversationStream/buffered-generation.d.ts.map +1 -0
  138. package/conversation/useConversationStream/conversation-path.d.ts +7 -0
  139. package/conversation/useConversationStream/conversation-path.d.ts.map +1 -0
  140. package/conversation/useConversationStream/frame-scheduler.d.ts +14 -0
  141. package/conversation/useConversationStream/frame-scheduler.d.ts.map +1 -0
  142. package/conversation/useConversationStream/generation-resume.d.ts +85 -0
  143. package/conversation/useConversationStream/generation-resume.d.ts.map +1 -0
  144. package/conversation/useConversationStream/useConversationStream.d.ts +145 -0
  145. package/conversation/useConversationStream/useConversationStream.d.ts.map +1 -0
  146. package/conversation/useImportFilePicker/useImportFilePicker.d.ts +32 -0
  147. package/conversation/useImportFilePicker/useImportFilePicker.d.ts.map +1 -0
  148. package/conversation/useMessageSelectionReply/useMessageSelectionReply.d.ts +42 -0
  149. package/conversation/useMessageSelectionReply/useMessageSelectionReply.d.ts.map +1 -0
  150. package/conversation/useTranscribeAudio/audio-transcription-error.d.ts +19 -0
  151. package/conversation/useTranscribeAudio/audio-transcription-error.d.ts.map +1 -0
  152. package/conversation/useTranscribeAudio/transcription-retry.d.ts +2 -0
  153. package/conversation/useTranscribeAudio/transcription-retry.d.ts.map +1 -0
  154. package/conversation/useTranscribeAudio/useTranscribeAudio.d.ts +43 -0
  155. package/conversation/useTranscribeAudio/useTranscribeAudio.d.ts.map +1 -0
  156. package/conversation-overlay.d.ts +2 -7
  157. package/conversation-sources/useConversationSources/useConversationSources.d.ts +20 -0
  158. package/conversation-sources/useConversationSources/useConversationSources.d.ts.map +1 -0
  159. package/conversation-sources.d.ts +2 -25
  160. package/conversation-transfer.d.ts +2 -190
  161. package/conversation.d.ts +2 -1372
  162. package/entry-points/attachments.d.ts +3 -0
  163. package/entry-points/attachments.d.ts.map +1 -0
  164. package/entry-points/catalog.d.ts +25 -0
  165. package/entry-points/catalog.d.ts.map +1 -0
  166. package/entry-points/conversation-overlay.d.ts +2 -0
  167. package/entry-points/conversation-overlay.d.ts.map +1 -0
  168. package/entry-points/conversation-sources.d.ts +2 -0
  169. package/entry-points/conversation-sources.d.ts.map +1 -0
  170. package/entry-points/conversation-transfer.d.ts +7 -0
  171. package/entry-points/conversation-transfer.d.ts.map +1 -0
  172. package/entry-points/conversation.d.ts +33 -0
  173. package/entry-points/conversation.d.ts.map +1 -0
  174. package/entry-points/file-manager-canvas.d.ts +2 -0
  175. package/entry-points/file-manager-canvas.d.ts.map +1 -0
  176. package/entry-points/file-manager.d.ts +31 -0
  177. package/entry-points/file-manager.d.ts.map +1 -0
  178. package/entry-points/mcp-apps.d.ts +6 -0
  179. package/entry-points/mcp-apps.d.ts.map +1 -0
  180. package/entry-points/oauth.d.ts +10 -0
  181. package/entry-points/oauth.d.ts.map +1 -0
  182. package/entry-points/scheduled-tasks.d.ts +8 -0
  183. package/entry-points/scheduled-tasks.d.ts.map +1 -0
  184. package/entry-points/scroll-anchoring.d.ts +2 -0
  185. package/entry-points/scroll-anchoring.d.ts.map +1 -0
  186. package/entry-points/sharing.d.ts +3 -0
  187. package/entry-points/sharing.d.ts.map +1 -0
  188. package/entry-points/skill-editor.d.ts +9 -0
  189. package/entry-points/skill-editor.d.ts.map +1 -0
  190. package/entry-points/skills-state.d.ts +2 -0
  191. package/entry-points/skills-state.d.ts.map +1 -0
  192. package/entry-points/source-content.d.ts +2 -0
  193. package/entry-points/source-content.d.ts.map +1 -0
  194. package/entry-points/usage-limits.d.ts +8 -0
  195. package/entry-points/usage-limits.d.ts.map +1 -0
  196. package/entry-points/usage.d.ts +3 -0
  197. package/entry-points/usage.d.ts.map +1 -0
  198. package/entry-points/utils.d.ts +17 -0
  199. package/entry-points/utils.d.ts.map +1 -0
  200. package/entry-points/viewport-layout.d.ts +4 -0
  201. package/entry-points/viewport-layout.d.ts.map +1 -0
  202. package/file-manager-canvas.d.ts +2 -418
  203. package/file-manager.d.ts +2 -1237
  204. package/file-manager.js +25 -25
  205. package/files/annotation.d.ts +10 -0
  206. package/files/annotation.d.ts.map +1 -0
  207. package/files/attachment-canvas.d.ts +123 -0
  208. package/files/attachment-canvas.d.ts.map +1 -0
  209. package/files/attachment-dto-to-display.d.ts +10 -0
  210. package/files/attachment-dto-to-display.d.ts.map +1 -0
  211. package/files/attachment-types.d.ts +21 -0
  212. package/files/attachment-types.d.ts.map +1 -0
  213. package/files/create-files-api.d.ts +52 -0
  214. package/files/create-files-api.d.ts.map +1 -0
  215. package/files/create-upload-file-with-progress.d.ts +24 -0
  216. package/files/create-upload-file-with-progress.d.ts.map +1 -0
  217. package/files/dial-file-manager-copy-move.util.d.ts +15 -0
  218. package/files/dial-file-manager-copy-move.util.d.ts.map +1 -0
  219. package/files/dial-file-manager-mapping.util.d.ts +35 -0
  220. package/files/dial-file-manager-mapping.util.d.ts.map +1 -0
  221. package/files/dial-file-manager-path.util.d.ts +48 -0
  222. package/files/dial-file-manager-path.util.d.ts.map +1 -0
  223. package/files/dial-file-manager.model.d.ts +36 -0
  224. package/files/dial-file-manager.model.d.ts.map +1 -0
  225. package/files/dial-file-manager.model.js +7 -3
  226. package/files/dial-file-manager.types.d.ts +327 -0
  227. package/files/dial-file-manager.types.d.ts.map +1 -0
  228. package/files/dial-file-manager.types.js +1 -1
  229. package/files/dial-file-to-attachment.d.ts +26 -0
  230. package/files/dial-file-to-attachment.d.ts.map +1 -0
  231. package/files/dial-file.d.ts +17 -0
  232. package/files/dial-file.d.ts.map +1 -0
  233. package/files/dial-files-api.d.ts +71 -0
  234. package/files/dial-files-api.d.ts.map +1 -0
  235. package/files/download-destination.d.ts +31 -0
  236. package/files/download-destination.d.ts.map +1 -0
  237. package/files/file-manager-variant.d.ts +3 -0
  238. package/files/file-manager-variant.d.ts.map +1 -0
  239. package/files/file-name.d.ts +19 -0
  240. package/files/file-name.d.ts.map +1 -0
  241. package/files/prepare-download-destination.d.ts +8 -0
  242. package/files/prepare-download-destination.d.ts.map +1 -0
  243. package/files/resolve-dial-file-api-path.d.ts +12 -0
  244. package/files/resolve-dial-file-api-path.d.ts.map +1 -0
  245. package/files/source-content.d.ts +28 -0
  246. package/files/source-content.d.ts.map +1 -0
  247. package/files/useDialFileListing/useDialFileListing.d.ts +82 -0
  248. package/files/useDialFileListing/useDialFileListing.d.ts.map +1 -0
  249. package/files/useDialFileListing/useDialFileListing.js +24 -14
  250. package/files/useDialFileManager/useDialFileManager.d.ts +16 -0
  251. package/files/useDialFileManager/useDialFileManager.d.ts.map +1 -0
  252. package/files/useDialFileManager/useDialFileManager.js +148 -140
  253. package/files/useDialFileManagerSections/useDialFileManagerSections.d.ts +25 -0
  254. package/files/useDialFileManagerSections/useDialFileManagerSections.d.ts.map +1 -0
  255. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.d.ts +15 -0
  256. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.d.ts.map +1 -0
  257. package/files/useDialFileMetadata/useDialFileMetadata.d.ts +28 -0
  258. package/files/useDialFileMetadata/useDialFileMetadata.d.ts.map +1 -0
  259. package/files/useDialFileMutations/useDialFileMutations.d.ts +68 -0
  260. package/files/useDialFileMutations/useDialFileMutations.d.ts.map +1 -0
  261. package/files/useDialFileMutations/useDialFileMutations.js +206 -204
  262. package/files/useDialFileSharing/useDialFileSharing.d.ts +34 -0
  263. package/files/useDialFileSharing/useDialFileSharing.d.ts.map +1 -0
  264. package/files/useDialFileSharing/useDialFileSharing.js +45 -39
  265. package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts +47 -0
  266. package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts.map +1 -0
  267. package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +8 -4
  268. package/files/useFileAttachmentPicker/useFileAttachmentPicker.d.ts +59 -0
  269. package/files/useFileAttachmentPicker/useFileAttachmentPicker.d.ts.map +1 -0
  270. package/index.d.ts +159 -6974
  271. package/index.d.ts.map +1 -0
  272. package/index.js +124 -117
  273. package/mcp-apps/mcp-apps-api-client.d.ts +28 -0
  274. package/mcp-apps/mcp-apps-api-client.d.ts.map +1 -0
  275. package/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.d.ts +14 -0
  276. package/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.d.ts.map +1 -0
  277. package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.d.ts +29 -0
  278. package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.d.ts.map +1 -0
  279. package/mcp-apps/useMcpAppTools/useMcpAppTools.d.ts +22 -0
  280. package/mcp-apps/useMcpAppTools/useMcpAppTools.d.ts.map +1 -0
  281. package/mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.d.ts +36 -0
  282. package/mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.d.ts.map +1 -0
  283. package/mcp-apps.d.ts +2 -256
  284. package/oauth/authorize-url.d.ts +16 -0
  285. package/oauth/authorize-url.d.ts.map +1 -0
  286. package/oauth/handshake.d.ts +30 -0
  287. package/oauth/handshake.d.ts.map +1 -0
  288. package/oauth/models.d.ts +81 -0
  289. package/oauth/models.d.ts.map +1 -0
  290. package/oauth/popup.d.ts +30 -0
  291. package/oauth/popup.d.ts.map +1 -0
  292. package/oauth/toolset-id.d.ts +53 -0
  293. package/oauth/toolset-id.d.ts.map +1 -0
  294. package/oauth/types.d.ts +84 -0
  295. package/oauth/types.d.ts.map +1 -0
  296. package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.d.ts +54 -0
  297. package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.d.ts.map +1 -0
  298. package/oauth/useToolsetLogin/useToolsetLogin.d.ts +79 -0
  299. package/oauth/useToolsetLogin/useToolsetLogin.d.ts.map +1 -0
  300. package/oauth.d.ts +2 -472
  301. package/package.json +26 -17
  302. package/prompt/export-prompt.d.ts +31 -0
  303. package/prompt/export-prompt.d.ts.map +1 -0
  304. package/prompt/prompt-resource.d.ts +30 -0
  305. package/prompt/prompt-resource.d.ts.map +1 -0
  306. package/prompt/prompt.d.ts +34 -0
  307. package/prompt/prompt.d.ts.map +1 -0
  308. package/prompt/usePromptsState/usePromptsState.d.ts +34 -0
  309. package/prompt/usePromptsState/usePromptsState.d.ts.map +1 -0
  310. package/scheduled-task/scheduled-task-description.d.ts +38 -0
  311. package/scheduled-task/scheduled-task-description.d.ts.map +1 -0
  312. package/scheduled-task/scheduled-task-mapping.d.ts +19 -0
  313. package/scheduled-task/scheduled-task-mapping.d.ts.map +1 -0
  314. package/scheduled-task/scheduled-task-preparation.d.ts +19 -0
  315. package/scheduled-task/scheduled-task-preparation.d.ts.map +1 -0
  316. package/scheduled-task/scheduled-task-trigger.d.ts +26 -0
  317. package/scheduled-task/scheduled-task-trigger.d.ts.map +1 -0
  318. package/scheduled-task/scheduled-tasks-api-client.d.ts +67 -0
  319. package/scheduled-task/scheduled-tasks-api-client.d.ts.map +1 -0
  320. package/scheduled-task/use-scheduled-task-runs.d.ts +40 -0
  321. package/scheduled-task/use-scheduled-task-runs.d.ts.map +1 -0
  322. package/scheduled-task/use-scheduled-task-runs.js +67 -67
  323. package/scheduled-task/use-scheduled-tasks.d.ts +28 -0
  324. package/scheduled-task/use-scheduled-tasks.d.ts.map +1 -0
  325. package/scheduled-tasks.d.ts +2 -250
  326. package/scroll-anchoring.d.ts +2 -50
  327. package/shared/application-schema.d.ts +18 -0
  328. package/shared/application-schema.d.ts.map +1 -0
  329. package/shared/application-schema.js +2 -2
  330. package/shared/browser-timezone.d.ts +7 -0
  331. package/shared/browser-timezone.d.ts.map +1 -0
  332. package/shared/cron-day-of-month.d.ts +21 -0
  333. package/shared/cron-day-of-month.d.ts.map +1 -0
  334. package/shared/cron-weekday.d.ts +5 -0
  335. package/shared/cron-weekday.d.ts.map +1 -0
  336. package/shared/custom-apps.d.ts +7 -0
  337. package/shared/custom-apps.d.ts.map +1 -0
  338. package/shared/external-services.d.ts +16 -0
  339. package/shared/external-services.d.ts.map +1 -0
  340. package/shared/formatting.d.ts +5 -0
  341. package/shared/formatting.d.ts.map +1 -0
  342. package/shared/locale.d.ts +45 -0
  343. package/shared/locale.d.ts.map +1 -0
  344. package/shared/string-utils.d.ts +11 -0
  345. package/shared/string-utils.d.ts.map +1 -0
  346. package/shared/toolset-login-events.d.ts +15 -0
  347. package/shared/toolset-login-events.d.ts.map +1 -0
  348. package/sharing.d.ts +2 -65
  349. package/skill/skill-archive.d.ts +7 -0
  350. package/skill/skill-archive.d.ts.map +1 -0
  351. package/skill/skill-file-batch-validation.d.ts +70 -0
  352. package/skill/skill-file-batch-validation.d.ts.map +1 -0
  353. package/skill/skill-file-preview.d.ts +25 -0
  354. package/skill/skill-file-preview.d.ts.map +1 -0
  355. package/skill/skill-manifest.d.ts +28 -0
  356. package/skill/skill-manifest.d.ts.map +1 -0
  357. package/skill/skill-types.d.ts +46 -0
  358. package/skill/skill-types.d.ts.map +1 -0
  359. package/skill/skill.d.ts +160 -0
  360. package/skill/skill.d.ts.map +1 -0
  361. package/skill/useSkillArchiveImport/useSkillArchiveImport.d.ts +65 -0
  362. package/skill/useSkillArchiveImport/useSkillArchiveImport.d.ts.map +1 -0
  363. package/skill/useSkillEditorLoad.d.ts +74 -0
  364. package/skill/useSkillEditorLoad.d.ts.map +1 -0
  365. package/skill/useSkillEditorSubmit.d.ts +125 -0
  366. package/skill/useSkillEditorSubmit.d.ts.map +1 -0
  367. package/skill/useSkillFileActions.d.ts +60 -0
  368. package/skill/useSkillFileActions.d.ts.map +1 -0
  369. package/skill/useSkillFilePreview.d.ts +38 -0
  370. package/skill/useSkillFilePreview.d.ts.map +1 -0
  371. package/skill/useSkillsState/useSkillsState.d.ts +35 -0
  372. package/skill/useSkillsState/useSkillsState.d.ts.map +1 -0
  373. package/skill-editor.d.ts +2 -655
  374. package/skills-state.d.ts +2 -40
  375. package/source-content.d.ts +2 -29
  376. package/usage/map-usage-data-to-dashboard.d.ts +39 -0
  377. package/usage/map-usage-data-to-dashboard.d.ts.map +1 -0
  378. package/usage/map-user-usage-to-model-limits.d.ts +62 -0
  379. package/usage/map-user-usage-to-model-limits.d.ts.map +1 -0
  380. package/usage/usage-banner-source.d.ts +23 -0
  381. package/usage/usage-banner-source.d.ts.map +1 -0
  382. package/usage/usage-banner-source.js +36 -0
  383. package/usage/usage-period.d.ts +7 -0
  384. package/usage/usage-period.d.ts.map +1 -0
  385. package/usage/usage-period.js +6 -0
  386. package/usage/usage-reset-time.d.ts +69 -0
  387. package/usage/usage-reset-time.d.ts.map +1 -0
  388. package/usage/usage-reset-time.js +72 -0
  389. package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts +32 -0
  390. package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts.map +1 -0
  391. package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.js +39 -0
  392. package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.d.ts +16 -0
  393. package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.d.ts.map +1 -0
  394. package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.js +14 -0
  395. package/usage/useUsageData/useUsageData.d.ts +28 -0
  396. package/usage/useUsageData/useUsageData.d.ts.map +1 -0
  397. package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts +56 -0
  398. package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts.map +1 -0
  399. package/usage/useUsageLimitBanner/useUsageLimitBanner.js +67 -0
  400. package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.d.ts +14 -0
  401. package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.d.ts.map +1 -0
  402. package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.js +19 -0
  403. package/usage-limits.d.ts +2 -0
  404. package/usage-limits.js +8 -0
  405. package/usage.d.ts +2 -125
  406. package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts +128 -0
  407. package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts.map +1 -0
  408. package/usePageFileDrag/usePageFileDrag.d.ts +16 -0
  409. package/usePageFileDrag/usePageFileDrag.d.ts.map +1 -0
  410. package/usePanelMaxWidth/usePanelMaxWidth.d.ts +6 -0
  411. package/usePanelMaxWidth/usePanelMaxWidth.d.ts.map +1 -0
  412. package/useShareLink/useShareLink.d.ts +23 -0
  413. package/useShareLink/useShareLink.d.ts.map +1 -0
  414. package/useShareRecipientsCount/useShareRecipientsCount.d.ts +36 -0
  415. package/useShareRecipientsCount/useShareRecipientsCount.d.ts.map +1 -0
  416. package/useToolsMenu/useToolsMenu.d.ts +31 -0
  417. package/useToolsMenu/useToolsMenu.d.ts.map +1 -0
  418. package/useViewportWidth/useViewportWidth.d.ts +3 -0
  419. package/useViewportWidth/useViewportWidth.d.ts.map +1 -0
  420. package/utils.d.ts +2 -404
  421. package/utils.js +10 -10
  422. package/viewport-layout.d.ts +2 -27
@@ -0,0 +1,61 @@
1
+ /** A link rendered as the call to action of an announcements-popover entry. */
2
+ export interface AnnouncementListItemLink {
3
+ /** Visible text of the call to action. */
4
+ label: string;
5
+ /** Absolute `http`/`https` target the call to action opens. */
6
+ href: string;
7
+ }
8
+ /** One entry of the announcements popover behind the banner's `+N` pill. */
9
+ export interface AnnouncementListItem {
10
+ /** Plain-text heading of the entry. */
11
+ title: string;
12
+ /** Supporting copy of the entry, sanitized before it is rendered. */
13
+ description?: string | null;
14
+ /** Optional call to action shown at the end of the entry. */
15
+ link?: AnnouncementListItemLink | null;
16
+ }
17
+ /** Structured announcement banner content. */
18
+ export interface AnnouncementContent {
19
+ title: string | null;
20
+ description: string | null;
21
+ html: string | null;
22
+ /** Entries of the popover the banner opens. */
23
+ items?: readonly AnnouncementListItem[];
24
+ }
25
+ /** Sanitizes announcement HTML to the allowed inline tag/attribute set. */
26
+ export declare const sanitizeAnnouncementHtml: (html: string) => string;
27
+ /**
28
+ * Sanitizes the legacy `ANNOUNCEMENT_HTML_MESSAGE` banner, which permits the
29
+ * block-level markup the inline pass strips. See
30
+ * `ANNOUNCEMENT_MESSAGE_SANITIZE_OPTIONS` for why the two lists differ.
31
+ */
32
+ export declare const sanitizeAnnouncementMessageHtml: (html: string) => string;
33
+ /**
34
+ * Whether the operator configured the structured banner (title and/or
35
+ * description) rather than only the legacy HTML message. Drives which of the
36
+ * two banner layouts renders.
37
+ */
38
+ export declare const hasStructuredAnnouncement: ({ title, description, }: AnnouncementContent) => boolean;
39
+ /** True when the announcement has any renderable content (structured or legacy HTML). */
40
+ export declare const hasAnnouncementContent: (content: AnnouncementContent) => boolean;
41
+ /**
42
+ * Builds the value persisted under `StorageKey.TextOfClosedAnnouncement` when
43
+ * the user dismisses the banner. Dismissal is content-keyed: the banner stays
44
+ * hidden only while the current announcement produces the same signature, so
45
+ * editing any part of it brings the banner back with no version counter.
46
+ *
47
+ * Every piece of content the banner surface renders feeds the signature — the
48
+ * title, the description, and the popover entries behind the pill, which live
49
+ * inside the banner and are hidden along with it. Publishing a new entry in
50
+ * that list therefore invalidates an earlier dismissal on its own, even when
51
+ * the banner line itself is untouched.
52
+ *
53
+ * A legacy-only announcement returns the raw HTML string — byte-identical to
54
+ * what shipped before the structured fields existed — so dismissals recorded
55
+ * by older builds keep working without a storage migration. `items` is left
56
+ * out of the payload entirely when the list is empty for the same reason: a
57
+ * deployment that never configured the popover keeps matching the signatures
58
+ * its users already have stored.
59
+ */
60
+ export declare const buildAnnouncementSignature: (content: AnnouncementContent) => string;
61
+ //# sourceMappingURL=announcement-message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"announcement-message.d.ts","sourceRoot":"","sources":["../../src/conversation/announcement-message.ts"],"names":[],"mappings":"AA+BA,+EAA+E;AAC/E,MAAM,WAAW,wBAAwB;IACvC,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;CACd;AAED,4EAA4E;AAC5E,MAAM,WAAW,oBAAoB;IACnC,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,6DAA6D;IAC7D,IAAI,CAAC,EAAE,wBAAwB,GAAG,IAAI,CAAC;CACxC;AAED,8CAA8C;AAC9C,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,SAAS,oBAAoB,EAAE,CAAC;CACzC;AAQD,2EAA2E;AAC3E,eAAO,MAAM,wBAAwB,GAAI,MAAM,MAAM,KAAG,MACgB,CAAC;AAEzE;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,GAAI,MAAM,MAAM,KAAG,MACY,CAAC;AAK5E;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,GAAI,yBAGvC,mBAAmB,KAAG,OACqB,CAAC;AAE/C,yFAAyF;AACzF,eAAO,MAAM,sBAAsB,GAAI,SAAS,mBAAmB,KAAG,OACN,CAAC;AA2BjE;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,0BAA0B,GACrC,SAAS,mBAAmB,KAC3B,MAgBF,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Runs `worker` over `items` with at most `limit` concurrent invocations.
3
+ * Preserves no particular result order beyond "worker completed"; a worker
4
+ * that returns `undefined`, or throws, contributes nothing to the result
5
+ * array (used to skip failed/invalid items without aborting the whole
6
+ * batch) — a throwing worker is caught here so the other concurrent items
7
+ * keep being tracked instead of continuing unobserved in the background.
8
+ */
9
+ export declare const runWithConcurrency: <T, R>(items: T[], limit: number, worker: (item: T) => Promise<R | undefined>) => Promise<R[]>;
10
+ //# sourceMappingURL=async.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../../../src/conversation/conversation-transfer/async.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAAU,CAAC,EAAE,CAAC,EAC3C,OAAO,CAAC,EAAE,EACV,OAAO,MAAM,EACb,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,KAC1C,OAAO,CAAC,CAAC,EAAE,CAqBb,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { Conversation } from '@epam/ai-dial-chat-shared';
2
+ /**
3
+ * The reference fields shared by every attachment shape a conversation can
4
+ * carry — `MessageAttachment` on a message or a stage, and
5
+ * `AttachmentResource` on a citation's source.
6
+ */
7
+ export interface AttachmentReference {
8
+ /** DIAL file id (`files/{bucket}/{path}`), optionally with a trailing `#…` anchor. */
9
+ url?: string;
10
+ /** Alternate reference resource, same shape as `url`. */
11
+ reference_url?: string;
12
+ /** Display name shown in the UI. */
13
+ title?: string;
14
+ }
15
+ /**
16
+ * Splits a DIAL file reference into the resource id and its trailing `#…`
17
+ * anchor (e.g. the `#page=3` a PDF citation carries). An anchor outside
18
+ * {@link SAFE_ANCHOR_PATTERN} is reported as absent; the file id is returned
19
+ * either way, so the attachment itself is still transferred.
20
+ *
21
+ * The anchor is display metadata, not part of the stored resource path: the
22
+ * download endpoint 404s on it, so it has to be stripped before a reference
23
+ * is resolved to `{bucket, path}` — and restored afterwards, so an imported
24
+ * citation still opens the page it cited.
25
+ */
26
+ export declare const splitFileIdAnchor: (url: string) => {
27
+ fileId: string;
28
+ anchor: string;
29
+ };
30
+ /** A unique DIAL file reference found in a conversation's messages. */
31
+ export interface AttachmentRef {
32
+ fileId: string;
33
+ }
34
+ /**
35
+ * Collects unique attachment references across all messages — message
36
+ * attachments, stage attachments, and citation source documents — with any
37
+ * `#…` anchor stripped. The same file can be referenced more than once (by a
38
+ * later turn, by a stage and the message it belongs to, or by several
39
+ * citations), so dedupe by file id and process it only once.
40
+ */
41
+ export declare const collectAttachmentRefs: (conversation: Conversation) => AttachmentRef[];
42
+ //# sourceMappingURL=attachment-refs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachment-refs.d.ts","sourceRoot":"","sources":["../../../src/conversation/conversation-transfer/attachment-refs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAK9D;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,sFAAsF;IACtF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAeD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,GAC5B,KAAK,MAAM,KACV;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CASlC,CAAC;AAEF,uEAAuE;AACvE,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;CAChB;AAoCD;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,GAChC,cAAc,YAAY,KACzB,aAAa,EAef,CAAC"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Builds the `uploads/<YYYY-MM>/<safe-name>` upload path for a file.
3
+ * `date` defaults to now (regular attachment upload); conversation import
4
+ * passes a date fixed for the whole job so all its attachments land in the
5
+ * same month folder. Does not de-duplicate: a name collision is left for the
6
+ * upload call to reject (`create-only` mode) — use `createUploadPathAllocator`
7
+ * when collisions must be resolved with a ` (n)` suffix instead.
8
+ */
9
+ export declare const buildUploadPath: (fileName: string, date?: Date) => string;
10
+ /** A file name the allocator has handed out, in the forms the caller needs. */
11
+ export interface AllocatedUploadPath {
12
+ /** Bucket-relative, percent-encoded upload path, e.g. `uploads/2026-08/report%20(1).pdf`. */
13
+ path: string;
14
+ /** Decoded name actually reserved, e.g. `report (1).pdf` — pass this as the uploaded `File`'s name. */
15
+ fileName: string;
16
+ /** Whether a ` (n)` suffix had to be appended because the requested name was taken. */
17
+ isRenamed: boolean;
18
+ }
19
+ /** Stateful allocator that hands out collision-free upload paths inside one month folder. */
20
+ export interface UploadPathAllocator {
21
+ /** Reserves the next free name derived from `fileName` and returns its upload path. */
22
+ allocate: (fileName: string) => AllocatedUploadPath;
23
+ /** Records `fileName` as taken — used when the server rejects a name the registry believed free. */
24
+ markTaken: (fileName: string) => void;
25
+ /** Returns a previously allocated `fileName` to the free pool — used when its upload failed for a reason other than a collision. */
26
+ release: (fileName: string) => void;
27
+ }
28
+ /**
29
+ * Creates an allocator that assigns ` (1)`, ` (2)`, … suffixes to repeated or
30
+ * pre-existing file names so every allocation lands on a distinct path inside
31
+ * one `uploads/<YYYY-MM>/` folder. Mutation is deliberately confined to the
32
+ * private `Set` closed over here — an explicit, contained exception to the
33
+ * immutable-by-default rule, needed because collision-free naming is
34
+ * inherently a sequential, stateful decision.
35
+ */
36
+ export declare const createUploadPathAllocator: (params?: {
37
+ /** Month folder to allocate into. Defaults to now. */
38
+ date?: Date;
39
+ /** Decoded names already present in the destination folder, e.g. from `listFiles`. */
40
+ existingNames?: Iterable<string>;
41
+ }) => UploadPathAllocator;
42
+ //# sourceMappingURL=build-upload-path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-upload-path.d.ts","sourceRoot":"","sources":["../../../src/conversation/conversation-transfer/build-upload-path.ts"],"names":[],"mappings":"AAmBA;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAC1B,UAAU,MAAM,EAChB,OAAM,IAAiB,KACtB,MAIF,CAAC;AAUF,+EAA+E;AAC/E,MAAM,WAAW,mBAAmB;IAClC,6FAA6F;IAC7F,IAAI,EAAE,MAAM,CAAC;IACb,uGAAuG;IACvG,QAAQ,EAAE,MAAM,CAAC;IACjB,uFAAuF;IACvF,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,6FAA6F;AAC7F,MAAM,WAAW,mBAAmB;IAClC,uFAAuF;IACvF,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,mBAAmB,CAAC;IACpD,oGAAoG;IACpG,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,oIAAoI;IACpI,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,GAAI,SAAS;IACjD,sDAAsD;IACtD,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,sFAAsF;IACtF,aAAa,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAClC,KAAG,mBAgCH,CAAC"}
@@ -0,0 +1,5 @@
1
+ /** Formats a `Date` as `YYYY-MM-DD` using its local-time components. */
2
+ export declare const formatDateYMD: (date: Date) => string;
3
+ /** Formats a `Date` as `YYYY-MM` using its local-time components. */
4
+ export declare const formatDateYM: (date: Date) => string;
5
+ //# sourceMappingURL=date.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../../src/conversation/conversation-transfer/date.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,eAAO,MAAM,aAAa,GAAI,MAAM,IAAI,KAAG,MAK1C,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,YAAY,GAAI,MAAM,IAAI,KAAG,MAIzC,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Extracts the bucket and decoded relative path from a DIAL file ID
3
+ * (`files/{bucket}/{path}`). Returns `undefined` if the input does not start
4
+ * with `files/` or has no path segment after the bucket.
5
+ */
6
+ export declare const resolveDialFileBucketAndPath: (fileId: string) => {
7
+ bucket: string;
8
+ path: string;
9
+ } | undefined;
10
+ //# sourceMappingURL=dial-file-resolve.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dial-file-resolve.d.ts","sourceRoot":"","sources":["../../../src/conversation/conversation-transfer/dial-file-resolve.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,GACvC,QAAQ,MAAM,KACb;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,SAcrC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { Conversation, ExportFolder, ExportFormat } from '@epam/ai-dial-chat-shared';
2
+ import { ExportFileNameKind } from './types';
3
+ /** Placeholder app name used in every export file name — this branch has no app display-name config yet. */
4
+ export declare const EXPORT_APP_NAME = "ai_dial";
5
+ /** Returns the conversation with every message-, stage- and citation-level attachment reference removed. */
6
+ export declare const stripConversationAttachments: (conversation: Conversation) => Conversation;
7
+ export declare const buildExportEnvelope: (conversations: Conversation[], folders?: ExportFolder[]) => ExportFormat;
8
+ export declare const serializeExportEnvelope: (envelope: ExportFormat) => Blob;
9
+ export declare const buildExportFileName: (kind: ExportFileNameKind, appName: string, date?: Date) => string;
10
+ //# sourceMappingURL=export-conversation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export-conversation.d.ts","sourceRoot":"","sources":["../../../src/conversation/conversation-transfer/export-conversation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,YAAY,EACZ,YAAY,EACZ,YAAY,EAGb,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,4GAA4G;AAC5G,eAAO,MAAM,eAAe,YAAY,CAAC;AA2CzC,4GAA4G;AAC5G,eAAO,MAAM,4BAA4B,GACvC,cAAc,YAAY,KACzB,YAGD,CAAC;AAEH,eAAO,MAAM,mBAAmB,GAC9B,eAAe,YAAY,EAAE,EAC7B,UAAS,YAAY,EAAO,KAC3B,YAID,CAAC;AAEH,eAAO,MAAM,uBAAuB,GAAI,UAAU,YAAY,KAAG,IACY,CAAC;AAQ9E,eAAO,MAAM,mBAAmB,GAC9B,MAAM,kBAAkB,EACxB,SAAS,MAAM,EACf,OAAM,IAAiB,KACtB,MACyE,CAAC"}
@@ -0,0 +1,106 @@
1
+ import { Conversation, ExportFormat } from '@epam/ai-dial-chat-shared';
2
+ import { AllocatedUploadPath, UploadPathAllocator } from './build-upload-path';
3
+ /** Thrown when an imported file cannot be parsed as a supported export envelope. */
4
+ export declare class UnsupportedImportFormatError extends Error {
5
+ constructor(message: string);
6
+ }
7
+ /**
8
+ * Parses raw file text into a supported export envelope (`version: 5`) with
9
+ * an array `history` — conversations are returned unmodified.
10
+ * Throws `UnsupportedImportFormatError` for malformed JSON or any other shape.
11
+ */
12
+ export declare const parseImportEnvelope: (text: string) => ExportFormat;
13
+ export interface RebasedConversationId {
14
+ /** The conversation with `id`/`folderId` rebased to `bucket` and a fresh UUID, and `name` sanitized. */
15
+ conversation: Conversation;
16
+ /** Bucket-relative path to pass to `saveConversation`. */
17
+ subPath: string;
18
+ }
19
+ /**
20
+ * Rebases a conversation's id/folderId to the current user's bucket and
21
+ * regenerates its trailing UUID segment, so importing it can never collide
22
+ * with an existing conversation and needs no replace/skip dialog. Folder
23
+ * path segments between the bucket and the filename are preserved (not
24
+ * flattened) — the new chat currently displays everything at the root, but
25
+ * the conversation keeps its original folder location for when the folder
26
+ * feature ships.
27
+ *
28
+ * The filename's title segment is rewritten from the conversation's own
29
+ * `name` (see `buildImportedFileName`), and `name` is replaced with the same
30
+ * sanitized value — the invariant the conversation list relies on to render a
31
+ * row's title identically whether or not it read the body back.
32
+ */
33
+ export declare const rebaseConversationId: (conversation: Conversation, bucket: string) => RebasedConversationId;
34
+ /**
35
+ * Derives the queue row's secondary breadcrumb line from a conversation's
36
+ * source `folderId` (`{bucket}[/<folder>/...]`) — the segments after the
37
+ * leading bucket, joined with " / ". Returns `undefined` for a root
38
+ * conversation (no folder segments).
39
+ */
40
+ export declare const getFolderBreadcrumb: (conversation: Conversation) => string | undefined;
41
+ /**
42
+ * Formats a list of names for the aggregate success/failure notifications,
43
+ * each individually quoted and comma-separated (e.g. `"A", "B", "C"`) so the
44
+ * i18n template only needs to append the trailing verb phrase.
45
+ */
46
+ export declare const formatQuotedNameList: (names: string[]) => string;
47
+ /** New location — and, when the import renamed it, new display name — for an imported attachment. */
48
+ export interface RewrittenAttachmentTarget {
49
+ /** New `files/{bucket}/{path}` id to write into `url`/`reference_url`. */
50
+ url: string;
51
+ /** New display name — present only when a ` (n)` disambiguation suffix was applied. */
52
+ title?: string;
53
+ }
54
+ /**
55
+ * Rewrites every attachment reference a message carries — its own
56
+ * `custom_content.attachments`, the attachments of each execution stage, and
57
+ * the source document of each citation — from an old file id to its new
58
+ * uploaded location, and its `title` when the target carries a renamed one.
59
+ * References not present in `targetMap` are left untouched (immutable —
60
+ * returns a new conversation).
61
+ */
62
+ export declare const rewriteAttachmentUrls: (conversation: Conversation, targetMap: Map<string, RewrittenAttachmentTarget>) => Conversation;
63
+ /**
64
+ * Removes every attachment reference that still points into another user's
65
+ * bucket once the import has re-pointed what it could.
66
+ *
67
+ * A plain `.json` export carries no attachment bytes, and an archive can miss
68
+ * some, so those references keep the exporting user's `files/{bucket}/…` ids.
69
+ * Written back verbatim, they leave the importing user with previews that
70
+ * fail with 403. Own-bucket references are kept — they are the
71
+ * user's own files on a re-import — and so are public ones. A file another
72
+ * user shared with the importing user is dropped too: nothing here can tell
73
+ * it apart from one they never had access to.
74
+ *
75
+ * Returns the conversation (unchanged when nothing was foreign) and the name
76
+ * of every dropped file, for the skipped-attachment warning.
77
+ */
78
+ export declare const dropForeignAttachmentRefs: (conversation: Conversation, bucket: string) => {
79
+ conversation: Conversation;
80
+ droppedNames: string[];
81
+ };
82
+ /** One attachment reference planned for upload, with its collision-free destination already allocated. */
83
+ export interface PlannedAttachmentUpload {
84
+ /** Original DIAL file id this attachment is uploaded from — the key `rewriteAttachmentUrls` rewrites. */
85
+ fileId: string;
86
+ /** Raw bytes read from the archive. */
87
+ bytes: Uint8Array;
88
+ /** Basename a 409 retry re-derives its next attempt from (never the already-suffixed name). */
89
+ originalFileName: string;
90
+ /** Destination allocated for the first upload attempt. */
91
+ allocated: AllocatedUploadPath;
92
+ }
93
+ /**
94
+ * Resolves a conversation's unique attachment references to archive bytes
95
+ * and allocates each a collision-free upload destination, in
96
+ * `collectAttachmentRefs` order — a synchronous pre-pass so suffix
97
+ * assignment stays deterministic regardless of later upload concurrency.
98
+ * A reference that cannot be resolved to a `{bucket, path}` pair, or has no
99
+ * matching bytes in the archive, is reported in `skippedNames` and does not
100
+ * consume an allocator slot.
101
+ */
102
+ export declare const planAttachmentUploads: (conversation: Conversation, attachmentBytes: Map<string, Uint8Array>, allocator: UploadPathAllocator) => {
103
+ plan: PlannedAttachmentUpload[];
104
+ skippedNames: string[];
105
+ };
106
+ //# sourceMappingURL=import-conversation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"import-conversation.d.ts","sourceRoot":"","sources":["../../../src/conversation/conversation-transfer/import-conversation.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAEV,YAAY,EAEZ,YAAY,EAGb,MAAM,2BAA2B,CAAC;AAGnC,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAG7B,oFAAoF;AACpF,qBAAa,4BAA6B,SAAQ,KAAK;gBACzC,OAAO,EAAE,MAAM;CAI5B;AAOD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,KAAG,YA2BlD,CAAC;AAgGF,MAAM,WAAW,qBAAqB;IACpC,wGAAwG;IACxG,YAAY,EAAE,YAAY,CAAC;IAC3B,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAC;CACjB;AAgBD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,oBAAoB,GAC/B,cAAc,YAAY,EAC1B,QAAQ,MAAM,KACb,qBAmDF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAC9B,cAAc,YAAY,KACzB,MAAM,GAAG,SAMX,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,OAAO,MAAM,EAAE,KAAG,MACV,CAAC;AAE9C,qGAAqG;AACrG,MAAM,WAAW,yBAAyB;IACxC,0EAA0E;IAC1E,GAAG,EAAE,MAAM,CAAC;IACZ,uFAAuF;IACvF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAoFD;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,GAChC,cAAc,YAAY,EAC1B,WAAW,GAAG,CAAC,MAAM,EAAE,yBAAyB,CAAC,KAChD,YA8BD,CAAC;AAmEH;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,yBAAyB,GACpC,cAAc,YAAY,EAC1B,QAAQ,MAAM,KACb;IAAE,YAAY,EAAE,YAAY,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAwDtD,CAAC;AAMF,0GAA0G;AAC1G,MAAM,WAAW,uBAAuB;IACtC,yGAAyG;IACzG,MAAM,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,KAAK,EAAE,UAAU,CAAC;IAClB,+FAA+F;IAC/F,gBAAgB,EAAE,MAAM,CAAC;IACzB,0DAA0D;IAC1D,SAAS,EAAE,mBAAmB,CAAC;CAChC;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,GAChC,cAAc,YAAY,EAC1B,iBAAiB,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,EACxC,WAAW,mBAAmB,KAC7B;IAAE,IAAI,EAAE,uBAAuB,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CA2B3D,CAAC"}
@@ -0,0 +1,60 @@
1
+ import { ConversationTransferProgress, ConversationTransferProgressUnits } from '@epam/ai-dial-chat-shared';
2
+ /**
3
+ * The three stages every transfer job moves through. `Transfer` is the only
4
+ * one whose work is subdivided, because its unit count is discovered rather
5
+ * than known at enqueue time.
6
+ */
7
+ export declare enum ConversationTransferPhase {
8
+ /** Fetching the conversation, listing conversations, or parsing the import file. */
9
+ Prepare = "prepare",
10
+ /** Downloading or uploading the discovered units. */
11
+ Transfer = "transfer",
12
+ /** Serializing, building the archive, or saving the conversations. */
13
+ Finalize = "finalize"
14
+ }
15
+ /** Which weight table a job uses. */
16
+ export declare enum ConversationTransferKind {
17
+ ExportSingle = "exportSingle",
18
+ ExportSingleWithAttachments = "exportSingleWithAttachments",
19
+ ExportAll = "exportAll",
20
+ Import = "import"
21
+ }
22
+ /** Share of a job's 100 percentage points that each phase is worth. */
23
+ interface PhaseWeights {
24
+ [ConversationTransferPhase.Prepare]: number;
25
+ [ConversationTransferPhase.Transfer]: number;
26
+ [ConversationTransferPhase.Finalize]: number;
27
+ }
28
+ /**
29
+ * Per-kind phase weights, each summing to 100. Fixed rather than derived from
30
+ * the unit count so that discovering how many attachments a job has subdivides
31
+ * work still to do instead of moving the indicator backwards.
32
+ */
33
+ export declare const TRANSFER_PHASE_WEIGHTS: Record<ConversationTransferKind, PhaseWeights>;
34
+ /** Percentage a fully settled job reports. */
35
+ export declare const TRANSFER_PROGRESS_COMPLETE = 100;
36
+ /** Arguments for {@link computeTransferPercent}. */
37
+ export interface ComputeTransferPercentParams {
38
+ /** Which weight table applies. */
39
+ kind: ConversationTransferKind;
40
+ /** The phase currently advancing. */
41
+ phase: ConversationTransferPhase;
42
+ /**
43
+ * Units settled within `phase`. Omit (or pass `total: 0`) for a phase whose
44
+ * work is not subdivided; its whole weight is then credited at once.
45
+ */
46
+ completed?: number;
47
+ /** Units `phase` will settle in total. */
48
+ total?: number;
49
+ }
50
+ /**
51
+ * Returns the job's completion as an integer 0–100: every earlier phase's
52
+ * weight in full, plus `phase`'s weight scaled by `completed / total`. A phase
53
+ * with no units to settle is credited in full, so a conversation with no
54
+ * attachments never stalls at the start of the transfer phase.
55
+ */
56
+ export declare const computeTransferPercent: ({ kind, phase, completed, total, }: ComputeTransferPercentParams) => number;
57
+ /** Builds the progress patch for a phase, carrying its unit readout when the phase has units. */
58
+ export declare const buildTransferProgress: (params: ComputeTransferPercentParams, units?: ConversationTransferProgressUnits) => ConversationTransferProgress;
59
+ export {};
60
+ //# sourceMappingURL=progress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../src/conversation/conversation-transfer/progress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,4BAA4B,EAC5B,iCAAiC,EAClC,MAAM,2BAA2B,CAAC;AAEnC;;;;GAIG;AACH,oBAAY,yBAAyB;IACnC,oFAAoF;IACpF,OAAO,YAAY;IACnB,qDAAqD;IACrD,QAAQ,aAAa;IACrB,sEAAsE;IACtE,QAAQ,aAAa;CACtB;AAED,qCAAqC;AACrC,oBAAY,wBAAwB;IAClC,YAAY,iBAAiB;IAC7B,2BAA2B,gCAAgC;IAC3D,SAAS,cAAc;IACvB,MAAM,WAAW;CAClB;AAED,uEAAuE;AACvE,UAAU,YAAY;IACpB,CAAC,yBAAyB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC5C,CAAC,yBAAyB,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC7C,CAAC,yBAAyB,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC9C;AAED;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CACzC,wBAAwB,EACxB,YAAY,CAsBb,CAAC;AAEF,8CAA8C;AAC9C,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAkB9C,oDAAoD;AACpD,MAAM,WAAW,4BAA4B;IAC3C,kCAAkC;IAClC,IAAI,EAAE,wBAAwB,CAAC;IAC/B,qCAAqC;IACrC,KAAK,EAAE,yBAAyB,CAAC;IACjC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GAAI,oCAKpC,4BAA4B,KAAG,MAOjC,CAAC;AAEF,iGAAiG;AACjG,eAAO,MAAM,qBAAqB,GAChC,QAAQ,4BAA4B,EACpC,QAAQ,iCAAiC,KACxC,4BAGD,CAAC"}
@@ -0,0 +1,54 @@
1
+ import { ConversationTransferErrorCode, ConversationTransferJob, ConversationTransferProgress, ConversationTransferSubject, ConversationTransferWarningCode } from '@epam/ai-dial-chat-shared';
2
+ /** Shared job-queue primitive underlying both `useConversationExport` and `useConversationImport`. */
3
+ export interface ConversationTransferQueue {
4
+ /** Queued jobs, most recently added last. */
5
+ jobs: ConversationTransferJob[];
6
+ /** Adds a new `InProgress` job for `subject`, named `fileName`, at 0% and returns its id. */
7
+ addJob: (subject: ConversationTransferSubject, fileName: string) => string;
8
+ /** Merges `patch` into the job identified by `jobId`. */
9
+ updateJob: (jobId: string, patch: Partial<ConversationTransferJob>) => void;
10
+ /**
11
+ * Advances the job's progress. A write whose `percent` is lower than the
12
+ * stored value is discarded, so out-of-order completions from concurrent
13
+ * transfers cannot move the indicator backwards, and a write to a job that
14
+ * has already settled is ignored, so an aborted run unwinding in the
15
+ * background cannot advance a canceled or failed row.
16
+ */
17
+ setJobProgress: (jobId: string, progress: ConversationTransferProgress) => void;
18
+ /** Marks the job `Success` at 100%. */
19
+ succeedJob: (jobId: string) => void;
20
+ /**
21
+ * Marks the job `Warning` at 100%, recording what was incomplete. The file
22
+ * was still delivered, so this settles the job exactly as `succeedJob` does
23
+ * apart from the status and the attached code and optional file names.
24
+ */
25
+ warnJob: (jobId: string, warningCode: ConversationTransferWarningCode, warningNames?: string[]) => void;
26
+ /** Marks the job `Failed`, recording why. Progress freezes where it stopped. */
27
+ failJob: (jobId: string, errorCode: ConversationTransferErrorCode) => void;
28
+ /**
29
+ * Aborts the job's in-flight request(s) and marks it `Canceled`, keeping the
30
+ * row so the user has a record of what they stopped. The job stays retryable.
31
+ */
32
+ cancelJob: (jobId: string) => void;
33
+ /** Aborts the job's in-flight request (if any) and removes it from `jobs`. */
34
+ dismissJob: (jobId: string) => void;
35
+ /** Re-invokes the job's registered run function under a fresh `AbortController`. */
36
+ retryJob: (jobId: string) => void;
37
+ /** Aborts every in-flight job and clears the queue. */
38
+ dismissAll: () => void;
39
+ /**
40
+ * Runs `run` under a fresh `AbortController` registered for `jobId`, and
41
+ * registers the same `run` function to be re-invoked (under a new
42
+ * controller) on `retryJob`.
43
+ */
44
+ startJob: (jobId: string, run: (signal: AbortSignal) => Promise<void>) => Promise<void>;
45
+ }
46
+ /**
47
+ * Owns the export/import job queue: job list state, per-job
48
+ * `AbortController` tracking, monotonic progress, retry-function
49
+ * registration, and unmount cleanup. Shared by `useConversationExport` and
50
+ * `useConversationImport` so both hooks have identical cancellation,
51
+ * retry, and dismissal semantics.
52
+ */
53
+ export declare const useConversationTransferQueue: () => ConversationTransferQueue;
54
+ //# sourceMappingURL=queue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../../../src/conversation/conversation-transfer/queue.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,6BAA6B,EAClC,KAAK,uBAAuB,EAE5B,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,EAChC,KAAK,+BAA+B,EAErC,MAAM,2BAA2B,CAAC;AAInC,sGAAsG;AACtG,MAAM,WAAW,yBAAyB;IACxC,6CAA6C;IAC7C,IAAI,EAAE,uBAAuB,EAAE,CAAC;IAChC,6FAA6F;IAC7F,MAAM,EAAE,CAAC,OAAO,EAAE,2BAA2B,EAAE,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3E,yDAAyD;IACzD,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,uBAAuB,CAAC,KAAK,IAAI,CAAC;IAC5E;;;;;;OAMG;IACH,cAAc,EAAE,CACd,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,4BAA4B,KACnC,IAAI,CAAC;IACV,uCAAuC;IACvC,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC;;;;OAIG;IACH,OAAO,EAAE,CACP,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,+BAA+B,EAC5C,YAAY,CAAC,EAAE,MAAM,EAAE,KACpB,IAAI,CAAC;IACV,gFAAgF;IAChF,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,6BAA6B,KAAK,IAAI,CAAC;IAC3E;;;OAGG;IACH,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,8EAA8E;IAC9E,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,oFAAoF;IACpF,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,uDAAuD;IACvD,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB;;;;OAIG;IACH,QAAQ,EAAE,CACR,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,KACxC,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,QAAO,yBAkL/C,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { ConversationTransferErrorCode, ConversationTransferWarningCode } from '@epam/ai-dial-chat-shared';
2
+ /** Whether an export includes the conversation's attachments. */
3
+ export declare enum ConversationExportMode {
4
+ WithAttachments = "withAttachments",
5
+ WithoutAttachments = "withoutAttachments"
6
+ }
7
+ /** Which export file was produced, used to derive its file name/extension. */
8
+ export declare enum ExportFileNameKind {
9
+ SingleConversation = "chat_conversation",
10
+ SingleConversationWithAttachments = "chat_with_attachments",
11
+ AllConversationsHistory = "chat_conversations_history"
12
+ }
13
+ /** Structured, translation-free error report for a transfer job. */
14
+ export interface ConversationTransferErrorEvent {
15
+ jobId: string;
16
+ code: ConversationTransferErrorCode;
17
+ /** Conversation title(s) relevant to the error, when applicable. */
18
+ titles?: string[];
19
+ /** Resolved trace id for the failing request, when the host's `resolveErrorTraceId` supplies one. */
20
+ traceId?: string;
21
+ }
22
+ export { ConversationTransferErrorCode, ConversationTransferWarningCode };
23
+ /** Structured, translation-free warning report for a transfer job. */
24
+ export interface ConversationTransferWarningEvent {
25
+ jobId: string;
26
+ code: ConversationTransferWarningCode;
27
+ /** Names relevant to the warning (e.g. skipped attachment file names). */
28
+ names?: string[];
29
+ }
30
+ /** Structured, translation-free success report for a transfer job. */
31
+ export interface ConversationTransferSuccessEvent {
32
+ jobId: string;
33
+ /** Conversation title(s) affected, when applicable. */
34
+ titles?: string[];
35
+ }
36
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/conversation/conversation-transfer/types.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,oBAAY,sBAAsB;IAChC,eAAe,oBAAoB;IACnC,kBAAkB,uBAAuB;CAC1C;AAED,OAAO,EACL,6BAA6B,EAC7B,+BAA+B,EAChC,MAAM,2BAA2B,CAAC;AAEnC,8EAA8E;AAC9E,oBAAY,kBAAkB;IAC5B,kBAAkB,sBAAsB;IACxC,iCAAiC,0BAA0B;IAC3D,uBAAuB,+BAA+B;CACvD;AAED,oEAAoE;AACpE,MAAM,WAAW,8BAA8B;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,6BAA6B,CAAC;IACpC,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,qGAAqG;IACrG,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAQD,OAAO,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,CAAC;AAE1E,sEAAsE;AACtE,MAAM,WAAW,gCAAgC;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,+BAA+B,CAAC;IACtC,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,sEAAsE;AACtE,MAAM,WAAW,gCAAgC;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB"}
@@ -0,0 +1,31 @@
1
+ import { ExportFormat } from '@epam/ai-dial-chat-shared';
2
+ /**
3
+ * Validates an attachment path before it is written into (or read from) a
4
+ * `.dial` archive. Blocks path traversal and absolute paths by rejecting
5
+ * empty, `.`, or `..` path segments (so `../../etc/passwd` and `/etc/passwd`
6
+ * are both rejected). No character allowlist — real-world filenames
7
+ * routinely contain spaces, parentheses, and non-ASCII characters, and any
8
+ * character that would be unsafe in the eventual upload URL is already
9
+ * percent-encoded downstream by `buildUploadPath`.
10
+ */
11
+ export declare const isValidArchivePath: (path: string) => boolean;
12
+ /** A single attachment already fetched into memory, ready to be written into the archive. */
13
+ export interface ZipAttachmentEntry {
14
+ /** Relative path under which the attachment is stored, e.g. `reports/q1.pdf`. */
15
+ path: string;
16
+ /** Attachment content. */
17
+ data: Uint8Array;
18
+ }
19
+ export interface BuildDialArchiveResult {
20
+ /** The built `.dial` archive. */
21
+ blob: Blob;
22
+ /** Attachment paths that failed validation and were not written to the archive. */
23
+ skippedPaths: string[];
24
+ }
25
+ /**
26
+ * Builds a `.dial` ZIP archive containing the conversation export envelope
27
+ * plus every valid attachment, laid out under `res/<path>`. Attachments
28
+ * failing the path allowlist are skipped and reported in `skippedPaths`.
29
+ */
30
+ export declare const buildDialArchive: (envelope: ExportFormat, attachments: ZipAttachmentEntry[]) => BuildDialArchiveResult;
31
+ //# sourceMappingURL=zip-export.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zip-export.d.ts","sourceRoot":"","sources":["../../../src/conversation/conversation-transfer/zip-export.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAY9D;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,GAAI,MAAM,MAAM,KAAG,OAI4B,CAAC;AAE/E,6FAA6F;AAC7F,MAAM,WAAW,kBAAkB;IACjC,iFAAiF;IACjF,IAAI,EAAE,MAAM,CAAC;IACb,0BAA0B;IAC1B,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,MAAM,WAAW,sBAAsB;IACrC,iCAAiC;IACjC,IAAI,EAAE,IAAI,CAAC;IACX,mFAAmF;IACnF,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAC3B,UAAU,YAAY,EACtB,aAAa,kBAAkB,EAAE,KAChC,sBAqBF,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { ExportFormat } from '@epam/ai-dial-chat-shared';
2
+ export interface ParsedDialArchive {
3
+ /** The parsed and validated export envelope. */
4
+ envelope: ExportFormat;
5
+ /** Attachment bytes keyed by their bucket-relative path (the `res/<path>` suffix). */
6
+ attachments: Map<string, Uint8Array>;
7
+ }
8
+ /**
9
+ * Parses a `.dial`/`.zip` archive produced by either the new-chat export
10
+ * (`conversation.json` at the archive root) or the old (`development`
11
+ * branch) export (`conversations/<name>.json`) — the JSON entry name is
12
+ * detected tolerantly by its archive path, since both old-chat and new-chat
13
+ * archives write the same `version: 5` envelope. Attachment bytes are
14
+ * collected from `res/<path>` entries, keyed by their validated relative path.
15
+ */
16
+ export declare const parseDialArchive: (file: File) => Promise<ParsedDialArchive>;
17
+ //# sourceMappingURL=zip-import.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zip-import.d.ts","sourceRoot":"","sources":["../../../src/conversation/conversation-transfer/zip-import.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAe9D,MAAM,WAAW,iBAAiB;IAChC,gDAAgD;IAChD,QAAQ,EAAE,YAAY,CAAC;IACvB,sFAAsF;IACtF,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;CACtC;AAqBD;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,GAC3B,MAAM,IAAI,KACT,OAAO,CAAC,iBAAiB,CAiC3B,CAAC"}