@epam/ai-dial-chat-hooks 1.1.0-dev.383 → 1.1.0-dev.390

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. package/api-error-DuLNy43N.js +45 -0
  2. package/attachment-types-AAoN9E95.js +7760 -0
  3. package/{attachment/useAttachmentValidation/useAttachmentValidation.d.ts → attachments.d.ts} +88 -44
  4. package/attachments.js +2 -0
  5. package/browser-Btsa0Lmr.js +607 -0
  6. package/catalog.d.ts +946 -0
  7. package/catalog.js +3 -0
  8. package/{conversation-sources/useConversationSources/useConversationSources.d.ts → conversation-sources.d.ts} +25 -20
  9. package/conversation-sources.js +2 -0
  10. package/conversation-transfer.d.ts +189 -0
  11. package/conversation-transfer.js +3 -0
  12. package/conversation.d.ts +907 -0
  13. package/conversation.js +2 -0
  14. package/cron-weekday-B4w29eAC.js +4 -0
  15. package/date-BeuD8G79.js +4 -0
  16. package/deployment-id-CxWgJTs9.js +6 -0
  17. package/file-manager.d.ts +1344 -0
  18. package/file-manager.js +4 -0
  19. package/formatting-CZyyxBG3.js +4 -0
  20. package/index.d.ts +4945 -126
  21. package/index.js +27 -19152
  22. package/oauth.d.ts +440 -0
  23. package/oauth.js +3 -0
  24. package/package.json +142 -21
  25. package/prompt-resource-Bt1I-8ri.js +41 -0
  26. package/scheduled-task-trigger-D9RZCk52.js +145 -0
  27. package/{scheduled-task/scheduled-task-trigger.d.ts → scheduled-tasks.d.ts} +51 -27
  28. package/scheduled-tasks.js +2 -0
  29. package/{conversation/useConversationScroll/useConversationScroll.d.ts → scroll-anchoring.d.ts} +50 -46
  30. package/scroll-anchoring.js +2 -0
  31. package/{useShareRecipientsCount/useShareRecipientsCount.d.ts → sharing.d.ts} +65 -36
  32. package/sharing.js +3 -0
  33. package/skill-editor.d.ts +503 -0
  34. package/skill-editor.js +3 -0
  35. package/skill-manifest-CCX8s4nn.js +4035 -0
  36. package/{skill/useSkillsState/useSkillsState.d.ts → skills-state.d.ts} +40 -35
  37. package/skills-state.js +2 -0
  38. package/string-utils-iBi2Y55C.js +10 -0
  39. package/toolset-id-CkxRHyU0.js +10 -0
  40. package/useAttachmentValidation-CkMTd5lA.js +102 -0
  41. package/useConversationImport-C2h1GBY4.js +807 -0
  42. package/useConversationScroll-CliIMnjP.js +122 -0
  43. package/useConversationSources-DKaKvjXZ.js +47 -0
  44. package/useDialFileManagerTabConfig-DGQw8H8H.js +2289 -0
  45. package/usePanelMaxWidth-BEZYuqF9.js +44 -0
  46. package/useShareLink-xkiaxATt.js +44 -0
  47. package/useShareRecipientsCount-BgwCLKY0.js +37 -0
  48. package/useSkillFileActions-BU5PzZ_8.js +373 -0
  49. package/useSkillFilePreview-BYfZUJhr.js +1005 -0
  50. package/useSkillsState-BoLlwmzb.js +52 -0
  51. package/useToolsMenu-BXdahO0i.js +1874 -0
  52. package/useToolsetLogin-GhFtKs4D.js +276 -0
  53. package/useUsageData-D7BxloKZ.js +201 -0
  54. package/utils.d.ts +373 -0
  55. package/utils.js +7 -0
  56. package/{usePageFileDrag/usePageFileDrag.d.ts → viewport-layout.d.ts} +27 -16
  57. package/viewport-layout.js +2 -0
  58. package/api-error/api-error.d.ts +0 -18
  59. package/api-error/api-error.d.ts.map +0 -1
  60. package/api-transport/create-csrf-middleware.d.ts +0 -15
  61. package/api-transport/create-csrf-middleware.d.ts.map +0 -1
  62. package/api-transport/create-unauthorized-middleware.d.ts +0 -40
  63. package/api-transport/create-unauthorized-middleware.d.ts.map +0 -1
  64. package/attachment/useAttachmentAction/useAttachmentAction.d.ts +0 -32
  65. package/attachment/useAttachmentAction/useAttachmentAction.d.ts.map +0 -1
  66. package/attachment/useAttachmentValidation/useAttachmentValidation.d.ts.map +0 -1
  67. package/catalog/catalog-derivations.d.ts +0 -27
  68. package/catalog/catalog-derivations.d.ts.map +0 -1
  69. package/catalog/catalog-primary-action.d.ts +0 -47
  70. package/catalog/catalog-primary-action.d.ts.map +0 -1
  71. package/catalog/create-publish-api.d.ts +0 -32
  72. package/catalog/create-publish-api.d.ts.map +0 -1
  73. package/catalog/deployment-endpoint-url.d.ts +0 -19
  74. package/catalog/deployment-endpoint-url.d.ts.map +0 -1
  75. package/catalog/deployment-id.d.ts +0 -21
  76. package/catalog/deployment-id.d.ts.map +0 -1
  77. package/catalog/entity-details.d.ts +0 -132
  78. package/catalog/entity-details.d.ts.map +0 -1
  79. package/catalog/map-deployment-limits-to-catalog.d.ts +0 -33
  80. package/catalog/map-deployment-limits-to-catalog.d.ts.map +0 -1
  81. package/catalog/map-deployment-limits-to-input.d.ts +0 -15
  82. package/catalog/map-deployment-limits-to-input.d.ts.map +0 -1
  83. package/catalog/map-deployment-to-catalog-item.d.ts +0 -60
  84. package/catalog/map-deployment-to-catalog-item.d.ts.map +0 -1
  85. package/catalog/map-entity-details-to-catalog.d.ts +0 -23
  86. package/catalog/map-entity-details-to-catalog.d.ts.map +0 -1
  87. package/catalog/map-prompt-to-catalog-item.d.ts +0 -43
  88. package/catalog/map-prompt-to-catalog-item.d.ts.map +0 -1
  89. package/catalog/map-skill-to-catalog-item.d.ts +0 -87
  90. package/catalog/map-skill-to-catalog-item.d.ts.map +0 -1
  91. package/catalog/mcp-endpoint-url.d.ts +0 -18
  92. package/catalog/mcp-endpoint-url.d.ts.map +0 -1
  93. package/catalog/publish.d.ts +0 -17
  94. package/catalog/publish.d.ts.map +0 -1
  95. package/catalog/useCatalogItemDetails.d.ts +0 -73
  96. package/catalog/useCatalogItemDetails.d.ts.map +0 -1
  97. package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.d.ts +0 -37
  98. package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.d.ts.map +0 -1
  99. package/catalog/usePublishFolders/usePublishFolders.d.ts +0 -73
  100. package/catalog/usePublishFolders/usePublishFolders.d.ts.map +0 -1
  101. package/conversation/announcement-message.d.ts +0 -34
  102. package/conversation/announcement-message.d.ts.map +0 -1
  103. package/conversation/conversation-transfer/async.d.ts +0 -10
  104. package/conversation/conversation-transfer/async.d.ts.map +0 -1
  105. package/conversation/conversation-transfer/attachment-refs.d.ts +0 -12
  106. package/conversation/conversation-transfer/attachment-refs.d.ts.map +0 -1
  107. package/conversation/conversation-transfer/build-upload-path.d.ts +0 -40
  108. package/conversation/conversation-transfer/build-upload-path.d.ts.map +0 -1
  109. package/conversation/conversation-transfer/date.d.ts +0 -5
  110. package/conversation/conversation-transfer/date.d.ts.map +0 -1
  111. package/conversation/conversation-transfer/dial-file-resolve.d.ts +0 -10
  112. package/conversation/conversation-transfer/dial-file-resolve.d.ts.map +0 -1
  113. package/conversation/conversation-transfer/export-conversation.d.ts +0 -8
  114. package/conversation/conversation-transfer/export-conversation.d.ts.map +0 -1
  115. package/conversation/conversation-transfer/import-conversation.d.ts +0 -82
  116. package/conversation/conversation-transfer/import-conversation.d.ts.map +0 -1
  117. package/conversation/conversation-transfer/progress.d.ts +0 -60
  118. package/conversation/conversation-transfer/progress.d.ts.map +0 -1
  119. package/conversation/conversation-transfer/queue.d.ts +0 -54
  120. package/conversation/conversation-transfer/queue.d.ts.map +0 -1
  121. package/conversation/conversation-transfer/types.d.ts +0 -36
  122. package/conversation/conversation-transfer/types.d.ts.map +0 -1
  123. package/conversation/conversation-transfer/zip-export.d.ts +0 -31
  124. package/conversation/conversation-transfer/zip-export.d.ts.map +0 -1
  125. package/conversation/conversation-transfer/zip-import.d.ts +0 -17
  126. package/conversation/conversation-transfer/zip-import.d.ts.map +0 -1
  127. package/conversation/create-chat-stream-api.d.ts +0 -38
  128. package/conversation/create-chat-stream-api.d.ts.map +0 -1
  129. package/conversation/deriveConversationRowActionState/deriveConversationRowActionState.d.ts +0 -39
  130. package/conversation/deriveConversationRowActionState/deriveConversationRowActionState.d.ts.map +0 -1
  131. package/conversation/display-name-watch.d.ts +0 -4
  132. package/conversation/display-name-watch.d.ts.map +0 -1
  133. package/conversation/footer-message.d.ts +0 -10
  134. package/conversation/footer-message.d.ts.map +0 -1
  135. package/conversation/get-model-id-from-conversation-id.d.ts +0 -27
  136. package/conversation/get-model-id-from-conversation-id.d.ts.map +0 -1
  137. package/conversation/greeting.d.ts +0 -18
  138. package/conversation/greeting.d.ts.map +0 -1
  139. package/conversation/message-factory.d.ts +0 -7
  140. package/conversation/message-factory.d.ts.map +0 -1
  141. package/conversation/message-utils.d.ts +0 -27
  142. package/conversation/message-utils.d.ts.map +0 -1
  143. package/conversation/overlay-messages.d.ts +0 -5
  144. package/conversation/overlay-messages.d.ts.map +0 -1
  145. package/conversation/quick-app-conversation-starters.d.ts +0 -10
  146. package/conversation/quick-app-conversation-starters.d.ts.map +0 -1
  147. package/conversation/starter-option.d.ts +0 -21
  148. package/conversation/starter-option.d.ts.map +0 -1
  149. package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts +0 -34
  150. package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts.map +0 -1
  151. package/conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.d.ts +0 -46
  152. package/conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.d.ts.map +0 -1
  153. package/conversation/useAttachmentUpload/useAttachmentUpload.d.ts +0 -26
  154. package/conversation/useAttachmentUpload/useAttachmentUpload.d.ts.map +0 -1
  155. package/conversation/useConversationExport/useConversationExport.d.ts +0 -72
  156. package/conversation/useConversationExport/useConversationExport.d.ts.map +0 -1
  157. package/conversation/useConversationHandlers/attachment-to-dto.d.ts +0 -7
  158. package/conversation/useConversationHandlers/attachment-to-dto.d.ts.map +0 -1
  159. package/conversation/useConversationHandlers/message-factory.d.ts +0 -9
  160. package/conversation/useConversationHandlers/message-factory.d.ts.map +0 -1
  161. package/conversation/useConversationHandlers/message-utils.d.ts +0 -14
  162. package/conversation/useConversationHandlers/message-utils.d.ts.map +0 -1
  163. package/conversation/useConversationHandlers/starter-option.d.ts +0 -14
  164. package/conversation/useConversationHandlers/starter-option.d.ts.map +0 -1
  165. package/conversation/useConversationHandlers/useConversationHandlers.d.ts +0 -66
  166. package/conversation/useConversationHandlers/useConversationHandlers.d.ts.map +0 -1
  167. package/conversation/useConversationImport/useConversationImport.d.ts +0 -53
  168. package/conversation/useConversationImport/useConversationImport.d.ts.map +0 -1
  169. package/conversation/useConversationLookupMaps/useConversationLookupMaps.d.ts +0 -24
  170. package/conversation/useConversationLookupMaps/useConversationLookupMaps.d.ts.map +0 -1
  171. package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts +0 -58
  172. package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts.map +0 -1
  173. package/conversation/useConversationScroll/useConversationScroll.d.ts.map +0 -1
  174. package/conversation/useConversationStream/apply-chunk.d.ts +0 -20
  175. package/conversation/useConversationStream/apply-chunk.d.ts.map +0 -1
  176. package/conversation/useConversationStream/buffered-generation.d.ts +0 -15
  177. package/conversation/useConversationStream/buffered-generation.d.ts.map +0 -1
  178. package/conversation/useConversationStream/conversation-path.d.ts +0 -7
  179. package/conversation/useConversationStream/conversation-path.d.ts.map +0 -1
  180. package/conversation/useConversationStream/generation-resume.d.ts +0 -39
  181. package/conversation/useConversationStream/generation-resume.d.ts.map +0 -1
  182. package/conversation/useConversationStream/useConversationStream.d.ts +0 -92
  183. package/conversation/useConversationStream/useConversationStream.d.ts.map +0 -1
  184. package/conversation/useImportFilePicker/useImportFilePicker.d.ts +0 -32
  185. package/conversation/useImportFilePicker/useImportFilePicker.d.ts.map +0 -1
  186. package/conversation-sources/useConversationSources/useConversationSources.d.ts.map +0 -1
  187. package/files/annotation.d.ts +0 -10
  188. package/files/annotation.d.ts.map +0 -1
  189. package/files/attachment-canvas.d.ts +0 -104
  190. package/files/attachment-canvas.d.ts.map +0 -1
  191. package/files/attachment-dto-to-display.d.ts +0 -10
  192. package/files/attachment-dto-to-display.d.ts.map +0 -1
  193. package/files/attachment-types.d.ts +0 -14
  194. package/files/attachment-types.d.ts.map +0 -1
  195. package/files/create-files-api.d.ts +0 -52
  196. package/files/create-files-api.d.ts.map +0 -1
  197. package/files/create-upload-file-with-progress.d.ts +0 -24
  198. package/files/create-upload-file-with-progress.d.ts.map +0 -1
  199. package/files/dial-file-manager-copy-move.util.d.ts +0 -15
  200. package/files/dial-file-manager-copy-move.util.d.ts.map +0 -1
  201. package/files/dial-file-manager-mapping.util.d.ts +0 -35
  202. package/files/dial-file-manager-mapping.util.d.ts.map +0 -1
  203. package/files/dial-file-manager-path.util.d.ts +0 -39
  204. package/files/dial-file-manager-path.util.d.ts.map +0 -1
  205. package/files/dial-file-manager.model.d.ts +0 -26
  206. package/files/dial-file-manager.model.d.ts.map +0 -1
  207. package/files/dial-file-manager.types.d.ts +0 -317
  208. package/files/dial-file-manager.types.d.ts.map +0 -1
  209. package/files/dial-file-to-attachment.d.ts +0 -26
  210. package/files/dial-file-to-attachment.d.ts.map +0 -1
  211. package/files/dial-file.d.ts +0 -17
  212. package/files/dial-file.d.ts.map +0 -1
  213. package/files/dial-files-api.d.ts +0 -71
  214. package/files/dial-files-api.d.ts.map +0 -1
  215. package/files/download-destination.d.ts +0 -31
  216. package/files/download-destination.d.ts.map +0 -1
  217. package/files/file-manager-variant.d.ts +0 -4
  218. package/files/file-manager-variant.d.ts.map +0 -1
  219. package/files/file-name.d.ts +0 -19
  220. package/files/file-name.d.ts.map +0 -1
  221. package/files/prepare-download-destination.d.ts +0 -8
  222. package/files/prepare-download-destination.d.ts.map +0 -1
  223. package/files/resolve-dial-file-api-path.d.ts +0 -13
  224. package/files/resolve-dial-file-api-path.d.ts.map +0 -1
  225. package/files/useDialFileListing/useDialFileListing.d.ts +0 -73
  226. package/files/useDialFileListing/useDialFileListing.d.ts.map +0 -1
  227. package/files/useDialFileManager/useDialFileManager.d.ts +0 -16
  228. package/files/useDialFileManager/useDialFileManager.d.ts.map +0 -1
  229. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.d.ts +0 -14
  230. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.d.ts.map +0 -1
  231. package/files/useDialFileMetadata/useDialFileMetadata.d.ts +0 -28
  232. package/files/useDialFileMetadata/useDialFileMetadata.d.ts.map +0 -1
  233. package/files/useDialFileMutations/useDialFileMutations.d.ts +0 -68
  234. package/files/useDialFileMutations/useDialFileMutations.d.ts.map +0 -1
  235. package/files/useDialFileSharing/useDialFileSharing.d.ts +0 -30
  236. package/files/useDialFileSharing/useDialFileSharing.d.ts.map +0 -1
  237. package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts +0 -45
  238. package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts.map +0 -1
  239. package/index.d.ts.map +0 -1
  240. package/oauth/authorize-url.d.ts +0 -16
  241. package/oauth/authorize-url.d.ts.map +0 -1
  242. package/oauth/handshake.d.ts +0 -30
  243. package/oauth/handshake.d.ts.map +0 -1
  244. package/oauth/models.d.ts +0 -81
  245. package/oauth/models.d.ts.map +0 -1
  246. package/oauth/popup.d.ts +0 -30
  247. package/oauth/popup.d.ts.map +0 -1
  248. package/oauth/toolset-id.d.ts +0 -23
  249. package/oauth/toolset-id.d.ts.map +0 -1
  250. package/oauth/types.d.ts +0 -84
  251. package/oauth/types.d.ts.map +0 -1
  252. package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.d.ts +0 -54
  253. package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.d.ts.map +0 -1
  254. package/oauth/useToolsetLogin/useToolsetLogin.d.ts +0 -79
  255. package/oauth/useToolsetLogin/useToolsetLogin.d.ts.map +0 -1
  256. package/prompt/export-prompt.d.ts +0 -31
  257. package/prompt/export-prompt.d.ts.map +0 -1
  258. package/prompt/prompt-resource.d.ts +0 -30
  259. package/prompt/prompt-resource.d.ts.map +0 -1
  260. package/prompt/prompt.d.ts +0 -34
  261. package/prompt/prompt.d.ts.map +0 -1
  262. package/prompt/usePromptsState/usePromptsState.d.ts +0 -34
  263. package/prompt/usePromptsState/usePromptsState.d.ts.map +0 -1
  264. package/scheduled-task/scheduled-task-mapping.d.ts +0 -19
  265. package/scheduled-task/scheduled-task-mapping.d.ts.map +0 -1
  266. package/scheduled-task/scheduled-task-trigger.d.ts.map +0 -1
  267. package/shared/application-schema.d.ts +0 -10
  268. package/shared/application-schema.d.ts.map +0 -1
  269. package/shared/browser-timezone.d.ts +0 -7
  270. package/shared/browser-timezone.d.ts.map +0 -1
  271. package/shared/cron-weekday.d.ts +0 -5
  272. package/shared/cron-weekday.d.ts.map +0 -1
  273. package/shared/custom-apps.d.ts +0 -7
  274. package/shared/custom-apps.d.ts.map +0 -1
  275. package/shared/external-services.d.ts +0 -16
  276. package/shared/external-services.d.ts.map +0 -1
  277. package/shared/formatting.d.ts +0 -5
  278. package/shared/formatting.d.ts.map +0 -1
  279. package/shared/locale.d.ts +0 -45
  280. package/shared/locale.d.ts.map +0 -1
  281. package/shared/string-utils.d.ts +0 -9
  282. package/shared/string-utils.d.ts.map +0 -1
  283. package/shared/toolset-login-events.d.ts +0 -15
  284. package/shared/toolset-login-events.d.ts.map +0 -1
  285. package/skill/skill-file-batch-validation.d.ts +0 -70
  286. package/skill/skill-file-batch-validation.d.ts.map +0 -1
  287. package/skill/skill-file-preview.d.ts +0 -25
  288. package/skill/skill-file-preview.d.ts.map +0 -1
  289. package/skill/skill-manifest.d.ts +0 -28
  290. package/skill/skill-manifest.d.ts.map +0 -1
  291. package/skill/skill-types.d.ts +0 -42
  292. package/skill/skill-types.d.ts.map +0 -1
  293. package/skill/skill.d.ts +0 -114
  294. package/skill/skill.d.ts.map +0 -1
  295. package/skill/useSkillEditorLoad.d.ts +0 -74
  296. package/skill/useSkillEditorLoad.d.ts.map +0 -1
  297. package/skill/useSkillEditorSubmit.d.ts +0 -105
  298. package/skill/useSkillEditorSubmit.d.ts.map +0 -1
  299. package/skill/useSkillFileActions.d.ts +0 -53
  300. package/skill/useSkillFileActions.d.ts.map +0 -1
  301. package/skill/useSkillFilePreview.d.ts +0 -38
  302. package/skill/useSkillFilePreview.d.ts.map +0 -1
  303. package/skill/useSkillsState/useSkillsState.d.ts.map +0 -1
  304. package/test-setup.d.ts +0 -2
  305. package/test-setup.d.ts.map +0 -1
  306. package/usage/useUsageData/useUsageData.d.ts +0 -20
  307. package/usage/useUsageData/useUsageData.d.ts.map +0 -1
  308. package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts +0 -128
  309. package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts.map +0 -1
  310. package/usePageFileDrag/usePageFileDrag.d.ts.map +0 -1
  311. package/usePanelMaxWidth/usePanelMaxWidth.d.ts +0 -6
  312. package/usePanelMaxWidth/usePanelMaxWidth.d.ts.map +0 -1
  313. package/useShareLink/useShareLink.d.ts +0 -23
  314. package/useShareLink/useShareLink.d.ts.map +0 -1
  315. package/useShareRecipientsCount/useShareRecipientsCount.d.ts.map +0 -1
  316. package/useToolsMenu/useToolsMenu.d.ts +0 -31
  317. package/useToolsMenu/useToolsMenu.d.ts.map +0 -1
  318. package/useViewportWidth/useViewportWidth.d.ts +0 -3
  319. package/useViewportWidth/useViewportWidth.d.ts.map +0 -1
@@ -0,0 +1,1344 @@
1
+ import { Annotation } from '@epam/ai-dial-chat-shared';
2
+ import { AnnotationGroup } from '@epam/ai-dial-quotations';
3
+ import { ArchiveItemDto } from '@epam/ai-dial-chat-api-client';
4
+ import { Attachment } from '@epam/ai-dial-chat-shared';
5
+ import { AttachmentDisplayResolvers } from '@epam/ai-dial-chat-shared';
6
+ import { AttachmentResource } from '@epam/ai-dial-chat-shared';
7
+ import { CopyFilesResponseDto } from '@epam/ai-dial-chat-api-client';
8
+ import { CopyItemDto } from '@epam/ai-dial-chat-api-client';
9
+ import { CreateFolderDto } from '@epam/ai-dial-chat-api-client';
10
+ import { CreateFolderResponseDto } from '@epam/ai-dial-chat-api-client';
11
+ import { CustomVisualizer } from '@epam/ai-dial-chat-shared';
12
+ import type { CustomVisualizerDataLayout } from '@epam/ai-dial-chat-shared';
13
+ import { DeleteFilesResponseDto } from '@epam/ai-dial-chat-api-client';
14
+ import { DeleteItemDto } from '@epam/ai-dial-chat-api-client';
15
+ import { DialCopiedItem } from '@epam/ai-dial-react-file-manager';
16
+ import { DialDeletedItem } from '@epam/ai-dial-react-file-manager';
17
+ import { DialFile } from '@epam/ai-dial-react-file-manager';
18
+ import { DialFile as DialFile_2 } from '@epam/ai-dial-ui-kit';
19
+ import { DialFileAcceptType } from '@epam/ai-dial-react-file-manager';
20
+ import { DialFileManagerActionProfile } from '@epam/ai-dial-chat-shared';
21
+ import { DialFileManagerActions } from '@epam/ai-dial-react-file-manager';
22
+ import { DialFileManagerTabs } from '@epam/ai-dial-react-file-manager';
23
+ import { DialFileManagerVariant } from '@epam/ai-dial-chat-shared';
24
+ import { DialFilePermission } from '@epam/ai-dial-react-file-manager';
25
+ import { DialUploadFileItem } from '@epam/ai-dial-react-file-manager';
26
+ import { DiscardSharedItemDto } from '@epam/ai-dial-chat-api-client';
27
+ import { DiscardSharedResponseDto } from '@epam/ai-dial-chat-api-client';
28
+ import { DisplayAttachment } from '@epam/ai-dial-chat-shared';
29
+ import { FileManagerColumnKey } from '@epam/ai-dial-react-file-manager';
30
+ import { FileMetadataResponseDto } from '@epam/ai-dial-chat-api-client';
31
+ import { FilesApi } from '@epam/ai-dial-chat-api-client';
32
+ import { FileUploadBatchState } from '@epam/ai-dial-chat-shared';
33
+ import { FileUploadEntry } from '@epam/ai-dial-chat-shared';
34
+ import { FileUploadResponseDto } from '@epam/ai-dial-chat-api-client';
35
+ import { FileUploadStatus } from '@epam/ai-dial-chat-shared';
36
+ import { FileUploadValidationResult } from '@epam/ai-dial-chat-shared';
37
+ import { getParentFolderPath } from '@epam/ai-dial-chat-shared';
38
+ import type { InputHighlightData } from '@epam/pdf-highlighter-kit';
39
+ import { ListFilesItemDto } from '@epam/ai-dial-chat-api-client';
40
+ import { ListFilesResponseDto } from '@epam/ai-dial-chat-api-client';
41
+ import { ListPublicFilesRequest } from '@epam/ai-dial-chat-api-client';
42
+ import { ListSharedFilesRequest } from '@epam/ai-dial-chat-api-client';
43
+ import { MessageAttachment } from '@epam/ai-dial-chat-shared';
44
+ import { MoveFilesResponseDto } from '@epam/ai-dial-chat-api-client';
45
+ import { MoveItemDto } from '@epam/ai-dial-chat-api-client';
46
+ import { NotificationVariant } from '@epam/ai-dial-ui-kit';
47
+ import { RenameFilesResponseDto } from '@epam/ai-dial-chat-api-client';
48
+ import { RenameItemDto } from '@epam/ai-dial-chat-api-client';
49
+ import { RevokeAccessItemDto } from '@epam/ai-dial-chat-api-client';
50
+ import { RevokeAccessResponseDto } from '@epam/ai-dial-chat-api-client';
51
+ import { TabModel } from '@epam/ai-dial-ui-kit';
52
+ import { ToolbarOptions } from '@epam/ai-dial-react-file-manager';
53
+ import { UploadArchiveResponseDto } from '@epam/ai-dial-chat-api-client';
54
+ import { useGridEditingScroll } from '@epam/ai-dial-chat-shared';
55
+ import { UseGridEditingScrollOptions } from '@epam/ai-dial-chat-shared';
56
+ import { UseGridEditingScrollResult } from '@epam/ai-dial-chat-shared';
57
+
58
+ /** Maps an annotation's source attachment to the display-only attachment model. */
59
+ export declare const annotationToDisplayAttachment: (annotation: Annotation) => DisplayAttachment | null;
60
+
61
+ /**
62
+ * Builds a `PdfCanvasContent` for a PDF citation annotation, including highlights
63
+ * for all annotations in the same source group and scroll target for the clicked one.
64
+ * Returns `null` if the annotation has no PDF source attachment.
65
+ */
66
+ export declare const annotationToPdfCanvasContent: (annotation: Annotation, groups: AnnotationGroup[], resolvers: AttachmentCanvasUrlResolvers) => PdfCanvasContent | null;
67
+
68
+ /**
69
+ * DIAL-file URL resolution injected by the host into every attachment-canvas
70
+ * content resolver below. Host-owned — encodes the app's own
71
+ * file-download endpoint.
72
+ */
73
+ export declare interface AttachmentCanvasUrlResolvers {
74
+ /** Resolves a DIAL Core file id to a downloadable URL. */
75
+ resolveDialFileDownloadUrl: (fileId: string) => string | undefined;
76
+ /** Resolves the best downloadable DIAL-file URL from an attachment's `url` or `referenceUrl`. */
77
+ resolveDialUrl: (attachment: DisplayAttachment) => string | undefined;
78
+ }
79
+
80
+ /** The type of content the canvas can display. */
81
+ declare enum AttachmentContentType {
82
+ PlainText = 'plain_text',
83
+ Image = 'image',
84
+ Audio = 'audio',
85
+ Markdown = 'markdown',
86
+ Json = 'json',
87
+ Pdf = 'pdf',
88
+ Ooxml = 'ooxml',
89
+ Code = 'code',
90
+ Html = 'html',
91
+ Visualizer = 'visualizer',
92
+ McpApp = 'mcp_app',
93
+ Unsupported = 'unsupported',
94
+ Error = 'error',
95
+ }
96
+
97
+ /** Maps Chat API attachment DTOs to display-only attachment models. */
98
+ export declare const attachmentDtosToDisplayAttachments: (dtos: MessageAttachment[] | undefined, resolvers: AttachmentDisplayResolvers) => DisplayAttachment[];
99
+
100
+ /**
101
+ * Maps a message attachment payload to the display-only attachment model used by UI components.
102
+ */
103
+ export declare const attachmentDtoToDisplayAttachment: (dto: MessageAttachment, resolvers: AttachmentDisplayResolvers) => DisplayAttachment;
104
+
105
+ /** The kind of failure that produced an `ErrorCanvasContent`. */
106
+ declare enum AttachmentErrorType {
107
+ /** The file failed to load (network error or a non-`403` non-OK response). */
108
+ LoadFailed = 'load_failed',
109
+ /** The file request failed with HTTP `403` — the user lacks permission to access it. */
110
+ Forbidden = 'forbidden',
111
+ }
112
+
113
+ export declare const buildFromCache: (cache: Map<string, ListFilesItemDto[]>, listingPermissionsCache: Map<string, string[] | undefined>, apiPath: string, virtualBasePath: string, folderId: string) => DialFile[];
114
+
115
+ /**
116
+ * Converts a bucket-relative path (e.g. "reports/q1.pdf") to the virtual
117
+ * DialFile.path format ("/My files/reports/q1.pdf") that ui-kit compares
118
+ * row items against for `sharedByMePaths`/`sharedWithMeIds` gating — the
119
+ * DIAL Core resource path ("files/{bucket}/...") is a different identifier
120
+ * space and never matches. Decodes each path segment independently, matching
121
+ * how buildFromCache derives virtual paths.
122
+ */
123
+ export declare const buildSharedItemVirtualPath: (relativePath: string, rootLabel: string, isFolder: boolean) => string;
124
+
125
+ /** Clears all cached fetch results. Call this when leaving a conversation. */
126
+ export declare const clearAttachmentCache: () => void;
127
+
128
+ /** Content payload for syntax-highlighted source-code or text file attachments. */
129
+ declare interface CodeCanvasContent {
130
+ /** Discriminates the content type to select the correct renderer. */
131
+ type: AttachmentContentType.Code;
132
+ /** The raw source text to display. */
133
+ text: string;
134
+ /** `react-syntax-highlighter` language identifier (e.g. `'typescript'`). `undefined` renders plain monospace. */
135
+ language?: string;
136
+ }
137
+
138
+ export declare const COLUMNS_WITH_AUTHOR: FileManagerColumnKey[];
139
+
140
+ export declare const COLUMNS_WITHOUT_AUTHOR: FileManagerColumnKey[];
141
+
142
+ export declare interface CopyMoveResult {
143
+ success?: boolean;
144
+ sourcePath?: string;
145
+ destinationPath?: string;
146
+ }
147
+
148
+ export declare const CORE_PERMISSION_MAP: Record<string, DialFilePermission>;
149
+
150
+ /**
151
+ * Builds the DIAL files API wrapper functions `apps/chat/src/server-api/files.api.ts`
152
+ * exposes today, delegating to an already-configured `FilesApi` instance and
153
+ * an injected progress-reporting upload function.
154
+ */
155
+ export declare const createFilesApiClient: (filesApi: FilesApi, uploadFileWithProgress: UploadFileWithProgressFn) => FilesApiClient;
156
+
157
+ /**
158
+ * Builds a progress-reporting file-upload function backed by
159
+ * `XMLHttpRequest` (needed because the `fetch`-based generated client has no
160
+ * upload-progress event), reporting progress, honoring an `AbortSignal`,
161
+ * attaching/rotating a CSRF token, and reporting an unauthorized response.
162
+ */
163
+ export declare const createUploadFileWithProgress: (deps: CreateUploadFileWithProgressDeps) => UploadFileWithProgressFn;
164
+
165
+ /** Host capabilities {@link createUploadFileWithProgress} needs to perform an XHR upload. */
166
+ export declare interface CreateUploadFileWithProgressDeps {
167
+ /** Returns the currently held CSRF token, or `null` when none is set. */
168
+ getCsrfToken: () => string | null;
169
+ /** Stores a CSRF token captured from the upload response header. */
170
+ setCsrfToken: (token: string | null) => void;
171
+ /** Notifies the host that the upload request was unauthorized. */
172
+ notifyUnauthorized: (url: string) => void;
173
+ /** Constructs the error thrown to signal an unauthorized upload. */
174
+ createUnauthorizedError: (url: string) => Error;
175
+ /** The upload endpoint's URL. */
176
+ uploadUrl: string;
177
+ /** Builds the `XMLHttpRequest` instance to upload through. Defaults to `() => new XMLHttpRequest()`. */
178
+ xhrFactory?: () => XMLHttpRequest;
179
+ }
180
+
181
+ export declare const DATE_OPTIONS: Intl.DateTimeFormatOptions;
182
+
183
+ export declare const deriveActionProfile: (variant: DialFileManagerVariant) => DialFileManagerActionProfile;
184
+
185
+ /** Strip the "files/{bucket}/" prefix from a DIAL Core URL to get the path within the bucket. */
186
+ export declare const dialCorePathToRelative: (dialCorePath: string, bucket: string) => string;
187
+
188
+ export { DialFileManagerActionProfile }
189
+
190
+ export { DialFileManagerVariant }
191
+
192
+ /**
193
+ * Operation port every file-manager hook that performs network I/O accepts as
194
+ * a parameter, replacing direct `server-api/files.api` access. Mirrors
195
+ * `apps/chat/src/server-api/files.api.ts`'s exact function signatures — not
196
+ * the generated client's own method shapes — since that file wraps
197
+ * `uploadFile`/`uploadArchive` with custom XHR-based progress/cancellation
198
+ * that has no equivalent in the generated client.
199
+ */
200
+ export declare interface DialFilesApi {
201
+ /** Lists files/folders directly under `params.path` within `params.bucket`. */
202
+ listFiles(params: {
203
+ bucket: string;
204
+ path?: string;
205
+ token?: string;
206
+ limit?: number;
207
+ recursive?: boolean;
208
+ permissions?: boolean;
209
+ }, signal?: AbortSignal): Promise<ListFilesResponseDto>;
210
+ /** Lists files/folders under the organization's public root. */
211
+ listPublicFiles(params: ListPublicFilesRequest): Promise<ListFilesResponseDto>;
212
+ /** Lists files/folders shared with the current user. */
213
+ listSharedFiles(params: ListSharedFilesRequest): Promise<ListFilesResponseDto>;
214
+ /** Lists items the current user has shared with others, from their own bucket. */
215
+ listSharedByMe(bucket: string): Promise<ListFilesResponseDto>;
216
+ /** Fetches metadata for a single file or folder. */
217
+ getFileMetadata(params: {
218
+ bucket: string;
219
+ path: string;
220
+ }): Promise<FileMetadataResponseDto>;
221
+ /**
222
+ * Uploads a file, reporting progress via `options.onProgress` when supplied
223
+ * and honoring cancellation via `options.signal` or a bare `AbortSignal`.
224
+ */
225
+ uploadFile(bucket: string, path: string, file: File, options?: AbortSignal | DialFilesApiUploadOptions): Promise<FileUploadResponseDto>;
226
+ /** Uploads a ZIP archive and extracts its entries under `destinationPath`. */
227
+ uploadArchive(file: File, bucket: string, destinationPath: string): Promise<UploadArchiveResponseDto>;
228
+ /** Creates a new folder. */
229
+ createFolder(params: CreateFolderDto): Promise<CreateFolderResponseDto>;
230
+ /** Deletes one or more files/folders. */
231
+ deleteFiles(items: DeleteItemDto[]): Promise<DeleteFilesResponseDto>;
232
+ /** Renames one or more files/folders in place (same parent folder). */
233
+ renameFiles(items: RenameItemDto[]): Promise<RenameFilesResponseDto>;
234
+ /** Copies one or more files/folders to a destination path. */
235
+ copyFiles(items: CopyItemDto[], signal?: AbortSignal): Promise<CopyFilesResponseDto>;
236
+ /** Moves one or more files/folders to a destination path (different parent folder). */
237
+ moveFiles(items: MoveItemDto[], signal?: AbortSignal): Promise<MoveFilesResponseDto>;
238
+ /** Downloads a single file, returning the raw fetch `Response`. */
239
+ downloadFile(bucket: string, path: string, signal?: AbortSignal): Promise<Response>;
240
+ /** Downloads a ZIP archive of the given items, returning the raw fetch `Response`. */
241
+ downloadArchive(items: ArchiveItemDto[]): Promise<Response>;
242
+ /** Revokes access previously granted on the given owned items. */
243
+ revokeAccess(items: RevokeAccessItemDto[]): Promise<RevokeAccessResponseDto>;
244
+ /** Discards items shared with the current user. */
245
+ discardShared(items: DiscardSharedItemDto[]): Promise<DiscardSharedResponseDto>;
246
+ }
247
+
248
+ /** Upload mode passed through to `DialFilesApi.uploadFile` — mirrors the BFF's `uploadMode` form field. */
249
+ export declare enum DialFilesApiUploadMode {
250
+ Overwrite = "overwrite",
251
+ CreateOnly = "create-only"
252
+ }
253
+
254
+ /** Options accepted by `DialFilesApi.uploadFile` beyond an already-created `AbortSignal`. */
255
+ export declare interface DialFilesApiUploadOptions {
256
+ /** Aborts the in-flight upload when triggered. */
257
+ signal?: AbortSignal;
258
+ /** Called with the 0–100 upload progress percentage when the transport reports byte progress. */
259
+ onProgress?: (percent: number) => void;
260
+ /** Controls create-only vs. overwrite semantics for the destination path. */
261
+ uploadMode?: DialFilesApiUploadMode;
262
+ }
263
+
264
+ /** Maps a batch of selected DIAL files to attachments, dropping folders and unresolvable entries. */
265
+ export declare const dialFilesToAttachments: (files: DialFile_2[], bucket: string, options?: DialFileToAttachmentOptions) => Attachment[];
266
+
267
+ /**
268
+ * Converts a selected ui-kit file into the generic attachment contract.
269
+ * DIAL storage identifiers are resolved at the app edge so the input library
270
+ * remains unaware of buckets, server routes, and external file systems.
271
+ */
272
+ export declare const dialFileToAttachment: (file: DialFile_2, bucket: string, options?: DialFileToAttachmentOptions) => Attachment | null;
273
+
274
+ /** Options for {@link dialFileToAttachment} and {@link dialFilesToAttachments}. */
275
+ export declare interface DialFileToAttachmentOptions {
276
+ /**
277
+ * Resolves an image attachment's `previewUrl` from its DIAL resource URL.
278
+ * Left unset, image attachments get no `previewUrl`. The host owns bucket/
279
+ * icon-path REST construction — this hook never builds those URLs itself.
280
+ */
281
+ resolvePreviewUrl?: (url: string) => string | undefined;
282
+ }
283
+
284
+ /**
285
+ * Converts a DIAL Core folder path (e.g. `files/{bucket}/{path}/`) into an
286
+ * attachment. DIAL Core resolves folder contents server-side when the path is
287
+ * sent as an attachment URL.
288
+ */
289
+ export declare const dialFolderPathToAttachment: (folderPath: string) => Attachment;
290
+
291
+ /** Discriminated destination a host resolves for a download, passed back into `triggerDownload`. */
292
+ export declare type DownloadDestination = {
293
+ type: DownloadDestinationType.Blob;
294
+ } | {
295
+ type: DownloadDestinationType.Stream;
296
+ writable: WritableStream<Uint8Array>;
297
+ } | {
298
+ type: DownloadDestinationType.Cancelled;
299
+ };
300
+
301
+ /**
302
+ * Host-injected seam for `useDialFileMutations.onDownloadFiles`, replacing a
303
+ * direct import of the app's browser "Save As" / auto-download utilities —
304
+ * that behavior is desktop/web-shell-specific, not file-manager domain logic.
305
+ */
306
+ export declare interface DownloadDestinationHandlers {
307
+ /** Resolves where a download with the given file name/MIME type should be written. */
308
+ resolveDestination(filename: string, mimeType: string): Promise<DownloadDestination>;
309
+ /** Writes `response` to `destination` and returns the name it was saved under. */
310
+ triggerDownload(response: Response, fallbackName: string, destination: DownloadDestination): Promise<string>;
311
+ }
312
+
313
+ /**
314
+ * Where a downloaded file's bytes should be written. Mirrors the host's own
315
+ * "Save As" vs. blob-download vs. cancelled-picker outcomes without the lib
316
+ * depending on the host's browser-API implementation.
317
+ */
318
+ export declare enum DownloadDestinationType {
319
+ Blob = "blob",
320
+ Stream = "stream",
321
+ Cancelled = "cancelled"
322
+ }
323
+
324
+ /** Content payload for attachments whose file failed to load or that the user cannot access. */
325
+ declare interface ErrorCanvasContent {
326
+ /** Discriminates the content type to select the correct renderer. */
327
+ type: AttachmentContentType.Error;
328
+ /** The kind of failure that occurred. */
329
+ errorType: AttachmentErrorType;
330
+ /** Remote URL of the file, if known. Ignored for download purposes when `errorType` is `Forbidden`. */
331
+ url?: string;
332
+ /** Overrides the default `loadErrorLabel`/`forbiddenErrorLabel` message, for callers whose failed content isn't a generic "file" (e.g. an MCP App). */
333
+ label?: string;
334
+ }
335
+
336
+ export declare const fetchByTab: (filesApi: DialFilesApi, tab: DialFileManagerTabs, bucket: string, folderPath: string, sharedRootMeta: Map<string, SharedRootMeta>) => Promise<{
337
+ items: ListFilesItemDto[];
338
+ permissions?: string[];
339
+ }>;
340
+
341
+ export declare const fetchForSearch: (filesApi: DialFilesApi, tab: DialFileManagerTabs, bucket: string, folderPath: string, sharedRootMeta: Map<string, SharedRootMeta>) => Promise<{
342
+ items: ListFilesItemDto[];
343
+ }>;
344
+
345
+ /**
346
+ * Structured toast event emitted by file-manager hooks. `reason` carries a
347
+ * library-owned identifier the host translates; `message` is an optional
348
+ * pre-rendered fallback for notifications a hook composes without a `reason`
349
+ * (e.g. hosts still authoring their own text for hooks not yet covered by a
350
+ * `FileManagerNotificationReason` member). The remaining fields carry the
351
+ * data a host needs to interpolate its translated string for reasons whose
352
+ * wording depends on more than the reason itself.
353
+ */
354
+ export declare interface FileManagerNotification {
355
+ variant: NotificationVariant;
356
+ title?: string;
357
+ message?: string;
358
+ reason?: FileManagerNotificationReason;
359
+ /** Number of items the notification covers (e.g. a partial-failure count). */
360
+ count?: number;
361
+ /** Name of the affected entity or first successfully affected item. */
362
+ name?: string;
363
+ /** Source or destination folder name the notification refers to. */
364
+ folder?: string;
365
+ /** Up to the first 5 names affected by a partial/full failure list (e.g. archive extraction, delete). */
366
+ names?: string[];
367
+ /** Count of additional affected items beyond `names`' limit. */
368
+ restCount?: number;
369
+ }
370
+
371
+ /**
372
+ * Library-owned identifier for why a file-manager hook is surfacing an
373
+ * `onNotification` event, replacing a pre-translated toast message. The host
374
+ * maps each reason to its own translated string.
375
+ */
376
+ export declare enum FileManagerNotificationReason {
377
+ /** A folder listing fetch (initial load, expand, invalidate-refetch, or popup preload) failed. */
378
+ FolderLoadFailed = "folderLoadFailed",
379
+ /** A single-file/folder metadata fetch (`onGetInfo`) failed. */
380
+ MetadataLoadFailed = "metadataLoadFailed",
381
+ /** `onCreateFolder`'s `createFolder` call failed. */
382
+ FolderCreateFailed = "folderCreateFailed",
383
+ /** `onDownloadFiles` failed for a single file/folder selection. */
384
+ DownloadFileFailed = "downloadFileFailed",
385
+ /** `onDownloadFiles` failed for a multi-item selection. */
386
+ DownloadFilesFailed = "downloadFilesFailed",
387
+ /** `onDeleteFiles` deleted at least one item successfully; `count`/`name`/`folder` describe the result. */
388
+ FilesDeleted = "filesDeleted",
389
+ /** `onDeleteFiles` completed with at least one failure alongside a success; `names`/`restCount` list the failures. */
390
+ FilesDeletePartiallyFailed = "filesDeletePartiallyFailed",
391
+ /** `onDeleteFiles`'s `deleteFiles` request itself rejected. */
392
+ DeleteFailed = "deleteFailed",
393
+ /** `onMoveToFiles`'s rename branch failed for every item in the batch. */
394
+ RenameFailed = "renameFailed",
395
+ /** `onMoveToFiles`'s rename branch failed for some items; `count` is the failed count. */
396
+ RenamePartiallyFailed = "renamePartiallyFailed",
397
+ /** `onMoveToFiles`'s move branch failed for every item in the batch. */
398
+ MoveFailed = "moveFailed",
399
+ /** `onMoveToFiles`'s move branch failed for some items; `count` is the failed count. */
400
+ MovePartiallyFailed = "movePartiallyFailed",
401
+ /** `onCopyFiles` failed for every item in the batch. */
402
+ CopyFailed = "copyFailed",
403
+ /** `onCopyFiles` failed for some items; `count` is the failed count. */
404
+ CopyPartiallyFailed = "copyPartiallyFailed",
405
+ /** `useDialFileSharing`'s `onUnshareFiles` request failed. */
406
+ UnshareFailed = "unshareFailed",
407
+ /** `useDialFileSharing`'s `onRemoveFilesAccess` request failed. */
408
+ RemoveAccessFailed = "removeAccessFailed",
409
+ /** `useDialFileUploadBatch`'s plain-file batch had zero successful uploads. */
410
+ UploadFailed = "uploadFailed",
411
+ /** `useDialFileUploadBatch`'s plain-file batch completed (fully or partially successful). */
412
+ UploadCompleted = "uploadCompleted",
413
+ /** `onUploadArchive` extracted zero entries successfully; `names`/`restCount` list the failures. */
414
+ UploadArchiveFailed = "uploadArchiveFailed",
415
+ /** `onUploadArchive` extracted some entries successfully and some failed; `count`/`names`/`restCount` describe the failures. */
416
+ UploadArchivePartiallyFailed = "uploadArchivePartiallyFailed",
417
+ /** `onUploadArchive`'s `uploadArchive` request itself rejected. */
418
+ UploadArchiveRequestFailed = "uploadArchiveRequestFailed"
419
+ }
420
+
421
+ /**
422
+ * Discriminated validation failure returned by `onCreateFolderValidate`/
423
+ * `onRenameValidate` instead of a pre-translated message; `null` means the
424
+ * name is valid. The host maps each `reason` to its own translated string.
425
+ */
426
+ export declare type FileNameValidationError = {
427
+ reason: FileNameValidationErrorReason.Empty;
428
+ } | {
429
+ reason: FileNameValidationErrorReason.ForbiddenSymbols;
430
+ symbols: string;
431
+ } | {
432
+ reason: FileNameValidationErrorReason.ReservedName;
433
+ } | {
434
+ reason: FileNameValidationErrorReason.TooLong;
435
+ maxLength: number;
436
+ } | {
437
+ reason: FileNameValidationErrorReason.DuplicateName;
438
+ existingName: string;
439
+ } | {
440
+ reason: FileNameValidationErrorReason.LeadingDot;
441
+ };
442
+
443
+ /**
444
+ * Reason a file/folder name failed `onCreateFolderValidate`/
445
+ * `onRenameValidate`'s validation, used as the discriminant of
446
+ * `FileNameValidationError`.
447
+ */
448
+ export declare enum FileNameValidationErrorReason {
449
+ Empty = "empty",
450
+ ForbiddenSymbols = "forbiddenSymbols",
451
+ ReservedName = "reservedName",
452
+ TooLong = "tooLong",
453
+ DuplicateName = "duplicateName",
454
+ LeadingDot = "leadingDot"
455
+ }
456
+
457
+ /**
458
+ * Kind of mutation `useDialFileMutations` just completed successfully, for
459
+ * `onOperationSuccess`. Delete has no member here — its success feedback
460
+ * stays a structured `onNotification` event since it needs a count/folder,
461
+ * not a single named entity.
462
+ */
463
+ export declare enum FileOperationKind {
464
+ FolderCreated = "folderCreated",
465
+ FileRenamed = "fileRenamed",
466
+ FileDownloaded = "fileDownloaded",
467
+ FilesDownloaded = "filesDownloaded",
468
+ FileCopied = "fileCopied",
469
+ FilesCopied = "filesCopied",
470
+ FileMoved = "fileMoved",
471
+ FilesMoved = "filesMoved"
472
+ }
473
+
474
+ /**
475
+ * Structured success event `useDialFileMutations` emits through
476
+ * `onOperationSuccess` instead of calling an application notification
477
+ * service directly.
478
+ */
479
+ export declare interface FileOperationSuccessEvent {
480
+ /** Which mutation just succeeded. */
481
+ kind: FileOperationKind;
482
+ /** Name of the affected entity or first successfully affected item, when applicable. */
483
+ name?: string;
484
+ /** Number of items the operation covered, when applicable. */
485
+ count?: number;
486
+ /** Destination folder name, for copy/move operations. */
487
+ destinationFolderName?: string;
488
+ /**
489
+ * Whether the affected item is a folder rather than a file. Only set for
490
+ * `fileRenamed`, since it is the only kind whose current wording depends
491
+ * on the item's node type (a rename toast reads "Folder renamed" vs.
492
+ * "File renamed").
493
+ */
494
+ isFolder?: boolean;
495
+ }
496
+
497
+ /** The DIAL files API surface produced by {@link createFilesApiClient}. */
498
+ export declare interface FilesApiClient {
499
+ listPublicFiles: (params: ListPublicFilesRequest) => Promise<ListFilesResponseDto>;
500
+ listSharedFiles: (params: ListSharedFilesRequest) => Promise<ListFilesResponseDto>;
501
+ listFiles: (params: {
502
+ bucket: string;
503
+ path?: string;
504
+ token?: string;
505
+ limit?: number;
506
+ recursive?: boolean;
507
+ permissions?: boolean;
508
+ }, signal?: AbortSignal) => Promise<ListFilesResponseDto>;
509
+ uploadFile: (bucket: string, path: string, file: File, options?: AbortSignal | UploadFileOptions) => Promise<FileUploadResponseDto>;
510
+ uploadArchive: (file: File, bucket: string, destinationPath: string) => Promise<UploadArchiveResponseDto>;
511
+ getFileMetadata: (params: {
512
+ bucket: string;
513
+ path: string;
514
+ }) => Promise<FileMetadataResponseDto>;
515
+ downloadFile: (bucket: string, path: string, signal?: AbortSignal) => Promise<Response>;
516
+ createFolder: (params: CreateFolderDto) => Promise<CreateFolderResponseDto>;
517
+ deleteFiles: (items: DeleteItemDto[]) => Promise<DeleteFilesResponseDto>;
518
+ renameFiles: (items: RenameItemDto[]) => Promise<RenameFilesResponseDto>;
519
+ copyFiles: (items: CopyItemDto[], signal?: AbortSignal) => Promise<CopyFilesResponseDto>;
520
+ moveFiles: (items: MoveItemDto[], signal?: AbortSignal) => Promise<MoveFilesResponseDto>;
521
+ downloadArchive: (items: ArchiveItemDto[]) => Promise<Response>;
522
+ revokeAccess: (items: RevokeAccessItemDto[]) => Promise<RevokeAccessResponseDto>;
523
+ discardShared: (items: DiscardSharedItemDto[]) => Promise<DiscardSharedResponseDto>;
524
+ listSharedByMe: (bucket: string) => Promise<ListFilesResponseDto>;
525
+ }
526
+
527
+ export { FileUploadValidationResult }
528
+
529
+ export declare const findDialFileByPath: (nodes: DialFile[], targetPath: string) => DialFile | undefined;
530
+
531
+ export declare const findFirstSuccessfulCopyMoveItem: <TDto extends {
532
+ success?: boolean;
533
+ sourcePath?: string;
534
+ destinationPath?: string;
535
+ }>(items: PreparedCopyMoveItem<TDto>[], results: {
536
+ success?: boolean;
537
+ sourcePath?: string;
538
+ destinationPath?: string;
539
+ }[]) => PreparedCopyMoveItem<TDto> | undefined;
540
+
541
+ export declare const findFolderByVirtualPath: (nodes: DialFile[], virtualPath: string) => DialFile | undefined;
542
+
543
+ export declare const formatOperationFolderName: (destinationFolder: string, rootLabel: string) => string;
544
+
545
+ export { getParentFolderPath }
546
+
547
+ /**
548
+ * Returns the last path segment of `url` — its file name — for both absolute
549
+ * URLs and DIAL-relative resource paths such as
550
+ * `files/<bucket>/qa-routed-source.html`. Any query string or hash is dropped
551
+ * and percent escapes are decoded. Returns an empty string when no segment can
552
+ * be extracted. Used to classify a resource by extension when its display name
553
+ * is a citation title rather than a file name.
554
+ */
555
+ export declare const getUrlFileName: (url: string) => string;
556
+
557
+ export declare const getVirtualPathName: (virtualPath: string, fallback: string) => string;
558
+
559
+ /**
560
+ * Whether the attachment carries text `resolveAttachmentText` can resolve —
561
+ * inline data, a DIAL download URL, or a locally-picked file. Mirrors that
562
+ * function's source list, so a `null` resolver result can be read as "the text
563
+ * was fetched and rejected" rather than "there was no text to fetch".
564
+ */
565
+ export declare const hasAttachmentTextSource: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => boolean;
566
+
567
+ export declare const hasDialFileWritePermission: (folder?: DialFile) => boolean;
568
+
569
+ export declare const hasForbiddenNameSymbols: (name: string, forbiddenSymbolsRegExp?: RegExp) => boolean;
570
+
571
+ /** Content payload for HTML file attachments or external HTML URL sources. */
572
+ declare interface HtmlCanvasContent {
573
+ /** Discriminates the content type to select the correct renderer. */
574
+ type: AttachmentContentType.Html;
575
+ /** Full HTML text rendered via `srcdoc` in a sandboxed iframe. Used for file attachments. */
576
+ srcdoc?: string;
577
+ /** External URL rendered via `src` in a sandboxed iframe. Used for external link sources. */
578
+ url?: string;
579
+ }
580
+
581
+ /** Content payload for image attachments. */
582
+ declare interface ImageCanvasContent {
583
+ /** Discriminates the content type to select the correct renderer. */
584
+ type: AttachmentContentType.Image;
585
+ /** URL of the image to display (object URL or resolved download URL). */
586
+ url: string;
587
+ }
588
+
589
+ /** Copy/Move/Duplicate are Browse/Full-only — the attach picker excludes them. */
590
+ export declare const isCopyMoveDuplicateAllowed: (actionProfile: DialFileManagerActionProfile) => boolean;
591
+
592
+ /** Narrows a string to a `DialFileAcceptType` — a dotted extension or a MIME type/wildcard. */
593
+ export declare const isDialFileAcceptType: (type: string) => type is DialFileAcceptType;
594
+
595
+ /** True when `url` looks like a DIAL Core file id (`files/{bucket}/{path}`). */
596
+ export declare const isDialFileId: (url: string) => boolean;
597
+
598
+ /** Returns true when an external (non-DIAL) source URL should be opened in the canvas rather than a new browser tab. */
599
+ export declare const isExternalSourcePreviewable: (contentType: string, url: string) => boolean;
600
+
601
+ /** Share/Unshare/Remove access are Full-only — Browse and Attach never expose them. */
602
+ export declare const isShareActionsAllowed: (actionProfile: DialFileManagerActionProfile) => boolean;
603
+
604
+ /** Content payload for JSON file attachments. */
605
+ declare interface JsonCanvasContent {
606
+ /** Discriminates the content type to select the correct renderer. */
607
+ type: AttachmentContentType.Json;
608
+ /** Already-parsed JSON value. The lib never calls JSON.parse. */
609
+ value: unknown;
610
+ }
611
+
612
+ export declare const mapCorePermissions: (permissions?: string[]) => DialFile["permissions"] | undefined;
613
+
614
+ /**
615
+ * Overlays a `FileMetadataResponseDto` response onto the clicked grid row so
616
+ * `fileMetadataPopupOptions.fileMetadata` receives a value structurally
617
+ * consistent with any other `DialFile` — the row already carries the correct
618
+ * virtual `path`/`id`/`name`/`nodeType`/`folderId`, while size/date/author/
619
+ * permissions are refreshed from the just-fetched server response.
620
+ */
621
+ export declare const mapFileMetadataToDialFile: (metadata: FileMetadataResponseDto, original: DialFile) => DialFile;
622
+
623
+ export declare const mapSearchItem: (item: ListFilesItemDto, fallbackBucket: string, rootLabel: string) => DialFile;
624
+
625
+ /** Content payload for Markdown file attachments. */
626
+ declare interface MarkdownCanvasContent {
627
+ /** Discriminates the content type to select the correct renderer. */
628
+ type: AttachmentContentType.Markdown;
629
+ /** Raw Markdown string to render. */
630
+ text: string;
631
+ }
632
+
633
+ export declare const mergeCreatedFolderIntoCache: (cache: Map<string, ListFilesItemDto[]>, parentApiPath: string, created: CreateFolderResponseDto, inheritedPermissions?: string[]) => Map<string, ListFilesItemDto[]>;
634
+
635
+ /** Formats MIME types as a human-readable, comma-separated list of dotted extensions (or the MIME type itself for wildcards). */
636
+ export declare const mimeTypesToAttachmentExtensionLabels: (types: string[]) => string;
637
+
638
+ /** Normalizes `*` to the all-files wildcard and drops any value that is not a valid `DialFileAcceptType`. */
639
+ export declare const mimeTypesToDialFileAcceptTypes: (types?: string[]) => DialFileAcceptType[] | undefined;
640
+
641
+ /**
642
+ * Builds an `<input accept>` string from resolved MIME types, filtering out
643
+ * any value `isDialFileAcceptType` rejects, or `undefined` when no types are
644
+ * given or any type accepts everything.
645
+ */
646
+ export declare const mimeTypesToFileAccept: (types?: string[]) => string | undefined;
647
+
648
+ export declare const normalizeVirtualPath: (value: string) => string;
649
+
650
+ /** Content payload for Office Open XML document attachments. */
651
+ declare interface OoxmlCanvasContent {
652
+ /** Discriminates the content type to select the correct renderer. */
653
+ type: AttachmentContentType.Ooxml;
654
+ /** Resolved download URL or object URL for the OOXML file. */
655
+ url: string;
656
+ /** The document format used to select the format-specific renderer. */
657
+ format: OoxmlFileType;
658
+ }
659
+
660
+ /** Supported Office Open XML document formats. */
661
+ declare enum OoxmlFileType {
662
+ Docx = 'docx',
663
+ Xlsx = 'xlsx',
664
+ Pptx = 'pptx',
665
+ }
666
+
667
+ /**
668
+ * Opens a cited/referenced attachment: triggers a browser download for
669
+ * DIAL-hosted files (`files/...` ids) via the injected `resolveDownloadUrl`,
670
+ * otherwise opens the URL in a new tab. No-ops when the attachment has no
671
+ * URL or the download URL cannot be resolved.
672
+ */
673
+ export declare const openAnnotationAttachment: (attachment: AttachmentResource, resolveDownloadUrl: ResolveDownloadUrl) => void;
674
+
675
+ export declare const parseNewFolderVirtualPath: (newFolderVirtualPath: string, rootLabel: string) => {
676
+ parentVirtualPath: string;
677
+ name: string;
678
+ };
679
+
680
+ export declare const PATH_SEPARATOR_REGEXP: RegExp;
681
+
682
+ /** Content payload for PDF file attachments. */
683
+ declare interface PdfCanvasContent {
684
+ /** Discriminates the content type to select the correct renderer. */
685
+ type: AttachmentContentType.Pdf;
686
+ /** Resolved download URL or object URL for the PDF file. */
687
+ url: string;
688
+ /** Highlight regions to render over the PDF pages. */
689
+ highlights?: InputHighlightData[];
690
+ /** ID of the highlight to scroll to and select on initial load. */
691
+ selectedHighlightId?: string;
692
+ }
693
+
694
+ /** Content payload for plain-text attachments. */
695
+ declare interface PlainTextCanvasContent {
696
+ /** Discriminates the content type to select the correct renderer. */
697
+ type: AttachmentContentType.PlainText;
698
+ /** The raw text to display. */
699
+ text: string;
700
+ }
701
+
702
+ /** Builds the `copyFiles` DTOs (with their destination display name) for `onCopyFiles`. */
703
+ export declare const prepareCopyItems: (copiedItems: DialCopiedItem[], bucket: string, rootLabel: string) => PreparedCopyMoveItem<CopyItemDto>[];
704
+
705
+ export declare interface PreparedCopyMoveItem<TDto> {
706
+ dto: TDto;
707
+ destinationName: string;
708
+ }
709
+
710
+ /**
711
+ * Resolves where a download should be written: the browser's native "Save
712
+ * As" picker when available (`window.showSaveFilePicker`), otherwise a
713
+ * plain blob download. Returns `Cancelled` if the user dismisses the picker.
714
+ */
715
+ export declare const prepareDownloadDestination: (filename: string, mimeType?: string) => Promise<DownloadDestination>;
716
+
717
+ /**
718
+ * Rename-vs-move disambiguation (design.md D3): entries whose parent folder
719
+ * is unchanged become `renameDtos`; entries whose parent folder changed
720
+ * become `preparedMoveItems`.
721
+ */
722
+ export declare const prepareMoveRenameItems: (copiedItems: DialCopiedItem[], bucket: string, rootLabel: string) => {
723
+ renameDtos: RenameItemDto[];
724
+ preparedMoveItems: PreparedCopyMoveItem<MoveItemDto>[];
725
+ };
726
+
727
+ /**
728
+ * Builds a `PdfCanvasContent` for a reference-only attachment whose
729
+ * `reference_url` points at a PDF file (optionally with a `#page=N`
730
+ * fragment), so it can be opened in the canvas and scrolled to the
731
+ * referenced page the same way a regular PDF citation is. Returns `null`
732
+ * when the attachment's `url` does not target a PDF.
733
+ */
734
+ export declare const referenceAttachmentToPdfCanvasContent: (attachment: AttachmentResource, resolvers: AttachmentCanvasUrlResolvers) => PdfCanvasContent | null;
735
+
736
+ /** Name reserved for the hidden marker file used to create empty folders. */
737
+ export declare const RESERVED_MARKER_NAME = ".dial_folder";
738
+
739
+ /** Resolves a syntax-highlighted code canvas content payload from a DisplayAttachment, or `null` if unavailable. */
740
+ export declare const resolveCodeCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers, language?: string) => Promise<CodeCanvasContent | ErrorCanvasContent | null>;
741
+
742
+ /**
743
+ * Resolves a DialFile to the bucket-relative API path used by files BFF endpoints.
744
+ * Prefers DIAL resource ids when present; otherwise converts DialFile.path virtual paths.
745
+ */
746
+ export declare const resolveDialFileApiPath: (file: DialFile, bucket: string, rootLabel: string) => string;
747
+
748
+ /**
749
+ * Extracts the bucket and decoded relative path from a DIAL file ID
750
+ * (`files/{bucket}/{path}`). Returns `undefined` if the input does not start
751
+ * with `files/` or has no path segment after the bucket.
752
+ */
753
+ export declare const resolveDialFileBucketAndPath: (fileId: string) => {
754
+ bucket: string;
755
+ path: string;
756
+ } | undefined;
757
+
758
+ /** Resolves a DIAL Core file id to a downloadable URL. Host-owned — encodes the app's own file-download endpoint. */
759
+ declare type ResolveDownloadUrl = (fileId: string) => string | undefined;
760
+
761
+ /**
762
+ * Returns the content type to trust for an external citation source: `contentType`
763
+ * unchanged when it is already an image/audio/PDF/OOXML marker, otherwise the
764
+ * type implied by `url`'s path extension (`MIMEType.PDF` for `.pdf`, the
765
+ * canonical OOXML MIME for `.docx`/`.xlsx`/`.pptx`) when that extension is
766
+ * recognized, otherwise `contentType` unchanged.
767
+ *
768
+ * Web-search grounding APIs label every reference — PDFs and Office documents
769
+ * included — as `text/markdown`, so a mislabeled `contentType` must not win
770
+ * over a recognized URL extension: doing so previously sent a PDF's raw bytes
771
+ * into the markdown/text canvas viewer, rendering garbled text instead of
772
+ * opening the PDF/OOXML viewer.
773
+ */
774
+ export declare const resolveExternalSourceContentType: (contentType: string, url: string) => string;
775
+
776
+ /**
777
+ * Resolves an HTML canvas content payload from a DisplayAttachment.
778
+ * Fetches and inlines the HTML as `srcdoc` when the attachment has a download URL or inline data.
779
+ * Returns `null` if no source is available, or an `ErrorCanvasContent` on fetch failure.
780
+ * Rejects `srcdoc` payloads larger than 1 MiB to prevent browser truncation.
781
+ */
782
+ export declare const resolveHtmlCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => Promise<HtmlCanvasContent | ErrorCanvasContent | null>;
783
+
784
+ /**
785
+ * Resolves an image canvas content payload from a DisplayAttachment without
786
+ * fetching — returns the BFF download URL (or a local/inline blob URL)
787
+ * directly so the browser cache can be shared with the conversation view's
788
+ * `<img>` element. Error detection is delegated to `<img onError>` in the
789
+ * canvas renderer. Returns `null` if no URL source is available.
790
+ */
791
+ export declare const resolveImageCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => ImageCanvasContent | null;
792
+
793
+ /**
794
+ * Resolves a JSON canvas content payload from a DisplayAttachment, or `null` if unavailable.
795
+ * Falls back to `PlainTextCanvasContent` when the fetched text is not valid JSON.
796
+ */
797
+ export declare const resolveJsonCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => Promise<JsonCanvasContent | PlainTextCanvasContent | ErrorCanvasContent | null>;
798
+
799
+ /** Resolves a Markdown canvas content payload from a DisplayAttachment, or `null` if unavailable. */
800
+ export declare const resolveMarkdownCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => Promise<MarkdownCanvasContent | ErrorCanvasContent | null>;
801
+
802
+ /** Resolves an OOXML canvas content payload from a DisplayAttachment, or `null` if unavailable. */
803
+ export declare const resolveOoxmlCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers, format: OoxmlFileType) => Promise<OoxmlCanvasContent | ErrorCanvasContent | null>;
804
+
805
+ /**
806
+ * Resolves the effective bucket and path for a write operation on the Shared tab.
807
+ * For Shared tab items, the first segment of apiPath is the shared root folder name
808
+ * whose owner bucket is stored in sharedRootMeta.
809
+ */
810
+ export declare const resolveOwnerCoords: (apiPath: string, sharedRootMeta: Map<string, SharedRootMeta>, fallbackBucket: string) => {
811
+ bucket: string;
812
+ path: string;
813
+ };
814
+
815
+ /** Resolves a PDF canvas content payload from a DisplayAttachment, or `null` if unavailable. */
816
+ export declare const resolvePdfCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => Promise<PdfCanvasContent | ErrorCanvasContent | null>;
817
+
818
+ /**
819
+ * Converts a DIAL file ID or full resource path to the relative bucket path
820
+ * expected by the files download API.
821
+ */
822
+ export declare const resolveRelativeDialFilePath: (pathOrFileId: string, bucket: string) => string;
823
+
824
+ /** Resolves a plain-text canvas content payload from a DisplayAttachment, or `null` if unavailable. */
825
+ export declare const resolveTextCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers) => Promise<PlainTextCanvasContent | ErrorCanvasContent | null>;
826
+
827
+ /**
828
+ * Fetches the attachment payload and builds a `VisualizerCanvasContent` for the
829
+ * given registry entry and theme. Returns `null` when the payload cannot be
830
+ * fetched (caller should fall through to default content-type handling).
831
+ *
832
+ * Only JSON payloads are parsed into `data`. Non-JSON payloads (plain text,
833
+ * CSV, binary, …) resolve with `data: {}` — the visualizer still receives
834
+ * `mimeType` and `layout`, just no payload body. This is intentional: only
835
+ * JSON attachment content is forwarded to visualizers in this version.
836
+ */
837
+ export declare const resolveVisualizerCanvasContent: (attachment: DisplayAttachment, resolvers: AttachmentCanvasUrlResolvers, entry: CustomVisualizer, themeId: string) => Promise<VisualizerCanvasContent | null>;
838
+
839
+ /**
840
+ * Sanitizes a filename for upload by replacing forbidden characters with `_`,
841
+ * trimming trailing dots/whitespace from the base name, and capping the result
842
+ * to 255 UTF-8 bytes.
843
+ *
844
+ * Mutates nothing — returns a new string. The caller (onValidateUpload) is
845
+ * responsible for writing the result back to DialUploadFileItem.name so the
846
+ * ui-kit's subsequent conflict detection sees the sanitized name.
847
+ *
848
+ * If the base name is empty after sanitization, returns the original name unchanged.
849
+ */
850
+ export declare const sanitizeFileName: (name: string) => string;
851
+
852
+ /** Owner-bucket resolution metadata for a Shared-tab root folder, keyed by its display name. */
853
+ export declare interface SharedRootMeta {
854
+ bucket: string;
855
+ /** DIAL Core URL of the shared root item, e.g. "files/owner-bucket/some-folder/" */
856
+ dialCorePath: string;
857
+ }
858
+
859
+ /** Splits a file name into its base and extension, using only the last dot. */
860
+ export declare const splitFileNameExtension: (fileName: string) => {
861
+ base: string;
862
+ extension: string;
863
+ };
864
+
865
+ export declare const trimFileNameToByteLimit: (name: string, limit?: number) => string;
866
+
867
+ export declare const updateEntry: (prev: FileUploadBatchState | null, index: number, patch: FileUploadStatus | Partial<Pick<FileUploadEntry, "status" | "percent">>) => FileUploadBatchState | null;
868
+
869
+ /** Max number of files uploaded concurrently within a single upload batch. */
870
+ export declare const UPLOAD_CONCURRENCY = 3;
871
+
872
+ /** Options accepted by the returned `uploadFile`. */
873
+ export declare type UploadFileOptions = UploadFileWithProgressOptions;
874
+
875
+ /** Shape of a progress-reporting file upload function, e.g. the return value of `createUploadFileWithProgress`. */
876
+ export declare type UploadFileWithProgressFn = (bucket: string, path: string, file: File, options?: UploadFileWithProgressOptions) => Promise<FileUploadResponseDto>;
877
+
878
+ /** Options accepted by an {@link UploadFileWithProgressFn}. */
879
+ export declare interface UploadFileWithProgressOptions {
880
+ /** Aborts the upload in flight. */
881
+ signal?: AbortSignal;
882
+ /** Called with the upload's progress percentage (0–100). */
883
+ onProgress?: (percent: number) => void;
884
+ /** Defaults to the generated client's own default when omitted. */
885
+ uploadMode?: UploadMode;
886
+ }
887
+
888
+ /** Upload mode passed to `FilesApi.uploadFile`: overwrite an existing file or fail if it already exists. */
889
+ export declare type UploadMode = 'overwrite' | 'create-only';
890
+
891
+ /**
892
+ * Manages DIAL file-storage browsing state: folder listing/navigation, the
893
+ * tree's expand/collapse state, search, and the shared per-folder cache that
894
+ * `useDialFileUploadBatch`/`useDialFileMutations`/`useDialFileSharing` invalidate
895
+ * through `invalidateFolders`/`bumpRetry` after their own mutations settle
896
+ * (design.md D1) — this hook is the sole owner/writer of that cache.
897
+ *
898
+ * Supports three listing sources via `activeTab`:
899
+ * - my_files: user's own bucket via `DialFilesApi.listFiles`
900
+ * - shared: files shared with the user via `DialFilesApi.listSharedFiles`
901
+ * - organization: public bucket via `DialFilesApi.listPublicFiles`
902
+ */
903
+ export declare const useDialFileListing: ({ filesApi, bucket, rootLabel, activeTab, onNotification, }: UseDialFileListingOptions) => UseDialFileListingResult;
904
+
905
+ /** Options accepted by `useDialFileListing`. */
906
+ export declare interface UseDialFileListingOptions {
907
+ /** Injected operation port used for every listing/search network call. */
908
+ filesApi: DialFilesApi;
909
+ /** DIAL Core bucket to browse (used only for the my_files tab). */
910
+ bucket: string;
911
+ /** Display name for the root folder node (e.g. `'My files'`). */
912
+ rootLabel: string;
913
+ /** Active tab — drives listing source and per-tab options. */
914
+ activeTab: DialFileManagerTabs;
915
+ /** Called with a structured event when a folder-load operation fails. */
916
+ onNotification?: (notification: FileManagerNotification) => void;
917
+ }
918
+
919
+ /** Values returned by `useDialFileListing`. */
920
+ export declare interface UseDialFileListingResult {
921
+ items: DialFile[];
922
+ isLoading: boolean;
923
+ error: string | null;
924
+ path: string;
925
+ /** Bucket-relative path of the currently browsed folder (e.g. `"reports/"`, `""` for root). */
926
+ folderPath: string;
927
+ onPathChange: (nextPath?: string) => void;
928
+ retry: () => void;
929
+ onSearchFiles: (folder: string, query: string) => void;
930
+ isSearching: boolean;
931
+ searchResults: DialFile[] | null;
932
+ clearSearchResults: () => void;
933
+ expandedPaths: Set<string>;
934
+ loadedPaths: Set<string>;
935
+ onExpandedPathsChange: (paths: Set<string>) => void;
936
+ onFolderPopupPathChange: (nextPath?: string) => void;
937
+ folderPopupLoadingPaths: Set<string>;
938
+ sharedWithMeIds: string[] | undefined;
939
+ sharedByMePaths: Set<string>;
940
+ currentFolder: DialFile | undefined;
941
+ /** Read-only snapshot of the per-folder listing cache, for `useDialFileUploadBatch`'s overwrite-mode check. */
942
+ cache: Map<string, ListFilesItemDto[]>;
943
+ /** Read-only snapshot of per-folder permissions, for `useDialFileMutations`'s create-folder inherited permissions. */
944
+ listingPermissionsCache: Map<string, string[] | undefined>;
945
+ /** Owner-bucket resolution metadata for the Shared tab, populated by the root listing fetch. */
946
+ sharedRootMetaRef: React.RefObject<Map<string, SharedRootMeta>>;
947
+ /** Imperatively navigates the current folder — used by mutations after a rename/delete of the browsed folder. */
948
+ setFolderPath: React.Dispatch<React.SetStateAction<string>>;
949
+ /**
950
+ * Deletes the given API-path cache keys so the next listing fetch/expand for
951
+ * that folder re-fetches from the server. The only way sibling sub-hooks may
952
+ * invalidate the shared cache (design.md D1).
953
+ */
954
+ invalidateFolders: (apiPaths: string[]) => void;
955
+ /** Merges a just-created folder into its parent's cache entry (optimistic display for create-folder). */
956
+ mergeCreatedFolder: (parentApiPath: string, created: CreateFolderResponseDto, inheritedPermissions?: string[]) => void;
957
+ /** Forces the listing effect to re-fetch the currently browsed folder. */
958
+ bumpRetry: () => void;
959
+ }
960
+
961
+ /**
962
+ * Composes the five file-manager sub-hooks — listing/navigation, upload
963
+ * batches, CRUD mutations, sharing, and metadata — into the single flat
964
+ * result `DialFileManagerShell`/`DialFileManagerModal`/`DialFileManagerPage`
965
+ * consume. Cache ownership and cross-hook invalidation stay inside
966
+ * `useDialFileListing`; this composer only wires that hook's
967
+ * `invalidateFolders`/`bumpRetry` into its siblings and derives the handful
968
+ * of tab/actionProfile UI fields that read outputs from more than one
969
+ * sub-hook. Imports neither `react-i18next` nor any application context —
970
+ * every translated string reaches it through `labels`,
971
+ * `disabledNewButtonTooltip`, and `buildValidationErrorMessage`.
972
+ */
973
+ export declare const useDialFileManager: ({ filesApi, bucket, rootLabel, activeTab, onNotification, onOperationSuccess, forbiddenSymbolsRegExp, variant, actionProfile, labels, locale, disabledNewButtonTooltip, downloadDestination, buildValidationErrorMessage, }: UseDialFileManagerOptions) => UseDialFileManagerResult;
974
+
975
+ export declare interface UseDialFileManagerOptions {
976
+ /** Injected operation port used for every file-manager network call. */
977
+ filesApi: DialFilesApi;
978
+ /** DIAL Core bucket to browse (used only for my_files tab). */
979
+ bucket: string;
980
+ /** Display name for the root folder node. Defaults to `'My files'`. */
981
+ rootLabel?: string;
982
+ /** Active tab — drives listing source and per-tab options. Defaults to MyFiles. */
983
+ activeTab?: DialFileManagerTabs;
984
+ /** Called when a file-manager action should surface a toast notification. */
985
+ onNotification?: (notification: FileManagerNotification) => void;
986
+ /** Called when a mutation succeeds, instead of invoking an application notification service directly. */
987
+ onOperationSuccess?: (event: FileOperationSuccessEvent) => void;
988
+ /** Regexp of characters forbidden in file/folder names (e.g. NOT_ALLOWED_SYMBOLS_REGEXP). */
989
+ forbiddenSymbolsRegExp?: RegExp;
990
+ /** Which host is driving this hook instance. Defaults to `Attach`. */
991
+ variant?: DialFileManagerVariant;
992
+ /** Gates which actions are exposed. Defaults to the value derived from `variant`. */
993
+ actionProfile?: DialFileManagerActionProfile;
994
+ /**
995
+ * Host-supplied action label text, keyed by `DialFileManagerActions`. The
996
+ * hook computes which actions are visible/enabled per tab/variant/
997
+ * actionProfile and intersects that gating with this map — an action the
998
+ * gating allows but this map omits is left out of `actionLabels`.
999
+ */
1000
+ labels: Partial<Record<DialFileManagerActions, string>>;
1001
+ /** BCP-47 locale string for date formatting, replacing `i18n.language`. */
1002
+ locale: string;
1003
+ /** Translated tooltip shown on the disabled New/Upload button. */
1004
+ disabledNewButtonTooltip: string;
1005
+ /** Host-injected browser "Save As"/auto-download seam for `onDownloadFiles`. */
1006
+ downloadDestination: DownloadDestinationHandlers;
1007
+ /**
1008
+ * Builds a translated message from a structured validation-error reason,
1009
+ * for `onCreateFolderValidate`/`onRenameValidate`. `item` is passed for a
1010
+ * rename (so the host can distinguish file vs. folder wording) and
1011
+ * omitted for folder creation.
1012
+ */
1013
+ buildValidationErrorMessage: (error: FileNameValidationError, item?: DialFile) => string;
1014
+ }
1015
+
1016
+ export declare interface UseDialFileManagerResult {
1017
+ /** Hierarchical items for DialFileManager's `items` prop. */
1018
+ items: DialFile[];
1019
+ /** True while the current folder is loading. */
1020
+ isLoading: boolean;
1021
+ /** Non-null when the last fetch failed. */
1022
+ error: string | null;
1023
+ /** Current path in DialFileManager format (e.g. `"/My files"`, `"/My files/reports/"`). */
1024
+ path: string;
1025
+ /** Pass directly to DialFileManager's `onPathChange`. */
1026
+ onPathChange: (nextPath?: string) => void;
1027
+ /** Re-runs the fetch for the current `folderPath`. */
1028
+ retry: () => void;
1029
+ /**
1030
+ * Search: called by DialFileManager when the user types in the search box.
1031
+ * `folder` is accepted for API parity with DialFileManager but is intentionally
1032
+ * unused — this hook always searches from the active-tab root stored in
1033
+ * `folderPath`, not from the passed-in `folder` (see design decision D3).
1034
+ */
1035
+ onSearchFiles: (folder: string, query: string) => void;
1036
+ /** Search: true while a search request is in flight. */
1037
+ isSearching: boolean;
1038
+ /** Search: flat list of matching files, or null when search is not active. */
1039
+ searchResults: DialFile[] | null;
1040
+ /** Search: clears results and exits search mode. */
1041
+ clearSearchResults: () => void;
1042
+ /** Tree: controlled set of expanded folder virtual paths. */
1043
+ expandedPaths: Set<string>;
1044
+ /** Tree: expanded or destination-popup virtual paths whose children are already cached. */
1045
+ loadedPaths: Set<string>;
1046
+ /** Tree: called by DialFileManager when a folder is expanded/collapsed. */
1047
+ onExpandedPathsChange: (paths: Set<string>) => void;
1048
+ /** Destination folder popup: preloads the browsed folder without changing the outer grid path. */
1049
+ onFolderPopupPathChange: (nextPath?: string) => void;
1050
+ /** Destination folder popup: normalized virtual paths currently being preloaded. */
1051
+ folderPopupLoadingPaths: Set<string>;
1052
+ /** Upload: start a new batch. */
1053
+ onUploadFiles: (files: DialUploadFileItem[], destinationFolder: string) => void;
1054
+ /** Upload: extracts and uploads a ZIP archive's entries to the destination folder. */
1055
+ onUploadArchive: (file: File, name: string, destinationFolder: string) => void;
1056
+ /** Upload: validate file names before upload (called by DialFileManager). */
1057
+ onValidateUpload: (files: DialUploadFileItem[], existingFiles: DialFile[], destinationFolder: string) => Promise<FileUploadValidationResult>;
1058
+ /** Upload: current batch state (null when idle). */
1059
+ uploadBatchState: FileUploadBatchState | null;
1060
+ /** Upload: abort all in-flight and queued uploads. */
1061
+ cancelUpload: () => void;
1062
+ /** Upload: dismiss the progress modal after the batch has settled. */
1063
+ clearUploadBatch: () => void;
1064
+ /** Folder creation: called when user confirms a new folder name. */
1065
+ onCreateFolder: (file: DialUploadFileItem, folderPath: string, fileId: string) => Promise<void>;
1066
+ /** Folder creation: inline synchronous validation (returns error message or null). */
1067
+ onCreateFolderValidate: (name: string, parentFolder: DialFile) => string | null;
1068
+ /** True while a folder creation request is in flight. */
1069
+ isCreatingFolder: boolean;
1070
+ /** Download: called when user triggers download on one or more items. */
1071
+ onDownloadFiles: (dialFiles: DialFile[]) => void;
1072
+ /** True while a download is in progress. */
1073
+ isDownloading: boolean;
1074
+ /** Delete: called when user confirms deletion of one or more items. */
1075
+ onDeleteFiles: (items: DialDeletedItem[], sourceFolder: string) => void;
1076
+ /** True while a delete request is in flight. */
1077
+ isDeleting: boolean;
1078
+ /** Rename: inline validation — returns error string or null. */
1079
+ onRenameValidate: (value: string, item: DialFile) => string | null;
1080
+ /** Rename: called when user confirms an inline rename. Also dispatches cross-folder move (see D3). */
1081
+ onMoveToFiles: (items: DialCopiedItem[], sourceFolder: string, destinationFolder: string) => void;
1082
+ /** True while a rename request is in flight. */
1083
+ isRenaming: boolean;
1084
+ /** Copy: called when user confirms a copy-paste. */
1085
+ onCopyFiles: (items: DialCopiedItem[], destinationFolder: string) => void;
1086
+ /** True while a copy request is in flight. */
1087
+ isCopying: boolean;
1088
+ /** True while the cross-folder-move branch of onMoveToFiles is in flight. */
1089
+ isMoving: boolean;
1090
+ /** Aborts whichever of copy/move is currently in flight. */
1091
+ cancelCopyMove: () => void;
1092
+ /** True when the current folder grants WRITE (upload + new folder). */
1093
+ uploadEnabled: boolean;
1094
+ /** True when Upload/New must be disabled. */
1095
+ isNewButtonDisabled: boolean;
1096
+ /** Tooltip for disabled New/Upload when `isNewButtonDisabled` is true. */
1097
+ disabledNewButtonTooltip: string;
1098
+ /** Columns to show in the grid — tab-dependent. */
1099
+ visibleColumns: FileManagerColumnKey[];
1100
+ /** BCP-47 locale string for date formatting, sourced from i18n.language. */
1101
+ dateLocale: string;
1102
+ /** Fixed date format options for the UpdatedAt column. */
1103
+ dateOptions: Intl.DateTimeFormatOptions;
1104
+ /** Action labels for grid/tree/bulk — Delete present only on my_files tab. */
1105
+ actionLabels: Partial<Record<DialFileManagerActions, string>>;
1106
+ /** Root-level shared item paths, populated only on the Shared tab. */
1107
+ sharedWithMeIds: string[] | undefined;
1108
+ /** Share: paths the user has shared with others, populated only on my_files tab. */
1109
+ sharedByMePaths: Set<string>;
1110
+ /** Unshare: called when user removes a shared-with-me item (Shared tab only). */
1111
+ onUnshareFiles: (files: DialFile[]) => void;
1112
+ /** True while an unshare request is in flight. */
1113
+ isUnsharing: boolean;
1114
+ /** Remove access: called when user revokes access to an owned shared item (my_files tab only). */
1115
+ onRemoveFilesAccess: (files: DialFile[]) => void;
1116
+ /** True while a remove-access request is in flight. */
1117
+ isRemovingAccess: boolean;
1118
+ /** Metadata: populated once onGetInfo resolves; passed to fileMetadataPopupOptions.fileMetadata. */
1119
+ fileMetadata: DialFile | undefined;
1120
+ /** True while a metadata request is in flight. */
1121
+ isFileMetadataLoading: boolean;
1122
+ /** Metadata: called by DialFileManager.onGetInfo to fetch and display a file's details. */
1123
+ onGetInfo: (file: DialFile) => void;
1124
+ /** Metadata: resets fileMetadata/isFileMetadataLoading; passed to fileMetadataPopupOptions.clearMetadata. */
1125
+ clearMetadata: () => void;
1126
+ /**
1127
+ * True while any mutating file-manager operation is in flight: the OR of
1128
+ * `isCreatingFolder`, `isDownloading`, `isDeleting`, `isRenaming`, `isCopying`,
1129
+ * `isMoving`, `isUnsharing`, `isRemovingAccess`, and `uploadBatchState != null`.
1130
+ *
1131
+ * Deliberately excludes three flags, each already fully contained by its own
1132
+ * scoped loading UI:
1133
+ * - `isLoading` — a read (listing fetch), not a mutation.
1134
+ * - `isSearching` — scoped to ui-kit's own search-progress UI.
1135
+ * - `isFileMetadataLoading` — has its own `loading` state in `fileMetadataPopupOptions`.
1136
+ */
1137
+ isAnyOperationInProgress: boolean;
1138
+ }
1139
+
1140
+ /**
1141
+ * Filters the file-manager's tab list down to the host's configured set and
1142
+ * resets `activeTab` to the highest-priority still-enabled tab when the
1143
+ * current one becomes excluded. A `fileManagerTabs` of `undefined` means no
1144
+ * restriction — every tab in `allTabs` stays enabled and no reset ever fires.
1145
+ */
1146
+ export declare const useDialFileManagerTabConfig: (activeTab: DialFileManagerTabs, onTabChange: (tab: DialFileManagerTabs) => void, allTabs: TabModel[] | undefined, fileManagerTabs: string[] | undefined) => UseDialFileManagerTabConfigResult;
1147
+
1148
+ /** Values returned by `useDialFileManagerTabConfig`. */
1149
+ export declare interface UseDialFileManagerTabConfigResult {
1150
+ tabs: ToolbarOptions['tabs'];
1151
+ }
1152
+
1153
+ /**
1154
+ * Fetches and holds single-file metadata for `fileMetadataPopupOptions` —
1155
+ * the only sub-hook with no interaction with the shared listing cache, since
1156
+ * viewing metadata never mutates listing state.
1157
+ */
1158
+ export declare const useDialFileMetadata: ({ filesApi, bucket, rootLabel, onNotification, }: UseDialFileMetadataOptions) => UseDialFileMetadataResult;
1159
+
1160
+ /** Options accepted by `useDialFileMetadata`. */
1161
+ export declare interface UseDialFileMetadataOptions {
1162
+ /** Injected operation port used for the metadata network call. */
1163
+ filesApi: DialFilesApi;
1164
+ /** DIAL Core bucket the current user browses (used only for my_files items). */
1165
+ bucket: string;
1166
+ /** Display name of the root folder node, used to resolve virtual paths back to API paths. */
1167
+ rootLabel: string;
1168
+ /** Called with a structured event when the metadata fetch fails. */
1169
+ onNotification?: (notification: FileManagerNotification) => void;
1170
+ }
1171
+
1172
+ /** Values returned by `useDialFileMetadata`. */
1173
+ export declare interface UseDialFileMetadataResult {
1174
+ fileMetadata: DialFile | undefined;
1175
+ isFileMetadataLoading: boolean;
1176
+ onGetInfo: (file: DialFile) => void;
1177
+ clearMetadata: () => void;
1178
+ }
1179
+
1180
+ /**
1181
+ * Manages create-folder, download, delete, rename, copy, and move mutations.
1182
+ * Every mutation invalidates the shared listing cache for its affected
1183
+ * folders through `invalidateFolders`/`bumpRetry` rather than holding its own
1184
+ * cache copy; create-folder additionally uses `mergeCreatedFolder` so a newly
1185
+ * created folder appears immediately even when created from a
1186
+ * destination-folder popup browsing a different folder than the outer grid.
1187
+ */
1188
+ export declare const useDialFileMutations: ({ filesApi, bucket, rootLabel, activeTab, folderPath, currentFolder, sharedRootMetaRef, listingPermissionsCache, invalidateFolders, bumpRetry, mergeCreatedFolder, setFolderPath, onNotification, onOperationSuccess, downloadDestination, forbiddenSymbolsRegExp, }: UseDialFileMutationsOptions) => UseDialFileMutationsResult;
1189
+
1190
+ /** Options accepted by `useDialFileMutations`. */
1191
+ export declare interface UseDialFileMutationsOptions {
1192
+ /** Injected operation port used for every mutation network call. */
1193
+ filesApi: DialFilesApi;
1194
+ /** DIAL Core bucket to browse (used only for the my_files tab). */
1195
+ bucket: string;
1196
+ /** Display name for the root folder node. */
1197
+ rootLabel: string;
1198
+ /** Active tab — drives owner-bucket resolution for the Shared tab. */
1199
+ activeTab: DialFileManagerTabs;
1200
+ /** Bucket-relative path of the currently browsed folder, owned by `useDialFileListing`. */
1201
+ folderPath: string;
1202
+ /** Currently browsed folder node, owned by `useDialFileListing`. */
1203
+ currentFolder: DialFile | undefined;
1204
+ /** Owner-bucket resolution metadata for the Shared tab, owned by `useDialFileListing`. */
1205
+ sharedRootMetaRef: React.RefObject<Map<string, SharedRootMeta>>;
1206
+ /** Read-only snapshot of `useDialFileListing`'s per-folder permissions cache. */
1207
+ listingPermissionsCache: Map<string, string[] | undefined>;
1208
+ /** Deletes the given API-path cache keys so the next fetch re-fetches them. */
1209
+ invalidateFolders: (apiPaths: string[]) => void;
1210
+ /** Forces `useDialFileListing`'s fetch effect to re-run. */
1211
+ bumpRetry: () => void;
1212
+ /** Merges a newly created folder into its parent's cache entry, owned by `useDialFileListing`. */
1213
+ mergeCreatedFolder: (parentApiPath: string, created: CreateFolderResponseDto, inheritedPermissions?: string[]) => void;
1214
+ /** Imperatively navigates the current folder after a rename/delete of the browsed folder. */
1215
+ setFolderPath: React.Dispatch<React.SetStateAction<string>>;
1216
+ /** Called when a mutation should surface a toast notification. */
1217
+ onNotification?: (notification: FileManagerNotification) => void;
1218
+ /** Called when a mutation succeeds, instead of invoking an application notification service directly. */
1219
+ onOperationSuccess?: (event: FileOperationSuccessEvent) => void;
1220
+ /** Host-injected browser "Save As"/auto-download seam for `onDownloadFiles`. */
1221
+ downloadDestination: DownloadDestinationHandlers;
1222
+ /** Regexp of characters forbidden in file/folder names beyond the path separator. */
1223
+ forbiddenSymbolsRegExp?: RegExp;
1224
+ }
1225
+
1226
+ /** Values returned by `useDialFileMutations`. */
1227
+ export declare interface UseDialFileMutationsResult {
1228
+ isCreatingFolder: boolean;
1229
+ isDownloading: boolean;
1230
+ isDeleting: boolean;
1231
+ isRenaming: boolean;
1232
+ isCopying: boolean;
1233
+ isMoving: boolean;
1234
+ onCreateFolder: (file: DialUploadFileItem, folderPath: string, fileId: string) => Promise<void>;
1235
+ onCreateFolderValidate: (name: string, parentFolder: DialFile) => FileNameValidationError | null;
1236
+ onDownloadFiles: (dialFiles: DialFile[]) => void;
1237
+ onDeleteFiles: (items: DialDeletedItem[], sourceFolder: string) => void;
1238
+ onRenameValidate: (value: string, item: DialFile) => FileNameValidationError | null;
1239
+ onMoveToFiles: (items: DialCopiedItem[], sourceFolder: string, destinationFolder: string) => void;
1240
+ onCopyFiles: (items: DialCopiedItem[], destinationFolder: string) => void;
1241
+ cancelCopyMove: () => void;
1242
+ }
1243
+
1244
+ /**
1245
+ * Manages the unshare/remove-access mutations. Bumps `useDialFileListing`'s
1246
+ * shared retry counter after each mutation settles rather than holding its
1247
+ * own cache copy.
1248
+ */
1249
+ export declare const useDialFileSharing: ({ filesApi, bucket, rootLabel, bumpRetry, onNotification, }: UseDialFileSharingOptions) => UseDialFileSharingResult;
1250
+
1251
+ /** Options accepted by `useDialFileSharing`. */
1252
+ export declare interface UseDialFileSharingOptions {
1253
+ /** Injected operation port used for every sharing network call. */
1254
+ filesApi: DialFilesApi;
1255
+ /** DIAL Core bucket to browse (used only for the my_files tab). */
1256
+ bucket: string;
1257
+ /** Display name for the root folder node. */
1258
+ rootLabel: string;
1259
+ /** Forces `useDialFileListing`'s fetch effect to re-run after a mutation settles. */
1260
+ bumpRetry: () => void;
1261
+ /** Called when a sharing mutation fails and should surface a toast notification. */
1262
+ onNotification?: (notification: FileManagerNotification) => void;
1263
+ }
1264
+
1265
+ /** Values returned by `useDialFileSharing`. */
1266
+ export declare interface UseDialFileSharingResult {
1267
+ isUnsharing: boolean;
1268
+ isRemovingAccess: boolean;
1269
+ onUnshareFiles: (files: DialFile[]) => void;
1270
+ onRemoveFilesAccess: (files: DialFile[]) => void;
1271
+ }
1272
+
1273
+ /**
1274
+ * Manages upload batches (single-file and ZIP-archive extraction), including
1275
+ * concurrency-limited progress tracking and abort. Invalidates the shared
1276
+ * listing cache for the destination folder through `invalidateFolders`/
1277
+ * `bumpRetry` after a batch settles — it never holds its own copy of the
1278
+ * cache.
1279
+ */
1280
+ export declare const useDialFileUploadBatch: ({ filesApi, bucket, rootLabel, activeTab, cache, sharedRootMetaRef, invalidateFolders, bumpRetry, onNotification, }: UseDialFileUploadBatchOptions) => UseDialFileUploadBatchResult;
1281
+
1282
+ /** Options accepted by `useDialFileUploadBatch`. */
1283
+ export declare interface UseDialFileUploadBatchOptions {
1284
+ /** Injected operation port used for every upload network call. */
1285
+ filesApi: DialFilesApi;
1286
+ /** DIAL Core bucket to browse (used only for the my_files tab). */
1287
+ bucket: string;
1288
+ /** Display name for the root folder node. */
1289
+ rootLabel: string;
1290
+ /** Active tab — drives owner-bucket resolution for the Shared tab. */
1291
+ activeTab: DialFileManagerTabs;
1292
+ /** Read-only snapshot of `useDialFileListing`'s cache, used to decide overwrite vs. create-only upload mode. */
1293
+ cache: Map<string, ListFilesItemDto[]>;
1294
+ /** Owner-bucket resolution metadata for the Shared tab, owned by `useDialFileListing`. */
1295
+ sharedRootMetaRef: React.RefObject<Map<string, SharedRootMeta>>;
1296
+ /** Deletes the given API-path cache keys so the next fetch re-fetches them. */
1297
+ invalidateFolders: (apiPaths: string[]) => void;
1298
+ /** Forces `useDialFileListing`'s fetch effect to re-run. */
1299
+ bumpRetry: () => void;
1300
+ /** Called when an upload batch fails or completes and should surface a toast notification. */
1301
+ onNotification?: (notification: FileManagerNotification) => void;
1302
+ }
1303
+
1304
+ /** Values returned by `useDialFileUploadBatch`. */
1305
+ export declare interface UseDialFileUploadBatchResult {
1306
+ onUploadFiles: (files: DialUploadFileItem[], destinationFolder: string) => void;
1307
+ onUploadArchive: (file: File, name: string, destinationFolder: string) => void;
1308
+ onValidateUpload: (files: DialUploadFileItem[], existingFiles: DialFile[], destinationFolder: string) => Promise<FileUploadValidationResult>;
1309
+ uploadBatchState: FileUploadBatchState | null;
1310
+ cancelUpload: () => void;
1311
+ clearUploadBatch: () => void;
1312
+ }
1313
+
1314
+ export { useGridEditingScroll }
1315
+
1316
+ export { UseGridEditingScrollOptions }
1317
+
1318
+ export { UseGridEditingScrollResult }
1319
+
1320
+ /**
1321
+ * Converts a DialFileManager virtual path to an API folder path.
1322
+ * e.g. "/My files" → "", "/My files/reports/" → "reports/"
1323
+ */
1324
+ export declare const virtualPathToApiPath: (virtualPath: string, rootLabel: string) => string;
1325
+
1326
+ /** Content payload for a custom-visualizer attachment rendered inside a sandboxed iframe. */
1327
+ declare interface VisualizerCanvasContent {
1328
+ /** Discriminates the content type to select the correct renderer. */
1329
+ type: AttachmentContentType.Visualizer;
1330
+ /** Iframe `src`, resolved from the matching registry entry's `url`. */
1331
+ url: string;
1332
+ /** The attachment's own MIME type (not the registry entry's raw, possibly comma-separated, `contentType`). */
1333
+ mimeType: string;
1334
+ /** Opaque attachment payload consumed by the visualizer. */
1335
+ data: unknown;
1336
+ /** Presentation layout hints (`themeId`, `width`, `height`, `mobileHeight`). */
1337
+ layout: CustomVisualizerDataLayout;
1338
+ /** postMessage protocol namespace — MUST equal the registry entry's `title`, or the iframe never receives data. */
1339
+ visualizerName: string;
1340
+ /** Milliseconds to wait for a `send()` request's response before rejecting. From the registry entry; does NOT bound the handshake. */
1341
+ requestTimeout?: number;
1342
+ }
1343
+
1344
+ export { }