@microsoft/teams-js 2.17.0-beta.2 → 2.17.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/MicrosoftTeams.d.ts +60 -23
- package/dist/MicrosoftTeams.js +1140 -693
- package/dist/MicrosoftTeams.js.map +1 -1
- package/dist/MicrosoftTeams.min.js +1 -1
- package/dist/MicrosoftTeams.min.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
@@ -24,7 +24,7 @@ To install the stable [version](https://learn.microsoft.com/javascript/api/overv
|
|
24
24
|
|
25
25
|
### Production
|
26
26
|
|
27
|
-
You can reference these files directly [from here](https://res.cdn.office.net/teams-js/2.
|
27
|
+
You can reference these files directly [from here](https://res.cdn.office.net/teams-js/2.17.0/js/MicrosoftTeams.min.js) or point your package manager at them.
|
28
28
|
|
29
29
|
## Usage
|
30
30
|
|
@@ -45,13 +45,13 @@ Reference the library inside of your `.html` page using:
|
|
45
45
|
```html
|
46
46
|
<!-- Microsoft Teams JavaScript API (via CDN) -->
|
47
47
|
<script
|
48
|
-
src="https://res.cdn.office.net/teams-js/2.
|
49
|
-
integrity="sha384-
|
48
|
+
src="https://res.cdn.office.net/teams-js/2.17.0/js/MicrosoftTeams.min.js"
|
49
|
+
integrity="sha384-xp55t/129OsN192JZYLP0rGhzjCF9aYtjY0LVtXvolkDrBe4Jchylp56NrUYJ4S2"
|
50
50
|
crossorigin="anonymous"
|
51
51
|
></script>
|
52
52
|
|
53
53
|
<!-- Microsoft Teams JavaScript API (via npm) -->
|
54
|
-
<script src="node_modules/@microsoft/teams-js@2.
|
54
|
+
<script src="node_modules/@microsoft/teams-js@2.17.0/dist/MicrosoftTeams.min.js"></script>
|
55
55
|
|
56
56
|
<!-- Microsoft Teams JavaScript API (via local) -->
|
57
57
|
<script src="MicrosoftTeams.min.js"></script>
|
package/dist/MicrosoftTeams.d.ts
CHANGED
@@ -1104,7 +1104,7 @@ export namespace files {
|
|
1104
1104
|
* @internal
|
1105
1105
|
* Limited to Microsoft-internal use
|
1106
1106
|
*/
|
1107
|
-
export function getExternalProviders(excludeAddedProviders: boolean, callback: (error: SdkError, providers: IExternalProvider[]) => void): void;
|
1107
|
+
export function getExternalProviders(excludeAddedProviders: boolean | undefined, callback: (error: SdkError, providers: IExternalProvider[]) => void): void;
|
1108
1108
|
/**
|
1109
1109
|
* @hidden
|
1110
1110
|
* Allow 1st party apps to call this function to move files
|
@@ -1113,7 +1113,7 @@ export namespace files {
|
|
1113
1113
|
* @internal
|
1114
1114
|
* Limited to Microsoft-internal use
|
1115
1115
|
*/
|
1116
|
-
export function copyMoveFiles(selectedFiles: CloudStorageFolderItem[] | ISharePointFile[], providerCode: CloudStorageProvider, destinationFolder: CloudStorageFolderItem | ISharePointFile, destinationProviderCode: CloudStorageProvider, isMove: boolean, callback: (error?: SdkError) => void): void;
|
1116
|
+
export function copyMoveFiles(selectedFiles: CloudStorageFolderItem[] | ISharePointFile[], providerCode: CloudStorageProvider, destinationFolder: CloudStorageFolderItem | ISharePointFile, destinationProviderCode: CloudStorageProvider, isMove: boolean | undefined, callback: (error?: SdkError) => void): void;
|
1117
1117
|
/**
|
1118
1118
|
* @hidden
|
1119
1119
|
* Hide from docs
|
@@ -1137,7 +1137,7 @@ export namespace files {
|
|
1137
1137
|
* @internal
|
1138
1138
|
* Limited to Microsoft-internal use
|
1139
1139
|
*/
|
1140
|
-
export function openDownloadFolder(fileObjectId: string, callback: (error?: SdkError) => void): void;
|
1140
|
+
export function openDownloadFolder(fileObjectId: string | undefined, callback: (error?: SdkError) => void): void;
|
1141
1141
|
/**
|
1142
1142
|
* @hidden
|
1143
1143
|
* Hide from docs
|
@@ -3790,6 +3790,9 @@ export interface ClipboardParams {
|
|
3790
3790
|
content: string;
|
3791
3791
|
}
|
3792
3792
|
|
3793
|
+
export function appInitializeHelper(apiVersionTag: string, validMessageOrigins?: string[]): Promise<void>;
|
3794
|
+
export function registerOnThemeChangeHandlerHelper(apiVersionTag: string, handler: app.themeHandler): void;
|
3795
|
+
export function openLinkHelper(apiVersionTag: string, deepLink: string): Promise<void>;
|
3793
3796
|
/**
|
3794
3797
|
* Namespace to interact with app initialization and lifecycle.
|
3795
3798
|
*/
|
@@ -4233,7 +4236,7 @@ export namespace app {
|
|
4233
4236
|
* Gets the Frame Context that the App is running in. See {@link FrameContexts} for the list of possible values.
|
4234
4237
|
* @returns the Frame Context.
|
4235
4238
|
*/
|
4236
|
-
function getFrameContext(): FrameContexts;
|
4239
|
+
function getFrameContext(): FrameContexts | undefined;
|
4237
4240
|
/**
|
4238
4241
|
* Initializes the library.
|
4239
4242
|
*
|
@@ -4344,14 +4347,6 @@ export namespace app {
|
|
4344
4347
|
* @beta
|
4345
4348
|
*/
|
4346
4349
|
function registerOnResumeHandler(handler: registerOnResumeHandlerFunctionType): void;
|
4347
|
-
/**
|
4348
|
-
* Checks if app.lifecycle is supported by the host.
|
4349
|
-
* @returns boolean to represent whether the lifecycle capability is supported
|
4350
|
-
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
4351
|
-
*
|
4352
|
-
* @beta
|
4353
|
-
*/
|
4354
|
-
function isSupported(): boolean;
|
4355
4350
|
}
|
4356
4351
|
}
|
4357
4352
|
|
@@ -4551,6 +4546,10 @@ export namespace clipboard {
|
|
4551
4546
|
function isSupported(): boolean;
|
4552
4547
|
}
|
4553
4548
|
|
4549
|
+
export function updateResizeHelper(apiVersionTag: string, dimensions: DialogSize): void;
|
4550
|
+
export function urlOpenHelper(apiVersionTag: string, urlDialogInfo: UrlDialogInfo, submitHandler?: dialog.DialogSubmitHandler, messageFromChildHandler?: dialog.PostMessageChannel): void;
|
4551
|
+
export function botUrlOpenHelper(apiVersionTag: string, urlDialogInfo: BotUrlDialogInfo, submitHandler?: dialog.DialogSubmitHandler, messageFromChildHandler?: dialog.PostMessageChannel): void;
|
4552
|
+
export function urlSubmitHelper(apiVersionTag: string, result?: string | object, appIds?: string | string[]): void;
|
4554
4553
|
/**
|
4555
4554
|
* This group of capabilities enables apps to show modal dialogs. There are two primary types of dialogs: URL-based dialogs and [Adaptive Card](https://learn.microsoft.com/adaptive-cards/) dialogs.
|
4556
4555
|
* Both types of dialogs are shown on top of your app, preventing interaction with your app while they are displayed.
|
@@ -4920,6 +4919,14 @@ export namespace geoLocation {
|
|
4920
4919
|
*/
|
4921
4920
|
export function getAdaptiveCardSchemaVersion(): AdaptiveCardVersion | undefined;
|
4922
4921
|
|
4922
|
+
export function navigateCrossDomainHelper(apiVersionTag: string, url: string): Promise<void>;
|
4923
|
+
export function backStackNavigateBackHelper(apiVersionTag: string): Promise<void>;
|
4924
|
+
export function tabsNavigateToTabHelper(apiVersionTag: string, tabInstance: TabInstance): Promise<void>;
|
4925
|
+
export function returnFocusHelper(apiVersionTag: string, navigateForward?: boolean): void;
|
4926
|
+
export function getTabInstancesHelper(apiVersionTag: string, tabInstanceParameters?: TabInstanceParameters): Promise<TabInformation>;
|
4927
|
+
export function getMruTabInstancesHelper(apiVersionTag: string, tabInstanceParameters?: TabInstanceParameters): Promise<TabInformation>;
|
4928
|
+
export function shareDeepLinkHelper(apiVersionTag: string, deepLinkParameters: ShareDeepLinkParameters): void;
|
4929
|
+
export function setCurrentFrameHelper(apiVersionTag: string, frameInfo: FrameInfo): void;
|
4923
4930
|
/**
|
4924
4931
|
* Navigation-specific part of the SDK.
|
4925
4932
|
*/
|
@@ -5255,11 +5262,11 @@ export namespace pages {
|
|
5255
5262
|
*
|
5256
5263
|
* @internal
|
5257
5264
|
* Limited to Microsoft-internal use
|
5258
|
-
*
|
5265
|
+
* @param apiVersionTag - The tag indicating API version number with name
|
5259
5266
|
* @param handler - The handler to invoke when the user presses the host client's back button.
|
5260
5267
|
* @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
|
5261
5268
|
*/
|
5262
|
-
function registerBackButtonHandlerHelper(handler: () => boolean, versionSpecificHelper?: () => void): void;
|
5269
|
+
function registerBackButtonHandlerHelper(apiVersionTag: string, handler: () => boolean, versionSpecificHelper?: () => void): void;
|
5263
5270
|
/**
|
5264
5271
|
* Checks if the pages.backStack capability is supported by the host
|
5265
5272
|
* @returns boolean to represent whether the pages.backStack capability is supported
|
@@ -5637,15 +5644,35 @@ export namespace menus {
|
|
5637
5644
|
* Interact with media, including capturing and viewing images.
|
5638
5645
|
*/
|
5639
5646
|
export namespace media {
|
5640
|
-
/**
|
5647
|
+
/**
|
5648
|
+
* Function callback type used when calling {@link media.captureImage}.
|
5649
|
+
*
|
5650
|
+
* @param error - Error encountered during the API call, if any, {@link SdkError}
|
5651
|
+
* @param files - Collection of File objects (images) captured by the user. Will be an empty array in the case of an error.
|
5652
|
+
* */
|
5641
5653
|
export type captureImageCallbackFunctionType = (error: SdkError, files: File[]) => void;
|
5642
|
-
/**
|
5654
|
+
/**
|
5655
|
+
* Function callback type used when calling {@link media.selectMedia}.
|
5656
|
+
*
|
5657
|
+
* @param error - Error encountered during the API call, if any, {@link SdkError}
|
5658
|
+
* @param attachments - Collection of {@link Media} objects selected by the user. Will be an empty array in the case of an error.
|
5659
|
+
* */
|
5643
5660
|
export type selectMediaCallbackFunctionType = (error: SdkError, attachments: Media[]) => void;
|
5644
5661
|
/** Error callback function type. */
|
5645
5662
|
export type errorCallbackFunctionType = (error?: SdkError) => void;
|
5646
|
-
/**
|
5663
|
+
/**
|
5664
|
+
* Function callback type used when calling {@link media.scanBarCode}.
|
5665
|
+
*
|
5666
|
+
* @param error - Error encountered during the API call, if any, {@link SdkError}
|
5667
|
+
* @param decodedText - Decoded text from the barcode, if any. In the case of an error, this will be the empty string.
|
5668
|
+
* */
|
5647
5669
|
export type scanBarCodeCallbackFunctionType = (error: SdkError, decodedText: string) => void;
|
5648
|
-
/**
|
5670
|
+
/**
|
5671
|
+
* Function callback type used when calling {@link media.Media.getMedia}
|
5672
|
+
*
|
5673
|
+
* @param error - Error encountered during the API call, if any, {@link SdkError}
|
5674
|
+
* @param blob - Blob of media returned. Will be a blob with no BlobParts, in the case of an error.
|
5675
|
+
* */
|
5649
5676
|
export type getMediaCallbackFunctionType = (error: SdkError, blob: Blob) => void;
|
5650
5677
|
/**
|
5651
5678
|
* Enum for file formats supported
|
@@ -5858,7 +5885,7 @@ export namespace media {
|
|
5858
5885
|
*/
|
5859
5886
|
abstract class MediaController<T> {
|
5860
5887
|
/** Callback that can be registered to handle events related to the playback and control of video content. */
|
5861
|
-
protected controllerCallback
|
5888
|
+
protected controllerCallback?: T;
|
5862
5889
|
constructor(controllerCallback?: T);
|
5863
5890
|
protected abstract getMediaType(): MediaType;
|
5864
5891
|
/**
|
@@ -6050,14 +6077,18 @@ export namespace media {
|
|
6050
6077
|
}
|
6051
6078
|
|
6052
6079
|
/**
|
6053
|
-
* Namespace to power up the in-app browser experiences in the
|
6054
|
-
* For e.g., opening a URL in the
|
6080
|
+
* Namespace to power up the in-app browser experiences in the host app.
|
6081
|
+
* For e.g., opening a URL in the host app inside a browser
|
6055
6082
|
*
|
6056
6083
|
* @beta
|
6057
6084
|
*/
|
6058
6085
|
export namespace secondaryBrowser {
|
6059
6086
|
/**
|
6060
|
-
* Open a URL in the secondary browser
|
6087
|
+
* Open a URL in the secondary browser.
|
6088
|
+
*
|
6089
|
+
* On mobile, this is the in-app browser.
|
6090
|
+
*
|
6091
|
+
* On web and desktop, please use the `window.open()` method or other native external browser methods.
|
6061
6092
|
*
|
6062
6093
|
* @param url Url to open in the browser
|
6063
6094
|
* @returns Promise that successfully resolves if the URL opens in the secondaryBrowser
|
@@ -8512,7 +8543,13 @@ export namespace settings {
|
|
8512
8543
|
* The tasks namespace will be deprecated. Please use dialog for future developments.
|
8513
8544
|
*/
|
8514
8545
|
export namespace tasks {
|
8515
|
-
/**
|
8546
|
+
/**
|
8547
|
+
* Function type that is used to receive the result when a task module is submitted by
|
8548
|
+
* calling {@link tasks.submitTask tasks.submitTask(result?: string | object, appIds?: string | string[]): void}
|
8549
|
+
*
|
8550
|
+
* @param err - If the task module failed, this string contains the reason for failure. If the task module succeeded, this value is the empty string.
|
8551
|
+
* @param result - On success, this is the value passed to the `result` parameter of {@link tasks.submitTask tasks.submitTask(result?: string | object, appIds?: string | string[]): void}. On failure, this is the empty string.
|
8552
|
+
*/
|
8516
8553
|
type startTaskSubmitHandlerFunctionType = (err: string, result: string | object) => void;
|
8517
8554
|
/**
|
8518
8555
|
* @deprecated
|