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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (422) hide show
  1. package/api-error/api-error.d.ts +30 -0
  2. package/api-error/api-error.d.ts.map +1 -0
  3. package/api-transport/create-csrf-middleware.d.ts +15 -0
  4. package/api-transport/create-csrf-middleware.d.ts.map +1 -0
  5. package/api-transport/create-unauthorized-middleware.d.ts +40 -0
  6. package/api-transport/create-unauthorized-middleware.d.ts.map +1 -0
  7. package/attachment/useAttachmentAction/useAttachmentAction.d.ts +32 -0
  8. package/attachment/useAttachmentAction/useAttachmentAction.d.ts.map +1 -0
  9. package/attachment/useAttachmentValidation/useAttachmentValidation.d.ts +50 -0
  10. package/attachment/useAttachmentValidation/useAttachmentValidation.d.ts.map +1 -0
  11. package/attachments.d.ts +2 -94
  12. package/catalog/catalog-derivations.d.ts +27 -0
  13. package/catalog/catalog-derivations.d.ts.map +1 -0
  14. package/catalog/catalog-primary-action.d.ts +47 -0
  15. package/catalog/catalog-primary-action.d.ts.map +1 -0
  16. package/catalog/create-publish-api.d.ts +32 -0
  17. package/catalog/create-publish-api.d.ts.map +1 -0
  18. package/catalog/deployment-endpoint-url.d.ts +19 -0
  19. package/catalog/deployment-endpoint-url.d.ts.map +1 -0
  20. package/catalog/deployment-id.d.ts +42 -0
  21. package/catalog/deployment-id.d.ts.map +1 -0
  22. package/catalog/entity-details.d.ts +146 -0
  23. package/catalog/entity-details.d.ts.map +1 -0
  24. package/catalog/map-deployment-limits-to-catalog.d.ts +34 -0
  25. package/catalog/map-deployment-limits-to-catalog.d.ts.map +1 -0
  26. package/catalog/map-deployment-limits-to-input.d.ts +28 -0
  27. package/catalog/map-deployment-limits-to-input.d.ts.map +1 -0
  28. package/catalog/map-deployment-to-catalog-item.d.ts +61 -0
  29. package/catalog/map-deployment-to-catalog-item.d.ts.map +1 -0
  30. package/catalog/map-entity-details-to-catalog.d.ts +81 -0
  31. package/catalog/map-entity-details-to-catalog.d.ts.map +1 -0
  32. package/catalog/map-prompt-to-catalog-item.d.ts +43 -0
  33. package/catalog/map-prompt-to-catalog-item.d.ts.map +1 -0
  34. package/catalog/map-skill-to-catalog-item.d.ts +113 -0
  35. package/catalog/map-skill-to-catalog-item.d.ts.map +1 -0
  36. package/catalog/mcp-endpoint-url.d.ts +18 -0
  37. package/catalog/mcp-endpoint-url.d.ts.map +1 -0
  38. package/catalog/publish.d.ts +35 -0
  39. package/catalog/publish.d.ts.map +1 -0
  40. package/catalog/useApplicationCredentials/useApplicationCredentials.d.ts +19 -0
  41. package/catalog/useApplicationCredentials/useApplicationCredentials.d.ts.map +1 -0
  42. package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts +100 -0
  43. package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts.map +1 -0
  44. package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.js +139 -122
  45. package/catalog/useCatalogItemDetails.d.ts +70 -0
  46. package/catalog/useCatalogItemDetails.d.ts.map +1 -0
  47. package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.d.ts +76 -0
  48. package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.d.ts.map +1 -0
  49. package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.d.ts +37 -0
  50. package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.d.ts.map +1 -0
  51. package/catalog/usePublishFolders/usePublishFolders.d.ts +73 -0
  52. package/catalog/usePublishFolders/usePublishFolders.d.ts.map +1 -0
  53. package/catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.d.ts +54 -0
  54. package/catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.d.ts.map +1 -0
  55. package/catalog/useSkillItemDetails.d.ts +64 -0
  56. package/catalog/useSkillItemDetails.d.ts.map +1 -0
  57. package/catalog.d.ts +2 -1433
  58. package/conversation/announcement-message.d.ts +61 -0
  59. package/conversation/announcement-message.d.ts.map +1 -0
  60. package/conversation/conversation-transfer/async.d.ts +10 -0
  61. package/conversation/conversation-transfer/async.d.ts.map +1 -0
  62. package/conversation/conversation-transfer/attachment-refs.d.ts +42 -0
  63. package/conversation/conversation-transfer/attachment-refs.d.ts.map +1 -0
  64. package/conversation/conversation-transfer/build-upload-path.d.ts +42 -0
  65. package/conversation/conversation-transfer/build-upload-path.d.ts.map +1 -0
  66. package/conversation/conversation-transfer/date.d.ts +5 -0
  67. package/conversation/conversation-transfer/date.d.ts.map +1 -0
  68. package/conversation/conversation-transfer/dial-file-resolve.d.ts +10 -0
  69. package/conversation/conversation-transfer/dial-file-resolve.d.ts.map +1 -0
  70. package/conversation/conversation-transfer/export-conversation.d.ts +10 -0
  71. package/conversation/conversation-transfer/export-conversation.d.ts.map +1 -0
  72. package/conversation/conversation-transfer/import-conversation.d.ts +106 -0
  73. package/conversation/conversation-transfer/import-conversation.d.ts.map +1 -0
  74. package/conversation/conversation-transfer/progress.d.ts +60 -0
  75. package/conversation/conversation-transfer/progress.d.ts.map +1 -0
  76. package/conversation/conversation-transfer/queue.d.ts +54 -0
  77. package/conversation/conversation-transfer/queue.d.ts.map +1 -0
  78. package/conversation/conversation-transfer/types.d.ts +36 -0
  79. package/conversation/conversation-transfer/types.d.ts.map +1 -0
  80. package/conversation/conversation-transfer/zip-export.d.ts +31 -0
  81. package/conversation/conversation-transfer/zip-export.d.ts.map +1 -0
  82. package/conversation/conversation-transfer/zip-import.d.ts +17 -0
  83. package/conversation/conversation-transfer/zip-import.d.ts.map +1 -0
  84. package/conversation/create-chat-stream-api.d.ts +92 -0
  85. package/conversation/create-chat-stream-api.d.ts.map +1 -0
  86. package/conversation/deriveConversationRowActionState/deriveConversationRowActionState.d.ts +39 -0
  87. package/conversation/deriveConversationRowActionState/deriveConversationRowActionState.d.ts.map +1 -0
  88. package/conversation/display-name-watch.d.ts +4 -0
  89. package/conversation/display-name-watch.d.ts.map +1 -0
  90. package/conversation/footer-message.d.ts +10 -0
  91. package/conversation/footer-message.d.ts.map +1 -0
  92. package/conversation/get-model-id-from-conversation-id.d.ts +38 -0
  93. package/conversation/get-model-id-from-conversation-id.d.ts.map +1 -0
  94. package/conversation/greeting.d.ts +18 -0
  95. package/conversation/greeting.d.ts.map +1 -0
  96. package/conversation/message-factory.d.ts +7 -0
  97. package/conversation/message-factory.d.ts.map +1 -0
  98. package/conversation/message-utils.d.ts +67 -0
  99. package/conversation/message-utils.d.ts.map +1 -0
  100. package/conversation/overlay-messages.d.ts +5 -0
  101. package/conversation/overlay-messages.d.ts.map +1 -0
  102. package/conversation/quick-app-conversation-starters.d.ts +10 -0
  103. package/conversation/quick-app-conversation-starters.d.ts.map +1 -0
  104. package/conversation/stage.d.ts +77 -0
  105. package/conversation/stage.d.ts.map +1 -0
  106. package/conversation/starter-option.d.ts +21 -0
  107. package/conversation/starter-option.d.ts.map +1 -0
  108. package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts +35 -0
  109. package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts.map +1 -0
  110. package/conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.d.ts +46 -0
  111. package/conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.d.ts.map +1 -0
  112. package/conversation/useAttachmentUpload/useAttachmentUpload.d.ts +27 -0
  113. package/conversation/useAttachmentUpload/useAttachmentUpload.d.ts.map +1 -0
  114. package/conversation/useConversationExport/useConversationExport.d.ts +72 -0
  115. package/conversation/useConversationExport/useConversationExport.d.ts.map +1 -0
  116. package/conversation/useConversationHandlers/attachment-to-dto.d.ts +7 -0
  117. package/conversation/useConversationHandlers/attachment-to-dto.d.ts.map +1 -0
  118. package/conversation/useConversationHandlers/message-factory.d.ts +9 -0
  119. package/conversation/useConversationHandlers/message-factory.d.ts.map +1 -0
  120. package/conversation/useConversationHandlers/message-utils.d.ts +38 -0
  121. package/conversation/useConversationHandlers/message-utils.d.ts.map +1 -0
  122. package/conversation/useConversationHandlers/starter-option.d.ts +24 -0
  123. package/conversation/useConversationHandlers/starter-option.d.ts.map +1 -0
  124. package/conversation/useConversationHandlers/useConversationHandlers.d.ts +66 -0
  125. package/conversation/useConversationHandlers/useConversationHandlers.d.ts.map +1 -0
  126. package/conversation/useConversationImport/useConversationImport.d.ts +54 -0
  127. package/conversation/useConversationImport/useConversationImport.d.ts.map +1 -0
  128. package/conversation/useConversationLookupMaps/useConversationLookupMaps.d.ts +24 -0
  129. package/conversation/useConversationLookupMaps/useConversationLookupMaps.d.ts.map +1 -0
  130. package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts +64 -0
  131. package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts.map +1 -0
  132. package/conversation/useConversationScroll/useConversationScroll.d.ts +46 -0
  133. package/conversation/useConversationScroll/useConversationScroll.d.ts.map +1 -0
  134. package/conversation/useConversationStream/apply-chunk.d.ts +35 -0
  135. package/conversation/useConversationStream/apply-chunk.d.ts.map +1 -0
  136. package/conversation/useConversationStream/buffered-generation.d.ts +15 -0
  137. package/conversation/useConversationStream/buffered-generation.d.ts.map +1 -0
  138. package/conversation/useConversationStream/conversation-path.d.ts +7 -0
  139. package/conversation/useConversationStream/conversation-path.d.ts.map +1 -0
  140. package/conversation/useConversationStream/frame-scheduler.d.ts +14 -0
  141. package/conversation/useConversationStream/frame-scheduler.d.ts.map +1 -0
  142. package/conversation/useConversationStream/generation-resume.d.ts +85 -0
  143. package/conversation/useConversationStream/generation-resume.d.ts.map +1 -0
  144. package/conversation/useConversationStream/useConversationStream.d.ts +145 -0
  145. package/conversation/useConversationStream/useConversationStream.d.ts.map +1 -0
  146. package/conversation/useImportFilePicker/useImportFilePicker.d.ts +32 -0
  147. package/conversation/useImportFilePicker/useImportFilePicker.d.ts.map +1 -0
  148. package/conversation/useMessageSelectionReply/useMessageSelectionReply.d.ts +42 -0
  149. package/conversation/useMessageSelectionReply/useMessageSelectionReply.d.ts.map +1 -0
  150. package/conversation/useTranscribeAudio/audio-transcription-error.d.ts +19 -0
  151. package/conversation/useTranscribeAudio/audio-transcription-error.d.ts.map +1 -0
  152. package/conversation/useTranscribeAudio/transcription-retry.d.ts +2 -0
  153. package/conversation/useTranscribeAudio/transcription-retry.d.ts.map +1 -0
  154. package/conversation/useTranscribeAudio/useTranscribeAudio.d.ts +43 -0
  155. package/conversation/useTranscribeAudio/useTranscribeAudio.d.ts.map +1 -0
  156. package/conversation-overlay.d.ts +2 -7
  157. package/conversation-sources/useConversationSources/useConversationSources.d.ts +20 -0
  158. package/conversation-sources/useConversationSources/useConversationSources.d.ts.map +1 -0
  159. package/conversation-sources.d.ts +2 -25
  160. package/conversation-transfer.d.ts +2 -190
  161. package/conversation.d.ts +2 -1372
  162. package/entry-points/attachments.d.ts +3 -0
  163. package/entry-points/attachments.d.ts.map +1 -0
  164. package/entry-points/catalog.d.ts +25 -0
  165. package/entry-points/catalog.d.ts.map +1 -0
  166. package/entry-points/conversation-overlay.d.ts +2 -0
  167. package/entry-points/conversation-overlay.d.ts.map +1 -0
  168. package/entry-points/conversation-sources.d.ts +2 -0
  169. package/entry-points/conversation-sources.d.ts.map +1 -0
  170. package/entry-points/conversation-transfer.d.ts +7 -0
  171. package/entry-points/conversation-transfer.d.ts.map +1 -0
  172. package/entry-points/conversation.d.ts +33 -0
  173. package/entry-points/conversation.d.ts.map +1 -0
  174. package/entry-points/file-manager-canvas.d.ts +2 -0
  175. package/entry-points/file-manager-canvas.d.ts.map +1 -0
  176. package/entry-points/file-manager.d.ts +31 -0
  177. package/entry-points/file-manager.d.ts.map +1 -0
  178. package/entry-points/mcp-apps.d.ts +6 -0
  179. package/entry-points/mcp-apps.d.ts.map +1 -0
  180. package/entry-points/oauth.d.ts +10 -0
  181. package/entry-points/oauth.d.ts.map +1 -0
  182. package/entry-points/scheduled-tasks.d.ts +8 -0
  183. package/entry-points/scheduled-tasks.d.ts.map +1 -0
  184. package/entry-points/scroll-anchoring.d.ts +2 -0
  185. package/entry-points/scroll-anchoring.d.ts.map +1 -0
  186. package/entry-points/sharing.d.ts +3 -0
  187. package/entry-points/sharing.d.ts.map +1 -0
  188. package/entry-points/skill-editor.d.ts +9 -0
  189. package/entry-points/skill-editor.d.ts.map +1 -0
  190. package/entry-points/skills-state.d.ts +2 -0
  191. package/entry-points/skills-state.d.ts.map +1 -0
  192. package/entry-points/source-content.d.ts +2 -0
  193. package/entry-points/source-content.d.ts.map +1 -0
  194. package/entry-points/usage-limits.d.ts +8 -0
  195. package/entry-points/usage-limits.d.ts.map +1 -0
  196. package/entry-points/usage.d.ts +3 -0
  197. package/entry-points/usage.d.ts.map +1 -0
  198. package/entry-points/utils.d.ts +17 -0
  199. package/entry-points/utils.d.ts.map +1 -0
  200. package/entry-points/viewport-layout.d.ts +4 -0
  201. package/entry-points/viewport-layout.d.ts.map +1 -0
  202. package/file-manager-canvas.d.ts +2 -418
  203. package/file-manager.d.ts +2 -1237
  204. package/file-manager.js +25 -25
  205. package/files/annotation.d.ts +10 -0
  206. package/files/annotation.d.ts.map +1 -0
  207. package/files/attachment-canvas.d.ts +123 -0
  208. package/files/attachment-canvas.d.ts.map +1 -0
  209. package/files/attachment-dto-to-display.d.ts +10 -0
  210. package/files/attachment-dto-to-display.d.ts.map +1 -0
  211. package/files/attachment-types.d.ts +21 -0
  212. package/files/attachment-types.d.ts.map +1 -0
  213. package/files/create-files-api.d.ts +52 -0
  214. package/files/create-files-api.d.ts.map +1 -0
  215. package/files/create-upload-file-with-progress.d.ts +24 -0
  216. package/files/create-upload-file-with-progress.d.ts.map +1 -0
  217. package/files/dial-file-manager-copy-move.util.d.ts +15 -0
  218. package/files/dial-file-manager-copy-move.util.d.ts.map +1 -0
  219. package/files/dial-file-manager-mapping.util.d.ts +35 -0
  220. package/files/dial-file-manager-mapping.util.d.ts.map +1 -0
  221. package/files/dial-file-manager-path.util.d.ts +48 -0
  222. package/files/dial-file-manager-path.util.d.ts.map +1 -0
  223. package/files/dial-file-manager.model.d.ts +36 -0
  224. package/files/dial-file-manager.model.d.ts.map +1 -0
  225. package/files/dial-file-manager.model.js +7 -3
  226. package/files/dial-file-manager.types.d.ts +327 -0
  227. package/files/dial-file-manager.types.d.ts.map +1 -0
  228. package/files/dial-file-manager.types.js +1 -1
  229. package/files/dial-file-to-attachment.d.ts +26 -0
  230. package/files/dial-file-to-attachment.d.ts.map +1 -0
  231. package/files/dial-file.d.ts +17 -0
  232. package/files/dial-file.d.ts.map +1 -0
  233. package/files/dial-files-api.d.ts +71 -0
  234. package/files/dial-files-api.d.ts.map +1 -0
  235. package/files/download-destination.d.ts +31 -0
  236. package/files/download-destination.d.ts.map +1 -0
  237. package/files/file-manager-variant.d.ts +3 -0
  238. package/files/file-manager-variant.d.ts.map +1 -0
  239. package/files/file-name.d.ts +19 -0
  240. package/files/file-name.d.ts.map +1 -0
  241. package/files/prepare-download-destination.d.ts +8 -0
  242. package/files/prepare-download-destination.d.ts.map +1 -0
  243. package/files/resolve-dial-file-api-path.d.ts +12 -0
  244. package/files/resolve-dial-file-api-path.d.ts.map +1 -0
  245. package/files/source-content.d.ts +28 -0
  246. package/files/source-content.d.ts.map +1 -0
  247. package/files/useDialFileListing/useDialFileListing.d.ts +82 -0
  248. package/files/useDialFileListing/useDialFileListing.d.ts.map +1 -0
  249. package/files/useDialFileListing/useDialFileListing.js +24 -14
  250. package/files/useDialFileManager/useDialFileManager.d.ts +16 -0
  251. package/files/useDialFileManager/useDialFileManager.d.ts.map +1 -0
  252. package/files/useDialFileManager/useDialFileManager.js +148 -140
  253. package/files/useDialFileManagerSections/useDialFileManagerSections.d.ts +25 -0
  254. package/files/useDialFileManagerSections/useDialFileManagerSections.d.ts.map +1 -0
  255. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.d.ts +15 -0
  256. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.d.ts.map +1 -0
  257. package/files/useDialFileMetadata/useDialFileMetadata.d.ts +28 -0
  258. package/files/useDialFileMetadata/useDialFileMetadata.d.ts.map +1 -0
  259. package/files/useDialFileMutations/useDialFileMutations.d.ts +68 -0
  260. package/files/useDialFileMutations/useDialFileMutations.d.ts.map +1 -0
  261. package/files/useDialFileMutations/useDialFileMutations.js +206 -204
  262. package/files/useDialFileSharing/useDialFileSharing.d.ts +34 -0
  263. package/files/useDialFileSharing/useDialFileSharing.d.ts.map +1 -0
  264. package/files/useDialFileSharing/useDialFileSharing.js +45 -39
  265. package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts +47 -0
  266. package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts.map +1 -0
  267. package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +8 -4
  268. package/files/useFileAttachmentPicker/useFileAttachmentPicker.d.ts +59 -0
  269. package/files/useFileAttachmentPicker/useFileAttachmentPicker.d.ts.map +1 -0
  270. package/index.d.ts +159 -6974
  271. package/index.d.ts.map +1 -0
  272. package/index.js +124 -117
  273. package/mcp-apps/mcp-apps-api-client.d.ts +28 -0
  274. package/mcp-apps/mcp-apps-api-client.d.ts.map +1 -0
  275. package/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.d.ts +14 -0
  276. package/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.d.ts.map +1 -0
  277. package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.d.ts +29 -0
  278. package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.d.ts.map +1 -0
  279. package/mcp-apps/useMcpAppTools/useMcpAppTools.d.ts +22 -0
  280. package/mcp-apps/useMcpAppTools/useMcpAppTools.d.ts.map +1 -0
  281. package/mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.d.ts +36 -0
  282. package/mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.d.ts.map +1 -0
  283. package/mcp-apps.d.ts +2 -256
  284. package/oauth/authorize-url.d.ts +16 -0
  285. package/oauth/authorize-url.d.ts.map +1 -0
  286. package/oauth/handshake.d.ts +30 -0
  287. package/oauth/handshake.d.ts.map +1 -0
  288. package/oauth/models.d.ts +81 -0
  289. package/oauth/models.d.ts.map +1 -0
  290. package/oauth/popup.d.ts +30 -0
  291. package/oauth/popup.d.ts.map +1 -0
  292. package/oauth/toolset-id.d.ts +53 -0
  293. package/oauth/toolset-id.d.ts.map +1 -0
  294. package/oauth/types.d.ts +84 -0
  295. package/oauth/types.d.ts.map +1 -0
  296. package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.d.ts +54 -0
  297. package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.d.ts.map +1 -0
  298. package/oauth/useToolsetLogin/useToolsetLogin.d.ts +79 -0
  299. package/oauth/useToolsetLogin/useToolsetLogin.d.ts.map +1 -0
  300. package/oauth.d.ts +2 -472
  301. package/package.json +26 -17
  302. package/prompt/export-prompt.d.ts +31 -0
  303. package/prompt/export-prompt.d.ts.map +1 -0
  304. package/prompt/prompt-resource.d.ts +30 -0
  305. package/prompt/prompt-resource.d.ts.map +1 -0
  306. package/prompt/prompt.d.ts +34 -0
  307. package/prompt/prompt.d.ts.map +1 -0
  308. package/prompt/usePromptsState/usePromptsState.d.ts +34 -0
  309. package/prompt/usePromptsState/usePromptsState.d.ts.map +1 -0
  310. package/scheduled-task/scheduled-task-description.d.ts +38 -0
  311. package/scheduled-task/scheduled-task-description.d.ts.map +1 -0
  312. package/scheduled-task/scheduled-task-mapping.d.ts +19 -0
  313. package/scheduled-task/scheduled-task-mapping.d.ts.map +1 -0
  314. package/scheduled-task/scheduled-task-preparation.d.ts +19 -0
  315. package/scheduled-task/scheduled-task-preparation.d.ts.map +1 -0
  316. package/scheduled-task/scheduled-task-trigger.d.ts +26 -0
  317. package/scheduled-task/scheduled-task-trigger.d.ts.map +1 -0
  318. package/scheduled-task/scheduled-tasks-api-client.d.ts +67 -0
  319. package/scheduled-task/scheduled-tasks-api-client.d.ts.map +1 -0
  320. package/scheduled-task/use-scheduled-task-runs.d.ts +40 -0
  321. package/scheduled-task/use-scheduled-task-runs.d.ts.map +1 -0
  322. package/scheduled-task/use-scheduled-task-runs.js +67 -67
  323. package/scheduled-task/use-scheduled-tasks.d.ts +28 -0
  324. package/scheduled-task/use-scheduled-tasks.d.ts.map +1 -0
  325. package/scheduled-tasks.d.ts +2 -250
  326. package/scroll-anchoring.d.ts +2 -50
  327. package/shared/application-schema.d.ts +18 -0
  328. package/shared/application-schema.d.ts.map +1 -0
  329. package/shared/application-schema.js +2 -2
  330. package/shared/browser-timezone.d.ts +7 -0
  331. package/shared/browser-timezone.d.ts.map +1 -0
  332. package/shared/cron-day-of-month.d.ts +21 -0
  333. package/shared/cron-day-of-month.d.ts.map +1 -0
  334. package/shared/cron-weekday.d.ts +5 -0
  335. package/shared/cron-weekday.d.ts.map +1 -0
  336. package/shared/custom-apps.d.ts +7 -0
  337. package/shared/custom-apps.d.ts.map +1 -0
  338. package/shared/external-services.d.ts +16 -0
  339. package/shared/external-services.d.ts.map +1 -0
  340. package/shared/formatting.d.ts +5 -0
  341. package/shared/formatting.d.ts.map +1 -0
  342. package/shared/locale.d.ts +45 -0
  343. package/shared/locale.d.ts.map +1 -0
  344. package/shared/string-utils.d.ts +11 -0
  345. package/shared/string-utils.d.ts.map +1 -0
  346. package/shared/toolset-login-events.d.ts +15 -0
  347. package/shared/toolset-login-events.d.ts.map +1 -0
  348. package/sharing.d.ts +2 -65
  349. package/skill/skill-archive.d.ts +7 -0
  350. package/skill/skill-archive.d.ts.map +1 -0
  351. package/skill/skill-file-batch-validation.d.ts +70 -0
  352. package/skill/skill-file-batch-validation.d.ts.map +1 -0
  353. package/skill/skill-file-preview.d.ts +25 -0
  354. package/skill/skill-file-preview.d.ts.map +1 -0
  355. package/skill/skill-manifest.d.ts +28 -0
  356. package/skill/skill-manifest.d.ts.map +1 -0
  357. package/skill/skill-types.d.ts +46 -0
  358. package/skill/skill-types.d.ts.map +1 -0
  359. package/skill/skill.d.ts +160 -0
  360. package/skill/skill.d.ts.map +1 -0
  361. package/skill/useSkillArchiveImport/useSkillArchiveImport.d.ts +65 -0
  362. package/skill/useSkillArchiveImport/useSkillArchiveImport.d.ts.map +1 -0
  363. package/skill/useSkillEditorLoad.d.ts +74 -0
  364. package/skill/useSkillEditorLoad.d.ts.map +1 -0
  365. package/skill/useSkillEditorSubmit.d.ts +125 -0
  366. package/skill/useSkillEditorSubmit.d.ts.map +1 -0
  367. package/skill/useSkillFileActions.d.ts +60 -0
  368. package/skill/useSkillFileActions.d.ts.map +1 -0
  369. package/skill/useSkillFilePreview.d.ts +38 -0
  370. package/skill/useSkillFilePreview.d.ts.map +1 -0
  371. package/skill/useSkillsState/useSkillsState.d.ts +35 -0
  372. package/skill/useSkillsState/useSkillsState.d.ts.map +1 -0
  373. package/skill-editor.d.ts +2 -655
  374. package/skills-state.d.ts +2 -40
  375. package/source-content.d.ts +2 -29
  376. package/usage/map-usage-data-to-dashboard.d.ts +39 -0
  377. package/usage/map-usage-data-to-dashboard.d.ts.map +1 -0
  378. package/usage/map-user-usage-to-model-limits.d.ts +62 -0
  379. package/usage/map-user-usage-to-model-limits.d.ts.map +1 -0
  380. package/usage/usage-banner-source.d.ts +23 -0
  381. package/usage/usage-banner-source.d.ts.map +1 -0
  382. package/usage/usage-banner-source.js +36 -0
  383. package/usage/usage-period.d.ts +7 -0
  384. package/usage/usage-period.d.ts.map +1 -0
  385. package/usage/usage-period.js +6 -0
  386. package/usage/usage-reset-time.d.ts +69 -0
  387. package/usage/usage-reset-time.d.ts.map +1 -0
  388. package/usage/usage-reset-time.js +72 -0
  389. package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts +32 -0
  390. package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts.map +1 -0
  391. package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.js +39 -0
  392. package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.d.ts +16 -0
  393. package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.d.ts.map +1 -0
  394. package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.js +14 -0
  395. package/usage/useUsageData/useUsageData.d.ts +28 -0
  396. package/usage/useUsageData/useUsageData.d.ts.map +1 -0
  397. package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts +56 -0
  398. package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts.map +1 -0
  399. package/usage/useUsageLimitBanner/useUsageLimitBanner.js +67 -0
  400. package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.d.ts +14 -0
  401. package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.d.ts.map +1 -0
  402. package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.js +19 -0
  403. package/usage-limits.d.ts +2 -0
  404. package/usage-limits.js +8 -0
  405. package/usage.d.ts +2 -125
  406. package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts +128 -0
  407. package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts.map +1 -0
  408. package/usePageFileDrag/usePageFileDrag.d.ts +16 -0
  409. package/usePageFileDrag/usePageFileDrag.d.ts.map +1 -0
  410. package/usePanelMaxWidth/usePanelMaxWidth.d.ts +6 -0
  411. package/usePanelMaxWidth/usePanelMaxWidth.d.ts.map +1 -0
  412. package/useShareLink/useShareLink.d.ts +23 -0
  413. package/useShareLink/useShareLink.d.ts.map +1 -0
  414. package/useShareRecipientsCount/useShareRecipientsCount.d.ts +36 -0
  415. package/useShareRecipientsCount/useShareRecipientsCount.d.ts.map +1 -0
  416. package/useToolsMenu/useToolsMenu.d.ts +31 -0
  417. package/useToolsMenu/useToolsMenu.d.ts.map +1 -0
  418. package/useViewportWidth/useViewportWidth.d.ts +3 -0
  419. package/useViewportWidth/useViewportWidth.d.ts.map +1 -0
  420. package/utils.d.ts +2 -404
  421. package/utils.js +10 -10
  422. package/viewport-layout.d.ts +2 -27
@@ -0,0 +1,79 @@
1
+ import { DialToolsetDto, ToolsetLoginBodyDto, ToolsetLogoutBodyDto } from '@epam/ai-dial-chat-api-client';
2
+ import { ToolsetOAuthSettings } from '../models';
3
+ import { ToolsetAuthTypes, ToolsetCredentialsLevel } from '../types';
4
+ /** Terminal outcome kinds `login` can resolve. */
5
+ export declare enum ToolsetLoginOutcomeType {
6
+ Success = "success",
7
+ Failure = "failure",
8
+ PopupBlocked = "popup-blocked",
9
+ Cancelled = "cancelled"
10
+ }
11
+ /** Discriminated outcome of one login attempt. */
12
+ export interface ToolsetLoginOutcome {
13
+ /** Which terminal branch the attempt resolved through. */
14
+ type: ToolsetLoginOutcomeType;
15
+ }
16
+ /** Arguments for one `login` call. */
17
+ export interface ToolsetLoginParams {
18
+ /** Already-encoded toolset id/url, as returned by `listToolsets`/`getToolset`. */
19
+ toolsetId: string;
20
+ /** Credentials level the submitted credentials apply to. */
21
+ credentialsLevel: ToolsetCredentialsLevel;
22
+ /** Authentication mechanism the toolset requires. */
23
+ authenticationType: ToolsetAuthTypes;
24
+ /** Required for `ToolsetAuthTypes.ApiKey`. */
25
+ apiKey?: string;
26
+ /** Required for `ToolsetAuthTypes.OAuth`. */
27
+ oauthSettings?: ToolsetOAuthSettings;
28
+ /**
29
+ * Whether the target level's cached status is currently `FAILED` — API key
30
+ * logins log that level out first when true. Ignored when `forceStale` is
31
+ * set, and never consulted for OAuth (OAuth does not log out before
32
+ * retrying).
33
+ */
34
+ isCurrentlyFailed?: boolean;
35
+ /**
36
+ * Always logs out the target level first (for both API key and OAuth)
37
+ * regardless of the cached status — set by callers reacting to a
38
+ * DIAL-Core-pushed `toolset/signin` event, which is proof the cached
39
+ * status may be stale even when it still reads `SIGNED_IN`.
40
+ */
41
+ forceStale?: boolean;
42
+ /**
43
+ * Whether the user agreed an application may use this credential while they
44
+ * are away. DIAL Core gates every on-behalf-of mint on it, so a toolset
45
+ * signed in without it works interactively and still fails with
46
+ * `consent-required` in the background. Absent means not granted.
47
+ */
48
+ offlineUsageConsent?: boolean;
49
+ }
50
+ /** Parameters for {@link useToolsetLogin}. */
51
+ export interface UseToolsetLoginParams {
52
+ /**
53
+ * The host's OAuth callback route. Resolved against `window.location.origin`
54
+ * for the `redirect_uri`, and compared against the popup's pathname when
55
+ * reading a completion marker out of its URL.
56
+ */
57
+ callbackPath: string;
58
+ /** Submits credentials for one toolset at one credentials level. */
59
+ loginToolset: (toolsetId: string, body: ToolsetLoginBodyDto) => Promise<unknown>;
60
+ /** Clears stored credentials for one toolset at one credentials level. */
61
+ logoutToolset: (toolsetId: string, body: ToolsetLogoutBodyDto) => Promise<unknown>;
62
+ /** Re-reads a toolset so a reported cancellation can be checked against the backend. */
63
+ getToolset: (toolsetId: string) => Promise<DialToolsetDto>;
64
+ }
65
+ /** Result returned by {@link useToolsetLogin}. */
66
+ export interface UseToolsetLoginResult {
67
+ /** Runs one API-key or OAuth login attempt and resolves its outcome. */
68
+ login: (params: ToolsetLoginParams) => Promise<ToolsetLoginOutcome>;
69
+ }
70
+ /**
71
+ * Shared toolset API-key/OAuth login orchestration, so no two surfaces fork
72
+ * the popup/`BroadcastChannel` handshake or the stale-credential-clearing
73
+ * rule. Every backend call arrives as an injected callback: the hook
74
+ * constructs no client instance and reads no app context. It resolves an
75
+ * outcome and shows nothing itself — mapping an outcome to notifications is
76
+ * the caller's job.
77
+ */
78
+ export declare const useToolsetLogin: ({ callbackPath, loginToolset, logoutToolset, getToolset, }: UseToolsetLoginParams) => UseToolsetLoginResult;
79
+ //# sourceMappingURL=useToolsetLogin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useToolsetLogin.d.ts","sourceRoot":"","sources":["../../../src/oauth/useToolsetLogin/useToolsetLogin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,+BAA+B,CAAC;AAIvC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAOtD,OAAO,EAGL,gBAAgB,EAChB,uBAAuB,EAGxB,MAAM,UAAU,CAAC;AAElB,kDAAkD;AAClD,oBAAY,uBAAuB;IACjC,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,YAAY,kBAAkB;IAC9B,SAAS,cAAc;CACxB;AAED,kDAAkD;AAClD,MAAM,WAAW,mBAAmB;IAClC,0DAA0D;IAC1D,IAAI,EAAE,uBAAuB,CAAC;CAC/B;AAED,sCAAsC;AACtC,MAAM,WAAW,kBAAkB;IACjC,kFAAkF;IAClF,SAAS,EAAE,MAAM,CAAC;IAClB,4DAA4D;IAC5D,gBAAgB,EAAE,uBAAuB,CAAC;IAC1C,qDAAqD;IACrD,kBAAkB,EAAE,gBAAgB,CAAC;IACrC,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,8CAA8C;AAC9C,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,YAAY,EAAE,CACZ,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,mBAAmB,KACtB,OAAO,CAAC,OAAO,CAAC,CAAC;IACtB,0EAA0E;IAC1E,aAAa,EAAE,CACb,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,oBAAoB,KACvB,OAAO,CAAC,OAAO,CAAC,CAAC;IACtB,wFAAwF;IACxF,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;CAC5D;AAED,kDAAkD;AAClD,MAAM,WAAW,qBAAqB;IACpC,wEAAwE;IACxE,KAAK,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACrE;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAAI,4DAK7B,qBAAqB,KAAG,qBAqL1B,CAAC"}
package/oauth.d.ts CHANGED
@@ -1,472 +1,2 @@
1
- import { DialToolsetAuthSettingsDto } from '@epam/ai-dial-chat-api-client';
2
- import { DialToolsetDto } from '@epam/ai-dial-chat-api-client';
3
- import { ToolsetLoginBodyDto } from '@epam/ai-dial-chat-api-client';
4
- import { ToolsetLogoutBodyDto } from '@epam/ai-dial-chat-api-client';
5
-
6
- /**
7
- * Builds the OAuth authorize URL for a given, already-generated `state`
8
- * value. The caller owns what `state` carries — see `initiateOAuthLogin`.
9
- * Returns `null` rather than throwing for a configuration that cannot
10
- * produce a valid URL, including one whose authorization endpoint is not an
11
- * `http:`/`https:` URL.
12
- */
13
- export declare const buildToolsetAuthorizeUrl: (auth: ToolsetOAuthSettings, redirectUri: string, state: string) => string | null;
14
-
15
- /**
16
- * Inverse of `encodeToolsetId` — decodes each `/`-separated segment back to
17
- * its raw, human-readable form. A segment that isn't valid percent-encoding
18
- * is passed through unchanged rather than throwing, since this decodes
19
- * externally-sourced ids (broadcast toolset-login events).
20
- */
21
- export declare const decodeToolsetId: (id: string) => string;
22
-
23
- /**
24
- * Broadcasts a successful toolset login to any listener within the current
25
- * window — host-to-host, not `postMessage`, since this notifies other React
26
- * trees in the same document (e.g. a mounted `AppEditorIframe`), not an
27
- * embedded cross-origin iframe.
28
- */
29
- export declare const emitToolsetLoginSuccess: <T>(detail: ToolsetLoginSuccessDetail<T>) => void;
30
-
31
- /**
32
- * Percent-encodes each `/`-separated segment of a toolset id so it satisfies
33
- * the backend's `DEPLOYMENT_ID_PATTERN`/`TOOLSET_URL_PATTERN` (spaces and
34
- * other reserved characters must already be percent-encoded — e.g. `%20`,
35
- * not a real space — before this value is used against the toolsets API;
36
- * `/` stays a literal path separator). Externally-sourced ids — the raw,
37
- * human-readable id an embedded iframe sends over `postMessage`
38
- * (e.g. `toolsets/<bucket>/My Toolset__1.0`) — arrive unencoded, unlike the
39
- * already-encoded `id`/`toolset` field `listToolsets()`/`DialToolsetDto`
40
- * returns. Mirrors `encodeDeploymentId` (`deployment-id.ts`), which exists
41
- * for the identical reason on the applications side.
42
- */
43
- export declare const encodeToolsetId: (id: string) => string;
44
-
45
- /** Name of the same-origin `BroadcastChannel` shared by an OAuth flow's opener and its callback popup. */
46
- export declare const getToolsetOAuthChannelName: (flowId: string) => string;
47
-
48
- /**
49
- * Resolves the OAuth callback location against the current origin. The
50
- * callback path is supplied by the host: this module owns no application
51
- * route.
52
- */
53
- export declare const getToolsetRedirectUri: (callbackPath: string) => string;
54
-
55
- /**
56
- * Builds the OAuth authorize URL, opens a same-origin popup synchronously (so
57
- * a blocked popup can be reliably detected), writes the redirect state into
58
- * *that popup's own* `sessionStorage` while it is still same-origin
59
- * `about:blank`, then navigates it to the provider's authorization page.
60
- * `auth` must already be known synchronously here, so the config is validated
61
- * *before* opening the popup — unlike `navigateToolsetOAuthPopup`, used when
62
- * the auth config can only be fetched asynchronously after the popup is
63
- * already open.
64
- */
65
- export declare const initiateOAuthLogin: (auth: ToolsetOAuthSettings, toolsetId: string, callbackPath: string, credentialsLevel?: ToolsetCredentialsLevel, offlineUsageConsent?: boolean) => ToolsetOAuthInitiationResult;
66
-
67
- /** Whether a toolset id belongs to the `public` bucket (shared with all users), mirroring the legacy `isEntityIdPublic` check. */
68
- export declare const isPublicToolsetId: (toolsetId: string) => boolean;
69
-
70
- /**
71
- * Builds the OAuth authorize URL for an already-open popup and navigates it,
72
- * closing the popup and returning `InvalidConfig` if the auth config can't
73
- * produce a valid authorize URL. `callbackPath` is the host's own callback
74
- * route — this module owns no application route.
75
- */
76
- export declare const navigateToolsetOAuthPopup: (popup: Window, auth: ToolsetOAuthSettings, toolsetId: string, callbackPath: string, credentialsLevel?: ToolsetCredentialsLevel, resourceKind?: OAuthResourceKind, offlineUsageConsent?: boolean) => ToolsetOAuthInitiationResult;
77
-
78
- /**
79
- * Encodes a toolset id to its single-encoded form regardless of whether the
80
- * value received it in was already percent-encoded or the raw,
81
- * human-readable form — decoding first then re-encoding once is idempotent
82
- * either way, since `decodeToolsetId` on a raw (unencoded) id is a no-op.
83
- * Use this instead of `encodeToolsetId` at a boundary that cannot guarantee
84
- * which form it receives, such as a `postMessage` payload from an embedded
85
- * iframe: calling `encodeToolsetId` directly on a value the sender already
86
- * encoded escapes the existing `%` characters a second time (`%20` becomes
87
- * `%2520`), which the backend only ever undoes once and so 404s on.
88
- */
89
- export declare const normalizeToolsetId: (toolsetId: string) => string;
90
-
91
- /** Arguments handed to the host's exchange callback. */
92
- export declare interface OAuthExchangeParams {
93
- /** One-time authorization code the provider returned. */
94
- code: string;
95
- /** Redirect URI the code was issued against, to be echoed back to the backend. */
96
- redirectUri: string;
97
- /** Credentials level resolved from the stored redirect state. */
98
- credentialsLevel: ToolsetCredentialsLevel;
99
- /** The full redirect state the flow stored before navigating to the provider. */
100
- redirectState: ToolsetRedirectState;
101
- }
102
-
103
- /**
104
- * Which kind of resource an OAuth flow is authenticating. Three kinds share
105
- * the same popup/`BroadcastChannel` machinery, which is why this module is
106
- * named for the concern rather than for toolsets.
107
- */
108
- export declare enum OAuthResourceKind {
109
- Toolset = "toolset",
110
- ExternalService = "external-service",
111
- /**
112
- * Proactive Scheduled Tasks offline-credentials consent. Unlike
113
- * `Toolset`/`ExternalService`, this kind has no natural per-resource id —
114
- * the shared `ToolsetRedirectState.toolsetId` slot is repurposed as a
115
- * fixed sentinel correlation id (`'offline-credentials'`) purely for the
116
- * popup/`BroadcastChannel` handshake, never as a real toolset/
117
- * external-service id.
118
- */
119
- OfflineCredentials = "offline-credentials"
120
- }
121
-
122
- /**
123
- * Opens a same-origin, blank popup synchronously — call this as the very
124
- * first thing in a click (or click-derived) handler so the browser still
125
- * treats it as user-triggered, before doing any `await`. A caller that needs
126
- * to fetch the OAuth config first (it isn't known synchronously) opens the
127
- * popup with this, then calls `navigateToolsetOAuthPopup` once the config has
128
- * been fetched.
129
- */
130
- export declare const openToolsetOAuthPopup: () => Window | null;
131
-
132
- /**
133
- * Resolves which credentials level a toolset's login applies to, per DIAL
134
- * Core's public/private toolset convention: a `public`-bucket toolset is
135
- * shared credentials-wise at `User` level, while a private/workspace toolset
136
- * is scoped at `Global` level. Every surface that drives a toolset login
137
- * (the sign-in-interrupt dialog, the QuickApps editor iframe bridge,
138
- * `useToolsetLogin`) must resolve the level this way rather than assuming one.
139
- */
140
- export declare const resolveToolsetCredentialsLevel: (toolsetId: string) => ToolsetCredentialsLevel.User | ToolsetCredentialsLevel.Global;
141
-
142
- /**
143
- * Picks the auth-status field matching one credentials level out of a
144
- * toolset's `authSettings` — DIAL Core reports `userLevelAuthStatus` and
145
- * `globalAuthStatus` as independent fields rather than one status keyed by
146
- * level.
147
- */
148
- export declare const selectToolsetAuthStatus: (authSettings: Pick<DialToolsetAuthSettingsDto, "userLevelAuthStatus" | "globalAuthStatus"> | undefined, credentialsLevel: ToolsetCredentialsLevel) => string | undefined;
149
-
150
- export declare const subscribeToolsetLoginSuccess: <T>(listener: (detail: ToolsetLoginSuccessDetail<T>) => void) => (() => void);
151
-
152
- /** `sessionStorage` key the flow writes its `ToolsetRedirectState` under, in the popup it opens. */
153
- export declare const TOOLSET_REDIRECT_STATE_KEY = "toolset-redirect-state";
154
-
155
- /** Sign-in state DIAL Core reports for one credentials level of a toolset. */
156
- export declare enum ToolsetAuthStatus {
157
- SignedIn = "SIGNED_IN",
158
- SignedOut = "SIGNED_OUT",
159
- Failed = "FAILED"
160
- }
161
-
162
- /**
163
- * Enums and constants shared by the OAuth authorization-code popup flow and
164
- * every host that drives it. These declarations live here (rather than being
165
- * copied per host) because TypeScript string enums are nominal: a
166
- * structurally identical host-side copy would not type-check against a lib
167
- * signature that names the enum.
168
- */
169
- /** Authentication mechanism a toolset requires. */
170
- export declare enum ToolsetAuthTypes {
171
- None = "NONE",
172
- ApiKey = "API_KEY",
173
- OAuth = "OAUTH"
174
- }
175
-
176
- /** Scope the credentials submitted by a login apply to. */
177
- export declare enum ToolsetCredentialsLevel {
178
- Global = "GLOBAL",
179
- User = "USER",
180
- App = "APP"
181
- }
182
-
183
- /** Discriminated outcome of one login attempt. */
184
- export declare interface ToolsetLoginOutcome {
185
- /** Which terminal branch the attempt resolved through. */
186
- type: ToolsetLoginOutcomeType;
187
- }
188
-
189
- /** Terminal outcome kinds `login` can resolve. */
190
- export declare enum ToolsetLoginOutcomeType {
191
- Success = "success",
192
- Failure = "failure",
193
- PopupBlocked = "popup-blocked",
194
- Cancelled = "cancelled"
195
- }
196
-
197
- /** Arguments for one `login` call. */
198
- export declare interface ToolsetLoginParams {
199
- /** Already-encoded toolset id/url, as returned by `listToolsets`/`getToolset`. */
200
- toolsetId: string;
201
- /** Credentials level the submitted credentials apply to. */
202
- credentialsLevel: ToolsetCredentialsLevel;
203
- /** Authentication mechanism the toolset requires. */
204
- authenticationType: ToolsetAuthTypes;
205
- /** Required for `ToolsetAuthTypes.ApiKey`. */
206
- apiKey?: string;
207
- /** Required for `ToolsetAuthTypes.OAuth`. */
208
- oauthSettings?: ToolsetOAuthSettings;
209
- /**
210
- * Whether the target level's cached status is currently `FAILED` — API key
211
- * logins log that level out first when true. Ignored when `forceStale` is
212
- * set, and never consulted for OAuth (OAuth does not log out before
213
- * retrying).
214
- */
215
- isCurrentlyFailed?: boolean;
216
- /**
217
- * Always logs out the target level first (for both API key and OAuth)
218
- * regardless of the cached status — set by callers reacting to a
219
- * DIAL-Core-pushed `toolset/signin` event, which is proof the cached
220
- * status may be stale even when it still reads `SIGNED_IN`.
221
- */
222
- forceStale?: boolean;
223
- /**
224
- * Whether the user agreed an application may use this credential while they
225
- * are away. DIAL Core gates every on-behalf-of mint on it, so a toolset
226
- * signed in without it works interactively and still fails with
227
- * `consent-required` in the background. Absent means not granted.
228
- */
229
- offlineUsageConsent?: boolean;
230
- }
231
-
232
- /** Detail payload for a successful toolset login, generic over the app's own credentials-level type. */
233
- export declare interface ToolsetLoginSuccessDetail<T> {
234
- /** Already-encoded toolset id/url, as passed into `useToolsetLogin`'s `login`. */
235
- toolsetId: string;
236
- credentialsLevel: T;
237
- }
238
-
239
- /** Query parameters written into the callback popup URL after an OAuth flow completes. */
240
- export declare enum ToolsetOAuthCallbackQuery {
241
- Result = "toolsetOAuthResult",
242
- FailureReason = "toolsetOAuthFailureReason"
243
- }
244
-
245
- /** Control messages exchanged over a flow-scoped OAuth channel. */
246
- export declare enum ToolsetOAuthChannelControlType {
247
- ResultAcknowledged = "result-acknowledged"
248
- }
249
-
250
- /**
251
- * Non-secret result reported by the OAuth callback popup for one flow. Used
252
- * unchanged by every resource kind — the callback branch only needs to signal
253
- * success/failure, not resource details, back through the channel.
254
- */
255
- export declare type ToolsetOAuthChannelMessage = ToolsetOAuthSuccessMessage | ToolsetOAuthFailureMessage;
256
-
257
- export declare interface ToolsetOAuthFailureMessage {
258
- type: ToolsetOAuthResultType.Failure;
259
- reason: ToolsetOAuthFailureReason;
260
- }
261
-
262
- /** Reason codes the callback popup can report for a failed OAuth login. */
263
- export declare enum ToolsetOAuthFailureReason {
264
- MissingCode = "missing-code",
265
- MissingRedirectState = "missing-redirect-state",
266
- StateMismatch = "state-mismatch",
267
- LoginRequestFailed = "login-request-failed"
268
- }
269
-
270
- export declare type ToolsetOAuthInitiationResult = {
271
- type: ToolsetOAuthInitiationResultType.Started;
272
- popup: Window;
273
- flowId: string;
274
- } | {
275
- type: ToolsetOAuthInitiationResultType.Blocked;
276
- } | {
277
- type: ToolsetOAuthInitiationResultType.InvalidConfig;
278
- };
279
-
280
- /** Outcome of calling `initiateOAuthLogin`. */
281
- export declare enum ToolsetOAuthInitiationResultType {
282
- /** The popup was opened and navigated to the provider's authorize URL. */
283
- Started = "started",
284
- /** The browser blocked the popup before it could be opened. */
285
- Blocked = "blocked",
286
- /** The toolset's OAuth configuration is missing required fields. */
287
- InvalidConfig = "invalid-config"
288
- }
289
-
290
- /** Result resolved by `waitForToolsetOAuthResult` to the tab that initiated the login. */
291
- export declare type ToolsetOAuthResult = ToolsetOAuthSuccessMessage | ToolsetOAuthFailureMessage | {
292
- type: ToolsetOAuthResultType.Cancelled;
293
- };
294
-
295
- /** Confirms that the initiating tab consumed the callback result. */
296
- export declare interface ToolsetOAuthResultAcknowledgement {
297
- type: ToolsetOAuthChannelControlType.ResultAcknowledged;
298
- }
299
-
300
- /** Outcome reported back to the tab that initiated an OAuth login. */
301
- export declare enum ToolsetOAuthResultType {
302
- Success = "success",
303
- Failure = "failure",
304
- /** The popup was closed and focus returned to its opener, or the flow timed out. */
305
- Cancelled = "cancelled"
306
- }
307
-
308
- /**
309
- * OAuth client settings needed to build an authorize URL — the narrow subset
310
- * of a toolset's `authSettings` this module reads. Declared as its own shape
311
- * so hosts can keep their wider editor form models app-owned and still pass
312
- * them straight in.
313
- */
314
- export declare interface ToolsetOAuthSettings {
315
- clientId?: string;
316
- authorizationEndpoint?: string;
317
- scopes?: string[];
318
- codeChallenge?: string;
319
- codeChallengeMethod?: string;
320
- }
321
-
322
- export declare interface ToolsetOAuthSuccessMessage {
323
- type: ToolsetOAuthResultType.Success;
324
- toolsetId: string;
325
- credentialsLevel: ToolsetCredentialsLevel;
326
- }
327
-
328
- /**
329
- * Redirect state for an OAuth login flow. The flow writes this into the
330
- * *popup's own* `sessionStorage` before navigating it to the provider, since
331
- * the popup and its opener do not share a `sessionStorage` partition once
332
- * navigated cross-origin.
333
- */
334
- export declare interface ToolsetRedirectState {
335
- toolsetId: string;
336
- credentialsLevel?: ToolsetCredentialsLevel;
337
- redirectUri?: string;
338
- /** CSRF state token generated by the client before the OAuth redirect. */
339
- state?: string;
340
- /**
341
- * Which sign-in endpoint the host's callback route should submit the
342
- * authorization code to. Defaults to `Toolset` when absent so every
343
- * existing redirect state (written before this field existed) keeps
344
- * calling the toolset login unchanged. `ExternalService` reuses the same
345
- * popup/BroadcastChannel machinery with `toolsetId` repurposed as an
346
- * `{appId}::{serviceId}` composite key. `OfflineCredentials` reuses the
347
- * same machinery again, with `toolsetId` repurposed as a fixed sentinel
348
- * correlation id (`'offline-credentials'`) — the field carries no real
349
- * toolset/external-service meaning there, only the opaque
350
- * flow-correlation string the shared popup/`BroadcastChannel` utilities
351
- * require structurally.
352
- */
353
- resourceKind?: OAuthResourceKind;
354
- /**
355
- * Whether the user agreed the application may use the resulting credential
356
- * while they are away. Carried through the popup because the choice is made
357
- * before the redirect and the code exchange happens after it — the callback
358
- * route has no other way to learn it. Absent means "not granted".
359
- */
360
- offlineUsageConsent?: boolean;
361
- }
362
-
363
- /**
364
- * Completes an OAuth authorization-code flow from inside the callback popup:
365
- * reads and clears the redirect state written into this popup's own
366
- * `sessionStorage`, scrubs the authorization code from the visible URL before
367
- * any request, validates the returned `state`, performs the exchange through
368
- * the injected callback, then reports the outcome into the popup URL and over
369
- * the flow channel until acknowledged, closing the popup afterwards. Runs its
370
- * effect once per mount even under StrictMode double-invocation. Renders
371
- * nothing and produces no user-visible text — the host page presents and
372
- * announces the returned state in its own language.
373
- */
374
- export declare const useOAuthCallbackCompletion: ({ searchParams, callbackPath, exchange, }: UseOAuthCallbackCompletionParams) => UseOAuthCallbackCompletionResult;
375
-
376
- /** Parameters for {@link useOAuthCallbackCompletion}. */
377
- export declare interface UseOAuthCallbackCompletionParams {
378
- /**
379
- * Query parameters of the callback URL. Read once per mount; the hook takes
380
- * `code` and `state` from it.
381
- */
382
- searchParams: URLSearchParams;
383
- /**
384
- * Path used to build the `redirect_uri` echoed back to the backend when the
385
- * stored redirect state carries none — every state written by the current
386
- * flow does, so this only covers states written before that field existed.
387
- */
388
- callbackPath: string;
389
- /**
390
- * Performs the code-for-credentials exchange. Resolving `null` reports
391
- * success; resolving a failure reason reports that reason (for a host-side
392
- * validation the hook cannot perform, such as an unparseable resource id);
393
- * rejecting reports `LoginRequestFailed`.
394
- */
395
- exchange: (params: OAuthExchangeParams) => Promise<ToolsetOAuthFailureReason | null>;
396
- }
397
-
398
- /** State {@link useOAuthCallbackCompletion} exposes for the host page to render. */
399
- export declare interface UseOAuthCallbackCompletionResult {
400
- /** True until the flow has reported an outcome. */
401
- isInProgress: boolean;
402
- /** Reason the flow failed, or `null` while in progress or on success. */
403
- failureReason: ToolsetOAuthFailureReason | null;
404
- }
405
-
406
- /**
407
- * Shared toolset API-key/OAuth login orchestration, so no two surfaces fork
408
- * the popup/`BroadcastChannel` handshake or the stale-credential-clearing
409
- * rule. Every backend call arrives as an injected callback: the hook
410
- * constructs no client instance and reads no app context. It resolves an
411
- * outcome and shows nothing itself — mapping an outcome to notifications is
412
- * the caller's job.
413
- */
414
- export declare const useToolsetLogin: ({ callbackPath, loginToolset, logoutToolset, getToolset, }: UseToolsetLoginParams) => UseToolsetLoginResult;
415
-
416
- /** Parameters for {@link useToolsetLogin}. */
417
- export declare interface UseToolsetLoginParams {
418
- /**
419
- * The host's OAuth callback route. Resolved against `window.location.origin`
420
- * for the `redirect_uri`, and compared against the popup's pathname when
421
- * reading a completion marker out of its URL.
422
- */
423
- callbackPath: string;
424
- /** Submits credentials for one toolset at one credentials level. */
425
- loginToolset: (toolsetId: string, body: ToolsetLoginBodyDto) => Promise<unknown>;
426
- /** Clears stored credentials for one toolset at one credentials level. */
427
- logoutToolset: (toolsetId: string, body: ToolsetLogoutBodyDto) => Promise<unknown>;
428
- /** Re-reads a toolset so a reported cancellation can be checked against the backend. */
429
- getToolset: (toolsetId: string) => Promise<DialToolsetDto>;
430
- }
431
-
432
- /** Result returned by {@link useToolsetLogin}. */
433
- export declare interface UseToolsetLoginResult {
434
- /** Runs one API-key or OAuth login attempt and resolves its outcome. */
435
- login: (params: ToolsetLoginParams) => Promise<ToolsetLoginOutcome>;
436
- }
437
-
438
- /**
439
- * Waits for the OAuth callback popup to report a result over BroadcastChannel
440
- * or through the completion marker in its same-origin URL. A cross-origin
441
- * provider can make the retained WindowProxy look closed even while the popup
442
- * remains open, so cancellation is confirmed only when the initiating window
443
- * regains focus. Reported results are acknowledged so the callback can close
444
- * itself even when the retained WindowProxy was severed.
445
- */
446
- export declare const waitForToolsetOAuthResult: (popup: Window, flowId: string, { toolsetId, credentialsLevel, callbackPath, timeoutMs, pollIntervalMs, }: WaitForToolsetOAuthResultOptions) => Promise<ToolsetOAuthResult>;
447
-
448
- /** Options for {@link waitForToolsetOAuthResult}. */
449
- export declare interface WaitForToolsetOAuthResultOptions {
450
- /** Resource id echoed back in a success result. */
451
- toolsetId: string;
452
- /** Credentials level echoed back in a success result. */
453
- credentialsLevel: ToolsetCredentialsLevel;
454
- /**
455
- * The host's callback route — the same path the flow's popup was opened
456
- * against. The popup-URL reader treats a same-origin URL as a result only
457
- * when its pathname equals this value, so a host serving more than one
458
- * callback route passes whichever one it actually opened.
459
- */
460
- callbackPath: string;
461
- timeoutMs?: number;
462
- pollIntervalMs?: number;
463
- }
464
-
465
- /** Whether a toolset authenticates interactively, and whether its client is manually configured. */
466
- export declare enum WithLogin {
467
- WithLogin = "with-login",
468
- WithoutLogin = "without-login",
469
- WithConfig = "with-config"
470
- }
471
-
472
- export { }
1
+ export * from './entry-points/oauth.js'
2
+ export {}
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.3.0-dev.5",
4
+ "version": "1.3.0-dev.55",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -104,6 +104,11 @@
104
104
  "import": "./usage.js",
105
105
  "default": "./usage.js"
106
106
  },
107
+ "./usage-limits": {
108
+ "types": "./usage-limits.d.ts",
109
+ "import": "./usage-limits.js",
110
+ "default": "./usage-limits.js"
111
+ },
107
112
  "./mcp-apps": {
108
113
  "types": "./mcp-apps.d.ts",
109
114
  "import": "./mcp-apps.js",
@@ -111,7 +116,7 @@
111
116
  }
112
117
  },
113
118
  "dependencies": {
114
- "@epam/ai-dial-chat-api-client": "1.3.0-dev.5",
119
+ "@epam/ai-dial-chat-api-client": "1.3.0-dev.55",
115
120
  "dompurify": "3.4.16",
116
121
  "fflate": "^0.8.3",
117
122
  "lru-cache": "^10.4.3",
@@ -120,21 +125,22 @@
120
125
  },
121
126
  "peerDependencies": {
122
127
  "react": "^19.2.8",
123
- "@epam/ai-dial-attachment-canvas": "1.3.0-dev.5",
124
- "@epam/ai-dial-attachment-input": "1.3.0-dev.5",
125
- "@epam/ai-dial-catalog": "1.3.0-dev.5",
126
- "@epam/ai-dial-chat-overlay": "1.3.0-dev.5",
127
- "@epam/ai-dial-chat-shared": "1.3.0-dev.5",
128
- "@epam/ai-dial-mcp-apps": "1.3.0-dev.5",
129
- "@epam/ai-dial-publish-panel": "1.3.0-dev.5",
130
- "@epam/ai-dial-quotations": "1.3.0-dev.5",
131
- "@epam/ai-dial-react-file-manager": "^0.3.0",
132
- "@epam/ai-dial-scheduled-tasks": "1.3.0-dev.5",
133
- "@epam/ai-dial-share": "1.3.0-dev.5",
134
- "@epam/ai-dial-skill-editor": "1.3.0-dev.5",
135
- "@epam/ai-dial-source-panel": "1.3.0-dev.5",
136
- "@epam/ai-dial-ui-kit": "^0.15.0",
137
- "@epam/ai-dial-usage-dashboard": "1.3.0-dev.5",
128
+ "@epam/ai-dial-attachment-canvas": "1.3.0-dev.55",
129
+ "@epam/ai-dial-attachment-input": "1.3.0-dev.55",
130
+ "@epam/ai-dial-catalog": "1.3.0-dev.55",
131
+ "@epam/ai-dial-chat-overlay": "1.3.0-dev.55",
132
+ "@epam/ai-dial-chat-shared": "1.3.0-dev.55",
133
+ "@epam/ai-dial-conversation-input": "1.3.0-dev.55",
134
+ "@epam/ai-dial-mcp-apps": "1.3.0-dev.55",
135
+ "@epam/ai-dial-publish-panel": "1.3.0-dev.55",
136
+ "@epam/ai-dial-quotations": "1.3.0-dev.55",
137
+ "@epam/ai-dial-react-file-manager": "^0.3.5",
138
+ "@epam/ai-dial-scheduled-tasks": "1.3.0-dev.55",
139
+ "@epam/ai-dial-share": "1.3.0-dev.55",
140
+ "@epam/ai-dial-skill-editor": "1.3.0-dev.55",
141
+ "@epam/ai-dial-source-panel": "1.3.0-dev.55",
142
+ "@epam/ai-dial-ui-kit": "^0.15.4",
143
+ "@epam/ai-dial-usage-dashboard": "1.3.0-dev.55",
138
144
  "@modelcontextprotocol/sdk": "^1.32.1",
139
145
  "@epam/pdf-highlighter-kit": "^0.0.19",
140
146
  "@mcp-ui/client": "^7.1.1"
@@ -155,6 +161,9 @@
155
161
  "@epam/ai-dial-chat-shared": {
156
162
  "optional": true
157
163
  },
164
+ "@epam/ai-dial-conversation-input": {
165
+ "optional": true
166
+ },
158
167
  "@epam/ai-dial-mcp-apps": {
159
168
  "optional": true
160
169
  },
@@ -0,0 +1,31 @@
1
+ import { PromptResponseDto } from '@epam/ai-dial-chat-api-client';
2
+ import { ExportFolder } from '@epam/ai-dial-chat-shared';
3
+ /** A prompt record as it appears inside a downloaded prompt file. */
4
+ export interface ExportedPrompt {
5
+ /** Prompt path within the prompts namespace, doubling as its stable id. */
6
+ id: string;
7
+ /** Display name. */
8
+ name: string;
9
+ /** Description, empty when the prompt has none. */
10
+ description: string;
11
+ /** Prompt text, `{{variable}}` placeholders included verbatim. */
12
+ content: string;
13
+ /** Parent folder path; absent for a root-level prompt. */
14
+ folderId?: string;
15
+ }
16
+ /** Versioned JSON envelope produced by a prompt download. */
17
+ export interface PromptExportFormat {
18
+ /** Format version discriminator, shared with the conversation export envelope. */
19
+ version: 5;
20
+ /** Exported prompts. */
21
+ prompts: ExportedPrompt[];
22
+ /** Folders the exported prompts belong to, outermost first. */
23
+ folders: ExportFolder[];
24
+ }
25
+ /** Builds the download envelope for a single prompt, including its folder chain. */
26
+ export declare const buildPromptExportEnvelope: (prompt: PromptResponseDto) => PromptExportFormat;
27
+ /** Serializes a prompt export envelope into a pretty-printed JSON blob. */
28
+ export declare const serializePromptExport: (envelope: PromptExportFormat) => Blob;
29
+ /** Builds a prompt's download file name, e.g. `2026-08-12_ai_dial_prompt_summarize.json`. */
30
+ export declare const buildPromptExportFileName: (promptName: string, appName: string, date?: Date) => string;
31
+ //# sourceMappingURL=export-prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export-prompt.d.ts","sourceRoot":"","sources":["../../src/prompt/export-prompt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAG9D,qEAAqE;AACrE,MAAM,WAAW,cAAc;IAC7B,2EAA2E;IAC3E,EAAE,EAAE,MAAM,CAAC;IACX,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,WAAW,EAAE,MAAM,CAAC;IACpB,kEAAkE;IAClE,OAAO,EAAE,MAAM,CAAC;IAChB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,6DAA6D;AAC7D,MAAM,WAAW,kBAAkB;IACjC,kFAAkF;IAClF,OAAO,EAAE,CAAC,CAAC;IACX,wBAAwB;IACxB,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,+DAA+D;IAC/D,OAAO,EAAE,YAAY,EAAE,CAAC;CACzB;AAmBD,oFAAoF;AACpF,eAAO,MAAM,yBAAyB,GACpC,QAAQ,iBAAiB,KACxB,kBAYD,CAAC;AAEH,2EAA2E;AAC3E,eAAO,MAAM,qBAAqB,GAAI,UAAU,kBAAkB,KAAG,IACQ,CAAC;AAK9E,6FAA6F;AAC7F,eAAO,MAAM,yBAAyB,GACpC,YAAY,MAAM,EAClB,SAAS,MAAM,EACf,OAAM,IAAiB,KACtB,MAGF,CAAC"}