botframework-webchat-core 4.18.1 → 4.19.0
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/LICENSE +21 -0
- package/activity.js +3 -0
- package/boot/deprecated/activity.js +7 -0
- package/boot/deprecated/activity.mjs +5 -0
- package/boot/deprecated/graph.js +7 -0
- package/boot/deprecated/graph.mjs +5 -0
- package/boot/deprecated/internal.js +7 -0
- package/boot/deprecated/internal.mjs +5 -0
- package/dist/WebChatActivity-CYqxBG_4.d.mts +271 -0
- package/dist/WebChatActivity-CYqxBG_4.d.ts +271 -0
- package/dist/_dtsroll-chunks/B7Whm73Q-tagged.d.ts +71 -0
- package/dist/_dtsroll-chunks/C-MxR98A-botframework-webchat-core-debug-api.d.ts +135 -0
- package/dist/_dtsroll-chunks/CAquHfZK-botframework-webchat-base.utils.d.ts +17 -0
- package/dist/_dtsroll-chunks/CDVed0Q--botframework-webchat-core.org-schema.d.ts +601 -0
- package/dist/_dtsroll-chunks/vlDgTKWF-botframework-webchat-core-graph.d.ts +239 -0
- package/dist/botframework-webchat-core.activity.d.mts +23 -0
- package/dist/botframework-webchat-core.activity.d.ts +23 -0
- package/dist/botframework-webchat-core.activity.js +2 -0
- package/dist/botframework-webchat-core.activity.js.map +1 -0
- package/dist/botframework-webchat-core.activity.mjs +2 -0
- package/dist/botframework-webchat-core.activity.mjs.map +1 -0
- package/dist/botframework-webchat-core.d.mts +267 -662
- package/dist/botframework-webchat-core.d.ts +556 -0
- package/dist/botframework-webchat-core.graph.d.mts +9 -0
- package/dist/botframework-webchat-core.graph.d.ts +9 -0
- package/dist/botframework-webchat-core.graph.js +2 -0
- package/dist/botframework-webchat-core.graph.js.map +1 -0
- package/dist/botframework-webchat-core.graph.mjs +2 -0
- package/dist/botframework-webchat-core.graph.mjs.map +1 -0
- package/dist/botframework-webchat-core.internal.d.mts +61 -0
- package/dist/botframework-webchat-core.internal.d.ts +61 -0
- package/dist/botframework-webchat-core.internal.js +2 -0
- package/dist/botframework-webchat-core.internal.js.map +1 -0
- package/dist/botframework-webchat-core.internal.mjs +2 -0
- package/dist/botframework-webchat-core.internal.mjs.map +1 -0
- package/dist/botframework-webchat-core.js +2 -0
- package/dist/botframework-webchat-core.js.map +1 -0
- package/dist/botframework-webchat-core.json-ld.d.mts +2 -0
- package/dist/botframework-webchat-core.json-ld.d.ts +2 -0
- package/dist/botframework-webchat-core.json-ld.js +2 -0
- package/dist/botframework-webchat-core.json-ld.js.map +1 -0
- package/dist/botframework-webchat-core.json-ld.mjs +2 -0
- package/dist/botframework-webchat-core.json-ld.mjs.map +1 -0
- package/dist/botframework-webchat-core.mjs +1 -2
- package/dist/botframework-webchat-core.mjs.map +1 -1
- package/dist/botframework-webchat-core.org-schema.d.mts +2 -0
- package/dist/botframework-webchat-core.org-schema.d.ts +2 -0
- package/dist/botframework-webchat-core.org-schema.js +2 -0
- package/dist/botframework-webchat-core.org-schema.js.map +1 -0
- package/dist/botframework-webchat-core.org-schema.mjs +2 -0
- package/dist/botframework-webchat-core.org-schema.mjs.map +1 -0
- package/dist/chunk-A4GEFYZJ.mjs +2 -0
- package/dist/chunk-A4GEFYZJ.mjs.map +1 -0
- package/dist/chunk-HZWWJL43.mjs +2 -0
- package/dist/chunk-HZWWJL43.mjs.map +1 -0
- package/dist/chunk-ICNZKQJW.mjs +2 -0
- package/dist/chunk-ICNZKQJW.mjs.map +1 -0
- package/dist/chunk-K6E6QQMQ.js +2 -0
- package/dist/chunk-K6E6QQMQ.js.map +1 -0
- package/dist/chunk-KPT5FBH2.mjs +2 -0
- package/dist/chunk-KPT5FBH2.mjs.map +1 -0
- package/dist/chunk-LO5BZSVE.js +2 -0
- package/dist/chunk-LO5BZSVE.js.map +1 -0
- package/dist/chunk-LP2X2JTR.js +2 -0
- package/dist/chunk-LP2X2JTR.js.map +1 -0
- package/dist/chunk-RUERYYZO.js +2 -0
- package/dist/chunk-RUERYYZO.js.map +1 -0
- package/dist/chunk-XOE3AOSM.js +2 -0
- package/dist/chunk-XOE3AOSM.js.map +1 -0
- package/dist/chunk-Y6ZDNVRT.mjs +2 -0
- package/dist/chunk-Y6ZDNVRT.mjs.map +1 -0
- package/{lib/createStore.d.ts → dist/createStore-CcvouBrW.d.mts} +29 -7
- package/dist/createStore-CcvouBrW.d.ts +65 -0
- package/dist/metafile-cjs.json +1 -0
- package/dist/metafile-esm.json +1 -1
- package/graph.js +3 -0
- package/internal.js +3 -0
- package/json-ld.js +3 -0
- package/org-schema.js +3 -0
- package/package.json +147 -73
- package/src/__tests__/activityFromBot.spec.js +2 -0
- package/src/__tests__/addMetaTag.spec.js +8 -0
- package/src/__tests__/addMetaTag.spec.mjs +8 -0
- package/src/__tests__/connectSaga.spec.js +2 -0
- package/src/__tests__/deleteKey.spec.js +2 -0
- package/src/__tests__/detectSlowConnectionSaga.spec.js +3 -1
- package/src/__tests__/observeOnce.spec.js +2 -0
- package/src/__tests__/speakableActivity.spec.js +2 -0
- package/src/__tests__/uniqueID.spec.js +2 -0
- package/src/actions/clearSuggestedActions.ts +20 -0
- package/src/actions/{connect.js → connect.ts} +9 -1
- package/src/actions/muteVoiceRecording.ts +17 -0
- package/src/actions/postVoiceActivity.ts +21 -0
- package/src/actions/registerActionSink.ts +29 -0
- package/src/actions/registerVoiceHandler.ts +24 -0
- package/src/actions/{sendEvent.js → sendEvent.ts} +1 -1
- package/src/actions/{sendMessageBack.js → sendMessageBack.ts} +1 -1
- package/src/actions/{sendPostBack.js → sendPostBack.ts} +1 -1
- package/src/actions/{setDictateInterims.js → setDictateInterims.ts} +1 -1
- package/src/actions/{setDictateState.js → setDictateState.ts} +1 -1
- package/src/actions/{setLanguage.js → setLanguage.ts} +1 -1
- package/src/actions/{setSendBox.js → setSendBox.ts} +1 -1
- package/src/actions/{setSendTimeout.js → setSendTimeout.ts} +1 -1
- package/src/actions/setSendTypingIndicator.ts +1 -1
- package/src/actions/setSuggestedActions.ts +35 -0
- package/src/actions/setVoiceState.ts +21 -0
- package/src/actions/startVoiceRecording.ts +17 -0
- package/src/actions/stopVoiceRecording.ts +17 -0
- package/src/actions/{submitSendBox.js → submitSendBox.ts} +1 -1
- package/src/actions/unmuteVoiceRecording.ts +17 -0
- package/src/actions/unregisterActionSink.ts +29 -0
- package/src/actions/unregisterVoiceHandler.ts +19 -0
- package/src/boot/activity.ts +19 -0
- package/src/boot/graph.ts +18 -0
- package/src/boot/internal.ts +11 -0
- package/src/boot/json-ld.ts +6 -0
- package/src/boot/org-schema.ts +29 -0
- package/src/buildInfo.ts +9 -0
- package/src/constants/{ActivityClientState.js → ActivityClientState.ts} +3 -3
- package/src/constants/DictateState.ts +10 -0
- package/src/createPromiseQueue.js +8 -6
- package/src/createReducer.ts +28 -20
- package/src/createSagas.ts +6 -3
- package/src/createStore.ts +26 -10
- package/src/env.d.ts +12 -0
- package/src/graph/createGraphFromStore.ts +121 -0
- package/src/index.ts +62 -45
- package/src/internal/StoreDebugAPIRegistry.ts +4 -0
- package/src/internal/actions/setRawState.ts +48 -0
- package/src/internal/types/suggestedActions.ts +11 -0
- package/src/internal/types/suggestedActionsOriginActivity.ts +16 -0
- package/src/reducers/activities/combineActivitiesReducer.ts +58 -0
- package/src/reducers/activities/createGroupedActivitiesReducer.ts +297 -0
- package/src/reducers/activities/patchActivity.ts +37 -0
- package/src/reducers/activities/sort/deleteActivityByLocalId.activity.spec.ts +144 -0
- package/src/reducers/activities/sort/deleteActivityByLocalId.howTo.spec.ts +148 -0
- package/src/reducers/activities/sort/deleteActivityByLocalId.howToWithLivestream.spec.ts +248 -0
- package/src/reducers/activities/sort/deleteActivityByLocalId.livestream.spec.ts +156 -0
- package/src/reducers/activities/sort/deleteActivityByLocalId.ts +177 -0
- package/src/reducers/activities/sort/private/computePartListTimestamp.ts +9 -0
- package/src/reducers/activities/sort/private/computeSortedActivities.ts +51 -0
- package/src/reducers/activities/sort/private/getLogicalTimestamp.spec.ts +49 -0
- package/src/reducers/activities/sort/private/getLogicalTimestamp.ts +33 -0
- package/src/reducers/activities/sort/private/getPartGroupingMetadataMap.spec.ts +92 -0
- package/src/reducers/activities/sort/private/getPartGroupingMetadataMap.ts +37 -0
- package/src/reducers/activities/sort/private/insertSorted.spec.ts +106 -0
- package/src/reducers/activities/sort/private/insertSorted.ts +18 -0
- package/src/reducers/activities/sort/property/LocalId.ts +60 -0
- package/src/reducers/activities/sort/property/Position.ts +39 -0
- package/src/reducers/activities/sort/property/ReceivedAt.ts +45 -0
- package/src/reducers/activities/sort/property/SendStatus.ts +51 -0
- package/src/reducers/activities/sort/queryLocalIdByActivityId.ts +6 -0
- package/src/reducers/activities/sort/queryLocalIdByClientActivityId.ts +6 -0
- package/src/reducers/activities/sort/types.ts +80 -0
- package/src/reducers/activities/sort/updateActivityChannelData.ts +101 -0
- package/src/reducers/activities/sort/updateSendState.ts +22 -0
- package/src/reducers/activities/sort/upsert.activity.spec.ts +500 -0
- package/src/reducers/activities/sort/upsert.howTo.spec.ts +368 -0
- package/src/reducers/activities/sort/upsert.howToWithLivestream.spec.ts +384 -0
- package/src/reducers/activities/sort/upsert.livestream.spec.ts +418 -0
- package/src/reducers/activities/sort/upsert.ts +498 -0
- package/src/reducers/activities/tsconfig.json +4 -0
- package/src/reducers/createNotificationsReducer.ts +4 -4
- package/src/reducers/suggestedActions.ts +21 -0
- package/src/reducers/suggestedActionsOriginActivity.ts +24 -0
- package/src/reducers/voiceActivity.ts +102 -0
- package/src/sagas/actionSinkSaga.ts +39 -0
- package/src/sagas/observeActivitySaga.ts +51 -1
- package/src/sagas/postActivitySaga.ts +17 -10
- package/src/sagas/postVoiceActivitySaga.ts +76 -0
- package/src/sagas/queueIncomingActivitySaga.ts +10 -4
- package/src/sagas/sendMessageToPostActivitySaga.ts +4 -1
- package/src/sagas/speakActivityAndStartDictateOnIncomingActivityFromOthersSaga.js +10 -4
- package/src/sagas/startDictateOnSpeakCompleteSaga.js +3 -3
- package/src/sagas/startSpeakActivityOnPostActivitySaga.js +15 -5
- package/src/sagas/stopDictateOnCardActionSaga.js +11 -3
- package/src/sagas/stopSpeakingActivityOnInputSaga.js +22 -4
- package/src/selectors/combineSelectors.ts +1 -1
- package/src/tsconfig.json +3 -15
- package/src/types/StoreDebugAPI.ts +25 -0
- package/src/types/WebChatActivity.ts +31 -14
- package/src/types/external/DirectLineActivity.ts +1 -1
- package/src/types/external/Observable.ts +4 -1
- package/src/types/internal/GlobalScopeClock.ts +10 -10
- package/src/types/internal/ReduxState.ts +2 -0
- package/src/types/internal/WebChatOutgoingActivity.ts +1 -1
- package/src/utils/dateToLocaleISOString.chatham.spec.js +1 -2
- package/src/utils/dateToLocaleISOString.japan.spec.js +1 -2
- package/src/utils/dateToLocaleISOString.newfoundland.spec.js +1 -2
- package/src/utils/dateToLocaleISOString.pacific.spec.js +1 -2
- package/src/utils/dateToLocaleISOString.utc.spec.js +1 -3
- package/src/utils/deleteKey.ts +1 -1
- package/src/utils/getActivityLivestreamingMetadata.spec.ts +297 -0
- package/src/utils/getActivityLivestreamingMetadata.ts +197 -0
- package/src/utils/getOrgSchemaMessage.spec.ts +4 -1
- package/src/utils/getOrgSchemaMessage.ts +16 -16
- package/src/utils/onErrorResumeNext.ts +1 -1
- package/src/utils/voiceActivity/getVoiceActivityRole.spec.ts +150 -0
- package/src/utils/voiceActivity/getVoiceActivityRole.ts +16 -0
- package/src/utils/voiceActivity/getVoiceActivityText.spec.ts +100 -0
- package/src/utils/voiceActivity/getVoiceActivityText.ts +11 -0
- package/src/utils/voiceActivity/isVoiceActivity.spec.ts +202 -0
- package/src/utils/voiceActivity/isVoiceActivity.ts +21 -0
- package/src/utils/voiceActivity/isVoiceTranscriptActivity.spec.ts +224 -0
- package/src/utils/voiceActivity/isVoiceTranscriptActivity.ts +24 -0
- package/dist/botframework-webchat-core.mjs.LEGAL.txt +0 -0
- package/lib/actions/clearSuggestedActions.js +0 -15
- package/lib/actions/connect.js +0 -33
- package/lib/actions/connectionStatusUpdate.js +0 -20
- package/lib/actions/deleteActivity.d.ts +0 -13
- package/lib/actions/deleteActivity.d.ts.map +0 -1
- package/lib/actions/deleteActivity.js +0 -19
- package/lib/actions/disconnect.js +0 -21
- package/lib/actions/dismissNotification.d.ts +0 -12
- package/lib/actions/dismissNotification.d.ts.map +0 -1
- package/lib/actions/dismissNotification.js +0 -19
- package/lib/actions/emitTypingIndicator.js +0 -15
- package/lib/actions/incomingActivity.d.ts +0 -14
- package/lib/actions/incomingActivity.d.ts.map +0 -1
- package/lib/actions/incomingActivity.js +0 -19
- package/lib/actions/markActivity.d.ts +0 -17
- package/lib/actions/markActivity.d.ts.map +0 -1
- package/lib/actions/markActivity.js +0 -22
- package/lib/actions/postActivity.d.ts +0 -64
- package/lib/actions/postActivity.d.ts.map +0 -1
- package/lib/actions/postActivity.js +0 -31
- package/lib/actions/queueIncomingActivity.js +0 -18
- package/lib/actions/reconnect.js +0 -17
- package/lib/actions/sagaError.d.ts +0 -8
- package/lib/actions/sagaError.d.ts.map +0 -1
- package/lib/actions/sagaError.js +0 -15
- package/lib/actions/sendEvent.js +0 -19
- package/lib/actions/sendFiles.d.ts +0 -19
- package/lib/actions/sendFiles.d.ts.map +0 -1
- package/lib/actions/sendFiles.js +0 -20
- package/lib/actions/sendMessage.d.ts +0 -19
- package/lib/actions/sendMessage.d.ts.map +0 -1
- package/lib/actions/sendMessage.js +0 -24
- package/lib/actions/sendMessageBack.js +0 -20
- package/lib/actions/sendPostBack.js +0 -18
- package/lib/actions/setClockSkewAdjustment.js +0 -12
- package/lib/actions/setDictateInterims.js +0 -18
- package/lib/actions/setDictateState.js +0 -18
- package/lib/actions/setLanguage.js +0 -18
- package/lib/actions/setNotification.d.ts +0 -10
- package/lib/actions/setNotification.d.ts.map +0 -1
- package/lib/actions/setNotification.js +0 -37
- package/lib/actions/setReferenceGrammarID.js +0 -18
- package/lib/actions/setSendBox.js +0 -18
- package/lib/actions/setSendBoxAttachments.d.ts +0 -13
- package/lib/actions/setSendBoxAttachments.d.ts.map +0 -1
- package/lib/actions/setSendBoxAttachments.js +0 -18
- package/lib/actions/setSendTimeout.js +0 -18
- package/lib/actions/setSendTypingIndicator.d.ts +0 -11
- package/lib/actions/setSendTypingIndicator.d.ts.map +0 -1
- package/lib/actions/setSendTypingIndicator.js +0 -18
- package/lib/actions/setSuggestedActions.js +0 -20
- package/lib/actions/startDictate.js +0 -15
- package/lib/actions/startSpeakingActivity.js +0 -15
- package/lib/actions/stopDictate.js +0 -15
- package/lib/actions/stopSpeakingActivity.js +0 -15
- package/lib/actions/submitSendBox.js +0 -22
- package/lib/actions/updateConnectionStatus.js +0 -18
- package/lib/constants/ActivityClientState.js +0 -16
- package/lib/constants/DictateState.js +0 -17
- package/lib/createPromiseQueue.js +0 -30
- package/lib/createReducer.d.ts +0 -60
- package/lib/createReducer.d.ts.map +0 -1
- package/lib/createReducer.js +0 -45
- package/lib/createSagas.d.ts +0 -8
- package/lib/createSagas.d.ts.map +0 -1
- package/lib/createSagas.js +0 -112
- package/lib/createStore.d.ts.map +0 -1
- package/lib/createStore.js +0 -131
- package/lib/definitions/activityFromBot.js +0 -11
- package/lib/definitions/speakableActivity.js +0 -10
- package/lib/definitions/speakingActivity.js +0 -13
- package/lib/index.d.ts +0 -76
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -309
- package/lib/reducers/connectivityStatus.js +0 -49
- package/lib/reducers/createActivitiesReducer.d.ts +0 -12
- package/lib/reducers/createActivitiesReducer.d.ts.map +0 -1
- package/lib/reducers/createActivitiesReducer.js +0 -267
- package/lib/reducers/createInternalReducer.d.ts +0 -10
- package/lib/reducers/createInternalReducer.d.ts.map +0 -1
- package/lib/reducers/createInternalReducer.js +0 -19
- package/lib/reducers/createNotificationsReducer.d.ts +0 -11
- package/lib/reducers/createNotificationsReducer.d.ts.map +0 -1
- package/lib/reducers/createNotificationsReducer.js +0 -55
- package/lib/reducers/createTypingReducer.d.ts +0 -14
- package/lib/reducers/createTypingReducer.d.ts.map +0 -1
- package/lib/reducers/createTypingReducer.js +0 -50
- package/lib/reducers/dictateInterims.js +0 -23
- package/lib/reducers/dictateState.js +0 -38
- package/lib/reducers/language.js +0 -23
- package/lib/reducers/private/findBeforeAfter.d.ts +0 -4
- package/lib/reducers/private/findBeforeAfter.d.ts.map +0 -1
- package/lib/reducers/private/findBeforeAfter.js +0 -24
- package/lib/reducers/readyState.js +0 -23
- package/lib/reducers/referenceGrammarID.js +0 -23
- package/lib/reducers/sendBoxAttachments.d.ts +0 -9
- package/lib/reducers/sendBoxAttachments.d.ts.map +0 -1
- package/lib/reducers/sendBoxAttachments.js +0 -23
- package/lib/reducers/sendBoxValue.js +0 -23
- package/lib/reducers/sendTimeout.js +0 -23
- package/lib/reducers/sendTypingIndicator.js +0 -23
- package/lib/reducers/shouldSpeakIncomingActivity.js +0 -25
- package/lib/reducers/suggestedActions.js +0 -32
- package/lib/sagas/clearSuggestedActionsOnPostActivitySaga.js +0 -62
- package/lib/sagas/connectSaga.js +0 -445
- package/lib/sagas/connectionStatusToNotificationSaga.js +0 -107
- package/lib/sagas/connectionStatusUpdateSaga.js +0 -63
- package/lib/sagas/detectSlowConnectionSaga.d.ts +0 -5
- package/lib/sagas/detectSlowConnectionSaga.d.ts.map +0 -1
- package/lib/sagas/detectSlowConnectionSaga.js +0 -50
- package/lib/sagas/effects/forever.js +0 -19
- package/lib/sagas/effects/forkPut.js +0 -51
- package/lib/sagas/effects/observeEach.js +0 -45
- package/lib/sagas/effects/observeOnce.d.ts +0 -3
- package/lib/sagas/effects/observeOnce.d.ts.map +0 -1
- package/lib/sagas/effects/observeOnce.js +0 -42
- package/lib/sagas/effects/whileConnected.d.ts +0 -7
- package/lib/sagas/effects/whileConnected.d.ts.map +0 -1
- package/lib/sagas/effects/whileConnected.js +0 -55
- package/lib/sagas/emitTypingIndicatorToPostActivitySaga.js +0 -63
- package/lib/sagas/markAllAsSpokenOnStopSpeakActivitySaga.js +0 -78
- package/lib/sagas/observeActivitySaga.d.ts +0 -2
- package/lib/sagas/observeActivitySaga.d.ts.map +0 -1
- package/lib/sagas/observeActivitySaga.js +0 -117
- package/lib/sagas/postActivitySaga.d.ts +0 -3
- package/lib/sagas/postActivitySaga.d.ts.map +0 -1
- package/lib/sagas/postActivitySaga.js +0 -264
- package/lib/sagas/queueIncomingActivitySaga.d.ts +0 -3
- package/lib/sagas/queueIncomingActivitySaga.d.ts.map +0 -1
- package/lib/sagas/queueIncomingActivitySaga.js +0 -197
- package/lib/sagas/sendEventToPostActivitySaga.js +0 -68
- package/lib/sagas/sendFilesToPostActivitySaga.js +0 -85
- package/lib/sagas/sendMessageBackToPostActivitySaga.js +0 -70
- package/lib/sagas/sendMessageToPostActivitySaga.d.ts +0 -2
- package/lib/sagas/sendMessageToPostActivitySaga.d.ts.map +0 -1
- package/lib/sagas/sendMessageToPostActivitySaga.js +0 -91
- package/lib/sagas/sendPostBackToPostActivitySaga.js +0 -69
- package/lib/sagas/sendTypingIndicatorOnSetSendBoxSaga.d.ts +0 -3
- package/lib/sagas/sendTypingIndicatorOnSetSendBoxSaga.d.ts.map +0 -1
- package/lib/sagas/sendTypingIndicatorOnSetSendBoxSaga.js +0 -145
- package/lib/sagas/speakActivityAndStartDictateOnIncomingActivityFromOthersSaga.js +0 -106
- package/lib/sagas/startDictateOnSpeakCompleteSaga.js +0 -65
- package/lib/sagas/startSpeakActivityOnPostActivitySaga.js +0 -62
- package/lib/sagas/stopDictateOnCardActionSaga.js +0 -65
- package/lib/sagas/stopSpeakingActivityOnInputSaga.js +0 -68
- package/lib/sagas/submitSendBoxSaga.js +0 -84
- package/lib/selectors/activities.d.ts +0 -9
- package/lib/selectors/activities.d.ts.map +0 -1
- package/lib/selectors/activities.js +0 -33
- package/lib/selectors/combineSelectors.js +0 -31
- package/lib/selectors/dictateState.js +0 -12
- package/lib/selectors/language.d.ts +0 -4
- package/lib/selectors/language.d.ts.map +0 -1
- package/lib/selectors/language.js +0 -12
- package/lib/selectors/notifications.js +0 -13
- package/lib/selectors/sendBoxAttachments.js +0 -11
- package/lib/selectors/sendBoxValue.js +0 -12
- package/lib/selectors/sendTimeout.d.ts +0 -4
- package/lib/selectors/sendTimeout.d.ts.map +0 -1
- package/lib/selectors/sendTimeout.js +0 -12
- package/lib/selectors/sendTypingIndicator.d.ts +0 -4
- package/lib/selectors/sendTypingIndicator.d.ts.map +0 -1
- package/lib/selectors/sendTypingIndicator.js +0 -12
- package/lib/selectors/shouldSpeakIncomingActivity.js +0 -12
- package/lib/types/AnyAnd.d.ts +0 -2
- package/lib/types/AnyAnd.d.ts.map +0 -1
- package/lib/types/AnyAnd.js +0 -6
- package/lib/types/GlobalScopePonyfill.d.ts +0 -8
- package/lib/types/GlobalScopePonyfill.d.ts.map +0 -1
- package/lib/types/GlobalScopePonyfill.js +0 -6
- package/lib/types/OneOrMany.d.ts +0 -3
- package/lib/types/OneOrMany.d.ts.map +0 -1
- package/lib/types/OneOrMany.js +0 -6
- package/lib/types/SendBoxAttachment.d.ts +0 -5
- package/lib/types/SendBoxAttachment.d.ts.map +0 -1
- package/lib/types/SendBoxAttachment.js +0 -6
- package/lib/types/WebChatActivity.d.ts +0 -128
- package/lib/types/WebChatActivity.d.ts.map +0 -1
- package/lib/types/WebChatActivity.js +0 -6
- package/lib/types/external/DirectLineActivity.d.ts +0 -3
- package/lib/types/external/DirectLineActivity.d.ts.map +0 -1
- package/lib/types/external/DirectLineActivity.js +0 -6
- package/lib/types/external/DirectLineAnimationCard.d.ts +0 -6
- package/lib/types/external/DirectLineAnimationCard.d.ts.map +0 -1
- package/lib/types/external/DirectLineAnimationCard.js +0 -6
- package/lib/types/external/DirectLineAttachment.d.ts +0 -9
- package/lib/types/external/DirectLineAttachment.d.ts.map +0 -1
- package/lib/types/external/DirectLineAttachment.js +0 -6
- package/lib/types/external/DirectLineAudioCard.d.ts +0 -6
- package/lib/types/external/DirectLineAudioCard.d.ts.map +0 -1
- package/lib/types/external/DirectLineAudioCard.js +0 -6
- package/lib/types/external/DirectLineBasicCardEssence.d.ts +0 -12
- package/lib/types/external/DirectLineBasicCardEssence.d.ts.map +0 -1
- package/lib/types/external/DirectLineBasicCardEssence.js +0 -6
- package/lib/types/external/DirectLineCardAction.d.ts +0 -110
- package/lib/types/external/DirectLineCardAction.d.ts.map +0 -1
- package/lib/types/external/DirectLineCardAction.js +0 -6
- package/lib/types/external/DirectLineCardImage.d.ts +0 -8
- package/lib/types/external/DirectLineCardImage.d.ts.map +0 -1
- package/lib/types/external/DirectLineCardImage.js +0 -6
- package/lib/types/external/DirectLineHeroCard.d.ts +0 -6
- package/lib/types/external/DirectLineHeroCard.d.ts.map +0 -1
- package/lib/types/external/DirectLineHeroCard.js +0 -6
- package/lib/types/external/DirectLineJSBotConnection.d.ts +0 -3
- package/lib/types/external/DirectLineJSBotConnection.d.ts.map +0 -1
- package/lib/types/external/DirectLineJSBotConnection.js +0 -6
- package/lib/types/external/DirectLineMediaCardEssence.d.ts +0 -21
- package/lib/types/external/DirectLineMediaCardEssence.d.ts.map +0 -1
- package/lib/types/external/DirectLineMediaCardEssence.js +0 -6
- package/lib/types/external/DirectLineOAuthCard.d.ts +0 -8
- package/lib/types/external/DirectLineOAuthCard.d.ts.map +0 -1
- package/lib/types/external/DirectLineOAuthCard.js +0 -6
- package/lib/types/external/DirectLineReceiptCard.d.ts +0 -28
- package/lib/types/external/DirectLineReceiptCard.d.ts.map +0 -1
- package/lib/types/external/DirectLineReceiptCard.js +0 -6
- package/lib/types/external/DirectLineSignInCard.d.ts +0 -8
- package/lib/types/external/DirectLineSignInCard.d.ts.map +0 -1
- package/lib/types/external/DirectLineSignInCard.js +0 -6
- package/lib/types/external/DirectLineSuggestedAction.d.ts +0 -7
- package/lib/types/external/DirectLineSuggestedAction.d.ts.map +0 -1
- package/lib/types/external/DirectLineSuggestedAction.js +0 -6
- package/lib/types/external/DirectLineThumbnailCard.d.ts +0 -6
- package/lib/types/external/DirectLineThumbnailCard.d.ts.map +0 -1
- package/lib/types/external/DirectLineThumbnailCard.js +0 -6
- package/lib/types/external/DirectLineVideoCard.d.ts +0 -6
- package/lib/types/external/DirectLineVideoCard.d.ts.map +0 -1
- package/lib/types/external/DirectLineVideoCard.js +0 -6
- package/lib/types/external/Observable.d.ts +0 -49
- package/lib/types/external/Observable.d.ts.map +0 -1
- package/lib/types/external/Observable.js +0 -6
- package/lib/types/external/OrgSchema/Action.d.ts +0 -29
- package/lib/types/external/OrgSchema/Action.d.ts.map +0 -1
- package/lib/types/external/OrgSchema/Action.js +0 -38
- package/lib/types/external/OrgSchema/Claim.d.ts +0 -35
- package/lib/types/external/OrgSchema/Claim.d.ts.map +0 -1
- package/lib/types/external/OrgSchema/Claim.js +0 -41
- package/lib/types/external/OrgSchema/CreativeWork.d.ts +0 -57
- package/lib/types/external/OrgSchema/CreativeWork.d.ts.map +0 -1
- package/lib/types/external/OrgSchema/CreativeWork.js +0 -52
- package/lib/types/external/OrgSchema/DefinedTerm.d.ts +0 -26
- package/lib/types/external/OrgSchema/DefinedTerm.d.ts.map +0 -1
- package/lib/types/external/OrgSchema/DefinedTerm.js +0 -33
- package/lib/types/external/OrgSchema/Project.d.ts +0 -20
- package/lib/types/external/OrgSchema/Project.d.ts.map +0 -1
- package/lib/types/external/OrgSchema/Project.js +0 -32
- package/lib/types/external/OrgSchema/Thing.d.ts +0 -53
- package/lib/types/external/OrgSchema/Thing.d.ts.map +0 -1
- package/lib/types/external/OrgSchema/Thing.js +0 -54
- package/lib/types/external/OrgSchema/VoteAction.d.ts +0 -22
- package/lib/types/external/OrgSchema/VoteAction.d.ts.map +0 -1
- package/lib/types/external/OrgSchema/VoteAction.js +0 -34
- package/lib/types/external/OrgSchema/private/orgSchemaProperties.d.ts +0 -3
- package/lib/types/external/OrgSchema/private/orgSchemaProperties.d.ts.map +0 -1
- package/lib/types/external/OrgSchema/private/orgSchemaProperties.js +0 -22
- package/lib/types/external/OrgSchema/private/orgSchemaProperty.d.ts +0 -4
- package/lib/types/external/OrgSchema/private/orgSchemaProperty.d.ts.map +0 -1
- package/lib/types/external/OrgSchema/private/orgSchemaProperty.js +0 -15
- package/lib/types/internal/GlobalScopeClock.d.ts +0 -15
- package/lib/types/internal/GlobalScopeClock.d.ts.map +0 -1
- package/lib/types/internal/GlobalScopeClock.js +0 -6
- package/lib/types/internal/Notification.d.ts +0 -10
- package/lib/types/internal/Notification.d.ts.map +0 -1
- package/lib/types/internal/Notification.js +0 -6
- package/lib/types/internal/ReduxState.d.ts +0 -19
- package/lib/types/internal/ReduxState.d.ts.map +0 -1
- package/lib/types/internal/ReduxState.js +0 -6
- package/lib/types/internal/SendStatus.d.ts +0 -7
- package/lib/types/internal/SendStatus.d.ts.map +0 -1
- package/lib/types/internal/SendStatus.js +0 -19
- package/lib/types/internal/WebChatOutgoingActivity.d.ts +0 -49
- package/lib/types/internal/WebChatOutgoingActivity.d.ts.map +0 -1
- package/lib/types/internal/WebChatOutgoingActivity.js +0 -6
- package/lib/utils/dateToLocaleISOString.d.ts +0 -2
- package/lib/utils/dateToLocaleISOString.d.ts.map +0 -1
- package/lib/utils/dateToLocaleISOString.js +0 -52
- package/lib/utils/deleteKey.d.ts +0 -2
- package/lib/utils/deleteKey.d.ts.map +0 -1
- package/lib/utils/deleteKey.js +0 -30
- package/lib/utils/getOrgSchemaMessage.d.ts +0 -4
- package/lib/utils/getOrgSchemaMessage.d.ts.map +0 -1
- package/lib/utils/getOrgSchemaMessage.js +0 -21
- package/lib/utils/isForbiddenPropertyName.d.ts +0 -2
- package/lib/utils/isForbiddenPropertyName.d.ts.map +0 -1
- package/lib/utils/isForbiddenPropertyName.js +0 -16
- package/lib/utils/onErrorResumeNext.d.ts +0 -3
- package/lib/utils/onErrorResumeNext.d.ts.map +0 -1
- package/lib/utils/onErrorResumeNext.js +0 -19
- package/lib/utils/once.d.ts +0 -2
- package/lib/utils/once.d.ts.map +0 -1
- package/lib/utils/once.js +0 -16
- package/lib/utils/singleToArray.d.ts +0 -2
- package/lib/utils/singleToArray.d.ts.map +0 -1
- package/lib/utils/singleToArray.js +0 -10
- package/lib/utils/sleep.d.ts +0 -3
- package/lib/utils/sleep.d.ts.map +0 -1
- package/lib/utils/sleep.js +0 -12
- package/lib/utils/uniqueID.d.ts +0 -2
- package/lib/utils/uniqueID.d.ts.map +0 -1
- package/lib/utils/uniqueID.js +0 -14
- package/lib/utils/warnOnce.d.ts +0 -2
- package/lib/utils/warnOnce.d.ts.map +0 -1
- package/lib/utils/warnOnce.js +0 -14
- package/src/actions/clearSuggestedActions.js +0 -9
- package/src/actions/setSuggestedActions.js +0 -12
- package/src/constants/DictateState.js +0 -7
- package/src/reducers/createActivitiesReducer.ts +0 -304
- package/src/reducers/private/findBeforeAfter.spec.ts +0 -90
- package/src/reducers/private/findBeforeAfter.ts +0 -30
- package/src/reducers/suggestedActions.js +0 -23
- package/src/types/OneOrMany.ts +0 -3
- package/src/types/external/OrgSchema/Action.spec.ts +0 -35
- package/src/types/external/OrgSchema/Action.ts +0 -52
- package/src/types/external/OrgSchema/Claim.spec.ts +0 -45
- package/src/types/external/OrgSchema/Claim.ts +0 -48
- package/src/types/external/OrgSchema/CreativeWork.parseCreativeWork.spec.ts +0 -51
- package/src/types/external/OrgSchema/CreativeWork.ts +0 -83
- package/src/types/external/OrgSchema/DefinedTerm.ts +0 -37
- package/src/types/external/OrgSchema/Project.parseProject.spec.ts +0 -17
- package/src/types/external/OrgSchema/Project.ts +0 -29
- package/src/types/external/OrgSchema/Thing.parseThing.spec.ts +0 -54
- package/src/types/external/OrgSchema/Thing.ts +0 -94
- package/src/types/external/OrgSchema/VoteAction.spec.ts +0 -35
- package/src/types/external/OrgSchema/VoteAction.ts +0 -31
- package/src/types/external/OrgSchema/private/orgSchemaProperties.spec.ts +0 -41
- package/src/types/external/OrgSchema/private/orgSchemaProperties.ts +0 -23
- package/src/types/external/OrgSchema/private/orgSchemaProperty.spec.ts +0 -21
- package/src/types/external/OrgSchema/private/orgSchemaProperty.ts +0 -6
- package/src/utils/isForbiddenPropertyName.spec.js +0 -6
- package/src/utils/isForbiddenPropertyName.ts +0 -33
- package/src/utils/singleToArray.ts +0 -3
- package/src/utils/warnOnce.ts +0 -5
- /package/src/actions/{connectionStatusUpdate.js → connectionStatusUpdate.ts} +0 -0
- /package/src/actions/{disconnect.js → disconnect.ts} +0 -0
- /package/src/actions/{emitTypingIndicator.js → emitTypingIndicator.ts} +0 -0
- /package/src/actions/{queueIncomingActivity.js → queueIncomingActivity.ts} +0 -0
- /package/src/actions/{reconnect.js → reconnect.ts} +0 -0
- /package/src/actions/{startDictate.js → startDictate.ts} +0 -0
- /package/src/actions/{startSpeakingActivity.js → startSpeakingActivity.ts} +0 -0
- /package/src/actions/{stopDictate.js → stopDictate.ts} +0 -0
- /package/src/actions/{stopSpeakingActivity.js → stopSpeakingActivity.ts} +0 -0
- /package/src/actions/{updateConnectionStatus.js → updateConnectionStatus.ts} +0 -0
|
@@ -1,33 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { D as DirectLineCardAction, W as WebChatActivity } from './WebChatActivity-CYqxBG_4.mjs';
|
|
2
|
+
export { b as DirectLineAttachment, c as DirectLineSuggestedAction } from './WebChatActivity-CYqxBG_4.mjs';
|
|
3
|
+
export { G as GlobalScopePonyfill, c as createStore, w as createStoreWithDevTools, a as createStoreWithOptions } from './createStore-CcvouBrW.mjs';
|
|
4
|
+
import { OrgSchemaCreativeWork as CreativeWorkOutput } from './botframework-webchat-core.org-schema.mjs';
|
|
5
|
+
import * as valibot from 'valibot';
|
|
6
|
+
import { InferOutput } from 'valibot';
|
|
7
|
+
export { O as OneOrMany, P as PromiseWithResolvers, i as isForbiddenPropertyName, s as singleToArray, w as withResolvers } from './_dtsroll-chunks/CAquHfZK-botframework-webchat-base.utils.js';
|
|
8
|
+
import './_dtsroll-chunks/B7Whm73Q-tagged.js';
|
|
9
|
+
import 'redux';
|
|
10
|
+
|
|
11
|
+
declare function connect({ directLine, userID, username }: {
|
|
12
|
+
readonly directLine: any;
|
|
13
|
+
readonly userID: string;
|
|
14
|
+
readonly username: string;
|
|
15
|
+
}): {
|
|
16
|
+
type: string;
|
|
16
17
|
payload: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const DISCONNECT = 'DIRECT_LINE/DISCONNECT';
|
|
18
|
+
directLine: any;
|
|
19
|
+
userID: string;
|
|
20
|
+
username: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
25
23
|
|
|
26
|
-
function disconnect() {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
30
|
-
}
|
|
24
|
+
declare function disconnect(): {
|
|
25
|
+
type: string;
|
|
26
|
+
};
|
|
31
27
|
|
|
32
28
|
declare const DISMISS_NOTIFICATION = "WEB_CHAT/DISMISS_NOTIFICATION";
|
|
33
29
|
type DismissNotificationAction = {
|
|
@@ -38,13 +34,9 @@ type DismissNotificationAction = {
|
|
|
38
34
|
};
|
|
39
35
|
declare function dismissNotification(id: string): DismissNotificationAction;
|
|
40
36
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return {
|
|
45
|
-
type: EMIT_TYPING_INDICATOR
|
|
46
|
-
};
|
|
47
|
-
}
|
|
37
|
+
declare function emitTypingIndicator(): {
|
|
38
|
+
type: string;
|
|
39
|
+
};
|
|
48
40
|
|
|
49
41
|
type MarkActivityActionType = 'WEB_CHAT/MARK_ACTIVITY';
|
|
50
42
|
type MarkActivityAction = {
|
|
@@ -59,253 +51,11 @@ declare function markActivity({ id: activityID }: {
|
|
|
59
51
|
id: string;
|
|
60
52
|
}, name: string, value: any): MarkActivityAction;
|
|
61
53
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
type
|
|
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;
|
|
146
|
-
};
|
|
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;
|
|
54
|
+
declare const VOICE_MUTE_RECORDING: "WEB_CHAT/VOICE_MUTE_RECORDING";
|
|
55
|
+
type VoiceMuteRecordingAction = {
|
|
56
|
+
type: typeof VOICE_MUTE_RECORDING;
|
|
247
57
|
};
|
|
248
|
-
|
|
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
|
+
declare function muteVoiceRecording(): VoiceMuteRecordingAction;
|
|
309
59
|
|
|
310
60
|
type PostActivityActionType = 'DIRECT_LINE/POST_ACTIVITY';
|
|
311
61
|
type PostActivityAction = {
|
|
@@ -319,14 +69,36 @@ type PostActivityAction = {
|
|
|
319
69
|
};
|
|
320
70
|
declare function postActivity(activity: WebChatActivity, method?: string): PostActivityAction;
|
|
321
71
|
|
|
322
|
-
const
|
|
72
|
+
declare const VOICE_POST_ACTIVITY: "WEB_CHAT/VOICE_POST_ACTIVITY";
|
|
73
|
+
type VoicePostActivityAction = {
|
|
74
|
+
type: typeof VOICE_POST_ACTIVITY;
|
|
75
|
+
payload: {
|
|
76
|
+
activity: WebChatActivity;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
declare function postVoiceActivity(activity: WebChatActivity): VoicePostActivityAction;
|
|
80
|
+
|
|
81
|
+
declare const VOICE_REGISTER_HANDLER: "WEB_CHAT/VOICE_REGISTER_HANDLER";
|
|
82
|
+
type VoiceHandler = {
|
|
83
|
+
queueAudio: (base64: string) => void;
|
|
84
|
+
stopAllAudio: () => void;
|
|
85
|
+
};
|
|
86
|
+
type VoiceRegisterHandlerAction = {
|
|
87
|
+
type: typeof VOICE_REGISTER_HANDLER;
|
|
88
|
+
payload: {
|
|
89
|
+
id: string;
|
|
90
|
+
voiceHandler: VoiceHandler;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
declare function registerVoiceHandler(id: string, voiceHandler: VoiceHandler): VoiceRegisterHandlerAction;
|
|
323
94
|
|
|
324
|
-
function sendEvent(name, value) {
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
}
|
|
95
|
+
declare function sendEvent(name: string, value: any): {
|
|
96
|
+
type: string;
|
|
97
|
+
payload: {
|
|
98
|
+
name: string;
|
|
99
|
+
value: any;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
330
102
|
|
|
331
103
|
declare function sendFiles(files: readonly Readonly<{
|
|
332
104
|
name: string;
|
|
@@ -366,50 +138,42 @@ declare function sendMessage(text: string | undefined, method: string | undefine
|
|
|
366
138
|
};
|
|
367
139
|
};
|
|
368
140
|
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
const SEND_POST_BACK = 'WEB_CHAT/SEND_POST_BACK';
|
|
379
|
-
|
|
380
|
-
function sendPostback(value) {
|
|
381
|
-
return {
|
|
382
|
-
type: SEND_POST_BACK,
|
|
383
|
-
payload: { value }
|
|
384
|
-
};
|
|
385
|
-
}
|
|
386
|
-
|
|
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
|
-
}
|
|
141
|
+
declare function sendMessageback(value: any, text: string | undefined, displayText: string | undefined): {
|
|
142
|
+
type: string;
|
|
143
|
+
payload: {
|
|
144
|
+
displayText: string;
|
|
145
|
+
text: string;
|
|
146
|
+
value: any;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
395
149
|
|
|
396
|
-
|
|
150
|
+
declare function sendPostback(value: any): {
|
|
151
|
+
type: string;
|
|
152
|
+
payload: {
|
|
153
|
+
value: any;
|
|
154
|
+
};
|
|
155
|
+
};
|
|
397
156
|
|
|
398
|
-
function
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
}
|
|
157
|
+
declare function setDictateInterims(dictateInterims: readonly string[]): {
|
|
158
|
+
type: string;
|
|
159
|
+
payload: {
|
|
160
|
+
dictateInterims: readonly string[];
|
|
161
|
+
};
|
|
162
|
+
};
|
|
404
163
|
|
|
405
|
-
|
|
164
|
+
declare function setDictateState(dictateState: number): {
|
|
165
|
+
type: string;
|
|
166
|
+
payload: {
|
|
167
|
+
dictateState: number;
|
|
168
|
+
};
|
|
169
|
+
};
|
|
406
170
|
|
|
407
|
-
function setLanguage(language) {
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
}
|
|
171
|
+
declare function setLanguage(language: string): {
|
|
172
|
+
type: string;
|
|
173
|
+
payload: {
|
|
174
|
+
language: string;
|
|
175
|
+
};
|
|
176
|
+
};
|
|
413
177
|
|
|
414
178
|
type Notification = {
|
|
415
179
|
alt: string;
|
|
@@ -427,14 +191,12 @@ type SetNotificationAction = {
|
|
|
427
191
|
};
|
|
428
192
|
declare function setNotification({ alt, data, id, level, message }: Omit<Notification, 'timestamp'>): SetNotificationAction;
|
|
429
193
|
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
};
|
|
437
|
-
}
|
|
194
|
+
declare function setSendBox(text: string): {
|
|
195
|
+
type: string;
|
|
196
|
+
payload: {
|
|
197
|
+
text: string;
|
|
198
|
+
};
|
|
199
|
+
};
|
|
438
200
|
|
|
439
201
|
declare function setSendBoxAttachments(attachments: readonly SendBoxAttachment[]): {
|
|
440
202
|
type: string;
|
|
@@ -446,14 +208,12 @@ declare function setSendBoxAttachments(attachments: readonly SendBoxAttachment[]
|
|
|
446
208
|
};
|
|
447
209
|
};
|
|
448
210
|
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
};
|
|
456
|
-
}
|
|
211
|
+
declare function setSendTimeout(sendTimeout: number): {
|
|
212
|
+
type: string;
|
|
213
|
+
payload: {
|
|
214
|
+
sendTimeout: number;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
457
217
|
|
|
458
218
|
declare const SET_SEND_TYPING_INDICATOR = "WEB_CHAT/SET_SEND_TYPING_INDICATOR";
|
|
459
219
|
type SetSendTypingIndicatorAction = {
|
|
@@ -462,338 +222,182 @@ type SetSendTypingIndicatorAction = {
|
|
|
462
222
|
};
|
|
463
223
|
type: typeof SET_SEND_TYPING_INDICATOR;
|
|
464
224
|
};
|
|
465
|
-
declare function setSendTypingIndicator(value:
|
|
466
|
-
|
|
467
|
-
const START_DICTATE = 'WEB_CHAT/START_DICTATE';
|
|
468
|
-
|
|
469
|
-
function startDictate() {
|
|
470
|
-
return { type: START_DICTATE };
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
const START_SPEAKING_ACTIVITY = 'WEB_CHAT/START_SPEAKING';
|
|
474
|
-
|
|
475
|
-
function startSpeakingActivity() {
|
|
476
|
-
return {
|
|
477
|
-
type: START_SPEAKING_ACTIVITY
|
|
478
|
-
};
|
|
479
|
-
}
|
|
225
|
+
declare function setSendTypingIndicator(value: boolean): SetSendTypingIndicatorAction;
|
|
480
226
|
|
|
481
|
-
const
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
227
|
+
declare const VOICE_SET_STATE: "WEB_CHAT/VOICE_SET_STATE";
|
|
228
|
+
type VoiceState = 'idle' | 'listening' | 'user_speaking' | 'processing' | 'bot_speaking';
|
|
229
|
+
type VoiceSetStateAction = {
|
|
230
|
+
type: typeof VOICE_SET_STATE;
|
|
231
|
+
payload: {
|
|
232
|
+
voiceState: VoiceState;
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
declare function setVoiceState(voiceState: VoiceState): VoiceSetStateAction;
|
|
488
236
|
|
|
489
|
-
function
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
};
|
|
493
|
-
}
|
|
237
|
+
declare function startDictate(): {
|
|
238
|
+
type: string;
|
|
239
|
+
};
|
|
494
240
|
|
|
495
|
-
|
|
241
|
+
declare function startSpeakingActivity(): {
|
|
242
|
+
type: string;
|
|
243
|
+
};
|
|
496
244
|
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
type:
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
}
|
|
245
|
+
declare const VOICE_START_RECORDING: "WEB_CHAT/VOICE_START_RECORDING";
|
|
246
|
+
type VoiceStartRecordingAction = {
|
|
247
|
+
type: typeof VOICE_START_RECORDING;
|
|
248
|
+
};
|
|
249
|
+
declare function startVoiceRecording(): VoiceStartRecordingAction;
|
|
503
250
|
|
|
504
|
-
|
|
505
|
-
|
|
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;
|
|
251
|
+
declare function stopDictate(): {
|
|
252
|
+
type: string;
|
|
516
253
|
};
|
|
517
254
|
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
*
|
|
521
|
-
* If ponyfill is passed, Web Chat will use this ponyfill rather than the one from `globalThis` or `window` object.
|
|
522
|
-
*/
|
|
523
|
-
type GlobalScopePonyfill = GlobalScopeClock;
|
|
524
|
-
|
|
525
|
-
type CreateStoreOptions = {
|
|
526
|
-
/**
|
|
527
|
-
* True, to enable Redux development tools, otherwise, false.
|
|
528
|
-
*
|
|
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.
|
|
531
|
-
*/
|
|
532
|
-
devTools?: boolean;
|
|
533
|
-
/**
|
|
534
|
-
* Ponyfill to overrides specific global scope members.
|
|
535
|
-
*
|
|
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.
|
|
541
|
-
*/
|
|
542
|
-
ponyfill?: Partial<GlobalScopePonyfill>;
|
|
255
|
+
declare function stopSpeakingActivity(): {
|
|
256
|
+
type: string;
|
|
543
257
|
};
|
|
544
|
-
/**
|
|
545
|
-
* Creates a Redux store internally used by Web Chat.
|
|
546
|
-
*
|
|
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.
|
|
552
|
-
*
|
|
553
|
-
* This store is critical for Web Chat business logics to operate, please use with cautions.
|
|
554
|
-
*/
|
|
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
258
|
|
|
565
|
-
|
|
259
|
+
declare const VOICE_STOP_RECORDING: "WEB_CHAT/VOICE_STOP_RECORDING";
|
|
260
|
+
type VoiceStopRecordingAction = {
|
|
261
|
+
type: typeof VOICE_STOP_RECORDING;
|
|
262
|
+
};
|
|
263
|
+
declare function stopVoiceRecording(): VoiceStopRecordingAction;
|
|
566
264
|
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
'@id'?: string | undefined;
|
|
577
|
-
'@type': string;
|
|
578
|
-
/**
|
|
579
|
-
* An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. Typically the value is a URI-identified RDF class, and in this case corresponds to the use of rdf:type in RDF. Text values can be used sparingly, for cases where useful information can be added without their being an appropriate schema to reference. In the case of text values, the class label should follow the schema.org [style guide](https://schema.org/docs/styleguide.html).
|
|
580
|
-
*
|
|
581
|
-
* @see https://schema.org/additionalType
|
|
582
|
-
*/
|
|
583
|
-
additionalType?: string | undefined;
|
|
584
|
-
/**
|
|
585
|
-
* An alias for the item.
|
|
586
|
-
*
|
|
587
|
-
* @see https://schema.org/alternateName
|
|
588
|
-
*/
|
|
589
|
-
alternateName?: string | undefined;
|
|
590
|
-
/**
|
|
591
|
-
* A description of the item.
|
|
592
|
-
*
|
|
593
|
-
* @see https://schema.org/description
|
|
594
|
-
*/
|
|
595
|
-
description?: string | undefined;
|
|
596
|
-
/**
|
|
597
|
-
* The name of the item.
|
|
598
|
-
*
|
|
599
|
-
* @see https://schema.org/name
|
|
600
|
-
*/
|
|
601
|
-
name?: string | undefined;
|
|
602
|
-
/**
|
|
603
|
-
* Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role.
|
|
604
|
-
*
|
|
605
|
-
* @see https://schema.org/potentialAction
|
|
606
|
-
*/
|
|
607
|
-
potentialAction?: readonly Action[] | undefined;
|
|
608
|
-
/**
|
|
609
|
-
* URL of the item.
|
|
610
|
-
*
|
|
611
|
-
* @see https://schema.org/url
|
|
612
|
-
*/
|
|
613
|
-
url?: string | undefined;
|
|
614
|
-
};
|
|
615
|
-
declare const parseThing: (data: unknown) => Thing;
|
|
265
|
+
declare function submitSendBox(method?: string, { channelData }?: {
|
|
266
|
+
channelData: any;
|
|
267
|
+
}): {
|
|
268
|
+
type: string;
|
|
269
|
+
payload: {
|
|
270
|
+
channelData: any;
|
|
271
|
+
method: string;
|
|
272
|
+
};
|
|
273
|
+
};
|
|
616
274
|
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
* This is partial implementation of https://schema.org/Project.
|
|
621
|
-
*
|
|
622
|
-
* @see https://schema.org/Project
|
|
623
|
-
*/
|
|
624
|
-
type Project = Thing & {
|
|
625
|
-
/**
|
|
626
|
-
* A slogan or motto associated with the item.
|
|
627
|
-
*
|
|
628
|
-
* @see https://schema.org/slogan
|
|
629
|
-
*/
|
|
630
|
-
slogan?: string | undefined;
|
|
275
|
+
declare const VOICE_UNMUTE_RECORDING: "WEB_CHAT/VOICE_UNMUTE_RECORDING";
|
|
276
|
+
type VoiceUnmuteRecordingAction = {
|
|
277
|
+
type: typeof VOICE_UNMUTE_RECORDING;
|
|
631
278
|
};
|
|
632
|
-
declare
|
|
279
|
+
declare function unmuteVoiceRecording(): VoiceUnmuteRecordingAction;
|
|
633
280
|
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
*/
|
|
643
|
-
type Action = Thing & {
|
|
644
|
-
/**
|
|
645
|
-
* Indicates the current disposition of the Action.
|
|
646
|
-
*
|
|
647
|
-
* @see https://schema.org/actionStatus
|
|
648
|
-
*/
|
|
649
|
-
actionStatus?: 'ActiveActionStatus' | 'CompletedActionStatu' | 'FailedActionStatus' | 'PotentialActionStatus' | undefined;
|
|
650
|
-
/**
|
|
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).
|
|
652
|
-
*
|
|
653
|
-
* @see https://schema.org/provider
|
|
654
|
-
*/
|
|
655
|
-
provider?: Project | undefined;
|
|
656
|
-
};
|
|
657
|
-
declare const parseAction: (data: unknown) => Action;
|
|
281
|
+
declare const VOICE_UNREGISTER_HANDLER: "WEB_CHAT/VOICE_UNREGISTER_HANDLER";
|
|
282
|
+
type VoiceUnregisterHandlerAction = {
|
|
283
|
+
type: typeof VOICE_UNREGISTER_HANDLER;
|
|
284
|
+
payload: {
|
|
285
|
+
id: string;
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
declare function unregisterVoiceHandler(id: string): VoiceUnregisterHandlerAction;
|
|
658
289
|
|
|
659
|
-
/**
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
*/
|
|
666
|
-
type DefinedTerm = Thing & {
|
|
667
|
-
/**
|
|
668
|
-
* A [DefinedTermSet](https://schema.org/DefinedTermSet) that contains this term.
|
|
669
|
-
*
|
|
670
|
-
* @see https://schema.org/inDefinedTermSet
|
|
671
|
-
*/
|
|
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;
|
|
679
|
-
};
|
|
680
|
-
declare const parseDefinedTerm: (data: unknown) => DefinedTerm;
|
|
290
|
+
/** @deprecated This constant is being deprecated, please use string literal instead. Will be remove on or after 2024-07-31. */
|
|
291
|
+
declare const SEND_FAILED: "send failed";
|
|
292
|
+
/** @deprecated This constant is being deprecated, please use string literal instead. Will be remove on or after 2024-07-31. */
|
|
293
|
+
declare const SENDING: "sending";
|
|
294
|
+
/** @deprecated This constant is being deprecated, please use string literal instead. Will be remove on or after 2024-07-31. */
|
|
295
|
+
declare const SENT: "sent";
|
|
681
296
|
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
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;
|
|
297
|
+
declare const ActivityClientState_SENDING: typeof SENDING;
|
|
298
|
+
declare const ActivityClientState_SEND_FAILED: typeof SEND_FAILED;
|
|
299
|
+
declare const ActivityClientState_SENT: typeof SENT;
|
|
300
|
+
declare namespace ActivityClientState {
|
|
301
|
+
export { ActivityClientState_SENDING as SENDING, ActivityClientState_SEND_FAILED as SEND_FAILED, ActivityClientState_SENT as SENT };
|
|
302
|
+
}
|
|
734
303
|
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
*/
|
|
750
|
-
appearance?: CreativeWork | undefined;
|
|
751
|
-
/**
|
|
752
|
-
* For a [Claim](https://schema.org/Claim) interpreted from [MediaObject](https://schema.org/MediaObject) content sed to indicate a claim contained, implied or refined from the content of a [MediaObject](https://schema.org/MediaObject).
|
|
753
|
-
*
|
|
754
|
-
* @see https://schema.org/claimInterpreter.
|
|
755
|
-
*/
|
|
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;
|
|
763
|
-
};
|
|
764
|
-
declare const parseClaim: (data: unknown) => Claim;
|
|
304
|
+
declare const IDLE: 0;
|
|
305
|
+
declare const WILL_START: 1;
|
|
306
|
+
declare const STARTING: 2;
|
|
307
|
+
declare const DICTATING: 3;
|
|
308
|
+
declare const STOPPING: 4;
|
|
309
|
+
|
|
310
|
+
declare const DictateState_DICTATING: typeof DICTATING;
|
|
311
|
+
declare const DictateState_IDLE: typeof IDLE;
|
|
312
|
+
declare const DictateState_STARTING: typeof STARTING;
|
|
313
|
+
declare const DictateState_STOPPING: typeof STOPPING;
|
|
314
|
+
declare const DictateState_WILL_START: typeof WILL_START;
|
|
315
|
+
declare namespace DictateState {
|
|
316
|
+
export { DictateState_DICTATING as DICTATING, DictateState_IDLE as IDLE, DictateState_STARTING as STARTING, DictateState_STOPPING as STOPPING, DictateState_WILL_START as WILL_START };
|
|
317
|
+
}
|
|
765
318
|
|
|
766
319
|
/**
|
|
767
|
-
*
|
|
768
|
-
*
|
|
769
|
-
*
|
|
770
|
-
*
|
|
771
|
-
*
|
|
772
|
-
*
|
|
773
|
-
*
|
|
320
|
+
* Gets the livestreaming metadata of the activity, or `undefined` if the activity is not participating in a livestreaming session.
|
|
321
|
+
*
|
|
322
|
+
* - `sessionId` - ID of the livestreaming session
|
|
323
|
+
* - `sequenceNumber` - sequence number of the activity
|
|
324
|
+
* - `type`
|
|
325
|
+
* - `"contentless"` - ongoing but no content, should show indicator
|
|
326
|
+
* - `"interim activity"` - current response, could be partial-from-start, or complete response.
|
|
327
|
+
* More activities are expected. Future interim activities always replace past interim activities, enable erasing or backtracking response.
|
|
328
|
+
* - `"informative message"` - optional side-channel informative message describing the current response, e.g. "Searching your document library".
|
|
329
|
+
* Always replace past informative messages. May interleave with interim activities.
|
|
330
|
+
* - `"final activity"` - complete-and-final response, always replace past interim activities and remove all informative messages.
|
|
331
|
+
* This activity indicates end of the session, all future activities must be ignored.
|
|
332
|
+
* - `undefined` - not part of a livestream session or the activity is not valid
|
|
333
|
+
*
|
|
334
|
+
* @returns {object} Livestreaming metadata of the activity, or `undefined` if the activity is not participating in a livestreaming session.
|
|
774
335
|
*/
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
*/
|
|
781
|
-
actionOption?: string | undefined;
|
|
782
|
-
};
|
|
783
|
-
declare const parseVoteAction: (data: unknown) => VoteAction;
|
|
784
|
-
|
|
785
|
-
declare function getOrgSchemaMessage(graph: readonly WebChatActivity['entities'][0][]): CreativeWork | undefined;
|
|
336
|
+
declare function getActivityLivestreamingMetadata(activity: WebChatActivity): Readonly<{
|
|
337
|
+
sessionId: string;
|
|
338
|
+
sequenceNumber: number;
|
|
339
|
+
type: 'contentless' | 'final activity' | 'informative message' | 'interim activity';
|
|
340
|
+
}> | undefined;
|
|
786
341
|
|
|
787
|
-
|
|
342
|
+
type EntityType = NonNullable<WebChatActivity['entities']>[number];
|
|
343
|
+
declare function getOrgSchemaMessage(graph: readonly EntityType[]): CreativeWorkOutput | undefined;
|
|
788
344
|
|
|
789
345
|
declare function onErrorResumeNext<T>(fn: () => T): T | undefined;
|
|
790
346
|
declare function onErrorResumeNext<T, U = T>(fn: () => T, defaultValue: U): T | U;
|
|
791
347
|
|
|
792
|
-
declare
|
|
793
|
-
|
|
794
|
-
declare
|
|
795
|
-
|
|
796
|
-
|
|
348
|
+
declare const getVoiceActivityRole: (activity: WebChatActivity) => "bot" | "user" | undefined;
|
|
349
|
+
|
|
350
|
+
declare const getVoiceActivityText: (activity: WebChatActivity) => string | undefined;
|
|
351
|
+
|
|
352
|
+
declare const VoiceActivitySchema: valibot.ObjectSchema<{
|
|
353
|
+
readonly name: valibot.StringSchema<undefined>;
|
|
354
|
+
readonly type: valibot.LiteralSchema<"event", undefined>;
|
|
355
|
+
readonly value: valibot.LooseObjectSchema<{}, undefined>;
|
|
356
|
+
readonly valueType: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.CheckAction<string, undefined>]>;
|
|
357
|
+
}, undefined>;
|
|
358
|
+
declare const isVoiceActivity: (activity: WebChatActivity) => activity is WebChatActivity & InferOutput<typeof VoiceActivitySchema>;
|
|
359
|
+
|
|
360
|
+
declare const VoiceTranscriptActivitySchema: valibot.ObjectSchema<{
|
|
361
|
+
readonly name: valibot.LiteralSchema<"media.end", undefined>;
|
|
362
|
+
readonly type: valibot.LiteralSchema<"event", undefined>;
|
|
363
|
+
readonly value: valibot.ObjectSchema<{
|
|
364
|
+
readonly origin: valibot.PicklistSchema<["agent", "user"], undefined>;
|
|
365
|
+
readonly transcription: valibot.StringSchema<undefined>;
|
|
366
|
+
}, undefined>;
|
|
367
|
+
readonly valueType: valibot.SchemaWithPipe<readonly [valibot.StringSchema<undefined>, valibot.CheckAction<string, undefined>]>;
|
|
368
|
+
}, undefined>;
|
|
369
|
+
declare const isVoiceTranscriptActivity: (activity: WebChatActivity) => activity is WebChatActivity & InferOutput<typeof VoiceTranscriptActivitySchema>;
|
|
370
|
+
|
|
371
|
+
declare const CLEAR_SUGGESTED_ACTIONS: "WEB_CHAT/CLEAR_SUGGESTED_ACTIONS";
|
|
372
|
+
declare const clearSuggestedActionsActionSchema: valibot.SchemaWithPipe<readonly [valibot.ObjectSchema<{
|
|
373
|
+
readonly type: valibot.LiteralSchema<"WEB_CHAT/CLEAR_SUGGESTED_ACTIONS", undefined>;
|
|
374
|
+
}, undefined>, valibot.ReadonlyAction<{
|
|
375
|
+
type: "WEB_CHAT/CLEAR_SUGGESTED_ACTIONS";
|
|
376
|
+
}>]>;
|
|
377
|
+
type ClearSuggestedActionsAction = InferOutput<typeof clearSuggestedActionsActionSchema>;
|
|
378
|
+
declare function clearSuggestedActions(): ClearSuggestedActionsAction;
|
|
379
|
+
|
|
380
|
+
declare const SET_SUGGESTED_ACTIONS: "WEB_CHAT/SET_SUGGESTED_ACTIONS";
|
|
381
|
+
declare const setSuggestedActionsActionSchema: valibot.SchemaWithPipe<readonly [valibot.ObjectSchema<{
|
|
382
|
+
readonly payload: valibot.SchemaWithPipe<readonly [valibot.ObjectSchema<{
|
|
383
|
+
readonly originActivity: valibot.OptionalSchema<valibot.CustomSchema<WebChatActivity, undefined>, undefined>;
|
|
384
|
+
readonly suggestedActions: valibot.SchemaWithPipe<readonly [valibot.ArraySchema<valibot.CustomSchema<DirectLineCardAction, undefined>, undefined>, valibot.ReadonlyAction<DirectLineCardAction[]>]>;
|
|
385
|
+
}, undefined>, valibot.ReadonlyAction<{
|
|
386
|
+
originActivity?: WebChatActivity;
|
|
387
|
+
readonly suggestedActions: readonly DirectLineCardAction[];
|
|
388
|
+
}>]>;
|
|
389
|
+
readonly type: valibot.LiteralSchema<"WEB_CHAT/SET_SUGGESTED_ACTIONS", undefined>;
|
|
390
|
+
}, undefined>, valibot.ReadonlyAction<{
|
|
391
|
+
readonly payload: Readonly<{
|
|
392
|
+
originActivity?: WebChatActivity;
|
|
393
|
+
readonly suggestedActions: readonly DirectLineCardAction[];
|
|
394
|
+
}>;
|
|
395
|
+
type: "WEB_CHAT/SET_SUGGESTED_ACTIONS";
|
|
396
|
+
}>]>;
|
|
397
|
+
type SetSuggestedActionsAction = InferOutput<typeof setSuggestedActionsActionSchema>;
|
|
398
|
+
declare function setSuggestedActions(suggestedActions?: readonly DirectLineCardAction[], originActivity?: undefined | WebChatActivity): SetSuggestedActionsAction;
|
|
399
|
+
|
|
400
|
+
type DirectLineActivity = Exclude<any, [] | boolean | ((...args: unknown[]) => unknown) | number | string>;
|
|
797
401
|
|
|
798
402
|
type DirectLineMediaCardEssence = {
|
|
799
403
|
aspect?: '4:3' | '16:9';
|
|
@@ -916,7 +520,7 @@ declare class Subscription {
|
|
|
916
520
|
*/
|
|
917
521
|
declare class Observer<T> {
|
|
918
522
|
/** Receives the subscription object when `subscribe` is called */
|
|
919
|
-
start(subscription: Subscription):
|
|
523
|
+
start(subscription: Subscription): void;
|
|
920
524
|
/** Receives the next value in the sequence */
|
|
921
525
|
next: NextFunction<T>;
|
|
922
526
|
/** Receives the sequence error */
|
|
@@ -937,15 +541,16 @@ declare class SubscriptionObserver<T> {
|
|
|
937
541
|
}
|
|
938
542
|
|
|
939
543
|
declare const Constants: {
|
|
940
|
-
ActivityClientState:
|
|
941
|
-
DictateState:
|
|
544
|
+
ActivityClientState: typeof ActivityClientState;
|
|
545
|
+
DictateState: typeof DictateState;
|
|
942
546
|
};
|
|
943
|
-
|
|
944
|
-
declare const
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
version: string;
|
|
547
|
+
|
|
548
|
+
declare const buildInfoObject: {
|
|
549
|
+
readonly buildTool?: string | undefined;
|
|
550
|
+
readonly moduleFormat?: string | undefined;
|
|
551
|
+
readonly version?: string | undefined;
|
|
949
552
|
};
|
|
553
|
+
declare const version: string;
|
|
950
554
|
|
|
951
|
-
export {
|
|
555
|
+
export { CLEAR_SUGGESTED_ACTIONS, Constants, DirectLineCardAction, Observable, SET_SUGGESTED_ACTIONS, WebChatActivity, buildInfoObject as buildInfo, clearSuggestedActions, clearSuggestedActionsActionSchema, connect, disconnect, dismissNotification, emitTypingIndicator, getActivityLivestreamingMetadata, getOrgSchemaMessage, getVoiceActivityRole, getVoiceActivityText, isVoiceActivity, isVoiceTranscriptActivity, markActivity, muteVoiceRecording, onErrorResumeNext, postActivity, postVoiceActivity, registerVoiceHandler, sendEvent, sendFiles, sendMessage, sendMessageback as sendMessageBack, sendPostback as sendPostBack, setDictateInterims, setDictateState, setLanguage, setNotification, setSendBox, setSendBoxAttachments, setSendTimeout, setSendTypingIndicator, setSuggestedActions, setSuggestedActionsActionSchema, setVoiceState, startDictate, startSpeakingActivity, startVoiceRecording, stopDictate, stopSpeakingActivity, stopVoiceRecording, submitSendBox, unmuteVoiceRecording, unregisterVoiceHandler, version };
|
|
556
|
+
export type { ClearSuggestedActionsAction, DirectLineActivity, DirectLineAnimationCard, DirectLineAudioCard, DirectLineHeroCard, DirectLineJSBotConnection, DirectLineOAuthCard, DirectLineReceiptCard, DirectLineSignInCard, DirectLineThumbnailCard, DirectLineVideoCard, SendBoxAttachment, SetSuggestedActionsAction, VoiceHandler, VoiceState };
|