@microsoft/teams-js 2.2.1-beta.0 → 2.3.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,12 +1,12 @@
1
- Microsoft Teams JS Library
2
-
3
- Copyright (c) Microsoft Corporation
4
- All rights reserved.
5
-
6
- MIT License
7
-
8
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
11
-
1
+ Microsoft Teams JS Library
2
+
3
+ Copyright (c) Microsoft Corporation
4
+ All rights reserved.
5
+
6
+ MIT License
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
11
+
12
12
  THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,74 +1,74 @@
1
- # Microsoft Teams JavaScript client SDK
2
-
3
- Welcome to the Teams JavaScript client SDK! For breaking changes, please refer to our [changelog](./CHANGELOG.md) in the current `<root>/packages/teams-js` directory.
4
-
5
- This JavaScript library is part of the [Microsoft Teams developer platform](https://docs.microsoft.com/en-us/microsoftteams/platform/). See full [SDK reference documentation](https://docs.microsoft.com/javascript/api/overview/msteams-client?view=msteams-client-js-latest).
6
-
7
- ## Getting Started
8
-
9
- See [instructions](../../README.md#Getting-Started) in the monorepo root for how to clone and build the repository.
10
-
11
- Whenever building or testing the Teams client SDK, you can run `yarn build` or `yarn test` from the packages/teams-js directory.
12
-
13
- ## Installation
14
-
15
- To install the stable [version](https://docs.microsoft.com/javascript/api/overview/msteams-client?view=msteams-client-js-latest):
16
-
17
- ### npm
18
-
19
- `npm install --save @microsoft/teams-js`
20
-
21
- ### yarn
22
-
23
- `yarn add @microsoft/teams-js`
24
-
25
- ### Production
26
-
27
- You can reference these files directly [from here](https://res.cdn.office.net/teams-js/2.2.0/js/MicrosoftTeams.min.js) or point your package manager at them.
28
-
29
- ## Usage
30
-
31
- ### As a package
32
-
33
- Install either using npm or yarn.
34
-
35
- **If you are using any dependency loader** such as [RequireJS](http://requirejs.org/) or [SystemJS](https://github.com/systemjs/systemjs) or module bundler such as [browserify](http://browserify.org/), [webpack](https://webpack.github.io/), you can use `import` syntax to import specific modules. For e.g.
36
-
37
- ```typescript
38
- import { app } from '@microsoft/teams-js';
39
- ```
40
-
41
- ### As a script tag
42
-
43
- Reference the SDK inside of your `.html` page using:
44
-
45
- ```html
46
- <!-- Microsoft Teams JavaScript API (via CDN) -->
47
- <script
48
- src="https://res.cdn.office.net/teams-js/2.2.0/js/MicrosoftTeams.min.js"
49
- integrity="sha384-yBjE++eHeBPzIg+IKl9OHFqMbSdrzY2S/LW3qeitc5vqXewEYRWegByWzBN/chRh"
50
- crossorigin="anonymous"
51
- ></script>
52
-
53
- <!-- Microsoft Teams JavaScript API (via npm) -->
54
- <script src="node_modules/@microsoft/teams-js@2.2.0/dist/MicrosoftTeams.min.js"></script>
55
-
56
- <!-- Microsoft Teams JavaScript API (via local) -->
57
- <script src="MicrosoftTeams.min.js"></script>
58
- ```
59
-
60
- ### Dependencies
61
-
62
- Teams client SDK depends on [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) type. If you support older browsers and devices which may not yet provide it natively (e.g. IE 11), you need to provide a global polyfill, such as [es6-promise](https://www.npmjs.com/package/es6-promise), in your bundled application. If you're using a script tag to reference the Teams client SDK, you need to make sure the polyfill is included and initialized before the Teams client SDK is.
63
-
64
- ## Examples
65
-
66
- Stay tuned for examples coming soon.
67
-
68
- ## Testing
69
-
70
- The [Teams Test App](https://aka.ms/teams-test-app) is used to validate the Teams client SDK APIs.
71
-
72
- ## Contributing
73
-
74
- Please be sure to check out the [Contributor's guide](../../CONTRIBUTING.md) for crucial steps.
1
+ # Microsoft Teams JavaScript client SDK
2
+
3
+ Welcome to the Teams JavaScript client SDK! For breaking changes, please refer to our [changelog](./CHANGELOG.md) in the current `<root>/packages/teams-js` directory.
4
+
5
+ This JavaScript library is part of the [Microsoft Teams developer platform](https://docs.microsoft.com/en-us/microsoftteams/platform/). See full [SDK reference documentation](https://docs.microsoft.com/javascript/api/overview/msteams-client?view=msteams-client-js-latest).
6
+
7
+ ## Getting Started
8
+
9
+ See [instructions](../../README.md#Getting-Started) in the monorepo root for how to clone and build the repository.
10
+
11
+ Whenever building or testing the Teams client SDK, you can run `yarn build` or `yarn test` from the packages/teams-js directory.
12
+
13
+ ## Installation
14
+
15
+ To install the stable [version](https://docs.microsoft.com/javascript/api/overview/msteams-client?view=msteams-client-js-latest):
16
+
17
+ ### npm
18
+
19
+ `npm install --save @microsoft/teams-js`
20
+
21
+ ### yarn
22
+
23
+ `yarn add @microsoft/teams-js`
24
+
25
+ ### Production
26
+
27
+ You can reference these files directly [from here](https://res.cdn.office.net/teams-js/2.2.0/js/MicrosoftTeams.min.js) or point your package manager at them.
28
+
29
+ ## Usage
30
+
31
+ ### As a package
32
+
33
+ Install either using npm or yarn.
34
+
35
+ **If you are using any dependency loader** such as [RequireJS](http://requirejs.org/) or [SystemJS](https://github.com/systemjs/systemjs) or module bundler such as [browserify](http://browserify.org/), [webpack](https://webpack.github.io/), you can use `import` syntax to import specific modules. For e.g.
36
+
37
+ ```typescript
38
+ import { app } from '@microsoft/teams-js';
39
+ ```
40
+
41
+ ### As a script tag
42
+
43
+ Reference the SDK inside of your `.html` page using:
44
+
45
+ ```html
46
+ <!-- Microsoft Teams JavaScript API (via CDN) -->
47
+ <script
48
+ src="https://res.cdn.office.net/teams-js/2.2.0/js/MicrosoftTeams.min.js"
49
+ integrity="sha384-yBjE++eHeBPzIg+IKl9OHFqMbSdrzY2S/LW3qeitc5vqXewEYRWegByWzBN/chRh"
50
+ crossorigin="anonymous"
51
+ ></script>
52
+
53
+ <!-- Microsoft Teams JavaScript API (via npm) -->
54
+ <script src="node_modules/@microsoft/teams-js@2.2.0/dist/MicrosoftTeams.min.js"></script>
55
+
56
+ <!-- Microsoft Teams JavaScript API (via local) -->
57
+ <script src="MicrosoftTeams.min.js"></script>
58
+ ```
59
+
60
+ ### Dependencies
61
+
62
+ Teams client SDK depends on [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) type. If you support older browsers and devices which may not yet provide it natively (e.g. IE 11), you need to provide a global polyfill, such as [es6-promise](https://www.npmjs.com/package/es6-promise), in your bundled application. If you're using a script tag to reference the Teams client SDK, you need to make sure the polyfill is included and initialized before the Teams client SDK is.
63
+
64
+ ## Examples
65
+
66
+ Stay tuned for examples coming soon.
67
+
68
+ ## Testing
69
+
70
+ The [Teams Test App](https://aka.ms/teams-test-app) is used to validate the Teams client SDK APIs.
71
+
72
+ ## Contributing
73
+
74
+ Please be sure to check out the [Contributor's guide](../../CONTRIBUTING.md) for crucial steps.
@@ -1989,6 +1989,166 @@ export namespace teams {
1989
1989
  }
1990
1990
  }
1991
1991
 
1992
+ /**
1993
+ * @hidden
1994
+ * Extended video API
1995
+ * @beta
1996
+ *
1997
+ * @internal
1998
+ * Limited to Microsoft-internal use
1999
+ */
2000
+ export namespace videoEx {
2001
+ /**
2002
+ * @hidden
2003
+ * Video frame configuration supplied to the host to customize the generated video frame parameters
2004
+ * @beta
2005
+ *
2006
+ * @internal
2007
+ * Limited to Microsoft-internal use
2008
+ */
2009
+ interface VideoFrameConfig extends video.VideoFrameConfig {
2010
+ /**
2011
+ * @hidden
2012
+ * Flag to indicate use camera stream to synthesize video frame or not.
2013
+ * Default value is true.
2014
+ * @beta
2015
+ *
2016
+ * @internal
2017
+ * Limited to Microsoft-internal use
2018
+ */
2019
+ requireCameraStream?: boolean;
2020
+ /**
2021
+ * @hidden
2022
+ * Machine learning model to run in the host to do audio inference for you
2023
+ * @beta
2024
+ *
2025
+ * @internal
2026
+ * Limited to Microsoft-internal use
2027
+ */
2028
+ audioInferenceModel?: ArrayBuffer;
2029
+ }
2030
+ /**
2031
+ * @hidden
2032
+ * Represents a video frame
2033
+ * @beta
2034
+ *
2035
+ * @internal
2036
+ * Limited to Microsoft-internal use
2037
+ */
2038
+ interface VideoFrame extends video.VideoFrame {
2039
+ /**
2040
+ * @hidden
2041
+ * The model output if you passed in an {@linkcode VideoFrameConfig.audioInferenceModel}
2042
+ * @beta
2043
+ *
2044
+ * @internal
2045
+ * Limited to Microsoft-internal use
2046
+ */
2047
+ audioInferenceResult?: Uint8Array;
2048
+ }
2049
+ /**
2050
+ * @hidden
2051
+ * Video frame call back function
2052
+ * @beta
2053
+ *
2054
+ * @internal
2055
+ * Limited to Microsoft-internal use
2056
+ */
2057
+ type VideoFrameCallback = (frame: VideoFrame, notifyVideoFrameProcessed: () => void, notifyError: (errorMessage: string) => void) => void;
2058
+ /**
2059
+ * @hidden
2060
+ * Register to process video frames
2061
+ * @beta
2062
+ *
2063
+ * @param frameCallback - The callback to invoke when registerForVideoFrame has completed
2064
+ * @param config - VideoFrameConfig to customize generated video frame parameters
2065
+ *
2066
+ * @internal
2067
+ * Limited to Microsoft-internal use
2068
+ */
2069
+ function registerForVideoFrame(frameCallback: VideoFrameCallback, config: VideoFrameConfig): void;
2070
+ /**
2071
+ * @hidden
2072
+ * Video extension should call this to notify host that the current selected effect parameter changed.
2073
+ * If it's pre-meeting, host will call videoEffectCallback immediately then use the videoEffect.
2074
+ * If it's the in-meeting scenario, we will call videoEffectCallback when apply button clicked.
2075
+ * @beta
2076
+ * @param effectChangeType - the effect change type.
2077
+ * @param effectId - Newly selected effect id. {@linkcode VideoEffectCallBack}
2078
+ * @param effectParam Variant for the newly selected effect. {@linkcode VideoEffectCallBack}
2079
+ *
2080
+ * @internal
2081
+ * Limited to Microsoft-internal use
2082
+ */
2083
+ function notifySelectedVideoEffectChanged(effectChangeType: video.EffectChangeType, effectId: string | undefined, effectParam?: string): void;
2084
+ /**
2085
+ * @hidden
2086
+ * Video effect change call back function definition
2087
+ * @beta
2088
+ *
2089
+ * @internal
2090
+ * Limited to Microsoft-internal use
2091
+ */
2092
+ type VideoEffectCallBack = (effectId: string | undefined, effectParam?: string) => void;
2093
+ /**
2094
+ * @hidden
2095
+ * Register the video effect callback, host uses this to notify the video extension the new video effect will by applied
2096
+ * @beta
2097
+ * @param callback - The VideoEffectCallback to invoke when registerForVideoEffect has completed
2098
+ *
2099
+ * @internal
2100
+ * Limited to Microsoft-internal use
2101
+ */
2102
+ function registerForVideoEffect(callback: VideoEffectCallBack): void;
2103
+ /**
2104
+ * @hidden
2105
+ * Personalized video effect
2106
+ * @beta
2107
+ *
2108
+ * @internal
2109
+ * Limited to Microsoft-internal use
2110
+ */
2111
+ interface PersonalizedEffect {
2112
+ /**
2113
+ * Personalized effect id
2114
+ */
2115
+ id: string;
2116
+ /**
2117
+ * Display name
2118
+ */
2119
+ name: string;
2120
+ /**
2121
+ * Effect type defined by app
2122
+ */
2123
+ type: string;
2124
+ /**
2125
+ * Data URI of the thumbnail image content encoded in ASCII format using the base64 scheme
2126
+ */
2127
+ thumbnail: string;
2128
+ }
2129
+ /**
2130
+ * @hidden
2131
+ * Send personalized effects to Teams client
2132
+ * @beta
2133
+ *
2134
+ * @internal
2135
+ * Limited to Microsoft-internal use
2136
+ */
2137
+ function updatePersonalizedEffects(effects: PersonalizedEffect[]): void;
2138
+ /**
2139
+ * @hidden
2140
+ * Checks if video capability is supported by the host
2141
+ * @beta
2142
+ *
2143
+ * @returns true if the video capability is enabled in runtime.supports.video and
2144
+ * false if it is disabled
2145
+ *
2146
+ * @internal
2147
+ * Limited to Microsoft-internal use
2148
+ */
2149
+ function isSupported(): boolean;
2150
+ }
2151
+
1992
2152
  /**
1993
2153
  * Namespace to interact with the authentication-specific part of the SDK.
1994
2154
  *
@@ -4136,6 +4296,17 @@ export namespace pages {
4136
4296
  * Limited to Microsoft-internal use
4137
4297
  */
4138
4298
  function registerFocusEnterHandler(handler: (navigateForward: boolean) => void): void;
4299
+ /**
4300
+ * @hidden
4301
+ * Undocumented helper function with shared code between deprecated version and current version of the registerFocusEnterHandler API.
4302
+ *
4303
+ * @internal
4304
+ * Limited to Microsoft-internal use
4305
+ *
4306
+ * @param handler - The handler for placing focus within the application.
4307
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
4308
+ */
4309
+ function registerFocusEnterHandlerHelper(handler: (navigateForward: boolean) => void, versionSpecificHelper?: () => void): void;
4139
4310
  /**
4140
4311
  * Sets/Updates the current frame with new information
4141
4312
  *
@@ -4216,6 +4387,17 @@ export namespace pages {
4216
4387
  * @param handler - The handler to invoke when the user toggles full-screen view for a tab.
4217
4388
  */
4218
4389
  function registerFullScreenHandler(handler: (isFullScreen: boolean) => void): void;
4390
+ /**
4391
+ * @hidden
4392
+ * Undocumented helper function with shared code between deprecated version and current version of the registerFullScreenHandler API.
4393
+ *
4394
+ * @internal
4395
+ * Limited to Microsoft-internal use
4396
+ *
4397
+ * @param handler - The handler to invoke when the user toggles full-screen view for a tab.
4398
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
4399
+ */
4400
+ function registerFullScreenHandlerHelper(handler: (isFullScreen: boolean) => void, versionSpecificHelper?: () => void): void;
4219
4401
  /**
4220
4402
  * Checks if the pages capability is supported by the host
4221
4403
  * @returns true if the pages capability is enabled in runtime.supports.pages and
@@ -4314,6 +4496,17 @@ export namespace pages {
4314
4496
  * @param handler - The handler to invoke when the user selects the Save button.
4315
4497
  */
4316
4498
  function registerOnSaveHandler(handler: (evt: SaveEvent) => void): void;
4499
+ /**
4500
+ * @hidden
4501
+ * Undocumented helper function with shared code between deprecated version and current version of the registerOnSaveHandler API.
4502
+ *
4503
+ * @internal
4504
+ * Limited to Microsoft-internal use
4505
+ *
4506
+ * @param handler - The handler to invoke when the user selects the Save button.
4507
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
4508
+ */
4509
+ function registerOnSaveHandlerHelper(handler: (evt: SaveEvent) => void, versionSpecificHelper?: () => void): void;
4317
4510
  /**
4318
4511
  * Registers a handler for user attempts to remove content. This handler should be used
4319
4512
  * to remove the underlying resource powering the content.
@@ -4322,11 +4515,33 @@ export namespace pages {
4322
4515
  * @param handler - The handler to invoke when the user selects the Remove button.
4323
4516
  */
4324
4517
  function registerOnRemoveHandler(handler: (evt: RemoveEvent) => void): void;
4518
+ /**
4519
+ * @hidden
4520
+ * Undocumented helper function with shared code between deprecated version and current version of the registerOnRemoveHandler API.
4521
+ *
4522
+ * @internal
4523
+ * Limited to Microsoft-internal use
4524
+ *
4525
+ * @param handler - The handler to invoke when the user selects the Remove button.
4526
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
4527
+ */
4528
+ function registerOnRemoveHandlerHelper(handler: (evt: RemoveEvent) => void, versionSpecificHelper?: () => void): void;
4325
4529
  /**
4326
4530
  * Registers a handler for when the tab configuration is changed by the user
4327
4531
  * @param handler - The handler to invoke when the user clicks on Settings.
4328
4532
  */
4329
4533
  function registerChangeConfigHandler(handler: () => void): void;
4534
+ /**
4535
+ * @hidden
4536
+ * Undocumented helper function with shared code between deprecated version and current version of the registerConfigChangeHandler API.
4537
+ *
4538
+ * @internal
4539
+ * Limited to Microsoft-internal use
4540
+ *
4541
+ * @param handler - The handler to invoke when the user clicks on Settings.
4542
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
4543
+ */
4544
+ function registerChangeConfigHandlerHelper(handler: () => void, versionSpecificHelper?: () => void): void;
4330
4545
  /**
4331
4546
  * Describes the results of the settings.save event. Includes result, notifySuccess, and notifyFailure
4332
4547
  * to indicate the return object (result) and the status of whether the settings.save call succeeded or not and why.
@@ -4395,6 +4610,17 @@ export namespace pages {
4395
4610
  * @param handler - The handler to invoke when the user presses the host client's back button.
4396
4611
  */
4397
4612
  function registerBackButtonHandler(handler: () => boolean): void;
4613
+ /**
4614
+ * @hidden
4615
+ * Undocumented helper function with shared code between deprecated version and current version of the registerBackButtonHandler API.
4616
+ *
4617
+ * @internal
4618
+ * Limited to Microsoft-internal use
4619
+ *
4620
+ * @param handler - The handler to invoke when the user presses the host client's back button.
4621
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
4622
+ */
4623
+ function registerBackButtonHandlerHelper(handler: () => boolean, versionSpecificHelper?: () => void): void;
4398
4624
  /**
4399
4625
  * Checks if the pages.backStack capability is supported by the host
4400
4626
  * @returns true if the pages.backStack capability is enabled in runtime.supports.pages.backStack and
@@ -4443,18 +4669,51 @@ export namespace pages {
4443
4669
  * @param handler - The handler to invoke when the personal app button is clicked in the app bar.
4444
4670
  */
4445
4671
  function onClick(handler: () => void): void;
4672
+ /**
4673
+ * @hidden
4674
+ * Undocumented helper function with shared code between deprecated version and current version of the onClick API.
4675
+ *
4676
+ * @internal
4677
+ * Limited to Microsoft-internal use
4678
+ *
4679
+ * @param handler - The handler to invoke when the personal app button is clicked in the app bar.
4680
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
4681
+ */
4682
+ function onClickHelper(handler: () => void, versionSpecificHelper?: () => void): void;
4446
4683
  /**
4447
4684
  * Registers a handler for entering hover of the app button.
4448
4685
  * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
4449
4686
  * @param handler - The handler to invoke when entering hover of the personal app button in the app bar.
4450
4687
  */
4451
4688
  function onHoverEnter(handler: () => void): void;
4689
+ /**
4690
+ * @hidden
4691
+ * Undocumented helper function with shared code between deprecated version and current version of the onHoverEnter API.
4692
+ *
4693
+ * @internal
4694
+ * Limited to Microsoft-internal use
4695
+ *
4696
+ * @param handler - The handler to invoke when entering hover of the personal app button in the app bar.
4697
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
4698
+ */
4699
+ function onHoverEnterHelper(handler: () => void, versionSpecificHelper?: () => void): void;
4452
4700
  /**
4453
4701
  * Registers a handler for exiting hover of the app button.
4454
4702
  * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
4455
4703
  * @param handler - The handler to invoke when exiting hover of the personal app button in the app bar.
4456
4704
  */
4457
4705
  function onHoverLeave(handler: () => void): void;
4706
+ /**
4707
+ * @hidden
4708
+ * Undocumented helper function with shared code between deprecated version and current version of the onHoverLeave API.
4709
+ *
4710
+ * @internal
4711
+ * Limited to Microsoft-internal use
4712
+ *
4713
+ * @param handler - The handler to invoke when existing hover of the personal app button in the app bar.
4714
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
4715
+ */
4716
+ function onHoverLeaveHelper(handler: () => void, versionSpecificHelper?: () => void): void;
4458
4717
  /**
4459
4718
  * Checks if pages.appButton capability is supported by the host
4460
4719
  * @returns true if the pages.appButton capability is enabled in runtime.supports.pages.appButton and
@@ -5606,6 +5865,17 @@ export namespace teamsCore {
5606
5865
  * @internal
5607
5866
  */
5608
5867
  function registerOnLoadHandler(handler: (context: LoadContext) => void): void;
5868
+ /**
5869
+ * @hidden
5870
+ * Undocumented helper function with shared code between deprecated version and current version of the registerOnLoadHandler API.
5871
+ *
5872
+ * @internal
5873
+ * Limited to Microsoft-internal use
5874
+ *
5875
+ * @param handler - The handler to invoke when the page is loaded.
5876
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
5877
+ */
5878
+ function registerOnLoadHandlerHelper(handler: (context: LoadContext) => void, versionSpecificHelper?: () => void): void;
5609
5879
  /**
5610
5880
  * @hidden
5611
5881
  * Registers a handler to be called before the page is unloaded.
@@ -5616,6 +5886,18 @@ export namespace teamsCore {
5616
5886
  * @internal
5617
5887
  */
5618
5888
  function registerBeforeUnloadHandler(handler: (readyToUnload: () => void) => boolean): void;
5889
+ /**
5890
+ * @hidden
5891
+ * Undocumented helper function with shared code between deprecated version and current version of the registerBeforeUnloadHandler API.
5892
+ *
5893
+ * @internal
5894
+ * Limited to Microsoft-internal use
5895
+ *
5896
+ * @param handler - - The handler to invoke before the page is unloaded. If this handler returns true the page should
5897
+ * invoke the readyToUnload function provided to it once it's ready to be unloaded.
5898
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
5899
+ */
5900
+ function registerBeforeUnloadHandlerHelper(handler: (readyToUnload: () => void) => boolean, versionSpecificHelper?: () => void): void;
5619
5901
  /**
5620
5902
  * Checks if teamsCore capability is supported by the host
5621
5903
  * @returns true if the teamsCore capability is enabled in runtime.supports.teamsCore and
@@ -5813,6 +6095,10 @@ export namespace video {
5813
6095
  * RGB stride, valid only when video frame format is RGB
5814
6096
  */
5815
6097
  stride?: number;
6098
+ /**
6099
+ * The time stamp of the current video frame
6100
+ */
6101
+ timestamp?: number;
5816
6102
  }
5817
6103
  /**
5818
6104
  * Video frame format enum, currently only support NV12
@@ -5837,11 +6123,11 @@ export namespace video {
5837
6123
  */
5838
6124
  enum EffectChangeType {
5839
6125
  /**
5840
- * current video effect changed
6126
+ * Current video effect changed
5841
6127
  */
5842
6128
  EffectChanged = 0,
5843
6129
  /**
5844
- * disable the video effect
6130
+ * Disable the video effect
5845
6131
  */
5846
6132
  EffectDisabled = 1
5847
6133
  }
@@ -5863,8 +6149,8 @@ export namespace video {
5863
6149
  */
5864
6150
  function registerForVideoFrame(frameCallback: VideoFrameCallback, config: VideoFrameConfig): void;
5865
6151
  /**
5866
- * Video extension should call this to notify host client that the current selected effect parameter changed.
5867
- * If it's pre-meeting, host client will call videoEffectCallback immediately then use the videoEffect.
6152
+ * Video extension should call this to notify host that the current selected effect parameter changed.
6153
+ * If it's pre-meeting, host will call videoEffectCallback immediately then use the videoEffect.
5868
6154
  * If it's the in-meeting scenario, we will call videoEffectCallback when apply button clicked.
5869
6155
  * @beta
5870
6156
  * @param effectChangeType - the effect change type.
@@ -5872,7 +6158,7 @@ export namespace video {
5872
6158
  */
5873
6159
  function notifySelectedVideoEffectChanged(effectChangeType: EffectChangeType, effectId: string | undefined): void;
5874
6160
  /**
5875
- * Register the video effect callback, host client uses this to notify the video extension the new video effect will by applied
6161
+ * Register the video effect callback, host uses this to notify the video extension the new video effect will by applied
5876
6162
  * @beta
5877
6163
  * @param callback - The VideoEffectCallback to invoke when registerForVideoEffect has completed
5878
6164
  */
@@ -5886,6 +6172,92 @@ export namespace video {
5886
6172
  function isSupported(): boolean;
5887
6173
  }
5888
6174
 
6175
+ /**
6176
+ * Allows your application to interact with the host M365 application's search box.
6177
+ * By integrating your application with the host's search box, users can search
6178
+ * your app using the same search box they use elsewhere in Teams, Outlook, or Office.
6179
+ *
6180
+ * This functionality is in Beta.
6181
+ * @beta
6182
+ */
6183
+ export namespace search {
6184
+ /**
6185
+ * This interface contains information pertaining to the contents of the host M365 application's search box
6186
+ *
6187
+ * @beta
6188
+ */
6189
+ interface SearchQuery {
6190
+ /** The current search term in the host search experience */
6191
+ searchTerm: string;
6192
+ /** Timestamp sequence value to ensure messages are processed in correct order / combine them. */
6193
+ timestamp: number;
6194
+ }
6195
+ /**
6196
+ * This type will store the SearchQuery and allow other logic to be made inside the handler.
6197
+ *
6198
+ * @beta
6199
+ */
6200
+ type SearchQueryHandler = (query: SearchQuery) => void;
6201
+ /**
6202
+ * Allows the caller to register for various events fired by the host search experience.
6203
+ * Calling this function indicates that your application intends to plug into the host's search box and handle search events,
6204
+ * when the user is actively using your page/tab.
6205
+ *
6206
+ * The host may visually update its search box, e.g. with the name or icon of your application.
6207
+ *
6208
+ * Your application should *not* re-render inside of these callbacks, there may be a large number
6209
+ * of onChangeHandler calls if the user is typing rapidly in the search box.
6210
+ *
6211
+ * @param onChangeHandler - This optional handler will be called when the user first starts using the
6212
+ * host's search box and as the user types their query. Can be used to put your application into a
6213
+ * word-wheeling state or to display suggestions as the user is typing.
6214
+ *
6215
+ * This handler will be called with an empty {@link SearchQuery.searchTerm} when search is beginning, and subsequently,
6216
+ * with the current contents of the search box.
6217
+ *
6218
+ * @param onClosedHandler - This handler will be called when the user exits or cancels their search.
6219
+ * Should be used to return your application to its most recent, non-search state. The value of {@link SearchQuery.searchTerm}
6220
+ * will be whatever the last query was before ending search.
6221
+ *
6222
+ * @param onExecuteHandler - The handler will be called when the user executes their
6223
+ * search (by pressing Enter for example). Should be used to display the full list of search results.
6224
+ * The value of {@link SearchQuery.searchTerm} is the complete query the user entered in the search box.
6225
+ *
6226
+ * @example
6227
+ * ``` ts
6228
+ * search.registerHandlers(
6229
+ query => {
6230
+ console.log(`Update your application with the changed search query: ${query.searchTerm}`);
6231
+ },
6232
+ query => {
6233
+ console.log('Update your application to handle the search experience being closed. Last query: ${query.searchTerm}');
6234
+ },
6235
+ query => {
6236
+ console.log(`Update your application to handle an executed search result: ${query.searchTerm}`);
6237
+ },
6238
+ );
6239
+ * ```
6240
+ *
6241
+ * @beta
6242
+ */
6243
+ function registerHandlers(onClosedHandler: SearchQueryHandler, onExecuteHandler: SearchQueryHandler, onChangeHandler?: SearchQueryHandler): void;
6244
+ /**
6245
+ * Allows the caller to unregister for all events fired by the host search experience. Calling
6246
+ * this function will cause your app to stop appearing in the set of search scopes in the hosts
6247
+ *
6248
+ * @beta
6249
+ */
6250
+ function unregisterHandlers(): void;
6251
+ /**
6252
+ * Checks if search capability is supported by the host
6253
+ * @returns true if the search capability is supported by the host and false otherwise
6254
+ * false if it is disabled
6255
+ *
6256
+ * @beta
6257
+ */
6258
+ function isSupported(): boolean;
6259
+ }
6260
+
5889
6261
  export namespace sharing {
5890
6262
  export const SharingAPIMessages: {
5891
6263
  shareWebContent: string;