@microsoft/teams-js 2.0.0-beta.3-dev.30 → 2.0.0-beta.3-dev.34

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.
@@ -2835,6 +2835,34 @@ export namespace pages {
2835
2835
  function returnFocus(navigateForward?: boolean): void;
2836
2836
  function setCurrentFrame(frameInfo: FrameInfo): void;
2837
2837
  function initializeWithFrameContext(frameInfo: FrameInfo, callback?: () => void, validMessageOrigins?: string[]): void;
2838
+ interface InstanceConfig {
2839
+ /**
2840
+ * A suggested display name for the new content.
2841
+ * In the settings for an existing instance being updated, this call has no effect.
2842
+ */
2843
+ suggestedDisplayName?: string;
2844
+ /**
2845
+ * Sets the URL to use for the content of this instance.
2846
+ */
2847
+ contentUrl: string;
2848
+ /**
2849
+ * Sets the URL for the removal configuration experience.
2850
+ */
2851
+ removeUrl?: string;
2852
+ /**
2853
+ * Sets the URL to use for the external link to view the underlying resource in a browser.
2854
+ */
2855
+ websiteUrl?: string;
2856
+ /**
2857
+ * The developer-defined unique ID for the entity to which this content points.
2858
+ */
2859
+ entityId?: string;
2860
+ }
2861
+ /**
2862
+ * Gets the config for the current instance.
2863
+ * @returns Promise that resolves with the {@link InstanceConfig} object.
2864
+ */
2865
+ function getConfig(): Promise<InstanceConfig>;
2838
2866
  /**
2839
2867
  * Navigates the frame to a new cross-domain URL. The domain of this URL must match at least one of the
2840
2868
  * valid domains specified in the validDomains block of the manifest; otherwise, an exception will be
@@ -2937,18 +2965,13 @@ export namespace pages {
2937
2965
  * @param validityState Indicates whether the save or remove button is enabled for the user.
2938
2966
  */
2939
2967
  function setValidityState(validityState: boolean): void;
2940
- /**
2941
- * Gets the config for the current instance.
2942
- * @returns Promise that resolves with the {@link Config} object.
2943
- */
2944
- function getConfig(): Promise<Config>;
2945
2968
  /**
2946
2969
  * Sets the config for the current instance.
2947
2970
  * This is an asynchronous operation; calls to getConfig are not guaranteed to reflect the changed state.
2948
- * @param Config The desired config for this instance.
2971
+ * @param instanceConfig The desired config for this instance.
2949
2972
  * @returns Promise that resolves when the operation has completed.
2950
2973
  */
2951
- function setConfig(instanceSettings: Config): Promise<void>;
2974
+ function setConfig(instanceConfig: InstanceConfig): Promise<void>;
2952
2975
  /**
2953
2976
  * Registers a handler for when the user attempts to save the settings. This handler should be used
2954
2977
  * to create or update the underlying resource powering the content.
@@ -2970,29 +2993,6 @@ export namespace pages {
2970
2993
  * @param handler The handler to invoke when the user click on Settings.
2971
2994
  */
2972
2995
  function registerChangeConfigHandler(handler: () => void): void;
2973
- interface Config {
2974
- /**
2975
- * A suggested display name for the new content.
2976
- * In the settings for an existing instance being updated, this call has no effect.
2977
- */
2978
- suggestedDisplayName?: string;
2979
- /**
2980
- * Sets the URL to use for the content of this instance.
2981
- */
2982
- contentUrl: string;
2983
- /**
2984
- * Sets the URL for the removal configuration experience.
2985
- */
2986
- removeUrl?: string;
2987
- /**
2988
- * Sets the URL to use for the external link to view the underlying resource in a browser.
2989
- */
2990
- websiteUrl?: string;
2991
- /**
2992
- * The developer-defined unique ID for the entity to which this content points.
2993
- */
2994
- entityId?: string;
2995
- }
2996
2996
  interface SaveEvent {
2997
2997
  /**
2998
2998
  * Object containing properties passed as arguments to the settings.save event.
@@ -4679,7 +4679,7 @@ export namespace settings {
4679
4679
  * @remarks
4680
4680
  * Renamed to config in pages.Config
4681
4681
  */
4682
- export import Settings = pages.config.Config;
4682
+ export import Settings = pages.InstanceConfig;
4683
4683
  /**
4684
4684
  * @deprecated
4685
4685
  * As of 2.0.0-beta.1, please use {@link pages.config.SaveEvent} instead.
@@ -394,7 +394,7 @@ __webpack_require__.d(__webpack_exports__, {
394
394
  });
395
395
 
396
396
  ;// CONCATENATED MODULE: ./src/internal/constants.ts
397
- var version = "2.0.0-beta.3-dev.30";
397
+ var version = "2.0.0-beta.3-dev.34";
398
398
  /**
399
399
  * @hidden
400
400
  * The SDK version when all SDK APIs started to check platform compatibility for the APIs was 1.6.0.
@@ -2167,6 +2167,17 @@ var pages;
2167
2167
  setCurrentFrame(frameInfo);
2168
2168
  }
2169
2169
  pages.initializeWithFrameContext = initializeWithFrameContext;
2170
+ /**
2171
+ * Gets the config for the current instance.
2172
+ * @returns Promise that resolves with the {@link InstanceConfig} object.
2173
+ */
2174
+ function getConfig() {
2175
+ return new Promise(function (resolve) {
2176
+ ensureInitialized(FrameContexts.content, FrameContexts.settings, FrameContexts.remove, FrameContexts.sidePanel);
2177
+ resolve(sendAndUnwrap('settings.getSettings'));
2178
+ });
2179
+ }
2180
+ pages.getConfig = getConfig;
2170
2181
  /**
2171
2182
  * Navigates the frame to a new cross-domain URL. The domain of this URL must match at least one of the
2172
2183
  * valid domains specified in the validDomains block of the manifest; otherwise, an exception will be
@@ -2310,27 +2321,16 @@ var pages;
2310
2321
  sendMessageToParent('settings.setValidityState', [validityState]);
2311
2322
  }
2312
2323
  config.setValidityState = setValidityState;
2313
- /**
2314
- * Gets the config for the current instance.
2315
- * @returns Promise that resolves with the {@link Config} object.
2316
- */
2317
- function getConfig() {
2318
- return new Promise(function (resolve) {
2319
- ensureInitialized(FrameContexts.content, FrameContexts.settings, FrameContexts.remove, FrameContexts.sidePanel);
2320
- resolve(sendAndUnwrap('settings.getSettings'));
2321
- });
2322
- }
2323
- config.getConfig = getConfig;
2324
2324
  /**
2325
2325
  * Sets the config for the current instance.
2326
2326
  * This is an asynchronous operation; calls to getConfig are not guaranteed to reflect the changed state.
2327
- * @param Config The desired config for this instance.
2327
+ * @param instanceConfig The desired config for this instance.
2328
2328
  * @returns Promise that resolves when the operation has completed.
2329
2329
  */
2330
- function setConfig(instanceSettings) {
2330
+ function setConfig(instanceConfig) {
2331
2331
  return new Promise(function (resolve) {
2332
2332
  ensureInitialized(FrameContexts.content, FrameContexts.settings, FrameContexts.sidePanel);
2333
- resolve(sendAndHandleStatusAndReason('settings.setSettings', instanceSettings));
2333
+ resolve(sendAndHandleStatusAndReason('settings.setSettings', instanceConfig));
2334
2334
  });
2335
2335
  }
2336
2336
  config.setConfig = setConfig;
@@ -5241,7 +5241,7 @@ var settings;
5241
5241
  */
5242
5242
  function getSettings(callback) {
5243
5243
  ensureInitialized(FrameContexts.content, FrameContexts.settings, FrameContexts.remove, FrameContexts.sidePanel);
5244
- pages.config.getConfig().then(function (config) {
5244
+ pages.getConfig().then(function (config) {
5245
5245
  callback(config);
5246
5246
  });
5247
5247
  }