@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/oauth.d.ts ADDED
@@ -0,0 +1,440 @@
1
+ import { DialToolsetDto } from '@epam/ai-dial-chat-api-client';
2
+ import { ToolsetLoginBodyDto } from '@epam/ai-dial-chat-api-client';
3
+ import { ToolsetLogoutBodyDto } from '@epam/ai-dial-chat-api-client';
4
+
5
+ /**
6
+ * Builds the OAuth authorize URL for a given, already-generated `state`
7
+ * value. The caller owns what `state` carries — see `initiateOAuthLogin`.
8
+ * Returns `null` rather than throwing for a configuration that cannot
9
+ * produce a valid URL, including one whose authorization endpoint is not
10
+ * reachable over a secure transport.
11
+ */
12
+ export declare const buildToolsetAuthorizeUrl: (auth: ToolsetOAuthSettings, redirectUri: string, state: string) => string | null;
13
+
14
+ /**
15
+ * Inverse of `encodeToolsetId` — decodes each `/`-separated segment back to
16
+ * its raw, human-readable form. A segment that isn't valid percent-encoding
17
+ * is passed through unchanged rather than throwing, since this decodes
18
+ * externally-sourced ids (broadcast toolset-login events).
19
+ */
20
+ export declare const decodeToolsetId: (id: string) => string;
21
+
22
+ /**
23
+ * Broadcasts a successful toolset login to any listener within the current
24
+ * window — host-to-host, not `postMessage`, since this notifies other React
25
+ * trees in the same document (e.g. a mounted `AppEditorIframe`), not an
26
+ * embedded cross-origin iframe.
27
+ */
28
+ export declare const emitToolsetLoginSuccess: <T>(detail: ToolsetLoginSuccessDetail<T>) => void;
29
+
30
+ /**
31
+ * Percent-encodes each `/`-separated segment of a toolset id so it satisfies
32
+ * the backend's `DEPLOYMENT_ID_PATTERN`/`TOOLSET_URL_PATTERN` (spaces and
33
+ * other reserved characters must already be percent-encoded — e.g. `%20`,
34
+ * not a real space — before this value is used against the toolsets API;
35
+ * `/` stays a literal path separator). Externally-sourced ids — the raw,
36
+ * human-readable id an embedded iframe sends over `postMessage`
37
+ * (e.g. `toolsets/<bucket>/My Toolset__1.0`) — arrive unencoded, unlike the
38
+ * already-encoded `id`/`toolset` field `listToolsets()`/`DialToolsetDto`
39
+ * returns. Mirrors `encodeDeploymentId` (`deployment-id.ts`), which exists
40
+ * for the identical reason on the applications side.
41
+ */
42
+ export declare const encodeToolsetId: (id: string) => string;
43
+
44
+ /** Name of the same-origin `BroadcastChannel` shared by an OAuth flow's opener and its callback popup. */
45
+ export declare const getToolsetOAuthChannelName: (flowId: string) => string;
46
+
47
+ /**
48
+ * Resolves the OAuth callback location against the current origin. The
49
+ * callback path is supplied by the host: this module owns no application
50
+ * route.
51
+ */
52
+ export declare const getToolsetRedirectUri: (callbackPath: string) => string;
53
+
54
+ /**
55
+ * Builds the OAuth authorize URL, opens a same-origin popup synchronously (so
56
+ * a blocked popup can be reliably detected), writes the redirect state into
57
+ * *that popup's own* `sessionStorage` while it is still same-origin
58
+ * `about:blank`, then navigates it to the provider's authorization page.
59
+ * `auth` must already be known synchronously here, so the config is validated
60
+ * *before* opening the popup — unlike `navigateToolsetOAuthPopup`, used when
61
+ * the auth config can only be fetched asynchronously after the popup is
62
+ * already open.
63
+ */
64
+ export declare const initiateOAuthLogin: (auth: ToolsetOAuthSettings, toolsetId: string, callbackPath: string, credentialsLevel?: ToolsetCredentialsLevel, offlineUsageConsent?: boolean) => ToolsetOAuthInitiationResult;
65
+
66
+ /** Whether a toolset id belongs to the `public` bucket (shared with all users), mirroring the legacy `isEntityIdPublic` check. */
67
+ export declare const isPublicToolsetId: (toolsetId: string) => boolean;
68
+
69
+ /**
70
+ * Builds the OAuth authorize URL for an already-open popup and navigates it,
71
+ * closing the popup and returning `InvalidConfig` if the auth config can't
72
+ * produce a valid authorize URL. `callbackPath` is the host's own callback
73
+ * route — this module owns no application route.
74
+ */
75
+ export declare const navigateToolsetOAuthPopup: (popup: Window, auth: ToolsetOAuthSettings, toolsetId: string, callbackPath: string, credentialsLevel?: ToolsetCredentialsLevel, resourceKind?: OAuthResourceKind, offlineUsageConsent?: boolean) => ToolsetOAuthInitiationResult;
76
+
77
+ /** Arguments handed to the host's exchange callback. */
78
+ export declare interface OAuthExchangeParams {
79
+ /** One-time authorization code the provider returned. */
80
+ code: string;
81
+ /** Redirect URI the code was issued against, to be echoed back to the backend. */
82
+ redirectUri: string;
83
+ /** Credentials level resolved from the stored redirect state. */
84
+ credentialsLevel: ToolsetCredentialsLevel;
85
+ /** The full redirect state the flow stored before navigating to the provider. */
86
+ redirectState: ToolsetRedirectState;
87
+ }
88
+
89
+ /**
90
+ * Which kind of resource an OAuth flow is authenticating. Three kinds share
91
+ * the same popup/`BroadcastChannel` machinery, which is why this module is
92
+ * named for the concern rather than for toolsets.
93
+ */
94
+ export declare enum OAuthResourceKind {
95
+ Toolset = "toolset",
96
+ ExternalService = "external-service",
97
+ /**
98
+ * Proactive Scheduled Tasks offline-credentials consent. Unlike
99
+ * `Toolset`/`ExternalService`, this kind has no natural per-resource id —
100
+ * the shared `ToolsetRedirectState.toolsetId` slot is repurposed as a
101
+ * fixed sentinel correlation id (`'offline-credentials'`) purely for the
102
+ * popup/`BroadcastChannel` handshake, never as a real toolset/
103
+ * external-service id.
104
+ */
105
+ OfflineCredentials = "offline-credentials"
106
+ }
107
+
108
+ /**
109
+ * Opens a same-origin, blank popup synchronously — call this as the very
110
+ * first thing in a click (or click-derived) handler so the browser still
111
+ * treats it as user-triggered, before doing any `await`. A caller that needs
112
+ * to fetch the OAuth config first (it isn't known synchronously) opens the
113
+ * popup with this, then calls `navigateToolsetOAuthPopup` once the config has
114
+ * been fetched.
115
+ */
116
+ export declare const openToolsetOAuthPopup: () => Window | null;
117
+
118
+ export declare const subscribeToolsetLoginSuccess: <T>(listener: (detail: ToolsetLoginSuccessDetail<T>) => void) => (() => void);
119
+
120
+ /** `sessionStorage` key the flow writes its `ToolsetRedirectState` under, in the popup it opens. */
121
+ export declare const TOOLSET_REDIRECT_STATE_KEY = "toolset-redirect-state";
122
+
123
+ /** Sign-in state DIAL Core reports for one credentials level of a toolset. */
124
+ export declare enum ToolsetAuthStatus {
125
+ SignedIn = "SIGNED_IN",
126
+ SignedOut = "SIGNED_OUT",
127
+ Failed = "FAILED"
128
+ }
129
+
130
+ /**
131
+ * Enums and constants shared by the OAuth authorization-code popup flow and
132
+ * every host that drives it. These declarations live here (rather than being
133
+ * copied per host) because TypeScript string enums are nominal: a
134
+ * structurally identical host-side copy would not type-check against a lib
135
+ * signature that names the enum.
136
+ */
137
+ /** Authentication mechanism a toolset requires. */
138
+ export declare enum ToolsetAuthTypes {
139
+ None = "NONE",
140
+ ApiKey = "API_KEY",
141
+ OAuth = "OAUTH"
142
+ }
143
+
144
+ /** Scope the credentials submitted by a login apply to. */
145
+ export declare enum ToolsetCredentialsLevel {
146
+ Global = "GLOBAL",
147
+ User = "USER",
148
+ App = "APP"
149
+ }
150
+
151
+ /** Discriminated outcome of one login attempt. */
152
+ export declare interface ToolsetLoginOutcome {
153
+ /** Which terminal branch the attempt resolved through. */
154
+ type: ToolsetLoginOutcomeType;
155
+ }
156
+
157
+ /** Terminal outcome kinds `login` can resolve. */
158
+ export declare enum ToolsetLoginOutcomeType {
159
+ Success = "success",
160
+ Failure = "failure",
161
+ PopupBlocked = "popup-blocked",
162
+ Cancelled = "cancelled"
163
+ }
164
+
165
+ /** Arguments for one `login` call. */
166
+ export declare interface ToolsetLoginParams {
167
+ /** Already-encoded toolset id/url, as returned by `listToolsets`/`getToolset`. */
168
+ toolsetId: string;
169
+ /** Credentials level the submitted credentials apply to. */
170
+ credentialsLevel: ToolsetCredentialsLevel;
171
+ /** Authentication mechanism the toolset requires. */
172
+ authenticationType: ToolsetAuthTypes;
173
+ /** Required for `ToolsetAuthTypes.ApiKey`. */
174
+ apiKey?: string;
175
+ /** Required for `ToolsetAuthTypes.OAuth`. */
176
+ oauthSettings?: ToolsetOAuthSettings;
177
+ /**
178
+ * Whether the target level's cached status is currently `FAILED` — API key
179
+ * logins log that level out first when true. Ignored when `forceStale` is
180
+ * set, and never consulted for OAuth (OAuth does not log out before
181
+ * retrying).
182
+ */
183
+ isCurrentlyFailed?: boolean;
184
+ /**
185
+ * Always logs out the target level first (for both API key and OAuth)
186
+ * regardless of the cached status — set by callers reacting to a
187
+ * DIAL-Core-pushed `toolset/signin` event, which is proof the cached
188
+ * status may be stale even when it still reads `SIGNED_IN`.
189
+ */
190
+ forceStale?: boolean;
191
+ /**
192
+ * Whether the user agreed an application may use this credential while they
193
+ * are away. DIAL Core gates every on-behalf-of mint on it, so a toolset
194
+ * signed in without it works interactively and still fails with
195
+ * `consent-required` in the background. Absent means not granted.
196
+ */
197
+ offlineUsageConsent?: boolean;
198
+ }
199
+
200
+ /** Detail payload for a successful toolset login, generic over the app's own credentials-level type. */
201
+ export declare interface ToolsetLoginSuccessDetail<T> {
202
+ /** Already-encoded toolset id/url, as passed into `useToolsetLogin`'s `login`. */
203
+ toolsetId: string;
204
+ credentialsLevel: T;
205
+ }
206
+
207
+ /** Query parameters written into the callback popup URL after an OAuth flow completes. */
208
+ export declare enum ToolsetOAuthCallbackQuery {
209
+ Result = "toolsetOAuthResult",
210
+ FailureReason = "toolsetOAuthFailureReason"
211
+ }
212
+
213
+ /** Control messages exchanged over a flow-scoped OAuth channel. */
214
+ export declare enum ToolsetOAuthChannelControlType {
215
+ ResultAcknowledged = "result-acknowledged"
216
+ }
217
+
218
+ /**
219
+ * Non-secret result reported by the OAuth callback popup for one flow. Used
220
+ * unchanged by every resource kind — the callback branch only needs to signal
221
+ * success/failure, not resource details, back through the channel.
222
+ */
223
+ export declare type ToolsetOAuthChannelMessage = ToolsetOAuthSuccessMessage | ToolsetOAuthFailureMessage;
224
+
225
+ export declare interface ToolsetOAuthFailureMessage {
226
+ type: ToolsetOAuthResultType.Failure;
227
+ reason: ToolsetOAuthFailureReason;
228
+ }
229
+
230
+ /** Reason codes the callback popup can report for a failed OAuth login. */
231
+ export declare enum ToolsetOAuthFailureReason {
232
+ MissingCode = "missing-code",
233
+ MissingRedirectState = "missing-redirect-state",
234
+ StateMismatch = "state-mismatch",
235
+ LoginRequestFailed = "login-request-failed"
236
+ }
237
+
238
+ export declare type ToolsetOAuthInitiationResult = {
239
+ type: ToolsetOAuthInitiationResultType.Started;
240
+ popup: Window;
241
+ flowId: string;
242
+ } | {
243
+ type: ToolsetOAuthInitiationResultType.Blocked;
244
+ } | {
245
+ type: ToolsetOAuthInitiationResultType.InvalidConfig;
246
+ };
247
+
248
+ /** Outcome of calling `initiateOAuthLogin`. */
249
+ export declare enum ToolsetOAuthInitiationResultType {
250
+ /** The popup was opened and navigated to the provider's authorize URL. */
251
+ Started = "started",
252
+ /** The browser blocked the popup before it could be opened. */
253
+ Blocked = "blocked",
254
+ /** The toolset's OAuth configuration is missing required fields. */
255
+ InvalidConfig = "invalid-config"
256
+ }
257
+
258
+ /** Result resolved by `waitForToolsetOAuthResult` to the tab that initiated the login. */
259
+ export declare type ToolsetOAuthResult = ToolsetOAuthSuccessMessage | ToolsetOAuthFailureMessage | {
260
+ type: ToolsetOAuthResultType.Cancelled;
261
+ };
262
+
263
+ /** Confirms that the initiating tab consumed the callback result. */
264
+ export declare interface ToolsetOAuthResultAcknowledgement {
265
+ type: ToolsetOAuthChannelControlType.ResultAcknowledged;
266
+ }
267
+
268
+ /** Outcome reported back to the tab that initiated an OAuth login. */
269
+ export declare enum ToolsetOAuthResultType {
270
+ Success = "success",
271
+ Failure = "failure",
272
+ /** The popup was closed and focus returned to its opener, or the flow timed out. */
273
+ Cancelled = "cancelled"
274
+ }
275
+
276
+ /**
277
+ * OAuth client settings needed to build an authorize URL — the narrow subset
278
+ * of a toolset's `authSettings` this module reads. Declared as its own shape
279
+ * so hosts can keep their wider editor form models app-owned and still pass
280
+ * them straight in.
281
+ */
282
+ export declare interface ToolsetOAuthSettings {
283
+ clientId?: string;
284
+ authorizationEndpoint?: string;
285
+ scopes?: string[];
286
+ codeChallenge?: string;
287
+ codeChallengeMethod?: string;
288
+ }
289
+
290
+ export declare interface ToolsetOAuthSuccessMessage {
291
+ type: ToolsetOAuthResultType.Success;
292
+ toolsetId: string;
293
+ credentialsLevel: ToolsetCredentialsLevel;
294
+ }
295
+
296
+ /**
297
+ * Redirect state for an OAuth login flow. The flow writes this into the
298
+ * *popup's own* `sessionStorage` before navigating it to the provider, since
299
+ * the popup and its opener do not share a `sessionStorage` partition once
300
+ * navigated cross-origin.
301
+ */
302
+ export declare interface ToolsetRedirectState {
303
+ toolsetId: string;
304
+ credentialsLevel?: ToolsetCredentialsLevel;
305
+ redirectUri?: string;
306
+ /** CSRF state token generated by the client before the OAuth redirect. */
307
+ state?: string;
308
+ /**
309
+ * Which sign-in endpoint the host's callback route should submit the
310
+ * authorization code to. Defaults to `Toolset` when absent so every
311
+ * existing redirect state (written before this field existed) keeps
312
+ * calling the toolset login unchanged. `ExternalService` reuses the same
313
+ * popup/BroadcastChannel machinery with `toolsetId` repurposed as an
314
+ * `{appId}::{serviceId}` composite key. `OfflineCredentials` reuses the
315
+ * same machinery again, with `toolsetId` repurposed as a fixed sentinel
316
+ * correlation id (`'offline-credentials'`) — the field carries no real
317
+ * toolset/external-service meaning there, only the opaque
318
+ * flow-correlation string the shared popup/`BroadcastChannel` utilities
319
+ * require structurally.
320
+ */
321
+ resourceKind?: OAuthResourceKind;
322
+ /**
323
+ * Whether the user agreed the application may use the resulting credential
324
+ * while they are away. Carried through the popup because the choice is made
325
+ * before the redirect and the code exchange happens after it — the callback
326
+ * route has no other way to learn it. Absent means "not granted".
327
+ */
328
+ offlineUsageConsent?: boolean;
329
+ }
330
+
331
+ /**
332
+ * Completes an OAuth authorization-code flow from inside the callback popup:
333
+ * reads and clears the redirect state written into this popup's own
334
+ * `sessionStorage`, scrubs the authorization code from the visible URL before
335
+ * any request, validates the returned `state`, performs the exchange through
336
+ * the injected callback, then reports the outcome into the popup URL and over
337
+ * the flow channel until acknowledged, closing the popup afterwards. Runs its
338
+ * effect once per mount even under StrictMode double-invocation. Renders
339
+ * nothing and produces no user-visible text — the host page presents and
340
+ * announces the returned state in its own language.
341
+ */
342
+ export declare const useOAuthCallbackCompletion: ({ searchParams, callbackPath, exchange, }: UseOAuthCallbackCompletionParams) => UseOAuthCallbackCompletionResult;
343
+
344
+ /** Parameters for {@link useOAuthCallbackCompletion}. */
345
+ export declare interface UseOAuthCallbackCompletionParams {
346
+ /**
347
+ * Query parameters of the callback URL. Read once per mount; the hook takes
348
+ * `code` and `state` from it.
349
+ */
350
+ searchParams: URLSearchParams;
351
+ /**
352
+ * Path used to build the `redirect_uri` echoed back to the backend when the
353
+ * stored redirect state carries none — every state written by the current
354
+ * flow does, so this only covers states written before that field existed.
355
+ */
356
+ callbackPath: string;
357
+ /**
358
+ * Performs the code-for-credentials exchange. Resolving `null` reports
359
+ * success; resolving a failure reason reports that reason (for a host-side
360
+ * validation the hook cannot perform, such as an unparseable resource id);
361
+ * rejecting reports `LoginRequestFailed`.
362
+ */
363
+ exchange: (params: OAuthExchangeParams) => Promise<ToolsetOAuthFailureReason | null>;
364
+ }
365
+
366
+ /** State {@link useOAuthCallbackCompletion} exposes for the host page to render. */
367
+ export declare interface UseOAuthCallbackCompletionResult {
368
+ /** True until the flow has reported an outcome. */
369
+ isInProgress: boolean;
370
+ /** Reason the flow failed, or `null` while in progress or on success. */
371
+ failureReason: ToolsetOAuthFailureReason | null;
372
+ }
373
+
374
+ /**
375
+ * Shared toolset API-key/OAuth login orchestration, so no two surfaces fork
376
+ * the popup/`BroadcastChannel` handshake or the stale-credential-clearing
377
+ * rule. Every backend call arrives as an injected callback: the hook
378
+ * constructs no client instance and reads no app context. It resolves an
379
+ * outcome and shows nothing itself — mapping an outcome to notifications is
380
+ * the caller's job.
381
+ */
382
+ export declare const useToolsetLogin: ({ callbackPath, loginToolset, logoutToolset, getToolset, }: UseToolsetLoginParams) => UseToolsetLoginResult;
383
+
384
+ /** Parameters for {@link useToolsetLogin}. */
385
+ export declare interface UseToolsetLoginParams {
386
+ /**
387
+ * The host's OAuth callback route. Resolved against `window.location.origin`
388
+ * for the `redirect_uri`, and compared against the popup's pathname when
389
+ * reading a completion marker out of its URL.
390
+ */
391
+ callbackPath: string;
392
+ /** Submits credentials for one toolset at one credentials level. */
393
+ loginToolset: (toolsetId: string, body: ToolsetLoginBodyDto) => Promise<unknown>;
394
+ /** Clears stored credentials for one toolset at one credentials level. */
395
+ logoutToolset: (toolsetId: string, body: ToolsetLogoutBodyDto) => Promise<unknown>;
396
+ /** Re-reads a toolset so a reported cancellation can be checked against the backend. */
397
+ getToolset: (toolsetId: string) => Promise<DialToolsetDto>;
398
+ }
399
+
400
+ /** Result returned by {@link useToolsetLogin}. */
401
+ export declare interface UseToolsetLoginResult {
402
+ /** Runs one API-key or OAuth login attempt and resolves its outcome. */
403
+ login: (params: ToolsetLoginParams) => Promise<ToolsetLoginOutcome>;
404
+ }
405
+
406
+ /**
407
+ * Waits for the OAuth callback popup to report a result over BroadcastChannel
408
+ * or through the completion marker in its same-origin URL. A cross-origin
409
+ * provider can make the retained WindowProxy look closed even while the popup
410
+ * remains open, so cancellation is confirmed only when the initiating window
411
+ * regains focus. Reported results are acknowledged so the callback can close
412
+ * itself even when the retained WindowProxy was severed.
413
+ */
414
+ export declare const waitForToolsetOAuthResult: (popup: Window, flowId: string, { toolsetId, credentialsLevel, callbackPath, timeoutMs, pollIntervalMs, }: WaitForToolsetOAuthResultOptions) => Promise<ToolsetOAuthResult>;
415
+
416
+ /** Options for {@link waitForToolsetOAuthResult}. */
417
+ export declare interface WaitForToolsetOAuthResultOptions {
418
+ /** Resource id echoed back in a success result. */
419
+ toolsetId: string;
420
+ /** Credentials level echoed back in a success result. */
421
+ credentialsLevel: ToolsetCredentialsLevel;
422
+ /**
423
+ * The host's callback route — the same path the flow's popup was opened
424
+ * against. The popup-URL reader treats a same-origin URL as a result only
425
+ * when its pathname equals this value, so a host serving more than one
426
+ * callback route passes whichever one it actually opened.
427
+ */
428
+ callbackPath: string;
429
+ timeoutMs?: number;
430
+ pollIntervalMs?: number;
431
+ }
432
+
433
+ /** Whether a toolset authenticates interactively, and whether its client is manually configured. */
434
+ export declare enum WithLogin {
435
+ WithLogin = "with-login",
436
+ WithoutLogin = "without-login",
437
+ WithConfig = "with-config"
438
+ }
439
+
440
+ export { }
package/oauth.js ADDED
@@ -0,0 +1,3 @@
1
+ import { n as e, r as t, t as n } from "./toolset-id-CkxRHyU0.js";
2
+ import { C as r, S as i, _ as a, a as o, b as s, c, d as l, f as u, g as d, h as f, i as p, l as m, m as h, n as g, o as _, p as v, r as y, s as b, t as x, u as S, v as C, x as w, y as T } from "./useToolsetLogin-GhFtKs4D.js";
3
+ export { l as OAuthResourceKind, u as TOOLSET_REDIRECT_STATE_KEY, v as ToolsetAuthStatus, h as ToolsetAuthTypes, f as ToolsetCredentialsLevel, x as ToolsetLoginOutcomeType, d as ToolsetOAuthCallbackQuery, a as ToolsetOAuthChannelControlType, C as ToolsetOAuthFailureReason, T as ToolsetOAuthInitiationResultType, s as ToolsetOAuthResultType, w as WithLogin, i as buildToolsetAuthorizeUrl, n as decodeToolsetId, y as emitToolsetLoginSuccess, e as encodeToolsetId, m as getToolsetOAuthChannelName, r as getToolsetRedirectUri, _ as initiateOAuthLogin, t as isPublicToolsetId, b as navigateToolsetOAuthPopup, c as openToolsetOAuthPopup, p as subscribeToolsetLoginSuccess, o as useOAuthCallbackCompletion, g as useToolsetLogin, S as waitForToolsetOAuthResult };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-chat-hooks",
3
3
  "description": "Framework-level React hooks extracted from AI DIAL Chat for building custom chat interfaces",
4
- "version": "1.1.0-dev.383",
4
+ "version": "1.1.0-dev.390",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -13,33 +13,154 @@
13
13
  "types": "./index.d.ts",
14
14
  "import": "./index.js",
15
15
  "default": "./index.js"
16
+ },
17
+ "./viewport-layout": {
18
+ "types": "./viewport-layout.d.ts",
19
+ "import": "./viewport-layout.js",
20
+ "default": "./viewport-layout.js"
21
+ },
22
+ "./scroll-anchoring": {
23
+ "types": "./scroll-anchoring.d.ts",
24
+ "import": "./scroll-anchoring.js",
25
+ "default": "./scroll-anchoring.js"
26
+ },
27
+ "./conversation": {
28
+ "types": "./conversation.d.ts",
29
+ "import": "./conversation.js",
30
+ "default": "./conversation.js"
31
+ },
32
+ "./conversation-transfer": {
33
+ "types": "./conversation-transfer.d.ts",
34
+ "import": "./conversation-transfer.js",
35
+ "default": "./conversation-transfer.js"
36
+ },
37
+ "./conversation-sources": {
38
+ "types": "./conversation-sources.d.ts",
39
+ "import": "./conversation-sources.js",
40
+ "default": "./conversation-sources.js"
41
+ },
42
+ "./file-manager": {
43
+ "types": "./file-manager.d.ts",
44
+ "import": "./file-manager.js",
45
+ "default": "./file-manager.js"
46
+ },
47
+ "./catalog": {
48
+ "types": "./catalog.d.ts",
49
+ "import": "./catalog.js",
50
+ "default": "./catalog.js"
51
+ },
52
+ "./skills-state": {
53
+ "types": "./skills-state.d.ts",
54
+ "import": "./skills-state.js",
55
+ "default": "./skills-state.js"
56
+ },
57
+ "./skill-editor": {
58
+ "types": "./skill-editor.d.ts",
59
+ "import": "./skill-editor.js",
60
+ "default": "./skill-editor.js"
61
+ },
62
+ "./oauth": {
63
+ "types": "./oauth.d.ts",
64
+ "import": "./oauth.js",
65
+ "default": "./oauth.js"
66
+ },
67
+ "./scheduled-tasks": {
68
+ "types": "./scheduled-tasks.d.ts",
69
+ "import": "./scheduled-tasks.js",
70
+ "default": "./scheduled-tasks.js"
71
+ },
72
+ "./sharing": {
73
+ "types": "./sharing.d.ts",
74
+ "import": "./sharing.js",
75
+ "default": "./sharing.js"
76
+ },
77
+ "./attachments": {
78
+ "types": "./attachments.d.ts",
79
+ "import": "./attachments.js",
80
+ "default": "./attachments.js"
81
+ },
82
+ "./utils": {
83
+ "types": "./utils.d.ts",
84
+ "import": "./utils.js",
85
+ "default": "./utils.js"
16
86
  }
17
87
  },
18
- "dependencies": {
19
- "dompurify": "3.4.13",
20
- "lru-cache": "^10.4.3",
21
- "mime-types": "^3.0.2",
22
- "yaml": "2.8.3"
23
- },
24
88
  "peerDependencies": {
25
89
  "react": "^19.2.6",
26
- "@epam/ai-dial-attachment-canvas": "1.1.0-dev.383",
27
- "@epam/ai-dial-attachment-input": "1.1.0-dev.383",
28
- "@epam/ai-dial-catalog": "1.1.0-dev.383",
29
- "@epam/ai-dial-chat-api-client": "1.1.0-dev.383",
30
- "@epam/ai-dial-chat-overlay": "1.1.0-dev.383",
31
- "@epam/ai-dial-chat-shared": "1.1.0-dev.383",
32
- "@epam/ai-dial-deployment-creation-form": "1.1.0-dev.383",
33
- "@epam/ai-dial-publish-panel": "1.1.0-dev.383",
34
- "@epam/ai-dial-quotations": "1.1.0-dev.383",
90
+ "@epam/ai-dial-attachment-canvas": "1.1.0-dev.390",
91
+ "@epam/ai-dial-attachment-input": "1.1.0-dev.390",
92
+ "@epam/ai-dial-catalog": "1.1.0-dev.390",
93
+ "@epam/ai-dial-chat-api-client": "1.1.0-dev.390",
94
+ "@epam/ai-dial-chat-overlay": "1.1.0-dev.390",
95
+ "@epam/ai-dial-chat-shared": "1.1.0-dev.390",
96
+ "@epam/ai-dial-deployment-creation-form": "1.1.0-dev.390",
97
+ "@epam/ai-dial-publish-panel": "1.1.0-dev.390",
98
+ "@epam/ai-dial-quotations": "1.1.0-dev.390",
35
99
  "@epam/ai-dial-react-file-manager": "*",
36
- "@epam/ai-dial-scheduled-tasks": "1.1.0-dev.383",
37
- "@epam/ai-dial-share": "1.1.0-dev.383",
38
- "@epam/ai-dial-skill-editor": "1.1.0-dev.383",
39
- "@epam/ai-dial-source-panel": "1.1.0-dev.383",
100
+ "@epam/ai-dial-scheduled-tasks": "1.1.0-dev.390",
101
+ "@epam/ai-dial-share": "1.1.0-dev.390",
102
+ "@epam/ai-dial-skill-editor": "1.1.0-dev.390",
103
+ "@epam/ai-dial-source-panel": "1.1.0-dev.390",
40
104
  "@epam/ai-dial-ui-kit": "*",
41
- "fflate": "^0.8.3"
105
+ "@epam/pdf-highlighter-kit": ">=0.0.14"
106
+ },
107
+ "peerDependenciesMeta": {
108
+ "@epam/ai-dial-attachment-canvas": {
109
+ "optional": true
110
+ },
111
+ "@epam/ai-dial-attachment-input": {
112
+ "optional": true
113
+ },
114
+ "@epam/ai-dial-catalog": {
115
+ "optional": true
116
+ },
117
+ "@epam/ai-dial-chat-api-client": {
118
+ "optional": true
119
+ },
120
+ "@epam/ai-dial-chat-overlay": {
121
+ "optional": true
122
+ },
123
+ "@epam/ai-dial-chat-shared": {
124
+ "optional": true
125
+ },
126
+ "@epam/ai-dial-deployment-creation-form": {
127
+ "optional": true
128
+ },
129
+ "@epam/ai-dial-publish-panel": {
130
+ "optional": true
131
+ },
132
+ "@epam/ai-dial-quotations": {
133
+ "optional": true
134
+ },
135
+ "@epam/ai-dial-react-file-manager": {
136
+ "optional": true
137
+ },
138
+ "@epam/ai-dial-scheduled-tasks": {
139
+ "optional": true
140
+ },
141
+ "@epam/ai-dial-share": {
142
+ "optional": true
143
+ },
144
+ "@epam/ai-dial-skill-editor": {
145
+ "optional": true
146
+ },
147
+ "@epam/ai-dial-source-panel": {
148
+ "optional": true
149
+ },
150
+ "@epam/ai-dial-ui-kit": {
151
+ "optional": true
152
+ },
153
+ "@epam/pdf-highlighter-kit": {
154
+ "optional": true
155
+ }
42
156
  },
157
+ "sideEffects": [
158
+ "./index.js",
159
+ "./oauth.js",
160
+ "./file-manager.js",
161
+ "./useToolsetLogin-*.js",
162
+ "./useDialFileManagerTabConfig-*.js"
163
+ ],
43
164
  "repository": {
44
165
  "type": "git",
45
166
  "url": "git+https://github.com/epam/ai-dial-chat.git",
@@ -0,0 +1,41 @@
1
+ //#region src/shared/locale.ts
2
+ var e = (e) => e.split("-")[0].toLowerCase(), t = (t, n, r) => {
3
+ if (t == null) return "";
4
+ if (typeof t == "string") return t;
5
+ let i = e(n);
6
+ return t[n] ?? t[i] ?? t[r] ?? Object.values(t).find((e) => e !== void 0) ?? "";
7
+ }, n = (t, n) => `${t} [${e(n).toUpperCase()}]`, r = (e, t) => {
8
+ let n = /* @__PURE__ */ new Map();
9
+ for (let r of e) !r.language || r.language === t || !r.name && !r.description || n.set(r.language, {
10
+ language: r.language,
11
+ name: r.name || void 0,
12
+ description: r.description || void 0
13
+ });
14
+ return n.size > 0 ? Array.from(n.values()) : void 0;
15
+ }, i = (e, t, n) => {
16
+ let r = typeof e == "object" ? e : {}, i = typeof t == "object" ? t : {}, a = new Set([...Object.keys(r), ...Object.keys(i)]);
17
+ a.delete(n);
18
+ let o = 0;
19
+ return Array.from(a, (e) => ({
20
+ id: `decomposed-locale-${++o}`,
21
+ language: e,
22
+ name: r[e] ?? "",
23
+ description: i[e] ?? ""
24
+ }));
25
+ }, a = (e, t) => e.filter((e) => e !== t).map((e) => ({
26
+ code: e,
27
+ label: e.toUpperCase()
28
+ })), o = /* @__PURE__ */ function(e) {
29
+ return e.Personal = "personal", e.SharedWithMe = "sharedWithMe", e.Public = "public", e;
30
+ }({}), s = "prompts/", c = (e) => {
31
+ if (!e.startsWith(s)) return null;
32
+ let t = e.slice(8), n = t.indexOf("/");
33
+ if (n <= 0) return null;
34
+ let r = t.slice(0, n), i = t.slice(n + 1);
35
+ return r === "" || i === "" ? null : {
36
+ bucket: r,
37
+ path: i
38
+ };
39
+ };
40
+ //#endregion
41
+ export { r as a, e as c, a as i, c as n, i as o, n as r, t as s, o as t };