botframework-webchat-core 4.18.1-main.20260416.88357ae → 4.18.1
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/dist/botframework-webchat-core.d.mts +514 -350
- package/dist/botframework-webchat-core.mjs +2 -1
- package/dist/botframework-webchat-core.mjs.LEGAL.txt +0 -0
- package/dist/botframework-webchat-core.mjs.map +1 -1
- package/dist/metafile-esm.json +1 -1
- package/lib/actions/clearSuggestedActions.js +15 -0
- package/lib/actions/connect.js +33 -0
- package/lib/actions/connectionStatusUpdate.js +20 -0
- package/lib/actions/deleteActivity.d.ts +13 -0
- package/lib/actions/deleteActivity.d.ts.map +1 -0
- package/lib/actions/deleteActivity.js +19 -0
- package/lib/actions/disconnect.js +21 -0
- package/lib/actions/dismissNotification.d.ts +12 -0
- package/lib/actions/dismissNotification.d.ts.map +1 -0
- package/lib/actions/dismissNotification.js +19 -0
- package/lib/actions/emitTypingIndicator.js +15 -0
- package/lib/actions/incomingActivity.d.ts +14 -0
- package/lib/actions/incomingActivity.d.ts.map +1 -0
- package/lib/actions/incomingActivity.js +19 -0
- package/lib/actions/markActivity.d.ts +17 -0
- package/lib/actions/markActivity.d.ts.map +1 -0
- package/lib/actions/markActivity.js +22 -0
- package/lib/actions/postActivity.d.ts +64 -0
- package/lib/actions/postActivity.d.ts.map +1 -0
- package/lib/actions/postActivity.js +31 -0
- package/lib/actions/queueIncomingActivity.js +18 -0
- package/lib/actions/reconnect.js +17 -0
- package/lib/actions/sagaError.d.ts +8 -0
- package/lib/actions/sagaError.d.ts.map +1 -0
- package/lib/actions/sagaError.js +15 -0
- package/lib/actions/sendEvent.js +19 -0
- package/lib/actions/sendFiles.d.ts +19 -0
- package/lib/actions/sendFiles.d.ts.map +1 -0
- package/lib/actions/sendFiles.js +20 -0
- package/lib/actions/sendMessage.d.ts +19 -0
- package/lib/actions/sendMessage.d.ts.map +1 -0
- package/lib/actions/sendMessage.js +24 -0
- package/lib/actions/sendMessageBack.js +20 -0
- package/lib/actions/sendPostBack.js +18 -0
- package/lib/actions/setClockSkewAdjustment.js +12 -0
- package/lib/actions/setDictateInterims.js +18 -0
- package/lib/actions/setDictateState.js +18 -0
- package/lib/actions/setLanguage.js +18 -0
- package/lib/actions/setNotification.d.ts +10 -0
- package/lib/actions/setNotification.d.ts.map +1 -0
- package/lib/actions/setNotification.js +37 -0
- package/lib/actions/setReferenceGrammarID.js +18 -0
- package/lib/actions/setSendBox.js +18 -0
- package/lib/actions/setSendBoxAttachments.d.ts +13 -0
- package/lib/actions/setSendBoxAttachments.d.ts.map +1 -0
- package/lib/actions/setSendBoxAttachments.js +18 -0
- package/lib/actions/setSendTimeout.js +18 -0
- package/lib/actions/setSendTypingIndicator.d.ts +11 -0
- package/lib/actions/setSendTypingIndicator.d.ts.map +1 -0
- package/lib/actions/setSendTypingIndicator.js +18 -0
- package/lib/actions/setSuggestedActions.js +20 -0
- package/lib/actions/startDictate.js +15 -0
- package/lib/actions/startSpeakingActivity.js +15 -0
- package/lib/actions/stopDictate.js +15 -0
- package/lib/actions/stopSpeakingActivity.js +15 -0
- package/lib/actions/submitSendBox.js +22 -0
- package/lib/actions/updateConnectionStatus.js +18 -0
- package/lib/constants/ActivityClientState.js +16 -0
- package/lib/constants/DictateState.js +17 -0
- package/lib/createPromiseQueue.js +30 -0
- package/lib/createReducer.d.ts +60 -0
- package/lib/createReducer.d.ts.map +1 -0
- package/lib/createReducer.js +45 -0
- package/lib/createSagas.d.ts +8 -0
- package/lib/createSagas.d.ts.map +1 -0
- package/lib/createSagas.js +112 -0
- package/{dist/createStore-CmrcJOVc.d.ts → lib/createStore.d.ts} +7 -28
- package/lib/createStore.d.ts.map +1 -0
- package/lib/createStore.js +131 -0
- package/lib/definitions/activityFromBot.js +11 -0
- package/lib/definitions/speakableActivity.js +10 -0
- package/lib/definitions/speakingActivity.js +13 -0
- package/lib/index.d.ts +76 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +309 -0
- package/lib/reducers/connectivityStatus.js +49 -0
- package/lib/reducers/createActivitiesReducer.d.ts +12 -0
- package/lib/reducers/createActivitiesReducer.d.ts.map +1 -0
- package/lib/reducers/createActivitiesReducer.js +267 -0
- package/lib/reducers/createInternalReducer.d.ts +10 -0
- package/lib/reducers/createInternalReducer.d.ts.map +1 -0
- package/lib/reducers/createInternalReducer.js +19 -0
- package/lib/reducers/createNotificationsReducer.d.ts +11 -0
- package/lib/reducers/createNotificationsReducer.d.ts.map +1 -0
- package/lib/reducers/createNotificationsReducer.js +55 -0
- package/lib/reducers/createTypingReducer.d.ts +14 -0
- package/lib/reducers/createTypingReducer.d.ts.map +1 -0
- package/lib/reducers/createTypingReducer.js +50 -0
- package/lib/reducers/dictateInterims.js +23 -0
- package/lib/reducers/dictateState.js +38 -0
- package/lib/reducers/language.js +23 -0
- package/lib/reducers/private/findBeforeAfter.d.ts +4 -0
- package/lib/reducers/private/findBeforeAfter.d.ts.map +1 -0
- package/lib/reducers/private/findBeforeAfter.js +24 -0
- package/lib/reducers/readyState.js +23 -0
- package/lib/reducers/referenceGrammarID.js +23 -0
- package/lib/reducers/sendBoxAttachments.d.ts +9 -0
- package/lib/reducers/sendBoxAttachments.d.ts.map +1 -0
- package/lib/reducers/sendBoxAttachments.js +23 -0
- package/lib/reducers/sendBoxValue.js +23 -0
- package/lib/reducers/sendTimeout.js +23 -0
- package/lib/reducers/sendTypingIndicator.js +23 -0
- package/lib/reducers/shouldSpeakIncomingActivity.js +25 -0
- package/lib/reducers/suggestedActions.js +32 -0
- package/lib/sagas/clearSuggestedActionsOnPostActivitySaga.js +62 -0
- package/lib/sagas/connectSaga.js +445 -0
- package/lib/sagas/connectionStatusToNotificationSaga.js +107 -0
- package/lib/sagas/connectionStatusUpdateSaga.js +63 -0
- package/lib/sagas/detectSlowConnectionSaga.d.ts +5 -0
- package/lib/sagas/detectSlowConnectionSaga.d.ts.map +1 -0
- package/lib/sagas/detectSlowConnectionSaga.js +50 -0
- package/lib/sagas/effects/forever.js +19 -0
- package/lib/sagas/effects/forkPut.js +51 -0
- package/lib/sagas/effects/observeEach.js +45 -0
- package/lib/sagas/effects/observeOnce.d.ts +3 -0
- package/lib/sagas/effects/observeOnce.d.ts.map +1 -0
- package/lib/sagas/effects/observeOnce.js +42 -0
- package/lib/sagas/effects/whileConnected.d.ts +7 -0
- package/lib/sagas/effects/whileConnected.d.ts.map +1 -0
- package/lib/sagas/effects/whileConnected.js +55 -0
- package/lib/sagas/emitTypingIndicatorToPostActivitySaga.js +63 -0
- package/lib/sagas/markAllAsSpokenOnStopSpeakActivitySaga.js +78 -0
- package/lib/sagas/observeActivitySaga.d.ts +2 -0
- package/lib/sagas/observeActivitySaga.d.ts.map +1 -0
- package/lib/sagas/observeActivitySaga.js +117 -0
- package/lib/sagas/postActivitySaga.d.ts +3 -0
- package/lib/sagas/postActivitySaga.d.ts.map +1 -0
- package/lib/sagas/postActivitySaga.js +264 -0
- package/lib/sagas/queueIncomingActivitySaga.d.ts +3 -0
- package/lib/sagas/queueIncomingActivitySaga.d.ts.map +1 -0
- package/lib/sagas/queueIncomingActivitySaga.js +197 -0
- package/lib/sagas/sendEventToPostActivitySaga.js +68 -0
- package/lib/sagas/sendFilesToPostActivitySaga.js +85 -0
- package/lib/sagas/sendMessageBackToPostActivitySaga.js +70 -0
- package/lib/sagas/sendMessageToPostActivitySaga.d.ts +2 -0
- package/lib/sagas/sendMessageToPostActivitySaga.d.ts.map +1 -0
- package/lib/sagas/sendMessageToPostActivitySaga.js +91 -0
- package/lib/sagas/sendPostBackToPostActivitySaga.js +69 -0
- package/lib/sagas/sendTypingIndicatorOnSetSendBoxSaga.d.ts +3 -0
- package/lib/sagas/sendTypingIndicatorOnSetSendBoxSaga.d.ts.map +1 -0
- package/lib/sagas/sendTypingIndicatorOnSetSendBoxSaga.js +145 -0
- package/lib/sagas/speakActivityAndStartDictateOnIncomingActivityFromOthersSaga.js +106 -0
- package/lib/sagas/startDictateOnSpeakCompleteSaga.js +65 -0
- package/lib/sagas/startSpeakActivityOnPostActivitySaga.js +62 -0
- package/lib/sagas/stopDictateOnCardActionSaga.js +65 -0
- package/lib/sagas/stopSpeakingActivityOnInputSaga.js +68 -0
- package/lib/sagas/submitSendBoxSaga.js +84 -0
- package/lib/selectors/activities.d.ts +9 -0
- package/lib/selectors/activities.d.ts.map +1 -0
- package/lib/selectors/activities.js +33 -0
- package/lib/selectors/combineSelectors.js +31 -0
- package/lib/selectors/dictateState.js +12 -0
- package/lib/selectors/language.d.ts +4 -0
- package/lib/selectors/language.d.ts.map +1 -0
- package/lib/selectors/language.js +12 -0
- package/lib/selectors/notifications.js +13 -0
- package/lib/selectors/sendBoxAttachments.js +11 -0
- package/lib/selectors/sendBoxValue.js +12 -0
- package/lib/selectors/sendTimeout.d.ts +4 -0
- package/lib/selectors/sendTimeout.d.ts.map +1 -0
- package/lib/selectors/sendTimeout.js +12 -0
- package/lib/selectors/sendTypingIndicator.d.ts +4 -0
- package/lib/selectors/sendTypingIndicator.d.ts.map +1 -0
- package/lib/selectors/sendTypingIndicator.js +12 -0
- package/lib/selectors/shouldSpeakIncomingActivity.js +12 -0
- package/lib/types/AnyAnd.d.ts +2 -0
- package/lib/types/AnyAnd.d.ts.map +1 -0
- package/lib/types/AnyAnd.js +6 -0
- package/lib/types/GlobalScopePonyfill.d.ts +8 -0
- package/lib/types/GlobalScopePonyfill.d.ts.map +1 -0
- package/lib/types/GlobalScopePonyfill.js +6 -0
- package/lib/types/OneOrMany.d.ts +3 -0
- package/lib/types/OneOrMany.d.ts.map +1 -0
- package/lib/types/OneOrMany.js +6 -0
- package/lib/types/SendBoxAttachment.d.ts +5 -0
- package/lib/types/SendBoxAttachment.d.ts.map +1 -0
- package/lib/types/SendBoxAttachment.js +6 -0
- package/lib/types/WebChatActivity.d.ts +128 -0
- package/lib/types/WebChatActivity.d.ts.map +1 -0
- package/lib/types/WebChatActivity.js +6 -0
- package/lib/types/external/DirectLineActivity.d.ts +3 -0
- package/lib/types/external/DirectLineActivity.d.ts.map +1 -0
- package/lib/types/external/DirectLineActivity.js +6 -0
- package/lib/types/external/DirectLineAnimationCard.d.ts +6 -0
- package/lib/types/external/DirectLineAnimationCard.d.ts.map +1 -0
- package/lib/types/external/DirectLineAnimationCard.js +6 -0
- package/lib/types/external/DirectLineAttachment.d.ts +9 -0
- package/lib/types/external/DirectLineAttachment.d.ts.map +1 -0
- package/lib/types/external/DirectLineAttachment.js +6 -0
- package/lib/types/external/DirectLineAudioCard.d.ts +6 -0
- package/lib/types/external/DirectLineAudioCard.d.ts.map +1 -0
- package/lib/types/external/DirectLineAudioCard.js +6 -0
- package/lib/types/external/DirectLineBasicCardEssence.d.ts +12 -0
- package/lib/types/external/DirectLineBasicCardEssence.d.ts.map +1 -0
- package/lib/types/external/DirectLineBasicCardEssence.js +6 -0
- package/lib/types/external/DirectLineCardAction.d.ts +110 -0
- package/lib/types/external/DirectLineCardAction.d.ts.map +1 -0
- package/lib/types/external/DirectLineCardAction.js +6 -0
- package/lib/types/external/DirectLineCardImage.d.ts +8 -0
- package/lib/types/external/DirectLineCardImage.d.ts.map +1 -0
- package/lib/types/external/DirectLineCardImage.js +6 -0
- package/lib/types/external/DirectLineHeroCard.d.ts +6 -0
- package/lib/types/external/DirectLineHeroCard.d.ts.map +1 -0
- package/lib/types/external/DirectLineHeroCard.js +6 -0
- package/lib/types/external/DirectLineJSBotConnection.d.ts +3 -0
- package/lib/types/external/DirectLineJSBotConnection.d.ts.map +1 -0
- package/lib/types/external/DirectLineJSBotConnection.js +6 -0
- package/lib/types/external/DirectLineMediaCardEssence.d.ts +21 -0
- package/lib/types/external/DirectLineMediaCardEssence.d.ts.map +1 -0
- package/lib/types/external/DirectLineMediaCardEssence.js +6 -0
- package/lib/types/external/DirectLineOAuthCard.d.ts +8 -0
- package/lib/types/external/DirectLineOAuthCard.d.ts.map +1 -0
- package/lib/types/external/DirectLineOAuthCard.js +6 -0
- package/lib/types/external/DirectLineReceiptCard.d.ts +28 -0
- package/lib/types/external/DirectLineReceiptCard.d.ts.map +1 -0
- package/lib/types/external/DirectLineReceiptCard.js +6 -0
- package/lib/types/external/DirectLineSignInCard.d.ts +8 -0
- package/lib/types/external/DirectLineSignInCard.d.ts.map +1 -0
- package/lib/types/external/DirectLineSignInCard.js +6 -0
- package/lib/types/external/DirectLineSuggestedAction.d.ts +7 -0
- package/lib/types/external/DirectLineSuggestedAction.d.ts.map +1 -0
- package/lib/types/external/DirectLineSuggestedAction.js +6 -0
- package/lib/types/external/DirectLineThumbnailCard.d.ts +6 -0
- package/lib/types/external/DirectLineThumbnailCard.d.ts.map +1 -0
- package/lib/types/external/DirectLineThumbnailCard.js +6 -0
- package/lib/types/external/DirectLineVideoCard.d.ts +6 -0
- package/lib/types/external/DirectLineVideoCard.d.ts.map +1 -0
- package/lib/types/external/DirectLineVideoCard.js +6 -0
- package/lib/types/external/Observable.d.ts +49 -0
- package/lib/types/external/Observable.d.ts.map +1 -0
- package/lib/types/external/Observable.js +6 -0
- package/lib/types/external/OrgSchema/Action.d.ts +29 -0
- package/lib/types/external/OrgSchema/Action.d.ts.map +1 -0
- package/lib/types/external/OrgSchema/Action.js +38 -0
- package/lib/types/external/OrgSchema/Claim.d.ts +35 -0
- package/lib/types/external/OrgSchema/Claim.d.ts.map +1 -0
- package/lib/types/external/OrgSchema/Claim.js +41 -0
- package/lib/types/external/OrgSchema/CreativeWork.d.ts +57 -0
- package/lib/types/external/OrgSchema/CreativeWork.d.ts.map +1 -0
- package/lib/types/external/OrgSchema/CreativeWork.js +52 -0
- package/lib/types/external/OrgSchema/DefinedTerm.d.ts +26 -0
- package/lib/types/external/OrgSchema/DefinedTerm.d.ts.map +1 -0
- package/lib/types/external/OrgSchema/DefinedTerm.js +33 -0
- package/lib/types/external/OrgSchema/Project.d.ts +20 -0
- package/lib/types/external/OrgSchema/Project.d.ts.map +1 -0
- package/lib/types/external/OrgSchema/Project.js +32 -0
- package/lib/types/external/OrgSchema/Thing.d.ts +53 -0
- package/lib/types/external/OrgSchema/Thing.d.ts.map +1 -0
- package/lib/types/external/OrgSchema/Thing.js +54 -0
- package/lib/types/external/OrgSchema/VoteAction.d.ts +22 -0
- package/lib/types/external/OrgSchema/VoteAction.d.ts.map +1 -0
- package/lib/types/external/OrgSchema/VoteAction.js +34 -0
- package/lib/types/external/OrgSchema/private/orgSchemaProperties.d.ts +3 -0
- package/lib/types/external/OrgSchema/private/orgSchemaProperties.d.ts.map +1 -0
- package/lib/types/external/OrgSchema/private/orgSchemaProperties.js +22 -0
- package/lib/types/external/OrgSchema/private/orgSchemaProperty.d.ts +4 -0
- package/lib/types/external/OrgSchema/private/orgSchemaProperty.d.ts.map +1 -0
- package/lib/types/external/OrgSchema/private/orgSchemaProperty.js +15 -0
- package/lib/types/internal/GlobalScopeClock.d.ts +15 -0
- package/lib/types/internal/GlobalScopeClock.d.ts.map +1 -0
- package/lib/types/internal/GlobalScopeClock.js +6 -0
- package/lib/types/internal/Notification.d.ts +10 -0
- package/lib/types/internal/Notification.d.ts.map +1 -0
- package/lib/types/internal/Notification.js +6 -0
- package/lib/types/internal/ReduxState.d.ts +19 -0
- package/lib/types/internal/ReduxState.d.ts.map +1 -0
- package/lib/types/internal/ReduxState.js +6 -0
- package/lib/types/internal/SendStatus.d.ts +7 -0
- package/lib/types/internal/SendStatus.d.ts.map +1 -0
- package/lib/types/internal/SendStatus.js +19 -0
- package/lib/types/internal/WebChatOutgoingActivity.d.ts +49 -0
- package/lib/types/internal/WebChatOutgoingActivity.d.ts.map +1 -0
- package/lib/types/internal/WebChatOutgoingActivity.js +6 -0
- package/lib/utils/dateToLocaleISOString.d.ts +2 -0
- package/lib/utils/dateToLocaleISOString.d.ts.map +1 -0
- package/lib/utils/dateToLocaleISOString.js +52 -0
- package/lib/utils/deleteKey.d.ts +2 -0
- package/lib/utils/deleteKey.d.ts.map +1 -0
- package/lib/utils/deleteKey.js +30 -0
- package/lib/utils/getOrgSchemaMessage.d.ts +4 -0
- package/lib/utils/getOrgSchemaMessage.d.ts.map +1 -0
- package/lib/utils/getOrgSchemaMessage.js +21 -0
- package/lib/utils/isForbiddenPropertyName.d.ts +2 -0
- package/lib/utils/isForbiddenPropertyName.d.ts.map +1 -0
- package/lib/utils/isForbiddenPropertyName.js +16 -0
- package/lib/utils/onErrorResumeNext.d.ts +3 -0
- package/lib/utils/onErrorResumeNext.d.ts.map +1 -0
- package/lib/utils/onErrorResumeNext.js +19 -0
- package/lib/utils/once.d.ts +2 -0
- package/lib/utils/once.d.ts.map +1 -0
- package/lib/utils/once.js +16 -0
- package/lib/utils/singleToArray.d.ts +2 -0
- package/lib/utils/singleToArray.d.ts.map +1 -0
- package/lib/utils/singleToArray.js +10 -0
- package/lib/utils/sleep.d.ts +3 -0
- package/lib/utils/sleep.d.ts.map +1 -0
- package/lib/utils/sleep.js +12 -0
- package/lib/utils/uniqueID.d.ts +2 -0
- package/lib/utils/uniqueID.d.ts.map +1 -0
- package/lib/utils/uniqueID.js +14 -0
- package/lib/utils/warnOnce.d.ts +2 -0
- package/lib/utils/warnOnce.d.ts.map +1 -0
- package/lib/utils/warnOnce.js +14 -0
- package/package.json +73 -100
- package/src/__tests__/activityFromBot.spec.js +0 -2
- package/src/__tests__/connectSaga.spec.js +0 -2
- package/src/__tests__/deleteKey.spec.js +0 -2
- package/src/__tests__/detectSlowConnectionSaga.spec.js +1 -3
- package/src/__tests__/observeOnce.spec.js +0 -2
- package/src/__tests__/speakableActivity.spec.js +0 -2
- package/src/__tests__/uniqueID.spec.js +0 -2
- package/src/actions/clearSuggestedActions.js +9 -0
- package/src/actions/setSuggestedActions.js +12 -0
- package/src/actions/{submitSendBox.ts → submitSendBox.js} +1 -1
- package/src/createPromiseQueue.js +6 -8
- package/src/createReducer.ts +20 -28
- package/src/createSagas.ts +3 -6
- package/src/createStore.ts +5 -17
- package/src/index.ts +19 -64
- package/src/reducers/createActivitiesReducer.ts +304 -0
- package/src/reducers/createNotificationsReducer.ts +4 -4
- package/src/reducers/private/findBeforeAfter.spec.ts +90 -0
- package/src/reducers/private/findBeforeAfter.ts +30 -0
- package/src/reducers/suggestedActions.js +23 -0
- package/src/sagas/observeActivitySaga.ts +1 -51
- package/src/sagas/postActivitySaga.ts +10 -17
- package/src/sagas/queueIncomingActivitySaga.ts +4 -10
- package/src/sagas/sendMessageToPostActivitySaga.ts +1 -4
- package/src/sagas/speakActivityAndStartDictateOnIncomingActivityFromOthersSaga.js +4 -10
- package/src/sagas/startDictateOnSpeakCompleteSaga.js +3 -3
- package/src/sagas/startSpeakActivityOnPostActivitySaga.js +5 -15
- package/src/sagas/stopDictateOnCardActionSaga.js +3 -11
- package/src/sagas/stopSpeakingActivityOnInputSaga.js +4 -22
- package/src/selectors/combineSelectors.ts +1 -1
- package/src/tsconfig.json +15 -3
- package/src/types/OneOrMany.ts +3 -0
- package/src/types/WebChatActivity.ts +14 -31
- package/src/types/external/DirectLineActivity.ts +1 -1
- package/src/types/external/OrgSchema/Action.ts +8 -19
- package/src/types/external/OrgSchema/Claim.ts +9 -1
- package/src/types/external/OrgSchema/CreativeWork.ts +3 -41
- package/src/types/external/OrgSchema/Thing.ts +18 -24
- package/src/types/external/OrgSchema/private/orgSchemaProperties.ts +7 -11
- package/src/types/external/OrgSchema/private/orgSchemaProperty.ts +3 -14
- package/src/types/internal/ReduxState.ts +0 -2
- package/src/types/internal/WebChatOutgoingActivity.ts +1 -1
- package/src/utils/dateToLocaleISOString.chatham.spec.js +2 -1
- package/src/utils/dateToLocaleISOString.japan.spec.js +2 -1
- package/src/utils/dateToLocaleISOString.newfoundland.spec.js +2 -1
- package/src/utils/dateToLocaleISOString.pacific.spec.js +2 -1
- package/src/utils/dateToLocaleISOString.utc.spec.js +3 -1
- package/src/utils/deleteKey.ts +1 -1
- package/src/utils/getOrgSchemaMessage.ts +3 -3
- package/src/utils/isForbiddenPropertyName.spec.js +6 -0
- package/src/utils/isForbiddenPropertyName.ts +33 -0
- package/src/utils/onErrorResumeNext.ts +1 -1
- package/src/utils/singleToArray.ts +3 -0
- package/src/utils/warnOnce.ts +5 -0
- package/LICENSE +0 -21
- package/activity.js +0 -3
- package/dist/WebChatActivity-AF2-P9cw.d.mts +0 -270
- package/dist/WebChatActivity-AF2-P9cw.d.ts +0 -270
- package/dist/_dtsroll-chunks/Bo4hOhBm-botframework-webchat-core-graph.d.ts +0 -238
- package/dist/_dtsroll-chunks/C-W37j8C-botframework-webchat-core-debug-api.d.ts +0 -134
- package/dist/_dtsroll-chunks/CxDUFRPI-tagged.d.ts +0 -73
- package/dist/_dtsroll-chunks/ScRa9e5X-botframework-webchat-base.utils.d.ts +0 -16
- package/dist/botframework-webchat-core.activity.d.mts +0 -22
- package/dist/botframework-webchat-core.activity.d.ts +0 -22
- package/dist/botframework-webchat-core.activity.js +0 -2
- package/dist/botframework-webchat-core.activity.js.map +0 -1
- package/dist/botframework-webchat-core.activity.mjs +0 -2
- package/dist/botframework-webchat-core.activity.mjs.map +0 -1
- package/dist/botframework-webchat-core.d.ts +0 -787
- package/dist/botframework-webchat-core.graph.d.mts +0 -9
- package/dist/botframework-webchat-core.graph.d.ts +0 -9
- package/dist/botframework-webchat-core.graph.js +0 -2
- package/dist/botframework-webchat-core.graph.js.map +0 -1
- package/dist/botframework-webchat-core.graph.mjs +0 -2
- package/dist/botframework-webchat-core.graph.mjs.map +0 -1
- package/dist/botframework-webchat-core.internal.d.mts +0 -60
- package/dist/botframework-webchat-core.internal.d.ts +0 -60
- package/dist/botframework-webchat-core.internal.js +0 -2
- package/dist/botframework-webchat-core.internal.js.map +0 -1
- package/dist/botframework-webchat-core.internal.mjs +0 -2
- package/dist/botframework-webchat-core.internal.mjs.map +0 -1
- package/dist/botframework-webchat-core.js +0 -2
- package/dist/botframework-webchat-core.js.map +0 -1
- package/dist/chunk-3TYELUZZ.mjs +0 -2
- package/dist/chunk-3TYELUZZ.mjs.map +0 -1
- package/dist/chunk-7OLIMXJP.js +0 -2
- package/dist/chunk-7OLIMXJP.js.map +0 -1
- package/dist/chunk-HZWWJL43.mjs +0 -2
- package/dist/chunk-HZWWJL43.mjs.map +0 -1
- package/dist/chunk-LQWRDOEQ.js +0 -1
- package/dist/chunk-LQWRDOEQ.js.map +0 -1
- package/dist/chunk-UJOIWM6A.js +0 -2
- package/dist/chunk-UJOIWM6A.js.map +0 -1
- package/dist/chunk-UNRRAUHV.mjs +0 -2
- package/dist/chunk-UNRRAUHV.mjs.map +0 -1
- package/dist/chunk-XOE3AOSM.js +0 -2
- package/dist/chunk-XOE3AOSM.js.map +0 -1
- package/dist/chunk-XWMTM4TN.mjs +0 -1
- package/dist/chunk-XWMTM4TN.mjs.map +0 -1
- package/dist/createStore-CmrcJOVc.d.mts +0 -64
- package/dist/metafile-cjs.json +0 -1
- package/graph.js +0 -3
- package/internal.js +0 -3
- package/src/__tests__/addMetaTag.spec.js +0 -8
- package/src/__tests__/addMetaTag.spec.mjs +0 -8
- package/src/actions/clearSuggestedActions.ts +0 -20
- package/src/actions/muteVoiceRecording.ts +0 -17
- package/src/actions/postVoiceActivity.ts +0 -21
- package/src/actions/registerActionSink.ts +0 -29
- package/src/actions/registerVoiceHandler.ts +0 -24
- package/src/actions/setSuggestedActions.ts +0 -38
- package/src/actions/setVoiceState.ts +0 -21
- package/src/actions/startVoiceRecording.ts +0 -17
- package/src/actions/stopVoiceRecording.ts +0 -17
- package/src/actions/unmuteVoiceRecording.ts +0 -17
- package/src/actions/unregisterActionSink.ts +0 -29
- package/src/actions/unregisterVoiceHandler.ts +0 -19
- package/src/activity/index.ts +0 -19
- package/src/buildInfo.ts +0 -9
- package/src/env.d.ts +0 -12
- package/src/graph/createGraphFromStore.ts +0 -120
- package/src/graph/index.ts +0 -18
- package/src/internal/StoreDebugAPIRegistry.ts +0 -4
- package/src/internal/actions/setRawState.ts +0 -48
- package/src/internal/index.ts +0 -11
- package/src/internal/types/suggestedActions.ts +0 -11
- package/src/internal/types/suggestedActionsOriginActivity.ts +0 -16
- package/src/reducers/activities/combineActivitiesReducer.ts +0 -58
- package/src/reducers/activities/createGroupedActivitiesReducer.ts +0 -297
- package/src/reducers/activities/patchActivity.ts +0 -37
- package/src/reducers/activities/sort/deleteActivityByLocalId.activity.spec.ts +0 -144
- package/src/reducers/activities/sort/deleteActivityByLocalId.howTo.spec.ts +0 -148
- package/src/reducers/activities/sort/deleteActivityByLocalId.howToWithLivestream.spec.ts +0 -248
- package/src/reducers/activities/sort/deleteActivityByLocalId.livestream.spec.ts +0 -156
- package/src/reducers/activities/sort/deleteActivityByLocalId.ts +0 -177
- package/src/reducers/activities/sort/private/computePartListTimestamp.ts +0 -9
- package/src/reducers/activities/sort/private/computeSortedActivities.ts +0 -51
- package/src/reducers/activities/sort/private/getLogicalTimestamp.spec.ts +0 -49
- package/src/reducers/activities/sort/private/getLogicalTimestamp.ts +0 -33
- package/src/reducers/activities/sort/private/getPartGroupingMetadataMap.spec.ts +0 -92
- package/src/reducers/activities/sort/private/getPartGroupingMetadataMap.ts +0 -49
- package/src/reducers/activities/sort/private/insertSorted.spec.ts +0 -106
- package/src/reducers/activities/sort/private/insertSorted.ts +0 -18
- package/src/reducers/activities/sort/property/LocalId.ts +0 -60
- package/src/reducers/activities/sort/property/Position.ts +0 -39
- package/src/reducers/activities/sort/property/ReceivedAt.ts +0 -45
- package/src/reducers/activities/sort/property/SendStatus.ts +0 -51
- package/src/reducers/activities/sort/queryLocalIdByActivityId.ts +0 -6
- package/src/reducers/activities/sort/queryLocalIdByClientActivityId.ts +0 -6
- package/src/reducers/activities/sort/types.ts +0 -80
- package/src/reducers/activities/sort/updateActivityChannelData.ts +0 -101
- package/src/reducers/activities/sort/updateSendState.ts +0 -22
- package/src/reducers/activities/sort/upsert.activity.spec.ts +0 -500
- package/src/reducers/activities/sort/upsert.howTo.spec.ts +0 -368
- package/src/reducers/activities/sort/upsert.howToWithLivestream.spec.ts +0 -384
- package/src/reducers/activities/sort/upsert.livestream.spec.ts +0 -418
- package/src/reducers/activities/sort/upsert.ts +0 -498
- package/src/reducers/activities/tsconfig.json +0 -4
- package/src/reducers/suggestedActions.ts +0 -21
- package/src/reducers/suggestedActionsOriginActivity.ts +0 -24
- package/src/reducers/voiceActivity.ts +0 -102
- package/src/sagas/actionSinkSaga.ts +0 -39
- package/src/sagas/postVoiceActivitySaga.ts +0 -76
- package/src/types/StoreDebugAPI.ts +0 -25
- package/src/types/external/OrgSchema/UserReview.ts +0 -27
- package/src/utils/getActivityLivestreamingMetadata.spec.ts +0 -297
- package/src/utils/getActivityLivestreamingMetadata.ts +0 -196
- package/src/utils/voiceActivity/getVoiceActivityRole.spec.ts +0 -150
- package/src/utils/voiceActivity/getVoiceActivityRole.ts +0 -16
- package/src/utils/voiceActivity/getVoiceActivityText.spec.ts +0 -100
- package/src/utils/voiceActivity/getVoiceActivityText.ts +0 -11
- package/src/utils/voiceActivity/isVoiceActivity.spec.ts +0 -202
- package/src/utils/voiceActivity/isVoiceActivity.ts +0 -22
- package/src/utils/voiceActivity/isVoiceTranscriptActivity.spec.ts +0 -224
- package/src/utils/voiceActivity/isVoiceTranscriptActivity.ts +0 -24
- /package/src/actions/{connect.ts → connect.js} +0 -0
- /package/src/actions/{connectionStatusUpdate.ts → connectionStatusUpdate.js} +0 -0
- /package/src/actions/{disconnect.ts → disconnect.js} +0 -0
- /package/src/actions/{emitTypingIndicator.ts → emitTypingIndicator.js} +0 -0
- /package/src/actions/{queueIncomingActivity.ts → queueIncomingActivity.js} +0 -0
- /package/src/actions/{reconnect.ts → reconnect.js} +0 -0
- /package/src/actions/{sendEvent.ts → sendEvent.js} +0 -0
- /package/src/actions/{sendMessageBack.ts → sendMessageBack.js} +0 -0
- /package/src/actions/{sendPostBack.ts → sendPostBack.js} +0 -0
- /package/src/actions/{setDictateInterims.ts → setDictateInterims.js} +0 -0
- /package/src/actions/{setDictateState.ts → setDictateState.js} +0 -0
- /package/src/actions/{setLanguage.ts → setLanguage.js} +0 -0
- /package/src/actions/{setSendBox.ts → setSendBox.js} +0 -0
- /package/src/actions/{setSendTimeout.ts → setSendTimeout.js} +0 -0
- /package/src/actions/{startDictate.ts → startDictate.js} +0 -0
- /package/src/actions/{startSpeakingActivity.ts → startSpeakingActivity.js} +0 -0
- /package/src/actions/{stopDictate.ts → stopDictate.js} +0 -0
- /package/src/actions/{stopSpeakingActivity.ts → stopSpeakingActivity.js} +0 -0
- /package/src/actions/{updateConnectionStatus.ts → updateConnectionStatus.js} +0 -0
|
@@ -1,28 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
type:
|
|
1
|
+
import { Store } from 'redux';
|
|
2
|
+
|
|
3
|
+
const CLEAR_SUGGESTED_ACTIONS = 'WEB_CHAT/CLEAR_SUGGESTED_ACTIONS';
|
|
4
|
+
|
|
5
|
+
function clearSuggestedActions() {
|
|
6
|
+
return {
|
|
7
|
+
type: CLEAR_SUGGESTED_ACTIONS
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const CONNECT = 'DIRECT_LINE/CONNECT';
|
|
12
|
+
|
|
13
|
+
function connect({ directLine, userID, username }) {
|
|
14
|
+
return {
|
|
15
|
+
type: CONNECT,
|
|
16
16
|
payload: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
};
|
|
17
|
+
directLine,
|
|
18
|
+
userID,
|
|
19
|
+
username
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
}
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
const DISCONNECT = 'DIRECT_LINE/DISCONNECT';
|
|
25
|
+
|
|
26
|
+
function disconnect() {
|
|
27
|
+
return {
|
|
28
|
+
type: DISCONNECT
|
|
29
|
+
};
|
|
30
|
+
}
|
|
26
31
|
|
|
27
32
|
declare const DISMISS_NOTIFICATION = "WEB_CHAT/DISMISS_NOTIFICATION";
|
|
28
33
|
type DismissNotificationAction = {
|
|
@@ -33,9 +38,13 @@ type DismissNotificationAction = {
|
|
|
33
38
|
};
|
|
34
39
|
declare function dismissNotification(id: string): DismissNotificationAction;
|
|
35
40
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
41
|
+
const EMIT_TYPING_INDICATOR = 'WEB_CHAT/EMIT_TYPING_INDICATOR';
|
|
42
|
+
|
|
43
|
+
function emitTypingIndicator() {
|
|
44
|
+
return {
|
|
45
|
+
type: EMIT_TYPING_INDICATOR
|
|
46
|
+
};
|
|
47
|
+
}
|
|
39
48
|
|
|
40
49
|
type MarkActivityActionType = 'WEB_CHAT/MARK_ACTIVITY';
|
|
41
50
|
type MarkActivityAction = {
|
|
@@ -50,11 +59,253 @@ declare function markActivity({ id: activityID }: {
|
|
|
50
59
|
id: string;
|
|
51
60
|
}, name: string, value: any): MarkActivityAction;
|
|
52
61
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
62
|
+
type AnyAnd<T> = Omit<any, keyof T> & T;
|
|
63
|
+
|
|
64
|
+
type DirectLineAttachment = {
|
|
65
|
+
content?: any;
|
|
66
|
+
contentType: string;
|
|
67
|
+
contentUrl?: string;
|
|
68
|
+
name?: string;
|
|
69
|
+
thumbnailUrl?: string;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
type CardActionWithImageAndTitle = {
|
|
73
|
+
image: string;
|
|
74
|
+
} | {
|
|
75
|
+
title: string;
|
|
76
|
+
} | {
|
|
77
|
+
image: string;
|
|
78
|
+
title: string;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* A `call` action represents a telephone number that may be called.
|
|
82
|
+
*
|
|
83
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#call
|
|
84
|
+
*/
|
|
85
|
+
type CallCardAction = CardActionWithImageAndTitle & {
|
|
86
|
+
type: 'call';
|
|
87
|
+
value: string;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* A `downloadFile` action represents a hyperlink to be downloaded.
|
|
91
|
+
*
|
|
92
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#download-file-actions
|
|
93
|
+
*/
|
|
94
|
+
type DownloadFileCardAction = CardActionWithImageAndTitle & {
|
|
95
|
+
type: 'downloadFile';
|
|
96
|
+
value: string;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* An `imBack` action represents a text response that is added to the chat feed.
|
|
100
|
+
*
|
|
101
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#im-back
|
|
102
|
+
*/
|
|
103
|
+
type IMBackCardAction = CardActionWithImageAndTitle & {
|
|
104
|
+
type: 'imBack';
|
|
105
|
+
value: string;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* A `messageBack` action represents a text response to be sent via the chat system.
|
|
109
|
+
*
|
|
110
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#message-back
|
|
111
|
+
*/
|
|
112
|
+
type MessageBackCardAction = CardActionWithImageAndTitle & {
|
|
113
|
+
displayText?: string;
|
|
114
|
+
text?: string;
|
|
115
|
+
type: 'messageBack';
|
|
116
|
+
value?: {
|
|
117
|
+
[key: string]: any;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* An `openUrl` action represents a hyperlink to be handled by the client.
|
|
122
|
+
*
|
|
123
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#open-url-actions
|
|
124
|
+
*/
|
|
125
|
+
type OpenURLCardAction = CardActionWithImageAndTitle & {
|
|
126
|
+
type: 'openUrl';
|
|
127
|
+
value: string;
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* A `playAudio` action represents audio media that may be played.
|
|
131
|
+
*
|
|
132
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#play-audio
|
|
133
|
+
*/
|
|
134
|
+
type PlayAudioCardAction = CardActionWithImageAndTitle & {
|
|
135
|
+
type: 'playAudio';
|
|
136
|
+
value: string;
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* A `playVideo` action represents video media that may be played.
|
|
140
|
+
*
|
|
141
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#play-video
|
|
142
|
+
*/
|
|
143
|
+
type PlayVideoCardAction = CardActionWithImageAndTitle & {
|
|
144
|
+
type: 'playVideo';
|
|
145
|
+
value: string;
|
|
56
146
|
};
|
|
57
|
-
|
|
147
|
+
/**
|
|
148
|
+
* A `postBack` action represents a text response that is not added to the chat feed.
|
|
149
|
+
*
|
|
150
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#post-back
|
|
151
|
+
*/
|
|
152
|
+
type PostBackCardAction = CardActionWithImageAndTitle & {
|
|
153
|
+
type: 'postBack';
|
|
154
|
+
value: any;
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* A `showImage` action represents an image that may be displayed.
|
|
158
|
+
*
|
|
159
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#show-image-file-actions
|
|
160
|
+
*/
|
|
161
|
+
type ShowImageCardAction = CardActionWithImageAndTitle & {
|
|
162
|
+
type: 'showImage';
|
|
163
|
+
value: string;
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* A `signin` action represents a hyperlink to be handled by the client's signin system.
|
|
167
|
+
*
|
|
168
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#signin
|
|
169
|
+
*/
|
|
170
|
+
type SignInCardAction = CardActionWithImageAndTitle & {
|
|
171
|
+
type: 'signin';
|
|
172
|
+
value: string;
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* A card action represents a clickable or interactive button for use within cards or as suggested actions. They are used to solicit input from users. Despite their name, card actions are not limited to use solely on cards.
|
|
176
|
+
*
|
|
177
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#card-action
|
|
178
|
+
*/
|
|
179
|
+
type DirectLineCardAction = CallCardAction | DownloadFileCardAction | IMBackCardAction | MessageBackCardAction | OpenURLCardAction | PlayAudioCardAction | PlayVideoCardAction | PostBackCardAction | ShowImageCardAction | SignInCardAction;
|
|
180
|
+
|
|
181
|
+
type DirectLineSuggestedAction = {
|
|
182
|
+
actions?: DirectLineCardAction[];
|
|
183
|
+
to?: string[];
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
type SupportedRole = 'bot' | 'channel' | 'user';
|
|
187
|
+
type SupportedSendStatus = 'sending' | 'send failed' | 'sent';
|
|
188
|
+
type ChannelData<SendStatus extends SupportedSendStatus | undefined, Type extends string> = AnyAnd<{
|
|
189
|
+
attachmentSizes?: number[];
|
|
190
|
+
clientActivityID?: string;
|
|
191
|
+
'webchat:sequence-id': number;
|
|
192
|
+
webChat?: {
|
|
193
|
+
/**
|
|
194
|
+
* Time when the activity appear in chat history.
|
|
195
|
+
*
|
|
196
|
+
* Note: if the activity is updated, this value will also be updated.
|
|
197
|
+
*/
|
|
198
|
+
receivedAt?: number;
|
|
199
|
+
/**
|
|
200
|
+
* Per-activity style options.
|
|
201
|
+
*
|
|
202
|
+
* New in 4.18.0.
|
|
203
|
+
*/
|
|
204
|
+
styleOptions?: Record<string, boolean | number | null | string>;
|
|
205
|
+
};
|
|
206
|
+
} & (SendStatus extends SupportedSendStatus ? {
|
|
207
|
+
/**
|
|
208
|
+
* @deprecated Since 4.15.3: Please use `channelData['webchat:send-status']` or `useSendStatusByActivityKey()` hook instead.
|
|
209
|
+
* Please refer to https://github.com/microsoft/BotFramework-WebChat/pull/4362 for details. This field will be removed on or after 2024-07-31.
|
|
210
|
+
*/
|
|
211
|
+
state?: SendStatus;
|
|
212
|
+
/**
|
|
213
|
+
* The send status of the activity.
|
|
214
|
+
*
|
|
215
|
+
* - `"sending"`, the activity is in-transit and it has not been timed out;
|
|
216
|
+
* - `"send failed"`, the activity cannot be delivered permanently and further processing had been stopped;
|
|
217
|
+
* - `"sent"`, the activity is delivered successfully.
|
|
218
|
+
*
|
|
219
|
+
* Due to network-related race conditions, the activity could be marked as `"send failed"` but delivered by the service.
|
|
220
|
+
* In this case, the activity should continue to mark as `"send failed"`.
|
|
221
|
+
*
|
|
222
|
+
* For further details, please see [#4362](https://github.com/microsoft/BotFramework-WebChat/pull/4362).
|
|
223
|
+
*/
|
|
224
|
+
'webchat:send-status': SendStatus;
|
|
225
|
+
} : {}) & (Type extends 'message' ? {
|
|
226
|
+
messageBack?: {
|
|
227
|
+
displayText: string;
|
|
228
|
+
};
|
|
229
|
+
postBack?: boolean;
|
|
230
|
+
speak?: boolean;
|
|
231
|
+
speechSynthesisUtterance?: SpeechSynthesisUtterance;
|
|
232
|
+
'webchat:fallback-text'?: string;
|
|
233
|
+
} : {})>;
|
|
234
|
+
type ClientCapabilitiesEntity = {
|
|
235
|
+
requiresBotState?: boolean;
|
|
236
|
+
supportsListening?: boolean;
|
|
237
|
+
supportsTts?: boolean;
|
|
238
|
+
type: 'ClientCapabilities';
|
|
239
|
+
};
|
|
240
|
+
type Entity = ClientCapabilitiesEntity | {
|
|
241
|
+
type: string;
|
|
242
|
+
};
|
|
243
|
+
type ChannelAcount<Role extends SupportedRole> = {
|
|
244
|
+
id: string;
|
|
245
|
+
name?: string;
|
|
246
|
+
role: Role;
|
|
247
|
+
};
|
|
248
|
+
type EventActivityEssence = {
|
|
249
|
+
name: string;
|
|
250
|
+
type: 'event';
|
|
251
|
+
value?: any;
|
|
252
|
+
};
|
|
253
|
+
type MessageActivityEssence = {
|
|
254
|
+
attachmentLayout?: 'carousel' | 'stacked';
|
|
255
|
+
attachments?: DirectLineAttachment[];
|
|
256
|
+
channelData: {
|
|
257
|
+
streamId?: string;
|
|
258
|
+
streamSequence?: number;
|
|
259
|
+
streamType?: 'final';
|
|
260
|
+
};
|
|
261
|
+
inputHint?: 'accepting' | 'expecting' | 'ignoring';
|
|
262
|
+
locale?: string;
|
|
263
|
+
speak?: string;
|
|
264
|
+
suggestedActions?: DirectLineSuggestedAction;
|
|
265
|
+
text: string | undefined;
|
|
266
|
+
textFormat?: 'markdown' | 'plain' | 'xml';
|
|
267
|
+
type: 'message';
|
|
268
|
+
value?: any;
|
|
269
|
+
};
|
|
270
|
+
type TypingActivityEssence = {
|
|
271
|
+
type: 'typing';
|
|
272
|
+
} | {
|
|
273
|
+
channelData: {
|
|
274
|
+
streamId: string;
|
|
275
|
+
streamSequence: number;
|
|
276
|
+
streamType: 'informative' | 'streaming';
|
|
277
|
+
};
|
|
278
|
+
text: string;
|
|
279
|
+
type: 'typing';
|
|
280
|
+
};
|
|
281
|
+
type TimestampFromServerEssence = {
|
|
282
|
+
id: string;
|
|
283
|
+
localTimestamp?: string;
|
|
284
|
+
timestamp: string;
|
|
285
|
+
};
|
|
286
|
+
type TimestampInTransitEssence = {
|
|
287
|
+
id?: string;
|
|
288
|
+
localTimestamp: string;
|
|
289
|
+
timestamp?: string;
|
|
290
|
+
};
|
|
291
|
+
type TimestampEssence<Role extends SupportedRole, SendStatus extends SupportedSendStatus | undefined> = Role extends 'user' ? SendStatus extends 'sending' | 'send failed' ? TimestampInTransitEssence : TimestampFromServerEssence : TimestampFromServerEssence;
|
|
292
|
+
type CoreActivityEssence<Role extends SupportedRole, SendStatus extends SupportedSendStatus | undefined, Type extends string = 'conversationUpdate' | 'event' | 'invoke' | 'message' | 'typing'> = {
|
|
293
|
+
channelData: ChannelData<SendStatus, Type>;
|
|
294
|
+
channelId?: string;
|
|
295
|
+
entities?: Entity[];
|
|
296
|
+
from: ChannelAcount<Role>;
|
|
297
|
+
localTimezone?: string;
|
|
298
|
+
replyToId?: string;
|
|
299
|
+
type: string;
|
|
300
|
+
} & TimestampEssence<Role, SendStatus> & (Type extends 'event' ? EventActivityEssence : Type extends 'message' ? MessageActivityEssence : Type extends 'typing' ? TypingActivityEssence : {
|
|
301
|
+
type: Type;
|
|
302
|
+
});
|
|
303
|
+
type OthersActivity = CoreActivityEssence<'bot' | 'channel', undefined>;
|
|
304
|
+
type SelfActivitySendFailed = CoreActivityEssence<'user', 'send failed'>;
|
|
305
|
+
type SelfActivitySending = CoreActivityEssence<'user', 'sending'>;
|
|
306
|
+
type SelfActivitySent = CoreActivityEssence<'user', 'sent'>;
|
|
307
|
+
type SelfActivity = SelfActivitySendFailed | SelfActivitySending | SelfActivitySent;
|
|
308
|
+
type WebChatActivity = SelfActivity | OthersActivity;
|
|
58
309
|
|
|
59
310
|
type PostActivityActionType = 'DIRECT_LINE/POST_ACTIVITY';
|
|
60
311
|
type PostActivityAction = {
|
|
@@ -68,36 +319,14 @@ type PostActivityAction = {
|
|
|
68
319
|
};
|
|
69
320
|
declare function postActivity(activity: WebChatActivity, method?: string): PostActivityAction;
|
|
70
321
|
|
|
71
|
-
|
|
72
|
-
type VoicePostActivityAction = {
|
|
73
|
-
type: typeof VOICE_POST_ACTIVITY;
|
|
74
|
-
payload: {
|
|
75
|
-
activity: WebChatActivity;
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
declare function postVoiceActivity(activity: WebChatActivity): VoicePostActivityAction;
|
|
79
|
-
|
|
80
|
-
declare const VOICE_REGISTER_HANDLER: "WEB_CHAT/VOICE_REGISTER_HANDLER";
|
|
81
|
-
type VoiceHandler = {
|
|
82
|
-
queueAudio: (base64: string) => void;
|
|
83
|
-
stopAllAudio: () => void;
|
|
84
|
-
};
|
|
85
|
-
type VoiceRegisterHandlerAction = {
|
|
86
|
-
type: typeof VOICE_REGISTER_HANDLER;
|
|
87
|
-
payload: {
|
|
88
|
-
id: string;
|
|
89
|
-
voiceHandler: VoiceHandler;
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
declare function registerVoiceHandler(id: string, voiceHandler: VoiceHandler): VoiceRegisterHandlerAction;
|
|
322
|
+
const SEND_EVENT = 'WEB_CHAT/SEND_EVENT';
|
|
93
323
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
};
|
|
324
|
+
function sendEvent(name, value) {
|
|
325
|
+
return {
|
|
326
|
+
type: SEND_EVENT,
|
|
327
|
+
payload: { name, value }
|
|
328
|
+
};
|
|
329
|
+
}
|
|
101
330
|
|
|
102
331
|
declare function sendFiles(files: readonly Readonly<{
|
|
103
332
|
name: string;
|
|
@@ -137,42 +366,50 @@ declare function sendMessage(text: string | undefined, method: string | undefine
|
|
|
137
366
|
};
|
|
138
367
|
};
|
|
139
368
|
|
|
140
|
-
|
|
141
|
-
type: string;
|
|
142
|
-
payload: {
|
|
143
|
-
displayText: any;
|
|
144
|
-
text: any;
|
|
145
|
-
value: any;
|
|
146
|
-
};
|
|
147
|
-
};
|
|
369
|
+
const SEND_MESSAGE_BACK = 'WEB_CHAT/SEND_MESSAGE_BACK';
|
|
148
370
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
}
|
|
371
|
+
function sendMessageback(value, text, displayText) {
|
|
372
|
+
return {
|
|
373
|
+
type: SEND_MESSAGE_BACK,
|
|
374
|
+
payload: { displayText, text, value }
|
|
375
|
+
};
|
|
376
|
+
}
|
|
155
377
|
|
|
156
|
-
|
|
157
|
-
type: string;
|
|
158
|
-
payload: {
|
|
159
|
-
dictateInterims: any;
|
|
160
|
-
};
|
|
161
|
-
};
|
|
378
|
+
const SEND_POST_BACK = 'WEB_CHAT/SEND_POST_BACK';
|
|
162
379
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
380
|
+
function sendPostback(value) {
|
|
381
|
+
return {
|
|
382
|
+
type: SEND_POST_BACK,
|
|
383
|
+
payload: { value }
|
|
384
|
+
};
|
|
385
|
+
}
|
|
169
386
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
}
|
|
387
|
+
const SET_DICTATE_INTERIMS = 'WEB_CHAT/SET_DICTATE_INTERIMS';
|
|
388
|
+
|
|
389
|
+
function setDictateInterims(dictateInterims) {
|
|
390
|
+
return {
|
|
391
|
+
type: SET_DICTATE_INTERIMS,
|
|
392
|
+
payload: { dictateInterims }
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
const SET_DICTATE_STATE = 'WEB_CHAT/SET_DICTATE_STATE';
|
|
397
|
+
|
|
398
|
+
function setDictateState(dictateState) {
|
|
399
|
+
return {
|
|
400
|
+
type: SET_DICTATE_STATE,
|
|
401
|
+
payload: { dictateState }
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
const SET_LANGUAGE = 'WEB_CHAT/SET_LANGUAGE';
|
|
406
|
+
|
|
407
|
+
function setLanguage(language) {
|
|
408
|
+
return {
|
|
409
|
+
type: SET_LANGUAGE,
|
|
410
|
+
payload: { language }
|
|
411
|
+
};
|
|
412
|
+
}
|
|
176
413
|
|
|
177
414
|
type Notification = {
|
|
178
415
|
alt: string;
|
|
@@ -190,12 +427,14 @@ type SetNotificationAction = {
|
|
|
190
427
|
};
|
|
191
428
|
declare function setNotification({ alt, data, id, level, message }: Omit<Notification, 'timestamp'>): SetNotificationAction;
|
|
192
429
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}
|
|
430
|
+
const SET_SEND_BOX = 'WEB_CHAT/SET_SEND_BOX';
|
|
431
|
+
|
|
432
|
+
function setSendBox(text) {
|
|
433
|
+
return {
|
|
434
|
+
type: SET_SEND_BOX,
|
|
435
|
+
payload: { text }
|
|
436
|
+
};
|
|
437
|
+
}
|
|
199
438
|
|
|
200
439
|
declare function setSendBoxAttachments(attachments: readonly SendBoxAttachment[]): {
|
|
201
440
|
type: string;
|
|
@@ -207,12 +446,14 @@ declare function setSendBoxAttachments(attachments: readonly SendBoxAttachment[]
|
|
|
207
446
|
};
|
|
208
447
|
};
|
|
209
448
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
}
|
|
449
|
+
const SET_SEND_TIMEOUT = 'WEB_CHAT/SET_SEND_TIMEOUT';
|
|
450
|
+
|
|
451
|
+
function setSendTimeout(sendTimeout) {
|
|
452
|
+
return {
|
|
453
|
+
type: SET_SEND_TIMEOUT,
|
|
454
|
+
payload: { sendTimeout }
|
|
455
|
+
};
|
|
456
|
+
}
|
|
216
457
|
|
|
217
458
|
declare const SET_SEND_TYPING_INDICATOR = "WEB_CHAT/SET_SEND_TYPING_INDICATOR";
|
|
218
459
|
type SetSendTypingIndicatorAction = {
|
|
@@ -223,166 +464,105 @@ type SetSendTypingIndicatorAction = {
|
|
|
223
464
|
};
|
|
224
465
|
declare function setSendTypingIndicator(value: any): SetSendTypingIndicatorAction;
|
|
225
466
|
|
|
226
|
-
|
|
227
|
-
type VoiceState = 'idle' | 'listening' | 'user_speaking' | 'processing' | 'bot_speaking';
|
|
228
|
-
type VoiceSetStateAction = {
|
|
229
|
-
type: typeof VOICE_SET_STATE;
|
|
230
|
-
payload: {
|
|
231
|
-
voiceState: VoiceState;
|
|
232
|
-
};
|
|
233
|
-
};
|
|
234
|
-
declare function setVoiceState(voiceState: VoiceState): VoiceSetStateAction;
|
|
467
|
+
const START_DICTATE = 'WEB_CHAT/START_DICTATE';
|
|
235
468
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}
|
|
469
|
+
function startDictate() {
|
|
470
|
+
return { type: START_DICTATE };
|
|
471
|
+
}
|
|
239
472
|
|
|
240
|
-
|
|
241
|
-
type: string;
|
|
242
|
-
};
|
|
473
|
+
const START_SPEAKING_ACTIVITY = 'WEB_CHAT/START_SPEAKING';
|
|
243
474
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
type:
|
|
247
|
-
};
|
|
248
|
-
|
|
475
|
+
function startSpeakingActivity() {
|
|
476
|
+
return {
|
|
477
|
+
type: START_SPEAKING_ACTIVITY
|
|
478
|
+
};
|
|
479
|
+
}
|
|
249
480
|
|
|
250
|
-
|
|
251
|
-
type: string;
|
|
252
|
-
};
|
|
481
|
+
const STOP_DICTATE = 'WEB_CHAT/STOP_DICTATE';
|
|
253
482
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}
|
|
483
|
+
function stopDictate() {
|
|
484
|
+
return { type: STOP_DICTATE };
|
|
485
|
+
}
|
|
257
486
|
|
|
258
|
-
|
|
259
|
-
type VoiceStopRecordingAction = {
|
|
260
|
-
type: typeof VOICE_STOP_RECORDING;
|
|
261
|
-
};
|
|
262
|
-
declare function stopVoiceRecording(): VoiceStopRecordingAction;
|
|
487
|
+
const STOP_SPEAKING_ACTIVITY = 'WEB_CHAT/STOP_SPEAKING';
|
|
263
488
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
channelData: any;
|
|
270
|
-
method: string;
|
|
271
|
-
};
|
|
272
|
-
};
|
|
489
|
+
function stopSpeakingActivity() {
|
|
490
|
+
return {
|
|
491
|
+
type: STOP_SPEAKING_ACTIVITY
|
|
492
|
+
};
|
|
493
|
+
}
|
|
273
494
|
|
|
274
|
-
|
|
275
|
-
type VoiceUnmuteRecordingAction = {
|
|
276
|
-
type: typeof VOICE_UNMUTE_RECORDING;
|
|
277
|
-
};
|
|
278
|
-
declare function unmuteVoiceRecording(): VoiceUnmuteRecordingAction;
|
|
495
|
+
const SUBMIT_SEND_BOX = 'WEB_CHAT/SUBMIT_SEND_BOX';
|
|
279
496
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
type:
|
|
283
|
-
payload: {
|
|
284
|
-
|
|
285
|
-
|
|
497
|
+
function submitSendBox(method = 'keyboard', { channelData } = {}) {
|
|
498
|
+
return {
|
|
499
|
+
type: SUBMIT_SEND_BOX,
|
|
500
|
+
payload: { channelData, method }
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
type GlobalScopeClock = {
|
|
505
|
+
cancelAnimationFrame?: typeof cancelAnimationFrame;
|
|
506
|
+
cancelIdleCallback?: typeof cancelIdleCallback;
|
|
507
|
+
clearImmediate?: typeof clearImmediate;
|
|
508
|
+
clearInterval: typeof clearInterval;
|
|
509
|
+
clearTimeout: typeof clearTimeout;
|
|
510
|
+
Date: typeof Date;
|
|
511
|
+
requestAnimationFrame?: typeof requestAnimationFrame;
|
|
512
|
+
requestIdleCallback?: typeof requestIdleCallback;
|
|
513
|
+
setImmediate?: typeof setImmediate;
|
|
514
|
+
setInterval: typeof setInterval;
|
|
515
|
+
setTimeout: typeof setTimeout;
|
|
286
516
|
};
|
|
287
|
-
declare function unregisterVoiceHandler(id: string): VoiceUnregisterHandlerAction;
|
|
288
517
|
|
|
289
518
|
/**
|
|
290
|
-
*
|
|
519
|
+
* Ponyfills that are supported by Web Chat.
|
|
291
520
|
*
|
|
292
|
-
*
|
|
293
|
-
*
|
|
294
|
-
* @see https://schema.org/DefinedTerm
|
|
521
|
+
* If ponyfill is passed, Web Chat will use this ponyfill rather than the one from `globalThis` or `window` object.
|
|
295
522
|
*/
|
|
296
|
-
type
|
|
523
|
+
type GlobalScopePonyfill = GlobalScopeClock;
|
|
524
|
+
|
|
525
|
+
type CreateStoreOptions = {
|
|
297
526
|
/**
|
|
298
|
-
*
|
|
527
|
+
* True, to enable Redux development tools, otherwise, false.
|
|
299
528
|
*
|
|
300
|
-
*
|
|
529
|
+
* Because Web Chat use sagas for business logics, some store state are keep at JavaScript heaps.
|
|
530
|
+
* Time-travelling and saving/restoring store state are not supported.
|
|
301
531
|
*/
|
|
302
|
-
|
|
532
|
+
devTools?: boolean;
|
|
303
533
|
/**
|
|
304
|
-
*
|
|
534
|
+
* Ponyfill to overrides specific global scope members.
|
|
305
535
|
*
|
|
306
|
-
*
|
|
536
|
+
* This option is for development use only. Not all features in Web Chat are ponyfilled.
|
|
537
|
+
*
|
|
538
|
+
* To fake timers, `setTimeout` and related functions can be passed to overrides the original global scope members.
|
|
539
|
+
*
|
|
540
|
+
* Please see [#4662](https://github.com/microsoft/BotFramework-WebChat/pull/4662) for details.
|
|
307
541
|
*/
|
|
308
|
-
|
|
542
|
+
ponyfill?: Partial<GlobalScopePonyfill>;
|
|
309
543
|
};
|
|
310
|
-
declare const parseDefinedTerm: (data: unknown) => DefinedTerm;
|
|
311
|
-
|
|
312
544
|
/**
|
|
313
|
-
*
|
|
545
|
+
* Creates a Redux store internally used by Web Chat.
|
|
314
546
|
*
|
|
315
|
-
* This is
|
|
547
|
+
* This store is critical for Web Chat business logics to operate, please use with cautions.
|
|
548
|
+
*/
|
|
549
|
+
declare function withOptions(options: CreateStoreOptions, initialState?: any, ...middlewares: any[]): Store;
|
|
550
|
+
/**
|
|
551
|
+
* Creates a Redux store internally used by Web Chat.
|
|
316
552
|
*
|
|
317
|
-
*
|
|
553
|
+
* This store is critical for Web Chat business logics to operate, please use with cautions.
|
|
318
554
|
*/
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
*/
|
|
331
|
-
author?: Person | string | undefined;
|
|
332
|
-
/**
|
|
333
|
-
* A citation or reference to another creative work, such as another publication, web page, scholarly article, etc.
|
|
334
|
-
*
|
|
335
|
-
* @see https://schema.org/citation
|
|
336
|
-
*/
|
|
337
|
-
citation?: readonly CreativeWork[] | undefined;
|
|
338
|
-
/**
|
|
339
|
-
* The status of the creative work, such as whether it is incomplete or published.
|
|
340
|
-
*
|
|
341
|
-
* @see https://schema.org/creativeWorkStatus
|
|
342
|
-
*/
|
|
343
|
-
creativeWorkStatus?: 'Incomplete' | 'Published' | undefined;
|
|
344
|
-
/**
|
|
345
|
-
* The schema.org [isBasedOn](https://schema.org/isBasedOn) property provides a resource from which this work is derived or from which it is a modification or adaptation.
|
|
346
|
-
*/
|
|
347
|
-
isBasedOn?: CreativeWork | undefined;
|
|
348
|
-
/**
|
|
349
|
-
* Keywords or tags used to describe some item. Multiple textual entries in a keywords list are typically delimited by commas, or by repeating the property.
|
|
350
|
-
*
|
|
351
|
-
* @see https://schema.org/keywords
|
|
352
|
-
*/
|
|
353
|
-
keywords?: readonly (DefinedTerm | string)[] | undefined;
|
|
354
|
-
/**
|
|
355
|
-
* A pattern that something has, for example 'polka dot', 'striped', 'Canadian flag'. Values are typically expressed as text, although links to controlled value schemes are also supported.
|
|
356
|
-
*
|
|
357
|
-
* @see https://schema.org/pattern
|
|
358
|
-
*/
|
|
359
|
-
pattern?: DefinedTerm | undefined;
|
|
360
|
-
/**
|
|
361
|
-
* The position of an item in a series or sequence of items.
|
|
362
|
-
*
|
|
363
|
-
* @see https://schema.org/position
|
|
364
|
-
*/
|
|
365
|
-
position?: number;
|
|
366
|
-
/**
|
|
367
|
-
* The textual content of this CreativeWork.
|
|
368
|
-
*
|
|
369
|
-
* @see https://schema.org/text
|
|
370
|
-
*/
|
|
371
|
-
text?: string | undefined;
|
|
372
|
-
/**
|
|
373
|
-
* The schema.org [usageInfo](https://schema.org/usageInfo) property indicates further information about a [CreativeWork](https://schema.org/CreativeWork). This property is applicable both to works that are freely available and to those that require payment or other transactions. It can reference additional information, e.g. community expectations on preferred linking and citation conventions, as well as purchasing details. For something that can be commercially licensed, usageInfo can provide detailed, resource-specific information about licensing options.
|
|
374
|
-
*
|
|
375
|
-
* This property can be used alongside the license property which indicates license(s) applicable to some piece of content. The usageInfo property can provide information about other licensing options, e.g. acquiring commercial usage rights for an image that is also available under non-commercial creative commons licenses.
|
|
376
|
-
*/
|
|
377
|
-
usageInfo?: CreativeWork | undefined;
|
|
378
|
-
};
|
|
379
|
-
type Person = {
|
|
380
|
-
'@type': 'Person';
|
|
381
|
-
description?: string | undefined;
|
|
382
|
-
image?: string | undefined;
|
|
383
|
-
name?: string | undefined;
|
|
384
|
-
};
|
|
385
|
-
declare const parseCreativeWork: (data: unknown) => CreativeWork;
|
|
555
|
+
declare function createStore(initialState?: any, ...middlewares: any[]): Store;
|
|
556
|
+
/**
|
|
557
|
+
* Creates a Redux store internally used by Web Chat, with Redux development tools.
|
|
558
|
+
*
|
|
559
|
+
* This store is critical for Web Chat business logics to operate, please use with cautions.
|
|
560
|
+
*
|
|
561
|
+
* @deprecated Use `withOptions` instead and pass `{ devTools: true }`
|
|
562
|
+
*/
|
|
563
|
+
declare function withDevTools(initialState?: any, ...middlewares: any[]): Store;
|
|
564
|
+
|
|
565
|
+
type OneOrMany<T> = T | T[];
|
|
386
566
|
|
|
387
567
|
/**
|
|
388
568
|
* The most generic type of item.
|
|
@@ -431,12 +611,6 @@ type Thing = {
|
|
|
431
611
|
* @see https://schema.org/url
|
|
432
612
|
*/
|
|
433
613
|
url?: string | undefined;
|
|
434
|
-
/**
|
|
435
|
-
* Indicates an item or CreativeWork that this item, or CreativeWork (in some sense), is part of.
|
|
436
|
-
*
|
|
437
|
-
* @see https://schema.org/isPartOf
|
|
438
|
-
*/
|
|
439
|
-
isPartOf?: CreativeWork | undefined;
|
|
440
614
|
};
|
|
441
615
|
declare const parseThing: (data: unknown) => Thing;
|
|
442
616
|
|
|
@@ -457,20 +631,6 @@ type Project = Thing & {
|
|
|
457
631
|
};
|
|
458
632
|
declare const parseProject: (data: unknown) => Project;
|
|
459
633
|
|
|
460
|
-
/**
|
|
461
|
-
* A review created by an end-user (e.g. consumer, purchaser, attendee etc.), in contrast with [`CriticReview`](https://schema.org/CriticReview).
|
|
462
|
-
*
|
|
463
|
-
* This is partial implementation of https://schema.org/UserReview.
|
|
464
|
-
*
|
|
465
|
-
* @see https://schema.org/UserReview
|
|
466
|
-
*/
|
|
467
|
-
type UserReview = Thing & {
|
|
468
|
-
/**
|
|
469
|
-
* This Review or Rating is relevant to this part or facet of the itemReviewed.
|
|
470
|
-
*/
|
|
471
|
-
reviewAspect?: string | undefined;
|
|
472
|
-
};
|
|
473
|
-
|
|
474
634
|
/**
|
|
475
635
|
* An action performed by a direct agent and indirect participants upon a direct object. Optionally happens at a location with the help of an inanimate instrument. The execution of the action may produce a result. Specific action sub-type documentation specifies the exact expectation of each argument/role.
|
|
476
636
|
*
|
|
@@ -481,28 +641,96 @@ type UserReview = Thing & {
|
|
|
481
641
|
* @see https://schema.org/Action
|
|
482
642
|
*/
|
|
483
643
|
type Action = Thing & {
|
|
484
|
-
/**
|
|
485
|
-
* A sub property of object. The options subject to this action. Supersedes [`option`](https://schema.org/option).
|
|
486
|
-
*/
|
|
487
|
-
actionOption?: string | Thing;
|
|
488
644
|
/**
|
|
489
645
|
* Indicates the current disposition of the Action.
|
|
490
646
|
*
|
|
491
647
|
* @see https://schema.org/actionStatus
|
|
492
648
|
*/
|
|
493
|
-
actionStatus?: 'ActiveActionStatus' | '
|
|
649
|
+
actionStatus?: 'ActiveActionStatus' | 'CompletedActionStatu' | 'FailedActionStatus' | 'PotentialActionStatus' | undefined;
|
|
494
650
|
/**
|
|
495
651
|
* The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. Supersedes [carrier](https://schema.org/carrier).
|
|
496
652
|
*
|
|
497
653
|
* @see https://schema.org/provider
|
|
498
654
|
*/
|
|
499
655
|
provider?: Project | undefined;
|
|
656
|
+
};
|
|
657
|
+
declare const parseAction: (data: unknown) => Action;
|
|
658
|
+
|
|
659
|
+
/**
|
|
660
|
+
* A word, name, acronym, phrase, etc. with a formal definition. Often used in the context of category or subject classification, glossaries or dictionaries, product or creative work types, etc. Use the name property for the term being defined, use termCode if the term has an alpha-numeric code allocated, use description to provide the definition of the term.
|
|
661
|
+
*
|
|
662
|
+
* This is partial implementation of https://schema.org/DefinedTerm.
|
|
663
|
+
*
|
|
664
|
+
* @see https://schema.org/DefinedTerm
|
|
665
|
+
*/
|
|
666
|
+
type DefinedTerm = Thing & {
|
|
500
667
|
/**
|
|
501
|
-
*
|
|
668
|
+
* A [DefinedTermSet](https://schema.org/DefinedTermSet) that contains this term.
|
|
669
|
+
*
|
|
670
|
+
* @see https://schema.org/inDefinedTermSet
|
|
502
671
|
*/
|
|
503
|
-
|
|
672
|
+
inDefinedTermSet?: string | undefined;
|
|
673
|
+
/**
|
|
674
|
+
* A code that identifies this [DefinedTerm](https://schema.org/DefinedTerm) within a [DefinedTermSet](https://schema.org/DefinedTermSet).
|
|
675
|
+
*
|
|
676
|
+
* @see https://schema.org/termCode
|
|
677
|
+
*/
|
|
678
|
+
termCode?: string | undefined;
|
|
504
679
|
};
|
|
505
|
-
declare const
|
|
680
|
+
declare const parseDefinedTerm: (data: unknown) => DefinedTerm;
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* The most generic kind of creative work, including books, movies, photographs, software programs, etc.
|
|
684
|
+
*
|
|
685
|
+
* This is partial implementation of https://schema.org/CreativeWork.
|
|
686
|
+
*
|
|
687
|
+
* @see https://schema.org/CreativeWork
|
|
688
|
+
*/
|
|
689
|
+
type CreativeWork = Thing & {
|
|
690
|
+
/**
|
|
691
|
+
* An abstract is a short description that summarizes a [CreativeWork](https://schema.org/CreativeWork).
|
|
692
|
+
*
|
|
693
|
+
* @see https://schema.org/abstract
|
|
694
|
+
*/
|
|
695
|
+
abstract?: string | undefined;
|
|
696
|
+
/**
|
|
697
|
+
* The author of this content or rating. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably.
|
|
698
|
+
*
|
|
699
|
+
* @see https://schema.org/author
|
|
700
|
+
*/
|
|
701
|
+
author?: string | undefined;
|
|
702
|
+
/**
|
|
703
|
+
* A citation or reference to another creative work, such as another publication, web page, scholarly article, etc.
|
|
704
|
+
*
|
|
705
|
+
* @see https://schema.org/citation
|
|
706
|
+
*/
|
|
707
|
+
citation?: readonly CreativeWork[] | undefined;
|
|
708
|
+
/**
|
|
709
|
+
* Keywords or tags used to describe some item. Multiple textual entries in a keywords list are typically delimited by commas, or by repeating the property.
|
|
710
|
+
*
|
|
711
|
+
* @see https://schema.org/keywords
|
|
712
|
+
*/
|
|
713
|
+
keywords?: readonly (DefinedTerm | string)[] | undefined;
|
|
714
|
+
/**
|
|
715
|
+
* A pattern that something has, for example 'polka dot', 'striped', 'Canadian flag'. Values are typically expressed as text, although links to controlled value schemes are also supported.
|
|
716
|
+
*
|
|
717
|
+
* @see https://schema.org/pattern
|
|
718
|
+
*/
|
|
719
|
+
pattern?: DefinedTerm | undefined;
|
|
720
|
+
/**
|
|
721
|
+
* The textual content of this CreativeWork.
|
|
722
|
+
*
|
|
723
|
+
* @see https://schema.org/text
|
|
724
|
+
*/
|
|
725
|
+
text?: string | undefined;
|
|
726
|
+
/**
|
|
727
|
+
* The schema.org [usageInfo](https://schema.org/usageInfo) property indicates further information about a [CreativeWork](https://schema.org/CreativeWork). This property is applicable both to works that are freely available and to those that require payment or other transactions. It can reference additional information, e.g. community expectations on preferred linking and citation conventions, as well as purchasing details. For something that can be commercially licensed, usageInfo can provide detailed, resource-specific information about licensing options.
|
|
728
|
+
*
|
|
729
|
+
* This property can be used alongside the license property which indicates license(s) applicable to some piece of content. The usageInfo property can provide information about other licensing options, e.g. acquiring commercial usage rights for an image that is also available under non-commercial creative commons licenses.
|
|
730
|
+
*/
|
|
731
|
+
usageInfo?: CreativeWork | undefined;
|
|
732
|
+
};
|
|
733
|
+
declare const parseCreativeWork: (data: unknown) => CreativeWork;
|
|
506
734
|
|
|
507
735
|
/**
|
|
508
736
|
* A [Claim](https://schema.org/Claim) in Schema.org represents a specific, factually-oriented claim that could be the [itemReviewed](https://schema.org/itemReviewed) in a [ClaimReview](https://schema.org/ClaimReview). The content of a claim can be summarized with the [text](https://schema.org/text) property. Variations on well known claims can have their common identity indicated via [sameAs](https://schema.org/sameAs) links, and summarized with a name. Ideally, a [Claim](https://schema.org/Claim) description includes enough contextual information to minimize the risk of ambiguity or inclarity. In practice, many claims are better understood in the context in which they appear or the interpretations provided by claim reviews.
|
|
@@ -526,6 +754,12 @@ type Claim = CreativeWork & {
|
|
|
526
754
|
* @see https://schema.org/claimInterpreter.
|
|
527
755
|
*/
|
|
528
756
|
claimInterpreter?: Project | undefined;
|
|
757
|
+
/**
|
|
758
|
+
* The position of an item in a series or sequence of items.
|
|
759
|
+
*
|
|
760
|
+
* @see https://schema.org/position.
|
|
761
|
+
*/
|
|
762
|
+
position?: number | string;
|
|
529
763
|
};
|
|
530
764
|
declare const parseClaim: (data: unknown) => Claim;
|
|
531
765
|
|
|
@@ -548,88 +782,18 @@ type VoteAction = Action & {
|
|
|
548
782
|
};
|
|
549
783
|
declare const parseVoteAction: (data: unknown) => VoteAction;
|
|
550
784
|
|
|
551
|
-
|
|
552
|
-
* Gets the livestreaming metadata of the activity, or `undefined` if the activity is not participating in a livestreaming session.
|
|
553
|
-
*
|
|
554
|
-
* - `sessionId` - ID of the livestreaming session
|
|
555
|
-
* - `sequenceNumber` - sequence number of the activity
|
|
556
|
-
* - `type`
|
|
557
|
-
* - `"contentless"` - ongoing but no content, should show indicator
|
|
558
|
-
* - `"interim activity"` - current response, could be partial-from-start, or complete response.
|
|
559
|
-
* More activities are expected. Future interim activities always replace past interim activities, enable erasing or backtracking response.
|
|
560
|
-
* - `"informative message"` - optional side-channel informative message describing the current response, e.g. "Searching your document library".
|
|
561
|
-
* Always replace past informative messages. May interleave with interim activities.
|
|
562
|
-
* - `"final activity"` - complete-and-final response, always replace past interim activities and remove all informative messages.
|
|
563
|
-
* This activity indicates end of the session, all future activities must be ignored.
|
|
564
|
-
* - `undefined` - not part of a livestream session or the activity is not valid
|
|
565
|
-
*
|
|
566
|
-
* @returns {object} Livestreaming metadata of the activity, or `undefined` if the activity is not participating in a livestreaming session.
|
|
567
|
-
*/
|
|
568
|
-
declare function getActivityLivestreamingMetadata(activity: WebChatActivity): Readonly<{
|
|
569
|
-
sessionId: string;
|
|
570
|
-
sequenceNumber: number;
|
|
571
|
-
type: 'contentless' | 'final activity' | 'informative message' | 'interim activity';
|
|
572
|
-
}> | undefined;
|
|
785
|
+
declare function getOrgSchemaMessage(graph: readonly WebChatActivity['entities'][0][]): CreativeWork | undefined;
|
|
573
786
|
|
|
574
|
-
|
|
575
|
-
declare function getOrgSchemaMessage(graph: readonly EntityType[]): CreativeWork | undefined;
|
|
787
|
+
declare function isForbiddenPropertyName(propertyName: string): boolean;
|
|
576
788
|
|
|
577
789
|
declare function onErrorResumeNext<T>(fn: () => T): T | undefined;
|
|
578
790
|
declare function onErrorResumeNext<T, U = T>(fn: () => T, defaultValue: U): T | U;
|
|
579
791
|
|
|
580
|
-
declare
|
|
581
|
-
|
|
582
|
-
declare
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
readonly name: valibot.StringSchema<undefined>;
|
|
586
|
-
readonly type: valibot.LiteralSchema<"event", undefined>;
|
|
587
|
-
readonly value: valibot.LooseObjectSchema<{}, undefined>;
|
|
588
|
-
readonly valueType: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.CheckAction<string, undefined>]>;
|
|
589
|
-
}, undefined>;
|
|
590
|
-
declare const isVoiceActivity: (activity: WebChatActivity) => activity is WebChatActivity & InferOutput<typeof VoiceActivitySchema>;
|
|
591
|
-
|
|
592
|
-
declare const VoiceTranscriptActivitySchema: valibot.ObjectSchema<{
|
|
593
|
-
readonly name: valibot.LiteralSchema<"media.end", undefined>;
|
|
594
|
-
readonly type: valibot.LiteralSchema<"event", undefined>;
|
|
595
|
-
readonly value: valibot.ObjectSchema<{
|
|
596
|
-
readonly origin: valibot.PicklistSchema<["agent", "user"], undefined>;
|
|
597
|
-
readonly transcription: valibot.StringSchema<undefined>;
|
|
598
|
-
}, undefined>;
|
|
599
|
-
readonly valueType: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.CheckAction<string, undefined>]>;
|
|
600
|
-
}, undefined>;
|
|
601
|
-
declare const isVoiceTranscriptActivity: (activity: WebChatActivity) => activity is WebChatActivity & InferOutput<typeof VoiceTranscriptActivitySchema>;
|
|
602
|
-
|
|
603
|
-
declare const CLEAR_SUGGESTED_ACTIONS: "WEB_CHAT/CLEAR_SUGGESTED_ACTIONS";
|
|
604
|
-
declare const clearSuggestedActionsActionSchema: valibot.SchemaWithPipe<readonly [valibot.ObjectSchema<{
|
|
605
|
-
readonly type: valibot.LiteralSchema<"WEB_CHAT/CLEAR_SUGGESTED_ACTIONS", undefined>;
|
|
606
|
-
}, undefined>, valibot.ReadonlyAction<{
|
|
607
|
-
type: "WEB_CHAT/CLEAR_SUGGESTED_ACTIONS";
|
|
608
|
-
}>]>;
|
|
609
|
-
type ClearSuggestedActionsAction = InferOutput<typeof clearSuggestedActionsActionSchema>;
|
|
610
|
-
declare function clearSuggestedActions(): ClearSuggestedActionsAction;
|
|
611
|
-
|
|
612
|
-
declare const SET_SUGGESTED_ACTIONS: "WEB_CHAT/SET_SUGGESTED_ACTIONS";
|
|
613
|
-
declare const setSuggestedActionsActionSchema: valibot.SchemaWithPipe<readonly [valibot.ObjectSchema<{
|
|
614
|
-
readonly payload: valibot.SchemaWithPipe<readonly [valibot.ObjectSchema<{
|
|
615
|
-
readonly originActivity: valibot.OptionalSchema<valibot.CustomSchema<WebChatActivity, undefined>, undefined>;
|
|
616
|
-
readonly suggestedActions: valibot.SchemaWithPipe<readonly [valibot.ArraySchema<valibot.CustomSchema<DirectLineCardAction, undefined>, undefined>, valibot.ReadonlyAction<DirectLineCardAction[]>]>;
|
|
617
|
-
}, undefined>, valibot.ReadonlyAction<{
|
|
618
|
-
originActivity?: WebChatActivity;
|
|
619
|
-
readonly suggestedActions: readonly DirectLineCardAction[];
|
|
620
|
-
}>]>;
|
|
621
|
-
readonly type: valibot.LiteralSchema<"WEB_CHAT/SET_SUGGESTED_ACTIONS", undefined>;
|
|
622
|
-
}, undefined>, valibot.ReadonlyAction<{
|
|
623
|
-
readonly payload: Readonly<{
|
|
624
|
-
originActivity?: WebChatActivity;
|
|
625
|
-
readonly suggestedActions: readonly DirectLineCardAction[];
|
|
626
|
-
}>;
|
|
627
|
-
type: "WEB_CHAT/SET_SUGGESTED_ACTIONS";
|
|
628
|
-
}>]>;
|
|
629
|
-
type SetSuggestedActionsAction = InferOutput<typeof setSuggestedActionsActionSchema>;
|
|
630
|
-
declare function setSuggestedActions(suggestedActions?: readonly DirectLineCardAction[], originActivity?: undefined | WebChatActivity): SetSuggestedActionsAction;
|
|
631
|
-
|
|
632
|
-
type DirectLineActivity = Exclude<any, [] | boolean | ((...args: unknown[]) => unknown) | number | string>;
|
|
792
|
+
declare function singleToArray<T>(singleOrArray: T | T[]): T[];
|
|
793
|
+
|
|
794
|
+
declare function warnOnce(message: string): () => void;
|
|
795
|
+
|
|
796
|
+
type DirectLineActivity = Exclude<any, [] | boolean | Function | number | string>;
|
|
633
797
|
|
|
634
798
|
type DirectLineMediaCardEssence = {
|
|
635
799
|
aspect?: '4:3' | '16:9';
|
|
@@ -776,12 +940,12 @@ declare const Constants: {
|
|
|
776
940
|
ActivityClientState: any;
|
|
777
941
|
DictateState: any;
|
|
778
942
|
};
|
|
779
|
-
|
|
780
|
-
declare const buildInfoObject: {
|
|
781
|
-
readonly buildTool?: string | undefined;
|
|
782
|
-
readonly moduleFormat?: string | undefined;
|
|
783
|
-
readonly version?: string | undefined;
|
|
784
|
-
};
|
|
943
|
+
declare const moduleFormat: string;
|
|
785
944
|
declare const version: string;
|
|
945
|
+
declare const buildInfo: {
|
|
946
|
+
buildTool: string;
|
|
947
|
+
moduleFormat: string;
|
|
948
|
+
version: string;
|
|
949
|
+
};
|
|
786
950
|
|
|
787
|
-
export {
|
|
951
|
+
export { Constants, type DirectLineActivity, type DirectLineAnimationCard, type DirectLineAttachment, type DirectLineAudioCard, type DirectLineCardAction, type DirectLineHeroCard, type DirectLineJSBotConnection, type DirectLineOAuthCard, type DirectLineReceiptCard, type DirectLineSignInCard, type DirectLineSuggestedAction, type DirectLineThumbnailCard, type DirectLineVideoCard, type GlobalScopePonyfill, Observable, type OneOrMany, type Action as OrgSchemaAction, type Claim as OrgSchemaClaim, type CreativeWork as OrgSchemaCreativeWork, type DefinedTerm as OrgSchemaDefinedTerm, type Project as OrgSchemaProject, type Thing as OrgSchemaThing, type SendBoxAttachment, type WebChatActivity, buildInfo, clearSuggestedActions, connect, createStore, withDevTools as createStoreWithDevTools, withOptions as createStoreWithOptions, disconnect, dismissNotification, emitTypingIndicator, getOrgSchemaMessage, isForbiddenPropertyName, markActivity, moduleFormat, onErrorResumeNext, parseAction, parseClaim, parseCreativeWork, parseDefinedTerm, parseProject, parseThing, parseVoteAction, postActivity, sendEvent, sendFiles, sendMessage, sendMessageback as sendMessageBack, sendPostback as sendPostBack, setDictateInterims, setDictateState, setLanguage, setNotification, setSendBox, setSendBoxAttachments, setSendTimeout, setSendTypingIndicator, singleToArray, startDictate, startSpeakingActivity, stopDictate, stopSpeakingActivity, submitSendBox, version, warnOnce };
|