botframework-webchat-core 4.18.0 → 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 (369) hide show
  1. package/dist/botframework-webchat-core.d.mts +146 -138
  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 +31 -11
  21. package/src/reducers/suggestedActions.js +1 -1
  22. package/src/reducers/suggestedActionsOriginActivity.ts +33 -0
  23. package/src/sagas/queueIncomingActivitySaga.ts +10 -4
  24. package/src/sagas/speakActivityAndStartDictateOnIncomingActivityFromOthersSaga.js +10 -4
  25. package/src/sagas/startDictateOnSpeakCompleteSaga.js +3 -3
  26. package/src/sagas/startSpeakActivityOnPostActivitySaga.js +15 -5
  27. package/src/sagas/stopDictateOnCardActionSaga.js +11 -3
  28. package/src/sagas/stopSpeakingActivityOnInputSaga.js +22 -4
  29. package/src/tsconfig.json +2 -8
  30. package/src/types/WebChatActivity.ts +15 -5
  31. package/src/types/external/DirectLineActivity.ts +1 -1
  32. package/src/types/external/OrgSchema/Action.ts +6 -8
  33. package/src/types/external/OrgSchema/CreativeWork.ts +25 -3
  34. package/src/types/external/OrgSchema/Thing.ts +15 -18
  35. package/src/types/external/OrgSchema/private/orgSchemaProperties.ts +11 -7
  36. package/src/types/external/OrgSchema/private/orgSchemaProperty.ts +14 -3
  37. package/src/types/internal/WebChatOutgoingActivity.ts +1 -1
  38. package/src/utils/dateToLocaleISOString.chatham.spec.js +0 -1
  39. package/src/utils/dateToLocaleISOString.japan.spec.js +0 -1
  40. package/src/utils/dateToLocaleISOString.newfoundland.spec.js +0 -1
  41. package/src/utils/dateToLocaleISOString.pacific.spec.js +0 -1
  42. package/src/utils/dateToLocaleISOString.utc.spec.js +0 -2
  43. package/src/utils/getActivityLivestreamingMetadata.spec.ts +153 -0
  44. package/src/utils/getActivityLivestreamingMetadata.ts +135 -0
  45. package/src/utils/getOrgSchemaMessage.ts +3 -3
  46. package/src/utils/onErrorResumeNext.ts +1 -1
  47. package/lib/actions/clearSuggestedActions.js +0 -15
  48. package/lib/actions/connect.js +0 -33
  49. package/lib/actions/connectionStatusUpdate.js +0 -20
  50. package/lib/actions/deleteActivity.d.ts +0 -13
  51. package/lib/actions/deleteActivity.d.ts.map +0 -1
  52. package/lib/actions/deleteActivity.js +0 -19
  53. package/lib/actions/disconnect.js +0 -21
  54. package/lib/actions/dismissNotification.d.ts +0 -12
  55. package/lib/actions/dismissNotification.d.ts.map +0 -1
  56. package/lib/actions/dismissNotification.js +0 -19
  57. package/lib/actions/emitTypingIndicator.js +0 -15
  58. package/lib/actions/incomingActivity.d.ts +0 -14
  59. package/lib/actions/incomingActivity.d.ts.map +0 -1
  60. package/lib/actions/incomingActivity.js +0 -19
  61. package/lib/actions/markActivity.d.ts +0 -17
  62. package/lib/actions/markActivity.d.ts.map +0 -1
  63. package/lib/actions/markActivity.js +0 -22
  64. package/lib/actions/postActivity.d.ts +0 -64
  65. package/lib/actions/postActivity.d.ts.map +0 -1
  66. package/lib/actions/postActivity.js +0 -31
  67. package/lib/actions/queueIncomingActivity.js +0 -18
  68. package/lib/actions/reconnect.js +0 -17
  69. package/lib/actions/sagaError.d.ts +0 -8
  70. package/lib/actions/sagaError.d.ts.map +0 -1
  71. package/lib/actions/sagaError.js +0 -15
  72. package/lib/actions/sendEvent.js +0 -19
  73. package/lib/actions/sendFiles.d.ts +0 -19
  74. package/lib/actions/sendFiles.d.ts.map +0 -1
  75. package/lib/actions/sendFiles.js +0 -20
  76. package/lib/actions/sendMessage.d.ts +0 -19
  77. package/lib/actions/sendMessage.d.ts.map +0 -1
  78. package/lib/actions/sendMessage.js +0 -24
  79. package/lib/actions/sendMessageBack.js +0 -20
  80. package/lib/actions/sendPostBack.js +0 -18
  81. package/lib/actions/setClockSkewAdjustment.js +0 -12
  82. package/lib/actions/setDictateInterims.js +0 -18
  83. package/lib/actions/setDictateState.js +0 -18
  84. package/lib/actions/setLanguage.js +0 -18
  85. package/lib/actions/setNotification.d.ts +0 -10
  86. package/lib/actions/setNotification.d.ts.map +0 -1
  87. package/lib/actions/setNotification.js +0 -37
  88. package/lib/actions/setReferenceGrammarID.js +0 -18
  89. package/lib/actions/setSendBox.js +0 -18
  90. package/lib/actions/setSendBoxAttachments.d.ts +0 -13
  91. package/lib/actions/setSendBoxAttachments.d.ts.map +0 -1
  92. package/lib/actions/setSendBoxAttachments.js +0 -18
  93. package/lib/actions/setSendTimeout.js +0 -18
  94. package/lib/actions/setSendTypingIndicator.d.ts +0 -11
  95. package/lib/actions/setSendTypingIndicator.d.ts.map +0 -1
  96. package/lib/actions/setSendTypingIndicator.js +0 -18
  97. package/lib/actions/setSuggestedActions.js +0 -20
  98. package/lib/actions/startDictate.js +0 -15
  99. package/lib/actions/startSpeakingActivity.js +0 -15
  100. package/lib/actions/stopDictate.js +0 -15
  101. package/lib/actions/stopSpeakingActivity.js +0 -15
  102. package/lib/actions/submitSendBox.js +0 -22
  103. package/lib/actions/updateConnectionStatus.js +0 -18
  104. package/lib/constants/ActivityClientState.js +0 -16
  105. package/lib/constants/DictateState.js +0 -17
  106. package/lib/createPromiseQueue.js +0 -30
  107. package/lib/createReducer.d.ts +0 -60
  108. package/lib/createReducer.d.ts.map +0 -1
  109. package/lib/createReducer.js +0 -45
  110. package/lib/createSagas.d.ts +0 -8
  111. package/lib/createSagas.d.ts.map +0 -1
  112. package/lib/createSagas.js +0 -112
  113. package/lib/createStore.d.ts +0 -43
  114. package/lib/createStore.d.ts.map +0 -1
  115. package/lib/createStore.js +0 -131
  116. package/lib/definitions/activityFromBot.js +0 -11
  117. package/lib/definitions/speakableActivity.js +0 -10
  118. package/lib/definitions/speakingActivity.js +0 -13
  119. package/lib/index.d.ts +0 -76
  120. package/lib/index.d.ts.map +0 -1
  121. package/lib/index.js +0 -309
  122. package/lib/reducers/connectivityStatus.js +0 -49
  123. package/lib/reducers/createActivitiesReducer.d.ts +0 -12
  124. package/lib/reducers/createActivitiesReducer.d.ts.map +0 -1
  125. package/lib/reducers/createActivitiesReducer.js +0 -267
  126. package/lib/reducers/createInternalReducer.d.ts +0 -10
  127. package/lib/reducers/createInternalReducer.d.ts.map +0 -1
  128. package/lib/reducers/createInternalReducer.js +0 -19
  129. package/lib/reducers/createNotificationsReducer.d.ts +0 -11
  130. package/lib/reducers/createNotificationsReducer.d.ts.map +0 -1
  131. package/lib/reducers/createNotificationsReducer.js +0 -55
  132. package/lib/reducers/createTypingReducer.d.ts +0 -14
  133. package/lib/reducers/createTypingReducer.d.ts.map +0 -1
  134. package/lib/reducers/createTypingReducer.js +0 -50
  135. package/lib/reducers/dictateInterims.js +0 -23
  136. package/lib/reducers/dictateState.js +0 -38
  137. package/lib/reducers/language.js +0 -23
  138. package/lib/reducers/private/findBeforeAfter.d.ts +0 -4
  139. package/lib/reducers/private/findBeforeAfter.d.ts.map +0 -1
  140. package/lib/reducers/private/findBeforeAfter.js +0 -24
  141. package/lib/reducers/readyState.js +0 -23
  142. package/lib/reducers/referenceGrammarID.js +0 -23
  143. package/lib/reducers/sendBoxAttachments.d.ts +0 -9
  144. package/lib/reducers/sendBoxAttachments.d.ts.map +0 -1
  145. package/lib/reducers/sendBoxAttachments.js +0 -23
  146. package/lib/reducers/sendBoxValue.js +0 -23
  147. package/lib/reducers/sendTimeout.js +0 -23
  148. package/lib/reducers/sendTypingIndicator.js +0 -23
  149. package/lib/reducers/shouldSpeakIncomingActivity.js +0 -25
  150. package/lib/reducers/suggestedActions.js +0 -32
  151. package/lib/sagas/clearSuggestedActionsOnPostActivitySaga.js +0 -62
  152. package/lib/sagas/connectSaga.js +0 -445
  153. package/lib/sagas/connectionStatusToNotificationSaga.js +0 -107
  154. package/lib/sagas/connectionStatusUpdateSaga.js +0 -63
  155. package/lib/sagas/detectSlowConnectionSaga.d.ts +0 -5
  156. package/lib/sagas/detectSlowConnectionSaga.d.ts.map +0 -1
  157. package/lib/sagas/detectSlowConnectionSaga.js +0 -50
  158. package/lib/sagas/effects/forever.js +0 -19
  159. package/lib/sagas/effects/forkPut.js +0 -51
  160. package/lib/sagas/effects/observeEach.js +0 -45
  161. package/lib/sagas/effects/observeOnce.d.ts +0 -3
  162. package/lib/sagas/effects/observeOnce.d.ts.map +0 -1
  163. package/lib/sagas/effects/observeOnce.js +0 -42
  164. package/lib/sagas/effects/whileConnected.d.ts +0 -7
  165. package/lib/sagas/effects/whileConnected.d.ts.map +0 -1
  166. package/lib/sagas/effects/whileConnected.js +0 -55
  167. package/lib/sagas/emitTypingIndicatorToPostActivitySaga.js +0 -63
  168. package/lib/sagas/markAllAsSpokenOnStopSpeakActivitySaga.js +0 -78
  169. package/lib/sagas/observeActivitySaga.d.ts +0 -2
  170. package/lib/sagas/observeActivitySaga.d.ts.map +0 -1
  171. package/lib/sagas/observeActivitySaga.js +0 -117
  172. package/lib/sagas/postActivitySaga.d.ts +0 -3
  173. package/lib/sagas/postActivitySaga.d.ts.map +0 -1
  174. package/lib/sagas/postActivitySaga.js +0 -264
  175. package/lib/sagas/queueIncomingActivitySaga.d.ts +0 -3
  176. package/lib/sagas/queueIncomingActivitySaga.d.ts.map +0 -1
  177. package/lib/sagas/queueIncomingActivitySaga.js +0 -197
  178. package/lib/sagas/sendEventToPostActivitySaga.js +0 -68
  179. package/lib/sagas/sendFilesToPostActivitySaga.js +0 -85
  180. package/lib/sagas/sendMessageBackToPostActivitySaga.js +0 -70
  181. package/lib/sagas/sendMessageToPostActivitySaga.d.ts +0 -2
  182. package/lib/sagas/sendMessageToPostActivitySaga.d.ts.map +0 -1
  183. package/lib/sagas/sendMessageToPostActivitySaga.js +0 -91
  184. package/lib/sagas/sendPostBackToPostActivitySaga.js +0 -69
  185. package/lib/sagas/sendTypingIndicatorOnSetSendBoxSaga.d.ts +0 -3
  186. package/lib/sagas/sendTypingIndicatorOnSetSendBoxSaga.d.ts.map +0 -1
  187. package/lib/sagas/sendTypingIndicatorOnSetSendBoxSaga.js +0 -145
  188. package/lib/sagas/speakActivityAndStartDictateOnIncomingActivityFromOthersSaga.js +0 -106
  189. package/lib/sagas/startDictateOnSpeakCompleteSaga.js +0 -65
  190. package/lib/sagas/startSpeakActivityOnPostActivitySaga.js +0 -62
  191. package/lib/sagas/stopDictateOnCardActionSaga.js +0 -65
  192. package/lib/sagas/stopSpeakingActivityOnInputSaga.js +0 -68
  193. package/lib/sagas/submitSendBoxSaga.js +0 -84
  194. package/lib/selectors/activities.d.ts +0 -9
  195. package/lib/selectors/activities.d.ts.map +0 -1
  196. package/lib/selectors/activities.js +0 -33
  197. package/lib/selectors/combineSelectors.js +0 -31
  198. package/lib/selectors/dictateState.js +0 -12
  199. package/lib/selectors/language.d.ts +0 -4
  200. package/lib/selectors/language.d.ts.map +0 -1
  201. package/lib/selectors/language.js +0 -12
  202. package/lib/selectors/notifications.js +0 -13
  203. package/lib/selectors/sendBoxAttachments.js +0 -11
  204. package/lib/selectors/sendBoxValue.js +0 -12
  205. package/lib/selectors/sendTimeout.d.ts +0 -4
  206. package/lib/selectors/sendTimeout.d.ts.map +0 -1
  207. package/lib/selectors/sendTimeout.js +0 -12
  208. package/lib/selectors/sendTypingIndicator.d.ts +0 -4
  209. package/lib/selectors/sendTypingIndicator.d.ts.map +0 -1
  210. package/lib/selectors/sendTypingIndicator.js +0 -12
  211. package/lib/selectors/shouldSpeakIncomingActivity.js +0 -12
  212. package/lib/types/AnyAnd.d.ts +0 -2
  213. package/lib/types/AnyAnd.d.ts.map +0 -1
  214. package/lib/types/AnyAnd.js +0 -6
  215. package/lib/types/GlobalScopePonyfill.d.ts +0 -8
  216. package/lib/types/GlobalScopePonyfill.d.ts.map +0 -1
  217. package/lib/types/GlobalScopePonyfill.js +0 -6
  218. package/lib/types/OneOrMany.d.ts +0 -3
  219. package/lib/types/OneOrMany.d.ts.map +0 -1
  220. package/lib/types/OneOrMany.js +0 -6
  221. package/lib/types/SendBoxAttachment.d.ts +0 -5
  222. package/lib/types/SendBoxAttachment.d.ts.map +0 -1
  223. package/lib/types/SendBoxAttachment.js +0 -6
  224. package/lib/types/WebChatActivity.d.ts +0 -128
  225. package/lib/types/WebChatActivity.d.ts.map +0 -1
  226. package/lib/types/WebChatActivity.js +0 -6
  227. package/lib/types/external/DirectLineActivity.d.ts +0 -3
  228. package/lib/types/external/DirectLineActivity.d.ts.map +0 -1
  229. package/lib/types/external/DirectLineActivity.js +0 -6
  230. package/lib/types/external/DirectLineAnimationCard.d.ts +0 -6
  231. package/lib/types/external/DirectLineAnimationCard.d.ts.map +0 -1
  232. package/lib/types/external/DirectLineAnimationCard.js +0 -6
  233. package/lib/types/external/DirectLineAttachment.d.ts +0 -9
  234. package/lib/types/external/DirectLineAttachment.d.ts.map +0 -1
  235. package/lib/types/external/DirectLineAttachment.js +0 -6
  236. package/lib/types/external/DirectLineAudioCard.d.ts +0 -6
  237. package/lib/types/external/DirectLineAudioCard.d.ts.map +0 -1
  238. package/lib/types/external/DirectLineAudioCard.js +0 -6
  239. package/lib/types/external/DirectLineBasicCardEssence.d.ts +0 -12
  240. package/lib/types/external/DirectLineBasicCardEssence.d.ts.map +0 -1
  241. package/lib/types/external/DirectLineBasicCardEssence.js +0 -6
  242. package/lib/types/external/DirectLineCardAction.d.ts +0 -110
  243. package/lib/types/external/DirectLineCardAction.d.ts.map +0 -1
  244. package/lib/types/external/DirectLineCardAction.js +0 -6
  245. package/lib/types/external/DirectLineCardImage.d.ts +0 -8
  246. package/lib/types/external/DirectLineCardImage.d.ts.map +0 -1
  247. package/lib/types/external/DirectLineCardImage.js +0 -6
  248. package/lib/types/external/DirectLineHeroCard.d.ts +0 -6
  249. package/lib/types/external/DirectLineHeroCard.d.ts.map +0 -1
  250. package/lib/types/external/DirectLineHeroCard.js +0 -6
  251. package/lib/types/external/DirectLineJSBotConnection.d.ts +0 -3
  252. package/lib/types/external/DirectLineJSBotConnection.d.ts.map +0 -1
  253. package/lib/types/external/DirectLineJSBotConnection.js +0 -6
  254. package/lib/types/external/DirectLineMediaCardEssence.d.ts +0 -21
  255. package/lib/types/external/DirectLineMediaCardEssence.d.ts.map +0 -1
  256. package/lib/types/external/DirectLineMediaCardEssence.js +0 -6
  257. package/lib/types/external/DirectLineOAuthCard.d.ts +0 -8
  258. package/lib/types/external/DirectLineOAuthCard.d.ts.map +0 -1
  259. package/lib/types/external/DirectLineOAuthCard.js +0 -6
  260. package/lib/types/external/DirectLineReceiptCard.d.ts +0 -28
  261. package/lib/types/external/DirectLineReceiptCard.d.ts.map +0 -1
  262. package/lib/types/external/DirectLineReceiptCard.js +0 -6
  263. package/lib/types/external/DirectLineSignInCard.d.ts +0 -8
  264. package/lib/types/external/DirectLineSignInCard.d.ts.map +0 -1
  265. package/lib/types/external/DirectLineSignInCard.js +0 -6
  266. package/lib/types/external/DirectLineSuggestedAction.d.ts +0 -7
  267. package/lib/types/external/DirectLineSuggestedAction.d.ts.map +0 -1
  268. package/lib/types/external/DirectLineSuggestedAction.js +0 -6
  269. package/lib/types/external/DirectLineThumbnailCard.d.ts +0 -6
  270. package/lib/types/external/DirectLineThumbnailCard.d.ts.map +0 -1
  271. package/lib/types/external/DirectLineThumbnailCard.js +0 -6
  272. package/lib/types/external/DirectLineVideoCard.d.ts +0 -6
  273. package/lib/types/external/DirectLineVideoCard.d.ts.map +0 -1
  274. package/lib/types/external/DirectLineVideoCard.js +0 -6
  275. package/lib/types/external/Observable.d.ts +0 -49
  276. package/lib/types/external/Observable.d.ts.map +0 -1
  277. package/lib/types/external/Observable.js +0 -6
  278. package/lib/types/external/OrgSchema/Action.d.ts +0 -29
  279. package/lib/types/external/OrgSchema/Action.d.ts.map +0 -1
  280. package/lib/types/external/OrgSchema/Action.js +0 -38
  281. package/lib/types/external/OrgSchema/Claim.d.ts +0 -35
  282. package/lib/types/external/OrgSchema/Claim.d.ts.map +0 -1
  283. package/lib/types/external/OrgSchema/Claim.js +0 -41
  284. package/lib/types/external/OrgSchema/CreativeWork.d.ts +0 -57
  285. package/lib/types/external/OrgSchema/CreativeWork.d.ts.map +0 -1
  286. package/lib/types/external/OrgSchema/CreativeWork.js +0 -52
  287. package/lib/types/external/OrgSchema/DefinedTerm.d.ts +0 -26
  288. package/lib/types/external/OrgSchema/DefinedTerm.d.ts.map +0 -1
  289. package/lib/types/external/OrgSchema/DefinedTerm.js +0 -33
  290. package/lib/types/external/OrgSchema/Project.d.ts +0 -20
  291. package/lib/types/external/OrgSchema/Project.d.ts.map +0 -1
  292. package/lib/types/external/OrgSchema/Project.js +0 -32
  293. package/lib/types/external/OrgSchema/Thing.d.ts +0 -53
  294. package/lib/types/external/OrgSchema/Thing.d.ts.map +0 -1
  295. package/lib/types/external/OrgSchema/Thing.js +0 -54
  296. package/lib/types/external/OrgSchema/VoteAction.d.ts +0 -22
  297. package/lib/types/external/OrgSchema/VoteAction.d.ts.map +0 -1
  298. package/lib/types/external/OrgSchema/VoteAction.js +0 -34
  299. package/lib/types/external/OrgSchema/private/orgSchemaProperties.d.ts +0 -3
  300. package/lib/types/external/OrgSchema/private/orgSchemaProperties.d.ts.map +0 -1
  301. package/lib/types/external/OrgSchema/private/orgSchemaProperties.js +0 -22
  302. package/lib/types/external/OrgSchema/private/orgSchemaProperty.d.ts +0 -4
  303. package/lib/types/external/OrgSchema/private/orgSchemaProperty.d.ts.map +0 -1
  304. package/lib/types/external/OrgSchema/private/orgSchemaProperty.js +0 -15
  305. package/lib/types/internal/GlobalScopeClock.d.ts +0 -15
  306. package/lib/types/internal/GlobalScopeClock.d.ts.map +0 -1
  307. package/lib/types/internal/GlobalScopeClock.js +0 -6
  308. package/lib/types/internal/Notification.d.ts +0 -10
  309. package/lib/types/internal/Notification.d.ts.map +0 -1
  310. package/lib/types/internal/Notification.js +0 -6
  311. package/lib/types/internal/ReduxState.d.ts +0 -19
  312. package/lib/types/internal/ReduxState.d.ts.map +0 -1
  313. package/lib/types/internal/ReduxState.js +0 -6
  314. package/lib/types/internal/SendStatus.d.ts +0 -7
  315. package/lib/types/internal/SendStatus.d.ts.map +0 -1
  316. package/lib/types/internal/SendStatus.js +0 -19
  317. package/lib/types/internal/WebChatOutgoingActivity.d.ts +0 -49
  318. package/lib/types/internal/WebChatOutgoingActivity.d.ts.map +0 -1
  319. package/lib/types/internal/WebChatOutgoingActivity.js +0 -6
  320. package/lib/utils/dateToLocaleISOString.d.ts +0 -2
  321. package/lib/utils/dateToLocaleISOString.d.ts.map +0 -1
  322. package/lib/utils/dateToLocaleISOString.js +0 -52
  323. package/lib/utils/deleteKey.d.ts +0 -2
  324. package/lib/utils/deleteKey.d.ts.map +0 -1
  325. package/lib/utils/deleteKey.js +0 -30
  326. package/lib/utils/getOrgSchemaMessage.d.ts +0 -4
  327. package/lib/utils/getOrgSchemaMessage.d.ts.map +0 -1
  328. package/lib/utils/getOrgSchemaMessage.js +0 -21
  329. package/lib/utils/isForbiddenPropertyName.d.ts +0 -2
  330. package/lib/utils/isForbiddenPropertyName.d.ts.map +0 -1
  331. package/lib/utils/isForbiddenPropertyName.js +0 -16
  332. package/lib/utils/onErrorResumeNext.d.ts +0 -3
  333. package/lib/utils/onErrorResumeNext.d.ts.map +0 -1
  334. package/lib/utils/onErrorResumeNext.js +0 -19
  335. package/lib/utils/once.d.ts +0 -2
  336. package/lib/utils/once.d.ts.map +0 -1
  337. package/lib/utils/once.js +0 -16
  338. package/lib/utils/singleToArray.d.ts +0 -2
  339. package/lib/utils/singleToArray.d.ts.map +0 -1
  340. package/lib/utils/singleToArray.js +0 -10
  341. package/lib/utils/sleep.d.ts +0 -3
  342. package/lib/utils/sleep.d.ts.map +0 -1
  343. package/lib/utils/sleep.js +0 -12
  344. package/lib/utils/uniqueID.d.ts +0 -2
  345. package/lib/utils/uniqueID.d.ts.map +0 -1
  346. package/lib/utils/uniqueID.js +0 -14
  347. package/lib/utils/warnOnce.d.ts +0 -2
  348. package/lib/utils/warnOnce.d.ts.map +0 -1
  349. package/lib/utils/warnOnce.js +0 -14
  350. package/src/actions/setSuggestedActions.js +0 -12
  351. /package/src/actions/{connect.js → connect.ts} +0 -0
  352. /package/src/actions/{connectionStatusUpdate.js → connectionStatusUpdate.ts} +0 -0
  353. /package/src/actions/{disconnect.js → disconnect.ts} +0 -0
  354. /package/src/actions/{emitTypingIndicator.js → emitTypingIndicator.ts} +0 -0
  355. /package/src/actions/{queueIncomingActivity.js → queueIncomingActivity.ts} +0 -0
  356. /package/src/actions/{reconnect.js → reconnect.ts} +0 -0
  357. /package/src/actions/{sendEvent.js → sendEvent.ts} +0 -0
  358. /package/src/actions/{sendMessageBack.js → sendMessageBack.ts} +0 -0
  359. /package/src/actions/{sendPostBack.js → sendPostBack.ts} +0 -0
  360. /package/src/actions/{setDictateInterims.js → setDictateInterims.ts} +0 -0
  361. /package/src/actions/{setDictateState.js → setDictateState.ts} +0 -0
  362. /package/src/actions/{setLanguage.js → setLanguage.ts} +0 -0
  363. /package/src/actions/{setSendBox.js → setSendBox.ts} +0 -0
  364. /package/src/actions/{setSendTimeout.js → setSendTimeout.ts} +0 -0
  365. /package/src/actions/{startDictate.js → startDictate.ts} +0 -0
  366. /package/src/actions/{startSpeakingActivity.js → startSpeakingActivity.ts} +0 -0
  367. /package/src/actions/{stopDictate.js → stopDictate.ts} +0 -0
  368. /package/src/actions/{stopSpeakingActivity.js → stopSpeakingActivity.ts} +0 -0
  369. /package/src/actions/{updateConnectionStatus.js → updateConnectionStatus.ts} +0 -0
@@ -0,0 +1,959 @@
1
+ export { PromiseWithResolvers, withResolvers } from 'botframework-webchat-base/utils';
2
+ import { Store } from 'redux';
3
+
4
+ declare function clearSuggestedActions(): {
5
+ type: "WEB_CHAT/CLEAR_SUGGESTED_ACTIONS";
6
+ };
7
+
8
+ declare function connect({ directLine, userID, username }: {
9
+ directLine: any;
10
+ userID: any;
11
+ username: any;
12
+ }): {
13
+ type: string;
14
+ payload: {
15
+ directLine: any;
16
+ userID: any;
17
+ username: any;
18
+ };
19
+ };
20
+
21
+ declare function disconnect(): {
22
+ type: string;
23
+ };
24
+
25
+ declare const DISMISS_NOTIFICATION = "WEB_CHAT/DISMISS_NOTIFICATION";
26
+ type DismissNotificationAction = {
27
+ payload: {
28
+ id: string;
29
+ };
30
+ type: typeof DISMISS_NOTIFICATION;
31
+ };
32
+ declare function dismissNotification(id: string): DismissNotificationAction;
33
+
34
+ declare function emitTypingIndicator(): {
35
+ type: string;
36
+ };
37
+
38
+ type MarkActivityActionType = 'WEB_CHAT/MARK_ACTIVITY';
39
+ type MarkActivityAction = {
40
+ payload: {
41
+ activityID: string;
42
+ name: string;
43
+ value: any;
44
+ };
45
+ type: MarkActivityActionType;
46
+ };
47
+ declare function markActivity({ id: activityID }: {
48
+ id: string;
49
+ }, name: string, value: any): MarkActivityAction;
50
+
51
+ type AnyAnd<T> = Omit<any, keyof T> & T;
52
+
53
+ type DirectLineAttachment = {
54
+ content?: any;
55
+ contentType: string;
56
+ contentUrl?: string;
57
+ name?: string;
58
+ thumbnailUrl?: string;
59
+ };
60
+
61
+ type CardActionWithImageAndTitle = {
62
+ image: string;
63
+ } | {
64
+ title: string;
65
+ } | {
66
+ image: string;
67
+ title: string;
68
+ };
69
+ /**
70
+ * A `call` action represents a telephone number that may be called.
71
+ *
72
+ * https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#call
73
+ */
74
+ type CallCardAction = CardActionWithImageAndTitle & {
75
+ type: 'call';
76
+ value: string;
77
+ };
78
+ /**
79
+ * A `downloadFile` action represents a hyperlink to be downloaded.
80
+ *
81
+ * https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#download-file-actions
82
+ */
83
+ type DownloadFileCardAction = CardActionWithImageAndTitle & {
84
+ type: 'downloadFile';
85
+ value: string;
86
+ };
87
+ /**
88
+ * An `imBack` action represents a text response that is added to the chat feed.
89
+ *
90
+ * https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#im-back
91
+ */
92
+ type IMBackCardAction = CardActionWithImageAndTitle & {
93
+ type: 'imBack';
94
+ value: string;
95
+ };
96
+ /**
97
+ * A `messageBack` action represents a text response to be sent via the chat system.
98
+ *
99
+ * https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#message-back
100
+ */
101
+ type MessageBackCardAction = CardActionWithImageAndTitle & {
102
+ displayText?: string;
103
+ text?: string;
104
+ type: 'messageBack';
105
+ value?: {
106
+ [key: string]: any;
107
+ };
108
+ };
109
+ /**
110
+ * An `openUrl` action represents a hyperlink to be handled by the client.
111
+ *
112
+ * https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#open-url-actions
113
+ */
114
+ type OpenURLCardAction = CardActionWithImageAndTitle & {
115
+ type: 'openUrl';
116
+ value: string;
117
+ };
118
+ /**
119
+ * A `playAudio` action represents audio media that may be played.
120
+ *
121
+ * https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#play-audio
122
+ */
123
+ type PlayAudioCardAction = CardActionWithImageAndTitle & {
124
+ type: 'playAudio';
125
+ value: string;
126
+ };
127
+ /**
128
+ * A `playVideo` action represents video media that may be played.
129
+ *
130
+ * https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#play-video
131
+ */
132
+ type PlayVideoCardAction = CardActionWithImageAndTitle & {
133
+ type: 'playVideo';
134
+ value: string;
135
+ };
136
+ /**
137
+ * A `postBack` action represents a text response that is not added to the chat feed.
138
+ *
139
+ * https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#post-back
140
+ */
141
+ type PostBackCardAction = CardActionWithImageAndTitle & {
142
+ type: 'postBack';
143
+ value: any;
144
+ };
145
+ /**
146
+ * A `showImage` action represents an image that may be displayed.
147
+ *
148
+ * https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#show-image-file-actions
149
+ */
150
+ type ShowImageCardAction = CardActionWithImageAndTitle & {
151
+ type: 'showImage';
152
+ value: string;
153
+ };
154
+ /**
155
+ * A `signin` action represents a hyperlink to be handled by the client's signin system.
156
+ *
157
+ * https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#signin
158
+ */
159
+ type SignInCardAction = CardActionWithImageAndTitle & {
160
+ type: 'signin';
161
+ value: string;
162
+ };
163
+ /**
164
+ * 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.
165
+ *
166
+ * https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#card-action
167
+ */
168
+ type DirectLineCardAction = CallCardAction | DownloadFileCardAction | IMBackCardAction | MessageBackCardAction | OpenURLCardAction | PlayAudioCardAction | PlayVideoCardAction | PostBackCardAction | ShowImageCardAction | SignInCardAction;
169
+
170
+ type DirectLineSuggestedAction = {
171
+ actions?: DirectLineCardAction[];
172
+ to?: string[];
173
+ };
174
+
175
+ type SupportedRole = 'bot' | 'channel' | 'user';
176
+ type SupportedSendStatus = 'sending' | 'send failed' | 'sent';
177
+ type ChannelData<SendStatus extends SupportedSendStatus | undefined, Type extends string> = AnyAnd<{
178
+ attachmentSizes?: number[];
179
+ clientActivityID?: string;
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
+ };
195
+ } & (SendStatus extends SupportedSendStatus ? {
196
+ /**
197
+ * @deprecated Since 4.15.3: Please use `channelData['webchat:send-status']` or `useSendStatusByActivityKey()` hook instead.
198
+ * Please refer to https://github.com/microsoft/BotFramework-WebChat/pull/4362 for details. This field will be removed on or after 2024-07-31.
199
+ */
200
+ state?: SendStatus;
201
+ /**
202
+ * The send status of the activity.
203
+ *
204
+ * - `"sending"`, the activity is in-transit and it has not been timed out;
205
+ * - `"send failed"`, the activity cannot be delivered permanently and further processing had been stopped;
206
+ * - `"sent"`, the activity is delivered successfully.
207
+ *
208
+ * Due to network-related race conditions, the activity could be marked as `"send failed"` but delivered by the service.
209
+ * In this case, the activity should continue to mark as `"send failed"`.
210
+ *
211
+ * For further details, please see [#4362](https://github.com/microsoft/BotFramework-WebChat/pull/4362).
212
+ */
213
+ 'webchat:send-status': SendStatus;
214
+ } : Record<any, any>) & (Type extends 'message' ? {
215
+ messageBack?: {
216
+ displayText: string;
217
+ };
218
+ postBack?: boolean;
219
+ speak?: boolean;
220
+ speechSynthesisUtterance?: SpeechSynthesisUtterance;
221
+ 'webchat:fallback-text'?: string;
222
+ feedbackLoop?: {
223
+ type: 'default';
224
+ disclaimer?: string;
225
+ };
226
+ } : Record<any, any>)>;
227
+ type ClientCapabilitiesEntity = {
228
+ requiresBotState?: boolean;
229
+ supportsListening?: boolean;
230
+ supportsTts?: boolean;
231
+ type: 'ClientCapabilities';
232
+ };
233
+ type Entity = ClientCapabilitiesEntity | {
234
+ type: string;
235
+ };
236
+ type ChannelAcount<Role extends SupportedRole> = {
237
+ id: string;
238
+ name?: string;
239
+ role: Role;
240
+ };
241
+ type EventActivityEssence = {
242
+ name: string;
243
+ type: 'event';
244
+ value?: any;
245
+ };
246
+ type MessageActivityEssence = {
247
+ attachmentLayout?: 'carousel' | 'stacked';
248
+ attachments?: DirectLineAttachment[];
249
+ channelData: {
250
+ streamId?: string;
251
+ streamSequence?: number;
252
+ streamType?: 'final';
253
+ };
254
+ inputHint?: 'accepting' | 'expecting' | 'ignoring';
255
+ locale?: string;
256
+ speak?: string;
257
+ suggestedActions?: DirectLineSuggestedAction;
258
+ text: string | undefined;
259
+ textFormat?: 'markdown' | 'plain' | 'xml';
260
+ type: 'message';
261
+ value?: any;
262
+ };
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;
277
+ type: 'typing';
278
+ };
279
+ type TimestampFromServerEssence = {
280
+ id: string;
281
+ localTimestamp?: string;
282
+ timestamp: string;
283
+ };
284
+ type TimestampInTransitEssence = {
285
+ id?: string;
286
+ localTimestamp: string;
287
+ timestamp?: string;
288
+ };
289
+ type TimestampEssence<Role extends SupportedRole, SendStatus extends SupportedSendStatus | undefined> = Role extends 'user' ? SendStatus extends 'sending' | 'send failed' ? TimestampInTransitEssence : TimestampFromServerEssence : TimestampFromServerEssence;
290
+ type CoreActivityEssence<Role extends SupportedRole, SendStatus extends SupportedSendStatus | undefined, Type extends string = 'conversationUpdate' | 'event' | 'invoke' | 'message' | 'typing'> = {
291
+ channelData: ChannelData<SendStatus, Type>;
292
+ channelId?: string;
293
+ entities?: Entity[];
294
+ from: ChannelAcount<Role>;
295
+ localTimezone?: string;
296
+ replyToId?: string;
297
+ type: string;
298
+ } & TimestampEssence<Role, SendStatus> & (Type extends 'event' ? EventActivityEssence : Type extends 'message' ? MessageActivityEssence : Type extends 'typing' ? TypingActivityEssence : {
299
+ type: Type;
300
+ });
301
+ type OthersActivity = CoreActivityEssence<'bot' | 'channel', undefined>;
302
+ type SelfActivitySendFailed = CoreActivityEssence<'user', 'send failed'>;
303
+ type SelfActivitySending = CoreActivityEssence<'user', 'sending'>;
304
+ type SelfActivitySent = CoreActivityEssence<'user', 'sent'>;
305
+ type SelfActivity = SelfActivitySendFailed | SelfActivitySending | SelfActivitySent;
306
+ type WebChatActivity = SelfActivity | OthersActivity;
307
+
308
+ type PostActivityActionType = 'DIRECT_LINE/POST_ACTIVITY';
309
+ type PostActivityAction = {
310
+ meta: {
311
+ method: string;
312
+ };
313
+ payload: {
314
+ activity: WebChatActivity;
315
+ };
316
+ type: PostActivityActionType;
317
+ };
318
+ declare function postActivity(activity: WebChatActivity, method?: string): PostActivityAction;
319
+
320
+ declare function sendEvent(name: any, value: any): {
321
+ type: string;
322
+ payload: {
323
+ name: any;
324
+ value: any;
325
+ };
326
+ };
327
+
328
+ declare function sendFiles(files: readonly Readonly<{
329
+ name: string;
330
+ size: number;
331
+ url: string;
332
+ thumbnail?: string;
333
+ }>[]): {
334
+ type: string;
335
+ payload: {
336
+ files: readonly Readonly<{
337
+ name: string;
338
+ size: number;
339
+ url: string;
340
+ thumbnail?: string;
341
+ }>[];
342
+ };
343
+ };
344
+
345
+ type SendBoxAttachment = Readonly<{
346
+ blob: Blob | File;
347
+ thumbnailURL?: URL;
348
+ }>;
349
+
350
+ declare function sendMessage(text: string | undefined, method: string | undefined, { attachments, channelData }?: {
351
+ attachments?: readonly SendBoxAttachment[];
352
+ channelData?: any;
353
+ }): {
354
+ type: string;
355
+ payload: {
356
+ attachments: readonly Readonly<{
357
+ blob: Blob | File;
358
+ thumbnailURL?: URL;
359
+ }>[];
360
+ channelData: any;
361
+ method: string;
362
+ text: string;
363
+ };
364
+ };
365
+
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
+ };
374
+
375
+ declare function sendPostback(value: any): {
376
+ type: string;
377
+ payload: {
378
+ value: any;
379
+ };
380
+ };
381
+
382
+ declare function setDictateInterims(dictateInterims: any): {
383
+ type: string;
384
+ payload: {
385
+ dictateInterims: any;
386
+ };
387
+ };
388
+
389
+ declare function setDictateState(dictateState: any): {
390
+ type: string;
391
+ payload: {
392
+ dictateState: any;
393
+ };
394
+ };
395
+
396
+ declare function setLanguage(language: any): {
397
+ type: string;
398
+ payload: {
399
+ language: any;
400
+ };
401
+ };
402
+
403
+ type Notification = {
404
+ alt: string;
405
+ data: any;
406
+ id: string;
407
+ level: string;
408
+ message: string;
409
+ timestamp: number;
410
+ };
411
+
412
+ declare const SET_NOTIFICATION = "WEB_CHAT/SET_NOTIFICATION";
413
+ type SetNotificationAction = {
414
+ payload: Omit<Notification, 'timestamp'>;
415
+ type: typeof SET_NOTIFICATION;
416
+ };
417
+ declare function setNotification({ alt, data, id, level, message }: Omit<Notification, 'timestamp'>): SetNotificationAction;
418
+
419
+ declare function setSendBox(text: any): {
420
+ type: string;
421
+ payload: {
422
+ text: any;
423
+ };
424
+ };
425
+
426
+ declare function setSendBoxAttachments(attachments: readonly SendBoxAttachment[]): {
427
+ type: string;
428
+ payload: {
429
+ attachments: readonly Readonly<{
430
+ blob: Blob | File;
431
+ thumbnailURL?: URL;
432
+ }>[];
433
+ };
434
+ };
435
+
436
+ declare function setSendTimeout(sendTimeout: any): {
437
+ type: string;
438
+ payload: {
439
+ sendTimeout: any;
440
+ };
441
+ };
442
+
443
+ declare const SET_SEND_TYPING_INDICATOR = "WEB_CHAT/SET_SEND_TYPING_INDICATOR";
444
+ type SetSendTypingIndicatorAction = {
445
+ payload: {
446
+ sendTypingIndicator: boolean;
447
+ };
448
+ type: typeof SET_SEND_TYPING_INDICATOR;
449
+ };
450
+ declare function setSendTypingIndicator(value: any): SetSendTypingIndicatorAction;
451
+
452
+ declare function startDictate(): {
453
+ type: string;
454
+ };
455
+
456
+ declare function startSpeakingActivity(): {
457
+ type: string;
458
+ };
459
+
460
+ declare function stopDictate(): {
461
+ type: string;
462
+ };
463
+
464
+ declare function stopSpeakingActivity(): {
465
+ type: string;
466
+ };
467
+
468
+ declare function submitSendBox(method?: string, { channelData }?: {
469
+ channelData: any;
470
+ }): {
471
+ type: string;
472
+ payload: {
473
+ channelData: any;
474
+ method: string;
475
+ };
476
+ };
477
+
478
+ type GlobalScopeClock = {
479
+ cancelAnimationFrame?: typeof cancelAnimationFrame;
480
+ cancelIdleCallback?: typeof cancelIdleCallback;
481
+ clearImmediate?: typeof clearImmediate;
482
+ clearInterval: typeof clearInterval;
483
+ clearTimeout: typeof clearTimeout;
484
+ Date: typeof Date;
485
+ requestAnimationFrame?: typeof requestAnimationFrame;
486
+ requestIdleCallback?: typeof requestIdleCallback;
487
+ setImmediate?: typeof setImmediate;
488
+ setInterval: typeof setInterval;
489
+ setTimeout: typeof setTimeout;
490
+ };
491
+
492
+ /**
493
+ * Ponyfills that are supported by Web Chat.
494
+ *
495
+ * If ponyfill is passed, Web Chat will use this ponyfill rather than the one from `globalThis` or `window` object.
496
+ */
497
+ type GlobalScopePonyfill = GlobalScopeClock;
498
+
499
+ type CreateStoreOptions = {
500
+ /**
501
+ * True, to enable Redux development tools, otherwise, false.
502
+ *
503
+ * Because Web Chat use sagas for business logics, some store state are keep at JavaScript heaps.
504
+ * Time-travelling and saving/restoring store state are not supported.
505
+ */
506
+ devTools?: boolean;
507
+ /**
508
+ * Ponyfill to overrides specific global scope members.
509
+ *
510
+ * This option is for development use only. Not all features in Web Chat are ponyfilled.
511
+ *
512
+ * To fake timers, `setTimeout` and related functions can be passed to overrides the original global scope members.
513
+ *
514
+ * Please see [#4662](https://github.com/microsoft/BotFramework-WebChat/pull/4662) for details.
515
+ */
516
+ ponyfill?: Partial<GlobalScopePonyfill>;
517
+ };
518
+ /**
519
+ * Creates a Redux store internally used by Web Chat.
520
+ *
521
+ * This store is critical for Web Chat business logics to operate, please use with cautions.
522
+ */
523
+ declare function withOptions(options: CreateStoreOptions, initialState?: any, ...middlewares: any[]): Store;
524
+ /**
525
+ * Creates a Redux store internally used by Web Chat.
526
+ *
527
+ * This store is critical for Web Chat business logics to operate, please use with cautions.
528
+ */
529
+ declare function createStore(initialState?: any, ...middlewares: any[]): Store;
530
+ /**
531
+ * Creates a Redux store internally used by Web Chat, with Redux development tools.
532
+ *
533
+ * This store is critical for Web Chat business logics to operate, please use with cautions.
534
+ *
535
+ * @deprecated Use `withOptions` instead and pass `{ devTools: true }`
536
+ */
537
+ declare function withDevTools(initialState?: any, ...middlewares: any[]): Store;
538
+
539
+ type OneOrMany<T> = T | T[];
540
+
541
+ /**
542
+ * The most generic type of item.
543
+ *
544
+ * This is partial implementation of https://schema.org/Thing.
545
+ *
546
+ * @see https://schema.org/Thing
547
+ */
548
+ type Thing = {
549
+ '@context'?: 'https://schema.org' | undefined;
550
+ '@id'?: string | undefined;
551
+ '@type': string;
552
+ /**
553
+ * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. Typically the value is a URI-identified RDF class, and in this case corresponds to the use of rdf:type in RDF. Text values can be used sparingly, for cases where useful information can be added without their being an appropriate schema to reference. In the case of text values, the class label should follow the schema.org [style guide](https://schema.org/docs/styleguide.html).
554
+ *
555
+ * @see https://schema.org/additionalType
556
+ */
557
+ additionalType?: string | undefined;
558
+ /**
559
+ * An alias for the item.
560
+ *
561
+ * @see https://schema.org/alternateName
562
+ */
563
+ alternateName?: string | undefined;
564
+ /**
565
+ * A description of the item.
566
+ *
567
+ * @see https://schema.org/description
568
+ */
569
+ description?: string | undefined;
570
+ /**
571
+ * The name of the item.
572
+ *
573
+ * @see https://schema.org/name
574
+ */
575
+ name?: string | undefined;
576
+ /**
577
+ * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role.
578
+ *
579
+ * @see https://schema.org/potentialAction
580
+ */
581
+ potentialAction?: readonly Action[] | undefined;
582
+ /**
583
+ * URL of the item.
584
+ *
585
+ * @see https://schema.org/url
586
+ */
587
+ url?: string | undefined;
588
+ };
589
+ declare const parseThing: (data: unknown) => Thing;
590
+
591
+ /**
592
+ * An enterprise (potentially individual but typically collaborative), planned to achieve a particular aim. Use properties from [Organization](https://schema.org/Organization), [subOrganization](https://schema.org/subOrganization)/[parentOrganization](https://schema.org/parentOrganization) to indicate project sub-structures.
593
+ *
594
+ * This is partial implementation of https://schema.org/Project.
595
+ *
596
+ * @see https://schema.org/Project
597
+ */
598
+ type Project = Thing & {
599
+ /**
600
+ * A slogan or motto associated with the item.
601
+ *
602
+ * @see https://schema.org/slogan
603
+ */
604
+ slogan?: string | undefined;
605
+ };
606
+ declare const parseProject: (data: unknown) => Project;
607
+
608
+ /**
609
+ * An action performed by a direct agent and indirect participants upon a direct object. Optionally happens at a location with the help of an inanimate instrument. The execution of the action may produce a result. Specific action sub-type documentation specifies the exact expectation of each argument/role.
610
+ *
611
+ * See also [blog post](http://blog.schema.org/2014/04/announcing-schemaorg-actions.html) and [Actions overview document](https://schema.org/docs/actions.html).
612
+ *
613
+ * This is partial implementation of https://schema.org/Action.
614
+ *
615
+ * @see https://schema.org/Action
616
+ */
617
+ type Action = Thing & {
618
+ /**
619
+ * Indicates the current disposition of the Action.
620
+ *
621
+ * @see https://schema.org/actionStatus
622
+ */
623
+ actionStatus?: 'ActiveActionStatus' | 'CompletedActionStatus' | 'FailedActionStatus' | 'PotentialActionStatus' | undefined;
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).
626
+ *
627
+ * @see https://schema.org/provider
628
+ */
629
+ provider?: Project | undefined;
630
+ };
631
+ declare const parseAction: (data: unknown) => Action;
632
+
633
+ /**
634
+ * A word, name, acronym, phrase, etc. with a formal definition. Often used in the context of category or subject classification, glossaries or dictionaries, product or creative work types, etc. Use the name property for the term being defined, use termCode if the term has an alpha-numeric code allocated, use description to provide the definition of the term.
635
+ *
636
+ * This is partial implementation of https://schema.org/DefinedTerm.
637
+ *
638
+ * @see https://schema.org/DefinedTerm
639
+ */
640
+ type DefinedTerm = Thing & {
641
+ /**
642
+ * A [DefinedTermSet](https://schema.org/DefinedTermSet) that contains this term.
643
+ *
644
+ * @see https://schema.org/inDefinedTermSet
645
+ */
646
+ inDefinedTermSet?: string | undefined;
647
+ /**
648
+ * A code that identifies this [DefinedTerm](https://schema.org/DefinedTerm) within a [DefinedTermSet](https://schema.org/DefinedTermSet).
649
+ *
650
+ * @see https://schema.org/termCode
651
+ */
652
+ termCode?: string | undefined;
653
+ };
654
+ declare const parseDefinedTerm: (data: unknown) => DefinedTerm;
655
+
656
+ /**
657
+ * The most generic kind of creative work, including books, movies, photographs, software programs, etc.
658
+ *
659
+ * This is partial implementation of https://schema.org/CreativeWork.
660
+ *
661
+ * @see https://schema.org/CreativeWork
662
+ */
663
+ type CreativeWork = Thing & {
664
+ /**
665
+ * An abstract is a short description that summarizes a [CreativeWork](https://schema.org/CreativeWork).
666
+ *
667
+ * @see https://schema.org/abstract
668
+ */
669
+ abstract?: string | undefined;
670
+ /**
671
+ * The author of this content or rating. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably.
672
+ *
673
+ * @see https://schema.org/author
674
+ */
675
+ author?: Person | string | undefined;
676
+ /**
677
+ * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc.
678
+ *
679
+ * @see https://schema.org/citation
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;
686
+ /**
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.
688
+ *
689
+ * @see https://schema.org/keywords
690
+ */
691
+ keywords?: readonly (DefinedTerm | string)[] | undefined;
692
+ /**
693
+ * A pattern that something has, for example 'polka dot', 'striped', 'Canadian flag'. Values are typically expressed as text, although links to controlled value schemes are also supported.
694
+ *
695
+ * @see https://schema.org/pattern
696
+ */
697
+ pattern?: DefinedTerm | undefined;
698
+ /**
699
+ * The textual content of this CreativeWork.
700
+ *
701
+ * @see https://schema.org/text
702
+ */
703
+ text?: string | undefined;
704
+ /**
705
+ * The schema.org [usageInfo](https://schema.org/usageInfo) property indicates further information about a [CreativeWork](https://schema.org/CreativeWork). This property is applicable both to works that are freely available and to those that require payment or other transactions. It can reference additional information, e.g. community expectations on preferred linking and citation conventions, as well as purchasing details. For something that can be commercially licensed, usageInfo can provide detailed, resource-specific information about licensing options.
706
+ *
707
+ * This property can be used alongside the license property which indicates license(s) applicable to some piece of content. The usageInfo property can provide information about other licensing options, e.g. acquiring commercial usage rights for an image that is also available under non-commercial creative commons licenses.
708
+ */
709
+ usageInfo?: CreativeWork | undefined;
710
+ };
711
+ type Person = {
712
+ '@type': 'Person';
713
+ description?: string | undefined;
714
+ image?: string | undefined;
715
+ name?: string | undefined;
716
+ };
717
+ declare const parseCreativeWork: (data: unknown) => CreativeWork;
718
+
719
+ /**
720
+ * A [Claim](https://schema.org/Claim) in Schema.org represents a specific, factually-oriented claim that could be the [itemReviewed](https://schema.org/itemReviewed) in a [ClaimReview](https://schema.org/ClaimReview). The content of a claim can be summarized with the [text](https://schema.org/text) property. Variations on well known claims can have their common identity indicated via [sameAs](https://schema.org/sameAs) links, and summarized with a name. Ideally, a [Claim](https://schema.org/Claim) description includes enough contextual information to minimize the risk of ambiguity or inclarity. In practice, many claims are better understood in the context in which they appear or the interpretations provided by claim reviews.
721
+ *
722
+ * Beyond [ClaimReview](https://schema.org/ClaimReview), the Claim type can be associated with related creative works - for example a [ScholarlyArticle](https://schema.org/ScholarlyArticle) or [Question](https://schema.org/Question) might be about some [Claim](https://schema.org/Claim).
723
+ *
724
+ * This is partial implementation of https://schema.org/Claim.
725
+ *
726
+ * @see https://schema.org/Claim.
727
+ */
728
+ type Claim = CreativeWork & {
729
+ /**
730
+ * Indicates an occurrence of a [Claim](https://schema.org/Claim) in some [CreativeWork](https://schema.org/CreativeWork).
731
+ *
732
+ * @see https://schema.org/appearance.
733
+ */
734
+ appearance?: CreativeWork | undefined;
735
+ /**
736
+ * For a [Claim](https://schema.org/Claim) interpreted from [MediaObject](https://schema.org/MediaObject) content sed to indicate a claim contained, implied or refined from the content of a [MediaObject](https://schema.org/MediaObject).
737
+ *
738
+ * @see https://schema.org/claimInterpreter.
739
+ */
740
+ claimInterpreter?: Project | undefined;
741
+ /**
742
+ * The position of an item in a series or sequence of items.
743
+ *
744
+ * @see https://schema.org/position.
745
+ */
746
+ position?: number | string;
747
+ };
748
+ declare const parseClaim: (data: unknown) => Claim;
749
+
750
+ /**
751
+ * An action performed by a direct agent and indirect participants upon a direct object. Optionally happens at a location with the help of an inanimate instrument. The execution of the action may produce a result. Specific action sub-type documentation specifies the exact expectation of each argument/role.
752
+ *
753
+ * See also [blog post](http://blog.schema.org/2014/04/announcing-schemaorg-actions.html) and [Actions overview document](https://schema.org/docs/actions.html).
754
+ *
755
+ * This is partial implementation of https://schema.org/Action.
756
+ *
757
+ * @see https://schema.org/Action
758
+ */
759
+ type VoteAction = Action & {
760
+ /**
761
+ * A sub property of object. The options subject to this action. Supersedes [option](https://schema.org/option).
762
+ *
763
+ * @see https://schema.org/VoteAction
764
+ */
765
+ actionOption?: string | undefined;
766
+ };
767
+ declare const parseVoteAction: (data: unknown) => VoteAction;
768
+
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;
794
+
795
+ declare function isForbiddenPropertyName(propertyName: string): boolean;
796
+
797
+ declare function onErrorResumeNext<T>(fn: () => T): T | undefined;
798
+ declare function onErrorResumeNext<T, U = T>(fn: () => T, defaultValue: U): T | U;
799
+
800
+ declare function singleToArray<T>(singleOrArray: T | T[]): T[];
801
+
802
+ declare function warnOnce(message: string): () => void;
803
+
804
+ type DirectLineActivity = Exclude<any, [] | boolean | ((...args: unknown[]) => unknown) | number | string>;
805
+
806
+ type DirectLineMediaCardEssence = {
807
+ aspect?: '4:3' | '16:9';
808
+ autoloop?: boolean;
809
+ autostart?: boolean;
810
+ buttons?: DirectLineCardAction[];
811
+ duration?: string;
812
+ image?: {
813
+ url: string;
814
+ };
815
+ media: {
816
+ profile?: string;
817
+ url: string;
818
+ }[];
819
+ shareable?: boolean;
820
+ subtitle?: string;
821
+ title?: string;
822
+ value?: any;
823
+ };
824
+
825
+ type DirectLineAnimationCard = DirectLineMediaCardEssence & {
826
+ contentType: 'application/vnd.microsoft.card.animation';
827
+ };
828
+
829
+ type DirectLineAudioCard = DirectLineMediaCardEssence & {
830
+ contentType: 'application/vnd.microsoft.card.audio';
831
+ };
832
+
833
+ type DirectLineCardImage = {
834
+ alt: string;
835
+ tap?: DirectLineCardAction;
836
+ url: string;
837
+ };
838
+
839
+ type DirectLineBasicCardEssence = {
840
+ buttons?: DirectLineCardAction[];
841
+ images?: DirectLineCardImage[];
842
+ subtitle?: string;
843
+ tap?: DirectLineCardAction;
844
+ text?: string;
845
+ title?: string;
846
+ };
847
+
848
+ type DirectLineHeroCard = DirectLineBasicCardEssence & {
849
+ contentType: 'application/vnd.microsoft.card.hero';
850
+ };
851
+
852
+ type DirectLineJSBotConnection = any;
853
+
854
+ type DirectLineOAuthCard = {
855
+ buttons?: DirectLineCardAction[];
856
+ contentType: 'application/vnd.microsoft.card.oauth';
857
+ text?: string;
858
+ };
859
+
860
+ type Fact = {
861
+ key?: string;
862
+ value?: string;
863
+ };
864
+ type ReceiptItem = {
865
+ image?: DirectLineCardImage;
866
+ price?: string;
867
+ quantity?: string;
868
+ subtitle?: string;
869
+ tap?: DirectLineCardAction;
870
+ text?: string;
871
+ title?: string;
872
+ };
873
+ type DirectLineReceiptCard = {
874
+ buttons?: DirectLineCardAction[];
875
+ contentType: 'application/vnd.microsoft.card.receipt';
876
+ facts?: Fact[];
877
+ items?: ReceiptItem[];
878
+ tap?: DirectLineCardAction;
879
+ tax?: string;
880
+ title?: string;
881
+ total?: string;
882
+ vat?: string;
883
+ };
884
+
885
+ type DirectLineSignInCard = {
886
+ buttons?: DirectLineCardAction[];
887
+ contentType: 'application/vnd.microsoft.card.signin';
888
+ text?: string;
889
+ };
890
+
891
+ type DirectLineThumbnailCard = DirectLineBasicCardEssence & {
892
+ contentType: 'application/vnd.microsoft.card.thumbnail';
893
+ };
894
+
895
+ type DirectLineVideoCard = DirectLineMediaCardEssence & {
896
+ contentType: 'application/vnd.microsoft.card.video';
897
+ };
898
+
899
+ /** Receives a completion notification */
900
+ type CompleteFunction = () => void;
901
+ /** Receives the sequence error */
902
+ type ErrorFunction = (error: Error) => void;
903
+ /** Receives the next value in the sequence */
904
+ type NextFunction<T> = (value: T) => void;
905
+ type SubscriberFunction<T> = (observer: SubscriptionObserver<T>) => Subscription;
906
+ /** An `Observable` represents a sequence of values which may be observed. */
907
+ declare class Observable<T> {
908
+ constructor(subscriber: SubscriberFunction<T>);
909
+ /** Subscribes to the sequence with an observer */
910
+ subscribe(observer: Observer<T>): Subscription;
911
+ /** Subscribes to the sequence with callbacks */
912
+ subscribe(onNext: NextFunction<T>, onError?: ErrorFunction, onComplete?: CompleteFunction): Subscription;
913
+ }
914
+ declare class Subscription {
915
+ /** Cancels the subscription */
916
+ unsubscribe(): void;
917
+ /** A boolean value indicating whether the subscription is closed */
918
+ get closed(): boolean;
919
+ }
920
+ /**
921
+ * An `Observer` is used to receive data from an `Observable`, and is supplied as an argument to `subscribe`.
922
+ *
923
+ * All methods are optional.
924
+ */
925
+ declare class Observer<T> {
926
+ /** Receives the subscription object when `subscribe` is called */
927
+ start(subscription: Subscription): any;
928
+ /** Receives the next value in the sequence */
929
+ next: NextFunction<T>;
930
+ /** Receives the sequence error */
931
+ error: ErrorFunction;
932
+ /** Receives a completion notification */
933
+ complete: CompleteFunction;
934
+ }
935
+ /** A `SubscriptionObserver` is a normalized `Observer` which wraps the observer object supplied to `subscribe`. */
936
+ declare class SubscriptionObserver<T> {
937
+ /** Sends the next value in the sequence */
938
+ next: NextFunction<T>;
939
+ /** Sends the sequence error */
940
+ error: ErrorFunction;
941
+ /** Sends the completion notification */
942
+ complete: CompleteFunction;
943
+ /** A boolean value indicating whether the subscription is closed */
944
+ get closed(): boolean;
945
+ }
946
+
947
+ declare const Constants: {
948
+ ActivityClientState: any;
949
+ DictateState: any;
950
+ };
951
+ declare const moduleFormat: string;
952
+ declare const version: string;
953
+ declare const buildInfo: {
954
+ buildTool: string;
955
+ moduleFormat: string;
956
+ version: string;
957
+ };
958
+
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 };