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

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