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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. package/api-error-DuLNy43N.js +45 -0
  2. package/attachment-types-AAoN9E95.js +7760 -0
  3. package/{attachment/useAttachmentValidation/useAttachmentValidation.d.ts → attachments.d.ts} +88 -44
  4. package/attachments.js +2 -0
  5. package/browser-Btsa0Lmr.js +607 -0
  6. package/catalog.d.ts +946 -0
  7. package/catalog.js +3 -0
  8. package/{conversation-sources/useConversationSources/useConversationSources.d.ts → conversation-sources.d.ts} +25 -20
  9. package/conversation-sources.js +2 -0
  10. package/conversation-transfer.d.ts +189 -0
  11. package/conversation-transfer.js +3 -0
  12. package/conversation.d.ts +907 -0
  13. package/conversation.js +2 -0
  14. package/cron-weekday-B4w29eAC.js +4 -0
  15. package/date-BeuD8G79.js +4 -0
  16. package/deployment-id-CxWgJTs9.js +6 -0
  17. package/file-manager.d.ts +1344 -0
  18. package/file-manager.js +4 -0
  19. package/formatting-CZyyxBG3.js +4 -0
  20. package/index.d.ts +4945 -126
  21. package/index.js +27 -19152
  22. package/oauth.d.ts +440 -0
  23. package/oauth.js +3 -0
  24. package/package.json +142 -21
  25. package/prompt-resource-Bt1I-8ri.js +41 -0
  26. package/scheduled-task-trigger-D9RZCk52.js +145 -0
  27. package/{scheduled-task/scheduled-task-trigger.d.ts → scheduled-tasks.d.ts} +51 -27
  28. package/scheduled-tasks.js +2 -0
  29. package/{conversation/useConversationScroll/useConversationScroll.d.ts → scroll-anchoring.d.ts} +50 -46
  30. package/scroll-anchoring.js +2 -0
  31. package/{useShareRecipientsCount/useShareRecipientsCount.d.ts → sharing.d.ts} +65 -36
  32. package/sharing.js +3 -0
  33. package/skill-editor.d.ts +503 -0
  34. package/skill-editor.js +3 -0
  35. package/skill-manifest-CCX8s4nn.js +4035 -0
  36. package/{skill/useSkillsState/useSkillsState.d.ts → skills-state.d.ts} +40 -35
  37. package/skills-state.js +2 -0
  38. package/string-utils-iBi2Y55C.js +10 -0
  39. package/toolset-id-CkxRHyU0.js +10 -0
  40. package/useAttachmentValidation-CkMTd5lA.js +102 -0
  41. package/useConversationImport-C2h1GBY4.js +807 -0
  42. package/useConversationScroll-CliIMnjP.js +122 -0
  43. package/useConversationSources-DKaKvjXZ.js +47 -0
  44. package/useDialFileManagerTabConfig-DGQw8H8H.js +2289 -0
  45. package/usePanelMaxWidth-BEZYuqF9.js +44 -0
  46. package/useShareLink-xkiaxATt.js +44 -0
  47. package/useShareRecipientsCount-BgwCLKY0.js +37 -0
  48. package/useSkillFileActions-BU5PzZ_8.js +373 -0
  49. package/useSkillFilePreview-BYfZUJhr.js +1005 -0
  50. package/useSkillsState-BoLlwmzb.js +52 -0
  51. package/useToolsMenu-BXdahO0i.js +1874 -0
  52. package/useToolsetLogin-GhFtKs4D.js +276 -0
  53. package/useUsageData-D7BxloKZ.js +201 -0
  54. package/utils.d.ts +373 -0
  55. package/utils.js +7 -0
  56. package/{usePageFileDrag/usePageFileDrag.d.ts → viewport-layout.d.ts} +27 -16
  57. package/viewport-layout.js +2 -0
  58. package/api-error/api-error.d.ts +0 -18
  59. package/api-error/api-error.d.ts.map +0 -1
  60. package/api-transport/create-csrf-middleware.d.ts +0 -15
  61. package/api-transport/create-csrf-middleware.d.ts.map +0 -1
  62. package/api-transport/create-unauthorized-middleware.d.ts +0 -40
  63. package/api-transport/create-unauthorized-middleware.d.ts.map +0 -1
  64. package/attachment/useAttachmentAction/useAttachmentAction.d.ts +0 -32
  65. package/attachment/useAttachmentAction/useAttachmentAction.d.ts.map +0 -1
  66. package/attachment/useAttachmentValidation/useAttachmentValidation.d.ts.map +0 -1
  67. package/catalog/catalog-derivations.d.ts +0 -27
  68. package/catalog/catalog-derivations.d.ts.map +0 -1
  69. package/catalog/catalog-primary-action.d.ts +0 -47
  70. package/catalog/catalog-primary-action.d.ts.map +0 -1
  71. package/catalog/create-publish-api.d.ts +0 -32
  72. package/catalog/create-publish-api.d.ts.map +0 -1
  73. package/catalog/deployment-endpoint-url.d.ts +0 -19
  74. package/catalog/deployment-endpoint-url.d.ts.map +0 -1
  75. package/catalog/deployment-id.d.ts +0 -21
  76. package/catalog/deployment-id.d.ts.map +0 -1
  77. package/catalog/entity-details.d.ts +0 -132
  78. package/catalog/entity-details.d.ts.map +0 -1
  79. package/catalog/map-deployment-limits-to-catalog.d.ts +0 -33
  80. package/catalog/map-deployment-limits-to-catalog.d.ts.map +0 -1
  81. package/catalog/map-deployment-limits-to-input.d.ts +0 -15
  82. package/catalog/map-deployment-limits-to-input.d.ts.map +0 -1
  83. package/catalog/map-deployment-to-catalog-item.d.ts +0 -60
  84. package/catalog/map-deployment-to-catalog-item.d.ts.map +0 -1
  85. package/catalog/map-entity-details-to-catalog.d.ts +0 -23
  86. package/catalog/map-entity-details-to-catalog.d.ts.map +0 -1
  87. package/catalog/map-prompt-to-catalog-item.d.ts +0 -43
  88. package/catalog/map-prompt-to-catalog-item.d.ts.map +0 -1
  89. package/catalog/map-skill-to-catalog-item.d.ts +0 -87
  90. package/catalog/map-skill-to-catalog-item.d.ts.map +0 -1
  91. package/catalog/mcp-endpoint-url.d.ts +0 -18
  92. package/catalog/mcp-endpoint-url.d.ts.map +0 -1
  93. package/catalog/publish.d.ts +0 -17
  94. package/catalog/publish.d.ts.map +0 -1
  95. package/catalog/useCatalogItemDetails.d.ts +0 -73
  96. package/catalog/useCatalogItemDetails.d.ts.map +0 -1
  97. package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.d.ts +0 -37
  98. package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.d.ts.map +0 -1
  99. package/catalog/usePublishFolders/usePublishFolders.d.ts +0 -73
  100. package/catalog/usePublishFolders/usePublishFolders.d.ts.map +0 -1
  101. package/conversation/announcement-message.d.ts +0 -34
  102. package/conversation/announcement-message.d.ts.map +0 -1
  103. package/conversation/conversation-transfer/async.d.ts +0 -10
  104. package/conversation/conversation-transfer/async.d.ts.map +0 -1
  105. package/conversation/conversation-transfer/attachment-refs.d.ts +0 -12
  106. package/conversation/conversation-transfer/attachment-refs.d.ts.map +0 -1
  107. package/conversation/conversation-transfer/build-upload-path.d.ts +0 -40
  108. package/conversation/conversation-transfer/build-upload-path.d.ts.map +0 -1
  109. package/conversation/conversation-transfer/date.d.ts +0 -5
  110. package/conversation/conversation-transfer/date.d.ts.map +0 -1
  111. package/conversation/conversation-transfer/dial-file-resolve.d.ts +0 -10
  112. package/conversation/conversation-transfer/dial-file-resolve.d.ts.map +0 -1
  113. package/conversation/conversation-transfer/export-conversation.d.ts +0 -8
  114. package/conversation/conversation-transfer/export-conversation.d.ts.map +0 -1
  115. package/conversation/conversation-transfer/import-conversation.d.ts +0 -82
  116. package/conversation/conversation-transfer/import-conversation.d.ts.map +0 -1
  117. package/conversation/conversation-transfer/progress.d.ts +0 -60
  118. package/conversation/conversation-transfer/progress.d.ts.map +0 -1
  119. package/conversation/conversation-transfer/queue.d.ts +0 -54
  120. package/conversation/conversation-transfer/queue.d.ts.map +0 -1
  121. package/conversation/conversation-transfer/types.d.ts +0 -36
  122. package/conversation/conversation-transfer/types.d.ts.map +0 -1
  123. package/conversation/conversation-transfer/zip-export.d.ts +0 -31
  124. package/conversation/conversation-transfer/zip-export.d.ts.map +0 -1
  125. package/conversation/conversation-transfer/zip-import.d.ts +0 -17
  126. package/conversation/conversation-transfer/zip-import.d.ts.map +0 -1
  127. package/conversation/create-chat-stream-api.d.ts +0 -38
  128. package/conversation/create-chat-stream-api.d.ts.map +0 -1
  129. package/conversation/deriveConversationRowActionState/deriveConversationRowActionState.d.ts +0 -39
  130. package/conversation/deriveConversationRowActionState/deriveConversationRowActionState.d.ts.map +0 -1
  131. package/conversation/display-name-watch.d.ts +0 -4
  132. package/conversation/display-name-watch.d.ts.map +0 -1
  133. package/conversation/footer-message.d.ts +0 -10
  134. package/conversation/footer-message.d.ts.map +0 -1
  135. package/conversation/get-model-id-from-conversation-id.d.ts +0 -27
  136. package/conversation/get-model-id-from-conversation-id.d.ts.map +0 -1
  137. package/conversation/greeting.d.ts +0 -18
  138. package/conversation/greeting.d.ts.map +0 -1
  139. package/conversation/message-factory.d.ts +0 -7
  140. package/conversation/message-factory.d.ts.map +0 -1
  141. package/conversation/message-utils.d.ts +0 -27
  142. package/conversation/message-utils.d.ts.map +0 -1
  143. package/conversation/overlay-messages.d.ts +0 -5
  144. package/conversation/overlay-messages.d.ts.map +0 -1
  145. package/conversation/quick-app-conversation-starters.d.ts +0 -10
  146. package/conversation/quick-app-conversation-starters.d.ts.map +0 -1
  147. package/conversation/starter-option.d.ts +0 -21
  148. package/conversation/starter-option.d.ts.map +0 -1
  149. package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts +0 -34
  150. package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts.map +0 -1
  151. package/conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.d.ts +0 -46
  152. package/conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.d.ts.map +0 -1
  153. package/conversation/useAttachmentUpload/useAttachmentUpload.d.ts +0 -26
  154. package/conversation/useAttachmentUpload/useAttachmentUpload.d.ts.map +0 -1
  155. package/conversation/useConversationExport/useConversationExport.d.ts +0 -72
  156. package/conversation/useConversationExport/useConversationExport.d.ts.map +0 -1
  157. package/conversation/useConversationHandlers/attachment-to-dto.d.ts +0 -7
  158. package/conversation/useConversationHandlers/attachment-to-dto.d.ts.map +0 -1
  159. package/conversation/useConversationHandlers/message-factory.d.ts +0 -9
  160. package/conversation/useConversationHandlers/message-factory.d.ts.map +0 -1
  161. package/conversation/useConversationHandlers/message-utils.d.ts +0 -14
  162. package/conversation/useConversationHandlers/message-utils.d.ts.map +0 -1
  163. package/conversation/useConversationHandlers/starter-option.d.ts +0 -14
  164. package/conversation/useConversationHandlers/starter-option.d.ts.map +0 -1
  165. package/conversation/useConversationHandlers/useConversationHandlers.d.ts +0 -66
  166. package/conversation/useConversationHandlers/useConversationHandlers.d.ts.map +0 -1
  167. package/conversation/useConversationImport/useConversationImport.d.ts +0 -53
  168. package/conversation/useConversationImport/useConversationImport.d.ts.map +0 -1
  169. package/conversation/useConversationLookupMaps/useConversationLookupMaps.d.ts +0 -24
  170. package/conversation/useConversationLookupMaps/useConversationLookupMaps.d.ts.map +0 -1
  171. package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts +0 -58
  172. package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts.map +0 -1
  173. package/conversation/useConversationScroll/useConversationScroll.d.ts.map +0 -1
  174. package/conversation/useConversationStream/apply-chunk.d.ts +0 -20
  175. package/conversation/useConversationStream/apply-chunk.d.ts.map +0 -1
  176. package/conversation/useConversationStream/buffered-generation.d.ts +0 -15
  177. package/conversation/useConversationStream/buffered-generation.d.ts.map +0 -1
  178. package/conversation/useConversationStream/conversation-path.d.ts +0 -7
  179. package/conversation/useConversationStream/conversation-path.d.ts.map +0 -1
  180. package/conversation/useConversationStream/generation-resume.d.ts +0 -39
  181. package/conversation/useConversationStream/generation-resume.d.ts.map +0 -1
  182. package/conversation/useConversationStream/useConversationStream.d.ts +0 -92
  183. package/conversation/useConversationStream/useConversationStream.d.ts.map +0 -1
  184. package/conversation/useImportFilePicker/useImportFilePicker.d.ts +0 -32
  185. package/conversation/useImportFilePicker/useImportFilePicker.d.ts.map +0 -1
  186. package/conversation-sources/useConversationSources/useConversationSources.d.ts.map +0 -1
  187. package/files/annotation.d.ts +0 -10
  188. package/files/annotation.d.ts.map +0 -1
  189. package/files/attachment-canvas.d.ts +0 -104
  190. package/files/attachment-canvas.d.ts.map +0 -1
  191. package/files/attachment-dto-to-display.d.ts +0 -10
  192. package/files/attachment-dto-to-display.d.ts.map +0 -1
  193. package/files/attachment-types.d.ts +0 -14
  194. package/files/attachment-types.d.ts.map +0 -1
  195. package/files/create-files-api.d.ts +0 -52
  196. package/files/create-files-api.d.ts.map +0 -1
  197. package/files/create-upload-file-with-progress.d.ts +0 -24
  198. package/files/create-upload-file-with-progress.d.ts.map +0 -1
  199. package/files/dial-file-manager-copy-move.util.d.ts +0 -15
  200. package/files/dial-file-manager-copy-move.util.d.ts.map +0 -1
  201. package/files/dial-file-manager-mapping.util.d.ts +0 -35
  202. package/files/dial-file-manager-mapping.util.d.ts.map +0 -1
  203. package/files/dial-file-manager-path.util.d.ts +0 -39
  204. package/files/dial-file-manager-path.util.d.ts.map +0 -1
  205. package/files/dial-file-manager.model.d.ts +0 -26
  206. package/files/dial-file-manager.model.d.ts.map +0 -1
  207. package/files/dial-file-manager.types.d.ts +0 -317
  208. package/files/dial-file-manager.types.d.ts.map +0 -1
  209. package/files/dial-file-to-attachment.d.ts +0 -26
  210. package/files/dial-file-to-attachment.d.ts.map +0 -1
  211. package/files/dial-file.d.ts +0 -17
  212. package/files/dial-file.d.ts.map +0 -1
  213. package/files/dial-files-api.d.ts +0 -71
  214. package/files/dial-files-api.d.ts.map +0 -1
  215. package/files/download-destination.d.ts +0 -31
  216. package/files/download-destination.d.ts.map +0 -1
  217. package/files/file-manager-variant.d.ts +0 -4
  218. package/files/file-manager-variant.d.ts.map +0 -1
  219. package/files/file-name.d.ts +0 -19
  220. package/files/file-name.d.ts.map +0 -1
  221. package/files/prepare-download-destination.d.ts +0 -8
  222. package/files/prepare-download-destination.d.ts.map +0 -1
  223. package/files/resolve-dial-file-api-path.d.ts +0 -13
  224. package/files/resolve-dial-file-api-path.d.ts.map +0 -1
  225. package/files/useDialFileListing/useDialFileListing.d.ts +0 -73
  226. package/files/useDialFileListing/useDialFileListing.d.ts.map +0 -1
  227. package/files/useDialFileManager/useDialFileManager.d.ts +0 -16
  228. package/files/useDialFileManager/useDialFileManager.d.ts.map +0 -1
  229. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.d.ts +0 -14
  230. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.d.ts.map +0 -1
  231. package/files/useDialFileMetadata/useDialFileMetadata.d.ts +0 -28
  232. package/files/useDialFileMetadata/useDialFileMetadata.d.ts.map +0 -1
  233. package/files/useDialFileMutations/useDialFileMutations.d.ts +0 -68
  234. package/files/useDialFileMutations/useDialFileMutations.d.ts.map +0 -1
  235. package/files/useDialFileSharing/useDialFileSharing.d.ts +0 -30
  236. package/files/useDialFileSharing/useDialFileSharing.d.ts.map +0 -1
  237. package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts +0 -45
  238. package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts.map +0 -1
  239. package/index.d.ts.map +0 -1
  240. package/oauth/authorize-url.d.ts +0 -16
  241. package/oauth/authorize-url.d.ts.map +0 -1
  242. package/oauth/handshake.d.ts +0 -30
  243. package/oauth/handshake.d.ts.map +0 -1
  244. package/oauth/models.d.ts +0 -81
  245. package/oauth/models.d.ts.map +0 -1
  246. package/oauth/popup.d.ts +0 -30
  247. package/oauth/popup.d.ts.map +0 -1
  248. package/oauth/toolset-id.d.ts +0 -23
  249. package/oauth/toolset-id.d.ts.map +0 -1
  250. package/oauth/types.d.ts +0 -84
  251. package/oauth/types.d.ts.map +0 -1
  252. package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.d.ts +0 -54
  253. package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.d.ts.map +0 -1
  254. package/oauth/useToolsetLogin/useToolsetLogin.d.ts +0 -79
  255. package/oauth/useToolsetLogin/useToolsetLogin.d.ts.map +0 -1
  256. package/prompt/export-prompt.d.ts +0 -31
  257. package/prompt/export-prompt.d.ts.map +0 -1
  258. package/prompt/prompt-resource.d.ts +0 -30
  259. package/prompt/prompt-resource.d.ts.map +0 -1
  260. package/prompt/prompt.d.ts +0 -34
  261. package/prompt/prompt.d.ts.map +0 -1
  262. package/prompt/usePromptsState/usePromptsState.d.ts +0 -34
  263. package/prompt/usePromptsState/usePromptsState.d.ts.map +0 -1
  264. package/scheduled-task/scheduled-task-mapping.d.ts +0 -19
  265. package/scheduled-task/scheduled-task-mapping.d.ts.map +0 -1
  266. package/scheduled-task/scheduled-task-trigger.d.ts.map +0 -1
  267. package/shared/application-schema.d.ts +0 -10
  268. package/shared/application-schema.d.ts.map +0 -1
  269. package/shared/browser-timezone.d.ts +0 -7
  270. package/shared/browser-timezone.d.ts.map +0 -1
  271. package/shared/cron-weekday.d.ts +0 -5
  272. package/shared/cron-weekday.d.ts.map +0 -1
  273. package/shared/custom-apps.d.ts +0 -7
  274. package/shared/custom-apps.d.ts.map +0 -1
  275. package/shared/external-services.d.ts +0 -16
  276. package/shared/external-services.d.ts.map +0 -1
  277. package/shared/formatting.d.ts +0 -5
  278. package/shared/formatting.d.ts.map +0 -1
  279. package/shared/locale.d.ts +0 -45
  280. package/shared/locale.d.ts.map +0 -1
  281. package/shared/string-utils.d.ts +0 -9
  282. package/shared/string-utils.d.ts.map +0 -1
  283. package/shared/toolset-login-events.d.ts +0 -15
  284. package/shared/toolset-login-events.d.ts.map +0 -1
  285. package/skill/skill-file-batch-validation.d.ts +0 -70
  286. package/skill/skill-file-batch-validation.d.ts.map +0 -1
  287. package/skill/skill-file-preview.d.ts +0 -25
  288. package/skill/skill-file-preview.d.ts.map +0 -1
  289. package/skill/skill-manifest.d.ts +0 -28
  290. package/skill/skill-manifest.d.ts.map +0 -1
  291. package/skill/skill-types.d.ts +0 -42
  292. package/skill/skill-types.d.ts.map +0 -1
  293. package/skill/skill.d.ts +0 -114
  294. package/skill/skill.d.ts.map +0 -1
  295. package/skill/useSkillEditorLoad.d.ts +0 -74
  296. package/skill/useSkillEditorLoad.d.ts.map +0 -1
  297. package/skill/useSkillEditorSubmit.d.ts +0 -105
  298. package/skill/useSkillEditorSubmit.d.ts.map +0 -1
  299. package/skill/useSkillFileActions.d.ts +0 -53
  300. package/skill/useSkillFileActions.d.ts.map +0 -1
  301. package/skill/useSkillFilePreview.d.ts +0 -38
  302. package/skill/useSkillFilePreview.d.ts.map +0 -1
  303. package/skill/useSkillsState/useSkillsState.d.ts.map +0 -1
  304. package/test-setup.d.ts +0 -2
  305. package/test-setup.d.ts.map +0 -1
  306. package/usage/useUsageData/useUsageData.d.ts +0 -20
  307. package/usage/useUsageData/useUsageData.d.ts.map +0 -1
  308. package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts +0 -128
  309. package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts.map +0 -1
  310. package/usePageFileDrag/usePageFileDrag.d.ts.map +0 -1
  311. package/usePanelMaxWidth/usePanelMaxWidth.d.ts +0 -6
  312. package/usePanelMaxWidth/usePanelMaxWidth.d.ts.map +0 -1
  313. package/useShareLink/useShareLink.d.ts +0 -23
  314. package/useShareLink/useShareLink.d.ts.map +0 -1
  315. package/useShareRecipientsCount/useShareRecipientsCount.d.ts.map +0 -1
  316. package/useToolsMenu/useToolsMenu.d.ts +0 -31
  317. package/useToolsMenu/useToolsMenu.d.ts.map +0 -1
  318. package/useViewportWidth/useViewportWidth.d.ts +0 -3
  319. package/useViewportWidth/useViewportWidth.d.ts.map +0 -1
package/utils.d.ts ADDED
@@ -0,0 +1,373 @@
1
+ import { DeploymentCreationFormLocaleEntry } from '@epam/ai-dial-deployment-creation-form';
2
+ import { DeploymentCreationFormLocaleOption } from '@epam/ai-dial-deployment-creation-form';
3
+ import { ExportFolder } from '@epam/ai-dial-chat-shared';
4
+ import { LocaleTextEntryDto } from '@epam/ai-dial-chat-api-client';
5
+ import { Middleware } from '@epam/ai-dial-chat-api-client';
6
+ import { PromptFolderResponseDto } from '@epam/ai-dial-chat-api-client';
7
+ import { PromptListResponseDto } from '@epam/ai-dial-chat-api-client';
8
+ import { PromptResponseDto } from '@epam/ai-dial-chat-api-client';
9
+ import { UserLimitStatsResponseDto } from '@epam/ai-dial-chat-api-client';
10
+
11
+ /** Normalized shape returned by {@link getApiErrorDetails}. */
12
+ export declare interface ApiErrorDetails {
13
+ /** HTTP status code carried by the error, when available. */
14
+ status?: number;
15
+ /** Resolved human-readable error message, or `null` when none could be resolved. */
16
+ message: string | null;
17
+ /** Extracted W3C trace ID, when the error's response carries a valid `traceparent`. */
18
+ traceId?: string;
19
+ }
20
+
21
+ /** Appends a locale's uppercased code to a field label, e.g. `'Name [EN]'`. */
22
+ export declare const appendLocaleCode: (label: string, locale: string) => string;
23
+
24
+ /** Converts an APScheduler weekday (Monday=0..Sunday=6) to a JS `Date` weekday (Sunday=0..Saturday=6). */
25
+ export declare const apSchedulerDayToJsDay: (apSchedulerDay: number) => number;
26
+
27
+ /**
28
+ * Selectable additional-locale options for a locale-picker popup, drawn from
29
+ * `additionalLocaleCodes` and excluding whichever code is already the
30
+ * primary Name/Description field.
31
+ */
32
+ export declare const buildAdditionalLocaleOptions: (additionalLocaleCodes: string[], primaryLocale: string) => DeploymentCreationFormLocaleOption[];
33
+
34
+ /** Reconstructs the exact scope id Core expects as `ResourceSignInRequest`/`ResourceSignOutRequest`'s `url` field. */
35
+ export declare const buildExternalServiceScopeId: (appId: string, serviceName: string) => string;
36
+
37
+ /** Builds the download envelope for a single prompt, including its folder chain. */
38
+ export declare const buildPromptExportEnvelope: (prompt: PromptResponseDto) => PromptExportFormat;
39
+
40
+ /** Builds a prompt's download file name, e.g. `2026-08-12_ai_dial_prompt_summarize.json`. */
41
+ export declare const buildPromptExportFileName: (promptName: string, appName: string, date?: Date) => string;
42
+
43
+ /** Joins a folder path and a prompt name into the DIAL prompt path used as an id. */
44
+ export declare const buildPromptPath: (folderId: string, name: string) => string;
45
+
46
+ /**
47
+ * Composes the "Add locale" popup's entries into the write-payload shape:
48
+ * strips the popup's client-only `id`, drops rows with no `language`, drops
49
+ * rows with neither `name` nor `description`, drops rows colliding with
50
+ * `primaryLocale` (that content belongs in the primary field, not here), and
51
+ * dedupes by `language` (last row for a given language wins). Returns
52
+ * `undefined` (not `[]`) when nothing remains, so a request untouched by
53
+ * this feature stays byte-identical to today.
54
+ */
55
+ export declare const composeLocalePayload: (otherLocales: DeploymentCreationFormLocaleEntry[], primaryLocale: string) => LocaleTextEntryDto[] | undefined;
56
+
57
+ /**
58
+ * Builds a generated-client `Middleware` that attaches `X-CSRF-Token` on every
59
+ * non-GET request when a token is set, and captures a rotated token from the
60
+ * `x-csrf-token` response header.
61
+ */
62
+ export declare const createCsrfMiddleware: (deps: CreateCsrfMiddlewareDeps) => Middleware;
63
+
64
+ /** Host capabilities {@link createCsrfMiddleware} needs to attach and capture a CSRF token. */
65
+ export declare interface CreateCsrfMiddlewareDeps {
66
+ /** Returns the currently held CSRF token, or `null` when none is set. */
67
+ getCsrfToken: () => string | null;
68
+ /** Stores a CSRF token captured from a response header, or `null` to clear it. */
69
+ setCsrfToken: (token: string | null) => void;
70
+ }
71
+
72
+ /**
73
+ * Builds a generated-client `Middleware` that throws on 401, and on a
74
+ * classified invalid-CSRF 403 refreshes the token and retries the original
75
+ * request exactly once.
76
+ */
77
+ export declare const createUnauthorizedMiddleware: (deps: CreateUnauthorizedMiddlewareDeps) => Middleware;
78
+
79
+ /** Host capabilities {@link createUnauthorizedMiddleware} needs to handle 401s and invalid-CSRF retries. */
80
+ export declare interface CreateUnauthorizedMiddlewareDeps {
81
+ /** Notifies the host that a request was unauthorized (also expected to clear any held CSRF token). */
82
+ notifyUnauthorized: (url: string) => void;
83
+ /** Attempts to refresh the CSRF token, de-duplicating concurrent calls. */
84
+ refreshCsrfToken: () => Promise<CsrfRefreshOutcome>;
85
+ /** Classifies a response body as an invalid-CSRF error. */
86
+ isInvalidCsrfErrorBody: (body: string) => boolean;
87
+ /** Returns the currently held CSRF token, or `null` when none is set. */
88
+ getCsrfToken: () => string | null;
89
+ /**
90
+ * Stores a CSRF token captured from a response header. Needed here (in
91
+ * addition to the CSRF middleware's own `post` hook) because the
92
+ * invalid-CSRF retry issues its own `fetch` outside the generated-client
93
+ * middleware pipeline, so its response header is never seen by that hook.
94
+ */
95
+ setCsrfToken: (token: string | null) => void;
96
+ /** Constructs the error thrown to signal an unauthorized request. */
97
+ createUnauthorizedError: (url: string) => UnauthorizedErrorLike;
98
+ }
99
+
100
+ /** Outcome of a CSRF-token refresh attempt, reported back to {@link createUnauthorizedMiddleware}. */
101
+ export declare type CsrfRefreshOutcome = {
102
+ status: 'ok';
103
+ token: string;
104
+ } | {
105
+ status: 'unauthorized' | 'failed';
106
+ };
107
+
108
+ /**
109
+ * Inverse of {@link composeLocalePayload}: builds the popup's `otherLocales`
110
+ * entries from a `displayName`/`description` pair as read from DIAL Core.
111
+ * A plain string on both (or both absent) means no additional locales exist
112
+ * yet, so this returns `[]`. Otherwise one entry is built per locale key
113
+ * present in either map, excluding `primaryLocale` — that key is already the
114
+ * primary Name/Description field, not a row in the popup.
115
+ */
116
+ export declare const decomposeLocalizedFields: (displayName: LocalizedText | undefined, description: LocalizedText | undefined, primaryLocale: string) => DeploymentCreationFormLocaleEntry[];
117
+
118
+ /** A prompt record as it appears inside a downloaded prompt file. */
119
+ export declare interface ExportedPrompt {
120
+ /** Prompt path within the prompts namespace, doubling as its stable id. */
121
+ id: string;
122
+ /** Display name. */
123
+ name: string;
124
+ /** Description, empty when the prompt has none. */
125
+ description: string;
126
+ /** Prompt text, `{{variable}}` placeholders included verbatim. */
127
+ content: string;
128
+ /** Parent folder path; absent for a root-level prompt. */
129
+ folderId?: string;
130
+ }
131
+
132
+ /** Formats a Unix timestamp (ms) as a locale-formatted calendar date, e.g. `'22/7/2026'`. */
133
+ export declare const formatCalendarDate: (timestampMs: number) => string;
134
+
135
+ /** Normalizes any API error into a `{ status?, message, traceId? }` shape. */
136
+ export declare const getApiErrorDetails: (error: unknown) => Promise<ApiErrorDetails>;
137
+
138
+ /** Resolves a human-readable message from an API error's response body, or falls back to `Error.message`. */
139
+ export declare const getApiErrorMessage: (error: unknown) => Promise<string | null>;
140
+
141
+ /** HTTP status code carried by a thrown API error, or `undefined` if none is attached. */
142
+ export declare const getApiErrorStatus: (error: unknown) => number | undefined;
143
+
144
+ /**
145
+ * Resolves the browser's current IANA timezone for request-scoped downstream
146
+ * context. Detection is best-effort because embedded or restricted runtimes
147
+ * may expose an incomplete `Intl` implementation.
148
+ */
149
+ export declare const getBrowserTimezone: () => string | undefined;
150
+
151
+ /**
152
+ * Derives a human-readable fallback label from an external service's raw
153
+ * `serviceName` when metadata hasn't resolved yet — mirrors
154
+ * `getToolsetFallbackName`'s percent-decoding behavior.
155
+ */
156
+ export declare const getExternalServiceFallbackName: (serviceName: string) => string;
157
+
158
+ /**
159
+ * Returns the characters left before a limit, or `null` while still further
160
+ * away than the announce threshold — a counter that fires on every keystroke
161
+ * is unusable noise in a live region.
162
+ */
163
+ export declare const getRemainingCharacters: (value: string, maxLength: number) => number | null;
164
+
165
+ /** Case-insensitive substring match. */
166
+ export declare const includesIgnoreCase: (str: string, query: string) => boolean;
167
+
168
+ /** True when the API indicates the conversation resource no longer exists at the path. */
169
+ export declare const isConversationNotFoundError: (error: unknown) => boolean;
170
+
171
+ /** True when `schema` is the custom-app (code app) schema. */
172
+ export declare const isCustomAppSchema: (schema?: QuickAppSchemaLike) => boolean;
173
+
174
+ /** True when `schema` is a Quick App 2.0 schema. */
175
+ export declare const isQuickAppSchema: (schema?: QuickAppSchemaLike) => boolean;
176
+
177
+ /** True when `value` is a well-formed absolute `http(s)://` URL. */
178
+ export declare const isValidAbsoluteUrl: (value: string) => boolean;
179
+
180
+ /** True when `value` is empty, or a JSON object containing only the allowed `featuresData` keys. */
181
+ export declare const isValidFeaturesData: (value: string) => boolean;
182
+
183
+ /** Converts a JS `Date` weekday (Sunday=0..Saturday=6) to an APScheduler weekday (Monday=0..Sunday=6). */
184
+ export declare const jsDayToApSchedulerDay: (jsDay: number) => number;
185
+
186
+ /**
187
+ * DIAL Core's shape for a user-facing text field: either a plain string (no
188
+ * localized variants — displayed identically for every locale) or a map of
189
+ * locale code to translated value.
190
+ */
191
+ export declare type LocalizedText = string | Record<string, string>;
192
+
193
+ /** Pads a number or numeric string to at least 2 digits with a leading zero (e.g. `9` / `'9'` → `'09'`). */
194
+ export declare const padTwoDigits: (value: number | string) => string;
195
+
196
+ export declare interface ParsedExternalServiceUrl {
197
+ /** The application's own resource id — used for `GET /api/v1/deployments/{appId}/details`. */
198
+ appId: string;
199
+ /** Key into `applicationDetails.externalServices` for this specific dependency. */
200
+ serviceName: string;
201
+ }
202
+
203
+ /** A prompt resource URL split into the bucket and the path within it. */
204
+ export declare interface ParsedPromptResourceUrl {
205
+ /** DIAL Core bucket name. */
206
+ bucket: string;
207
+ /** Path to the prompt within that bucket. */
208
+ path: string;
209
+ }
210
+
211
+ export declare const parseExternalServiceUrl: (url: string) => ParsedExternalServiceUrl | null;
212
+
213
+ /** Parses a custom app's `featuresData` JSON string, or `undefined` if it is empty or invalid. */
214
+ export declare const parseFeaturesData: (value: string) => Record<string, unknown> | undefined;
215
+
216
+ /**
217
+ * Splits a `prompts/{bucket}/{path}` resource URL into its parts, mirroring the
218
+ * backend's parser. Returns `null` for a different prefix, an empty bucket, or
219
+ * an empty path, so callers can treat "not a prompt resource id" as one case.
220
+ *
221
+ * `CatalogItem.id` for a prompt is always this full resource path — the read,
222
+ * update, delete, and move endpoints all take it unmodified. The one caller
223
+ * that still needs the bucket-relative sub-path on its own is the
224
+ * organisation (public) prompt read, whose endpoint kept its bucket-relative
225
+ * `path` argument because it only ever operates on the fixed `public`
226
+ * namespace.
227
+ */
228
+ export declare const parsePromptResourceUrl: (url: string) => ParsedPromptResourceUrl | null;
229
+
230
+ /** Maximum body length accepted by `CreatePromptDto.content`. */
231
+ export declare const PROMPT_CONTENT_MAX_LENGTH = 50000;
232
+
233
+ /** How close to a length limit the remaining-characters counter starts announcing. */
234
+ export declare const PROMPT_COUNTER_ANNOUNCE_THRESHOLD = 10;
235
+
236
+ /** Maximum description length accepted by `CreatePromptDto.description`. */
237
+ export declare const PROMPT_DESCRIPTION_MAX_LENGTH = 2000;
238
+
239
+ /** Maximum name length accepted by `CreatePromptDto.name`. */
240
+ export declare const PROMPT_NAME_MAX_LENGTH = 256;
241
+
242
+ /** Versioned JSON envelope produced by a prompt download. */
243
+ export declare interface PromptExportFormat {
244
+ /** Format version discriminator, shared with the conversation export envelope. */
245
+ version: 5;
246
+ /** Exported prompts. */
247
+ prompts: ExportedPrompt[];
248
+ /** Folders the exported prompts belong to, outermost first. */
249
+ folders: ExportFolder[];
250
+ }
251
+
252
+ /** Why a prompt-editor field failed client-side validation. */
253
+ export declare enum PromptFieldError {
254
+ /** The field is required and was left empty. */
255
+ Required = "required",
256
+ /** The value exceeds the backend's length limit for the field. */
257
+ TooLong = "tooLong",
258
+ /** The name contains characters the backend's allowlist rejects. */
259
+ InvalidName = "invalidName",
260
+ /** The backend reported an existing prompt or folder at the target path. */
261
+ Conflict = "conflict"
262
+ }
263
+
264
+ /** Which prompt namespace a catalog prompt item came from. */
265
+ export declare enum PromptSource {
266
+ /** The caller's own prompt, editable and deletable by them. */
267
+ Personal = "personal",
268
+ /** Shared with the caller by another user; permissions determine editability. */
269
+ SharedWithMe = "sharedWithMe",
270
+ /** Organisation-wide prompt; read-only for every user. */
271
+ Public = "public"
272
+ }
273
+
274
+ /** Shape of an application schema sufficient to classify it. */
275
+ export declare interface QuickAppSchemaLike {
276
+ id?: string;
277
+ displayName?: string;
278
+ }
279
+
280
+ /**
281
+ * Resolves a `LocalizedText` value to a single display string for
282
+ * `activeLocale`: exact locale match, then base-language match, then
283
+ * `primaryLocale`, then the first defined value in the map, then `''`. A
284
+ * plain string is returned unchanged — it has no locale variants.
285
+ */
286
+ export declare const resolveLocalizedText: (value: LocalizedText | undefined | null, activeLocale: string, primaryLocale: string) => string;
287
+
288
+ /** Decodes a URI-encoded path segment, returning the original string if decoding fails. */
289
+ export declare const safeDecodeURI: (path: string) => string;
290
+
291
+ /** Alias of {@link safeDecodeURI} for call sites decoding a URI component rather than a path. */
292
+ export declare const safeDecodeURIComponent: (path: string) => string;
293
+
294
+ /** Serializes a prompt export envelope into a pretty-printed JSON blob. */
295
+ export declare const serializePromptExport: (envelope: PromptExportFormat) => Blob;
296
+
297
+ /** Strips leading and trailing slashes from a path segment. */
298
+ export declare const stripSurroundingSlashes: (path: string) => string;
299
+
300
+ /** Lowercased base language of a BCP-47 tag, e.g. `'en-US'` -> `'en'`. */
301
+ export declare const toBaseLocale: (locale: string) => string;
302
+
303
+ /** An error thrown to indicate the caller is unauthenticated. */
304
+ export declare interface UnauthorizedErrorLike extends Error {
305
+ readonly status: 401;
306
+ readonly url: string;
307
+ }
308
+
309
+ /**
310
+ * Fetches all prompt namespaces (personal, shared, public) with a single
311
+ * aggregate request. Exposes `refetch` / `refetchPublicPrompts` for
312
+ * manual refresh. Does not import any app context, routing, or i18n.
313
+ */
314
+ export declare const usePromptsState: ({ listPrompts, }: UsePromptsStateParams) => UsePromptsStateResult;
315
+
316
+ /** Parameters for {@link usePromptsState}. */
317
+ export declare interface UsePromptsStateParams {
318
+ /** Fetches the aggregate prompt listing from the server. */
319
+ listPrompts: () => Promise<PromptListResponseDto>;
320
+ }
321
+
322
+ /** Result returned by {@link usePromptsState}. */
323
+ export declare interface UsePromptsStateResult {
324
+ /** The caller's own prompts. */
325
+ prompts: PromptResponseDto[];
326
+ /** Folders in the caller's own prompt namespace. */
327
+ folders: PromptFolderResponseDto[];
328
+ /** Prompts other users have shared with the caller. */
329
+ sharedWithMe: PromptResponseDto[];
330
+ /** Organisation-wide (public) prompts, read-only for every user. */
331
+ publicPrompts: PromptResponseDto[];
332
+ /** Folders in the organisation prompt namespace. */
333
+ publicFolders: PromptFolderResponseDto[];
334
+ /** True until the aggregate prompt listing has settled. */
335
+ isLoading: boolean;
336
+ /** Rejection reason of the most recent failed list request, or `null`. */
337
+ error: unknown;
338
+ /** Re-reads personal, shared-with-me, and organisation prompts. */
339
+ refetch: () => Promise<void>;
340
+ /** Compatibility alias for the aggregate refetch — same function reference as `refetch`. */
341
+ refetchPublicPrompts: () => Promise<void>;
342
+ }
343
+
344
+ /**
345
+ * Fetches usage stats via the provided `getUserUsage` function on mount.
346
+ *
347
+ * `enabled` (default `true`) lets callers behind a feature flag skip the fetch
348
+ * entirely. The hook accepts the fetch function as a parameter so the caller
349
+ * supplies an already-configured API client — the hook never constructs or
350
+ * imports one itself.
351
+ */
352
+ export declare const useUsageData: (getUserUsage: () => Promise<UserLimitStatsResponseDto>, enabled?: boolean) => UseUsageDataResult;
353
+
354
+ /** Return shape of {@link useUsageData}. */
355
+ export declare interface UseUsageDataResult {
356
+ /** Rolling usage and rate-limit stats for every deployment the caller has used in the trailing 30 days, plus the caller's global cost budget. */
357
+ usage: UserLimitStatsResponseDto | undefined;
358
+ /** `true` while the fetch is in flight. */
359
+ isLoading: boolean;
360
+ /** Set when the `getUserUsage` call rejects. */
361
+ usageError: Error | undefined;
362
+ }
363
+
364
+ /** Validates a prompt body: required, and within the backend's length limit. */
365
+ export declare const validatePromptContent: (content: string) => PromptFieldError | null;
366
+
367
+ /** Validates a prompt description; an empty description is valid. */
368
+ export declare const validatePromptDescription: (description: string) => PromptFieldError | null;
369
+
370
+ /** Validates a prompt or folder name against the backend's own rules. */
371
+ export declare const validatePromptName: (name: string) => PromptFieldError | null;
372
+
373
+ export { }
package/utils.js ADDED
@@ -0,0 +1,7 @@
1
+ import { i as e, n as t, r as n, t as r } from "./api-error-DuLNy43N.js";
2
+ import { C as i, E as a, S as o, T as s, _ as c, a as l, b as u, c as d, d as f, f as p, g as m, h, i as g, l as _, m as v, n as y, o as b, p as x, r as S, s as C, t as w, u as T, v as E, w as D, x as O, y as k } from "./useUsageData-D7BxloKZ.js";
3
+ import { i as A, n as j, r as M, t as N } from "./string-utils-iBi2Y55C.js";
4
+ import { a as P, c as F, i as I, n as L, o as R, r as z, s as B, t as V } from "./prompt-resource-Bt1I-8ri.js";
5
+ import { n as H, t as U } from "./formatting-CZyyxBG3.js";
6
+ import { n as W, t as G } from "./cron-weekday-B4w29eAC.js";
7
+ export { p as PROMPT_CONTENT_MAX_LENGTH, x as PROMPT_COUNTER_ANNOUNCE_THRESHOLD, v as PROMPT_DESCRIPTION_MAX_LENGTH, h as PROMPT_NAME_MAX_LENGTH, m as PromptFieldError, V as PromptSource, G as apSchedulerDayToJsDay, z as appendLocaleCode, I as buildAdditionalLocaleOptions, y as buildExternalServiceScopeId, o as buildPromptExportEnvelope, i as buildPromptExportFileName, c as buildPromptPath, P as composeLocalePayload, a as createCsrfMiddleware, s as createUnauthorizedMiddleware, R as decomposeLocalizedFields, U as formatCalendarDate, r as getApiErrorDetails, t as getApiErrorMessage, n as getApiErrorStatus, d as getBrowserTimezone, S as getExternalServiceFallbackName, E as getRemainingCharacters, N as includesIgnoreCase, e as isConversationNotFoundError, _ as isCustomAppSchema, T as isQuickAppSchema, l as isValidAbsoluteUrl, b as isValidFeaturesData, W as jsDayToApSchedulerDay, H as padTwoDigits, g as parseExternalServiceUrl, C as parseFeaturesData, L as parsePromptResourceUrl, B as resolveLocalizedText, j as safeDecodeURI, M as safeDecodeURIComponent, D as serializePromptExport, A as stripSurroundingSlashes, F as toBaseLocale, f as usePromptsState, w as useUsageData, k as validatePromptContent, u as validatePromptDescription, O as validatePromptName };
@@ -1,16 +1,27 @@
1
- /** Return value of {@link usePageFileDrag}. */
2
- export interface UsePageFileDragResult {
3
- /** Whether a file drag is currently over the page. */
4
- isDragging: boolean;
5
- /** Files dropped on the page, pending consumption by the caller. */
6
- pendingFiles: File[];
7
- /** Clears `pendingFiles` after the caller has processed them. */
8
- onFilesConsumed: () => void;
9
- }
10
- /**
11
- * Detects files being dragged over the whole page and exposes the dropped
12
- * files, using only `document`-level drag events with an enter/leave
13
- * counter to avoid flicker from child-element boundary crossings.
14
- */
15
- export declare const usePageFileDrag: (isAttachmentsAllowed?: boolean, isEnabled?: boolean) => UsePageFileDragResult;
16
- //# sourceMappingURL=usePageFileDrag.d.ts.map
1
+ /**
2
+ * Detects files being dragged over the whole page and exposes the dropped
3
+ * files, using only `document`-level drag events with an enter/leave
4
+ * counter to avoid flicker from child-element boundary crossings.
5
+ */
6
+ export declare const usePageFileDrag: (isAttachmentsAllowed?: boolean, isEnabled?: boolean) => UsePageFileDragResult;
7
+
8
+ /** Return value of {@link usePageFileDrag}. */
9
+ export declare interface UsePageFileDragResult {
10
+ /** Whether a file drag is currently over the page. */
11
+ isDragging: boolean;
12
+ /** Files dropped on the page, pending consumption by the caller. */
13
+ pendingFiles: File[];
14
+ /** Clears `pendingFiles` after the caller has processed them. */
15
+ onFilesConsumed: () => void;
16
+ }
17
+
18
+ /**
19
+ * Returns the maximum pixel width a resizable side panel may occupy without
20
+ * collapsing the main content area below `minContentAreaWidth`.
21
+ */
22
+ export declare const usePanelMaxWidth: (minContentAreaWidth: number) => number;
23
+
24
+ /** Tracks `window.innerWidth`, updating on the browser `resize` event. */
25
+ export declare const useViewportWidth: () => number;
26
+
27
+ export { }
@@ -0,0 +1,2 @@
1
+ import { n as e, r as t, t as n } from "./usePanelMaxWidth-BEZYuqF9.js";
2
+ export { t as usePageFileDrag, n as usePanelMaxWidth, e as useViewportWidth };
@@ -1,18 +0,0 @@
1
- /** Normalized shape returned by {@link getApiErrorDetails}. */
2
- export interface ApiErrorDetails {
3
- /** HTTP status code carried by the error, when available. */
4
- status?: number;
5
- /** Resolved human-readable error message, or `null` when none could be resolved. */
6
- message: string | null;
7
- /** Extracted W3C trace ID, when the error's response carries a valid `traceparent`. */
8
- traceId?: string;
9
- }
10
- /** True when the API indicates the conversation resource no longer exists at the path. */
11
- export declare const isConversationNotFoundError: (error: unknown) => boolean;
12
- /** HTTP status code carried by a thrown API error, or `undefined` if none is attached. */
13
- export declare const getApiErrorStatus: (error: unknown) => number | undefined;
14
- /** Resolves a human-readable message from an API error's response body, or falls back to `Error.message`. */
15
- export declare const getApiErrorMessage: (error: unknown) => Promise<string | null>;
16
- /** Normalizes any API error into a `{ status?, message, traceId? }` shape. */
17
- export declare const getApiErrorDetails: (error: unknown) => Promise<ApiErrorDetails>;
18
- //# sourceMappingURL=api-error.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api-error.d.ts","sourceRoot":"","sources":["../../src/api-error/api-error.ts"],"names":[],"mappings":"AAMA,+DAA+D;AAC/D,MAAM,WAAW,eAAe;IAC9B,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oFAAoF;IACpF,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,uFAAuF;IACvF,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAqED,0FAA0F;AAC1F,eAAO,MAAM,2BAA2B,GAAI,OAAO,OAAO,KAAG,OAI5D,CAAC;AAEF,0FAA0F;AAC1F,eAAO,MAAM,iBAAiB,GAAI,OAAO,OAAO,KAAG,MAAM,GAAG,SAC3B,CAAC;AAElC,6GAA6G;AAC7G,eAAO,MAAM,kBAAkB,GAC7B,OAAO,OAAO,KACb,OAAO,CAAC,MAAM,GAAG,IAAI,CAevB,CAAC;AAEF,8EAA8E;AAc9E,eAAO,MAAM,kBAAkB,GAC7B,OAAO,OAAO,KACb,OAAO,CAAC,eAAe,CAwCzB,CAAC"}
@@ -1,15 +0,0 @@
1
- import { Middleware } from '@epam/ai-dial-chat-api-client';
2
- /** Host capabilities {@link createCsrfMiddleware} needs to attach and capture a CSRF token. */
3
- export interface CreateCsrfMiddlewareDeps {
4
- /** Returns the currently held CSRF token, or `null` when none is set. */
5
- getCsrfToken: () => string | null;
6
- /** Stores a CSRF token captured from a response header, or `null` to clear it. */
7
- setCsrfToken: (token: string | null) => void;
8
- }
9
- /**
10
- * Builds a generated-client `Middleware` that attaches `X-CSRF-Token` on every
11
- * non-GET request when a token is set, and captures a rotated token from the
12
- * `x-csrf-token` response header.
13
- */
14
- export declare const createCsrfMiddleware: (deps: CreateCsrfMiddlewareDeps) => Middleware;
15
- //# sourceMappingURL=create-csrf-middleware.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-csrf-middleware.d.ts","sourceRoot":"","sources":["../../src/api-transport/create-csrf-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAEhE,+FAA+F;AAC/F,MAAM,WAAW,wBAAwB;IACvC,yEAAyE;IACzE,YAAY,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IAClC,kFAAkF;IAClF,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAC9C;AAED;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAC/B,MAAM,wBAAwB,KAC7B,UAqBD,CAAC"}
@@ -1,40 +0,0 @@
1
- import { Middleware } from '@epam/ai-dial-chat-api-client';
2
- /** Outcome of a CSRF-token refresh attempt, reported back to {@link createUnauthorizedMiddleware}. */
3
- export type CsrfRefreshOutcome = {
4
- status: 'ok';
5
- token: string;
6
- } | {
7
- status: 'unauthorized' | 'failed';
8
- };
9
- /** An error thrown to indicate the caller is unauthenticated. */
10
- export interface UnauthorizedErrorLike extends Error {
11
- readonly status: 401;
12
- readonly url: string;
13
- }
14
- /** Host capabilities {@link createUnauthorizedMiddleware} needs to handle 401s and invalid-CSRF retries. */
15
- export interface CreateUnauthorizedMiddlewareDeps {
16
- /** Notifies the host that a request was unauthorized (also expected to clear any held CSRF token). */
17
- notifyUnauthorized: (url: string) => void;
18
- /** Attempts to refresh the CSRF token, de-duplicating concurrent calls. */
19
- refreshCsrfToken: () => Promise<CsrfRefreshOutcome>;
20
- /** Classifies a response body as an invalid-CSRF error. */
21
- isInvalidCsrfErrorBody: (body: string) => boolean;
22
- /** Returns the currently held CSRF token, or `null` when none is set. */
23
- getCsrfToken: () => string | null;
24
- /**
25
- * Stores a CSRF token captured from a response header. Needed here (in
26
- * addition to the CSRF middleware's own `post` hook) because the
27
- * invalid-CSRF retry issues its own `fetch` outside the generated-client
28
- * middleware pipeline, so its response header is never seen by that hook.
29
- */
30
- setCsrfToken: (token: string | null) => void;
31
- /** Constructs the error thrown to signal an unauthorized request. */
32
- createUnauthorizedError: (url: string) => UnauthorizedErrorLike;
33
- }
34
- /**
35
- * Builds a generated-client `Middleware` that throws on 401, and on a
36
- * classified invalid-CSRF 403 refreshes the token and retries the original
37
- * request exactly once.
38
- */
39
- export declare const createUnauthorizedMiddleware: (deps: CreateUnauthorizedMiddlewareDeps) => Middleware;
40
- //# sourceMappingURL=create-unauthorized-middleware.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-unauthorized-middleware.d.ts","sourceRoot":"","sources":["../../src/api-transport/create-unauthorized-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAIhE,sGAAsG;AACtG,MAAM,MAAM,kBAAkB,GAC1B;IAAE,MAAM,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC/B;IAAE,MAAM,EAAE,cAAc,GAAG,QAAQ,CAAA;CAAE,CAAC;AAE1C,iEAAiE;AACjE,MAAM,WAAW,qBAAsB,SAAQ,KAAK;IAClD,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,4GAA4G;AAC5G,MAAM,WAAW,gCAAgC;IAC/C,sGAAsG;IACtG,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,2EAA2E;IAC3E,gBAAgB,EAAE,MAAM,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACpD,2DAA2D;IAC3D,sBAAsB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAClD,yEAAyE;IACzE,YAAY,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IAClC;;;;;OAKG;IACH,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC7C,qEAAqE;IACrE,uBAAuB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,qBAAqB,CAAC;CACjE;AAgCD;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,GACvC,MAAM,gCAAgC,KACrC,UAoEF,CAAC"}
@@ -1,32 +0,0 @@
1
- import { DisplayAttachment } from '@epam/ai-dial-chat-shared';
2
- /** Resolves a DIAL Core file id to a downloadable URL. Host-owned — encodes the app's own file-download endpoint. */
3
- export type ResolveDownloadUrl = (fileId: string) => string | undefined;
4
- /** Parameters for {@link useAttachmentAction}. */
5
- export interface UseAttachmentActionParams {
6
- /** Resolves a DIAL Core file id to a downloadable URL. */
7
- resolveDownloadUrl: ResolveDownloadUrl;
8
- }
9
- /** Return value of {@link useAttachmentAction}. */
10
- export interface UseAttachmentActionResult {
11
- /** Default click handler for an attachment tile: download, canvas-preview, or open-in-browser. */
12
- handleAttachmentClick: (attachment: DisplayAttachment) => void;
13
- }
14
- /** Returns true when `downloadAttachment` can trigger a download for `attachment`. */
15
- export declare const isDownloadableAttachment: (attachment: DisplayAttachment) => boolean;
16
- /**
17
- * Downloads an attachment that carries its own content: a DIAL-hosted file
18
- * (`url` resolves to a DIAL file id) or an inline `data` payload. Returns
19
- * whether a download was actually triggered, so callers can skip
20
- * non-downloadable (reference-only) attachments without duplicating the
21
- * DIAL-file-id / URL-resolution checks.
22
- */
23
- export declare const downloadAttachment: (attachment: DisplayAttachment, resolveDownloadUrl: ResolveDownloadUrl) => boolean;
24
- /**
25
- * Default click behavior for a plain attachment tile: downloads DIAL-hosted
26
- * and inline (`data`) files, and for reference-only attachments (no `url`/`data`,
27
- * only `referenceUrl` — e.g. RAG/search-grounding chunks), opens a PDF
28
- * `referenceUrl` in the canvas scrolled to its referenced page when present,
29
- * otherwise opens/downloads the `referenceUrl` as-is.
30
- */
31
- export declare const useAttachmentAction: ({ resolveDownloadUrl, }: UseAttachmentActionParams) => UseAttachmentActionResult;
32
- //# sourceMappingURL=useAttachmentAction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAttachmentAction.d.ts","sourceRoot":"","sources":["../../../src/attachment/useAttachmentAction/useAttachmentAction.ts"],"names":[],"mappings":"AAKA,OAAO,EAOL,KAAK,iBAAiB,EACvB,MAAM,2BAA2B,CAAC;AAKnC,qHAAqH;AACrH,MAAM,MAAM,kBAAkB,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;AAExE,kDAAkD;AAClD,MAAM,WAAW,yBAAyB;IACxC,0DAA0D;IAC1D,kBAAkB,EAAE,kBAAkB,CAAC;CACxC;AAED,mDAAmD;AACnD,MAAM,WAAW,yBAAyB;IACxC,kGAAkG;IAClG,qBAAqB,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,IAAI,CAAC;CAChE;AAED,sFAAsF;AACtF,eAAO,MAAM,wBAAwB,GACnC,YAAY,iBAAiB,KAC5B,OAEsB,CAAC;AAE1B;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAC7B,YAAY,iBAAiB,EAC7B,oBAAoB,kBAAkB,KACrC,OA0BF,CAAC;AAsDF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,GAAI,yBAEjC,yBAAyB,KAAG,yBAmC9B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAttachmentValidation.d.ts","sourceRoot":"","sources":["../../../src/attachment/useAttachmentValidation/useAttachmentValidation.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,qBAAqB,EACrB,KAAK,UAAU,EAChB,MAAM,2BAA2B,CAAC;AAMnC,sDAAsD;AACtD,oBAAY,+BAA+B;IACzC,4EAA4E;IAC5E,cAAc,mBAAmB;IACjC,yEAAyE;IACzE,eAAe,oBAAoB;CACpC;AAED,8GAA8G;AAC9G,MAAM,WAAW,8BAA8B;IAC7C,2CAA2C;IAC3C,MAAM,EAAE,+BAA+B,CAAC;IACxC,4EAA4E;IAC5E,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,6HAA6H;IAC7H,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,sDAAsD;AACtD,MAAM,WAAW,6BAA6B;IAC5C,6DAA6D;IAC7D,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,+GAA+G;IAC/G,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,8BAA8B,KAAK,IAAI,CAAC;IACpE,wGAAwG;IACxG,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,uDAAuD;AACvD,MAAM,WAAW,6BAA6B;IAC5C,uGAAuG;IACvG,oBAAoB,EAAE,MAAM,EAAE,CAAC;IAC/B,2DAA2D;IAC3D,oBAAoB,EAAE,OAAO,CAAC;IAC9B,+FAA+F;IAC/F,kBAAkB,EAAE,CAClB,UAAU,EAAE,UAAU,KACnB,qBAAqB,GAAG,SAAS,CAAC;IACvC,gHAAgH;IAChH,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AAED;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,GAAI,sDAIrC,6BAA6B,KAAG,6BAmElC,CAAC"}
@@ -1,27 +0,0 @@
1
- import { CatalogItem } from '@epam/ai-dial-catalog';
2
- import { CatalogEntityType } from '@epam/ai-dial-chat-shared';
3
- /**
4
- * Filters catalog items to those whose type is in `visibleTypes`.
5
- * Call only when selector mode is active; otherwise pass through the original array.
6
- */
7
- export declare const filterCatalogItemsBySelector: (items: readonly CatalogItem[], visibleTypes: ReadonlySet<CatalogEntityType>) => CatalogItem[];
8
- /**
9
- * Filters out items owned by the current user when `hideOwned` is true.
10
- * Always returns a new array so callers may safely assign to mutable collections.
11
- */
12
- export declare const filterHiddenOwnedItems: (items: readonly CatalogItem[], hideOwned: boolean) => CatalogItem[];
13
- /**
14
- * Returns items marked as a user favorite, in original order.
15
- */
16
- export declare const deriveFavoriteItems: (items: readonly CatalogItem[]) => CatalogItem[];
17
- /**
18
- * Returns the subset of `tabOrder` entries whose entity type is present in
19
- * `items`, preserving tab order.
20
- */
21
- export declare const deriveAvailableTabIds: <T extends CatalogEntityType>(items: readonly CatalogItem[], tabOrder: readonly T[]) => T[];
22
- /**
23
- * Returns the intersection of `persistedTopics` with topics that appear in
24
- * `items`. Returns a new Set and never mutates either input.
25
- */
26
- export declare const reconcileFilterTopics: (persistedTopics: ReadonlySet<string>, items: readonly CatalogItem[]) => Set<string>;
27
- //# sourceMappingURL=catalog-derivations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"catalog-derivations.d.ts","sourceRoot":"","sources":["../../src/catalog/catalog-derivations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,4BAA4B,GACvC,OAAO,SAAS,WAAW,EAAE,EAC7B,cAAc,WAAW,CAAC,iBAAiB,CAAC,KAC3C,WAAW,EAAyD,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GACjC,OAAO,SAAS,WAAW,EAAE,EAC7B,WAAW,OAAO,KACjB,WAAW,EACkD,CAAC;AAEjE;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAC9B,OAAO,SAAS,WAAW,EAAE,KAC5B,WAAW,EAAiD,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAAI,CAAC,SAAS,iBAAiB,EAC/D,OAAO,SAAS,WAAW,EAAE,EAC7B,UAAU,SAAS,CAAC,EAAE,KACrB,CAAC,EAGH,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAChC,iBAAiB,WAAW,CAAC,MAAM,CAAC,EACpC,OAAO,SAAS,WAAW,EAAE,KAC5B,GAAG,CAAC,MAAM,CAKZ,CAAC"}
@@ -1,47 +0,0 @@
1
- import { CatalogItem } from '@epam/ai-dial-catalog';
2
- import { PromptResponseDto } from '@epam/ai-dial-chat-api-client';
3
- /** Discriminant for primary-action result variants. */
4
- export declare enum CatalogPrimaryActionType {
5
- Deployment = "deployment",
6
- Prompt = "prompt"
7
- }
8
- /** Primary action resolved for a deployment (model, agent, toolset, or skill). */
9
- export interface CatalogPrimaryActionDeployment {
10
- /** Discriminant. */
11
- kind: CatalogPrimaryActionType.Deployment;
12
- /** Deployment entity id. */
13
- id: string;
14
- }
15
- /** Primary action resolved for a prompt. */
16
- export interface CatalogPrimaryActionPrompt {
17
- /** Discriminant. */
18
- kind: CatalogPrimaryActionType.Prompt;
19
- /** Prompt entity id. */
20
- id: string;
21
- /** Display name of the prompt. */
22
- name: string;
23
- /** Short description of the prompt. */
24
- description: string;
25
- /** Resolved prompt body (seeded from details or fetched). */
26
- content: string;
27
- /** Whether the prompt body contains at least one `{{parameter}}` placeholder. */
28
- hasParameters: boolean;
29
- }
30
- /** Discriminated union of catalog primary-action results. */
31
- export type CatalogPrimaryActionResult = CatalogPrimaryActionDeployment | CatalogPrimaryActionPrompt;
32
- /**
33
- * Resolves the primary action for a catalog item.
34
- *
35
- * For prompts: prefers already-seeded content from `item.details`; otherwise
36
- * calls `fetchPrompt` once to retrieve the body. Sets `hasParameters` based on
37
- * whether the content contains prompt-parameter placeholders.
38
- *
39
- * For all other entity types: returns a deployment result with the item id.
40
- *
41
- * The function does not navigate, select a deployment, show notifications, or
42
- * import route constants — those remain the caller's responsibility.
43
- *
44
- * @throws When `fetchPrompt` rejects (propagated to the caller without wrapping).
45
- */
46
- export declare const resolveCatalogPrimaryAction: (item: CatalogItem, fetchPrompt: (item: CatalogItem) => Promise<PromptResponseDto>) => Promise<CatalogPrimaryActionResult>;
47
- //# sourceMappingURL=catalog-primary-action.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"catalog-primary-action.d.ts","sourceRoot":"","sources":["../../src/catalog/catalog-primary-action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAMvE,uDAAuD;AACvD,oBAAY,wBAAwB;IAClC,UAAU,eAAe;IACzB,MAAM,WAAW;CAClB;AAED,kFAAkF;AAClF,MAAM,WAAW,8BAA8B;IAC7C,oBAAoB;IACpB,IAAI,EAAE,wBAAwB,CAAC,UAAU,CAAC;IAC1C,4BAA4B;IAC5B,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,4CAA4C;AAC5C,MAAM,WAAW,0BAA0B;IACzC,oBAAoB;IACpB,IAAI,EAAE,wBAAwB,CAAC,MAAM,CAAC;IACtC,wBAAwB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,6DAA6D;IAC7D,OAAO,EAAE,MAAM,CAAC;IAChB,iFAAiF;IACjF,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,6DAA6D;AAC7D,MAAM,MAAM,0BAA0B,GAClC,8BAA8B,GAC9B,0BAA0B,CAAC;AAE/B;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,2BAA2B,GACtC,MAAM,WAAW,EACjB,aAAa,CAAC,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,iBAAiB,CAAC,KAC7D,OAAO,CAAC,0BAA0B,CAmBpC,CAAC"}