@microsoft/teams-js 2.17.0 → 2.17.1-beta.1

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.
@@ -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
- /** Capture image callback function type. */
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
- /** Select media callback function type. */
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
- /** Scan BarCode callback function type. */
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
- /** Get media callback function type. */
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: T;
5888
+ protected controllerCallback?: T;
5862
5889
  constructor(controllerCallback?: T);
5863
5890
  protected abstract getMediaType(): MediaType;
5864
5891
  /**