@epam/ai-dial-chat-hooks 1.3.0-dev.37 → 1.3.0-dev.372
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.
- package/api-error/api-error.d.ts +2 -0
- package/api-error/api-error.d.ts.map +1 -1
- package/api-error/api-error.js +31 -23
- package/api-transport/create-unauthorized-middleware.js +4 -1
- package/attachment/attach-constraints.d.ts +31 -0
- package/attachment/attach-constraints.d.ts.map +1 -0
- package/attachment/attach-constraints.js +18 -0
- package/attachment/useAttachmentAction/useAttachmentAction.d.ts +1 -1
- package/attachment/useAttachmentAction/useAttachmentAction.d.ts.map +1 -1
- package/attachment/useAttachmentAction/useAttachmentAction.js +25 -28
- package/attachments.js +2 -1
- package/catalog/application-credentials.d.ts +15 -0
- package/catalog/application-credentials.d.ts.map +1 -0
- package/catalog/application-credentials.js +28 -0
- package/catalog/catalog-derivations.d.ts +5 -3
- package/catalog/catalog-derivations.d.ts.map +1 -1
- package/catalog/catalog-derivations.js +13 -6
- package/catalog/catalog-entity-kind.d.ts +31 -0
- package/catalog/catalog-entity-kind.d.ts.map +1 -0
- package/catalog/catalog-entity-kind.js +21 -0
- package/catalog/catalog-preferences.d.ts +8 -0
- package/catalog/catalog-preferences.d.ts.map +1 -0
- package/catalog/catalog-preferences.js +5 -0
- package/catalog/create-publish-api.d.ts +3 -1
- package/catalog/create-publish-api.d.ts.map +1 -1
- package/catalog/create-publish-api.js +4 -0
- package/catalog/deployment-id.d.ts +13 -4
- package/catalog/deployment-id.d.ts.map +1 -1
- package/catalog/deployment-id.js +17 -3
- package/catalog/entity-details.d.ts +2 -0
- package/catalog/entity-details.d.ts.map +1 -1
- package/catalog/favorite-entity-type.d.ts +5 -0
- package/catalog/favorite-entity-type.d.ts.map +1 -0
- package/catalog/favorite-entity-type.js +10 -0
- package/catalog/map-deployment-limits-to-input.d.ts +4 -3
- package/catalog/map-deployment-limits-to-input.d.ts.map +1 -1
- package/catalog/map-deployment-limits-to-input.js +3 -4
- package/catalog/map-deployment-to-catalog-item.d.ts +12 -1
- package/catalog/map-deployment-to-catalog-item.d.ts.map +1 -1
- package/catalog/map-deployment-to-catalog-item.js +22 -15
- package/catalog/map-entity-details-to-catalog.d.ts.map +1 -1
- package/catalog/map-entity-details-to-catalog.js +69 -24
- package/catalog/map-skill-to-catalog-item.d.ts +4 -5
- package/catalog/map-skill-to-catalog-item.d.ts.map +1 -1
- package/catalog/map-skill-to-catalog-item.js +29 -38
- package/catalog/publish.d.ts +1 -1
- package/catalog/publish.d.ts.map +1 -1
- package/catalog/resource-folder.d.ts +8 -0
- package/catalog/resource-folder.d.ts.map +1 -0
- package/catalog/resource-folder.js +13 -0
- package/catalog/resource-name-conflict.d.ts +22 -0
- package/catalog/resource-name-conflict.d.ts.map +1 -0
- package/catalog/resource-name-conflict.js +32 -0
- package/catalog/resource-save-adapter.d.ts +36 -0
- package/catalog/resource-save-adapter.d.ts.map +1 -0
- package/catalog/resource-save-adapter.js +4 -0
- package/catalog/resource-save-adapters.d.ts +93 -0
- package/catalog/resource-save-adapters.d.ts.map +1 -0
- package/catalog/resource-save-adapters.js +116 -0
- package/catalog/resource-save.d.ts +76 -0
- package/catalog/resource-save.d.ts.map +1 -0
- package/catalog/resource-save.js +52 -0
- package/catalog/unpublishable-folders.d.ts +21 -0
- package/catalog/unpublishable-folders.d.ts.map +1 -0
- package/catalog/unpublishable-folders.js +21 -0
- package/catalog/usage-limit-rows.d.ts +14 -0
- package/catalog/usage-limit-rows.d.ts.map +1 -0
- package/catalog/usage-limit-rows.js +19 -0
- package/catalog/use-publish-history.d.ts +19 -0
- package/catalog/use-publish-history.d.ts.map +1 -0
- package/catalog/use-publish-history.js +25 -0
- package/catalog/useApplicationCredentialActions/useApplicationCredentialActions.d.ts +57 -0
- package/catalog/useApplicationCredentialActions/useApplicationCredentialActions.d.ts.map +1 -0
- package/catalog/useApplicationCredentialActions/useApplicationCredentialActions.js +67 -0
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts +23 -6
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts.map +1 -1
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.js +108 -107
- package/catalog/useCatalogItemDelete/useCatalogItemDelete.d.ts +41 -0
- package/catalog/useCatalogItemDelete/useCatalogItemDelete.d.ts.map +1 -0
- package/catalog/useCatalogItemDelete/useCatalogItemDelete.js +37 -0
- package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.d.ts.map +1 -1
- package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.js +72 -77
- package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.js +1 -1
- package/catalog/usePublishFolders/usePublishFolders.d.ts +8 -0
- package/catalog/usePublishFolders/usePublishFolders.d.ts.map +1 -1
- package/catalog/usePublishFolders/usePublishFolders.js +32 -29
- package/catalog/useResourceFolders/useResourceFolders.d.ts +33 -0
- package/catalog/useResourceFolders/useResourceFolders.d.ts.map +1 -0
- package/catalog/useResourceFolders/useResourceFolders.js +58 -0
- package/catalog/useResourceSavePanel/useResourceSavePanel.d.ts +64 -0
- package/catalog/useResourceSavePanel/useResourceSavePanel.d.ts.map +1 -0
- package/catalog/useResourceSavePanel/useResourceSavePanel.js +173 -0
- package/catalog/useSkillItemDetails.js +3 -3
- package/catalog/useUnpublishConfirmation/useUnpublishConfirmation.d.ts +43 -0
- package/catalog/useUnpublishConfirmation/useUnpublishConfirmation.d.ts.map +1 -0
- package/catalog/useUnpublishConfirmation/useUnpublishConfirmation.js +46 -0
- package/catalog/useUnpublishableFolders/useUnpublishableFolders.d.ts +22 -0
- package/catalog/useUnpublishableFolders/useUnpublishableFolders.d.ts.map +1 -0
- package/catalog/useUnpublishableFolders/useUnpublishableFolders.js +53 -0
- package/catalog.js +41 -23
- package/conversation/conversation-data-source.d.ts +47 -0
- package/conversation/conversation-data-source.d.ts.map +1 -0
- package/conversation/conversation-data-source.js +11 -0
- package/conversation/conversation-draft/conversation-draft-store.d.ts +21 -0
- package/conversation/conversation-draft/conversation-draft-store.d.ts.map +1 -0
- package/conversation/conversation-draft/conversation-draft-store.js +84 -0
- package/conversation/conversation-draft/conversation-draft.d.ts +48 -0
- package/conversation/conversation-draft/conversation-draft.d.ts.map +1 -0
- package/conversation/conversation-list.d.ts +6 -0
- package/conversation/conversation-list.d.ts.map +1 -0
- package/conversation/conversation-list.js +5 -0
- package/conversation/conversation-title-stream.d.ts +33 -0
- package/conversation/conversation-title-stream.d.ts.map +1 -0
- package/conversation/conversation-title-stream.js +103 -0
- package/conversation/conversation-transfer/attachment-refs.d.ts +10 -2
- package/conversation/conversation-transfer/attachment-refs.d.ts.map +1 -1
- package/conversation/conversation-transfer/attachment-refs.js +31 -9
- package/conversation/conversation-transfer/export-conversation.d.ts +5 -1
- package/conversation/conversation-transfer/export-conversation.d.ts.map +1 -1
- package/conversation/conversation-transfer/export-conversation.js +19 -18
- package/conversation/conversation-transfer/import-conversation.d.ts +11 -6
- package/conversation/conversation-transfer/import-conversation.d.ts.map +1 -1
- package/conversation/conversation-transfer/import-conversation.js +65 -69
- package/conversation/conversation-transfer/progress.js +1 -1
- package/conversation/conversation-transfer/zip-export.js +1 -7
- package/conversation/conversation-transfer/zip-import.js +1 -1
- package/conversation/create-chat-stream-api.d.ts +24 -3
- package/conversation/create-chat-stream-api.d.ts.map +1 -1
- package/conversation/create-chat-stream-api.js +67 -56
- package/conversation/generation-registry.d.ts +30 -0
- package/conversation/generation-registry.d.ts.map +1 -0
- package/conversation/generation-registry.js +33 -0
- package/conversation/get-model-id-from-conversation-id.d.ts.map +1 -1
- package/conversation/get-model-id-from-conversation-id.js +1 -1
- package/conversation/message-utils.d.ts +6 -0
- package/conversation/message-utils.d.ts.map +1 -1
- package/conversation/message-utils.js +14 -10
- package/conversation/scheduled-task-grouping.d.ts +53 -0
- package/conversation/scheduled-task-grouping.d.ts.map +1 -0
- package/conversation/scheduled-task-grouping.js +45 -0
- package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts +4 -2
- package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts.map +1 -1
- package/conversation/useActiveConversationSync/useActiveConversationSync.js +19 -12
- package/conversation/useAttachmentUpload/useAttachmentUpload.d.ts.map +1 -1
- package/conversation/useAttachmentUpload/useAttachmentUpload.js +4 -1
- package/conversation/useConversationComposerDraft/useConversationComposerDraft.d.ts +39 -0
- package/conversation/useConversationComposerDraft/useConversationComposerDraft.d.ts.map +1 -0
- package/conversation/useConversationComposerDraft/useConversationComposerDraft.js +128 -0
- package/conversation/useConversationDiscovery/useConversationDiscovery.d.ts +22 -0
- package/conversation/useConversationDiscovery/useConversationDiscovery.d.ts.map +1 -0
- package/conversation/useConversationDiscovery/useConversationDiscovery.js +60 -0
- package/conversation/useConversationExport/useConversationExport.d.ts.map +1 -1
- package/conversation/useConversationExport/useConversationExport.js +113 -122
- package/conversation/useConversationHandlers/message-utils.js +2 -2
- package/conversation/useConversationHandlers/useConversationHandlers.js +41 -41
- package/conversation/useConversationImport/useConversationImport.js +24 -24
- package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts +18 -5
- package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts.map +1 -1
- package/conversation/useConversationPanelItems/useConversationPanelItems.js +34 -30
- package/conversation/useConversationScroll/useConversationScroll.d.ts.map +1 -1
- package/conversation/useConversationScroll/useConversationScroll.js +69 -72
- package/conversation/useConversationStream/conversation-path.js +2 -2
- package/conversation/useConversationStream/conversation-stream.types.d.ts +142 -0
- package/conversation/useConversationStream/conversation-stream.types.d.ts.map +1 -0
- package/conversation/useConversationStream/frame-scheduler.js +17 -17
- package/conversation/useConversationStream/generation-resume.d.ts +24 -2
- package/conversation/useConversationStream/generation-resume.d.ts.map +1 -1
- package/conversation/useConversationStream/generation-resume.js +110 -121
- package/conversation/useConversationStream/stream-errors.d.ts +10 -0
- package/conversation/useConversationStream/stream-errors.d.ts.map +1 -0
- package/conversation/useConversationStream/stream-errors.js +10 -0
- package/conversation/useConversationStream/stream-session.d.ts +51 -0
- package/conversation/useConversationStream/stream-session.d.ts.map +1 -0
- package/conversation/useConversationStream/stream-session.js +179 -0
- package/conversation/useConversationStream/useConversationReloadErrors.d.ts +25 -0
- package/conversation/useConversationStream/useConversationReloadErrors.d.ts.map +1 -0
- package/conversation/useConversationStream/useConversationReloadErrors.js +38 -0
- package/conversation/useConversationStream/useConversationStream.d.ts +3 -136
- package/conversation/useConversationStream/useConversationStream.d.ts.map +1 -1
- package/conversation/useConversationStream/useConversationStream.js +141 -325
- package/conversation/useConversationStream/useStopGeneration.d.ts +29 -0
- package/conversation/useConversationStream/useStopGeneration.d.ts.map +1 -0
- package/conversation/useConversationStream/useStopGeneration.js +48 -0
- package/conversation/useConversationStream/useStreamPathState.d.ts +39 -0
- package/conversation/useConversationStream/useStreamPathState.d.ts.map +1 -0
- package/conversation/useConversationStream/useStreamPathState.js +55 -0
- package/conversation/useConversationTitleEnrichmentController.d.ts +64 -0
- package/conversation/useConversationTitleEnrichmentController.d.ts.map +1 -0
- package/conversation/useConversationTitleEnrichmentController.js +155 -0
- package/conversation/useDeploymentChangeTracking.d.ts +14 -0
- package/conversation/useDeploymentChangeTracking.d.ts.map +1 -0
- package/conversation/useDeploymentChangeTracking.js +23 -0
- package/conversation/useEntityPreselection/useEntityPreselection.d.ts +108 -0
- package/conversation/useEntityPreselection/useEntityPreselection.d.ts.map +1 -0
- package/conversation/useEntityPreselection/useEntityPreselection.js +78 -0
- package/conversation/useMessageSelectionReply/useMessageSelectionReply.js +4 -10
- package/conversation/useTranscribeAudio/useTranscribeAudio.d.ts +8 -1
- package/conversation/useTranscribeAudio/useTranscribeAudio.d.ts.map +1 -1
- package/conversation/useTranscribeAudio/useTranscribeAudio.js +36 -27
- package/conversation/useVisibleConversationIdsReporter/useVisibleConversationIdsReporter.d.ts +16 -0
- package/conversation/useVisibleConversationIdsReporter/useVisibleConversationIdsReporter.d.ts.map +1 -0
- package/conversation/useVisibleConversationIdsReporter/useVisibleConversationIdsReporter.js +17 -0
- package/conversation-overlay.js +1 -2
- package/conversation-sources/stage-citations.d.ts +9 -0
- package/conversation-sources/stage-citations.d.ts.map +1 -0
- package/conversation-sources/stage-citations.js +8 -0
- package/conversation-sources/useConversationAnnotationPool/useConversationAnnotationPool.d.ts +4 -0
- package/conversation-sources/useConversationAnnotationPool/useConversationAnnotationPool.d.ts.map +1 -0
- package/conversation-sources/useConversationAnnotationPool/useConversationAnnotationPool.js +5 -0
- package/conversation-sources.js +3 -1
- package/conversation.js +45 -33
- package/entry-points/attachments.d.ts +1 -0
- package/entry-points/attachments.d.ts.map +1 -1
- package/entry-points/catalog.d.ts +17 -0
- package/entry-points/catalog.d.ts.map +1 -1
- package/entry-points/conversation-sources.d.ts +2 -0
- package/entry-points/conversation-sources.d.ts.map +1 -1
- package/entry-points/conversation.d.ts +13 -0
- package/entry-points/conversation.d.ts.map +1 -1
- package/entry-points/external-services.d.ts +6 -0
- package/entry-points/external-services.d.ts.map +1 -0
- package/entry-points/file-manager-canvas.d.ts +1 -0
- package/entry-points/file-manager-canvas.d.ts.map +1 -1
- package/entry-points/file-manager.d.ts +2 -0
- package/entry-points/file-manager.d.ts.map +1 -1
- package/entry-points/oauth.d.ts +1 -0
- package/entry-points/oauth.d.ts.map +1 -1
- package/entry-points/offline-credentials.d.ts +7 -0
- package/entry-points/offline-credentials.d.ts.map +1 -0
- package/entry-points/project.d.ts +20 -0
- package/entry-points/project.d.ts.map +1 -0
- package/entry-points/scheduled-tasks.d.ts +7 -0
- package/entry-points/scheduled-tasks.d.ts.map +1 -1
- package/entry-points/sharing.d.ts +4 -0
- package/entry-points/sharing.d.ts.map +1 -1
- package/entry-points/skill-editor.d.ts +2 -0
- package/entry-points/skill-editor.d.ts.map +1 -1
- package/entry-points/skills-state.d.ts +1 -0
- package/entry-points/skills-state.d.ts.map +1 -1
- package/entry-points/usage-limits.d.ts +9 -0
- package/entry-points/usage-limits.d.ts.map +1 -0
- package/entry-points/utils.d.ts +6 -0
- package/entry-points/utils.d.ts.map +1 -1
- package/entry-points/viewport-layout.d.ts +1 -0
- package/entry-points/viewport-layout.d.ts.map +1 -1
- package/external-services/useExternalServiceLogin.d.ts +99 -0
- package/external-services/useExternalServiceLogin.d.ts.map +1 -0
- package/external-services/useExternalServiceLogin.js +93 -0
- package/external-services.d.ts +2 -0
- package/external-services.js +5 -0
- package/file-manager-canvas.js +3 -2
- package/file-manager.js +32 -30
- package/files/attachment-canvas.d.ts +12 -0
- package/files/attachment-canvas.d.ts.map +1 -1
- package/files/attachment-canvas.js +18 -10
- package/files/attachment-dto-to-display.d.ts.map +1 -1
- package/files/attachment-dto-to-display.js +13 -12
- package/files/attachment-types.js +1 -1
- package/files/browser-download.d.ts +9 -0
- package/files/browser-download.d.ts.map +1 -0
- package/files/browser-download.js +23 -0
- package/files/create-files-api.d.ts +3 -4
- package/files/create-files-api.d.ts.map +1 -1
- package/files/create-files-api.js +1 -1
- package/files/create-upload-file-with-progress.d.ts +21 -1
- package/files/create-upload-file-with-progress.d.ts.map +1 -1
- package/files/create-upload-file-with-progress.js +50 -34
- package/files/dial-file-manager-copy-move.util.d.ts.map +1 -1
- package/files/dial-file-manager-copy-move.util.js +28 -28
- package/files/dial-file-manager-mapping.util.d.ts +23 -3
- package/files/dial-file-manager-mapping.util.d.ts.map +1 -1
- package/files/dial-file-manager-mapping.util.js +97 -69
- package/files/dial-file-manager.types.d.ts +15 -5
- package/files/dial-file-manager.types.d.ts.map +1 -1
- package/files/dial-file-to-attachment.js +3 -3
- package/files/dial-file.d.ts +19 -0
- package/files/dial-file.d.ts.map +1 -1
- package/files/dial-file.js +20 -12
- package/files/dial-files-api.d.ts +2 -2
- package/files/dial-files-api.d.ts.map +1 -1
- package/files/download-progress.d.ts +33 -0
- package/files/download-progress.d.ts.map +1 -0
- package/files/download-progress.js +28 -0
- package/files/source-content.js +1 -1
- package/files/useDialFileListing/useDialFileListing.d.ts.map +1 -1
- package/files/useDialFileListing/useDialFileListing.js +97 -109
- package/files/useDialFileManager/useDialFileManager.d.ts.map +1 -1
- package/files/useDialFileManager/useDialFileManager.js +5 -2
- package/files/useDialFileManagerSections/useDialFileManagerSections.d.ts.map +1 -1
- package/files/useDialFileManagerSections/useDialFileManagerSections.js +59 -68
- package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js +1 -1
- package/files/useDialFileMetadata/useDialFileMetadata.js +3 -3
- package/files/useDialFileMutations/useDialFileMutations.d.ts +9 -0
- package/files/useDialFileMutations/useDialFileMutations.d.ts.map +1 -1
- package/files/useDialFileMutations/useDialFileMutations.js +232 -159
- package/files/useDialFilePreview/useDialFilePreview.d.ts +33 -0
- package/files/useDialFilePreview/useDialFilePreview.d.ts.map +1 -0
- package/files/useDialFilePreview/useDialFilePreview.js +45 -0
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts.map +1 -1
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +114 -103
- package/files/useFileAttachmentModalState/useFileAttachmentModalState.d.ts +25 -0
- package/files/useFileAttachmentModalState/useFileAttachmentModalState.d.ts.map +1 -0
- package/files/useFileAttachmentModalState/useFileAttachmentModalState.js +19 -0
- package/files/useFileAttachmentPicker/useFileAttachmentPicker.js +2 -2
- package/files/useUnshareConfirmationState/useUnshareConfirmationState.d.ts +23 -0
- package/files/useUnshareConfirmationState/useUnshareConfirmationState.d.ts.map +1 -0
- package/files/useUnshareConfirmationState/useUnshareConfirmationState.js +18 -0
- package/index.d.ts +96 -0
- package/index.d.ts.map +1 -1
- package/index.js +244 -149
- package/mcp-apps/mcp-apps-api-client.d.ts.map +1 -1
- package/mcp-apps/mcp-apps-api-client.js +18 -17
- package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.d.ts +3 -2
- package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.d.ts.map +1 -1
- package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.js +28 -10
- package/mcp-apps/useMcpAppTools/useMcpAppTools.d.ts.map +1 -1
- package/mcp-apps/useMcpAppTools/useMcpAppTools.js +45 -45
- package/oauth/authorize-url.d.ts +7 -1
- package/oauth/authorize-url.d.ts.map +1 -1
- package/oauth/authorize-url.js +14 -4
- package/oauth/callback-exchange.d.ts +49 -0
- package/oauth/callback-exchange.d.ts.map +1 -0
- package/oauth/callback-exchange.js +29 -0
- package/oauth/handshake.js +3 -10
- package/oauth/models.d.ts +25 -0
- package/oauth/models.d.ts.map +1 -1
- package/oauth/popup.d.ts.map +1 -1
- package/oauth/popup.js +19 -17
- package/oauth/toolset-id.d.ts +7 -0
- package/oauth/toolset-id.d.ts.map +1 -1
- package/oauth/toolset-id.js +9 -2
- package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.d.ts.map +1 -1
- package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.js +41 -42
- package/oauth/useToolsetLogin/useToolsetLogin.d.ts +7 -1
- package/oauth/useToolsetLogin/useToolsetLogin.d.ts.map +1 -1
- package/oauth/useToolsetLogin/useToolsetLogin.js +51 -42
- package/oauth.js +9 -8
- package/offline-credentials/map-offline-credentials-response.d.ts +20 -0
- package/offline-credentials/map-offline-credentials-response.d.ts.map +1 -0
- package/offline-credentials/map-offline-credentials-response.js +17 -0
- package/offline-credentials/scheduled-tasks-login-banner.d.ts +31 -0
- package/offline-credentials/scheduled-tasks-login-banner.d.ts.map +1 -0
- package/offline-credentials/scheduled-tasks-login-banner.js +17 -0
- package/offline-credentials/useOfflineCredentialsAuth/useOfflineCredentialsAuth.d.ts +58 -0
- package/offline-credentials/useOfflineCredentialsAuth/useOfflineCredentialsAuth.d.ts.map +1 -0
- package/offline-credentials/useOfflineCredentialsAuth/useOfflineCredentialsAuth.js +37 -0
- package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.d.ts +61 -0
- package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.d.ts.map +1 -0
- package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.js +37 -0
- package/offline-credentials/useOfflineCredentialsLogin/useOfflineCredentialsLogin.d.ts +28 -0
- package/offline-credentials/useOfflineCredentialsLogin/useOfflineCredentialsLogin.d.ts.map +1 -0
- package/offline-credentials/useOfflineCredentialsLogin/useOfflineCredentialsLogin.js +29 -0
- package/offline-credentials.d.ts +2 -0
- package/offline-credentials.js +7 -0
- package/package.json +49 -25
- package/project/create-project-chat.d.ts +34 -0
- package/project/create-project-chat.d.ts.map +1 -0
- package/project/create-project-chat.js +27 -0
- package/project/project-conversation-data-source.d.ts +36 -0
- package/project/project-conversation-data-source.d.ts.map +1 -0
- package/project/project-conversation-data-source.js +67 -0
- package/project/project-events.d.ts +14 -0
- package/project/project-events.d.ts.map +1 -0
- package/project/project-events.js +25 -0
- package/project/project-file-preview.d.ts +32 -0
- package/project/project-file-preview.d.ts.map +1 -0
- package/project/project-file-preview.js +25 -0
- package/project/project-form-errors.d.ts +23 -0
- package/project/project-form-errors.d.ts.map +1 -0
- package/project/project-form-errors.js +46 -0
- package/project/project-limits.d.ts +17 -0
- package/project/project-limits.d.ts.map +1 -0
- package/project/project-limits.js +11 -0
- package/project/project-mapping.d.ts +16 -0
- package/project/project-mapping.d.ts.map +1 -0
- package/project/project-mapping.js +43 -0
- package/project/project-refresh.d.ts +12 -0
- package/project/project-refresh.d.ts.map +1 -0
- package/project/project-refresh.js +6 -0
- package/project/project-viewed-marks.d.ts +9 -0
- package/project/project-viewed-marks.d.ts.map +1 -0
- package/project/project-viewed-marks.js +8 -0
- package/project/project-watch-stream.d.ts +26 -0
- package/project/project-watch-stream.d.ts.map +1 -0
- package/project/project-watch-stream.js +39 -0
- package/project/projects-api-client.d.ts +179 -0
- package/project/projects-api-client.d.ts.map +1 -0
- package/project/projects-api-client.js +90 -0
- package/project/use-pinned-project-chats.d.ts +58 -0
- package/project/use-pinned-project-chats.d.ts.map +1 -0
- package/project/use-pinned-project-chats.js +269 -0
- package/project/use-project-actions.d.ts +53 -0
- package/project/use-project-actions.d.ts.map +1 -0
- package/project/use-project-actions.js +92 -0
- package/project/use-project-artifacts.d.ts +24 -0
- package/project/use-project-artifacts.d.ts.map +1 -0
- package/project/use-project-artifacts.js +78 -0
- package/project/use-project-conversations.d.ts +32 -0
- package/project/use-project-conversations.d.ts.map +1 -0
- package/project/use-project-conversations.js +200 -0
- package/project/use-project-draft.d.ts +46 -0
- package/project/use-project-draft.d.ts.map +1 -0
- package/project/use-project-draft.js +54 -0
- package/project/use-project-file-preview.d.ts +47 -0
- package/project/use-project-file-preview.d.ts.map +1 -0
- package/project/use-project-file-preview.js +50 -0
- package/project/use-project-submit.d.ts +49 -0
- package/project/use-project-submit.d.ts.map +1 -0
- package/project/use-project-submit.js +73 -0
- package/project/use-project-watch.d.ts +24 -0
- package/project/use-project-watch.d.ts.map +1 -0
- package/project/use-project-watch.js +41 -0
- package/project/use-project.d.ts +23 -0
- package/project/use-project.d.ts.map +1 -0
- package/project/use-project.js +73 -0
- package/project/use-projects.d.ts +27 -0
- package/project/use-projects.d.ts.map +1 -0
- package/project/use-projects.js +92 -0
- package/project.d.ts +2 -0
- package/project.js +20 -0
- package/prompt/prompt.d.ts +11 -0
- package/prompt/prompt.d.ts.map +1 -1
- package/prompt/prompt.js +7 -3
- package/scheduled-task/active-scheduled-task.d.ts +58 -0
- package/scheduled-task/active-scheduled-task.d.ts.map +1 -0
- package/scheduled-task/active-scheduled-task.js +18 -0
- package/scheduled-task/check-scheduled-task-auth-session-error.d.ts +27 -0
- package/scheduled-task/check-scheduled-task-auth-session-error.d.ts.map +1 -0
- package/scheduled-task/check-scheduled-task-auth-session-error.js +17 -0
- package/scheduled-task/scheduled-task-description.d.ts +2 -0
- package/scheduled-task/scheduled-task-description.d.ts.map +1 -1
- package/scheduled-task/scheduled-task-description.js +33 -24
- package/scheduled-task/scheduled-task-display.d.ts +106 -0
- package/scheduled-task/scheduled-task-display.d.ts.map +1 -0
- package/scheduled-task/scheduled-task-display.js +69 -0
- package/scheduled-task/scheduled-task-next-occurrence.d.ts +9 -0
- package/scheduled-task/scheduled-task-next-occurrence.d.ts.map +1 -0
- package/scheduled-task/scheduled-task-next-occurrence.js +20 -0
- package/scheduled-task/scheduled-task-preparation.d.ts +1 -1
- package/scheduled-task/scheduled-task-trigger.d.ts.map +1 -1
- package/scheduled-task/scheduled-task-trigger.js +75 -48
- package/scheduled-task/use-scheduled-task-runs.js +19 -31
- package/scheduled-task/use-scheduled-tasks.d.ts +2 -2
- package/scheduled-task/use-scheduled-tasks.js +1 -1
- package/scheduled-task/useActiveScheduledTaskDetails.d.ts +18 -0
- package/scheduled-task/useActiveScheduledTaskDetails.d.ts.map +1 -0
- package/scheduled-task/useActiveScheduledTaskDetails.js +40 -0
- package/scheduled-task/useScheduledTaskSkillDisplayNames/useScheduledTaskSkillDisplayNames.d.ts +17 -0
- package/scheduled-task/useScheduledTaskSkillDisplayNames/useScheduledTaskSkillDisplayNames.d.ts.map +1 -0
- package/scheduled-task/useScheduledTaskSkillDisplayNames/useScheduledTaskSkillDisplayNames.js +29 -0
- package/scheduled-task/useStartScheduledTask.d.ts +41 -0
- package/scheduled-task/useStartScheduledTask.d.ts.map +1 -0
- package/scheduled-task/useStartScheduledTask.js +169 -0
- package/scheduled-tasks.js +13 -6
- package/scroll-anchoring.js +1 -2
- package/share-invitation/models.d.ts +46 -0
- package/share-invitation/models.d.ts.map +1 -0
- package/share-invitation/share-invitation-error.d.ts +6 -0
- package/share-invitation/share-invitation-error.d.ts.map +1 -0
- package/share-invitation/share-invitation-error.js +37 -0
- package/share-invitation/types.d.ts +10 -0
- package/share-invitation/types.d.ts.map +1 -0
- package/share-invitation/types.js +6 -0
- package/share-invitation/useAcceptShareInvitation/useAcceptShareInvitation.d.ts +9 -0
- package/share-invitation/useAcceptShareInvitation/useAcceptShareInvitation.d.ts.map +1 -0
- package/share-invitation/useAcceptShareInvitation/useAcceptShareInvitation.js +26 -0
- package/shared/application-schema.js +3 -3
- package/shared/client-channel.d.ts +53 -0
- package/shared/client-channel.d.ts.map +1 -0
- package/shared/client-channel.js +6 -0
- package/shared/cron-day-of-month.js +10 -10
- package/shared/external-services.d.ts +1 -1
- package/shared/locale.d.ts +6 -2
- package/shared/locale.d.ts.map +1 -1
- package/shared/locale.js +4 -4
- package/shared/read-sse-events.d.ts +10 -0
- package/shared/read-sse-events.d.ts.map +1 -0
- package/shared/read-sse-events.js +33 -0
- package/shared/serialized-writer.d.ts +12 -0
- package/shared/serialized-writer.d.ts.map +1 -0
- package/shared/serialized-writer.js +44 -0
- package/shared/sleep.d.ts +3 -0
- package/shared/sleep.d.ts.map +1 -0
- package/shared/sleep.js +13 -0
- package/shared/theme-colors.d.ts +16 -0
- package/shared/theme-colors.d.ts.map +1 -0
- package/shared/theme-colors.js +14 -0
- package/shared/url-cleanup.d.ts +18 -0
- package/shared/url-cleanup.d.ts.map +1 -0
- package/shared/url-cleanup.js +18 -0
- package/shared/usage-stat.d.ts +3 -0
- package/shared/usage-stat.d.ts.map +1 -0
- package/shared/usage-stat.js +4 -0
- package/shared/useAppVersionCheck/useAppVersionCheck.d.ts +22 -0
- package/shared/useAppVersionCheck/useAppVersionCheck.d.ts.map +1 -0
- package/shared/useAppVersionCheck/useAppVersionCheck.js +36 -0
- package/shared/usePersistedState/usePersistedState.d.ts +28 -0
- package/shared/usePersistedState/usePersistedState.d.ts.map +1 -0
- package/shared/usePersistedState/usePersistedState.js +24 -0
- package/sharing.js +5 -2
- package/signin-interrupt/models.d.ts +48 -0
- package/signin-interrupt/models.d.ts.map +1 -0
- package/signin-interrupt/signin-row-info.d.ts +10 -0
- package/signin-interrupt/signin-row-info.d.ts.map +1 -0
- package/signin-interrupt/signin-row-info.js +21 -0
- package/signin-interrupt/types.d.ts +28 -0
- package/signin-interrupt/types.d.ts.map +1 -0
- package/signin-interrupt/types.js +10 -0
- package/signin-interrupt/useSigninInterrupt/useSigninInterrupt.d.ts +52 -0
- package/signin-interrupt/useSigninInterrupt/useSigninInterrupt.d.ts.map +1 -0
- package/signin-interrupt/useSigninInterrupt/useSigninInterrupt.js +270 -0
- package/skill/skill-file-batch-validation.d.ts +4 -0
- package/skill/skill-file-batch-validation.d.ts.map +1 -1
- package/skill/skill-file-batch-validation.js +34 -33
- package/skill/skill-lookup.d.ts +20 -0
- package/skill/skill-lookup.d.ts.map +1 -0
- package/skill/skill-lookup.js +12 -0
- package/skill/skill-types.js +1 -1
- package/skill/skill.d.ts +5 -1
- package/skill/skill.d.ts.map +1 -1
- package/skill/skill.js +27 -28
- package/skill/useSkillArchiveImport/useSkillArchiveImport.js +1 -7
- package/skill/useSkillEditorSubmit.d.ts +15 -1
- package/skill/useSkillEditorSubmit.d.ts.map +1 -1
- package/skill/useSkillEditorSubmit.js +164 -87
- package/skill/useSkillFileActions.d.ts +2 -0
- package/skill/useSkillFileActions.d.ts.map +1 -1
- package/skill/useSkillFileActions.js +36 -21
- package/skill-editor/useSkillFilePreviewSyncController.d.ts +41 -0
- package/skill-editor/useSkillFilePreviewSyncController.d.ts.map +1 -0
- package/skill-editor/useSkillFilePreviewSyncController.js +58 -0
- package/skill-editor/useSkillFileSystemPicker/useSkillFileSystemPicker.d.ts +23 -0
- package/skill-editor/useSkillFileSystemPicker/useSkillFileSystemPicker.d.ts.map +1 -0
- package/skill-editor/useSkillFileSystemPicker/useSkillFileSystemPicker.js +43 -0
- package/skill-editor.js +11 -9
- package/skills-state.js +3 -2
- package/source-content.js +1 -2
- package/usage/map-usage-data-to-dashboard.d.ts +1 -16
- package/usage/map-usage-data-to-dashboard.d.ts.map +1 -1
- package/usage/map-user-usage-to-model-limits.d.ts.map +1 -1
- package/usage/map-user-usage-to-model-limits.js +24 -24
- package/usage/usage-banner-source.d.ts +24 -0
- package/usage/usage-banner-source.d.ts.map +1 -0
- package/usage/usage-banner-source.js +61 -0
- package/usage/usage-gauge.d.ts +3 -0
- package/usage/usage-gauge.d.ts.map +1 -0
- package/usage/usage-gauge.js +4 -0
- package/usage/usage-period.d.ts +7 -0
- package/usage/usage-period.d.ts.map +1 -0
- package/usage/usage-period.js +6 -0
- package/usage/usage-reset-time.d.ts +78 -0
- package/usage/usage-reset-time.d.ts.map +1 -0
- package/usage/usage-reset-time.js +82 -0
- package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts +56 -0
- package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts.map +1 -0
- package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.js +34 -0
- package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.d.ts +16 -0
- package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.d.ts.map +1 -0
- package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.js +14 -0
- package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts +58 -0
- package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts.map +1 -0
- package/usage/useUsageLimitBanner/useUsageLimitBanner.js +70 -0
- package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.d.ts +14 -0
- package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.d.ts.map +1 -0
- package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.js +19 -0
- package/usage-limits.d.ts +2 -0
- package/usage-limits.js +10 -0
- package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts +2 -0
- package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts.map +1 -1
- package/useChatSettingsFormConfig/useChatSettingsFormConfig.js +25 -21
- package/usePageFileDrag/usePageFileDrag.js +3 -3
- package/useShareLink/useShareLink.d.ts.map +1 -1
- package/useShareLink/useShareLink.js +18 -17
- package/utils.js +23 -17
- package/viewport-layout/canvas-width.d.ts +39 -0
- package/viewport-layout/canvas-width.d.ts.map +1 -0
- package/viewport-layout/canvas-width.js +23 -0
- package/viewport-layout.js +2 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
//#region src/shared/serialized-writer.ts
|
|
2
|
+
var e = (e) => {
|
|
3
|
+
let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = Promise.resolve(), i = (e) => {
|
|
4
|
+
for (let t of [...n]) try {
|
|
5
|
+
t(e);
|
|
6
|
+
} catch {}
|
|
7
|
+
};
|
|
8
|
+
return {
|
|
9
|
+
enqueue: (n) => {
|
|
10
|
+
let a = t.get(n);
|
|
11
|
+
if (a) return a.promise;
|
|
12
|
+
let o, s, c = new Promise((e, t) => {
|
|
13
|
+
o = e, s = t;
|
|
14
|
+
}), l = {
|
|
15
|
+
promise: c,
|
|
16
|
+
resolve: o,
|
|
17
|
+
reject: s
|
|
18
|
+
};
|
|
19
|
+
t.set(n, l);
|
|
20
|
+
let u = r;
|
|
21
|
+
return r = (async () => {
|
|
22
|
+
if (await u, t.get(n) !== l) l.resolve();
|
|
23
|
+
else {
|
|
24
|
+
t.delete(n);
|
|
25
|
+
try {
|
|
26
|
+
await e(n);
|
|
27
|
+
} catch (e) {
|
|
28
|
+
l.reject(e);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
i(n), l.resolve();
|
|
32
|
+
}
|
|
33
|
+
})(), c;
|
|
34
|
+
},
|
|
35
|
+
drop: (e) => {
|
|
36
|
+
t.delete(e);
|
|
37
|
+
},
|
|
38
|
+
subscribe: (e) => (n.add(e), () => {
|
|
39
|
+
n.delete(e);
|
|
40
|
+
})
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
//#endregion
|
|
44
|
+
export { e as createSerializedKeyedWriter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sleep.d.ts","sourceRoot":"","sources":["../../src/shared/sleep.ts"],"names":[],"mappings":"AAAA,gHAAgH;AAChH,eAAO,MAAM,KAAK,GAAI,IAAI,MAAM,EAAE,QAAQ,WAAW,KAAG,OAAO,CAAC,IAAI,CAehE,CAAC"}
|
package/shared/sleep.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/shared/sleep.ts
|
|
2
|
+
var e = (e, t) => new Promise((n) => {
|
|
3
|
+
if (t.aborted) {
|
|
4
|
+
n();
|
|
5
|
+
return;
|
|
6
|
+
}
|
|
7
|
+
let r = setTimeout(n, e);
|
|
8
|
+
t.addEventListener("abort", () => {
|
|
9
|
+
clearTimeout(r), n();
|
|
10
|
+
}, { once: !0 });
|
|
11
|
+
});
|
|
12
|
+
//#endregion
|
|
13
|
+
export { e as sleep };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Colour scheme the operating system reports through `prefers-color-scheme`. */
|
|
2
|
+
export declare enum ColorScheme {
|
|
3
|
+
/** The OS asks for a dark scheme. */
|
|
4
|
+
Dark = "dark",
|
|
5
|
+
/** The OS asks for a light scheme, or states no preference. */
|
|
6
|
+
Light = "light"
|
|
7
|
+
}
|
|
8
|
+
/** Returns the colour scheme the OS currently prefers. */
|
|
9
|
+
export declare const getOsPreferredTheme: () => ColorScheme;
|
|
10
|
+
/**
|
|
11
|
+
* Writes `colors` to `element` as `--<key>` custom properties after removing
|
|
12
|
+
* the ones the previous call wrote to that element. Without `colors` it only
|
|
13
|
+
* removes them; properties it never wrote are left alone.
|
|
14
|
+
*/
|
|
15
|
+
export declare const applyThemeColors: (element: HTMLElement, colors?: Readonly<Record<string, string>>) => void;
|
|
16
|
+
//# sourceMappingURL=theme-colors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-colors.d.ts","sourceRoot":"","sources":["../../src/shared/theme-colors.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,oBAAY,WAAW;IACrB,qCAAqC;IACrC,IAAI,SAAS;IACb,+DAA+D;IAC/D,KAAK,UAAU;CAChB;AAED,0DAA0D;AAC1D,eAAO,MAAM,mBAAmB,QAAO,WAGhB,CAAC;AAWxB;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAC3B,SAAS,WAAW,EACpB,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,KACxC,IAkBF,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/shared/theme-colors.ts
|
|
2
|
+
var e = /* @__PURE__ */ function(e) {
|
|
3
|
+
return e.Dark = "dark", e.Light = "light", e;
|
|
4
|
+
}({}), t = () => window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", n = /* @__PURE__ */ new WeakMap(), r = (e, t) => {
|
|
5
|
+
let r = n.get(e);
|
|
6
|
+
if (r && (r.forEach((t) => e.style.removeProperty(t)), n.delete(e)), !t) return;
|
|
7
|
+
let i = Object.entries(t).map(([t, n]) => {
|
|
8
|
+
let r = `--${t}`;
|
|
9
|
+
return e.style.setProperty(r, n), r;
|
|
10
|
+
});
|
|
11
|
+
i.length > 0 && n.set(e, i);
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { e as ColorScheme, r as applyThemeColors, t as getOsPreferredTheme };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Target of a `replace` navigation that keeps the current pathname. */
|
|
2
|
+
export interface CleanedLocationTarget {
|
|
3
|
+
/** Query string without the removed keys, including the leading `?` (empty when nothing is left). */
|
|
4
|
+
search: string;
|
|
5
|
+
/** Current hash, unchanged. */
|
|
6
|
+
hash: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Builds the `search` and `hash` for a `replace` navigation that drops `keys`
|
|
10
|
+
* from the query string and leaves everything else as it is right now, byte for
|
|
11
|
+
* byte (the remaining pairs are not re-encoded).
|
|
12
|
+
* Reads `window.location` at call time rather than the router's `useLocation()`:
|
|
13
|
+
* the router applies navigations in a low-priority transition, so a render-time
|
|
14
|
+
* `search` can lag and would bring back a parameter that was just removed.
|
|
15
|
+
* @param keys - query parameter names to remove
|
|
16
|
+
*/
|
|
17
|
+
export declare const getCleanedLocationTarget: (keys: readonly string[]) => CleanedLocationTarget;
|
|
18
|
+
//# sourceMappingURL=url-cleanup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url-cleanup.d.ts","sourceRoot":"","sources":["../../src/shared/url-cleanup.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,MAAM,WAAW,qBAAqB;IACpC,qGAAqG;IACrG,MAAM,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,GACnC,MAAM,SAAS,MAAM,EAAE,KACtB,qBAiBF,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/shared/url-cleanup.ts
|
|
2
|
+
var e = (e) => {
|
|
3
|
+
let t = window.location.search.replace(/^\?/, "").split("&").filter((t) => {
|
|
4
|
+
if (!t) return !1;
|
|
5
|
+
let n = t.split("=")[0].replace(/\+/g, " ");
|
|
6
|
+
try {
|
|
7
|
+
return !e.includes(decodeURIComponent(n));
|
|
8
|
+
} catch {
|
|
9
|
+
return !0;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
return {
|
|
13
|
+
search: t.length > 0 ? `?${t.join("&")}` : "",
|
|
14
|
+
hash: window.location.hash
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { e as getCleanedLocationTarget };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage-stat.d.ts","sourceRoot":"","sources":["../../src/shared/usage-stat.ts"],"names":[],"mappings":"AAMA,qGAAqG;AACrG,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,OAC4B,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** Build information the host's health request resolves with. */
|
|
2
|
+
export interface AppBuildInfo {
|
|
3
|
+
/** Identifier of the deployed build; an empty or missing value is ignored. */
|
|
4
|
+
buildId?: string | null;
|
|
5
|
+
}
|
|
6
|
+
/** Inputs of {@link useAppVersionCheck}. */
|
|
7
|
+
export interface UseAppVersionCheckOptions {
|
|
8
|
+
/** Reads the deployed build, bound by the host to its health endpoint; it should bypass HTTP caches. */
|
|
9
|
+
checkHealth: (signal: AbortSignal) => Promise<AppBuildInfo>;
|
|
10
|
+
/** Minimum time between checks while the tab stays visible. Defaults to `300000` (5 minutes). */
|
|
11
|
+
pollIntervalMs?: number;
|
|
12
|
+
/** Time after which one health request is aborted. Defaults to `10000`. */
|
|
13
|
+
requestTimeoutMs?: number;
|
|
14
|
+
}
|
|
15
|
+
/** Result of {@link useAppVersionCheck}. */
|
|
16
|
+
export interface UseAppVersionCheckResult {
|
|
17
|
+
/** Whether a different build was deployed, or a chunk of the running build failed to load. */
|
|
18
|
+
isNewVersionAvailable: boolean;
|
|
19
|
+
}
|
|
20
|
+
/** Reports when a long-lived tab runs a build that is no longer deployed, so the host can prompt a reload. */
|
|
21
|
+
export declare const useAppVersionCheck: ({ checkHealth, pollIntervalMs, requestTimeoutMs, }: UseAppVersionCheckOptions) => UseAppVersionCheckResult;
|
|
22
|
+
//# sourceMappingURL=useAppVersionCheck.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAppVersionCheck.d.ts","sourceRoot":"","sources":["../../../src/shared/useAppVersionCheck/useAppVersionCheck.ts"],"names":[],"mappings":"AAQA,iEAAiE;AACjE,MAAM,WAAW,YAAY;IAC3B,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,4CAA4C;AAC5C,MAAM,WAAW,yBAAyB;IACxC,wGAAwG;IACxG,WAAW,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IAC5D,iGAAiG;IACjG,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,2EAA2E;IAC3E,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,4CAA4C;AAC5C,MAAM,WAAW,wBAAwB;IACvC,8FAA8F;IAC9F,qBAAqB,EAAE,OAAO,CAAC;CAChC;AAED,8GAA8G;AAC9G,eAAO,MAAM,kBAAkB,GAAI,oDAIhC,yBAAyB,KAAG,wBAmF9B,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { useEffect as e, useRef as t, useState as n } from "react";
|
|
2
|
+
//#region src/shared/useAppVersionCheck/useAppVersionCheck.ts
|
|
3
|
+
var r = 3e5, i = 1e4, a = "vite:preloadError", o = ({ checkHealth: o, pollIntervalMs: s = r, requestTimeoutMs: c = i }) => {
|
|
4
|
+
let [l, u] = n(!1), d = t(null), f = t(o);
|
|
5
|
+
return f.current = o, e(() => {
|
|
6
|
+
let e = !1, t = null, n = Date.now(), r = () => {
|
|
7
|
+
document.visibilityState === "visible" && m();
|
|
8
|
+
}, i = () => {
|
|
9
|
+
let e = Date.now();
|
|
10
|
+
e - n >= s && m(), n = e;
|
|
11
|
+
}, o = (e) => {
|
|
12
|
+
e.preventDefault(), p();
|
|
13
|
+
}, l = () => {
|
|
14
|
+
e = !0, clearInterval(h), t?.abort(), document.removeEventListener("visibilitychange", r), window.removeEventListener("focus", r), window.removeEventListener("pageshow", r), window.removeEventListener("pointerdown", i, !0), window.removeEventListener("keydown", i, !0), window.removeEventListener(a, o);
|
|
15
|
+
}, p = () => {
|
|
16
|
+
u(!0), l();
|
|
17
|
+
}, m = async () => {
|
|
18
|
+
if (e || t) return;
|
|
19
|
+
let n = new AbortController();
|
|
20
|
+
t = n;
|
|
21
|
+
let r = setTimeout(() => n.abort(), c);
|
|
22
|
+
try {
|
|
23
|
+
let { buildId: t } = await f.current(n.signal);
|
|
24
|
+
if (e || n.signal.aborted || !t) return;
|
|
25
|
+
d.current === null ? d.current = t : t !== d.current && p();
|
|
26
|
+
} catch {} finally {
|
|
27
|
+
clearTimeout(r), t = null;
|
|
28
|
+
}
|
|
29
|
+
}, h = setInterval(() => {
|
|
30
|
+
document.visibilityState === "visible" && m();
|
|
31
|
+
}, s);
|
|
32
|
+
return document.addEventListener("visibilitychange", r), window.addEventListener("focus", r), window.addEventListener("pageshow", r), window.addEventListener("pointerdown", i, !0), window.addEventListener("keydown", i, !0), window.addEventListener(a, o), m(), l;
|
|
33
|
+
}, [s, c]), { isNewVersionAvailable: l };
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { o as useAppVersionCheck };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** Host storage operations; a nullish read means no stored value. */
|
|
2
|
+
export interface PersistedStateStorage<TStored> {
|
|
3
|
+
/** Reads a host-owned key. */
|
|
4
|
+
read: (key: string) => TStored | null | undefined;
|
|
5
|
+
/** Writes a host-owned key. */
|
|
6
|
+
write: (key: string, value: TStored) => void;
|
|
7
|
+
}
|
|
8
|
+
/** Host serialization policy. */
|
|
9
|
+
export interface PersistedStateCodec<T, TStored> {
|
|
10
|
+
/** Converts storage data into state. */
|
|
11
|
+
decode: (value: TStored) => T;
|
|
12
|
+
/** Converts state into storage data. */
|
|
13
|
+
encode: (value: T) => TStored;
|
|
14
|
+
}
|
|
15
|
+
/** Inputs for mount-initialized persisted state. */
|
|
16
|
+
export interface UsePersistedStateOptions<T, TStored> {
|
|
17
|
+
/** Host-owned storage key. */
|
|
18
|
+
key: string;
|
|
19
|
+
/** Fallback when reading or decoding fails. */
|
|
20
|
+
initialValue: T;
|
|
21
|
+
/** Host storage implementation. */
|
|
22
|
+
storage: PersistedStateStorage<TStored>;
|
|
23
|
+
/** Host serialization implementation. */
|
|
24
|
+
codec: PersistedStateCodec<T, TStored>;
|
|
25
|
+
}
|
|
26
|
+
/** Initializes once from storage and preserves in-memory updates when persistence fails. */
|
|
27
|
+
export declare const usePersistedState: <T, TStored>({ key, initialValue, storage, codec, }: UsePersistedStateOptions<T, TStored>) => [T, (value: T) => void];
|
|
28
|
+
//# sourceMappingURL=usePersistedState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePersistedState.d.ts","sourceRoot":"","sources":["../../../src/shared/usePersistedState/usePersistedState.ts"],"names":[],"mappings":"AAEA,qEAAqE;AACrE,MAAM,WAAW,qBAAqB,CAAC,OAAO;IAC5C,8BAA8B;IAC9B,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;IAClD,+BAA+B;IAC/B,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9C;AACD,iCAAiC;AACjC,MAAM,WAAW,mBAAmB,CAAC,CAAC,EAAE,OAAO;IAC7C,wCAAwC;IACxC,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,CAAC,CAAC;IAC9B,wCAAwC;IACxC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC;CAC/B;AACD,oDAAoD;AACpD,MAAM,WAAW,wBAAwB,CAAC,CAAC,EAAE,OAAO;IAClD,8BAA8B;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,+CAA+C;IAC/C,YAAY,EAAE,CAAC,CAAC;IAChB,mCAAmC;IACnC,OAAO,EAAE,qBAAqB,CAAC,OAAO,CAAC,CAAC;IACxC,yCAAyC;IACzC,KAAK,EAAE,mBAAmB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;CACxC;AACD,4FAA4F;AAC5F,eAAO,MAAM,iBAAiB,GAAI,CAAC,EAAE,OAAO,EAAE,wCAK3C,wBAAwB,CAAC,CAAC,EAAE,OAAO,CAAC,KAAG,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAuB/D,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useCallback as e, useState as t } from "react";
|
|
2
|
+
//#region src/shared/usePersistedState/usePersistedState.ts
|
|
3
|
+
var n = ({ key: n, initialValue: r, storage: i, codec: a }) => {
|
|
4
|
+
let [o, s] = t(() => {
|
|
5
|
+
try {
|
|
6
|
+
let e = i.read(n);
|
|
7
|
+
return e == null ? r : a.decode(e);
|
|
8
|
+
} catch {
|
|
9
|
+
return r;
|
|
10
|
+
}
|
|
11
|
+
}), c = i.write, l = a.encode;
|
|
12
|
+
return [o, e((e) => {
|
|
13
|
+
s(e);
|
|
14
|
+
try {
|
|
15
|
+
c(n, l(e));
|
|
16
|
+
} catch {}
|
|
17
|
+
}, [
|
|
18
|
+
n,
|
|
19
|
+
c,
|
|
20
|
+
l
|
|
21
|
+
])];
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
export { n as usePersistedState };
|
package/sharing.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { RecipientsCountStatus as e, useShareRecipientsCount as t } from "./useShareRecipientsCount/useShareRecipientsCount.js";
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { AcceptShareInvitationErrorKind as n } from "./share-invitation/types.js";
|
|
3
|
+
import { DEFAULT_ACCEPT_SHARE_INVITATION_ERROR_LABELS as r, resolveAcceptShareInvitationError as i } from "./share-invitation/share-invitation-error.js";
|
|
4
|
+
import { useAcceptShareInvitation as a } from "./share-invitation/useAcceptShareInvitation/useAcceptShareInvitation.js";
|
|
5
|
+
import { useShareLink as o } from "./useShareLink/useShareLink.js";
|
|
6
|
+
export { n as AcceptShareInvitationErrorKind, r as DEFAULT_ACCEPT_SHARE_INVITATION_ERROR_LABELS, e as RecipientsCountStatus, i as resolveAcceptShareInvitationError, a as useAcceptShareInvitation, o as useShareLink, t as useShareRecipientsCount };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ExternalServiceAuthType, ExternalServiceCredentialsLevel, ExternalServiceOAuthSettings } from '../external-services/useExternalServiceLogin';
|
|
2
|
+
import { ToolsetCredentialsLevel } from '../oauth/types';
|
|
3
|
+
import { PendingSigninEvent } from '../shared/client-channel';
|
|
4
|
+
import { SigninInterruptAnnouncementKind, SigninInterruptRowError, SigninInterruptRowStatus } from './types';
|
|
5
|
+
/** Display and login metadata resolved for the resource behind a pending sign-in event. */
|
|
6
|
+
export interface SigninRowInfo {
|
|
7
|
+
/** Resource display name, or a fallback derived from its id while metadata is missing. */
|
|
8
|
+
displayName: string;
|
|
9
|
+
/** Resource version shown next to the name, when known. */
|
|
10
|
+
displayVersion?: string;
|
|
11
|
+
/** Authentication mechanism, or `undefined` while metadata is missing. */
|
|
12
|
+
authenticationType?: ExternalServiceAuthType;
|
|
13
|
+
/** Credentials level the login targets. */
|
|
14
|
+
credentialsLevel: ToolsetCredentialsLevel | ExternalServiceCredentialsLevel;
|
|
15
|
+
/** OAuth client settings for the authorize URL, when the resource uses OAuth. */
|
|
16
|
+
oauthSettings?: ExternalServiceOAuthSettings;
|
|
17
|
+
}
|
|
18
|
+
/** One pending sign-in event with its resolved metadata and local row state. */
|
|
19
|
+
export interface SigninInterruptRow {
|
|
20
|
+
/** The pending client-channel event this row resolves. */
|
|
21
|
+
event: PendingSigninEvent;
|
|
22
|
+
/** Resolved display and login metadata. */
|
|
23
|
+
info: SigninRowInfo;
|
|
24
|
+
/** Whether a login or decline is in flight. */
|
|
25
|
+
status: SigninInterruptRowStatus;
|
|
26
|
+
/** Shorthand for `status === SigninInterruptRowStatus.Processing`. */
|
|
27
|
+
isProcessing: boolean;
|
|
28
|
+
/** Recoverable failure of the last attempt, if any. */
|
|
29
|
+
error?: SigninInterruptRowError;
|
|
30
|
+
/** API key typed into the row; `''` until the user types. */
|
|
31
|
+
apiKey: string;
|
|
32
|
+
/** Whether the resource takes an API key, so the row shows a key field. */
|
|
33
|
+
requiresApiKey: boolean;
|
|
34
|
+
/** Whether the resource needs no credentials, so the row offers no actions. */
|
|
35
|
+
requiresNoCredentials: boolean;
|
|
36
|
+
/** Whether the resource uses DIAL-native offline credentials. */
|
|
37
|
+
isDialNative: boolean;
|
|
38
|
+
/** Whether `Log in` can be submitted: always, except an API-key row with a blank key. */
|
|
39
|
+
canSubmitLogin: boolean;
|
|
40
|
+
}
|
|
41
|
+
/** Status a sign-in interrupt announces after resolving an event. */
|
|
42
|
+
export interface SigninInterruptAnnouncement {
|
|
43
|
+
/** Which resolution happened. */
|
|
44
|
+
kind: SigninInterruptAnnouncementKind;
|
|
45
|
+
/** Display name of the resolved resource; `''` when it is no longer known. */
|
|
46
|
+
name: string;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/signin-interrupt/models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,+BAA+B,EAC/B,4BAA4B,EAC7B,MAAM,8CAA8C,CAAC;AACtD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EACV,+BAA+B,EAC/B,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAEjB,2FAA2F;AAC3F,MAAM,WAAW,aAAa;IAC5B,0FAA0F;IAC1F,WAAW,EAAE,MAAM,CAAC;IACpB,2DAA2D;IAC3D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,0EAA0E;IAC1E,kBAAkB,CAAC,EAAE,uBAAuB,CAAC;IAC7C,2CAA2C;IAC3C,gBAAgB,EAAE,uBAAuB,GAAG,+BAA+B,CAAC;IAC5E,iFAAiF;IACjF,aAAa,CAAC,EAAE,4BAA4B,CAAC;CAC9C;AAED,gFAAgF;AAChF,MAAM,WAAW,kBAAkB;IACjC,0DAA0D;IAC1D,KAAK,EAAE,kBAAkB,CAAC;IAC1B,2CAA2C;IAC3C,IAAI,EAAE,aAAa,CAAC;IACpB,+CAA+C;IAC/C,MAAM,EAAE,wBAAwB,CAAC;IACjC,sEAAsE;IACtE,YAAY,EAAE,OAAO,CAAC;IACtB,uDAAuD;IACvD,KAAK,CAAC,EAAE,uBAAuB,CAAC;IAChC,6DAA6D;IAC7D,MAAM,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,cAAc,EAAE,OAAO,CAAC;IACxB,+EAA+E;IAC/E,qBAAqB,EAAE,OAAO,CAAC;IAC/B,iEAAiE;IACjE,YAAY,EAAE,OAAO,CAAC;IACtB,yFAAyF;IACzF,cAAc,EAAE,OAAO,CAAC;CACzB;AAED,qEAAqE;AACrE,MAAM,WAAW,2BAA2B;IAC1C,iCAAiC;IACjC,IAAI,EAAE,+BAA+B,CAAC;IACtC,8EAA8E;IAC9E,IAAI,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DialToolsetDto, GetExternalServiceResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
import { PendingSigninEvent } from '../shared/client-channel';
|
|
3
|
+
import { SigninRowInfo } from './models';
|
|
4
|
+
/** Returns the key of a pending event's underlying resource: the toolset id, or the external-service scope id. */
|
|
5
|
+
export declare const getSigninEventResourceKey: (event: PendingSigninEvent) => string;
|
|
6
|
+
/** Returns the row metadata for a toolset, falling back to a name derived from its id while `toolset` is unknown. */
|
|
7
|
+
export declare const resolveToolsetSigninRowInfo: (toolsetId: string, toolset: DialToolsetDto | undefined, activeLocale: string, primaryLocale: string) => SigninRowInfo;
|
|
8
|
+
/** Returns the row metadata for an application's external service, falling back to its decoded name while `service` is unknown. */
|
|
9
|
+
export declare const resolveExternalServiceSigninRowInfo: (serviceName: string, service: GetExternalServiceResponseDto | undefined) => SigninRowInfo;
|
|
10
|
+
//# sourceMappingURL=signin-row-info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signin-row-info.d.ts","sourceRoot":"","sources":["../../src/signin-interrupt/signin-row-info.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,6BAA6B,EAC9B,MAAM,+BAA+B,CAAC;AAWvC,OAAO,EACL,KAAK,kBAAkB,EAExB,MAAM,0BAA0B,CAAC;AAMlC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,kHAAkH;AAClH,eAAO,MAAM,yBAAyB,GAAI,OAAO,kBAAkB,KAAG,MAGL,CAAC;AAElE,qHAAqH;AACrH,eAAO,MAAM,2BAA2B,GACtC,WAAW,MAAM,EACjB,SAAS,cAAc,GAAG,SAAS,EACnC,cAAc,MAAM,EACpB,eAAe,MAAM,KACpB,aASD,CAAC;AAEH,mIAAmI;AACnI,eAAO,MAAM,mCAAmC,GAC9C,aAAa,MAAM,EACnB,SAAS,6BAA6B,GAAG,SAAS,KACjD,aAiBD,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { getToolsetFallbackName as e, resolveToolsetCredentialsLevel as t } from "../oauth/toolset-id.js";
|
|
2
|
+
import { resolveLocalizedText as n } from "../shared/locale.js";
|
|
3
|
+
import { toToolsetOAuthSettings as r } from "../oauth/authorize-url.js";
|
|
4
|
+
import { buildExternalServiceScopeId as i, getExternalServiceFallbackName as a } from "../shared/external-services.js";
|
|
5
|
+
import { ExternalServiceAuthStatus as o, ExternalServiceCredentialsLevel as s } from "../external-services/useExternalServiceLogin.js";
|
|
6
|
+
import { PendingSigninEventKind as c } from "../shared/client-channel.js";
|
|
7
|
+
//#region src/signin-interrupt/signin-row-info.ts
|
|
8
|
+
var l = (e) => e.kind === c.Toolset ? e.toolsetId : i(e.appId, e.serviceName), u = (i, a, o, s) => ({
|
|
9
|
+
displayName: n(a?.displayName, o, s) || e(i),
|
|
10
|
+
displayVersion: a?.displayVersion,
|
|
11
|
+
authenticationType: a?.authSettings?.authenticationType,
|
|
12
|
+
credentialsLevel: t(i),
|
|
13
|
+
oauthSettings: r(a?.authSettings)
|
|
14
|
+
}), d = (e, t) => ({
|
|
15
|
+
displayName: t?.displayName || a(e),
|
|
16
|
+
authenticationType: t?.authenticationType,
|
|
17
|
+
credentialsLevel: t?.globalAuthStatus != null && t.globalAuthStatus !== o.SignedIn && t.userLevelAuthStatus == null ? s.Global : s.User,
|
|
18
|
+
oauthSettings: r(t)
|
|
19
|
+
});
|
|
20
|
+
//#endregion
|
|
21
|
+
export { l as getSigninEventResourceKey, d as resolveExternalServiceSigninRowInfo, u as resolveToolsetSigninRowInfo };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** Progress of one sign-in interrupt row. */
|
|
2
|
+
export declare enum SigninInterruptRowStatus {
|
|
3
|
+
/** Awaiting the user's login or decline. */
|
|
4
|
+
Idle = "idle",
|
|
5
|
+
/** A login or decline for this row is in flight. */
|
|
6
|
+
Processing = "processing"
|
|
7
|
+
}
|
|
8
|
+
/** Recoverable failure shown on a sign-in interrupt row; the event stays pending. */
|
|
9
|
+
export declare enum SigninInterruptRowError {
|
|
10
|
+
/** The login failed, or reporting its success to DIAL Core failed. */
|
|
11
|
+
LoginFailed = "login-failed",
|
|
12
|
+
/** The browser blocked the OAuth popup. */
|
|
13
|
+
PopupBlocked = "popup-blocked",
|
|
14
|
+
/** Reporting the decline to DIAL Core failed. */
|
|
15
|
+
DeclineFailed = "decline-failed",
|
|
16
|
+
/** A DIAL administrator must approve the application's access first. */
|
|
17
|
+
AdminConsentRequired = "admin-consent-required",
|
|
18
|
+
/** Offline access is not configured for the user's account. */
|
|
19
|
+
OfflineUnavailable = "offline-unavailable"
|
|
20
|
+
}
|
|
21
|
+
/** Kind of status a sign-in interrupt announces after resolving an event. */
|
|
22
|
+
export declare enum SigninInterruptAnnouncementKind {
|
|
23
|
+
/** A login succeeded and its event was reported as `success`. */
|
|
24
|
+
LoginSucceeded = "login-succeeded",
|
|
25
|
+
/** An event was declined and reported as `denied`. */
|
|
26
|
+
Declined = "declined"
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/signin-interrupt/types.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,oBAAY,wBAAwB;IAClC,4CAA4C;IAC5C,IAAI,SAAS;IACb,oDAAoD;IACpD,UAAU,eAAe;CAC1B;AAED,qFAAqF;AACrF,oBAAY,uBAAuB;IACjC,sEAAsE;IACtE,WAAW,iBAAiB;IAC5B,2CAA2C;IAC3C,YAAY,kBAAkB;IAC9B,iDAAiD;IACjD,aAAa,mBAAmB;IAChC,wEAAwE;IACxE,oBAAoB,2BAA2B;IAC/C,+DAA+D;IAC/D,kBAAkB,wBAAwB;CAC3C;AAED,6EAA6E;AAC7E,oBAAY,+BAA+B;IACzC,iEAAiE;IACjE,cAAc,oBAAoB;IAClC,sDAAsD;IACtD,QAAQ,aAAa;CACtB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/signin-interrupt/types.ts
|
|
2
|
+
var e = /* @__PURE__ */ function(e) {
|
|
3
|
+
return e.Idle = "idle", e.Processing = "processing", e;
|
|
4
|
+
}({}), t = /* @__PURE__ */ function(e) {
|
|
5
|
+
return e.LoginFailed = "login-failed", e.PopupBlocked = "popup-blocked", e.DeclineFailed = "decline-failed", e.AdminConsentRequired = "admin-consent-required", e.OfflineUnavailable = "offline-unavailable", e;
|
|
6
|
+
}({}), n = /* @__PURE__ */ function(e) {
|
|
7
|
+
return e.LoginSucceeded = "login-succeeded", e.Declined = "declined", e;
|
|
8
|
+
}({});
|
|
9
|
+
//#endregion
|
|
10
|
+
export { n as SigninInterruptAnnouncementKind, t as SigninInterruptRowError, e as SigninInterruptRowStatus };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { DialToolsetDto, GetExternalServiceResponseDto, ReportClientChannelDtoResultEnum } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
import { ExternalServiceLoginOutcome, ExternalServiceLoginParams } from '../../external-services/useExternalServiceLogin';
|
|
3
|
+
import { ToolsetLoginOutcome, ToolsetLoginParams } from '../../oauth/useToolsetLogin/useToolsetLogin';
|
|
4
|
+
import { PendingSigninEvent } from '../../shared/client-channel';
|
|
5
|
+
import { SigninInterruptAnnouncement, SigninInterruptRow } from '../models';
|
|
6
|
+
/** Host data and operations `useSigninInterrupt` resolves pending sign-in events with. */
|
|
7
|
+
export interface UseSigninInterruptOptions {
|
|
8
|
+
/** Pending client-channel sign-in events, in display order. */
|
|
9
|
+
pendingEvents: PendingSigninEvent[];
|
|
10
|
+
/** Toolsets the host already has loaded; a listed toolset is not fetched again. */
|
|
11
|
+
toolsets: DialToolsetDto[];
|
|
12
|
+
/** Locale toolset display names are resolved for. */
|
|
13
|
+
activeLocale: string;
|
|
14
|
+
/** Locale used when a display name has no entry for `activeLocale`. */
|
|
15
|
+
primaryLocale: string;
|
|
16
|
+
/** Fetches a toolset that `toolsets` does not list; a rejection keeps the fallback name. */
|
|
17
|
+
getToolset: (toolsetId: string) => Promise<DialToolsetDto>;
|
|
18
|
+
/** Fetches an application's external service; a rejection keeps the fallback name. */
|
|
19
|
+
getExternalService: (appId: string, serviceName: string) => Promise<GetExternalServiceResponseDto>;
|
|
20
|
+
/** Logs in to a toolset, e.g. `useToolsetLogin().login`. */
|
|
21
|
+
loginToolset: (params: ToolsetLoginParams) => Promise<ToolsetLoginOutcome>;
|
|
22
|
+
/** Logs in to an external service, e.g. `useExternalServiceLogin().login`. */
|
|
23
|
+
loginExternalService: (params: ExternalServiceLoginParams) => Promise<ExternalServiceLoginOutcome>;
|
|
24
|
+
/** Refreshes the host's toolset list after a successful toolset login, before success is reported. */
|
|
25
|
+
refetchToolsets: () => Promise<unknown>;
|
|
26
|
+
/** Reports an event's resolution on the client channel; a rejection leaves the event pending. */
|
|
27
|
+
reportEvent: (eventId: string, result: ReportClientChannelDtoResultEnum) => Promise<unknown>;
|
|
28
|
+
}
|
|
29
|
+
/** Rows, announcement and actions of a sign-in interrupt dialog. */
|
|
30
|
+
export interface UseSigninInterruptResult {
|
|
31
|
+
/** One row per pending event, in `pendingEvents` order. */
|
|
32
|
+
rows: SigninInterruptRow[];
|
|
33
|
+
/** Latest resolution to announce, or `undefined` before the first one. */
|
|
34
|
+
announcement?: SigninInterruptAnnouncement;
|
|
35
|
+
/** Whether logins grant offline-use consent. Defaults to `true`. */
|
|
36
|
+
offlineUsageConsent: boolean;
|
|
37
|
+
/** Sets `offlineUsageConsent`. */
|
|
38
|
+
setOfflineUsageConsent: (value: boolean) => void;
|
|
39
|
+
/** Whether any row uses an API key or OAuth, so the offline-use consent control applies. */
|
|
40
|
+
isOfflineUsageConsentShown: boolean;
|
|
41
|
+
/** Stores a row's typed API key and clears its error. */
|
|
42
|
+
changeApiKey: (eventId: string, value: string) => void;
|
|
43
|
+
/** Starts a login for a row; synchronous up to the login call so an OAuth popup stays inside the click. */
|
|
44
|
+
login: (eventId: string) => void;
|
|
45
|
+
/** Reports a row as `denied`. */
|
|
46
|
+
decline: (eventId: string) => Promise<void>;
|
|
47
|
+
/** Declines every pending event. */
|
|
48
|
+
declineAll: () => void;
|
|
49
|
+
}
|
|
50
|
+
/** Resolves pending sign-in events into dialog rows and runs their login, decline and result reporting. */
|
|
51
|
+
export declare const useSigninInterrupt: ({ pendingEvents, toolsets, activeLocale, primaryLocale, getToolset, getExternalService, loginToolset, loginExternalService, refetchToolsets, reportEvent, }: UseSigninInterruptOptions) => UseSigninInterruptResult;
|
|
52
|
+
//# sourceMappingURL=useSigninInterrupt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSigninInterrupt.d.ts","sourceRoot":"","sources":["../../../src/signin-interrupt/useSigninInterrupt/useSigninInterrupt.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,6BAA6B,EAClC,gCAAgC,EACjC,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAGL,KAAK,2BAA2B,EAEhC,KAAK,0BAA0B,EAChC,MAAM,iDAAiD,CAAC;AAKzD,OAAO,EACL,KAAK,mBAAmB,EAExB,KAAK,kBAAkB,EACxB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAEL,KAAK,kBAAkB,EAGxB,MAAM,6BAA6B,CAAC;AAErC,OAAO,KAAK,EACV,2BAA2B,EAC3B,kBAAkB,EAEnB,MAAM,WAAW,CAAC;AAYnB,0FAA0F;AAC1F,MAAM,WAAW,yBAAyB;IACxC,+DAA+D;IAC/D,aAAa,EAAE,kBAAkB,EAAE,CAAC;IACpC,mFAAmF;IACnF,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,qDAAqD;IACrD,YAAY,EAAE,MAAM,CAAC;IACrB,uEAAuE;IACvE,aAAa,EAAE,MAAM,CAAC;IACtB,4FAA4F;IAC5F,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IAC3D,sFAAsF;IACtF,kBAAkB,EAAE,CAClB,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,KAChB,OAAO,CAAC,6BAA6B,CAAC,CAAC;IAC5C,4DAA4D;IAC5D,YAAY,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC3E,8EAA8E;IAC9E,oBAAoB,EAAE,CACpB,MAAM,EAAE,0BAA0B,KAC/B,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAC1C,sGAAsG;IACtG,eAAe,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IACxC,iGAAiG;IACjG,WAAW,EAAE,CACX,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,gCAAgC,KACrC,OAAO,CAAC,OAAO,CAAC,CAAC;CACvB;AAED,oEAAoE;AACpE,MAAM,WAAW,wBAAwB;IACvC,2DAA2D;IAC3D,IAAI,EAAE,kBAAkB,EAAE,CAAC;IAC3B,0EAA0E;IAC1E,YAAY,CAAC,EAAE,2BAA2B,CAAC;IAC3C,oEAAoE;IACpE,mBAAmB,EAAE,OAAO,CAAC;IAC7B,kCAAkC;IAClC,sBAAsB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,4FAA4F;IAC5F,0BAA0B,EAAE,OAAO,CAAC;IACpC,yDAAyD;IACzD,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvD,2GAA2G;IAC3G,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,iCAAiC;IACjC,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,oCAAoC;IACpC,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AA0BD,2GAA2G;AAC3G,eAAO,MAAM,kBAAkB,GAAI,6JAWhC,yBAAyB,KAAG,wBA4a9B,CAAC"}
|