@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,67 @@
1
+ import { CreateScheduledTaskBodyDto, CreatedScheduledTaskDto, ListScheduledTaskRunsResponseDto, ListScheduledTasksResponseDto, ListScheduledTasksSortEnum, ScheduledTaskDto, UpdateScheduledTaskBodyDto, UpdatedScheduledTaskDto } from '@epam/ai-dial-chat-api-client';
2
+ /** Narrow configured generated-client surface required by scheduler hooks. */
3
+ export interface ScheduledTasksConfiguredClient {
4
+ listScheduledTasks: (request: {
5
+ limit?: number;
6
+ offset?: number;
7
+ search?: string;
8
+ sort?: ListScheduledTasksSortEnum;
9
+ model?: string;
10
+ }, options?: RequestInit) => Promise<ListScheduledTasksResponseDto>;
11
+ listScheduledTaskRuns: (request: {
12
+ scheduleId: string;
13
+ limit?: number;
14
+ offset?: number;
15
+ }, options?: RequestInit) => Promise<ListScheduledTaskRunsResponseDto>;
16
+ createScheduledTask: (request: {
17
+ createScheduledTaskBodyDto: CreateScheduledTaskBodyDto;
18
+ }) => Promise<CreatedScheduledTaskDto>;
19
+ getScheduledTask: (request: {
20
+ scheduleId: string;
21
+ }) => Promise<ScheduledTaskDto>;
22
+ updateScheduledTask: (request: {
23
+ scheduleId: string;
24
+ updateScheduledTaskBodyDto: UpdateScheduledTaskBodyDto;
25
+ }) => Promise<UpdatedScheduledTaskDto>;
26
+ pauseScheduledTask: (request: {
27
+ scheduleId: string;
28
+ }) => Promise<ScheduledTaskDto>;
29
+ resumeScheduledTask: (request: {
30
+ scheduleId: string;
31
+ }) => Promise<ScheduledTaskDto>;
32
+ deleteScheduledTask: (request: {
33
+ scheduleId: string;
34
+ }) => Promise<void>;
35
+ }
36
+ /** App-agnostic request options accepted by the scheduler facade. */
37
+ export interface ScheduledTasksListRequest {
38
+ limit?: number;
39
+ offset?: number;
40
+ search?: string;
41
+ sort?: ListScheduledTasksSortEnum;
42
+ /** Only tasks that run against this model/application id, exactly as stored. */
43
+ model?: string;
44
+ signal?: AbortSignal;
45
+ }
46
+ export interface ScheduledTaskRunsListRequest {
47
+ scheduleId: string;
48
+ limit?: number;
49
+ offset?: number;
50
+ signal?: AbortSignal;
51
+ }
52
+ export interface ScheduledTasksApiClient {
53
+ listScheduledTasks: (request?: ScheduledTasksListRequest) => Promise<ListScheduledTasksResponseDto>;
54
+ listScheduledTaskRuns: (request: ScheduledTaskRunsListRequest) => Promise<ListScheduledTaskRunsResponseDto>;
55
+ createScheduledTask: (body: CreateScheduledTaskBodyDto) => Promise<CreatedScheduledTaskDto>;
56
+ getScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
57
+ updateScheduledTask: (scheduleId: string, body: UpdateScheduledTaskBodyDto) => Promise<UpdatedScheduledTaskDto>;
58
+ pauseScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
59
+ resumeScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
60
+ deleteScheduledTask: (scheduleId: string) => Promise<void>;
61
+ }
62
+ /**
63
+ * Composes scheduler operations over an already configured generated client.
64
+ * Authentication, base URL, CSRF, and retries remain host responsibilities.
65
+ */
66
+ export declare const createScheduledTasksApiClient: (client: ScheduledTasksConfiguredClient) => ScheduledTasksApiClient;
67
+ //# sourceMappingURL=scheduled-tasks-api-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scheduled-tasks-api-client.d.ts","sourceRoot":"","sources":["../../src/scheduled-task/scheduled-tasks-api-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,uBAAuB,EACvB,gCAAgC,EAChC,6BAA6B,EAC7B,0BAA0B,EAC1B,gBAAgB,EAChB,0BAA0B,EAC1B,uBAAuB,EACxB,MAAM,+BAA+B,CAAC;AAEvC,8EAA8E;AAC9E,MAAM,WAAW,8BAA8B;IAC7C,kBAAkB,EAAE,CAClB,OAAO,EAAE;QACP,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,0BAA0B,CAAC;QAClC,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,EACD,OAAO,CAAC,EAAE,WAAW,KAClB,OAAO,CAAC,6BAA6B,CAAC,CAAC;IAC5C,qBAAqB,EAAE,CACrB,OAAO,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,EAChE,OAAO,CAAC,EAAE,WAAW,KAClB,OAAO,CAAC,gCAAgC,CAAC,CAAC;IAC/C,mBAAmB,EAAE,CAAC,OAAO,EAAE;QAC7B,0BAA0B,EAAE,0BAA0B,CAAC;KACxD,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACvC,gBAAgB,EAAE,CAAC,OAAO,EAAE;QAC1B,UAAU,EAAE,MAAM,CAAC;KACpB,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAChC,mBAAmB,EAAE,CAAC,OAAO,EAAE;QAC7B,UAAU,EAAE,MAAM,CAAC;QACnB,0BAA0B,EAAE,0BAA0B,CAAC;KACxD,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACvC,kBAAkB,EAAE,CAAC,OAAO,EAAE;QAC5B,UAAU,EAAE,MAAM,CAAC;KACpB,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAChC,mBAAmB,EAAE,CAAC,OAAO,EAAE;QAC7B,UAAU,EAAE,MAAM,CAAC;KACpB,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAChC,mBAAmB,EAAE,CAAC,OAAO,EAAE;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACzE;AAED,qEAAqE;AACrE,MAAM,WAAW,yBAAyB;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,0BAA0B,CAAC;IAClC,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,WAAW,4BAA4B;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,WAAW,uBAAuB;IACtC,kBAAkB,EAAE,CAClB,OAAO,CAAC,EAAE,yBAAyB,KAChC,OAAO,CAAC,6BAA6B,CAAC,CAAC;IAC5C,qBAAqB,EAAE,CACrB,OAAO,EAAE,4BAA4B,KAClC,OAAO,CAAC,gCAAgC,CAAC,CAAC;IAC/C,mBAAmB,EAAE,CACnB,IAAI,EAAE,0BAA0B,KAC7B,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACtC,gBAAgB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACpE,mBAAmB,EAAE,CACnB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,0BAA0B,KAC7B,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACtC,kBAAkB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACtE,mBAAmB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACvE,mBAAmB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5D;AAWD;;;GAGG;AACH,eAAO,MAAM,6BAA6B,GACxC,QAAQ,8BAA8B,KACrC,uBAyBD,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { ScheduledTaskRunDto } from '@epam/ai-dial-chat-api-client';
2
+ import { ScheduledTasksApiClient } from './scheduled-tasks-api-client';
3
+ export interface UseScheduledTaskRunsOptions {
4
+ scheduleId: string;
5
+ enabled?: boolean;
6
+ pageSize?: number;
7
+ /**
8
+ * The task's next scheduled run time (ISO string), when known. Drives the
9
+ * one-shot background refresh described on {@link useScheduledTaskRuns}.
10
+ * The caller already holds the task DTO — this hook never fetches it.
11
+ */
12
+ nextRunTime?: string | null;
13
+ /**
14
+ * Keeps the 15s background poll running even when no loaded run is
15
+ * `InProgress`. For a run the caller started itself and tracks outside this
16
+ * hook, which the first poll then merges into `items`.
17
+ */
18
+ pollWhileActive?: boolean;
19
+ }
20
+ /**
21
+ * Merges a freshly-fetched page 0 into the currently-loaded run list: an
22
+ * already-known id is replaced in place at its existing array position, an
23
+ * unseen id is prepended (upstream order is `created_at desc`, so it is the
24
+ * newest), and an id absent from `incoming` is left untouched — a background
25
+ * refresh never removes a loaded run.
26
+ */
27
+ export declare const mergeRunsById: (current: ScheduledTaskRunDto[], incoming: ScheduledTaskRunDto[]) => ScheduledTaskRunDto[];
28
+ /** Shared, cancellation-safe pagination and background refresh for one schedule's run history. */
29
+ export declare const useScheduledTaskRuns: (client: ScheduledTasksApiClient, { scheduleId, enabled, pageSize, nextRunTime, pollWhileActive, }: UseScheduledTaskRunsOptions) => {
30
+ items: ScheduledTaskRunDto[];
31
+ isLoading: boolean;
32
+ isLoadingMore: boolean;
33
+ initialError: Error | null;
34
+ loadMoreError: Error | null;
35
+ hasMore: boolean;
36
+ loadMore: () => void;
37
+ retryLoadMore: () => void;
38
+ refetch: () => void;
39
+ };
40
+ //# sourceMappingURL=use-scheduled-task-runs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-scheduled-task-runs.d.ts","sourceRoot":"","sources":["../../src/scheduled-task/use-scheduled-task-runs.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAE5E,MAAM,WAAW,2BAA2B;IAC1C,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAoCD;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,GACxB,SAAS,mBAAmB,EAAE,EAC9B,UAAU,mBAAmB,EAAE,KAC9B,mBAAmB,EAMrB,CAAC;AA0BF,kGAAkG;AAClG,eAAO,MAAM,oBAAoB,GAC/B,QAAQ,uBAAuB,EAC/B,kEAMG,2BAA2B;;;;;;;;;;CA4U/B,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { useCallback as e, useEffect as t, useRef as n, useState as r } from "react";
2
2
  import { ScheduledTaskRunDtoStatusEnum as i } from "@epam/ai-dial-chat-api-client";
3
3
  //#region src/scheduled-task/use-scheduled-task-runs.ts
4
- var a = 15e3, o = 20, s = 5e3, c = 2147483647, l = (e, t) => {
4
+ var a = 15e3, o = 48, s = 5e3, c = 2147483647, l = (e, t) => {
5
5
  if (e <= c) {
6
6
  let n = setTimeout(t, Math.max(e, 0));
7
7
  return () => clearTimeout(n);
@@ -20,18 +20,18 @@ var a = 15e3, o = 20, s = 5e3, c = 2147483647, l = (e, t) => {
20
20
  let t = n.get(e.id);
21
21
  return !t || JSON.stringify(t) !== JSON.stringify(e);
22
22
  });
23
- }, f = (c, { scheduleId: f, enabled: p = !0, pageSize: m = 10, nextRunTime: h }) => {
24
- let [g, _] = r([]), [v, y] = r(p), [b, x] = r(!1), [S, C] = r(null), [w, T] = r(null), [E, D] = r(!1), [O, k] = r(0), A = n(0), j = n(0), M = n(!1), N = n(null), P = n(g), F = n(v), I = n(b), L = n(null), R = n(0), z = n(null), B = n(!1);
25
- P.current = g, F.current = v, I.current = b;
26
- let V = g.some((e) => e.status === i.InProgress);
23
+ }, f = (c, { scheduleId: f, enabled: p = !0, pageSize: m = 10, nextRunTime: h, pollWhileActive: g = !1 }) => {
24
+ let [_, v] = r([]), [y, b] = r(p), [x, S] = r(!1), [C, w] = r(null), [T, E] = r(null), [D, O] = r(!1), [k, A] = r(0), j = n(0), M = n(0), N = n(!1), P = n(null), F = n(_), I = n(y), L = n(x), R = n(null), z = n(0), B = n(null), V = n(!1);
25
+ F.current = _, I.current = y, L.current = x;
26
+ let H = g || _.some((e) => e.status === i.InProgress);
27
27
  t(() => {
28
- let e = ++A.current, t = new AbortController();
29
- N.current?.abort(), N.current = null, L.current?.abort(), L.current = null, M.current = !1, R.current = 0, z.current = null, B.current = !1, x(!1), C(null), T(null), _([]), D(!1), j.current = 0;
28
+ let e = ++j.current, t = new AbortController();
29
+ P.current?.abort(), P.current = null, R.current?.abort(), R.current = null, N.current = !1, z.current = 0, B.current = null, V.current = !1, S(!1), w(null), E(null), v([]), O(!1), M.current = 0;
30
30
  let n = () => {
31
- ++A.current, t.abort(), N.current?.abort(), N.current = null, L.current?.abort(), L.current = null;
31
+ ++j.current, t.abort(), P.current?.abort(), P.current = null, R.current?.abort(), R.current = null;
32
32
  };
33
- return !p || !f ? (y(!1), _([]), D(!1), n) : ((async () => {
34
- y(!0);
33
+ return !p || !f ? (b(!1), v([]), O(!1), n) : ((async () => {
34
+ b(!0);
35
35
  try {
36
36
  let n = await c.listScheduledTaskRuns({
37
37
  scheduleId: f,
@@ -39,29 +39,29 @@ var a = 15e3, o = 20, s = 5e3, c = 2147483647, l = (e, t) => {
39
39
  offset: 0,
40
40
  signal: t.signal
41
41
  });
42
- if (A.current !== e) return;
43
- _(n.items), j.current = n.items.length, D(n.next != null || (n.count == null ? n.items.length === m : n.items.length < n.count));
42
+ if (j.current !== e) return;
43
+ v(n.items), M.current = n.items.length, O(n.next != null || (n.count == null ? n.items.length === m : n.items.length < n.count));
44
44
  } catch (t) {
45
- A.current === e && C(t instanceof Error ? t : /* @__PURE__ */ Error("Failed to load scheduled task runs"));
45
+ j.current === e && w(t instanceof Error ? t : /* @__PURE__ */ Error("Failed to load scheduled task runs"));
46
46
  } finally {
47
- A.current === e && y(!1);
47
+ j.current === e && b(!1);
48
48
  }
49
49
  })(), n);
50
50
  }, [
51
51
  c,
52
52
  p,
53
53
  m,
54
- O,
54
+ k,
55
55
  f
56
56
  ]);
57
- let H = e(() => {
58
- if (!p || !f || !E || v || M.current) return;
59
- M.current = !0;
57
+ let U = e(() => {
58
+ if (!p || !f || !D || y || N.current) return;
59
+ N.current = !0;
60
60
  let e = new AbortController();
61
- N.current = e;
62
- let t = A.current, n = j.current;
61
+ P.current = e;
62
+ let t = j.current, n = M.current;
63
63
  (async () => {
64
- x(!0), T(null);
64
+ S(!0), E(null);
65
65
  try {
66
66
  let r = await c.listScheduledTaskRuns({
67
67
  scheduleId: f,
@@ -69,28 +69,28 @@ var a = 15e3, o = 20, s = 5e3, c = 2147483647, l = (e, t) => {
69
69
  offset: n,
70
70
  signal: e.signal
71
71
  });
72
- if (A.current !== t) return;
73
- _((e) => {
72
+ if (j.current !== t) return;
73
+ v((e) => {
74
74
  let t = new Set(e.map(({ id: e }) => e));
75
- return [...e, ...r.items.filter(({ id: e }) => t.has(e) ? !1 : (t.add(e), !0))];
76
- }), j.current = n + r.items.length, D(r.next != null || (r.count == null ? r.items.length === m : n + r.items.length < r.count));
75
+ return [...e, ...r.items.filter(({ id: e }) => !t.has(e) && (t.add(e), !0))];
76
+ }), M.current = n + r.items.length, O(r.next != null || (r.count == null ? r.items.length === m : n + r.items.length < r.count));
77
77
  } catch (e) {
78
- A.current === t && T(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load more scheduled task runs"));
78
+ j.current === t && E(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load more scheduled task runs"));
79
79
  } finally {
80
- A.current === t && (x(!1), M.current = !1, N.current = null);
80
+ j.current === t && (S(!1), N.current = !1, P.current = null);
81
81
  }
82
82
  })();
83
83
  }, [
84
84
  c,
85
85
  p,
86
- E,
87
- v,
86
+ D,
87
+ y,
88
88
  m,
89
89
  f
90
- ]), U = e(async () => {
91
- if (F.current || I.current) return "skipped";
92
- let e = A.current, t = new AbortController();
93
- L.current?.abort(), L.current = t;
90
+ ]), W = e(async () => {
91
+ if (I.current || L.current) return "skipped";
92
+ let e = j.current, t = new AbortController();
93
+ R.current?.abort(), R.current = t;
94
94
  try {
95
95
  let n = await c.listScheduledTaskRuns({
96
96
  scheduleId: f,
@@ -98,41 +98,29 @@ var a = 15e3, o = 20, s = 5e3, c = 2147483647, l = (e, t) => {
98
98
  offset: 0,
99
99
  signal: t.signal
100
100
  });
101
- if (A.current !== e || F.current || I.current) return "skipped";
102
- let r = P.current, i = u(r, n.items), a = d(r, i);
103
- return a && (P.current = i, _(i)), a ? "changed" : "unchanged";
101
+ if (j.current !== e || I.current || L.current) return "skipped";
102
+ let r = F.current, i = u(r, n.items), a = d(r, i);
103
+ return a && (F.current = i, v(i)), a ? "changed" : "unchanged";
104
104
  } catch {
105
105
  return "error";
106
106
  } finally {
107
- L.current === t && (L.current = null);
107
+ R.current === t && (R.current = null);
108
108
  }
109
109
  }, [
110
110
  c,
111
111
  f,
112
112
  m
113
- ]), W = e(() => {
114
- if (document.visibilityState !== "visible") {
115
- B.current = !0;
116
- return;
117
- }
118
- U();
119
- }, [U]);
113
+ ]), G = e(() => {
114
+ document.visibilityState === "visible" ? W() : V.current = !0;
115
+ }, [W]);
120
116
  return t(() => {
121
- if (!p || !f || !V) return;
122
- R.current = 0;
117
+ if (!p || !f || !H) return;
118
+ z.current = 0;
123
119
  let e = setInterval(() => {
124
- if (document.visibilityState !== "visible") {
125
- B.current = !0;
126
- return;
127
- }
128
- (async () => {
129
- let t = await U();
130
- if (t === "changed") {
131
- R.current = 0;
132
- return;
133
- }
134
- (t === "unchanged" || t === "error") && (R.current += 1, R.current >= o && e !== null && (clearInterval(e), e = null));
135
- })();
120
+ document.visibilityState === "visible" ? (async () => {
121
+ let t = await W();
122
+ t === "changed" ? z.current = 0 : (t === "unchanged" || t === "error") && (z.current += 1, z.current >= o && e !== null && (clearInterval(e), e = null));
123
+ })() : V.current = !0;
136
124
  }, a);
137
125
  return () => {
138
126
  e !== null && clearInterval(e);
@@ -140,24 +128,24 @@ var a = 15e3, o = 20, s = 5e3, c = 2147483647, l = (e, t) => {
140
128
  }, [
141
129
  p,
142
130
  f,
143
- V,
144
- U
131
+ H,
132
+ W
145
133
  ]), t(() => {
146
134
  if (!p || !f || !h) return;
147
135
  let e = new Date(h).getTime();
148
136
  if (!(Number.isNaN(e) || e <= Date.now())) return l(e - Date.now() + s, () => {
149
- z.current = h, W();
137
+ B.current = h, G();
150
138
  });
151
139
  }, [
152
140
  p,
153
141
  f,
154
142
  h,
155
- W
143
+ G
156
144
  ]), t(() => {
157
145
  if (!p || !f) return;
158
146
  let e = () => {
159
- document.visibilityState !== "visible" || !B.current || (async () => {
160
- await U() !== "skipped" && (B.current = !1);
147
+ document.visibilityState === "visible" && V.current && (async () => {
148
+ await W() !== "skipped" && (V.current = !1);
161
149
  })();
162
150
  };
163
151
  return document.addEventListener("visibilitychange", e), () => {
@@ -166,28 +154,28 @@ var a = 15e3, o = 20, s = 5e3, c = 2147483647, l = (e, t) => {
166
154
  }, [
167
155
  p,
168
156
  f,
169
- U
157
+ W
170
158
  ]), t(() => {
171
- if (!p || !f || !h || v || b) return;
159
+ if (!p || !f || !h || y || x) return;
172
160
  let e = new Date(h).getTime();
173
- Number.isNaN(e) || e > Date.now() || z.current !== h && (z.current = h, W());
161
+ Number.isNaN(e) || e > Date.now() || B.current !== h && (B.current = h, G());
174
162
  }, [
175
163
  p,
176
164
  f,
177
165
  h,
178
- v,
179
- b,
180
- W
166
+ y,
167
+ x,
168
+ G
181
169
  ]), {
182
- items: g,
183
- isLoading: v,
184
- isLoadingMore: b,
185
- initialError: S,
186
- loadMoreError: w,
187
- hasMore: E,
188
- loadMore: H,
189
- retryLoadMore: H,
190
- refetch: e(() => k((e) => e + 1), [])
170
+ items: _,
171
+ isLoading: y,
172
+ isLoadingMore: x,
173
+ initialError: C,
174
+ loadMoreError: T,
175
+ hasMore: D,
176
+ loadMore: U,
177
+ retryLoadMore: U,
178
+ refetch: e(() => A((e) => e + 1), [])
191
179
  };
192
180
  };
193
181
  //#endregion
@@ -0,0 +1,28 @@
1
+ import { ListScheduledTasksSortEnum, ScheduledTaskDto } from '@epam/ai-dial-chat-api-client';
2
+ import { ScheduledTasksApiClient } from './scheduled-tasks-api-client';
3
+ export interface UseScheduledTasksOptions {
4
+ enabled?: boolean;
5
+ pageSize?: number;
6
+ debounceMs?: number;
7
+ initialSearch?: string;
8
+ initialSort?: ListScheduledTasksSortEnum;
9
+ /** Restricts the list to tasks of one model/application; changing it reloads from the first page. */
10
+ model?: string;
11
+ }
12
+ /** Shared scheduler-list lifecycle with generation-scoped stale-response guards. */
13
+ export declare const useScheduledTasks: (client: ScheduledTasksApiClient, { enabled, pageSize, debounceMs, initialSearch, initialSort, model, }?: UseScheduledTasksOptions) => {
14
+ items: ScheduledTaskDto[];
15
+ searchQuery: string;
16
+ setSearchQuery: import('react').Dispatch<import('react').SetStateAction<string>>;
17
+ sortKey: "firstToRun" | "lastToRun" | "newest" | "nameAZ";
18
+ setSortKey: import('react').Dispatch<import('react').SetStateAction<"firstToRun" | "lastToRun" | "newest" | "nameAZ">>;
19
+ isLoading: boolean;
20
+ isLoadingMore: boolean;
21
+ initialError: Error | null;
22
+ loadMoreError: Error | null;
23
+ hasMore: boolean;
24
+ loadMore: () => void;
25
+ retryLoadMore: () => void;
26
+ refetch: () => void;
27
+ };
28
+ //# sourceMappingURL=use-scheduled-tasks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-scheduled-tasks.d.ts","sourceRoot":"","sources":["../../src/scheduled-task/use-scheduled-tasks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,gBAAgB,EACjB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAE5E,MAAM,WAAW,wBAAwB;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,0BAA0B,CAAC;IACzC,qGAAqG;IACrG,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,oFAAoF;AACpF,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,uBAAuB,EAC/B,wEAOG,wBAA6B;;;;;;;;;;;;;;CAuJjC,CAAC"}
@@ -59,7 +59,7 @@ var i = (i, { enabled: a = !0, pageSize: o = 20, debounceMs: s = 300, initialSea
59
59
  if (k.current !== t) return;
60
60
  f((e) => {
61
61
  let t = new Set(e.map(({ id: e }) => e));
62
- return [...e, ...r.items.filter(({ id: e }) => t.has(e) ? !1 : (t.add(e), !0))];
62
+ return [...e, ...r.items.filter(({ id: e }) => !t.has(e) && (t.add(e), !0))];
63
63
  }), A.current = n + r.items.length, E(r.next != null);
64
64
  } catch (e) {
65
65
  k.current === t && w(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load more scheduled tasks"));
@@ -1,250 +1,2 @@
1
- import { CreatedScheduledTaskDto } from '@epam/ai-dial-chat-api-client';
2
- import { CreateScheduledTaskBodyDto } from '@epam/ai-dial-chat-api-client';
3
- import { Dispatch } from 'react';
4
- import { ListScheduledTaskRunsResponseDto } from '@epam/ai-dial-chat-api-client';
5
- import { ListScheduledTasksResponseDto } from '@epam/ai-dial-chat-api-client';
6
- import { ListScheduledTasksSortEnum } from '@epam/ai-dial-chat-api-client';
7
- import { ScheduledTaskCreateFormValues } from '@epam/ai-dial-scheduled-tasks';
8
- import { ScheduledTaskDto } from '@epam/ai-dial-chat-api-client';
9
- import { ScheduledTaskRunDto } from '@epam/ai-dial-chat-api-client';
10
- import { ScheduledTaskValidationErrors } from '../../libs/scheduled-tasks/validation';
11
- import { ScheduledTaskValidationOptions } from '../../libs/scheduled-tasks/validation';
12
- import { ScheduleTriggerDto } from '@epam/ai-dial-chat-api-client';
13
- import { SetStateAction } from 'react';
14
- import { UpdatedScheduledTaskDto } from '@epam/ai-dial-chat-api-client';
15
- import { UpdateScheduledTaskBodyDto } from '@epam/ai-dial-chat-api-client';
16
-
17
- /**
18
- * Composes scheduler operations over an already configured generated client.
19
- * Authentication, base URL, CSRF, and retries remain host responsibilities.
20
- */
21
- export declare const createScheduledTasksApiClient: (client: ScheduledTasksConfiguredClient) => ScheduledTasksApiClient;
22
-
23
- /**
24
- * Describes the complete trigger without requiring unrelated task metadata.
25
- * Unsupported constraints remain Custom, with the full source expression.
26
- * Calendar-month shifts crossing month boundaries or days 29–31 remain
27
- * Custom because a shifted monthly day is not equivalent around short months.
28
- * The one exception is `day: 'last'` one day behind local time, which is
29
- * exactly the local 1st.
30
- */
31
- export declare const describeScheduledTaskTrigger: (trigger: ScheduleTriggerDto, { timeZone, referenceDate, }?: ScheduledTaskTriggerDescriptionOptions) => ScheduledTaskTriggerDescription;
32
-
33
- /**
34
- * Maps validated create-form values to the `POST /api/v1/scheduled-tasks`
35
- * request body, building `trigger.date` for a one-shot schedule or
36
- * `trigger.cron.fields` for a recurring one. Assumes the caller has already
37
- * validated required fields (name, model, prompt, and the active schedule
38
- * section's fields) — this function does not re-validate.
39
- */
40
- export declare const mapFormValuesToCreateBody: (values: ScheduledTaskCreateFormValues) => CreateScheduledTaskBodyDto;
41
-
42
- /**
43
- * Maps a complete, validated edit draft to an update body. An unset skill
44
- * emits null to remove the saved reference; hydrate from detail before editing.
45
- */
46
- export declare const mapFormValuesToUpdateBody: (values: ScheduledTaskCreateFormValues) => UpdateScheduledTaskBodyDto;
47
-
48
- /**
49
- * Attempts to map a {@link ScheduledTaskDto} back to editable
50
- * {@link ScheduledTaskCreateFormValues}, inverting {@link buildCronFields}/
51
- * {@link buildCronWindowBoundary}. Fails closed — returning a reason instead
52
- * of a value — whenever the task's trigger or required fields cannot be
53
- * represented losslessly by the editor, so an unsupported schedule is never
54
- * silently coerced and re-submitted.
55
- */
56
- export declare const mapScheduledTaskDtoToFormValues: (dto: ScheduledTaskDto) => ScheduledTaskDtoMappingResult;
57
-
58
- /**
59
- * Merges a freshly-fetched page 0 into the currently-loaded run list: an
60
- * already-known id is replaced in place at its existing array position, an
61
- * unseen id is prepended (upstream order is `created_at desc`, so it is the
62
- * newest), and an id absent from `incoming` is left untouched — a background
63
- * refresh never removes a loaded run.
64
- */
65
- export declare const mergeRunsById: (current: ScheduledTaskRunDto[], incoming: ScheduledTaskRunDto[]) => ScheduledTaskRunDto[];
66
-
67
- /**
68
- * Validates form values before creating a request body. Hosts translate the
69
- * returned field codes and must not issue a write when `ok` is false.
70
- */
71
- export declare const prepareScheduledTaskCreateBody: (values: ScheduledTaskCreateFormValues, options: ScheduledTaskValidationOptions) => ScheduledTaskPreparationResult<CreateScheduledTaskBodyDto>;
72
-
73
- /** Validates form values before preparing an update request body. */
74
- export declare const prepareScheduledTaskUpdateBody: (values: ScheduledTaskCreateFormValues, options: ScheduledTaskValidationOptions) => ScheduledTaskPreparationResult<UpdateScheduledTaskBodyDto>;
75
-
76
- /** Result of mapping a scheduled task DTO back to editable form values. */
77
- export declare type ScheduledTaskDtoMappingResult = {
78
- ok: true;
79
- values: ScheduledTaskCreateFormValues;
80
- } | {
81
- ok: false;
82
- reason: UnsupportedTriggerReason;
83
- };
84
-
85
- /** A checked request preparation result that never serializes invalid values. */
86
- export declare type ScheduledTaskPreparationResult<TBody> = {
87
- ok: true;
88
- body: TBody;
89
- } | {
90
- ok: false;
91
- errors: ScheduledTaskValidationErrors;
92
- };
93
-
94
- export declare interface ScheduledTaskRunsListRequest {
95
- scheduleId: string;
96
- limit?: number;
97
- offset?: number;
98
- signal?: AbortSignal;
99
- }
100
-
101
- export declare interface ScheduledTasksApiClient {
102
- listScheduledTasks: (request?: ScheduledTasksListRequest) => Promise<ListScheduledTasksResponseDto>;
103
- listScheduledTaskRuns: (request: ScheduledTaskRunsListRequest) => Promise<ListScheduledTaskRunsResponseDto>;
104
- createScheduledTask: (body: CreateScheduledTaskBodyDto) => Promise<CreatedScheduledTaskDto>;
105
- getScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
106
- updateScheduledTask: (scheduleId: string, body: UpdateScheduledTaskBodyDto) => Promise<UpdatedScheduledTaskDto>;
107
- pauseScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
108
- resumeScheduledTask: (scheduleId: string) => Promise<ScheduledTaskDto>;
109
- deleteScheduledTask: (scheduleId: string) => Promise<void>;
110
- }
111
-
112
- /** Narrow configured generated-client surface required by scheduler hooks. */
113
- export declare interface ScheduledTasksConfiguredClient {
114
- listScheduledTasks: (request: {
115
- limit?: number;
116
- offset?: number;
117
- search?: string;
118
- sort?: ListScheduledTasksSortEnum;
119
- model?: string;
120
- }, options?: RequestInit) => Promise<ListScheduledTasksResponseDto>;
121
- listScheduledTaskRuns: (request: {
122
- scheduleId: string;
123
- limit?: number;
124
- offset?: number;
125
- }, options?: RequestInit) => Promise<ListScheduledTaskRunsResponseDto>;
126
- createScheduledTask: (request: {
127
- createScheduledTaskBodyDto: CreateScheduledTaskBodyDto;
128
- }) => Promise<CreatedScheduledTaskDto>;
129
- getScheduledTask: (request: {
130
- scheduleId: string;
131
- }) => Promise<ScheduledTaskDto>;
132
- updateScheduledTask: (request: {
133
- scheduleId: string;
134
- updateScheduledTaskBodyDto: UpdateScheduledTaskBodyDto;
135
- }) => Promise<UpdatedScheduledTaskDto>;
136
- pauseScheduledTask: (request: {
137
- scheduleId: string;
138
- }) => Promise<ScheduledTaskDto>;
139
- resumeScheduledTask: (request: {
140
- scheduleId: string;
141
- }) => Promise<ScheduledTaskDto>;
142
- deleteScheduledTask: (request: {
143
- scheduleId: string;
144
- }) => Promise<void>;
145
- }
146
-
147
- /** App-agnostic request options accepted by the scheduler facade. */
148
- export declare interface ScheduledTasksListRequest {
149
- limit?: number;
150
- offset?: number;
151
- search?: string;
152
- sort?: ListScheduledTasksSortEnum;
153
- /** Only tasks that run against this model/application id, exactly as stored. */
154
- model?: string;
155
- signal?: AbortSignal;
156
- }
157
-
158
- export declare interface ScheduledTaskTriggerDescription {
159
- kind: ScheduledTaskTriggerDescriptionKind;
160
- time?: string;
161
- dayOfWeek?: string;
162
- dayOfMonth?: string;
163
- intervalMinutes?: number;
164
- date?: Date;
165
- expression?: string;
166
- sourceTimezone: 'utc';
167
- }
168
-
169
- /** Display categories are independent of task editability. */
170
- export declare enum ScheduledTaskTriggerDescriptionKind {
171
- OneTime = "oneTime",
172
- Hourly = "hourly",
173
- EveryNMinutes = "everyNMinutes",
174
- Daily = "daily",
175
- Weekly = "weekly",
176
- Monthly = "monthly",
177
- Custom = "custom",
178
- Invalid = "invalid"
179
- }
180
-
181
- export declare interface ScheduledTaskTriggerDescriptionOptions {
182
- /** Display timezone; defaults to UTC for backwards compatibility. */
183
- timeZone?: string;
184
- /** Date whose timezone offset is used. Defaults to now (the existing UTC-storage policy). */
185
- referenceDate?: Date;
186
- }
187
-
188
- /** Why a scheduled task DTO could not be mapped back to editable form values. */
189
- export declare enum UnsupportedTriggerReason {
190
- /** `trigger.cron.fields` uses a shape (extra keys, or both `day_of_week` and `day`) the editor's schedule controls cannot represent. */
191
- UnsupportedCronShape = "unsupportedCronShape",
192
- /** Neither or both of `trigger.date`/`trigger.cron` are set, so the schedule type cannot be determined. */
193
- UnsupportedTriggerType = "unsupportedTriggerType",
194
- /** The task is missing `model` or `prompt`, so it cannot be represented as a valid update payload. */
195
- MissingRequiredFields = "missingRequiredFields"
196
- }
197
-
198
- /** Shared, cancellation-safe pagination and background refresh for one schedule's run history. */
199
- export declare const useScheduledTaskRuns: (client: ScheduledTasksApiClient, { scheduleId, enabled, pageSize, nextRunTime, }: UseScheduledTaskRunsOptions) => {
200
- items: ScheduledTaskRunDto[];
201
- isLoading: boolean;
202
- isLoadingMore: boolean;
203
- initialError: Error | null;
204
- loadMoreError: Error | null;
205
- hasMore: boolean;
206
- loadMore: () => void;
207
- retryLoadMore: () => void;
208
- refetch: () => void;
209
- };
210
-
211
- export declare interface UseScheduledTaskRunsOptions {
212
- scheduleId: string;
213
- enabled?: boolean;
214
- pageSize?: number;
215
- /**
216
- * The task's next scheduled run time (ISO string), when known. Drives the
217
- * one-shot background refresh described on {@link useScheduledTaskRuns}.
218
- * The caller already holds the task DTO — this hook never fetches it.
219
- */
220
- nextRunTime?: string | null;
221
- }
222
-
223
- /** Shared scheduler-list lifecycle with generation-scoped stale-response guards. */
224
- export declare const useScheduledTasks: (client: ScheduledTasksApiClient, { enabled, pageSize, debounceMs, initialSearch, initialSort, model, }?: UseScheduledTasksOptions) => {
225
- items: ScheduledTaskDto[];
226
- searchQuery: string;
227
- setSearchQuery: Dispatch<SetStateAction<string>>;
228
- sortKey: "firstToRun" | "lastToRun" | "newest" | "nameAZ";
229
- setSortKey: Dispatch<SetStateAction<"firstToRun" | "lastToRun" | "newest" | "nameAZ">>;
230
- isLoading: boolean;
231
- isLoadingMore: boolean;
232
- initialError: Error | null;
233
- loadMoreError: Error | null;
234
- hasMore: boolean;
235
- loadMore: () => void;
236
- retryLoadMore: () => void;
237
- refetch: () => void;
238
- };
239
-
240
- export declare interface UseScheduledTasksOptions {
241
- enabled?: boolean;
242
- pageSize?: number;
243
- debounceMs?: number;
244
- initialSearch?: string;
245
- initialSort?: ListScheduledTasksSortEnum;
246
- /** Restricts the list to tasks of one model/application; changing it reloads from the first page. */
247
- model?: string;
248
- }
249
-
250
- export { }
1
+ export * from './entry-points/scheduled-tasks.js'
2
+ export {}