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
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type Action } from 'redux';
|
|
2
|
+
import { take, takeEvery } from 'redux-saga/effects';
|
|
3
|
+
import { safeParse } from 'valibot';
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
REGISTER_ACTION_SINK,
|
|
7
|
+
registerActionSinkActionSchema,
|
|
8
|
+
type RegisterActionSinkAction
|
|
9
|
+
} from '../actions/registerActionSink';
|
|
10
|
+
import { UNREGISTER_ACTION_SINK, unregisterActionSinkActionSchema } from '../actions/unregisterActionSink';
|
|
11
|
+
|
|
12
|
+
export default function* actionSinkSaga() {
|
|
13
|
+
yield takeEvery(
|
|
14
|
+
({ type }) => type === REGISTER_ACTION_SINK,
|
|
15
|
+
function* (action: RegisterActionSinkAction) {
|
|
16
|
+
const result = safeParse(registerActionSinkActionSchema, action);
|
|
17
|
+
|
|
18
|
+
if (result.success) {
|
|
19
|
+
const {
|
|
20
|
+
payload: { sink }
|
|
21
|
+
} = result.output;
|
|
22
|
+
|
|
23
|
+
for (;;) {
|
|
24
|
+
const action: Action = yield take();
|
|
25
|
+
|
|
26
|
+
if (action.type === UNREGISTER_ACTION_SINK) {
|
|
27
|
+
const result = safeParse(unregisterActionSinkActionSchema, action);
|
|
28
|
+
|
|
29
|
+
if (result.success && result.output.payload.sink === sink) {
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
sink(action);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { put } from 'redux-saga/effects';
|
|
1
|
+
import { put, select } from 'redux-saga/effects';
|
|
2
2
|
import updateIn from 'simple-update-in';
|
|
3
3
|
|
|
4
4
|
import observeEach from './effects/observeEach';
|
|
5
5
|
import queueIncomingActivity from '../actions/queueIncomingActivity';
|
|
6
|
+
import setVoiceState from '../actions/setVoiceState';
|
|
6
7
|
import whileConnected from './effects/whileConnected';
|
|
8
|
+
import isVoiceActivity from '../utils/voiceActivity/isVoiceActivity';
|
|
9
|
+
import isVoiceTranscriptActivity from '../utils/voiceActivity/isVoiceTranscriptActivity';
|
|
7
10
|
import type { DirectLineActivity } from '../types/external/DirectLineActivity';
|
|
8
11
|
import type { DirectLineJSBotConnection } from '../types/external/DirectLineJSBotConnection';
|
|
9
12
|
import type { WebChatActivity } from '../types/WebChatActivity';
|
|
@@ -75,6 +78,53 @@ function patchFromName(activity: DirectLineActivity) {
|
|
|
75
78
|
|
|
76
79
|
function* observeActivity({ directLine, userID }: { directLine: DirectLineJSBotConnection; userID?: string }) {
|
|
77
80
|
yield observeEach(directLine.activity$, function* observeActivity(activity: DirectLineActivity) {
|
|
81
|
+
// Handle voice activities separately - don't store them in Redux (except transcripts)
|
|
82
|
+
if (isVoiceActivity(activity) && !isVoiceTranscriptActivity(activity)) {
|
|
83
|
+
const { recording, voiceHandlers } = yield select(state => ({
|
|
84
|
+
recording: state.voice.voiceState !== 'idle',
|
|
85
|
+
voiceHandlers: state.voice.voiceHandlers
|
|
86
|
+
}));
|
|
87
|
+
|
|
88
|
+
// Only process voice chunks if speech-to-speech is enabled.
|
|
89
|
+
if (!recording) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
switch (activity.name) {
|
|
94
|
+
case 'media.chunk': {
|
|
95
|
+
const audioContent = activity?.value?.content;
|
|
96
|
+
if (audioContent) {
|
|
97
|
+
voiceHandlers.forEach(handler => handler.queueAudio(audioContent));
|
|
98
|
+
}
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
case 'request.update': {
|
|
103
|
+
const state = activity?.value?.state;
|
|
104
|
+
|
|
105
|
+
switch (state) {
|
|
106
|
+
case 'detected':
|
|
107
|
+
voiceHandlers.forEach(handler => handler.stopAllAudio());
|
|
108
|
+
yield put(setVoiceState('user_speaking'));
|
|
109
|
+
break;
|
|
110
|
+
|
|
111
|
+
case 'processing':
|
|
112
|
+
yield put(setVoiceState('processing'));
|
|
113
|
+
break;
|
|
114
|
+
|
|
115
|
+
default:
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
default:
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
|
|
78
128
|
// TODO: [P2] #3953 Move the patching logic to a DirectLineJS wrapper, instead of too close to inners of Web Chat.
|
|
79
129
|
activity = patchNullAsUndefined(activity);
|
|
80
130
|
activity = patchActivityWithFromRole(activity, userID);
|
|
@@ -8,18 +8,15 @@ import {
|
|
|
8
8
|
POST_ACTIVITY_PENDING,
|
|
9
9
|
POST_ACTIVITY_REJECTED
|
|
10
10
|
} from '../actions/postActivity';
|
|
11
|
-
import dateToLocaleISOString from '../utils/dateToLocaleISOString';
|
|
12
|
-
import deleteKey from '../utils/deleteKey';
|
|
13
11
|
import languageSelector from '../selectors/language';
|
|
14
|
-
import observeOnce from './effects/observeOnce';
|
|
15
12
|
import sendTimeoutSelector from '../selectors/sendTimeout';
|
|
13
|
+
import dateToLocaleISOString from '../utils/dateToLocaleISOString';
|
|
14
|
+
import deleteKey from '../utils/deleteKey';
|
|
16
15
|
import sleep from '../utils/sleep';
|
|
17
16
|
import uniqueID from '../utils/uniqueID';
|
|
17
|
+
import observeOnce from './effects/observeOnce';
|
|
18
18
|
import whileConnected from './effects/whileConnected';
|
|
19
19
|
|
|
20
|
-
import type { DirectLineActivity } from '../types/external/DirectLineActivity';
|
|
21
|
-
import type { DirectLineJSBotConnection } from '../types/external/DirectLineJSBotConnection';
|
|
22
|
-
import type { GlobalScopePonyfill } from '../types/GlobalScopePonyfill';
|
|
23
20
|
import type { IncomingActivityAction } from '../actions/incomingActivity';
|
|
24
21
|
import type {
|
|
25
22
|
PostActivityAction,
|
|
@@ -28,8 +25,12 @@ import type {
|
|
|
28
25
|
PostActivityPendingAction,
|
|
29
26
|
PostActivityRejectedAction
|
|
30
27
|
} from '../actions/postActivity';
|
|
31
|
-
import
|
|
28
|
+
import { setSendStatusInOutgoingActivity } from '../reducers/activities/sort/property/SendStatus';
|
|
29
|
+
import type { DirectLineActivity } from '../types/external/DirectLineActivity';
|
|
30
|
+
import type { DirectLineJSBotConnection } from '../types/external/DirectLineJSBotConnection';
|
|
31
|
+
import type { GlobalScopePonyfill } from '../types/GlobalScopePonyfill';
|
|
32
32
|
import type { WebChatOutgoingActivity } from '../types/internal/WebChatOutgoingActivity';
|
|
33
|
+
import type { WebChatActivity } from '../types/WebChatActivity';
|
|
33
34
|
|
|
34
35
|
// After 5 minutes, the saga will stop from listening for echo backs and consider the outgoing message as permanently undeliverable.
|
|
35
36
|
// This value must be equals to or larger than the user-defined `styleOptions.sendTimeout`.
|
|
@@ -52,13 +53,12 @@ function* postActivity(
|
|
|
52
53
|
|
|
53
54
|
// Currently, we allow untyped outgoing activity as long as the chat adapter can deliver.
|
|
54
55
|
// In the future, we should warn if the outgoing activity is not matching the type.
|
|
55
|
-
|
|
56
|
+
let outgoingActivity: WebChatOutgoingActivity = {
|
|
56
57
|
...deleteKey(activity, 'id'),
|
|
57
58
|
channelData: {
|
|
58
|
-
// Remove local fields that should not be send to the service.
|
|
59
59
|
// `channelData.state` is being deprecated in favor of `channelData['webchat:send-status']`.
|
|
60
60
|
// Please refer to #4362 for details. Remove on or after 2024-07-31.
|
|
61
|
-
...deleteKey(activity.channelData, 'state'
|
|
61
|
+
...deleteKey(activity.channelData, 'state'),
|
|
62
62
|
clientActivityID
|
|
63
63
|
},
|
|
64
64
|
channelId: 'webchat',
|
|
@@ -90,6 +90,13 @@ function* postActivity(
|
|
|
90
90
|
: {})
|
|
91
91
|
};
|
|
92
92
|
|
|
93
|
+
// Remove local fields that should not be send to the service.
|
|
94
|
+
outgoingActivity = setSendStatusInOutgoingActivity(
|
|
95
|
+
// TODO: [P1] Need to rework WebChatActivity typing.
|
|
96
|
+
outgoingActivity as WebChatActivity,
|
|
97
|
+
undefined
|
|
98
|
+
) as WebChatOutgoingActivity;
|
|
99
|
+
|
|
93
100
|
if (!numActivitiesPosted) {
|
|
94
101
|
outgoingActivity.entities = [
|
|
95
102
|
...(outgoingActivity.entities || []),
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { select, takeEvery } from 'redux-saga/effects';
|
|
2
|
+
import { VOICE_POST_ACTIVITY } from '../actions/postVoiceActivity';
|
|
3
|
+
import languageSelector from '../selectors/language';
|
|
4
|
+
import dateToLocaleISOString from '../utils/dateToLocaleISOString';
|
|
5
|
+
import whileConnected from './effects/whileConnected';
|
|
6
|
+
import observeOnce from './effects/observeOnce';
|
|
7
|
+
|
|
8
|
+
import type { DirectLineJSBotConnection } from '../types/external/DirectLineJSBotConnection';
|
|
9
|
+
import type { DirectLineActivity } from '../types/external/DirectLineActivity';
|
|
10
|
+
import type { GlobalScopePonyfill } from '../types/GlobalScopePonyfill';
|
|
11
|
+
import type { VoicePostActivityAction } from '../actions/postVoiceActivity';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Saga for handling outgoing voice activities.
|
|
15
|
+
*
|
|
16
|
+
* Unlike regular postActivitySaga, this saga:
|
|
17
|
+
* - Does NOT wait for echo back
|
|
18
|
+
* - Does NOT store activity in Redux
|
|
19
|
+
* - Does NOT dispatch PENDING/FULFILLED/REJECTED actions
|
|
20
|
+
* - Fire and forget - just send to WebSocket
|
|
21
|
+
*
|
|
22
|
+
* This prevents memory leaks from storing thousands of voice chunks.
|
|
23
|
+
*/
|
|
24
|
+
function* postVoiceActivity(
|
|
25
|
+
directLine: DirectLineJSBotConnection,
|
|
26
|
+
userID: string,
|
|
27
|
+
username: string,
|
|
28
|
+
{ payload: { activity } }: VoicePostActivityAction,
|
|
29
|
+
ponyfill: GlobalScopePonyfill
|
|
30
|
+
) {
|
|
31
|
+
const locale: string = yield select(languageSelector);
|
|
32
|
+
const localTimeZone =
|
|
33
|
+
typeof window.Intl === 'undefined' ? undefined : new Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
34
|
+
const now = new ponyfill.Date();
|
|
35
|
+
|
|
36
|
+
const outgoingActivity = {
|
|
37
|
+
...activity,
|
|
38
|
+
channelId: 'webchat',
|
|
39
|
+
from: {
|
|
40
|
+
id: userID,
|
|
41
|
+
name: username,
|
|
42
|
+
role: 'user'
|
|
43
|
+
},
|
|
44
|
+
locale,
|
|
45
|
+
localTimestamp: dateToLocaleISOString(now),
|
|
46
|
+
localTimezone: localTimeZone,
|
|
47
|
+
...(activity.type === 'event'
|
|
48
|
+
? {
|
|
49
|
+
name: activity.name,
|
|
50
|
+
value: activity.value
|
|
51
|
+
}
|
|
52
|
+
: {})
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
try {
|
|
56
|
+
yield observeOnce(directLine.postActivity(outgoingActivity as DirectLineActivity));
|
|
57
|
+
} catch (error) {
|
|
58
|
+
console.error('botframework-webchat: Failed to post voice activity to chat adapter.', error);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export default function* voiceActivitySaga(ponyfill: GlobalScopePonyfill) {
|
|
63
|
+
yield whileConnected(function* voiceActivityWhileConnected({
|
|
64
|
+
directLine,
|
|
65
|
+
userID,
|
|
66
|
+
username
|
|
67
|
+
}: {
|
|
68
|
+
directLine: DirectLineJSBotConnection;
|
|
69
|
+
userID: string;
|
|
70
|
+
username: string;
|
|
71
|
+
}) {
|
|
72
|
+
yield takeEvery(VOICE_POST_ACTIVITY, function* (action: VoicePostActivityAction) {
|
|
73
|
+
yield* postVoiceActivity(directLine, userID, username, action, ponyfill);
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { call, cancelled, fork, put, race, select, take } from 'redux-saga/effects';
|
|
2
2
|
|
|
3
|
-
import { QUEUE_INCOMING_ACTIVITY } from '../actions/queueIncomingActivity';
|
|
4
|
-
import activitiesSelector, { ofType as activitiesOfType } from '../selectors/activities';
|
|
5
|
-
import activityFromBot from '../definitions/activityFromBot';
|
|
6
3
|
import incomingActivity, { INCOMING_ACTIVITY } from '../actions/incomingActivity';
|
|
4
|
+
import { QUEUE_INCOMING_ACTIVITY } from '../actions/queueIncomingActivity';
|
|
7
5
|
import setSuggestedActions from '../actions/setSuggestedActions';
|
|
6
|
+
import activityFromBot from '../definitions/activityFromBot';
|
|
7
|
+
import activitiesSelector, { ofType as activitiesOfType } from '../selectors/activities';
|
|
8
8
|
import sleep from '../utils/sleep';
|
|
9
9
|
import whileConnected from './effects/whileConnected';
|
|
10
10
|
|
|
@@ -94,7 +94,13 @@ function* queueIncomingActivity({ userID }: { userID: string }, ponyfill: Global
|
|
|
94
94
|
|
|
95
95
|
// If suggested actions is not destined to anyone, or is destined to the user, show it.
|
|
96
96
|
// In other words, if suggested actions is destined to someone else, don't show it.
|
|
97
|
-
|
|
97
|
+
const suggestedActions = to?.length && !to.includes(userID) ? null : actions;
|
|
98
|
+
|
|
99
|
+
if (suggestedActions) {
|
|
100
|
+
yield put(setSuggestedActions(suggestedActions, lastMessageActivity));
|
|
101
|
+
} else {
|
|
102
|
+
yield put(setSuggestedActions());
|
|
103
|
+
}
|
|
98
104
|
}
|
|
99
105
|
}
|
|
100
106
|
);
|
|
@@ -12,7 +12,10 @@ function* postActivityWithMessage({
|
|
|
12
12
|
{
|
|
13
13
|
attachments: attachments.map(({ blob, thumbnailURL }) => ({
|
|
14
14
|
contentType: (blob instanceof File && blob.type) || 'application/octet-stream',
|
|
15
|
-
|
|
15
|
+
// Chat adapter should download the file as binary.
|
|
16
|
+
// In case the chat adapter naively echo back the URL, it will be treated as binary.
|
|
17
|
+
// eslint-disable-next-line no-restricted-properties
|
|
18
|
+
contentUrl: URL.createObjectURL(new Blob([blob], { type: 'application/octet-stream' })),
|
|
16
19
|
name: blob instanceof File ? blob.name : undefined,
|
|
17
20
|
thumbnailUrl: thumbnailURL?.toString()
|
|
18
21
|
})),
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { put, select, takeEvery } from 'redux-saga/effects';
|
|
2
2
|
|
|
3
3
|
import { INCOMING_ACTIVITY } from '../actions/incomingActivity';
|
|
4
|
-
import { WILL_START } from '../constants/DictateState';
|
|
5
4
|
import markActivity from '../actions/markActivity';
|
|
6
5
|
import setDictateState from '../actions/setDictateState';
|
|
7
|
-
import shouldSpeakIncomingActivitySelector from '../selectors/shouldSpeakIncomingActivity';
|
|
8
|
-
import speakableActivity from '../definitions/speakableActivity';
|
|
9
6
|
import stopDictate from '../actions/stopDictate';
|
|
7
|
+
import { IDLE, WILL_START } from '../constants/DictateState';
|
|
8
|
+
import speakableActivity from '../definitions/speakableActivity';
|
|
9
|
+
import dictateStateSelector from '../selectors/dictateState';
|
|
10
|
+
import shouldSpeakIncomingActivitySelector from '../selectors/shouldSpeakIncomingActivity';
|
|
10
11
|
import whileConnected from './effects/whileConnected';
|
|
11
12
|
|
|
12
13
|
function* speakActivityAndStartDictateOnIncomingActivityFromOthers({ userID }) {
|
|
@@ -18,6 +19,7 @@ function* speakActivityAndStartDictateOnIncomingActivityFromOthers({ userID }) {
|
|
|
18
19
|
type === INCOMING_ACTIVITY && payload.activity.from.id !== userID && payload.activity.from.role !== 'user',
|
|
19
20
|
function* ({ payload: { activity } }) {
|
|
20
21
|
const shouldSpeakIncomingActivity = yield select(shouldSpeakIncomingActivitySelector);
|
|
22
|
+
const dictateState = yield select(dictateStateSelector);
|
|
21
23
|
const shouldSpeak = speakableActivity(activity) && shouldSpeakIncomingActivity;
|
|
22
24
|
|
|
23
25
|
if (
|
|
@@ -30,7 +32,11 @@ function* speakActivityAndStartDictateOnIncomingActivityFromOthers({ userID }) {
|
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
if (shouldSpeak && activity.inputHint === 'expectingInput') {
|
|
33
|
-
|
|
35
|
+
// In continuous mode (dictateState === LISTENING), we shouldn't set it to WILL_START.
|
|
36
|
+
// WILL_START means auto start after synthesis completed.
|
|
37
|
+
if (dictateState === IDLE) {
|
|
38
|
+
yield put(setDictateState(WILL_START));
|
|
39
|
+
}
|
|
34
40
|
} else if (activity.inputHint === 'ignoringInput') {
|
|
35
41
|
yield put(stopDictate());
|
|
36
42
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { put, select, takeEvery } from 'redux-saga/effects';
|
|
2
2
|
|
|
3
3
|
import { MARK_ACTIVITY } from '../actions/markActivity';
|
|
4
|
-
import { of as activitiesOf } from '../selectors/activities';
|
|
5
4
|
import { SET_DICTATE_STATE } from '../actions/setDictateState';
|
|
5
|
+
import startDictate from '../actions/startDictate';
|
|
6
6
|
import { WILL_START } from '../constants/DictateState';
|
|
7
|
-
import dictateStateSelector from '../selectors/dictateState';
|
|
8
7
|
import speakingActivity from '../definitions/speakingActivity';
|
|
9
|
-
import
|
|
8
|
+
import { of as activitiesOf } from '../selectors/activities';
|
|
9
|
+
import dictateStateSelector from '../selectors/dictateState';
|
|
10
10
|
|
|
11
11
|
function* startDictateOnSpeakComplete() {
|
|
12
12
|
const speakingActivities = yield select(activitiesOf(speakingActivity));
|
|
@@ -1,15 +1,25 @@
|
|
|
1
|
-
import { put, takeEvery } from 'redux-saga/effects';
|
|
1
|
+
import { put, select, takeEvery } from 'redux-saga/effects';
|
|
2
2
|
|
|
3
3
|
import { POST_ACTIVITY_PENDING } from '../actions/postActivity';
|
|
4
4
|
import startSpeakingActivity from '../actions/startSpeakingActivity';
|
|
5
|
+
import { DICTATING } from '../constants/DictateState';
|
|
6
|
+
import dictateStateSelector from '../selectors/dictateState';
|
|
5
7
|
import whileConnected from './effects/whileConnected';
|
|
6
8
|
|
|
7
9
|
function* startSpeakActivityOnPostActivity() {
|
|
8
10
|
yield takeEvery(
|
|
9
|
-
({
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
({ type }) => type === POST_ACTIVITY_PENDING,
|
|
12
|
+
function* ({ meta, payload }) {
|
|
13
|
+
const dictateState = yield select(dictateStateSelector);
|
|
14
|
+
|
|
15
|
+
if (
|
|
16
|
+
// In continuous mode (speech recognition is active), we should speak everything.
|
|
17
|
+
dictateState === DICTATING ||
|
|
18
|
+
// Otherwise, in interactive mode, if last message was sent via speech, we should speak bot response.
|
|
19
|
+
(meta.method === 'speech' && payload.activity.type === 'message')
|
|
20
|
+
) {
|
|
21
|
+
yield put(startSpeakingActivity());
|
|
22
|
+
}
|
|
13
23
|
}
|
|
14
24
|
);
|
|
15
25
|
}
|
|
@@ -1,20 +1,28 @@
|
|
|
1
|
-
import { put, takeEvery } from 'redux-saga/effects';
|
|
1
|
+
import { put, select, takeEvery } from 'redux-saga/effects';
|
|
2
2
|
|
|
3
3
|
import { POST_ACTIVITY_PENDING } from '../actions/postActivity';
|
|
4
4
|
import stopDictate from '../actions/stopDictate';
|
|
5
|
+
import { DICTATING } from '../constants/DictateState';
|
|
6
|
+
import dictateStateSelector from '../selectors/dictateState';
|
|
5
7
|
import whileConnected from './effects/whileConnected';
|
|
6
8
|
|
|
7
9
|
function* stopDictateOnCardAction() {
|
|
8
10
|
// TODO: [P2] We should stop speech input when the user click on anything on a card, including open URL which doesn't generate postActivity
|
|
9
11
|
// This functionality was not implemented in v3
|
|
10
|
-
|
|
11
12
|
yield takeEvery(
|
|
12
13
|
// Currently, there are no actions that are related to card input
|
|
13
14
|
// For now, we are using POST_ACTIVITY of a "message" activity
|
|
14
15
|
// In the future, if we have an action for card input, we should use that instead
|
|
15
16
|
({ payload, type }) => type === POST_ACTIVITY_PENDING && payload.activity.type === 'message',
|
|
16
17
|
function* putStopDictate() {
|
|
17
|
-
yield
|
|
18
|
+
const dictateState = yield select(dictateStateSelector);
|
|
19
|
+
|
|
20
|
+
// When performing card action:
|
|
21
|
+
// - In continuous mode (speech recognition is active), speech recognition should not be stopped
|
|
22
|
+
// - Otherwise, in interactive mode, speech recognition should be stopped
|
|
23
|
+
if (dictateState !== DICTATING) {
|
|
24
|
+
yield put(stopDictate());
|
|
25
|
+
}
|
|
18
26
|
}
|
|
19
27
|
);
|
|
20
28
|
}
|
|
@@ -1,20 +1,38 @@
|
|
|
1
|
-
import { put, takeEvery } from 'redux-saga/effects';
|
|
1
|
+
import { put, select, takeEvery } from 'redux-saga/effects';
|
|
2
2
|
|
|
3
3
|
import { POST_ACTIVITY_PENDING } from '../actions/postActivity';
|
|
4
|
+
import { SET_DICTATE_INTERIMS } from '../actions/setDictateInterims';
|
|
4
5
|
import { SET_SEND_BOX } from '../actions/setSendBox';
|
|
5
6
|
import stopSpeakingActivity from '../actions/stopSpeakingActivity';
|
|
7
|
+
import { DICTATING } from '../constants/DictateState';
|
|
8
|
+
import dictateStateSelector from '../selectors/dictateState';
|
|
6
9
|
import whileConnected from './effects/whileConnected';
|
|
7
10
|
|
|
8
11
|
function* stopSpeakingActivityOnInput() {
|
|
9
12
|
yield takeEvery(
|
|
10
|
-
({
|
|
13
|
+
({ payload, type }) =>
|
|
11
14
|
(type === SET_SEND_BOX && payload.text) ||
|
|
12
15
|
// We want to stop speaking activity when the user click on a card action
|
|
13
16
|
// But currently there are no actions generated out of a card action
|
|
14
17
|
// So, right now, we are using best-effort by listening to POST_ACTIVITY_PENDING with a "message" event
|
|
15
18
|
// We filter out speech because we will call startSpeakingActivity() for POST_ACTIVITY_PENDING dispatched by speech
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
type === POST_ACTIVITY_PENDING ||
|
|
20
|
+
// We want to stop speaking activity on barge-in.
|
|
21
|
+
type === SET_DICTATE_INTERIMS,
|
|
22
|
+
function* ({ meta, payload, type }) {
|
|
23
|
+
const dictateState = yield select(dictateStateSelector);
|
|
24
|
+
|
|
25
|
+
// If input is post activity, do not stop speaking if either one of the followings:
|
|
26
|
+
// - In continuous mode (speech recognition should active for as long as possible)
|
|
27
|
+
// - Posting via speech (interactive mode, should speak bot response)
|
|
28
|
+
// - Posting a non-message (interactive mode, not typing on keyboard, should be ignored)
|
|
29
|
+
if (
|
|
30
|
+
type === POST_ACTIVITY_PENDING &&
|
|
31
|
+
(dictateState === DICTATING || meta.method === 'speech' || payload.activity.type !== 'message')
|
|
32
|
+
) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
18
36
|
yield put(stopSpeakingActivity());
|
|
19
37
|
}
|
|
20
38
|
);
|
package/src/tsconfig.json
CHANGED
|
@@ -1,19 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"
|
|
4
|
-
"declaration": true,
|
|
5
|
-
"declarationDir": "../lib",
|
|
6
|
-
"declarationMap": true,
|
|
7
|
-
"downlevelIteration": true,
|
|
8
|
-
"emitDeclarationOnly": true,
|
|
9
|
-
"jsx": "react",
|
|
10
|
-
"module": "ESNext",
|
|
11
|
-
"moduleResolution": "Bundler",
|
|
12
|
-
"preserveWatchOutput": true,
|
|
13
|
-
"pretty": true,
|
|
14
|
-
"resolveJsonModule": true, // Required for localization files
|
|
15
|
-
"skipLibCheck": true,
|
|
16
|
-
"sourceMap": true
|
|
3
|
+
"strict": false
|
|
17
4
|
},
|
|
18
|
-
"
|
|
5
|
+
"exclude": ["**/*.spec.ts"],
|
|
6
|
+
"extends": "@msinternal/botframework-webchat-tsconfig/legacy"
|
|
19
7
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { RestrictedDebugAPI, type InferPublic } from '@msinternal/botframework-webchat-core-debug-api';
|
|
2
|
+
import type { ArrayElement } from 'type-fest';
|
|
3
|
+
|
|
4
|
+
const BREAKPOINT_NAMES = ['incomingActivity'] as const;
|
|
5
|
+
|
|
6
|
+
type StoreBreakpointName = ArrayElement<typeof BREAKPOINT_NAMES>;
|
|
7
|
+
|
|
8
|
+
type StoreDebugContext = {
|
|
9
|
+
readonly activities: readonly any[];
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
class RestrictedStoreDebugAPI extends RestrictedDebugAPI<StoreBreakpointName, StoreDebugContext> {
|
|
13
|
+
constructor(getActivities: () => StoreDebugContext['activities']) {
|
|
14
|
+
super(
|
|
15
|
+
BREAKPOINT_NAMES,
|
|
16
|
+
Object.freeze({
|
|
17
|
+
activities: getActivities
|
|
18
|
+
})
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
type StoreDebugAPI = InferPublic<RestrictedStoreDebugAPI>;
|
|
24
|
+
|
|
25
|
+
export { RestrictedStoreDebugAPI, type StoreDebugAPI };
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
// - However, we do not expect the server to return "localTimestamp" as they may not have capability to store this information
|
|
8
8
|
// - "conversationUpdate" activity is never sent to Web Chat, thus, it is not defined
|
|
9
9
|
|
|
10
|
+
import type { LocalId } from '../reducers/activities/sort/property/LocalId';
|
|
10
11
|
import type { AnyAnd } from './AnyAnd';
|
|
11
12
|
// import type { AsEntity, Thing } from './external/OrgSchema/Thing';
|
|
12
13
|
import type { DirectLineAttachment } from './external/DirectLineAttachment';
|
|
@@ -23,17 +24,23 @@ type ChannelData<SendStatus extends SupportedSendStatus | undefined, Type extend
|
|
|
23
24
|
// TODO: [P2] #3953 Rename to "webchat:client-activity-id".
|
|
24
25
|
clientActivityID?: string;
|
|
25
26
|
|
|
26
|
-
//
|
|
27
|
-
'webchat:
|
|
27
|
+
// Web Chat local ID.
|
|
28
|
+
'webchat:internal:local-id': LocalId;
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
// Web Chat ordering sequence, must be computed before inserting into Redux.
|
|
31
|
+
'webchat:internal:position': number;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Time when the activity appear in chat history.
|
|
35
|
+
*
|
|
36
|
+
* Note: if the activity is updated, this value will also be updated.
|
|
37
|
+
*/
|
|
38
|
+
'webchat:internal:received-at'?: number;
|
|
36
39
|
|
|
40
|
+
// Chat adapter may send sequence ID to Web Chat to affect ordering.
|
|
41
|
+
'webchat:sequence-id'?: number | undefined;
|
|
42
|
+
|
|
43
|
+
webChat?: {
|
|
37
44
|
/**
|
|
38
45
|
* Per-activity style options.
|
|
39
46
|
*
|
|
@@ -93,7 +100,7 @@ type ChannelData<SendStatus extends SupportedSendStatus | undefined, Type extend
|
|
|
93
100
|
*/
|
|
94
101
|
'webchat:send-status': SendStatus;
|
|
95
102
|
}
|
|
96
|
-
:
|
|
103
|
+
: Record<any, any>) &
|
|
97
104
|
(Type extends 'message'
|
|
98
105
|
? {
|
|
99
106
|
// TODO: [P2] #3953 Rename to "webchat:message-back".
|
|
@@ -112,8 +119,13 @@ type ChannelData<SendStatus extends SupportedSendStatus | undefined, Type extend
|
|
|
112
119
|
|
|
113
120
|
// TODO: [P2] #3953 It seems Direct Line added a new "summary" field to cater this case.
|
|
114
121
|
'webchat:fallback-text'?: string;
|
|
122
|
+
|
|
123
|
+
feedbackLoop?: {
|
|
124
|
+
type: 'default';
|
|
125
|
+
disclaimer?: string;
|
|
126
|
+
};
|
|
115
127
|
}
|
|
116
|
-
:
|
|
128
|
+
: Record<any, any>)
|
|
117
129
|
>;
|
|
118
130
|
|
|
119
131
|
// Entity - https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#entity
|
|
@@ -169,15 +181,20 @@ type MessageActivityEssence = {
|
|
|
169
181
|
// https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#typing-activity
|
|
170
182
|
type TypingActivityEssence =
|
|
171
183
|
| {
|
|
184
|
+
attachmentLayout?: 'carousel' | 'stacked';
|
|
185
|
+
attachments?: DirectLineAttachment[];
|
|
186
|
+
text?: undefined;
|
|
172
187
|
type: 'typing';
|
|
173
188
|
}
|
|
174
189
|
| {
|
|
190
|
+
attachmentLayout?: 'carousel' | 'stacked';
|
|
191
|
+
attachments?: DirectLineAttachment[];
|
|
175
192
|
channelData: {
|
|
176
|
-
streamId
|
|
193
|
+
streamId?: string | undefined;
|
|
177
194
|
streamSequence: number;
|
|
178
|
-
streamType: 'informative' | 'streaming';
|
|
195
|
+
streamType: 'informative' | 'streaming' | 'final';
|
|
179
196
|
};
|
|
180
|
-
text
|
|
197
|
+
text?: string | undefined;
|
|
181
198
|
type: 'typing';
|
|
182
199
|
};
|
|
183
200
|
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
// Until we fully typed out DirectLineActivity, we need to use "any" here.
|
|
4
4
|
// We only know the DirectLineActivity must be a map, and not other primitive types.
|
|
5
|
-
type DirectLineActivity = Exclude<any, [] | boolean |
|
|
5
|
+
type DirectLineActivity = Exclude<any, [] | boolean | ((...args: unknown[]) => unknown) | number | string>;
|
|
6
6
|
|
|
7
7
|
export type { DirectLineActivity };
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
// This is a declaration file for a single ES feature. Could contains multiple classes definitions.
|
|
2
2
|
/* eslint-disable max-classes-per-file */
|
|
3
3
|
|
|
4
|
+
// TODO: Align with final proposal at https://wicg.github.io/observable/.
|
|
5
|
+
// For example, this signature missed `addTeardown`.
|
|
6
|
+
|
|
4
7
|
// Adopted from https://github.com/tc39/proposal-observable.
|
|
5
8
|
|
|
6
9
|
/** Receives a completion notification */
|
|
@@ -39,7 +42,7 @@ declare class Subscription {
|
|
|
39
42
|
*/
|
|
40
43
|
declare class Observer<T> {
|
|
41
44
|
/** Receives the subscription object when `subscribe` is called */
|
|
42
|
-
start(subscription: Subscription);
|
|
45
|
+
start(subscription: Subscription): void;
|
|
43
46
|
|
|
44
47
|
/** Receives the next value in the sequence */
|
|
45
48
|
next: NextFunction<T>;
|