botframework-webchat-core 4.18.2 → 4.19.1-main.20260526.b9ad8fa
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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 Microsoft Corporation
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/activity.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This is required for Webpack 4 which does not support named exports.
|
|
2
|
+
// eslint-disable-next-line no-undef
|
|
3
|
+
module.exports = require('../../dist/botframework-webchat-core.activity.js');
|
|
4
|
+
|
|
5
|
+
console.warn(
|
|
6
|
+
`require('botframework-webchat-core/activity') is deprecated, please use require('botframework-webchat-core/activity.js') instead. This entrypoint will be removed on or after 2028-04-24.`
|
|
7
|
+
);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from '../../dist/botframework-webchat-core.activity.mjs';
|
|
2
|
+
|
|
3
|
+
console.warn(
|
|
4
|
+
'Import from "botframework-webchat-core/activity" is deprecated, please import from "botframework-webchat-core/activity.js" instead. This entrypoint will be removed on or after 2028-04-24.'
|
|
5
|
+
);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This is required for Webpack 4 which does not support named exports.
|
|
2
|
+
// eslint-disable-next-line no-undef
|
|
3
|
+
module.exports = require('../../dist/botframework-webchat-core.graph.js');
|
|
4
|
+
|
|
5
|
+
console.warn(
|
|
6
|
+
`require('botframework-webchat-core/graph') is deprecated, please use require('botframework-webchat-core/graph.js') instead. This entrypoint will be removed on or after 2028-04-24.`
|
|
7
|
+
);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from '../../dist/botframework-webchat-core.graph.mjs';
|
|
2
|
+
|
|
3
|
+
console.warn(
|
|
4
|
+
'Import from "botframework-webchat-core/graph" is deprecated, please import from "botframework-webchat-core/graph.js" instead. This entrypoint will be removed on or after 2028-04-24.'
|
|
5
|
+
);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This is required for Webpack 4 which does not support named exports.
|
|
2
|
+
// eslint-disable-next-line no-undef
|
|
3
|
+
module.exports = require('../../dist/botframework-webchat-core.internal.js');
|
|
4
|
+
|
|
5
|
+
console.warn(
|
|
6
|
+
`require('botframework-webchat-core/internal') is deprecated, please use require('botframework-webchat-core/internal.js') instead. This entrypoint will be removed on or after 2028-04-24.`
|
|
7
|
+
);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from '../../dist/botframework-webchat-core.internal.mjs';
|
|
2
|
+
|
|
3
|
+
console.warn(
|
|
4
|
+
'Import from "botframework-webchat-core/internal" is deprecated, please import from "botframework-webchat-core/internal.js" instead. This entrypoint will be removed on or after 2028-04-24.'
|
|
5
|
+
);
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import * as valibot from 'valibot';
|
|
2
|
+
import { InferOutput } from 'valibot';
|
|
3
|
+
import { T as Tagged } from './_dtsroll-chunks/B7Whm73Q-tagged.js';
|
|
4
|
+
|
|
5
|
+
type Activity = WebChatActivity;
|
|
6
|
+
|
|
7
|
+
declare const LocalIdSchema: valibot.SchemaWithPipe<readonly [valibot.UnionSchema<[valibot.GenericSchema<`_:${string}`>, valibot.GenericSchema<`https://${string}`>], "@id is required and must be an IRI or blank node identifier">, valibot.TransformAction<`_:${string}` | `https://${string}`, Tagged<`_:${string}` | `https://${string}`, "local id">>]>;
|
|
8
|
+
type LocalId = InferOutput<typeof LocalIdSchema>;
|
|
9
|
+
declare function getLocalIdFromActivity(activity: Readonly<Activity>): LocalId;
|
|
10
|
+
|
|
11
|
+
type AnyAnd<T> = Omit<any, keyof T> & T;
|
|
12
|
+
|
|
13
|
+
type DirectLineAttachment = {
|
|
14
|
+
content?: any;
|
|
15
|
+
contentType: string;
|
|
16
|
+
contentUrl?: string;
|
|
17
|
+
name?: string;
|
|
18
|
+
thumbnailUrl?: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
type CardActionWithImageAndTitle = {
|
|
22
|
+
image: string;
|
|
23
|
+
} | {
|
|
24
|
+
title: string;
|
|
25
|
+
} | {
|
|
26
|
+
image: string;
|
|
27
|
+
title: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* A `call` action represents a telephone number that may be called.
|
|
31
|
+
*
|
|
32
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#call
|
|
33
|
+
*/
|
|
34
|
+
type CallCardAction = CardActionWithImageAndTitle & {
|
|
35
|
+
type: 'call';
|
|
36
|
+
value: string;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* A `downloadFile` action represents a hyperlink to be downloaded.
|
|
40
|
+
*
|
|
41
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#download-file-actions
|
|
42
|
+
*/
|
|
43
|
+
type DownloadFileCardAction = CardActionWithImageAndTitle & {
|
|
44
|
+
type: 'downloadFile';
|
|
45
|
+
value: string;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* An `imBack` action represents a text response that is added to the chat feed.
|
|
49
|
+
*
|
|
50
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#im-back
|
|
51
|
+
*/
|
|
52
|
+
type IMBackCardAction = CardActionWithImageAndTitle & {
|
|
53
|
+
type: 'imBack';
|
|
54
|
+
value: string;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* A `messageBack` action represents a text response to be sent via the chat system.
|
|
58
|
+
*
|
|
59
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#message-back
|
|
60
|
+
*/
|
|
61
|
+
type MessageBackCardAction = CardActionWithImageAndTitle & {
|
|
62
|
+
displayText?: string;
|
|
63
|
+
text?: string;
|
|
64
|
+
type: 'messageBack';
|
|
65
|
+
value?: {
|
|
66
|
+
[key: string]: any;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* An `openUrl` action represents a hyperlink to be handled by the client.
|
|
71
|
+
*
|
|
72
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#open-url-actions
|
|
73
|
+
*/
|
|
74
|
+
type OpenURLCardAction = CardActionWithImageAndTitle & {
|
|
75
|
+
type: 'openUrl';
|
|
76
|
+
value: string;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* A `playAudio` action represents audio media that may be played.
|
|
80
|
+
*
|
|
81
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#play-audio
|
|
82
|
+
*/
|
|
83
|
+
type PlayAudioCardAction = CardActionWithImageAndTitle & {
|
|
84
|
+
type: 'playAudio';
|
|
85
|
+
value: string;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* A `playVideo` action represents video media that may be played.
|
|
89
|
+
*
|
|
90
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#play-video
|
|
91
|
+
*/
|
|
92
|
+
type PlayVideoCardAction = CardActionWithImageAndTitle & {
|
|
93
|
+
type: 'playVideo';
|
|
94
|
+
value: string;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* A `postBack` action represents a text response that is not added to the chat feed.
|
|
98
|
+
*
|
|
99
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#post-back
|
|
100
|
+
*/
|
|
101
|
+
type PostBackCardAction = CardActionWithImageAndTitle & {
|
|
102
|
+
type: 'postBack';
|
|
103
|
+
value: any;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* A `showImage` action represents an image that may be displayed.
|
|
107
|
+
*
|
|
108
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#show-image-file-actions
|
|
109
|
+
*/
|
|
110
|
+
type ShowImageCardAction = CardActionWithImageAndTitle & {
|
|
111
|
+
type: 'showImage';
|
|
112
|
+
value: string;
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* A `signin` action represents a hyperlink to be handled by the client's signin system.
|
|
116
|
+
*
|
|
117
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#signin
|
|
118
|
+
*/
|
|
119
|
+
type SignInCardAction = CardActionWithImageAndTitle & {
|
|
120
|
+
type: 'signin';
|
|
121
|
+
value: string;
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* 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.
|
|
125
|
+
*
|
|
126
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#card-action
|
|
127
|
+
*/
|
|
128
|
+
type DirectLineCardAction = CallCardAction | DownloadFileCardAction | IMBackCardAction | MessageBackCardAction | OpenURLCardAction | PlayAudioCardAction | PlayVideoCardAction | PostBackCardAction | ShowImageCardAction | SignInCardAction;
|
|
129
|
+
|
|
130
|
+
type DirectLineSuggestedAction = {
|
|
131
|
+
actions?: DirectLineCardAction[];
|
|
132
|
+
to?: string[];
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
type SupportedRole = 'bot' | 'channel' | 'user';
|
|
136
|
+
type SupportedSendStatus = 'sending' | 'send failed' | 'sent';
|
|
137
|
+
type ChannelData<SendStatus extends SupportedSendStatus | undefined, Type extends string> = AnyAnd<{
|
|
138
|
+
attachmentSizes?: number[];
|
|
139
|
+
clientActivityID?: string;
|
|
140
|
+
'webchat:internal:local-id': LocalId;
|
|
141
|
+
'webchat:internal:position': number;
|
|
142
|
+
/**
|
|
143
|
+
* Time when the activity appear in chat history.
|
|
144
|
+
*
|
|
145
|
+
* Note: if the activity is updated, this value will also be updated.
|
|
146
|
+
*/
|
|
147
|
+
'webchat:internal:received-at'?: number;
|
|
148
|
+
'webchat:sequence-id'?: number | undefined;
|
|
149
|
+
webChat?: {
|
|
150
|
+
/**
|
|
151
|
+
* Per-activity style options.
|
|
152
|
+
*
|
|
153
|
+
* New in 4.18.0.
|
|
154
|
+
*/
|
|
155
|
+
styleOptions?: Record<string, boolean | number | null | string>;
|
|
156
|
+
};
|
|
157
|
+
} & (SendStatus extends SupportedSendStatus ? {
|
|
158
|
+
/**
|
|
159
|
+
* @deprecated Since 4.15.3: Please use `channelData['webchat:send-status']` or `useSendStatusByActivityKey()` hook instead.
|
|
160
|
+
* Please refer to https://github.com/microsoft/BotFramework-WebChat/pull/4362 for details. This field will be removed on or after 2024-07-31.
|
|
161
|
+
*/
|
|
162
|
+
state?: SendStatus;
|
|
163
|
+
/**
|
|
164
|
+
* The send status of the activity.
|
|
165
|
+
*
|
|
166
|
+
* - `"sending"`, the activity is in-transit and it has not been timed out;
|
|
167
|
+
* - `"send failed"`, the activity cannot be delivered permanently and further processing had been stopped;
|
|
168
|
+
* - `"sent"`, the activity is delivered successfully.
|
|
169
|
+
*
|
|
170
|
+
* Due to network-related race conditions, the activity could be marked as `"send failed"` but delivered by the service.
|
|
171
|
+
* In this case, the activity should continue to mark as `"send failed"`.
|
|
172
|
+
*
|
|
173
|
+
* For further details, please see [#4362](https://github.com/microsoft/BotFramework-WebChat/pull/4362).
|
|
174
|
+
*/
|
|
175
|
+
'webchat:send-status': SendStatus;
|
|
176
|
+
} : Record<any, any>) & (Type extends 'message' ? {
|
|
177
|
+
messageBack?: {
|
|
178
|
+
displayText: string;
|
|
179
|
+
};
|
|
180
|
+
postBack?: boolean;
|
|
181
|
+
speak?: boolean;
|
|
182
|
+
speechSynthesisUtterance?: SpeechSynthesisUtterance;
|
|
183
|
+
'webchat:fallback-text'?: string;
|
|
184
|
+
feedbackLoop?: {
|
|
185
|
+
type: 'default';
|
|
186
|
+
disclaimer?: string;
|
|
187
|
+
};
|
|
188
|
+
} : Record<any, any>)>;
|
|
189
|
+
type ClientCapabilitiesEntity = {
|
|
190
|
+
requiresBotState?: boolean;
|
|
191
|
+
supportsListening?: boolean;
|
|
192
|
+
supportsTts?: boolean;
|
|
193
|
+
type: 'ClientCapabilities';
|
|
194
|
+
};
|
|
195
|
+
type Entity = ClientCapabilitiesEntity | {
|
|
196
|
+
type: string;
|
|
197
|
+
};
|
|
198
|
+
type ChannelAcount<Role extends SupportedRole> = {
|
|
199
|
+
id: string;
|
|
200
|
+
name?: string;
|
|
201
|
+
role: Role;
|
|
202
|
+
};
|
|
203
|
+
type EventActivityEssence = {
|
|
204
|
+
name: string;
|
|
205
|
+
type: 'event';
|
|
206
|
+
value?: any;
|
|
207
|
+
};
|
|
208
|
+
type MessageActivityEssence = {
|
|
209
|
+
attachmentLayout?: 'carousel' | 'stacked';
|
|
210
|
+
attachments?: DirectLineAttachment[];
|
|
211
|
+
channelData: {
|
|
212
|
+
streamId?: string;
|
|
213
|
+
streamSequence?: number;
|
|
214
|
+
streamType?: 'final';
|
|
215
|
+
};
|
|
216
|
+
inputHint?: 'accepting' | 'expecting' | 'ignoring';
|
|
217
|
+
locale?: string;
|
|
218
|
+
speak?: string;
|
|
219
|
+
suggestedActions?: DirectLineSuggestedAction;
|
|
220
|
+
text: string | undefined;
|
|
221
|
+
textFormat?: 'markdown' | 'plain' | 'xml';
|
|
222
|
+
type: 'message';
|
|
223
|
+
value?: any;
|
|
224
|
+
};
|
|
225
|
+
type TypingActivityEssence = {
|
|
226
|
+
attachmentLayout?: 'carousel' | 'stacked';
|
|
227
|
+
attachments?: DirectLineAttachment[];
|
|
228
|
+
text?: undefined;
|
|
229
|
+
type: 'typing';
|
|
230
|
+
} | {
|
|
231
|
+
attachmentLayout?: 'carousel' | 'stacked';
|
|
232
|
+
attachments?: DirectLineAttachment[];
|
|
233
|
+
channelData: {
|
|
234
|
+
streamId?: string | undefined;
|
|
235
|
+
streamSequence: number;
|
|
236
|
+
streamType: 'informative' | 'streaming' | 'final';
|
|
237
|
+
};
|
|
238
|
+
text?: string | undefined;
|
|
239
|
+
type: 'typing';
|
|
240
|
+
};
|
|
241
|
+
type TimestampFromServerEssence = {
|
|
242
|
+
id: string;
|
|
243
|
+
localTimestamp?: string;
|
|
244
|
+
timestamp: string;
|
|
245
|
+
};
|
|
246
|
+
type TimestampInTransitEssence = {
|
|
247
|
+
id?: string;
|
|
248
|
+
localTimestamp: string;
|
|
249
|
+
timestamp?: string;
|
|
250
|
+
};
|
|
251
|
+
type TimestampEssence<Role extends SupportedRole, SendStatus extends SupportedSendStatus | undefined> = Role extends 'user' ? SendStatus extends 'sending' | 'send failed' ? TimestampInTransitEssence : TimestampFromServerEssence : TimestampFromServerEssence;
|
|
252
|
+
type CoreActivityEssence<Role extends SupportedRole, SendStatus extends SupportedSendStatus | undefined, Type extends string = 'conversationUpdate' | 'event' | 'invoke' | 'message' | 'typing'> = {
|
|
253
|
+
channelData: ChannelData<SendStatus, Type>;
|
|
254
|
+
channelId?: string;
|
|
255
|
+
entities?: Entity[];
|
|
256
|
+
from: ChannelAcount<Role>;
|
|
257
|
+
localTimezone?: string;
|
|
258
|
+
replyToId?: string;
|
|
259
|
+
type: string;
|
|
260
|
+
} & TimestampEssence<Role, SendStatus> & (Type extends 'event' ? EventActivityEssence : Type extends 'message' ? MessageActivityEssence : Type extends 'typing' ? TypingActivityEssence : {
|
|
261
|
+
type: Type;
|
|
262
|
+
});
|
|
263
|
+
type OthersActivity = CoreActivityEssence<'bot' | 'channel', undefined>;
|
|
264
|
+
type SelfActivitySendFailed = CoreActivityEssence<'user', 'send failed'>;
|
|
265
|
+
type SelfActivitySending = CoreActivityEssence<'user', 'sending'>;
|
|
266
|
+
type SelfActivitySent = CoreActivityEssence<'user', 'sent'>;
|
|
267
|
+
type SelfActivity = SelfActivitySendFailed | SelfActivitySending | SelfActivitySent;
|
|
268
|
+
type WebChatActivity = SelfActivity | OthersActivity;
|
|
269
|
+
|
|
270
|
+
export { LocalIdSchema as a, getLocalIdFromActivity as g };
|
|
271
|
+
export type { Activity as A, DirectLineCardAction as D, LocalId as L, WebChatActivity as W, DirectLineAttachment as b, DirectLineSuggestedAction as c };
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import * as valibot from 'valibot';
|
|
2
|
+
import { InferOutput } from 'valibot';
|
|
3
|
+
import { T as Tagged } from './_dtsroll-chunks/B7Whm73Q-tagged.js';
|
|
4
|
+
|
|
5
|
+
type Activity = WebChatActivity;
|
|
6
|
+
|
|
7
|
+
declare const LocalIdSchema: valibot.SchemaWithPipe<readonly [valibot.UnionSchema<[valibot.GenericSchema<`_:${string}`>, valibot.GenericSchema<`https://${string}`>], "@id is required and must be an IRI or blank node identifier">, valibot.TransformAction<`_:${string}` | `https://${string}`, Tagged<`_:${string}` | `https://${string}`, "local id">>]>;
|
|
8
|
+
type LocalId = InferOutput<typeof LocalIdSchema>;
|
|
9
|
+
declare function getLocalIdFromActivity(activity: Readonly<Activity>): LocalId;
|
|
10
|
+
|
|
11
|
+
type AnyAnd<T> = Omit<any, keyof T> & T;
|
|
12
|
+
|
|
13
|
+
type DirectLineAttachment = {
|
|
14
|
+
content?: any;
|
|
15
|
+
contentType: string;
|
|
16
|
+
contentUrl?: string;
|
|
17
|
+
name?: string;
|
|
18
|
+
thumbnailUrl?: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
type CardActionWithImageAndTitle = {
|
|
22
|
+
image: string;
|
|
23
|
+
} | {
|
|
24
|
+
title: string;
|
|
25
|
+
} | {
|
|
26
|
+
image: string;
|
|
27
|
+
title: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* A `call` action represents a telephone number that may be called.
|
|
31
|
+
*
|
|
32
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#call
|
|
33
|
+
*/
|
|
34
|
+
type CallCardAction = CardActionWithImageAndTitle & {
|
|
35
|
+
type: 'call';
|
|
36
|
+
value: string;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* A `downloadFile` action represents a hyperlink to be downloaded.
|
|
40
|
+
*
|
|
41
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#download-file-actions
|
|
42
|
+
*/
|
|
43
|
+
type DownloadFileCardAction = CardActionWithImageAndTitle & {
|
|
44
|
+
type: 'downloadFile';
|
|
45
|
+
value: string;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* An `imBack` action represents a text response that is added to the chat feed.
|
|
49
|
+
*
|
|
50
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#im-back
|
|
51
|
+
*/
|
|
52
|
+
type IMBackCardAction = CardActionWithImageAndTitle & {
|
|
53
|
+
type: 'imBack';
|
|
54
|
+
value: string;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* A `messageBack` action represents a text response to be sent via the chat system.
|
|
58
|
+
*
|
|
59
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#message-back
|
|
60
|
+
*/
|
|
61
|
+
type MessageBackCardAction = CardActionWithImageAndTitle & {
|
|
62
|
+
displayText?: string;
|
|
63
|
+
text?: string;
|
|
64
|
+
type: 'messageBack';
|
|
65
|
+
value?: {
|
|
66
|
+
[key: string]: any;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* An `openUrl` action represents a hyperlink to be handled by the client.
|
|
71
|
+
*
|
|
72
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#open-url-actions
|
|
73
|
+
*/
|
|
74
|
+
type OpenURLCardAction = CardActionWithImageAndTitle & {
|
|
75
|
+
type: 'openUrl';
|
|
76
|
+
value: string;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* A `playAudio` action represents audio media that may be played.
|
|
80
|
+
*
|
|
81
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#play-audio
|
|
82
|
+
*/
|
|
83
|
+
type PlayAudioCardAction = CardActionWithImageAndTitle & {
|
|
84
|
+
type: 'playAudio';
|
|
85
|
+
value: string;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* A `playVideo` action represents video media that may be played.
|
|
89
|
+
*
|
|
90
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#play-video
|
|
91
|
+
*/
|
|
92
|
+
type PlayVideoCardAction = CardActionWithImageAndTitle & {
|
|
93
|
+
type: 'playVideo';
|
|
94
|
+
value: string;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* A `postBack` action represents a text response that is not added to the chat feed.
|
|
98
|
+
*
|
|
99
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#post-back
|
|
100
|
+
*/
|
|
101
|
+
type PostBackCardAction = CardActionWithImageAndTitle & {
|
|
102
|
+
type: 'postBack';
|
|
103
|
+
value: any;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* A `showImage` action represents an image that may be displayed.
|
|
107
|
+
*
|
|
108
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#show-image-file-actions
|
|
109
|
+
*/
|
|
110
|
+
type ShowImageCardAction = CardActionWithImageAndTitle & {
|
|
111
|
+
type: 'showImage';
|
|
112
|
+
value: string;
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* A `signin` action represents a hyperlink to be handled by the client's signin system.
|
|
116
|
+
*
|
|
117
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#signin
|
|
118
|
+
*/
|
|
119
|
+
type SignInCardAction = CardActionWithImageAndTitle & {
|
|
120
|
+
type: 'signin';
|
|
121
|
+
value: string;
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* 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.
|
|
125
|
+
*
|
|
126
|
+
* https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#card-action
|
|
127
|
+
*/
|
|
128
|
+
type DirectLineCardAction = CallCardAction | DownloadFileCardAction | IMBackCardAction | MessageBackCardAction | OpenURLCardAction | PlayAudioCardAction | PlayVideoCardAction | PostBackCardAction | ShowImageCardAction | SignInCardAction;
|
|
129
|
+
|
|
130
|
+
type DirectLineSuggestedAction = {
|
|
131
|
+
actions?: DirectLineCardAction[];
|
|
132
|
+
to?: string[];
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
type SupportedRole = 'bot' | 'channel' | 'user';
|
|
136
|
+
type SupportedSendStatus = 'sending' | 'send failed' | 'sent';
|
|
137
|
+
type ChannelData<SendStatus extends SupportedSendStatus | undefined, Type extends string> = AnyAnd<{
|
|
138
|
+
attachmentSizes?: number[];
|
|
139
|
+
clientActivityID?: string;
|
|
140
|
+
'webchat:internal:local-id': LocalId;
|
|
141
|
+
'webchat:internal:position': number;
|
|
142
|
+
/**
|
|
143
|
+
* Time when the activity appear in chat history.
|
|
144
|
+
*
|
|
145
|
+
* Note: if the activity is updated, this value will also be updated.
|
|
146
|
+
*/
|
|
147
|
+
'webchat:internal:received-at'?: number;
|
|
148
|
+
'webchat:sequence-id'?: number | undefined;
|
|
149
|
+
webChat?: {
|
|
150
|
+
/**
|
|
151
|
+
* Per-activity style options.
|
|
152
|
+
*
|
|
153
|
+
* New in 4.18.0.
|
|
154
|
+
*/
|
|
155
|
+
styleOptions?: Record<string, boolean | number | null | string>;
|
|
156
|
+
};
|
|
157
|
+
} & (SendStatus extends SupportedSendStatus ? {
|
|
158
|
+
/**
|
|
159
|
+
* @deprecated Since 4.15.3: Please use `channelData['webchat:send-status']` or `useSendStatusByActivityKey()` hook instead.
|
|
160
|
+
* Please refer to https://github.com/microsoft/BotFramework-WebChat/pull/4362 for details. This field will be removed on or after 2024-07-31.
|
|
161
|
+
*/
|
|
162
|
+
state?: SendStatus;
|
|
163
|
+
/**
|
|
164
|
+
* The send status of the activity.
|
|
165
|
+
*
|
|
166
|
+
* - `"sending"`, the activity is in-transit and it has not been timed out;
|
|
167
|
+
* - `"send failed"`, the activity cannot be delivered permanently and further processing had been stopped;
|
|
168
|
+
* - `"sent"`, the activity is delivered successfully.
|
|
169
|
+
*
|
|
170
|
+
* Due to network-related race conditions, the activity could be marked as `"send failed"` but delivered by the service.
|
|
171
|
+
* In this case, the activity should continue to mark as `"send failed"`.
|
|
172
|
+
*
|
|
173
|
+
* For further details, please see [#4362](https://github.com/microsoft/BotFramework-WebChat/pull/4362).
|
|
174
|
+
*/
|
|
175
|
+
'webchat:send-status': SendStatus;
|
|
176
|
+
} : Record<any, any>) & (Type extends 'message' ? {
|
|
177
|
+
messageBack?: {
|
|
178
|
+
displayText: string;
|
|
179
|
+
};
|
|
180
|
+
postBack?: boolean;
|
|
181
|
+
speak?: boolean;
|
|
182
|
+
speechSynthesisUtterance?: SpeechSynthesisUtterance;
|
|
183
|
+
'webchat:fallback-text'?: string;
|
|
184
|
+
feedbackLoop?: {
|
|
185
|
+
type: 'default';
|
|
186
|
+
disclaimer?: string;
|
|
187
|
+
};
|
|
188
|
+
} : Record<any, any>)>;
|
|
189
|
+
type ClientCapabilitiesEntity = {
|
|
190
|
+
requiresBotState?: boolean;
|
|
191
|
+
supportsListening?: boolean;
|
|
192
|
+
supportsTts?: boolean;
|
|
193
|
+
type: 'ClientCapabilities';
|
|
194
|
+
};
|
|
195
|
+
type Entity = ClientCapabilitiesEntity | {
|
|
196
|
+
type: string;
|
|
197
|
+
};
|
|
198
|
+
type ChannelAcount<Role extends SupportedRole> = {
|
|
199
|
+
id: string;
|
|
200
|
+
name?: string;
|
|
201
|
+
role: Role;
|
|
202
|
+
};
|
|
203
|
+
type EventActivityEssence = {
|
|
204
|
+
name: string;
|
|
205
|
+
type: 'event';
|
|
206
|
+
value?: any;
|
|
207
|
+
};
|
|
208
|
+
type MessageActivityEssence = {
|
|
209
|
+
attachmentLayout?: 'carousel' | 'stacked';
|
|
210
|
+
attachments?: DirectLineAttachment[];
|
|
211
|
+
channelData: {
|
|
212
|
+
streamId?: string;
|
|
213
|
+
streamSequence?: number;
|
|
214
|
+
streamType?: 'final';
|
|
215
|
+
};
|
|
216
|
+
inputHint?: 'accepting' | 'expecting' | 'ignoring';
|
|
217
|
+
locale?: string;
|
|
218
|
+
speak?: string;
|
|
219
|
+
suggestedActions?: DirectLineSuggestedAction;
|
|
220
|
+
text: string | undefined;
|
|
221
|
+
textFormat?: 'markdown' | 'plain' | 'xml';
|
|
222
|
+
type: 'message';
|
|
223
|
+
value?: any;
|
|
224
|
+
};
|
|
225
|
+
type TypingActivityEssence = {
|
|
226
|
+
attachmentLayout?: 'carousel' | 'stacked';
|
|
227
|
+
attachments?: DirectLineAttachment[];
|
|
228
|
+
text?: undefined;
|
|
229
|
+
type: 'typing';
|
|
230
|
+
} | {
|
|
231
|
+
attachmentLayout?: 'carousel' | 'stacked';
|
|
232
|
+
attachments?: DirectLineAttachment[];
|
|
233
|
+
channelData: {
|
|
234
|
+
streamId?: string | undefined;
|
|
235
|
+
streamSequence: number;
|
|
236
|
+
streamType: 'informative' | 'streaming' | 'final';
|
|
237
|
+
};
|
|
238
|
+
text?: string | undefined;
|
|
239
|
+
type: 'typing';
|
|
240
|
+
};
|
|
241
|
+
type TimestampFromServerEssence = {
|
|
242
|
+
id: string;
|
|
243
|
+
localTimestamp?: string;
|
|
244
|
+
timestamp: string;
|
|
245
|
+
};
|
|
246
|
+
type TimestampInTransitEssence = {
|
|
247
|
+
id?: string;
|
|
248
|
+
localTimestamp: string;
|
|
249
|
+
timestamp?: string;
|
|
250
|
+
};
|
|
251
|
+
type TimestampEssence<Role extends SupportedRole, SendStatus extends SupportedSendStatus | undefined> = Role extends 'user' ? SendStatus extends 'sending' | 'send failed' ? TimestampInTransitEssence : TimestampFromServerEssence : TimestampFromServerEssence;
|
|
252
|
+
type CoreActivityEssence<Role extends SupportedRole, SendStatus extends SupportedSendStatus | undefined, Type extends string = 'conversationUpdate' | 'event' | 'invoke' | 'message' | 'typing'> = {
|
|
253
|
+
channelData: ChannelData<SendStatus, Type>;
|
|
254
|
+
channelId?: string;
|
|
255
|
+
entities?: Entity[];
|
|
256
|
+
from: ChannelAcount<Role>;
|
|
257
|
+
localTimezone?: string;
|
|
258
|
+
replyToId?: string;
|
|
259
|
+
type: string;
|
|
260
|
+
} & TimestampEssence<Role, SendStatus> & (Type extends 'event' ? EventActivityEssence : Type extends 'message' ? MessageActivityEssence : Type extends 'typing' ? TypingActivityEssence : {
|
|
261
|
+
type: Type;
|
|
262
|
+
});
|
|
263
|
+
type OthersActivity = CoreActivityEssence<'bot' | 'channel', undefined>;
|
|
264
|
+
type SelfActivitySendFailed = CoreActivityEssence<'user', 'send failed'>;
|
|
265
|
+
type SelfActivitySending = CoreActivityEssence<'user', 'sending'>;
|
|
266
|
+
type SelfActivitySent = CoreActivityEssence<'user', 'sent'>;
|
|
267
|
+
type SelfActivity = SelfActivitySendFailed | SelfActivitySending | SelfActivitySent;
|
|
268
|
+
type WebChatActivity = SelfActivity | OthersActivity;
|
|
269
|
+
|
|
270
|
+
export { LocalIdSchema as a, getLocalIdFromActivity as g };
|
|
271
|
+
export type { Activity as A, DirectLineCardAction as D, LocalId as L, WebChatActivity as W, DirectLineAttachment as b, DirectLineSuggestedAction as c };
|