botframework-webchat-core 4.17.1 → 4.18.1-hotfix.20260127.b53acdf

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.
Files changed (368) hide show
  1. package/dist/botframework-webchat-core.d.mts +170 -135
  2. package/dist/botframework-webchat-core.d.ts +959 -0
  3. package/dist/botframework-webchat-core.js +3 -0
  4. package/dist/botframework-webchat-core.js.LEGAL.txt +1 -0
  5. package/dist/botframework-webchat-core.js.map +1 -0
  6. package/dist/botframework-webchat-core.mjs +1 -1
  7. package/dist/botframework-webchat-core.mjs.LEGAL.txt +1 -0
  8. package/dist/botframework-webchat-core.mjs.map +1 -1
  9. package/dist/metafile-cjs.json +1 -0
  10. package/dist/metafile-esm.json +1 -1
  11. package/package.json +43 -52
  12. package/src/__tests__/detectSlowConnectionSaga.spec.js +1 -1
  13. package/src/actions/{clearSuggestedActions.js → clearSuggestedActions.ts} +1 -1
  14. package/src/actions/setSuggestedActions.ts +18 -0
  15. package/src/actions/{submitSendBox.js → submitSendBox.ts} +1 -1
  16. package/src/createPromiseQueue.js +8 -6
  17. package/src/createReducer.ts +2 -0
  18. package/src/createStore.ts +1 -1
  19. package/src/index.ts +8 -2
  20. package/src/reducers/createActivitiesReducer.ts +87 -28
  21. package/src/reducers/private/findBeforeAfter.spec.ts +90 -0
  22. package/src/reducers/private/findBeforeAfter.ts +30 -0
  23. package/src/reducers/suggestedActions.js +1 -1
  24. package/src/reducers/suggestedActionsOriginActivity.ts +33 -0
  25. package/src/sagas/queueIncomingActivitySaga.ts +10 -4
  26. package/src/sagas/speakActivityAndStartDictateOnIncomingActivityFromOthersSaga.js +10 -4
  27. package/src/sagas/startDictateOnSpeakCompleteSaga.js +3 -3
  28. package/src/sagas/startSpeakActivityOnPostActivitySaga.js +15 -5
  29. package/src/sagas/stopDictateOnCardActionSaga.js +11 -3
  30. package/src/sagas/stopSpeakingActivityOnInputSaga.js +22 -4
  31. package/src/tsconfig.json +2 -8
  32. package/src/types/WebChatActivity.ts +46 -5
  33. package/src/types/external/DirectLineActivity.ts +1 -1
  34. package/src/types/external/OrgSchema/Action.ts +6 -8
  35. package/src/types/external/OrgSchema/CreativeWork.ts +25 -3
  36. package/src/types/external/OrgSchema/Thing.ts +15 -18
  37. package/src/types/external/OrgSchema/private/orgSchemaProperties.ts +11 -7
  38. package/src/types/external/OrgSchema/private/orgSchemaProperty.ts +14 -3
  39. package/src/types/internal/WebChatOutgoingActivity.ts +1 -1
  40. package/src/utils/dateToLocaleISOString.chatham.spec.js +0 -1
  41. package/src/utils/dateToLocaleISOString.japan.spec.js +0 -1
  42. package/src/utils/dateToLocaleISOString.newfoundland.spec.js +0 -1
  43. package/src/utils/dateToLocaleISOString.pacific.spec.js +0 -1
  44. package/src/utils/dateToLocaleISOString.utc.spec.js +0 -2
  45. package/src/utils/getActivityLivestreamingMetadata.spec.ts +153 -0
  46. package/src/utils/getActivityLivestreamingMetadata.ts +135 -0
  47. package/src/utils/getOrgSchemaMessage.ts +3 -3
  48. package/src/utils/onErrorResumeNext.ts +1 -1
  49. package/lib/actions/clearSuggestedActions.js +0 -15
  50. package/lib/actions/connect.js +0 -33
  51. package/lib/actions/connectionStatusUpdate.js +0 -20
  52. package/lib/actions/deleteActivity.d.ts +0 -13
  53. package/lib/actions/deleteActivity.d.ts.map +0 -1
  54. package/lib/actions/deleteActivity.js +0 -19
  55. package/lib/actions/disconnect.js +0 -21
  56. package/lib/actions/dismissNotification.d.ts +0 -12
  57. package/lib/actions/dismissNotification.d.ts.map +0 -1
  58. package/lib/actions/dismissNotification.js +0 -19
  59. package/lib/actions/emitTypingIndicator.js +0 -15
  60. package/lib/actions/incomingActivity.d.ts +0 -14
  61. package/lib/actions/incomingActivity.d.ts.map +0 -1
  62. package/lib/actions/incomingActivity.js +0 -19
  63. package/lib/actions/markActivity.d.ts +0 -17
  64. package/lib/actions/markActivity.d.ts.map +0 -1
  65. package/lib/actions/markActivity.js +0 -22
  66. package/lib/actions/postActivity.d.ts +0 -64
  67. package/lib/actions/postActivity.d.ts.map +0 -1
  68. package/lib/actions/postActivity.js +0 -31
  69. package/lib/actions/queueIncomingActivity.js +0 -18
  70. package/lib/actions/reconnect.js +0 -17
  71. package/lib/actions/sagaError.d.ts +0 -8
  72. package/lib/actions/sagaError.d.ts.map +0 -1
  73. package/lib/actions/sagaError.js +0 -15
  74. package/lib/actions/sendEvent.js +0 -19
  75. package/lib/actions/sendFiles.d.ts +0 -19
  76. package/lib/actions/sendFiles.d.ts.map +0 -1
  77. package/lib/actions/sendFiles.js +0 -20
  78. package/lib/actions/sendMessage.d.ts +0 -19
  79. package/lib/actions/sendMessage.d.ts.map +0 -1
  80. package/lib/actions/sendMessage.js +0 -24
  81. package/lib/actions/sendMessageBack.js +0 -20
  82. package/lib/actions/sendPostBack.js +0 -18
  83. package/lib/actions/setClockSkewAdjustment.js +0 -12
  84. package/lib/actions/setDictateInterims.js +0 -18
  85. package/lib/actions/setDictateState.js +0 -18
  86. package/lib/actions/setLanguage.js +0 -18
  87. package/lib/actions/setNotification.d.ts +0 -10
  88. package/lib/actions/setNotification.d.ts.map +0 -1
  89. package/lib/actions/setNotification.js +0 -37
  90. package/lib/actions/setReferenceGrammarID.js +0 -18
  91. package/lib/actions/setSendBox.js +0 -18
  92. package/lib/actions/setSendBoxAttachments.d.ts +0 -13
  93. package/lib/actions/setSendBoxAttachments.d.ts.map +0 -1
  94. package/lib/actions/setSendBoxAttachments.js +0 -18
  95. package/lib/actions/setSendTimeout.js +0 -18
  96. package/lib/actions/setSendTypingIndicator.d.ts +0 -11
  97. package/lib/actions/setSendTypingIndicator.d.ts.map +0 -1
  98. package/lib/actions/setSendTypingIndicator.js +0 -18
  99. package/lib/actions/setSuggestedActions.js +0 -20
  100. package/lib/actions/startDictate.js +0 -15
  101. package/lib/actions/startSpeakingActivity.js +0 -15
  102. package/lib/actions/stopDictate.js +0 -15
  103. package/lib/actions/stopSpeakingActivity.js +0 -15
  104. package/lib/actions/submitSendBox.js +0 -22
  105. package/lib/actions/updateConnectionStatus.js +0 -18
  106. package/lib/constants/ActivityClientState.js +0 -16
  107. package/lib/constants/DictateState.js +0 -17
  108. package/lib/createPromiseQueue.js +0 -30
  109. package/lib/createReducer.d.ts +0 -60
  110. package/lib/createReducer.d.ts.map +0 -1
  111. package/lib/createReducer.js +0 -45
  112. package/lib/createSagas.d.ts +0 -8
  113. package/lib/createSagas.d.ts.map +0 -1
  114. package/lib/createSagas.js +0 -112
  115. package/lib/createStore.d.ts +0 -43
  116. package/lib/createStore.d.ts.map +0 -1
  117. package/lib/createStore.js +0 -131
  118. package/lib/definitions/activityFromBot.js +0 -11
  119. package/lib/definitions/speakableActivity.js +0 -10
  120. package/lib/definitions/speakingActivity.js +0 -13
  121. package/lib/index.d.ts +0 -76
  122. package/lib/index.d.ts.map +0 -1
  123. package/lib/index.js +0 -309
  124. package/lib/reducers/connectivityStatus.js +0 -49
  125. package/lib/reducers/createActivitiesReducer.d.ts +0 -12
  126. package/lib/reducers/createActivitiesReducer.d.ts.map +0 -1
  127. package/lib/reducers/createActivitiesReducer.js +0 -227
  128. package/lib/reducers/createInternalReducer.d.ts +0 -10
  129. package/lib/reducers/createInternalReducer.d.ts.map +0 -1
  130. package/lib/reducers/createInternalReducer.js +0 -19
  131. package/lib/reducers/createNotificationsReducer.d.ts +0 -11
  132. package/lib/reducers/createNotificationsReducer.d.ts.map +0 -1
  133. package/lib/reducers/createNotificationsReducer.js +0 -55
  134. package/lib/reducers/createTypingReducer.d.ts +0 -14
  135. package/lib/reducers/createTypingReducer.d.ts.map +0 -1
  136. package/lib/reducers/createTypingReducer.js +0 -50
  137. package/lib/reducers/dictateInterims.js +0 -23
  138. package/lib/reducers/dictateState.js +0 -38
  139. package/lib/reducers/language.js +0 -23
  140. package/lib/reducers/readyState.js +0 -23
  141. package/lib/reducers/referenceGrammarID.js +0 -23
  142. package/lib/reducers/sendBoxAttachments.d.ts +0 -9
  143. package/lib/reducers/sendBoxAttachments.d.ts.map +0 -1
  144. package/lib/reducers/sendBoxAttachments.js +0 -23
  145. package/lib/reducers/sendBoxValue.js +0 -23
  146. package/lib/reducers/sendTimeout.js +0 -23
  147. package/lib/reducers/sendTypingIndicator.js +0 -23
  148. package/lib/reducers/shouldSpeakIncomingActivity.js +0 -25
  149. package/lib/reducers/suggestedActions.js +0 -32
  150. package/lib/sagas/clearSuggestedActionsOnPostActivitySaga.js +0 -62
  151. package/lib/sagas/connectSaga.js +0 -445
  152. package/lib/sagas/connectionStatusToNotificationSaga.js +0 -107
  153. package/lib/sagas/connectionStatusUpdateSaga.js +0 -63
  154. package/lib/sagas/detectSlowConnectionSaga.d.ts +0 -5
  155. package/lib/sagas/detectSlowConnectionSaga.d.ts.map +0 -1
  156. package/lib/sagas/detectSlowConnectionSaga.js +0 -50
  157. package/lib/sagas/effects/forever.js +0 -19
  158. package/lib/sagas/effects/forkPut.js +0 -51
  159. package/lib/sagas/effects/observeEach.js +0 -45
  160. package/lib/sagas/effects/observeOnce.d.ts +0 -3
  161. package/lib/sagas/effects/observeOnce.d.ts.map +0 -1
  162. package/lib/sagas/effects/observeOnce.js +0 -42
  163. package/lib/sagas/effects/whileConnected.d.ts +0 -7
  164. package/lib/sagas/effects/whileConnected.d.ts.map +0 -1
  165. package/lib/sagas/effects/whileConnected.js +0 -55
  166. package/lib/sagas/emitTypingIndicatorToPostActivitySaga.js +0 -63
  167. package/lib/sagas/markAllAsSpokenOnStopSpeakActivitySaga.js +0 -78
  168. package/lib/sagas/observeActivitySaga.d.ts +0 -2
  169. package/lib/sagas/observeActivitySaga.d.ts.map +0 -1
  170. package/lib/sagas/observeActivitySaga.js +0 -117
  171. package/lib/sagas/postActivitySaga.d.ts +0 -3
  172. package/lib/sagas/postActivitySaga.d.ts.map +0 -1
  173. package/lib/sagas/postActivitySaga.js +0 -264
  174. package/lib/sagas/queueIncomingActivitySaga.d.ts +0 -3
  175. package/lib/sagas/queueIncomingActivitySaga.d.ts.map +0 -1
  176. package/lib/sagas/queueIncomingActivitySaga.js +0 -197
  177. package/lib/sagas/sendEventToPostActivitySaga.js +0 -68
  178. package/lib/sagas/sendFilesToPostActivitySaga.js +0 -85
  179. package/lib/sagas/sendMessageBackToPostActivitySaga.js +0 -70
  180. package/lib/sagas/sendMessageToPostActivitySaga.d.ts +0 -2
  181. package/lib/sagas/sendMessageToPostActivitySaga.d.ts.map +0 -1
  182. package/lib/sagas/sendMessageToPostActivitySaga.js +0 -91
  183. package/lib/sagas/sendPostBackToPostActivitySaga.js +0 -69
  184. package/lib/sagas/sendTypingIndicatorOnSetSendBoxSaga.d.ts +0 -3
  185. package/lib/sagas/sendTypingIndicatorOnSetSendBoxSaga.d.ts.map +0 -1
  186. package/lib/sagas/sendTypingIndicatorOnSetSendBoxSaga.js +0 -145
  187. package/lib/sagas/speakActivityAndStartDictateOnIncomingActivityFromOthersSaga.js +0 -106
  188. package/lib/sagas/startDictateOnSpeakCompleteSaga.js +0 -65
  189. package/lib/sagas/startSpeakActivityOnPostActivitySaga.js +0 -62
  190. package/lib/sagas/stopDictateOnCardActionSaga.js +0 -65
  191. package/lib/sagas/stopSpeakingActivityOnInputSaga.js +0 -68
  192. package/lib/sagas/submitSendBoxSaga.js +0 -84
  193. package/lib/selectors/activities.d.ts +0 -9
  194. package/lib/selectors/activities.d.ts.map +0 -1
  195. package/lib/selectors/activities.js +0 -33
  196. package/lib/selectors/combineSelectors.js +0 -31
  197. package/lib/selectors/dictateState.js +0 -12
  198. package/lib/selectors/language.d.ts +0 -4
  199. package/lib/selectors/language.d.ts.map +0 -1
  200. package/lib/selectors/language.js +0 -12
  201. package/lib/selectors/notifications.js +0 -13
  202. package/lib/selectors/sendBoxAttachments.js +0 -11
  203. package/lib/selectors/sendBoxValue.js +0 -12
  204. package/lib/selectors/sendTimeout.d.ts +0 -4
  205. package/lib/selectors/sendTimeout.d.ts.map +0 -1
  206. package/lib/selectors/sendTimeout.js +0 -12
  207. package/lib/selectors/sendTypingIndicator.d.ts +0 -4
  208. package/lib/selectors/sendTypingIndicator.d.ts.map +0 -1
  209. package/lib/selectors/sendTypingIndicator.js +0 -12
  210. package/lib/selectors/shouldSpeakIncomingActivity.js +0 -12
  211. package/lib/types/AnyAnd.d.ts +0 -2
  212. package/lib/types/AnyAnd.d.ts.map +0 -1
  213. package/lib/types/AnyAnd.js +0 -6
  214. package/lib/types/GlobalScopePonyfill.d.ts +0 -8
  215. package/lib/types/GlobalScopePonyfill.d.ts.map +0 -1
  216. package/lib/types/GlobalScopePonyfill.js +0 -6
  217. package/lib/types/OneOrMany.d.ts +0 -3
  218. package/lib/types/OneOrMany.d.ts.map +0 -1
  219. package/lib/types/OneOrMany.js +0 -6
  220. package/lib/types/SendBoxAttachment.d.ts +0 -5
  221. package/lib/types/SendBoxAttachment.d.ts.map +0 -1
  222. package/lib/types/SendBoxAttachment.js +0 -6
  223. package/lib/types/WebChatActivity.d.ts +0 -101
  224. package/lib/types/WebChatActivity.d.ts.map +0 -1
  225. package/lib/types/WebChatActivity.js +0 -6
  226. package/lib/types/external/DirectLineActivity.d.ts +0 -3
  227. package/lib/types/external/DirectLineActivity.d.ts.map +0 -1
  228. package/lib/types/external/DirectLineActivity.js +0 -6
  229. package/lib/types/external/DirectLineAnimationCard.d.ts +0 -6
  230. package/lib/types/external/DirectLineAnimationCard.d.ts.map +0 -1
  231. package/lib/types/external/DirectLineAnimationCard.js +0 -6
  232. package/lib/types/external/DirectLineAttachment.d.ts +0 -9
  233. package/lib/types/external/DirectLineAttachment.d.ts.map +0 -1
  234. package/lib/types/external/DirectLineAttachment.js +0 -6
  235. package/lib/types/external/DirectLineAudioCard.d.ts +0 -6
  236. package/lib/types/external/DirectLineAudioCard.d.ts.map +0 -1
  237. package/lib/types/external/DirectLineAudioCard.js +0 -6
  238. package/lib/types/external/DirectLineBasicCardEssence.d.ts +0 -12
  239. package/lib/types/external/DirectLineBasicCardEssence.d.ts.map +0 -1
  240. package/lib/types/external/DirectLineBasicCardEssence.js +0 -6
  241. package/lib/types/external/DirectLineCardAction.d.ts +0 -110
  242. package/lib/types/external/DirectLineCardAction.d.ts.map +0 -1
  243. package/lib/types/external/DirectLineCardAction.js +0 -6
  244. package/lib/types/external/DirectLineCardImage.d.ts +0 -8
  245. package/lib/types/external/DirectLineCardImage.d.ts.map +0 -1
  246. package/lib/types/external/DirectLineCardImage.js +0 -6
  247. package/lib/types/external/DirectLineHeroCard.d.ts +0 -6
  248. package/lib/types/external/DirectLineHeroCard.d.ts.map +0 -1
  249. package/lib/types/external/DirectLineHeroCard.js +0 -6
  250. package/lib/types/external/DirectLineJSBotConnection.d.ts +0 -3
  251. package/lib/types/external/DirectLineJSBotConnection.d.ts.map +0 -1
  252. package/lib/types/external/DirectLineJSBotConnection.js +0 -6
  253. package/lib/types/external/DirectLineMediaCardEssence.d.ts +0 -21
  254. package/lib/types/external/DirectLineMediaCardEssence.d.ts.map +0 -1
  255. package/lib/types/external/DirectLineMediaCardEssence.js +0 -6
  256. package/lib/types/external/DirectLineOAuthCard.d.ts +0 -8
  257. package/lib/types/external/DirectLineOAuthCard.d.ts.map +0 -1
  258. package/lib/types/external/DirectLineOAuthCard.js +0 -6
  259. package/lib/types/external/DirectLineReceiptCard.d.ts +0 -28
  260. package/lib/types/external/DirectLineReceiptCard.d.ts.map +0 -1
  261. package/lib/types/external/DirectLineReceiptCard.js +0 -6
  262. package/lib/types/external/DirectLineSignInCard.d.ts +0 -8
  263. package/lib/types/external/DirectLineSignInCard.d.ts.map +0 -1
  264. package/lib/types/external/DirectLineSignInCard.js +0 -6
  265. package/lib/types/external/DirectLineSuggestedAction.d.ts +0 -7
  266. package/lib/types/external/DirectLineSuggestedAction.d.ts.map +0 -1
  267. package/lib/types/external/DirectLineSuggestedAction.js +0 -6
  268. package/lib/types/external/DirectLineThumbnailCard.d.ts +0 -6
  269. package/lib/types/external/DirectLineThumbnailCard.d.ts.map +0 -1
  270. package/lib/types/external/DirectLineThumbnailCard.js +0 -6
  271. package/lib/types/external/DirectLineVideoCard.d.ts +0 -6
  272. package/lib/types/external/DirectLineVideoCard.d.ts.map +0 -1
  273. package/lib/types/external/DirectLineVideoCard.js +0 -6
  274. package/lib/types/external/Observable.d.ts +0 -49
  275. package/lib/types/external/Observable.d.ts.map +0 -1
  276. package/lib/types/external/Observable.js +0 -6
  277. package/lib/types/external/OrgSchema/Action.d.ts +0 -29
  278. package/lib/types/external/OrgSchema/Action.d.ts.map +0 -1
  279. package/lib/types/external/OrgSchema/Action.js +0 -38
  280. package/lib/types/external/OrgSchema/Claim.d.ts +0 -35
  281. package/lib/types/external/OrgSchema/Claim.d.ts.map +0 -1
  282. package/lib/types/external/OrgSchema/Claim.js +0 -41
  283. package/lib/types/external/OrgSchema/CreativeWork.d.ts +0 -57
  284. package/lib/types/external/OrgSchema/CreativeWork.d.ts.map +0 -1
  285. package/lib/types/external/OrgSchema/CreativeWork.js +0 -52
  286. package/lib/types/external/OrgSchema/DefinedTerm.d.ts +0 -26
  287. package/lib/types/external/OrgSchema/DefinedTerm.d.ts.map +0 -1
  288. package/lib/types/external/OrgSchema/DefinedTerm.js +0 -33
  289. package/lib/types/external/OrgSchema/Project.d.ts +0 -20
  290. package/lib/types/external/OrgSchema/Project.d.ts.map +0 -1
  291. package/lib/types/external/OrgSchema/Project.js +0 -32
  292. package/lib/types/external/OrgSchema/Thing.d.ts +0 -53
  293. package/lib/types/external/OrgSchema/Thing.d.ts.map +0 -1
  294. package/lib/types/external/OrgSchema/Thing.js +0 -54
  295. package/lib/types/external/OrgSchema/VoteAction.d.ts +0 -22
  296. package/lib/types/external/OrgSchema/VoteAction.d.ts.map +0 -1
  297. package/lib/types/external/OrgSchema/VoteAction.js +0 -34
  298. package/lib/types/external/OrgSchema/private/orgSchemaProperties.d.ts +0 -3
  299. package/lib/types/external/OrgSchema/private/orgSchemaProperties.d.ts.map +0 -1
  300. package/lib/types/external/OrgSchema/private/orgSchemaProperties.js +0 -22
  301. package/lib/types/external/OrgSchema/private/orgSchemaProperty.d.ts +0 -4
  302. package/lib/types/external/OrgSchema/private/orgSchemaProperty.d.ts.map +0 -1
  303. package/lib/types/external/OrgSchema/private/orgSchemaProperty.js +0 -15
  304. package/lib/types/internal/GlobalScopeClock.d.ts +0 -15
  305. package/lib/types/internal/GlobalScopeClock.d.ts.map +0 -1
  306. package/lib/types/internal/GlobalScopeClock.js +0 -6
  307. package/lib/types/internal/Notification.d.ts +0 -10
  308. package/lib/types/internal/Notification.d.ts.map +0 -1
  309. package/lib/types/internal/Notification.js +0 -6
  310. package/lib/types/internal/ReduxState.d.ts +0 -19
  311. package/lib/types/internal/ReduxState.d.ts.map +0 -1
  312. package/lib/types/internal/ReduxState.js +0 -6
  313. package/lib/types/internal/SendStatus.d.ts +0 -7
  314. package/lib/types/internal/SendStatus.d.ts.map +0 -1
  315. package/lib/types/internal/SendStatus.js +0 -19
  316. package/lib/types/internal/WebChatOutgoingActivity.d.ts +0 -49
  317. package/lib/types/internal/WebChatOutgoingActivity.d.ts.map +0 -1
  318. package/lib/types/internal/WebChatOutgoingActivity.js +0 -6
  319. package/lib/utils/dateToLocaleISOString.d.ts +0 -2
  320. package/lib/utils/dateToLocaleISOString.d.ts.map +0 -1
  321. package/lib/utils/dateToLocaleISOString.js +0 -52
  322. package/lib/utils/deleteKey.d.ts +0 -2
  323. package/lib/utils/deleteKey.d.ts.map +0 -1
  324. package/lib/utils/deleteKey.js +0 -30
  325. package/lib/utils/getOrgSchemaMessage.d.ts +0 -4
  326. package/lib/utils/getOrgSchemaMessage.d.ts.map +0 -1
  327. package/lib/utils/getOrgSchemaMessage.js +0 -21
  328. package/lib/utils/isForbiddenPropertyName.d.ts +0 -2
  329. package/lib/utils/isForbiddenPropertyName.d.ts.map +0 -1
  330. package/lib/utils/isForbiddenPropertyName.js +0 -16
  331. package/lib/utils/onErrorResumeNext.d.ts +0 -3
  332. package/lib/utils/onErrorResumeNext.d.ts.map +0 -1
  333. package/lib/utils/onErrorResumeNext.js +0 -19
  334. package/lib/utils/once.d.ts +0 -2
  335. package/lib/utils/once.d.ts.map +0 -1
  336. package/lib/utils/once.js +0 -16
  337. package/lib/utils/singleToArray.d.ts +0 -2
  338. package/lib/utils/singleToArray.d.ts.map +0 -1
  339. package/lib/utils/singleToArray.js +0 -10
  340. package/lib/utils/sleep.d.ts +0 -3
  341. package/lib/utils/sleep.d.ts.map +0 -1
  342. package/lib/utils/sleep.js +0 -12
  343. package/lib/utils/uniqueID.d.ts +0 -2
  344. package/lib/utils/uniqueID.d.ts.map +0 -1
  345. package/lib/utils/uniqueID.js +0 -14
  346. package/lib/utils/warnOnce.d.ts +0 -2
  347. package/lib/utils/warnOnce.d.ts.map +0 -1
  348. package/lib/utils/warnOnce.js +0 -14
  349. package/src/actions/setSuggestedActions.js +0 -12
  350. /package/src/actions/{connect.js → connect.ts} +0 -0
  351. /package/src/actions/{connectionStatusUpdate.js → connectionStatusUpdate.ts} +0 -0
  352. /package/src/actions/{disconnect.js → disconnect.ts} +0 -0
  353. /package/src/actions/{emitTypingIndicator.js → emitTypingIndicator.ts} +0 -0
  354. /package/src/actions/{queueIncomingActivity.js → queueIncomingActivity.ts} +0 -0
  355. /package/src/actions/{reconnect.js → reconnect.ts} +0 -0
  356. /package/src/actions/{sendEvent.js → sendEvent.ts} +0 -0
  357. /package/src/actions/{sendMessageBack.js → sendMessageBack.ts} +0 -0
  358. /package/src/actions/{sendPostBack.js → sendPostBack.ts} +0 -0
  359. /package/src/actions/{setDictateInterims.js → setDictateInterims.ts} +0 -0
  360. /package/src/actions/{setDictateState.js → setDictateState.ts} +0 -0
  361. /package/src/actions/{setLanguage.js → setLanguage.ts} +0 -0
  362. /package/src/actions/{setSendBox.js → setSendBox.ts} +0 -0
  363. /package/src/actions/{setSendTimeout.js → setSendTimeout.ts} +0 -0
  364. /package/src/actions/{startDictate.js → startDictate.ts} +0 -0
  365. /package/src/actions/{startSpeakingActivity.js → startSpeakingActivity.ts} +0 -0
  366. /package/src/actions/{stopDictate.js → stopDictate.ts} +0 -0
  367. /package/src/actions/{stopSpeakingActivity.js → stopSpeakingActivity.ts} +0 -0
  368. /package/src/actions/{updateConnectionStatus.js → updateConnectionStatus.ts} +0 -0
@@ -1,33 +1,26 @@
1
+ export { PromiseWithResolvers, withResolvers } from 'botframework-webchat-base/utils';
1
2
  import { Store } from 'redux';
2
3
 
3
- const CLEAR_SUGGESTED_ACTIONS = 'WEB_CHAT/CLEAR_SUGGESTED_ACTIONS';
4
-
5
- function clearSuggestedActions() {
6
- return {
7
- type: CLEAR_SUGGESTED_ACTIONS
8
- };
9
- }
10
-
11
- const CONNECT = 'DIRECT_LINE/CONNECT';
4
+ declare function clearSuggestedActions(): {
5
+ type: "WEB_CHAT/CLEAR_SUGGESTED_ACTIONS";
6
+ };
12
7
 
13
- function connect({ directLine, userID, username }) {
14
- return {
15
- type: CONNECT,
8
+ declare function connect({ directLine, userID, username }: {
9
+ directLine: any;
10
+ userID: any;
11
+ username: any;
12
+ }): {
13
+ type: string;
16
14
  payload: {
17
- directLine,
18
- userID,
19
- username
20
- }
21
- };
22
- }
23
-
24
- const DISCONNECT = 'DIRECT_LINE/DISCONNECT';
15
+ directLine: any;
16
+ userID: any;
17
+ username: any;
18
+ };
19
+ };
25
20
 
26
- function disconnect() {
27
- return {
28
- type: DISCONNECT
29
- };
30
- }
21
+ declare function disconnect(): {
22
+ type: string;
23
+ };
31
24
 
32
25
  declare const DISMISS_NOTIFICATION = "WEB_CHAT/DISMISS_NOTIFICATION";
33
26
  type DismissNotificationAction = {
@@ -38,13 +31,9 @@ type DismissNotificationAction = {
38
31
  };
39
32
  declare function dismissNotification(id: string): DismissNotificationAction;
40
33
 
41
- const EMIT_TYPING_INDICATOR = 'WEB_CHAT/EMIT_TYPING_INDICATOR';
42
-
43
- function emitTypingIndicator() {
44
- return {
45
- type: EMIT_TYPING_INDICATOR
46
- };
47
- }
34
+ declare function emitTypingIndicator(): {
35
+ type: string;
36
+ };
48
37
 
49
38
  type MarkActivityActionType = 'WEB_CHAT/MARK_ACTIVITY';
50
39
  type MarkActivityAction = {
@@ -189,6 +178,20 @@ type ChannelData<SendStatus extends SupportedSendStatus | undefined, Type extend
189
178
  attachmentSizes?: number[];
190
179
  clientActivityID?: string;
191
180
  'webchat:sequence-id': number;
181
+ webChat?: {
182
+ /**
183
+ * Time when the activity appear in chat history.
184
+ *
185
+ * Note: if the activity is updated, this value will also be updated.
186
+ */
187
+ receivedAt?: number;
188
+ /**
189
+ * Per-activity style options.
190
+ *
191
+ * New in 4.18.0.
192
+ */
193
+ styleOptions?: Record<string, boolean | number | null | string>;
194
+ };
192
195
  } & (SendStatus extends SupportedSendStatus ? {
193
196
  /**
194
197
  * @deprecated Since 4.15.3: Please use `channelData['webchat:send-status']` or `useSendStatusByActivityKey()` hook instead.
@@ -208,7 +211,7 @@ type ChannelData<SendStatus extends SupportedSendStatus | undefined, Type extend
208
211
  * For further details, please see [#4362](https://github.com/microsoft/BotFramework-WebChat/pull/4362).
209
212
  */
210
213
  'webchat:send-status': SendStatus;
211
- } : {}) & (Type extends 'message' ? {
214
+ } : Record<any, any>) & (Type extends 'message' ? {
212
215
  messageBack?: {
213
216
  displayText: string;
214
217
  };
@@ -216,7 +219,11 @@ type ChannelData<SendStatus extends SupportedSendStatus | undefined, Type extend
216
219
  speak?: boolean;
217
220
  speechSynthesisUtterance?: SpeechSynthesisUtterance;
218
221
  'webchat:fallback-text'?: string;
219
- } : {})>;
222
+ feedbackLoop?: {
223
+ type: 'default';
224
+ disclaimer?: string;
225
+ };
226
+ } : Record<any, any>)>;
220
227
  type ClientCapabilitiesEntity = {
221
228
  requiresBotState?: boolean;
222
229
  supportsListening?: boolean;
@@ -239,6 +246,11 @@ type EventActivityEssence = {
239
246
  type MessageActivityEssence = {
240
247
  attachmentLayout?: 'carousel' | 'stacked';
241
248
  attachments?: DirectLineAttachment[];
249
+ channelData: {
250
+ streamId?: string;
251
+ streamSequence?: number;
252
+ streamType?: 'final';
253
+ };
242
254
  inputHint?: 'accepting' | 'expecting' | 'ignoring';
243
255
  locale?: string;
244
256
  speak?: string;
@@ -249,6 +261,19 @@ type MessageActivityEssence = {
249
261
  value?: any;
250
262
  };
251
263
  type TypingActivityEssence = {
264
+ attachmentLayout?: 'carousel' | 'stacked';
265
+ attachments?: DirectLineAttachment[];
266
+ text?: undefined;
267
+ type: 'typing';
268
+ } | {
269
+ attachmentLayout?: 'carousel' | 'stacked';
270
+ attachments?: DirectLineAttachment[];
271
+ channelData: {
272
+ streamId?: string | undefined;
273
+ streamSequence: number;
274
+ streamType: 'informative' | 'streaming' | 'final';
275
+ };
276
+ text?: string | undefined;
252
277
  type: 'typing';
253
278
  };
254
279
  type TimestampFromServerEssence = {
@@ -292,14 +317,13 @@ type PostActivityAction = {
292
317
  };
293
318
  declare function postActivity(activity: WebChatActivity, method?: string): PostActivityAction;
294
319
 
295
- const SEND_EVENT = 'WEB_CHAT/SEND_EVENT';
296
-
297
- function sendEvent(name, value) {
298
- return {
299
- type: SEND_EVENT,
300
- payload: { name, value }
301
- };
302
- }
320
+ declare function sendEvent(name: any, value: any): {
321
+ type: string;
322
+ payload: {
323
+ name: any;
324
+ value: any;
325
+ };
326
+ };
303
327
 
304
328
  declare function sendFiles(files: readonly Readonly<{
305
329
  name: string;
@@ -339,50 +363,42 @@ declare function sendMessage(text: string | undefined, method: string | undefine
339
363
  };
340
364
  };
341
365
 
342
- const SEND_MESSAGE_BACK = 'WEB_CHAT/SEND_MESSAGE_BACK';
343
-
344
- function sendMessageback(value, text, displayText) {
345
- return {
346
- type: SEND_MESSAGE_BACK,
347
- payload: { displayText, text, value }
348
- };
349
- }
350
-
351
- const SEND_POST_BACK = 'WEB_CHAT/SEND_POST_BACK';
352
-
353
- function sendPostback(value) {
354
- return {
355
- type: SEND_POST_BACK,
356
- payload: { value }
357
- };
358
- }
359
-
360
- const SET_DICTATE_INTERIMS = 'WEB_CHAT/SET_DICTATE_INTERIMS';
361
-
362
- function setDictateInterims(dictateInterims) {
363
- return {
364
- type: SET_DICTATE_INTERIMS,
365
- payload: { dictateInterims }
366
- };
367
- }
366
+ declare function sendMessageback(value: any, text: any, displayText: any): {
367
+ type: string;
368
+ payload: {
369
+ displayText: any;
370
+ text: any;
371
+ value: any;
372
+ };
373
+ };
368
374
 
369
- const SET_DICTATE_STATE = 'WEB_CHAT/SET_DICTATE_STATE';
375
+ declare function sendPostback(value: any): {
376
+ type: string;
377
+ payload: {
378
+ value: any;
379
+ };
380
+ };
370
381
 
371
- function setDictateState(dictateState) {
372
- return {
373
- type: SET_DICTATE_STATE,
374
- payload: { dictateState }
375
- };
376
- }
382
+ declare function setDictateInterims(dictateInterims: any): {
383
+ type: string;
384
+ payload: {
385
+ dictateInterims: any;
386
+ };
387
+ };
377
388
 
378
- const SET_LANGUAGE = 'WEB_CHAT/SET_LANGUAGE';
389
+ declare function setDictateState(dictateState: any): {
390
+ type: string;
391
+ payload: {
392
+ dictateState: any;
393
+ };
394
+ };
379
395
 
380
- function setLanguage(language) {
381
- return {
382
- type: SET_LANGUAGE,
383
- payload: { language }
384
- };
385
- }
396
+ declare function setLanguage(language: any): {
397
+ type: string;
398
+ payload: {
399
+ language: any;
400
+ };
401
+ };
386
402
 
387
403
  type Notification = {
388
404
  alt: string;
@@ -400,14 +416,12 @@ type SetNotificationAction = {
400
416
  };
401
417
  declare function setNotification({ alt, data, id, level, message }: Omit<Notification, 'timestamp'>): SetNotificationAction;
402
418
 
403
- const SET_SEND_BOX = 'WEB_CHAT/SET_SEND_BOX';
404
-
405
- function setSendBox(text) {
406
- return {
407
- type: SET_SEND_BOX,
408
- payload: { text }
409
- };
410
- }
419
+ declare function setSendBox(text: any): {
420
+ type: string;
421
+ payload: {
422
+ text: any;
423
+ };
424
+ };
411
425
 
412
426
  declare function setSendBoxAttachments(attachments: readonly SendBoxAttachment[]): {
413
427
  type: string;
@@ -419,14 +433,12 @@ declare function setSendBoxAttachments(attachments: readonly SendBoxAttachment[]
419
433
  };
420
434
  };
421
435
 
422
- const SET_SEND_TIMEOUT = 'WEB_CHAT/SET_SEND_TIMEOUT';
423
-
424
- function setSendTimeout(sendTimeout) {
425
- return {
426
- type: SET_SEND_TIMEOUT,
427
- payload: { sendTimeout }
428
- };
429
- }
436
+ declare function setSendTimeout(sendTimeout: any): {
437
+ type: string;
438
+ payload: {
439
+ sendTimeout: any;
440
+ };
441
+ };
430
442
 
431
443
  declare const SET_SEND_TYPING_INDICATOR = "WEB_CHAT/SET_SEND_TYPING_INDICATOR";
432
444
  type SetSendTypingIndicatorAction = {
@@ -437,42 +449,31 @@ type SetSendTypingIndicatorAction = {
437
449
  };
438
450
  declare function setSendTypingIndicator(value: any): SetSendTypingIndicatorAction;
439
451
 
440
- const START_DICTATE = 'WEB_CHAT/START_DICTATE';
441
-
442
- function startDictate() {
443
- return { type: START_DICTATE };
444
- }
445
-
446
- const START_SPEAKING_ACTIVITY = 'WEB_CHAT/START_SPEAKING';
447
-
448
- function startSpeakingActivity() {
449
- return {
450
- type: START_SPEAKING_ACTIVITY
451
- };
452
- }
453
-
454
- const STOP_DICTATE = 'WEB_CHAT/STOP_DICTATE';
455
-
456
- function stopDictate() {
457
- return { type: STOP_DICTATE };
458
- }
452
+ declare function startDictate(): {
453
+ type: string;
454
+ };
459
455
 
460
- const STOP_SPEAKING_ACTIVITY = 'WEB_CHAT/STOP_SPEAKING';
456
+ declare function startSpeakingActivity(): {
457
+ type: string;
458
+ };
461
459
 
462
- function stopSpeakingActivity() {
463
- return {
464
- type: STOP_SPEAKING_ACTIVITY
465
- };
466
- }
460
+ declare function stopDictate(): {
461
+ type: string;
462
+ };
467
463
 
468
- const SUBMIT_SEND_BOX = 'WEB_CHAT/SUBMIT_SEND_BOX';
464
+ declare function stopSpeakingActivity(): {
465
+ type: string;
466
+ };
469
467
 
470
- function submitSendBox(method = 'keyboard', { channelData } = {}) {
471
- return {
472
- type: SUBMIT_SEND_BOX,
473
- payload: { channelData, method }
474
- };
475
- }
468
+ declare function submitSendBox(method?: string, { channelData }?: {
469
+ channelData: any;
470
+ }): {
471
+ type: string;
472
+ payload: {
473
+ channelData: any;
474
+ method: string;
475
+ };
476
+ };
476
477
 
477
478
  type GlobalScopeClock = {
478
479
  cancelAnimationFrame?: typeof cancelAnimationFrame;
@@ -619,7 +620,7 @@ type Action = Thing & {
619
620
  *
620
621
  * @see https://schema.org/actionStatus
621
622
  */
622
- actionStatus?: 'ActiveActionStatus' | 'CompletedActionStatu' | 'FailedActionStatus' | 'PotentialActionStatus' | undefined;
623
+ actionStatus?: 'ActiveActionStatus' | 'CompletedActionStatus' | 'FailedActionStatus' | 'PotentialActionStatus' | undefined;
623
624
  /**
624
625
  * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. Supersedes [carrier](https://schema.org/carrier).
625
626
  *
@@ -671,13 +672,17 @@ type CreativeWork = Thing & {
671
672
  *
672
673
  * @see https://schema.org/author
673
674
  */
674
- author?: string | undefined;
675
+ author?: Person | string | undefined;
675
676
  /**
676
677
  * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc.
677
678
  *
678
679
  * @see https://schema.org/citation
679
680
  */
680
681
  citation?: readonly CreativeWork[] | undefined;
682
+ /**
683
+ * The schema.org [isBasedOn](https://schema.org/isBasedOn) property provides a resource from which this work is derived or from which it is a modification or adaptation.
684
+ */
685
+ isBasedOn?: CreativeWork | undefined;
681
686
  /**
682
687
  * Keywords or tags used to describe some item. Multiple textual entries in a keywords list are typically delimited by commas, or by repeating the property.
683
688
  *
@@ -703,6 +708,12 @@ type CreativeWork = Thing & {
703
708
  */
704
709
  usageInfo?: CreativeWork | undefined;
705
710
  };
711
+ type Person = {
712
+ '@type': 'Person';
713
+ description?: string | undefined;
714
+ image?: string | undefined;
715
+ name?: string | undefined;
716
+ };
706
717
  declare const parseCreativeWork: (data: unknown) => CreativeWork;
707
718
 
708
719
  /**
@@ -755,7 +766,31 @@ type VoteAction = Action & {
755
766
  };
756
767
  declare const parseVoteAction: (data: unknown) => VoteAction;
757
768
 
758
- declare function getOrgSchemaMessage(graph: readonly WebChatActivity['entities'][0][]): CreativeWork | undefined;
769
+ /**
770
+ * Gets the livestreaming metadata of the activity, or `undefined` if the activity is not participating in a livestreaming session.
771
+ *
772
+ * - `sessionId` - ID of the livestreaming session
773
+ * - `sequenceNumber` - sequence number of the activity
774
+ * - `type`
775
+ * - `"contentless"` - ongoing but no content, should show indicator
776
+ * - `"interim activity"` - current response, could be partial-from-start, or complete response.
777
+ * More activities are expected. Future interim activities always replace past interim activities, enable erasing or backtracking response.
778
+ * - `"informative message"` - optional side-channel informative message describing the current response, e.g. "Searching your document library".
779
+ * Always replace past informative messages. May interleave with interim activities.
780
+ * - `"final activity"` - complete-and-final response, always replace past interim activities and remove all informative messages.
781
+ * This activity indicates end of the session, all future activities must be ignored.
782
+ * - `undefined` - not part of a livestream session or the activity is not valid
783
+ *
784
+ * @returns {object} Livestreaming metadata of the activity, or `undefined` if the activity is not participating in a livestreaming session.
785
+ */
786
+ declare function getActivityLivestreamingMetadata(activity: WebChatActivity): Readonly<{
787
+ sessionId: string;
788
+ sequenceNumber: number;
789
+ type: 'contentless' | 'final activity' | 'informative message' | 'interim activity';
790
+ }> | undefined;
791
+
792
+ type EntityType = NonNullable<WebChatActivity['entities']>[number];
793
+ declare function getOrgSchemaMessage(graph: readonly EntityType[]): CreativeWork | undefined;
759
794
 
760
795
  declare function isForbiddenPropertyName(propertyName: string): boolean;
761
796
 
@@ -766,7 +801,7 @@ declare function singleToArray<T>(singleOrArray: T | T[]): T[];
766
801
 
767
802
  declare function warnOnce(message: string): () => void;
768
803
 
769
- type DirectLineActivity = Exclude<any, [] | boolean | Function | number | string>;
804
+ type DirectLineActivity = Exclude<any, [] | boolean | ((...args: unknown[]) => unknown) | number | string>;
770
805
 
771
806
  type DirectLineMediaCardEssence = {
772
807
  aspect?: '4:3' | '16:9';
@@ -921,4 +956,4 @@ declare const buildInfo: {
921
956
  version: string;
922
957
  };
923
958
 
924
- export { Constants, type DirectLineActivity, type DirectLineAnimationCard, type DirectLineAttachment, type DirectLineAudioCard, type DirectLineCardAction, type DirectLineHeroCard, type DirectLineJSBotConnection, type DirectLineOAuthCard, type DirectLineReceiptCard, type DirectLineSignInCard, type DirectLineSuggestedAction, type DirectLineThumbnailCard, type DirectLineVideoCard, type GlobalScopePonyfill, Observable, type OneOrMany, type Action as OrgSchemaAction, type Claim as OrgSchemaClaim, type CreativeWork as OrgSchemaCreativeWork, type DefinedTerm as OrgSchemaDefinedTerm, type Project as OrgSchemaProject, type Thing as OrgSchemaThing, type SendBoxAttachment, type WebChatActivity, buildInfo, clearSuggestedActions, connect, createStore, withDevTools as createStoreWithDevTools, withOptions as createStoreWithOptions, disconnect, dismissNotification, emitTypingIndicator, getOrgSchemaMessage, isForbiddenPropertyName, markActivity, moduleFormat, onErrorResumeNext, parseAction, parseClaim, parseCreativeWork, parseDefinedTerm, parseProject, parseThing, parseVoteAction, postActivity, sendEvent, sendFiles, sendMessage, sendMessageback as sendMessageBack, sendPostback as sendPostBack, setDictateInterims, setDictateState, setLanguage, setNotification, setSendBox, setSendBoxAttachments, setSendTimeout, setSendTypingIndicator, singleToArray, startDictate, startSpeakingActivity, stopDictate, stopSpeakingActivity, submitSendBox, version, warnOnce };
959
+ export { Constants, type DirectLineActivity, type DirectLineAnimationCard, type DirectLineAttachment, type DirectLineAudioCard, type DirectLineCardAction, type DirectLineHeroCard, type DirectLineJSBotConnection, type DirectLineOAuthCard, type DirectLineReceiptCard, type DirectLineSignInCard, type DirectLineSuggestedAction, type DirectLineThumbnailCard, type DirectLineVideoCard, type GlobalScopePonyfill, Observable, type OneOrMany, type Action as OrgSchemaAction, type Claim as OrgSchemaClaim, type CreativeWork as OrgSchemaCreativeWork, type DefinedTerm as OrgSchemaDefinedTerm, type Project as OrgSchemaProject, type Thing as OrgSchemaThing, type SendBoxAttachment, type WebChatActivity, buildInfo, clearSuggestedActions, connect, createStore, withDevTools as createStoreWithDevTools, withOptions as createStoreWithOptions, disconnect, dismissNotification, emitTypingIndicator, getActivityLivestreamingMetadata, getOrgSchemaMessage, isForbiddenPropertyName, markActivity, moduleFormat, onErrorResumeNext, parseAction, parseClaim, parseCreativeWork, parseDefinedTerm, parseProject, parseThing, parseVoteAction, postActivity, sendEvent, sendFiles, sendMessage, sendMessageback as sendMessageBack, sendPostback as sendPostBack, setDictateInterims, setDictateState, setLanguage, setNotification, setSendBox, setSendBoxAttachments, setSendTimeout, setSendTypingIndicator, singleToArray, startDictate, startSpeakingActivity, stopDictate, stopSpeakingActivity, submitSendBox, version, warnOnce };