@epam/ai-dial-chat-hooks 1.3.0-dev.16 → 1.3.0-dev.160

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 (517) 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-error/api-error.js +2 -2
  4. package/api-transport/create-csrf-middleware.d.ts +15 -0
  5. package/api-transport/create-csrf-middleware.d.ts.map +1 -0
  6. package/api-transport/create-unauthorized-middleware.d.ts +40 -0
  7. package/api-transport/create-unauthorized-middleware.d.ts.map +1 -0
  8. package/api-transport/create-unauthorized-middleware.js +4 -1
  9. package/attachment/useAttachmentAction/useAttachmentAction.d.ts +32 -0
  10. package/attachment/useAttachmentAction/useAttachmentAction.d.ts.map +1 -0
  11. package/attachment/useAttachmentAction/useAttachmentAction.js +5 -8
  12. package/attachment/useAttachmentValidation/useAttachmentValidation.d.ts +50 -0
  13. package/attachment/useAttachmentValidation/useAttachmentValidation.d.ts.map +1 -0
  14. package/attachments.d.ts +2 -94
  15. package/catalog/catalog-derivations.d.ts +27 -0
  16. package/catalog/catalog-derivations.d.ts.map +1 -0
  17. package/catalog/catalog-derivations.js +1 -1
  18. package/catalog/catalog-primary-action.d.ts +47 -0
  19. package/catalog/catalog-primary-action.d.ts.map +1 -0
  20. package/catalog/create-publish-api.d.ts +34 -0
  21. package/catalog/create-publish-api.d.ts.map +1 -0
  22. package/catalog/create-publish-api.js +4 -0
  23. package/catalog/deployment-endpoint-url.d.ts +19 -0
  24. package/catalog/deployment-endpoint-url.d.ts.map +1 -0
  25. package/catalog/deployment-id.d.ts +42 -0
  26. package/catalog/deployment-id.d.ts.map +1 -0
  27. package/catalog/entity-details.d.ts +146 -0
  28. package/catalog/entity-details.d.ts.map +1 -0
  29. package/catalog/map-deployment-limits-to-catalog.d.ts +34 -0
  30. package/catalog/map-deployment-limits-to-catalog.d.ts.map +1 -0
  31. package/catalog/map-deployment-limits-to-input.d.ts +29 -0
  32. package/catalog/map-deployment-limits-to-input.d.ts.map +1 -0
  33. package/catalog/map-deployment-limits-to-input.js +3 -4
  34. package/catalog/map-deployment-to-catalog-item.d.ts +61 -0
  35. package/catalog/map-deployment-to-catalog-item.d.ts.map +1 -0
  36. package/catalog/map-entity-details-to-catalog.d.ts +81 -0
  37. package/catalog/map-entity-details-to-catalog.d.ts.map +1 -0
  38. package/catalog/map-entity-details-to-catalog.js +1 -1
  39. package/catalog/map-prompt-to-catalog-item.d.ts +43 -0
  40. package/catalog/map-prompt-to-catalog-item.d.ts.map +1 -0
  41. package/catalog/map-skill-to-catalog-item.d.ts +113 -0
  42. package/catalog/map-skill-to-catalog-item.d.ts.map +1 -0
  43. package/catalog/map-skill-to-catalog-item.js +1 -5
  44. package/catalog/mcp-endpoint-url.d.ts +18 -0
  45. package/catalog/mcp-endpoint-url.d.ts.map +1 -0
  46. package/catalog/publish.d.ts +35 -0
  47. package/catalog/publish.d.ts.map +1 -0
  48. package/catalog/useApplicationCredentials/useApplicationCredentials.d.ts +19 -0
  49. package/catalog/useApplicationCredentials/useApplicationCredentials.d.ts.map +1 -0
  50. package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts +107 -0
  51. package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts.map +1 -0
  52. package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.js +90 -71
  53. package/catalog/useCatalogItemDetails.d.ts +70 -0
  54. package/catalog/useCatalogItemDetails.d.ts.map +1 -0
  55. package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.d.ts +76 -0
  56. package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.d.ts.map +1 -0
  57. package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.d.ts +37 -0
  58. package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.d.ts.map +1 -0
  59. package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.js +1 -1
  60. package/catalog/usePublishFolders/usePublishFolders.d.ts +73 -0
  61. package/catalog/usePublishFolders/usePublishFolders.d.ts.map +1 -0
  62. package/catalog/usePublishFolders/usePublishFolders.js +1 -1
  63. package/catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.d.ts +54 -0
  64. package/catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.d.ts.map +1 -0
  65. package/catalog/useSkillItemDetails.d.ts +64 -0
  66. package/catalog/useSkillItemDetails.d.ts.map +1 -0
  67. package/catalog/useSkillItemDetails.js +3 -3
  68. package/catalog.d.ts +2 -1436
  69. package/conversation/announcement-message.d.ts +61 -0
  70. package/conversation/announcement-message.d.ts.map +1 -0
  71. package/conversation/conversation-draft/conversation-draft-store.d.ts +21 -0
  72. package/conversation/conversation-draft/conversation-draft-store.d.ts.map +1 -0
  73. package/conversation/conversation-draft/conversation-draft-store.js +84 -0
  74. package/conversation/conversation-draft/conversation-draft.d.ts +48 -0
  75. package/conversation/conversation-draft/conversation-draft.d.ts.map +1 -0
  76. package/conversation/conversation-transfer/async.d.ts +10 -0
  77. package/conversation/conversation-transfer/async.d.ts.map +1 -0
  78. package/conversation/conversation-transfer/attachment-refs.d.ts +50 -0
  79. package/conversation/conversation-transfer/attachment-refs.d.ts.map +1 -0
  80. package/conversation/conversation-transfer/attachment-refs.js +31 -9
  81. package/conversation/conversation-transfer/build-upload-path.d.ts +42 -0
  82. package/conversation/conversation-transfer/build-upload-path.d.ts.map +1 -0
  83. package/conversation/conversation-transfer/date.d.ts +5 -0
  84. package/conversation/conversation-transfer/date.d.ts.map +1 -0
  85. package/conversation/conversation-transfer/dial-file-resolve.d.ts +10 -0
  86. package/conversation/conversation-transfer/dial-file-resolve.d.ts.map +1 -0
  87. package/conversation/conversation-transfer/export-conversation.d.ts +14 -0
  88. package/conversation/conversation-transfer/export-conversation.d.ts.map +1 -0
  89. package/conversation/conversation-transfer/export-conversation.js +19 -18
  90. package/conversation/conversation-transfer/import-conversation.d.ts +111 -0
  91. package/conversation/conversation-transfer/import-conversation.d.ts.map +1 -0
  92. package/conversation/conversation-transfer/import-conversation.js +65 -69
  93. package/conversation/conversation-transfer/progress.d.ts +60 -0
  94. package/conversation/conversation-transfer/progress.d.ts.map +1 -0
  95. package/conversation/conversation-transfer/progress.js +1 -1
  96. package/conversation/conversation-transfer/queue.d.ts +54 -0
  97. package/conversation/conversation-transfer/queue.d.ts.map +1 -0
  98. package/conversation/conversation-transfer/types.d.ts +36 -0
  99. package/conversation/conversation-transfer/types.d.ts.map +1 -0
  100. package/conversation/conversation-transfer/zip-export.d.ts +31 -0
  101. package/conversation/conversation-transfer/zip-export.d.ts.map +1 -0
  102. package/conversation/conversation-transfer/zip-export.js +1 -7
  103. package/conversation/conversation-transfer/zip-import.d.ts +17 -0
  104. package/conversation/conversation-transfer/zip-import.d.ts.map +1 -0
  105. package/conversation/conversation-transfer/zip-import.js +1 -1
  106. package/conversation/create-chat-stream-api.d.ts +109 -0
  107. package/conversation/create-chat-stream-api.d.ts.map +1 -0
  108. package/conversation/create-chat-stream-api.js +57 -47
  109. package/conversation/deriveConversationRowActionState/deriveConversationRowActionState.d.ts +39 -0
  110. package/conversation/deriveConversationRowActionState/deriveConversationRowActionState.d.ts.map +1 -0
  111. package/conversation/display-name-watch.d.ts +4 -0
  112. package/conversation/display-name-watch.d.ts.map +1 -0
  113. package/conversation/footer-message.d.ts +10 -0
  114. package/conversation/footer-message.d.ts.map +1 -0
  115. package/conversation/get-model-id-from-conversation-id.d.ts +38 -0
  116. package/conversation/get-model-id-from-conversation-id.d.ts.map +1 -0
  117. package/conversation/get-model-id-from-conversation-id.js +1 -1
  118. package/conversation/greeting.d.ts +18 -0
  119. package/conversation/greeting.d.ts.map +1 -0
  120. package/conversation/message-factory.d.ts +7 -0
  121. package/conversation/message-factory.d.ts.map +1 -0
  122. package/conversation/message-utils.d.ts +67 -0
  123. package/conversation/message-utils.d.ts.map +1 -0
  124. package/conversation/overlay-messages.d.ts +5 -0
  125. package/conversation/overlay-messages.d.ts.map +1 -0
  126. package/conversation/quick-app-conversation-starters.d.ts +10 -0
  127. package/conversation/quick-app-conversation-starters.d.ts.map +1 -0
  128. package/conversation/stage.d.ts +77 -0
  129. package/conversation/stage.d.ts.map +1 -0
  130. package/conversation/starter-option.d.ts +21 -0
  131. package/conversation/starter-option.d.ts.map +1 -0
  132. package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts +35 -0
  133. package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts.map +1 -0
  134. package/conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.d.ts +46 -0
  135. package/conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.d.ts.map +1 -0
  136. package/conversation/useAttachmentUpload/useAttachmentUpload.d.ts +27 -0
  137. package/conversation/useAttachmentUpload/useAttachmentUpload.d.ts.map +1 -0
  138. package/conversation/useAttachmentUpload/useAttachmentUpload.js +4 -1
  139. package/conversation/useConversationComposerDraft/useConversationComposerDraft.d.ts +39 -0
  140. package/conversation/useConversationComposerDraft/useConversationComposerDraft.d.ts.map +1 -0
  141. package/conversation/useConversationComposerDraft/useConversationComposerDraft.js +128 -0
  142. package/conversation/useConversationExport/useConversationExport.d.ts +72 -0
  143. package/conversation/useConversationExport/useConversationExport.d.ts.map +1 -0
  144. package/conversation/useConversationExport/useConversationExport.js +59 -60
  145. package/conversation/useConversationHandlers/attachment-to-dto.d.ts +7 -0
  146. package/conversation/useConversationHandlers/attachment-to-dto.d.ts.map +1 -0
  147. package/conversation/useConversationHandlers/message-factory.d.ts +9 -0
  148. package/conversation/useConversationHandlers/message-factory.d.ts.map +1 -0
  149. package/conversation/useConversationHandlers/message-utils.d.ts +38 -0
  150. package/conversation/useConversationHandlers/message-utils.d.ts.map +1 -0
  151. package/conversation/useConversationHandlers/message-utils.js +2 -2
  152. package/conversation/useConversationHandlers/starter-option.d.ts +24 -0
  153. package/conversation/useConversationHandlers/starter-option.d.ts.map +1 -0
  154. package/conversation/useConversationHandlers/useConversationHandlers.d.ts +66 -0
  155. package/conversation/useConversationHandlers/useConversationHandlers.d.ts.map +1 -0
  156. package/conversation/useConversationHandlers/useConversationHandlers.js +2 -2
  157. package/conversation/useConversationImport/useConversationImport.d.ts +54 -0
  158. package/conversation/useConversationImport/useConversationImport.d.ts.map +1 -0
  159. package/conversation/useConversationImport/useConversationImport.js +24 -24
  160. package/conversation/useConversationLookupMaps/useConversationLookupMaps.d.ts +24 -0
  161. package/conversation/useConversationLookupMaps/useConversationLookupMaps.d.ts.map +1 -0
  162. package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts +65 -0
  163. package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts.map +1 -0
  164. package/conversation/useConversationPanelItems/useConversationPanelItems.js +31 -30
  165. package/conversation/useConversationScroll/useConversationScroll.d.ts +46 -0
  166. package/conversation/useConversationScroll/useConversationScroll.d.ts.map +1 -0
  167. package/conversation/useConversationScroll/useConversationScroll.js +2 -6
  168. package/conversation/useConversationStream/apply-chunk.d.ts +35 -0
  169. package/conversation/useConversationStream/apply-chunk.d.ts.map +1 -0
  170. package/conversation/useConversationStream/buffered-generation.d.ts +15 -0
  171. package/conversation/useConversationStream/buffered-generation.d.ts.map +1 -0
  172. package/conversation/useConversationStream/conversation-path.d.ts +7 -0
  173. package/conversation/useConversationStream/conversation-path.d.ts.map +1 -0
  174. package/conversation/useConversationStream/conversation-path.js +2 -2
  175. package/conversation/useConversationStream/frame-scheduler.d.ts +14 -0
  176. package/conversation/useConversationStream/frame-scheduler.d.ts.map +1 -0
  177. package/conversation/useConversationStream/frame-scheduler.js +17 -17
  178. package/conversation/useConversationStream/generation-resume.d.ts +98 -0
  179. package/conversation/useConversationStream/generation-resume.d.ts.map +1 -0
  180. package/conversation/useConversationStream/generation-resume.js +64 -65
  181. package/conversation/useConversationStream/useConversationStream.d.ts +145 -0
  182. package/conversation/useConversationStream/useConversationStream.d.ts.map +1 -0
  183. package/conversation/useConversationStream/useConversationStream.js +248 -241
  184. package/conversation/useImportFilePicker/useImportFilePicker.d.ts +32 -0
  185. package/conversation/useImportFilePicker/useImportFilePicker.d.ts.map +1 -0
  186. package/conversation/useMessageSelectionReply/useMessageSelectionReply.d.ts +42 -0
  187. package/conversation/useMessageSelectionReply/useMessageSelectionReply.d.ts.map +1 -0
  188. package/conversation/useMessageSelectionReply/useMessageSelectionReply.js +4 -10
  189. package/conversation/useTranscribeAudio/audio-transcription-error.d.ts +19 -0
  190. package/conversation/useTranscribeAudio/audio-transcription-error.d.ts.map +1 -0
  191. package/conversation/useTranscribeAudio/transcription-retry.d.ts +2 -0
  192. package/conversation/useTranscribeAudio/transcription-retry.d.ts.map +1 -0
  193. package/conversation/useTranscribeAudio/useTranscribeAudio.d.ts +43 -0
  194. package/conversation/useTranscribeAudio/useTranscribeAudio.d.ts.map +1 -0
  195. package/conversation/useTranscribeAudio/useTranscribeAudio.js +30 -27
  196. package/conversation-overlay.d.ts +2 -7
  197. package/conversation-overlay.js +1 -2
  198. package/conversation-sources/useConversationSources/useConversationSources.d.ts +20 -0
  199. package/conversation-sources/useConversationSources/useConversationSources.d.ts.map +1 -0
  200. package/conversation-sources.d.ts +2 -25
  201. package/conversation-sources.js +1 -2
  202. package/conversation-transfer.d.ts +2 -190
  203. package/conversation.d.ts +2 -1372
  204. package/conversation.js +34 -32
  205. package/entry-points/attachments.d.ts +3 -0
  206. package/entry-points/attachments.d.ts.map +1 -0
  207. package/entry-points/catalog.d.ts +25 -0
  208. package/entry-points/catalog.d.ts.map +1 -0
  209. package/entry-points/conversation-overlay.d.ts +2 -0
  210. package/entry-points/conversation-overlay.d.ts.map +1 -0
  211. package/entry-points/conversation-sources.d.ts +2 -0
  212. package/entry-points/conversation-sources.d.ts.map +1 -0
  213. package/entry-points/conversation-transfer.d.ts +7 -0
  214. package/entry-points/conversation-transfer.d.ts.map +1 -0
  215. package/entry-points/conversation.d.ts +36 -0
  216. package/entry-points/conversation.d.ts.map +1 -0
  217. package/entry-points/file-manager-canvas.d.ts +2 -0
  218. package/entry-points/file-manager-canvas.d.ts.map +1 -0
  219. package/entry-points/file-manager.d.ts +31 -0
  220. package/entry-points/file-manager.d.ts.map +1 -0
  221. package/entry-points/mcp-apps.d.ts +6 -0
  222. package/entry-points/mcp-apps.d.ts.map +1 -0
  223. package/entry-points/oauth.d.ts +10 -0
  224. package/entry-points/oauth.d.ts.map +1 -0
  225. package/entry-points/offline-credentials.d.ts +5 -0
  226. package/entry-points/offline-credentials.d.ts.map +1 -0
  227. package/entry-points/scheduled-tasks.d.ts +9 -0
  228. package/entry-points/scheduled-tasks.d.ts.map +1 -0
  229. package/entry-points/scroll-anchoring.d.ts +2 -0
  230. package/entry-points/scroll-anchoring.d.ts.map +1 -0
  231. package/entry-points/sharing.d.ts +3 -0
  232. package/entry-points/sharing.d.ts.map +1 -0
  233. package/entry-points/skill-editor.d.ts +9 -0
  234. package/entry-points/skill-editor.d.ts.map +1 -0
  235. package/entry-points/skills-state.d.ts +2 -0
  236. package/entry-points/skills-state.d.ts.map +1 -0
  237. package/entry-points/source-content.d.ts +2 -0
  238. package/entry-points/source-content.d.ts.map +1 -0
  239. package/entry-points/usage-limits.d.ts +8 -0
  240. package/entry-points/usage-limits.d.ts.map +1 -0
  241. package/entry-points/usage.d.ts +3 -0
  242. package/entry-points/usage.d.ts.map +1 -0
  243. package/entry-points/utils.d.ts +17 -0
  244. package/entry-points/utils.d.ts.map +1 -0
  245. package/entry-points/viewport-layout.d.ts +4 -0
  246. package/entry-points/viewport-layout.d.ts.map +1 -0
  247. package/file-manager-canvas.d.ts +2 -418
  248. package/file-manager-canvas.js +1 -2
  249. package/file-manager.d.ts +2 -1250
  250. package/file-manager.js +21 -21
  251. package/files/annotation.d.ts +10 -0
  252. package/files/annotation.d.ts.map +1 -0
  253. package/files/attachment-canvas.d.ts +123 -0
  254. package/files/attachment-canvas.d.ts.map +1 -0
  255. package/files/attachment-dto-to-display.d.ts +10 -0
  256. package/files/attachment-dto-to-display.d.ts.map +1 -0
  257. package/files/attachment-types.d.ts +21 -0
  258. package/files/attachment-types.d.ts.map +1 -0
  259. package/files/attachment-types.js +1 -1
  260. package/files/create-files-api.d.ts +52 -0
  261. package/files/create-files-api.d.ts.map +1 -0
  262. package/files/create-files-api.js +1 -1
  263. package/files/create-upload-file-with-progress.d.ts +27 -0
  264. package/files/create-upload-file-with-progress.d.ts.map +1 -0
  265. package/files/create-upload-file-with-progress.js +42 -34
  266. package/files/dial-file-manager-copy-move.util.d.ts +15 -0
  267. package/files/dial-file-manager-copy-move.util.d.ts.map +1 -0
  268. package/files/dial-file-manager-mapping.util.d.ts +55 -0
  269. package/files/dial-file-manager-mapping.util.d.ts.map +1 -0
  270. package/files/dial-file-manager-mapping.util.js +97 -69
  271. package/files/dial-file-manager-path.util.d.ts +48 -0
  272. package/files/dial-file-manager-path.util.d.ts.map +1 -0
  273. package/files/dial-file-manager.model.d.ts +36 -0
  274. package/files/dial-file-manager.model.d.ts.map +1 -0
  275. package/files/dial-file-manager.types.d.ts +335 -0
  276. package/files/dial-file-manager.types.d.ts.map +1 -0
  277. package/files/dial-file-to-attachment.d.ts +26 -0
  278. package/files/dial-file-to-attachment.d.ts.map +1 -0
  279. package/files/dial-file-to-attachment.js +3 -3
  280. package/files/dial-file.d.ts +17 -0
  281. package/files/dial-file.d.ts.map +1 -0
  282. package/files/dial-files-api.d.ts +71 -0
  283. package/files/dial-files-api.d.ts.map +1 -0
  284. package/files/download-destination.d.ts +31 -0
  285. package/files/download-destination.d.ts.map +1 -0
  286. package/files/download-progress.d.ts +33 -0
  287. package/files/download-progress.d.ts.map +1 -0
  288. package/files/download-progress.js +28 -0
  289. package/files/file-manager-variant.d.ts +3 -0
  290. package/files/file-manager-variant.d.ts.map +1 -0
  291. package/files/file-name.d.ts +19 -0
  292. package/files/file-name.d.ts.map +1 -0
  293. package/files/prepare-download-destination.d.ts +8 -0
  294. package/files/prepare-download-destination.d.ts.map +1 -0
  295. package/files/resolve-dial-file-api-path.d.ts +12 -0
  296. package/files/resolve-dial-file-api-path.d.ts.map +1 -0
  297. package/files/source-content.d.ts +28 -0
  298. package/files/source-content.d.ts.map +1 -0
  299. package/files/source-content.js +1 -1
  300. package/files/useDialFileListing/useDialFileListing.d.ts +82 -0
  301. package/files/useDialFileListing/useDialFileListing.d.ts.map +1 -0
  302. package/files/useDialFileListing/useDialFileListing.js +95 -107
  303. package/files/useDialFileManager/useDialFileManager.d.ts +16 -0
  304. package/files/useDialFileManager/useDialFileManager.d.ts.map +1 -0
  305. package/files/useDialFileManager/useDialFileManager.js +5 -2
  306. package/files/useDialFileManagerSections/useDialFileManagerSections.d.ts +25 -0
  307. package/files/useDialFileManagerSections/useDialFileManagerSections.d.ts.map +1 -0
  308. package/files/useDialFileManagerSections/useDialFileManagerSections.js +59 -68
  309. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.d.ts +15 -0
  310. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.d.ts.map +1 -0
  311. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js +1 -1
  312. package/files/useDialFileMetadata/useDialFileMetadata.d.ts +28 -0
  313. package/files/useDialFileMetadata/useDialFileMetadata.d.ts.map +1 -0
  314. package/files/useDialFileMetadata/useDialFileMetadata.js +3 -3
  315. package/files/useDialFileMutations/useDialFileMutations.d.ts +77 -0
  316. package/files/useDialFileMutations/useDialFileMutations.d.ts.map +1 -0
  317. package/files/useDialFileMutations/useDialFileMutations.js +230 -159
  318. package/files/useDialFileSharing/useDialFileSharing.d.ts +34 -0
  319. package/files/useDialFileSharing/useDialFileSharing.d.ts.map +1 -0
  320. package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts +47 -0
  321. package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts.map +1 -0
  322. package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +105 -97
  323. package/files/useFileAttachmentPicker/useFileAttachmentPicker.d.ts +59 -0
  324. package/files/useFileAttachmentPicker/useFileAttachmentPicker.d.ts.map +1 -0
  325. package/files/useFileAttachmentPicker/useFileAttachmentPicker.js +2 -2
  326. package/index.d.ts +167 -6990
  327. package/index.d.ts.map +1 -0
  328. package/index.js +115 -101
  329. package/mcp-apps/mcp-apps-api-client.d.ts +28 -0
  330. package/mcp-apps/mcp-apps-api-client.d.ts.map +1 -0
  331. package/mcp-apps/mcp-apps-api-client.js +18 -17
  332. package/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.d.ts +14 -0
  333. package/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.d.ts.map +1 -0
  334. package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.d.ts +29 -0
  335. package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.d.ts.map +1 -0
  336. package/mcp-apps/useMcpAppTools/useMcpAppTools.d.ts +22 -0
  337. package/mcp-apps/useMcpAppTools/useMcpAppTools.d.ts.map +1 -0
  338. package/mcp-apps/useMcpAppTools/useMcpAppTools.js +28 -31
  339. package/mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.d.ts +36 -0
  340. package/mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.d.ts.map +1 -0
  341. package/mcp-apps.d.ts +2 -256
  342. package/oauth/authorize-url.d.ts +16 -0
  343. package/oauth/authorize-url.d.ts.map +1 -0
  344. package/oauth/authorize-url.js +1 -1
  345. package/oauth/handshake.d.ts +30 -0
  346. package/oauth/handshake.d.ts.map +1 -0
  347. package/oauth/handshake.js +3 -10
  348. package/oauth/models.d.ts +81 -0
  349. package/oauth/models.d.ts.map +1 -0
  350. package/oauth/popup.d.ts +30 -0
  351. package/oauth/popup.d.ts.map +1 -0
  352. package/oauth/popup.js +19 -17
  353. package/oauth/toolset-id.d.ts +53 -0
  354. package/oauth/toolset-id.d.ts.map +1 -0
  355. package/oauth/types.d.ts +84 -0
  356. package/oauth/types.d.ts.map +1 -0
  357. package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.d.ts +54 -0
  358. package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.d.ts.map +1 -0
  359. package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.js +41 -42
  360. package/oauth/useToolsetLogin/useToolsetLogin.d.ts +79 -0
  361. package/oauth/useToolsetLogin/useToolsetLogin.d.ts.map +1 -0
  362. package/oauth/useToolsetLogin/useToolsetLogin.js +2 -1
  363. package/oauth.d.ts +2 -472
  364. package/offline-credentials/map-offline-credentials-response.d.ts +17 -0
  365. package/offline-credentials/map-offline-credentials-response.d.ts.map +1 -0
  366. package/offline-credentials/map-offline-credentials-response.js +15 -0
  367. package/offline-credentials/useOfflineCredentialsAuth/useOfflineCredentialsAuth.d.ts +58 -0
  368. package/offline-credentials/useOfflineCredentialsAuth/useOfflineCredentialsAuth.d.ts.map +1 -0
  369. package/offline-credentials/useOfflineCredentialsAuth/useOfflineCredentialsAuth.js +37 -0
  370. package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.d.ts +57 -0
  371. package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.d.ts.map +1 -0
  372. package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.js +34 -0
  373. package/offline-credentials/useOfflineCredentialsLogin/useOfflineCredentialsLogin.d.ts +28 -0
  374. package/offline-credentials/useOfflineCredentialsLogin/useOfflineCredentialsLogin.d.ts.map +1 -0
  375. package/offline-credentials/useOfflineCredentialsLogin/useOfflineCredentialsLogin.js +29 -0
  376. package/offline-credentials.d.ts +2 -0
  377. package/offline-credentials.js +5 -0
  378. package/package.json +31 -17
  379. package/prompt/export-prompt.d.ts +31 -0
  380. package/prompt/export-prompt.d.ts.map +1 -0
  381. package/prompt/prompt-resource.d.ts +30 -0
  382. package/prompt/prompt-resource.d.ts.map +1 -0
  383. package/prompt/prompt.d.ts +34 -0
  384. package/prompt/prompt.d.ts.map +1 -0
  385. package/prompt/usePromptsState/usePromptsState.d.ts +34 -0
  386. package/prompt/usePromptsState/usePromptsState.d.ts.map +1 -0
  387. package/scheduled-task/check-scheduled-task-auth-session-error.d.ts +27 -0
  388. package/scheduled-task/check-scheduled-task-auth-session-error.d.ts.map +1 -0
  389. package/scheduled-task/check-scheduled-task-auth-session-error.js +17 -0
  390. package/scheduled-task/scheduled-task-description.d.ts +38 -0
  391. package/scheduled-task/scheduled-task-description.d.ts.map +1 -0
  392. package/scheduled-task/scheduled-task-description.js +1 -1
  393. package/scheduled-task/scheduled-task-mapping.d.ts +19 -0
  394. package/scheduled-task/scheduled-task-mapping.d.ts.map +1 -0
  395. package/scheduled-task/scheduled-task-preparation.d.ts +19 -0
  396. package/scheduled-task/scheduled-task-preparation.d.ts.map +1 -0
  397. package/scheduled-task/scheduled-task-trigger.d.ts +26 -0
  398. package/scheduled-task/scheduled-task-trigger.d.ts.map +1 -0
  399. package/scheduled-task/scheduled-task-trigger.js +9 -8
  400. package/scheduled-task/scheduled-tasks-api-client.d.ts +67 -0
  401. package/scheduled-task/scheduled-tasks-api-client.d.ts.map +1 -0
  402. package/scheduled-task/use-scheduled-task-runs.d.ts +40 -0
  403. package/scheduled-task/use-scheduled-task-runs.d.ts.map +1 -0
  404. package/scheduled-task/use-scheduled-task-runs.js +67 -79
  405. package/scheduled-task/use-scheduled-tasks.d.ts +28 -0
  406. package/scheduled-task/use-scheduled-tasks.d.ts.map +1 -0
  407. package/scheduled-task/use-scheduled-tasks.js +1 -1
  408. package/scheduled-tasks.d.ts +2 -250
  409. package/scheduled-tasks.js +2 -1
  410. package/scroll-anchoring.d.ts +2 -50
  411. package/scroll-anchoring.js +1 -2
  412. package/shared/application-schema.d.ts +16 -0
  413. package/shared/application-schema.d.ts.map +1 -0
  414. package/shared/application-schema.js +3 -3
  415. package/shared/browser-timezone.d.ts +7 -0
  416. package/shared/browser-timezone.d.ts.map +1 -0
  417. package/shared/cron-day-of-month.d.ts +21 -0
  418. package/shared/cron-day-of-month.d.ts.map +1 -0
  419. package/shared/cron-day-of-month.js +10 -10
  420. package/shared/cron-weekday.d.ts +5 -0
  421. package/shared/cron-weekday.d.ts.map +1 -0
  422. package/shared/custom-apps.d.ts +7 -0
  423. package/shared/custom-apps.d.ts.map +1 -0
  424. package/shared/external-services.d.ts +16 -0
  425. package/shared/external-services.d.ts.map +1 -0
  426. package/shared/formatting.d.ts +5 -0
  427. package/shared/formatting.d.ts.map +1 -0
  428. package/shared/locale.d.ts +45 -0
  429. package/shared/locale.d.ts.map +1 -0
  430. package/shared/locale.js +2 -2
  431. package/shared/string-utils.d.ts +11 -0
  432. package/shared/string-utils.d.ts.map +1 -0
  433. package/shared/toolset-login-events.d.ts +15 -0
  434. package/shared/toolset-login-events.d.ts.map +1 -0
  435. package/sharing.d.ts +2 -65
  436. package/skill/skill-archive.d.ts +7 -0
  437. package/skill/skill-archive.d.ts.map +1 -0
  438. package/skill/skill-file-batch-validation.d.ts +70 -0
  439. package/skill/skill-file-batch-validation.d.ts.map +1 -0
  440. package/skill/skill-file-batch-validation.js +18 -17
  441. package/skill/skill-file-preview.d.ts +25 -0
  442. package/skill/skill-file-preview.d.ts.map +1 -0
  443. package/skill/skill-manifest.d.ts +28 -0
  444. package/skill/skill-manifest.d.ts.map +1 -0
  445. package/skill/skill-types.d.ts +46 -0
  446. package/skill/skill-types.d.ts.map +1 -0
  447. package/skill/skill-types.js +1 -1
  448. package/skill/skill.d.ts +160 -0
  449. package/skill/skill.d.ts.map +1 -0
  450. package/skill/skill.js +12 -15
  451. package/skill/useSkillArchiveImport/useSkillArchiveImport.d.ts +65 -0
  452. package/skill/useSkillArchiveImport/useSkillArchiveImport.d.ts.map +1 -0
  453. package/skill/useSkillArchiveImport/useSkillArchiveImport.js +1 -7
  454. package/skill/useSkillEditorLoad.d.ts +74 -0
  455. package/skill/useSkillEditorLoad.d.ts.map +1 -0
  456. package/skill/useSkillEditorSubmit.d.ts +125 -0
  457. package/skill/useSkillEditorSubmit.d.ts.map +1 -0
  458. package/skill/useSkillEditorSubmit.js +1 -5
  459. package/skill/useSkillFileActions.d.ts +60 -0
  460. package/skill/useSkillFileActions.d.ts.map +1 -0
  461. package/skill/useSkillFilePreview.d.ts +38 -0
  462. package/skill/useSkillFilePreview.d.ts.map +1 -0
  463. package/skill/useSkillsState/useSkillsState.d.ts +35 -0
  464. package/skill/useSkillsState/useSkillsState.d.ts.map +1 -0
  465. package/skill-editor.d.ts +2 -655
  466. package/skills-state.d.ts +2 -40
  467. package/skills-state.js +1 -2
  468. package/source-content.d.ts +2 -29
  469. package/source-content.js +1 -2
  470. package/usage/map-usage-data-to-dashboard.d.ts +39 -0
  471. package/usage/map-usage-data-to-dashboard.d.ts.map +1 -0
  472. package/usage/map-user-usage-to-model-limits.d.ts +62 -0
  473. package/usage/map-user-usage-to-model-limits.d.ts.map +1 -0
  474. package/usage/usage-banner-source.d.ts +24 -0
  475. package/usage/usage-banner-source.d.ts.map +1 -0
  476. package/usage/usage-banner-source.js +60 -0
  477. package/usage/usage-period.d.ts +7 -0
  478. package/usage/usage-period.d.ts.map +1 -0
  479. package/usage/usage-period.js +6 -0
  480. package/usage/usage-reset-time.d.ts +69 -0
  481. package/usage/usage-reset-time.d.ts.map +1 -0
  482. package/usage/usage-reset-time.js +72 -0
  483. package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts +56 -0
  484. package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts.map +1 -0
  485. package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.js +34 -0
  486. package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.d.ts +16 -0
  487. package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.d.ts.map +1 -0
  488. package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.js +14 -0
  489. package/usage/useUsageData/useUsageData.d.ts +28 -0
  490. package/usage/useUsageData/useUsageData.d.ts.map +1 -0
  491. package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts +58 -0
  492. package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts.map +1 -0
  493. package/usage/useUsageLimitBanner/useUsageLimitBanner.js +70 -0
  494. package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.d.ts +14 -0
  495. package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.d.ts.map +1 -0
  496. package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.js +19 -0
  497. package/usage-limits.d.ts +2 -0
  498. package/usage-limits.js +8 -0
  499. package/usage.d.ts +2 -125
  500. package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts +128 -0
  501. package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts.map +1 -0
  502. package/usePageFileDrag/usePageFileDrag.d.ts +16 -0
  503. package/usePageFileDrag/usePageFileDrag.d.ts.map +1 -0
  504. package/usePageFileDrag/usePageFileDrag.js +3 -3
  505. package/usePanelMaxWidth/usePanelMaxWidth.d.ts +6 -0
  506. package/usePanelMaxWidth/usePanelMaxWidth.d.ts.map +1 -0
  507. package/useShareLink/useShareLink.d.ts +23 -0
  508. package/useShareLink/useShareLink.d.ts.map +1 -0
  509. package/useShareLink/useShareLink.js +1 -0
  510. package/useShareRecipientsCount/useShareRecipientsCount.d.ts +36 -0
  511. package/useShareRecipientsCount/useShareRecipientsCount.d.ts.map +1 -0
  512. package/useToolsMenu/useToolsMenu.d.ts +31 -0
  513. package/useToolsMenu/useToolsMenu.d.ts.map +1 -0
  514. package/useViewportWidth/useViewportWidth.d.ts +3 -0
  515. package/useViewportWidth/useViewportWidth.d.ts.map +1 -0
  516. package/utils.d.ts +2 -404
  517. package/viewport-layout.d.ts +2 -27
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOfflineCredentialsGate.d.ts","sourceRoot":"","sources":["../../../src/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAI3E,oBAAY,4BAA4B;IACtC,iFAAiF;IACjF,QAAQ,aAAa;IACrB,6FAA6F;IAC7F,MAAM,WAAW;IACjB,uGAAuG;IACvG,SAAS,cAAc;IACvB,oFAAoF;IACpF,WAAW,gBAAgB;IAC3B,iEAAiE;IACjE,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,iCAAiC;IAChD,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB,qEAAqE;IACrE,qBAAqB,EAAE,MAAM,CAAC;IAC9B,oDAAoD;IACpD,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,8BAA8B;IAC7C,qEAAqE;IACrE,SAAS,EAAE,OAAO,CAAC;IACnB,yDAAyD;IACzD,SAAS,EAAE,OAAO,CAAC;IACnB,iGAAiG;IACjG,OAAO,CAAC,EAAE,iCAAiC,CAAC;CAC7C;AAED,MAAM,WAAW,+BAA+B;IAC9C,MAAM,EAAE,4BAA4B,CAAC;IACrC,iGAAiG;IACjG,OAAO,EAAE,iCAAiC,GAAG,SAAS,CAAC;IACvD,mLAAmL;IACnL,SAAS,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,OAAO,EAAE,MAAM,OAAO,CAAC,8BAA8B,GAAG,IAAI,CAAC,CAAC;CAC/D;AAED,+CAA+C;AAC/C,MAAM,WAAW,gCAAgC;IAC/C,+CAA+C;IAC/C,wBAAwB,EAAE,IAAI,CAC5B,qBAAqB,EACrB,uBAAuB,CACxB,CAAC;CACH;AAED;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,GAAI,+BAEvC,gCAAgC,KAAG,+BA6DrC,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { mapOfflineCredentialsResponse as e } from "../map-offline-credentials-response.js";
2
+ import { useCallback as t, useEffect as n, useRef as r, useState as i } from "react";
3
+ //#region src/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.ts
4
+ var a = /* @__PURE__ */ function(e) {
5
+ return e.Checking = "checking", e.Hidden = "hidden", e.Available = "available", e.Unavailable = "unavailable", e.Error = "error", e;
6
+ }({}), o = ({ offlineCredentialsClient: a }) => {
7
+ let [o, s] = i("checking"), [c, l] = i(void 0), [u, d] = i(!1), f = r(null), p = t(async () => {
8
+ f.current?.abort();
9
+ let t = new AbortController();
10
+ f.current = t, s("checking");
11
+ try {
12
+ let n = await a.getOfflineCredentials({ signal: t.signal });
13
+ if (t.signal.aborted) return null;
14
+ let { available: r, connected: i, connect: o } = e(n);
15
+ return s(i ? "hidden" : r ? "available" : "unavailable"), l(o), d(i), {
16
+ available: r,
17
+ connected: i,
18
+ connect: o
19
+ };
20
+ } catch {
21
+ return t.signal.aborted || (s("error"), l(void 0)), null;
22
+ }
23
+ }, [a]);
24
+ return n(() => (p(), () => {
25
+ f.current?.abort();
26
+ }), [p]), {
27
+ status: o,
28
+ connect: c,
29
+ connected: u,
30
+ refetch: p
31
+ };
32
+ };
33
+ //#endregion
34
+ export { a as OfflineCredentialsGateStatus, o as useOfflineCredentialsGate };
@@ -0,0 +1,28 @@
1
+ import { OfflineCredentialsConnectSettings, OfflineCredentialsStatusResult } from '../useOfflineCredentialsGate/useOfflineCredentialsGate';
2
+ export declare enum OfflineCredentialsLoginOutcomeType {
3
+ Success = "success",
4
+ Failure = "failure",
5
+ PopupBlocked = "popup-blocked",
6
+ Cancelled = "cancelled",
7
+ TimedOut = "timed-out"
8
+ }
9
+ export interface OfflineCredentialsLoginOutcome {
10
+ /** Which terminal branch the attempt resolved through. */
11
+ type: OfflineCredentialsLoginOutcomeType;
12
+ }
13
+ /** Options for `useOfflineCredentialsLogin`. */
14
+ export interface UseOfflineCredentialsLoginOptions {
15
+ /** Host route the OAuth popup posts its result back to, e.g. the app's toolset sign-in callback route. */
16
+ callbackPath: string;
17
+ }
18
+ /**
19
+ * Offline-credentials counterpart to `useToolsetLogin`/`useExternalServiceLogin`:
20
+ * reuses the exact same OAuth popup/`BroadcastChannel` handshake, but drives
21
+ * the `offline-credentials` BFF domain and treats a fresh
22
+ * status refetch as authoritative for reporting success. Callers that fetch
23
+ * settings after the click can pass a popup they already opened synchronously.
24
+ */
25
+ export declare const useOfflineCredentialsLogin: ({ callbackPath, }: UseOfflineCredentialsLoginOptions) => {
26
+ login: (connect: OfflineCredentialsConnectSettings, refetch: () => Promise<OfflineCredentialsStatusResult | null>, preparedPopup?: Window) => Promise<OfflineCredentialsLoginOutcome>;
27
+ };
28
+ //# sourceMappingURL=useOfflineCredentialsLogin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOfflineCredentialsLogin.d.ts","sourceRoot":"","sources":["../../../src/offline-credentials/useOfflineCredentialsLogin/useOfflineCredentialsLogin.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,iCAAiC,EACjC,8BAA8B,EAC/B,MAAM,wDAAwD,CAAC;AAsBhE,oBAAY,kCAAkC;IAC5C,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,YAAY,kBAAkB;IAC9B,SAAS,cAAc;IACvB,QAAQ,cAAc;CACvB;AAED,MAAM,WAAW,8BAA8B;IAC7C,0DAA0D;IAC1D,IAAI,EAAE,kCAAkC,CAAC;CAC1C;AAED,gDAAgD;AAChD,MAAM,WAAW,iCAAiC;IAChD,0GAA0G;IAC1G,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,GAAI,mBAExC,iCAAiC,KAAG;IACrC,KAAK,EAAE,CACL,OAAO,EAAE,iCAAiC,EAC1C,OAAO,EAAE,MAAM,OAAO,CAAC,8BAA8B,GAAG,IAAI,CAAC,EAC7D,aAAa,CAAC,EAAE,MAAM,KACnB,OAAO,CAAC,8BAA8B,CAAC,CAAC;CAoF9C,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { OAuthResourceKind as e, ToolsetAuthTypes as t, ToolsetCredentialsLevel as n, ToolsetOAuthInitiationResultType as r, ToolsetOAuthResultType as i, WithLogin as a } from "../../oauth/types.js";
2
+ import { waitForToolsetOAuthResult as o } from "../../oauth/handshake.js";
3
+ import { navigateToolsetOAuthPopup as s, openToolsetOAuthPopup as c } from "../../oauth/popup.js";
4
+ import { useCallback as l } from "react";
5
+ //#region src/offline-credentials/useOfflineCredentialsLogin/useOfflineCredentialsLogin.ts
6
+ var u = "offline-credentials", d = 3e5, f = /* @__PURE__ */ function(e) {
7
+ return e.Success = "success", e.Failure = "failure", e.PopupBlocked = "popup-blocked", e.Cancelled = "cancelled", e.TimedOut = "timed-out", e;
8
+ }({}), p = ({ callbackPath: f }) => ({ login: l(async (l, p, m) => {
9
+ let h = {
10
+ authenticationType: t.OAuth,
11
+ withLogin: a.WithConfig,
12
+ isLoggedIn: !1,
13
+ clientId: l.clientId,
14
+ authorizationEndpoint: l.authorizationEndpoint,
15
+ scopes: l.scopes
16
+ }, g = m ?? c();
17
+ if (!g) return { type: "popup-blocked" };
18
+ let _ = s(g, h, u, f, n.User, e.OfflineCredentials);
19
+ if (_.type !== r.Started) return { type: "failure" };
20
+ let v = Date.now(), y = await o(_.popup, _.flowId, {
21
+ toolsetId: u,
22
+ credentialsLevel: n.User,
23
+ callbackPath: f,
24
+ timeoutMs: d
25
+ }), b = Date.now() - v;
26
+ return (await p())?.connected ? { type: "success" } : y.type === i.Failure || y.type === i.Success ? { type: "failure" } : b >= 295e3 ? { type: "timed-out" } : { type: "cancelled" };
27
+ }, [f]) });
28
+ //#endregion
29
+ export { f as OfflineCredentialsLoginOutcomeType, p as useOfflineCredentialsLogin };
@@ -0,0 +1,2 @@
1
+ export * from './entry-points/offline-credentials.js'
2
+ export {}
@@ -0,0 +1,5 @@
1
+ import { mapOfflineCredentialsResponse as e, normalizeOfflineCredentialsConnectSettings as t } from "./offline-credentials/map-offline-credentials-response.js";
2
+ import { OfflineCredentialsGateStatus as n, useOfflineCredentialsGate as r } from "./offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.js";
3
+ import { OfflineCredentialsLoginOutcomeType as i, useOfflineCredentialsLogin as a } from "./offline-credentials/useOfflineCredentialsLogin/useOfflineCredentialsLogin.js";
4
+ import { OfflineCredentialsLogoutOutcomeType as o, useOfflineCredentialsAuth as s } from "./offline-credentials/useOfflineCredentialsAuth/useOfflineCredentialsAuth.js";
5
+ export { n as OfflineCredentialsGateStatus, i as OfflineCredentialsLoginOutcomeType, o as OfflineCredentialsLogoutOutcomeType, e as mapOfflineCredentialsResponse, t as normalizeOfflineCredentialsConnectSettings, s as useOfflineCredentialsAuth, r as useOfflineCredentialsGate, a as useOfflineCredentialsLogin };
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.16",
4
+ "version": "1.3.0-dev.160",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -79,6 +79,11 @@
79
79
  "import": "./oauth.js",
80
80
  "default": "./oauth.js"
81
81
  },
82
+ "./offline-credentials": {
83
+ "types": "./offline-credentials.d.ts",
84
+ "import": "./offline-credentials.js",
85
+ "default": "./offline-credentials.js"
86
+ },
82
87
  "./scheduled-tasks": {
83
88
  "types": "./scheduled-tasks.d.ts",
84
89
  "import": "./scheduled-tasks.js",
@@ -104,6 +109,11 @@
104
109
  "import": "./usage.js",
105
110
  "default": "./usage.js"
106
111
  },
112
+ "./usage-limits": {
113
+ "types": "./usage-limits.d.ts",
114
+ "import": "./usage-limits.js",
115
+ "default": "./usage-limits.js"
116
+ },
107
117
  "./mcp-apps": {
108
118
  "types": "./mcp-apps.d.ts",
109
119
  "import": "./mcp-apps.js",
@@ -111,7 +121,7 @@
111
121
  }
112
122
  },
113
123
  "dependencies": {
114
- "@epam/ai-dial-chat-api-client": "1.3.0-dev.16",
124
+ "@epam/ai-dial-chat-api-client": "1.3.0-dev.160",
115
125
  "dompurify": "3.4.16",
116
126
  "fflate": "^0.8.3",
117
127
  "lru-cache": "^10.4.3",
@@ -120,21 +130,22 @@
120
130
  },
121
131
  "peerDependencies": {
122
132
  "react": "^19.2.8",
123
- "@epam/ai-dial-attachment-canvas": "1.3.0-dev.16",
124
- "@epam/ai-dial-attachment-input": "1.3.0-dev.16",
125
- "@epam/ai-dial-catalog": "1.3.0-dev.16",
126
- "@epam/ai-dial-chat-overlay": "1.3.0-dev.16",
127
- "@epam/ai-dial-chat-shared": "1.3.0-dev.16",
128
- "@epam/ai-dial-mcp-apps": "1.3.0-dev.16",
129
- "@epam/ai-dial-publish-panel": "1.3.0-dev.16",
130
- "@epam/ai-dial-quotations": "1.3.0-dev.16",
131
- "@epam/ai-dial-react-file-manager": "^0.3.0",
132
- "@epam/ai-dial-scheduled-tasks": "1.3.0-dev.16",
133
- "@epam/ai-dial-share": "1.3.0-dev.16",
134
- "@epam/ai-dial-skill-editor": "1.3.0-dev.16",
135
- "@epam/ai-dial-source-panel": "1.3.0-dev.16",
136
- "@epam/ai-dial-ui-kit": "^0.15.1",
137
- "@epam/ai-dial-usage-dashboard": "1.3.0-dev.16",
133
+ "@epam/ai-dial-attachment-canvas": "1.3.0-dev.160",
134
+ "@epam/ai-dial-attachment-input": "1.3.0-dev.160",
135
+ "@epam/ai-dial-catalog": "1.3.0-dev.160",
136
+ "@epam/ai-dial-chat-overlay": "1.3.0-dev.160",
137
+ "@epam/ai-dial-chat-shared": "1.3.0-dev.160",
138
+ "@epam/ai-dial-conversation-input": "1.3.0-dev.160",
139
+ "@epam/ai-dial-mcp-apps": "1.3.0-dev.160",
140
+ "@epam/ai-dial-publish-panel": "1.3.0-dev.160",
141
+ "@epam/ai-dial-quotations": "1.3.0-dev.160",
142
+ "@epam/ai-dial-react-file-manager": "^0.4.0-dev.11",
143
+ "@epam/ai-dial-scheduled-tasks": "1.3.0-dev.160",
144
+ "@epam/ai-dial-share": "1.3.0-dev.160",
145
+ "@epam/ai-dial-skill-editor": "1.3.0-dev.160",
146
+ "@epam/ai-dial-source-panel": "1.3.0-dev.160",
147
+ "@epam/ai-dial-ui-kit": "^0.16.0-dev.33",
148
+ "@epam/ai-dial-usage-dashboard": "1.3.0-dev.160",
138
149
  "@modelcontextprotocol/sdk": "^1.32.1",
139
150
  "@epam/pdf-highlighter-kit": "^0.0.19",
140
151
  "@mcp-ui/client": "^7.1.1"
@@ -155,6 +166,9 @@
155
166
  "@epam/ai-dial-chat-shared": {
156
167
  "optional": true
157
168
  },
169
+ "@epam/ai-dial-conversation-input": {
170
+ "optional": true
171
+ },
158
172
  "@epam/ai-dial-mcp-apps": {
159
173
  "optional": true
160
174
  },
@@ -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"}
@@ -0,0 +1,30 @@
1
+ /** Which prompt namespace a catalog prompt item came from. */
2
+ export declare enum PromptSource {
3
+ /** The caller's own prompt, editable and deletable by them. */
4
+ Personal = "personal",
5
+ /** Shared with the caller by another user; permissions determine editability. */
6
+ SharedWithMe = "sharedWithMe",
7
+ /** Organisation-wide prompt; read-only for every user. */
8
+ Public = "public"
9
+ }
10
+ /** A prompt resource URL split into the bucket and the path within it. */
11
+ export interface ParsedPromptResourceUrl {
12
+ /** DIAL Core bucket name. */
13
+ bucket: string;
14
+ /** Path to the prompt within that bucket. */
15
+ path: string;
16
+ }
17
+ /**
18
+ * Splits a `prompts/{bucket}/{path}` resource URL into its parts, mirroring the
19
+ * backend's parser. Returns `null` for a different prefix, an empty bucket, or
20
+ * an empty path, so callers can treat "not a prompt resource id" as one case.
21
+ *
22
+ * `CatalogItem.id` for a prompt is always this full resource path — the read,
23
+ * update, delete, and move endpoints all take it unmodified. The one caller
24
+ * that still needs the bucket-relative sub-path on its own is the
25
+ * organisation (public) prompt read, whose endpoint kept its bucket-relative
26
+ * `path` argument because it only ever operates on the fixed `public`
27
+ * namespace.
28
+ */
29
+ export declare const parsePromptResourceUrl: (url: string) => ParsedPromptResourceUrl | null;
30
+ //# sourceMappingURL=prompt-resource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-resource.d.ts","sourceRoot":"","sources":["../../src/prompt/prompt-resource.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,oBAAY,YAAY;IACtB,+DAA+D;IAC/D,QAAQ,aAAa;IACrB,iFAAiF;IACjF,YAAY,iBAAiB;IAC7B,0DAA0D;IAC1D,MAAM,WAAW;CAClB;AAKD,0EAA0E;AAC1E,MAAM,WAAW,uBAAuB;IACtC,6BAA6B;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,GACjC,KAAK,MAAM,KACV,uBAAuB,GAAG,IAS5B,CAAC"}
@@ -0,0 +1,34 @@
1
+ /** Why a prompt-editor field failed client-side validation. */
2
+ export declare enum PromptFieldError {
3
+ /** The field is required and was left empty. */
4
+ Required = "required",
5
+ /** The value exceeds the backend's length limit for the field. */
6
+ TooLong = "tooLong",
7
+ /** The name contains characters the backend's allowlist rejects. */
8
+ InvalidName = "invalidName",
9
+ /** The backend reported an existing prompt or folder at the target path. */
10
+ Conflict = "conflict"
11
+ }
12
+ /** Maximum name length accepted by `CreatePromptDto.name`. */
13
+ export declare const PROMPT_NAME_MAX_LENGTH = 256;
14
+ /** Maximum description length accepted by `CreatePromptDto.description`. */
15
+ export declare const PROMPT_DESCRIPTION_MAX_LENGTH = 2000;
16
+ /** Maximum body length accepted by `CreatePromptDto.content`. */
17
+ export declare const PROMPT_CONTENT_MAX_LENGTH = 50000;
18
+ /** How close to a length limit the remaining-characters counter starts announcing. */
19
+ export declare const PROMPT_COUNTER_ANNOUNCE_THRESHOLD = 10;
20
+ /** Validates a prompt or folder name against the backend's own rules. */
21
+ export declare const validatePromptName: (name: string) => PromptFieldError | null;
22
+ /** Validates a prompt description; an empty description is valid. */
23
+ export declare const validatePromptDescription: (description: string) => PromptFieldError | null;
24
+ /** Validates a prompt body: required, and within the backend's length limit. */
25
+ export declare const validatePromptContent: (content: string) => PromptFieldError | null;
26
+ /**
27
+ * Returns the characters left before a limit, or `null` while still further
28
+ * away than the announce threshold — a counter that fires on every keystroke
29
+ * is unusable noise in a live region.
30
+ */
31
+ export declare const getRemainingCharacters: (value: string, maxLength: number) => number | null;
32
+ /** Joins a folder path and a prompt name into the DIAL prompt path used as an id. */
33
+ export declare const buildPromptPath: (folderId: string, name: string) => string;
34
+ //# sourceMappingURL=prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../src/prompt/prompt.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,oBAAY,gBAAgB;IAC1B,gDAAgD;IAChD,QAAQ,aAAa;IACrB,kEAAkE;IAClE,OAAO,YAAY;IACnB,oEAAoE;IACpE,WAAW,gBAAgB;IAC3B,4EAA4E;IAC5E,QAAQ,aAAa;CACtB;AAiBD,8DAA8D;AAC9D,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C,4EAA4E;AAC5E,eAAO,MAAM,6BAA6B,OAAO,CAAC;AAElD,iEAAiE;AACjE,eAAO,MAAM,yBAAyB,QAAQ,CAAC;AAE/C,sFAAsF;AACtF,eAAO,MAAM,iCAAiC,KAAK,CAAC;AAEpD,yEAAyE;AACzE,eAAO,MAAM,kBAAkB,GAAI,MAAM,MAAM,KAAG,gBAAgB,GAAG,IAMpE,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,yBAAyB,GACpC,aAAa,MAAM,KAClB,gBAAgB,GAAG,IAGZ,CAAC;AAEX,gFAAgF;AAChF,eAAO,MAAM,qBAAqB,GAChC,SAAS,MAAM,KACd,gBAAgB,GAAG,IAMrB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GACjC,OAAO,MAAM,EACb,WAAW,MAAM,KAChB,MAAM,GAAG,IAGX,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,EAAE,MAAM,MAAM,KAAG,MACxB,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { PromptFolderResponseDto, PromptListResponseDto, PromptResponseDto } from '@epam/ai-dial-chat-api-client';
2
+ /** Parameters for {@link usePromptsState}. */
3
+ export interface UsePromptsStateParams {
4
+ /** Fetches the aggregate prompt listing from the server. */
5
+ listPrompts: () => Promise<PromptListResponseDto>;
6
+ }
7
+ /** Result returned by {@link usePromptsState}. */
8
+ export interface UsePromptsStateResult {
9
+ /** The caller's own prompts. */
10
+ prompts: PromptResponseDto[];
11
+ /** Folders in the caller's own prompt namespace. */
12
+ folders: PromptFolderResponseDto[];
13
+ /** Prompts other users have shared with the caller. */
14
+ sharedWithMe: PromptResponseDto[];
15
+ /** Organisation-wide (public) prompts, read-only for every user. */
16
+ publicPrompts: PromptResponseDto[];
17
+ /** Folders in the organisation prompt namespace. */
18
+ publicFolders: PromptFolderResponseDto[];
19
+ /** True until the aggregate prompt listing has settled. */
20
+ isLoading: boolean;
21
+ /** Rejection reason of the most recent failed list request, or `null`. */
22
+ error: unknown;
23
+ /** Re-reads personal, shared-with-me, and organisation prompts. */
24
+ refetch: () => Promise<void>;
25
+ /** Compatibility alias for the aggregate refetch — same function reference as `refetch`. */
26
+ refetchPublicPrompts: () => Promise<void>;
27
+ }
28
+ /**
29
+ * Fetches all prompt namespaces (personal, shared, public) with a single
30
+ * aggregate request. Exposes `refetch` / `refetchPublicPrompts` for
31
+ * manual refresh. Does not import any app context, routing, or i18n.
32
+ */
33
+ export declare const usePromptsState: ({ listPrompts, }: UsePromptsStateParams) => UsePromptsStateResult;
34
+ //# sourceMappingURL=usePromptsState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePromptsState.d.ts","sourceRoot":"","sources":["../../../src/prompt/usePromptsState/usePromptsState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,qBAAqB,EACrB,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAGvC,8CAA8C;AAC9C,MAAM,WAAW,qBAAqB;IACpC,4DAA4D;IAC5D,WAAW,EAAE,MAAM,OAAO,CAAC,qBAAqB,CAAC,CAAC;CACnD;AAED,kDAAkD;AAClD,MAAM,WAAW,qBAAqB;IACpC,gCAAgC;IAChC,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,oDAAoD;IACpD,OAAO,EAAE,uBAAuB,EAAE,CAAC;IACnC,uDAAuD;IACvD,YAAY,EAAE,iBAAiB,EAAE,CAAC;IAClC,oEAAoE;IACpE,aAAa,EAAE,iBAAiB,EAAE,CAAC;IACnC,oDAAoD;IACpD,aAAa,EAAE,uBAAuB,EAAE,CAAC;IACzC,2DAA2D;IAC3D,SAAS,EAAE,OAAO,CAAC;IACnB,0EAA0E;IAC1E,KAAK,EAAE,OAAO,CAAC;IACf,mEAAmE;IACnE,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,4FAA4F;IAC5F,oBAAoB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3C;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,kBAE7B,qBAAqB,KAAG,qBA6E1B,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { GetOfflineCredentialsResponseDto } from '@epam/ai-dial-chat-api-client';
2
+ import { OfflineCredentialsConnectSettings } from '../offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate';
3
+ /** Result of the 403-triggered offline-credentials check on a failed scheduled-task submit. */
4
+ export interface ScheduledTaskAuthSessionCheckResult {
5
+ /** Whether the failure is attributed to the logged-out external Scheduler auth service. */
6
+ isAuthSessionError: boolean;
7
+ /**
8
+ * OAuth client settings from the same single check, present only when they
9
+ * are complete enough to drive a login — returned regardless of the
10
+ * connection state, so the caller decides from one check; the auto-login
11
+ * consumes them without a second client-settings request.
12
+ */
13
+ connect?: OfflineCredentialsConnectSettings;
14
+ }
15
+ /**
16
+ * Checks whether a failed scheduled-task submit should be attributed to the
17
+ * logged-out external Scheduler auth service, and returns the OAuth client
18
+ * settings from the same check when they can drive a login: exactly when the
19
+ * failure is a `403` and one fresh offline-credentials status check (the
20
+ * passed-in `getOfflineCredentials` operation) reports an available OAuth
21
+ * client with no stored grant. Every other outcome — a non-`403` failure, a
22
+ * still-connected user, an incomplete `connect` object, or a failed check —
23
+ * returns `isAuthSessionError: false` so the caller keeps its generic error
24
+ * handling. Issues at most one status request, and only on the `403` path.
25
+ */
26
+ export declare const checkScheduledTaskAuthSessionError: (error: unknown, getOfflineCredentials: () => Promise<GetOfflineCredentialsResponseDto>) => Promise<ScheduledTaskAuthSessionCheckResult>;
27
+ //# sourceMappingURL=check-scheduled-task-auth-session-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-scheduled-task-auth-session-error.d.ts","sourceRoot":"","sources":["../../src/scheduled-task/check-scheduled-task-auth-session-error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,+BAA+B,CAAC;AAMtF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,4EAA4E,CAAC;AAEpI,+FAA+F;AAC/F,MAAM,WAAW,mCAAmC;IAClD,2FAA2F;IAC3F,kBAAkB,EAAE,OAAO,CAAC;IAC5B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,iCAAiC,CAAC;CAC7C;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kCAAkC,GAC7C,OAAO,OAAO,EACd,uBAAuB,MAAM,OAAO,CAAC,gCAAgC,CAAC,KACrE,OAAO,CAAC,mCAAmC,CAgB7C,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { getApiErrorStatus as e } from "../api-error/api-error.js";
2
+ import { mapOfflineCredentialsResponse as t, normalizeOfflineCredentialsConnectSettings as n } from "../offline-credentials/map-offline-credentials-response.js";
3
+ //#region src/scheduled-task/check-scheduled-task-auth-session-error.ts
4
+ var r = async (r, i) => {
5
+ if (e(r) !== 403) return { isAuthSessionError: !1 };
6
+ try {
7
+ let e = await i(), { available: r, connected: a } = t(e);
8
+ return {
9
+ isAuthSessionError: r && !a,
10
+ connect: n(e.connect)
11
+ };
12
+ } catch {
13
+ return { isAuthSessionError: !1 };
14
+ }
15
+ };
16
+ //#endregion
17
+ export { r as checkScheduledTaskAuthSessionError };
@@ -0,0 +1,38 @@
1
+ import { ScheduleTriggerDto } from '@epam/ai-dial-chat-api-client';
2
+ /** Display categories are independent of task editability. */
3
+ export declare enum ScheduledTaskTriggerDescriptionKind {
4
+ OneTime = "oneTime",
5
+ Hourly = "hourly",
6
+ EveryNMinutes = "everyNMinutes",
7
+ Daily = "daily",
8
+ Weekly = "weekly",
9
+ Monthly = "monthly",
10
+ Custom = "custom",
11
+ Invalid = "invalid"
12
+ }
13
+ export interface ScheduledTaskTriggerDescription {
14
+ kind: ScheduledTaskTriggerDescriptionKind;
15
+ time?: string;
16
+ dayOfWeek?: string;
17
+ dayOfMonth?: string;
18
+ intervalMinutes?: number;
19
+ date?: Date;
20
+ expression?: string;
21
+ sourceTimezone: 'utc';
22
+ }
23
+ export interface ScheduledTaskTriggerDescriptionOptions {
24
+ /** Display timezone; defaults to UTC for backwards compatibility. */
25
+ timeZone?: string;
26
+ /** Date whose timezone offset is used. Defaults to now (the existing UTC-storage policy). */
27
+ referenceDate?: Date;
28
+ }
29
+ /**
30
+ * Describes the complete trigger without requiring unrelated task metadata.
31
+ * Unsupported constraints remain Custom, with the full source expression.
32
+ * Calendar-month shifts crossing month boundaries or days 29–31 remain
33
+ * Custom because a shifted monthly day is not equivalent around short months.
34
+ * The one exception is `day: 'last'` one day behind local time, which is
35
+ * exactly the local 1st.
36
+ */
37
+ export declare const describeScheduledTaskTrigger: (trigger: ScheduleTriggerDto, { timeZone, referenceDate, }?: ScheduledTaskTriggerDescriptionOptions) => ScheduledTaskTriggerDescription;
38
+ //# sourceMappingURL=scheduled-task-description.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scheduled-task-description.d.ts","sourceRoot":"","sources":["../../src/scheduled-task/scheduled-task-description.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAGxE,8DAA8D;AAC9D,oBAAY,mCAAmC;IAC7C,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,aAAa,kBAAkB;IAC/B,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,mCAAmC,CAAC;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,KAAK,CAAC;CACvB;AAED,MAAM,WAAW,sCAAsC;IACrD,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6FAA6F;IAC7F,aAAa,CAAC,EAAE,IAAI,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,GACvC,SAAS,kBAAkB,EAC3B,+BAGG,sCAA2C,KAC7C,+BA8JF,CAAC"}
@@ -33,7 +33,7 @@ var t = /* @__PURE__ */ function(e) {
33
33
  "minute",
34
34
  "day",
35
35
  "day_of_week"
36
- ].includes(e) && t !== "*" && !(e === "second" && t === "0")) return o();
36
+ ].includes(e) && t !== "*" && (e !== "second" || t !== "0")) return o();
37
37
  }
38
38
  let c = a.hour, l = a.minute, u = a.day === "*" ? void 0 : a.day, d = u === e, f = a.day_of_week === "*" ? void 0 : a.day_of_week, p = f ? [
39
39
  "monday",
@@ -0,0 +1,19 @@
1
+ import { ScheduledTaskCreateFormValues } from '@epam/ai-dial-scheduled-tasks';
2
+ /** Why a scheduled task DTO could not be mapped back to editable form values. */
3
+ export declare enum UnsupportedTriggerReason {
4
+ /** `trigger.cron.fields` uses a shape (extra keys, or both `day_of_week` and `day`) the editor's schedule controls cannot represent. */
5
+ UnsupportedCronShape = "unsupportedCronShape",
6
+ /** Neither or both of `trigger.date`/`trigger.cron` are set, so the schedule type cannot be determined. */
7
+ UnsupportedTriggerType = "unsupportedTriggerType",
8
+ /** The task is missing `model` or `prompt`, so it cannot be represented as a valid update payload. */
9
+ MissingRequiredFields = "missingRequiredFields"
10
+ }
11
+ /** Result of mapping a scheduled task DTO back to editable form values. */
12
+ export type ScheduledTaskDtoMappingResult = {
13
+ ok: true;
14
+ values: ScheduledTaskCreateFormValues;
15
+ } | {
16
+ ok: false;
17
+ reason: UnsupportedTriggerReason;
18
+ };
19
+ //# sourceMappingURL=scheduled-task-mapping.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scheduled-task-mapping.d.ts","sourceRoot":"","sources":["../../src/scheduled-task/scheduled-task-mapping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AAEnF,iFAAiF;AACjF,oBAAY,wBAAwB;IAClC,wIAAwI;IACxI,oBAAoB,yBAAyB;IAC7C,2GAA2G;IAC3G,sBAAsB,2BAA2B;IACjD,sGAAsG;IACtG,qBAAqB,0BAA0B;CAChD;AAED,2EAA2E;AAC3E,MAAM,MAAM,6BAA6B,GACrC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,6BAA6B,CAAA;CAAE,GACnD;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,wBAAwB,CAAA;CAAE,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { CreateScheduledTaskBodyDto, UpdateScheduledTaskBodyDto } from '@epam/ai-dial-chat-api-client';
2
+ import { ScheduledTaskCreateFormValues } from '@epam/ai-dial-scheduled-tasks';
3
+ import { ScheduledTaskValidationErrors, ScheduledTaskValidationOptions } from '../../libs/scheduled-tasks/validation';
4
+ /** A checked request preparation result that never serializes invalid values. */
5
+ export type ScheduledTaskPreparationResult<TBody> = {
6
+ ok: true;
7
+ body: TBody;
8
+ } | {
9
+ ok: false;
10
+ errors: ScheduledTaskValidationErrors;
11
+ };
12
+ /**
13
+ * Validates form values before creating a request body. Hosts translate the
14
+ * returned field codes and must not issue a write when `ok` is false.
15
+ */
16
+ export declare const prepareScheduledTaskCreateBody: (values: ScheduledTaskCreateFormValues, options: ScheduledTaskValidationOptions) => ScheduledTaskPreparationResult<CreateScheduledTaskBodyDto>;
17
+ /** Validates form values before preparing an update request body. */
18
+ export declare const prepareScheduledTaskUpdateBody: (values: ScheduledTaskCreateFormValues, options: ScheduledTaskValidationOptions) => ScheduledTaskPreparationResult<UpdateScheduledTaskBodyDto>;
19
+ //# sourceMappingURL=scheduled-task-preparation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scheduled-task-preparation.d.ts","sourceRoot":"","sources":["../../src/scheduled-task/scheduled-task-preparation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,0BAA0B,EAC3B,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AACnF,OAAO,EAEL,KAAK,6BAA6B,EAClC,KAAK,8BAA8B,EACpC,MAAM,0CAA0C,CAAC;AAMlD,iFAAiF;AACjF,MAAM,MAAM,8BAA8B,CAAC,KAAK,IAC5C;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,KAAK,CAAA;CAAE,GACzB;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,6BAA6B,CAAA;CAAE,CAAC;AAEzD;;;GAGG;AACH,eAAO,MAAM,8BAA8B,GACzC,QAAQ,6BAA6B,EACrC,SAAS,8BAA8B,KACtC,8BAA8B,CAAC,0BAA0B,CAK3D,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,8BAA8B,GACzC,QAAQ,6BAA6B,EACrC,SAAS,8BAA8B,KACtC,8BAA8B,CAAC,0BAA0B,CAK3D,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { CreateScheduledTaskBodyDto, ScheduledTaskDto, UpdateScheduledTaskBodyDto } from '@epam/ai-dial-chat-api-client';
2
+ import { ScheduledTaskCreateFormValues } from '@epam/ai-dial-scheduled-tasks';
3
+ import { ScheduledTaskDtoMappingResult } from './scheduled-task-mapping';
4
+ /**
5
+ * Maps validated create-form values to the `POST /api/v1/scheduled-tasks`
6
+ * request body, building `trigger.date` for a one-shot schedule or
7
+ * `trigger.cron.fields` for a recurring one. Assumes the caller has already
8
+ * validated required fields (name, model, prompt, and the active schedule
9
+ * section's fields) — this function does not re-validate.
10
+ */
11
+ export declare const mapFormValuesToCreateBody: (values: ScheduledTaskCreateFormValues) => CreateScheduledTaskBodyDto;
12
+ /**
13
+ * Maps a complete, validated edit draft to an update body. An unset skill
14
+ * emits null to remove the saved reference; hydrate from detail before editing.
15
+ */
16
+ export declare const mapFormValuesToUpdateBody: (values: ScheduledTaskCreateFormValues) => UpdateScheduledTaskBodyDto;
17
+ /**
18
+ * Attempts to map a {@link ScheduledTaskDto} back to editable
19
+ * {@link ScheduledTaskCreateFormValues}, inverting {@link buildCronFields}/
20
+ * {@link buildCronWindowBoundary}. Fails closed — returning a reason instead
21
+ * of a value — whenever the task's trigger or required fields cannot be
22
+ * represented losslessly by the editor, so an unsupported schedule is never
23
+ * silently coerced and re-submitted.
24
+ */
25
+ export declare const mapScheduledTaskDtoToFormValues: (dto: ScheduledTaskDto) => ScheduledTaskDtoMappingResult;
26
+ //# sourceMappingURL=scheduled-task-trigger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scheduled-task-trigger.d.ts","sourceRoot":"","sources":["../../src/scheduled-task/scheduled-task-trigger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,gBAAgB,EAEhB,0BAA0B,EAC3B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,6BAA6B,EAE9B,MAAM,+BAA+B,CAAC;AAWvC,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,0BAA0B,CAAC;AAiHlC;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,GACpC,QAAQ,6BAA6B,KACpC,0BAwCF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,GACpC,QAAQ,6BAA6B,KACpC,0BAGD,CAAC;AAqHH;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B,GAC1C,KAAK,gBAAgB,KACpB,6BAgGF,CAAC"}
@@ -4,7 +4,7 @@ import { getUtcDayShift as n, toLocalDayOfMonth as r, toUtcCronDayOfMonth as i }
4
4
  import { apSchedulerDayToJsDay as a, jsDayToApSchedulerDay as o } from "../shared/cron-weekday.js";
5
5
  import { ScheduledTaskRepeat as s } from "@epam/ai-dial-scheduled-tasks";
6
6
  //#region src/scheduled-task/scheduled-task-trigger.ts
7
- var c = new Set([
7
+ var c = /* @__PURE__ */ new Set([
8
8
  "hour",
9
9
  "minute",
10
10
  "day_of_week",
@@ -29,14 +29,15 @@ var c = new Set([
29
29
  minute: String(u.getUTCMinutes())
30
30
  };
31
31
  return d && (p.day_of_week = String(o(u.getUTCDay()))), f && (p.day = i(Number(e.dayOfMonth), n(u))), p;
32
- }, d = (e, t) => {
33
- let [n, r, i] = e.split("-").map(Number), a = new Date(n, r - 1, i);
34
- return t === "start" ? a.setHours(0, 0, 0, 0) : a.setHours(23, 59, 59, 999), a.toISOString();
32
+ }, d = (e, t, n) => {
33
+ if (e === s.Hourly) return new Date(t).toISOString();
34
+ let [r, i, a] = t.split("-").map(Number), o = new Date(r, i - 1, a);
35
+ return n === "start" ? o.setHours(0, 0, 0, 0) : o.setHours(23, 59, 59, 999), o.toISOString();
35
36
  }, f = (e) => {
36
37
  let t = e.repeat === s.OneTime ? { date: new Date(e.runAt ?? "").toISOString() } : { cron: {
37
38
  fields: u(e),
38
- ...e.startDate ? { startDate: d(e.startDate, "start") } : {},
39
- ...e.endDate ? { endDate: d(e.endDate, "end") } : {}
39
+ ...e.startDate ? { startDate: d(e.repeat, e.startDate, "start") } : {},
40
+ ...e.endDate ? { endDate: d(e.repeat, e.endDate, "end") } : {}
40
41
  } }, n = e.description?.trim();
41
42
  return {
42
43
  displayName: e.displayName.trim(),
@@ -125,8 +126,8 @@ var c = new Set([
125
126
  repeat: s.Hourly,
126
127
  time: l,
127
128
  minute: o.minute,
128
- ...r.startDate ? { startDate: h(r.startDate) } : {},
129
- ...r.endDate ? { endDate: h(r.endDate) } : {}
129
+ ...r.startDate ? { startDate: m(r.startDate) } : {},
130
+ ...r.endDate ? { endDate: m(r.endDate) } : {}
130
131
  }
131
132
  };
132
133
  let c = s.Daily;