@omnia/fx 7.11.0-preview.x → 7.11.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.
Files changed (136) hide show
  1. package/LICENSE.txt +14 -0
  2. package/internal-do-not-import-from-here/contexts/InternalAppContext.d.ts +4 -4
  3. package/internal-do-not-import-from-here/core/Cookies.d.ts +1 -0
  4. package/internal-do-not-import-from-here/core/console/ConsoleKeyboardShortcuts.d.ts +1 -0
  5. package/internal-do-not-import-from-here/core/messaging/BuiltInTopics.d.ts +1 -0
  6. package/internal-do-not-import-from-here/core/utils/AlternateLayoutTitleUtils.d.ts +6 -0
  7. package/internal-do-not-import-from-here/core/utils/index.d.ts +1 -0
  8. package/internal-do-not-import-from-here/index.d.ts +1 -0
  9. package/internal-do-not-import-from-here/manifests/omnia.fx.core.manifest.json +1 -1
  10. package/internal-do-not-import-from-here/manifests/omnia.fx.manifest.json +1 -1
  11. package/internal-do-not-import-from-here/manifests/omnia.fx.ux.manifest.json +1 -1
  12. package/internal-do-not-import-from-here/manifests/omnia.fx.ux.richtexteditor.manifest.json +1 -1
  13. package/internal-do-not-import-from-here/manifests/omnia.fx.worker.manifest.json +1 -1
  14. package/internal-do-not-import-from-here/manifests/omnia.vendor.manifest.json +1 -1
  15. package/internal-do-not-import-from-here/runtime/clientboot/Boot.d.ts +1 -0
  16. package/internal-do-not-import-from-here/services/AzureOpenAIService.d.ts +2 -1
  17. package/internal-do-not-import-from-here/services/BusinessProfileService.d.ts +1 -0
  18. package/internal-do-not-import-from-here/services/SemanticSearchService.d.ts +3 -1
  19. package/internal-do-not-import-from-here/services/permissions/PermissionService.d.ts +1 -0
  20. package/internal-do-not-import-from-here/spfx/components/SpfxCustomizeStyle.d.ts +5 -0
  21. package/internal-do-not-import-from-here/stores/BusinessProfileStore.d.ts +1 -0
  22. package/internal-do-not-import-from-here/stores/EnterprisePropertyStore.d.ts +0 -1
  23. package/internal-do-not-import-from-here/stores/GroupIdentityStore.d.ts +1 -0
  24. package/internal-do-not-import-from-here/stores/ProfileCardStore.d.ts +9 -5
  25. package/internal-do-not-import-from-here/ux/AnchorLink.d.ts +3 -0
  26. package/internal-do-not-import-from-here/ux/ComponentDefinitions.d.ts +1 -1
  27. package/internal-do-not-import-from-here/ux/TokenBasedRouter.d.ts +2 -0
  28. package/internal-do-not-import-from-here/ux/UxModels.d.ts +32 -0
  29. package/internal-do-not-import-from-here/ux/UxStyles.d.ts +1 -0
  30. package/internal-do-not-import-from-here/ux/app/management/api/AppManagementApi.d.ts +3 -0
  31. package/internal-do-not-import-from-here/ux/appprovisioning/apptitledescription/AppDescriptionInput.d.ts +2 -0
  32. package/internal-do-not-import-from-here/ux/appprovisioning/apptitledescription/IAppDescriptionInput.d.ts +1 -0
  33. package/internal-do-not-import-from-here/ux/authsetup/AuthSetupConfirm.d.ts +7 -0
  34. package/internal-do-not-import-from-here/ux/authsetup/loc/localize.d.ts +2 -0
  35. package/internal-do-not-import-from-here/ux/confirmdialog/ConfirmDialog.d.ts +2 -0
  36. package/internal-do-not-import-from-here/ux/confirmdialog/IConfirmDialog.d.ts +1 -0
  37. package/internal-do-not-import-from-here/ux/draggable/Draggable.d.ts +1 -1
  38. package/internal-do-not-import-from-here/ux/features/FeatureActivation.d.ts +1 -0
  39. package/internal-do-not-import-from-here/ux/features/loc/localize.d.ts +1 -0
  40. package/internal-do-not-import-from-here/ux/filterengine/FilterEngineSettings.d.ts +4 -0
  41. package/internal-do-not-import-from-here/ux/identitypicker/IdentityPickerButton.d.ts +5 -1
  42. package/internal-do-not-import-from-here/ux/layoutcanvas/editor/LayoutEditorCanvas.d.ts +3 -0
  43. package/internal-do-not-import-from-here/ux/layoutcanvas/editor/layoutitemactiontoolbar/LayoutItemActionToolbar.d.ts +5 -0
  44. package/internal-do-not-import-from-here/ux/layoutcanvas/editor/layoutitems/LayoutColumn.d.ts +7 -0
  45. package/internal-do-not-import-from-here/ux/layoutcanvas/editor/layoutitems/LayoutSection.d.ts +2 -0
  46. package/internal-do-not-import-from-here/ux/layoutcanvas/editor/settings/BlockSettingsPanel.d.ts +1 -0
  47. package/internal-do-not-import-from-here/ux/layoutcanvas/editor/settings/LayoutStructure.d.ts +4 -2
  48. package/internal-do-not-import-from-here/ux/layoutcanvas/editor/settings/blocktitle/BlockTitle.d.ts +1 -0
  49. package/internal-do-not-import-from-here/ux/layoutcanvas/editor/settings/blocktitle/IBlockTitle.d.ts +1 -0
  50. package/internal-do-not-import-from-here/ux/layoutcanvas/editor/settings/breakpoints/BreakPointSectionSettingsComponent.d.ts +1 -0
  51. package/internal-do-not-import-from-here/ux/layoutcanvas/editor/settings/breakpoints/BreakPointSettingsComponent.d.ts +2 -0
  52. package/internal-do-not-import-from-here/ux/layoutcanvas/editor/settings/section/General.d.ts +1 -0
  53. package/internal-do-not-import-from-here/ux/layoutcanvas/editor/settings/tabs/TabBlockSettings.d.ts +1 -0
  54. package/internal-do-not-import-from-here/ux/layoutcanvas/factories/EditorLayoutItemFactory.d.ts +1 -0
  55. package/internal-do-not-import-from-here/ux/layoutcanvas/renderer/LayoutRendererCanvas.d.ts +3 -1
  56. package/internal-do-not-import-from-here/ux/layoutcanvas/rules/LayoutItemRules.d.ts +2 -1
  57. package/internal-do-not-import-from-here/ux/layoutcanvas/shared/BlockSettingsProvider.d.ts +4 -4
  58. package/internal-do-not-import-from-here/ux/layoutcanvas/shared/BreakPointManager.d.ts +3 -0
  59. package/internal-do-not-import-from-here/ux/layoutcanvas/shared/LayoutItemDelegator.d.ts +16 -0
  60. package/internal-do-not-import-from-here/ux/layoutcanvas/shared/LayoutManager.d.ts +3 -1
  61. package/internal-do-not-import-from-here/ux/layoutcanvas/shared/index.d.ts +1 -0
  62. package/internal-do-not-import-from-here/ux/layoutcanvas/shared/layoutdefinitionsettings/LayoutItemSettingsDefinitions.d.ts +2 -2
  63. package/internal-do-not-import-from-here/ux/layoutcanvas/shared/layoutitemsrenderer/LayoutBlockRenderer.d.ts +4 -0
  64. package/internal-do-not-import-from-here/ux/layoutcanvas/shared/layoutitemsrenderer/LayoutColumnRenderer.d.ts +6 -0
  65. package/internal-do-not-import-from-here/ux/layoutcanvas/shared/layoutitemsrenderer/LayoutSectionRenderer.d.ts +4 -0
  66. package/internal-do-not-import-from-here/ux/layoutcanvas/shared/styles/LayoutSectionContainerHelper.d.ts +10 -0
  67. package/internal-do-not-import-from-here/ux/layoutcanvas/shared/styles/SharedRendererStyles.css.d.ts +2 -0
  68. package/internal-do-not-import-from-here/ux/layoutcanvas/stores/LayoutCanvasStore.d.ts +35 -17
  69. package/internal-do-not-import-from-here/ux/mediapickerproviders/Youtube/YouTubeProvider.d.ts +1 -0
  70. package/internal-do-not-import-from-here/ux/mediapickerproviders/gptimageprovider/GptImageProvider.css.d.ts +41 -0
  71. package/internal-do-not-import-from-here/ux/mediapickerproviders/gptimageprovider/GptImageProvider.d.ts +53 -0
  72. package/internal-do-not-import-from-here/ux/mediapickerproviders/gptimageprovider/PollingImageComponent.d.ts +47 -0
  73. package/internal-do-not-import-from-here/ux/mediapickerproviders/gptimageprovider/loc/localize.d.ts +23 -0
  74. package/internal-do-not-import-from-here/ux/mediapickerproviders/mediaflow/models/MediaflowMedia.d.ts +1 -0
  75. package/internal-do-not-import-from-here/ux/print/api/PrintHandlerApi.d.ts +1 -0
  76. package/internal-do-not-import-from-here/ux/profilecard/ProfileCard.d.ts +2 -0
  77. package/internal-do-not-import-from-here/ux/richtexteditor/IRichTextEditor.d.ts +5 -0
  78. package/internal-do-not-import-from-here/ux/richtexteditor/RichTextEditor.d.ts +3 -1
  79. package/internal-do-not-import-from-here/ux/richtexteditor/RichTextEditorSettings.d.ts +13 -1
  80. package/internal-do-not-import-from-here/ux/richtexteditor/extensions/Alignment/AlignmentNode.d.ts +2 -2
  81. package/internal-do-not-import-from-here/ux/richtexteditor/extensions/MediaPicker/MediaPickerEditorExtension.d.ts +7 -2
  82. package/internal-do-not-import-from-here/ux/richtexteditor/extensions/RemoveFormatting/RemoveFormatingNode.d.ts +0 -3
  83. package/internal-do-not-import-from-here/ux/richtexteditor/extensions/RemoveFormatting/RemoveFormatting.d.ts +3 -1
  84. package/internal-do-not-import-from-here/ux/richtexteditor/extensions/RemoveFormatting/Utils.d.ts +1 -0
  85. package/internal-do-not-import-from-here/ux/richtexteditor/extensions/RemoveFormatting/index.d.ts +1 -0
  86. package/internal-do-not-import-from-here/ux/richtexteditor/extensions/loc/localize.d.ts +5 -0
  87. package/internal-do-not-import-from-here/ux/settings/ISettingsPane.d.ts +1 -0
  88. package/internal-do-not-import-from-here/ux/settings/SettingsPane.css.d.ts +1 -0
  89. package/internal-do-not-import-from-here/ux/settings/SettingsPane.d.ts +1 -0
  90. package/internal-do-not-import-from-here/ux/signin/omnia/Renderer.d.ts +4 -4
  91. package/internal-do-not-import-from-here/ux/social/templates/CommentLikeTemplate.d.ts +2 -0
  92. package/internal-do-not-import-from-here/wcdefinitions.json +1 -1
  93. package/internal-do-not-import-from-here/wctypings.d.ts +178 -174
  94. package/package.json +4 -4
  95. package/internal-do-not-import-from-here/microsoftteams/MicrosoftTeams.d.ts +0 -5
  96. package/internal-do-not-import-from-here/shared/models/Bring.d.ts +0 -23
  97. package/internal-do-not-import-from-here/shared/models/Bring.js +0 -2
  98. package/internal-do-not-import-from-here/shared/models/Broadcasting.d.ts +0 -25
  99. package/internal-do-not-import-from-here/shared/models/Broadcasting.js +0 -12
  100. package/internal-do-not-import-from-here/shared/models/Future.d.ts +0 -52
  101. package/internal-do-not-import-from-here/shared/models/Future.js +0 -158
  102. package/internal-do-not-import-from-here/shared/models/Guid.d.ts +0 -17
  103. package/internal-do-not-import-from-here/shared/models/Guid.js +0 -51
  104. package/internal-do-not-import-from-here/shared/models/OmniaSharedBootstrapData.d.ts +0 -32
  105. package/internal-do-not-import-from-here/shared/models/OmniaSharedBootstrapData.js +0 -2
  106. package/internal-do-not-import-from-here/shared/models/Realtime.d.ts +0 -40
  107. package/internal-do-not-import-from-here/shared/models/Realtime.js +0 -40
  108. package/internal-do-not-import-from-here/shared/models/SharedConstants.d.ts +0 -6
  109. package/internal-do-not-import-from-here/shared/models/SharedConstants.js +0 -10
  110. package/internal-do-not-import-from-here/shared/models/StringExtensions.d.ts +0 -6
  111. package/internal-do-not-import-from-here/shared/models/StringExtensions.js +0 -3
  112. package/internal-do-not-import-from-here/shared/models/Tenant.d.ts +0 -4
  113. package/internal-do-not-import-from-here/shared/models/Tenant.js +0 -2
  114. package/internal-do-not-import-from-here/shared/models/Tokens.d.ts +0 -14
  115. package/internal-do-not-import-from-here/shared/models/Tokens.js +0 -2
  116. package/internal-do-not-import-from-here/shared/models/Topic.d.ts +0 -10
  117. package/internal-do-not-import-from-here/shared/models/Topic.js +0 -2
  118. package/internal-do-not-import-from-here/shared/models/WorkerProxyFuncs.d.ts +0 -8
  119. package/internal-do-not-import-from-here/shared/models/WorkerProxyFuncs.js +0 -14
  120. package/internal-do-not-import-from-here/shared/models/Workers.d.ts +0 -29
  121. package/internal-do-not-import-from-here/shared/models/Workers.js +0 -8
  122. package/internal-do-not-import-from-here/shared/models/index.d.ts +0 -14
  123. package/internal-do-not-import-from-here/shared/models/index.js +0 -18
  124. package/internal-do-not-import-from-here/shared/models/theming/BlueprintDefinition.d.ts +0 -27
  125. package/internal-do-not-import-from-here/shared/models/theming/BlueprintDefinition.js +0 -2
  126. package/internal-do-not-import-from-here/shared/models/theming/OmniaThemes.d.ts +0 -5
  127. package/internal-do-not-import-from-here/shared/models/theming/OmniaThemes.js +0 -18
  128. package/internal-do-not-import-from-here/shared/models/theming/ThemeDefinitionV2.d.ts +0 -61
  129. package/internal-do-not-import-from-here/shared/models/theming/ThemeDefinitionV2.js +0 -24
  130. package/internal-do-not-import-from-here/shared/models/theming/ThemeMethods.d.ts +0 -11
  131. package/internal-do-not-import-from-here/shared/models/theming/ThemeMethods.js +0 -143
  132. package/internal-do-not-import-from-here/shared/models/theming/TypographyDefinition.d.ts +0 -29
  133. package/internal-do-not-import-from-here/shared/models/theming/TypographyDefinition.js +0 -11
  134. package/internal-do-not-import-from-here/shared/models/theming/index.d.ts +0 -4
  135. package/internal-do-not-import-from-here/shared/models/theming/index.js +0 -7
  136. package/internal-do-not-import-from-here/ux/shim-tsx.d.ts +0 -14
@@ -1,5 +0,0 @@
1
- export module "@microsoft/teams-js" {
2
- export = microsoftTeams;
3
- }
4
- declare namespace microsoftTeams {
5
- export const version = "1.6.0";
6
  export const validOrigins: string[];
7
1
  export const frameContexts: {
8
2
  settings: string;
9
3
  content: string;
10
4
  authentication: string;
11
5
  remove: string;
12
6
  task: string;
13
7
  };
14
8
  export const validOriginRegExp: RegExp;
15
9
  /**
16
10
  * USer specified message origins should satisfy this test
17
11
  */
18
12
  export const userOriginUrlValidationRegExp: RegExp;
19
13
  export class GlobalVars {
20
14
  static initializeCalled: boolean;
21
15
  static initializeCompleted: boolean;
22
16
  static additionalValidOrigins: string[];
23
17
  static additionalValidOriginsRegexp: RegExp;
24
18
  static initializeCallbacks: {
25
19
  (): void;
26
20
  }[];
27
21
  static currentWindow: Window | any;
28
22
  static parentWindow: Window | any;
29
23
  static isFramelessWindow: boolean;
30
24
  static parentOrigin: string;
31
25
  static frameContext: string;
32
26
  static childWindow: Window;
33
27
  static childOrigin: string;
34
28
  static parentMessageQueue: MessageRequest[];
35
29
  static childMessageQueue: MessageRequest[];
36
30
  static nextMessageId: number;
37
31
  static handlers: {
38
32
  [func: string]: Function;
39
33
  };
40
34
  static callbacks: {
41
35
  [id: number]: Function;
42
36
  };
43
37
  static hostClientType: string;
44
38
  static printCapabilityEnabled: boolean;
45
39
  static themeChangeHandler: (theme: string) => void;
46
40
  static fullScreenChangeHandler: (isFullScreen: boolean) => void;
47
41
  static backButtonPressHandler: () => boolean;
48
42
  static loadHandler: (context: LoadContext) => void;
49
43
  static beforeUnloadHandler: (readyToUnload: () => void) => boolean;
50
44
  static changeSettingsHandler: () => void;
51
45
  static onStartConversationHandler: (conversationResponse: ConversationResponse) => void;
52
46
  static onCloseConversationHandler: (conversationResponse: ConversationResponse) => void;
53
47
  static getLogHandler: () => string;
54
48
  }
55
49
  /**
56
50
  * @private
57
51
  * Hide from docs
58
52
  * Shim in definitions used for browser-compat
59
53
  */
60
54
  export interface DOMMessageEvent {
61
55
  origin?: any;
62
56
  source?: any;
63
57
  data?: any;
64
58
  originalEvent: DOMMessageEvent;
65
59
  }
66
60
  /**
67
61
  * @private
68
62
  * Hide from docs
69
63
  */
70
64
  export interface TeamsNativeClient {
71
65
  framelessPostMessage(msg: string): void;
72
66
  }
73
67
  /**
74
68
  * @private
75
69
  * Hide from docs
76
70
  */
77
71
  export interface ExtendedWindow extends Window {
78
72
  nativeInterface: TeamsNativeClient;
79
73
  onNativeMessage(evt: DOMMessageEvent): void;
80
74
  }
81
75
  export interface MessageRequest {
82
76
  id?: number;
83
77
  func: string;
84
78
  args?: any[];
85
79
  }
86
80
  export interface MessageResponse {
87
81
  id: number;
88
82
  args?: any[];
89
83
  }
90
84
  /**
91
85
  * Meant for Message objects that are sent to children without id
92
86
  */
93
87
  export interface DOMMessageEvent {
94
88
  func: string;
95
89
  args?: any[];
96
90
  }
97
91
  export function ensureInitialized(...expectedFrameContexts: string[]): void;
98
92
  export function processMessage(evt: DOMMessageEvent): void;
99
93
  export function handleParentMessage(evt: DOMMessageEvent): void;
100
94
  /**
101
95
  * Processes the valid origins specifuied by the user, de-duplicates and converts them into a regexp
102
96
  * which is used later for message source/origin validation
103
97
  */
104
98
  export function processAdditionalValidOrigins(validMessageOrigins: string[]): void;
105
99
  export function waitForMessageQueue(targetWindow: Window, callback: () => void): void;
106
100
  /**
107
101
  * Send a message to parent. Uses nativeInterface on mobile to communicate with parent context
108
102
  */
109
103
  export function sendMessageRequestToParent(actionName: string, args?: any[]): number;
110
104
  /**
111
105
  * Send a custom message object that can be sent to child window,
112
106
  * instead of a response message to a child
113
107
  */
114
108
  export function sendMessageEventToChild(actionName: string, args?: any[]): void;
115
109
  export function generateRegExpFromUrls(urls: string[]): RegExp;
116
110
  export function getGenericOnCompleteHandler(errorMessage?: string): (success: boolean, reason?: string) => void;
117
111
  /**
118
112
  * @private
119
113
  * Namespace to interact with bots using the SDK.
120
114
  */
121
115
  export namespace bot {
122
116
  /**
123
117
  * @private
124
118
  * Hide from docs until release.
125
119
  * ------
126
120
  * Sends query to bot in order to retrieve data.
127
121
  * @param botRequest query to send to bot.
128
122
  * @param onSuccess callback to invoke when data is retrieved from bot
129
123
  * @param onError callback to invoke should an error occur
130
124
  */
131
125
  function sendQuery(botRequest: QueryRequest, onSuccess?: (data: QueryResponse) => void, onError?: (error: string) => void): void;
132
126
  /**
133
127
  * @private
134
128
  * Hide from docs until release.
135
129
  * -----
136
130
  * Retrieves list of support commands from bot
137
131
  * @param onSuccess callback to invoke when data is retrieved from bot
138
132
  * @param onError callback to invoke should an error occur
139
133
  */
140
134
  function getSupportedCommands(onSuccess?: (response: Command[]) => void, onError?: (error: string) => void): void;
141
135
  /**
142
136
  * @private
143
137
  * Hide from docs until release.
144
138
  * -----
145
139
  * Authenticates a user for json tab
146
140
  * @param authRequest callback to invoke when data is retrieved from bot
147
141
  * @param onSuccess callback to invoke when user is authenticated
148
142
  * @param onError callback to invoke should an error occur
149
143
  */
150
144
  function authenticate(authRequest: AuthQueryRequest, onSuccess?: (results: Results) => void, onError?: (error: string) => void): void;
151
145
  interface QueryRequest {
152
146
  /**
153
147
  * Query to search for
154
148
  */
155
149
  query: string;
156
150
  commandId?: string;
157
151
  option?: {
158
152
  skip: number;
159
153
  count: number;
160
154
  };
161
155
  }
162
156
  interface QueryResponse {
163
157
  data: Results | Auth;
164
158
  type: ResponseType;
165
159
  }
166
160
  interface Results {
167
161
  attachments: Attachment[];
168
162
  layout: any;
169
163
  botId: string;
170
164
  }
171
165
  interface Auth {
172
166
  url: string;
173
167
  title: string;
174
168
  }
175
169
  interface AuthQueryRequest extends QueryRequest {
176
170
  url: string;
177
171
  }
178
172
  interface Attachment {
179
173
  card: any;
180
174
  previewCard: any;
181
175
  previewRawPayload: any;
182
176
  rawPayload: any;
183
177
  }
184
178
  interface Command {
185
179
  title: string;
186
180
  id: string;
187
181
  initialRun: boolean;
188
182
  }
189
183
  enum ResponseType {
190
184
  Results = "Results",
191
185
  Auth = "Auth"
192
186
  }
193
187
  }
194
188
  /**
195
189
  * Namespace to interact with the conversational subEntities inside the tab
196
190
  */
197
191
  export namespace conversations {
198
192
  /**
199
193
  * @private
200
194
  * Hide from docs
201
195
  * --------------
202
196
  * Allows the user to start or continue a conversation with each subentity inside the tab
203
197
  */
204
198
  function openConversation(openConversationRequest: OpenConversationRequest): void;
205
199
  /**
206
200
  * @private
207
201
  * Hide from docs
208
202
  * --------------
209
203
  * Allows the user to close the conversation in the right pane
210
204
  */
211
205
  function closeConversation(): void;
212
206
  }
213
207
  /**
214
208
  * @private
215
209
  * Hide from docs
216
210
  * --------
217
211
  * Information about all members in a chat
218
212
  */
219
213
  export interface ChatMembersInformation {
220
214
  members: ThreadMember[];
221
215
  }
222
216
  /**
223
217
  * @private
224
218
  * Hide from docs
225
219
  * --------
226
220
  * Information about a chat member
227
221
  */
228
222
  export interface ThreadMember {
229
223
  /**
230
224
  * The member's user principal name in the current tenant.
231
225
  */
232
226
  upn: string;
233
227
  }
234
228
  export const enum NotificationTypes {
235
229
  fileDownloadStart = "fileDownloadStart",
236
230
  fileDownloadComplete = "fileDownloadComplete"
237
231
  }
238
232
  export interface ShowNotificationParameters {
239
233
  message: string;
240
234
  notificationType: NotificationTypes;
241
235
  }
242
236
  /**
243
237
  * @private
244
238
  * Hide from docs.
245
239
  * ------
246
240
  */
247
241
  export interface FilePreviewParameters {
248
242
  /**
249
243
  * The developer-defined unique ID for the file.
250
244
  */
251
245
  entityId: string;
252
246
  /**
253
247
  * The display name of the file.
254
248
  */
255
249
  title: string;
256
250
  /**
257
251
  * An optional description of the file.
258
252
  */
259
253
  description?: string;
260
254
  /**
261
255
  * The file extension; e.g. pptx, docx, etc.
262
256
  */
263
257
  type: string;
264
258
  /**
265
259
  * A url to the source of the file, used to open the content in the user's default browser
266
260
  */
267
261
  objectUrl: string;
268
262
  /**
269
263
  * Optional; an alternate self-authenticating url used to preview the file in Mobile clients and offer it for download by the user
270
264
  */
271
265
  downloadUrl?: string;
272
266
  /**
273
267
  * Optional; an alternate url optimized for previewing the file in Teams web and desktop clients
274
268
  */
275
269
  webPreviewUrl?: string;
276
270
  /**
277
271
  * Optional; an alternate url that allows editing of the file in Teams web and desktop clients
278
272
  */
279
273
  webEditUrl?: string;
280
274
  /**
281
275
  * Optional; the base url of the site where the file is hosted
282
276
  */
283
277
  baseUrl?: string;
284
278
  /**
285
279
  * Optional; indicates whether the file should be opened in edit mode
286
280
  */
287
281
  editFile?: boolean;
288
282
  /**
289
283
  * Optional; the developer-defined unique ID for the sub-entity to return to when the file stage closes.
290
284
  * This field should be used to restore to a specific state within an entity, such as scrolling to or activating a specific piece of content.
291
285
  */
292
286
  subEntityId?: string;
293
287
  }
294
288
  /**
295
289
  * @private
296
290
  * Hide from docs
297
291
  * --------
298
292
  * Query parameters used when fetching team information
299
293
  */
300
294
  export interface TeamInstanceParameters {
301
295
  /**
302
296
  * Flag allowing to select favorite teams only
303
297
  */
304
298
  favoriteTeamsOnly?: boolean;
305
299
  }
306
300
  /**
307
301
  * @private
308
302
  * Hide from docs
309
303
  * --------
310
304
  * Information on userJoined Teams
311
305
  */
312
306
  export interface UserJoinedTeamsInformation {
313
307
  /**
314
308
  * List of team information
315
309
  */
316
310
  userJoinedTeams: TeamInformation[];
317
311
  }
318
312
  /**
319
313
  * Namespace to interact with the logging part of the SDK.
320
314
  * This object is used to send the app logs on demand to the host client
321
315
  *
322
316
  * @private
323
317
  * Hide from docs
324
318
  */
325
319
  export namespace logs {
326
320
  /**
327
321
  * @private
328
322
  * Hide from docs
329
323
  * ------
330
324
  * Registers a handler for getting app log
331
325
  * @param handler The handler to invoke to get the app log
332
326
  */
333
327
  function registerGetLogHandler(handler: () => string): void;
334
328
  }
335
329
  /**
336
330
  * Namespace to interact with the menu-specific part of the SDK.
337
331
  * This object is used to show View Configuration, Action Menu and Navigation Bar Menu.
338
332
  *
339
333
  * @private
340
334
  * Hide from docs until feature is complete
341
335
  */
342
336
  export namespace menus {
343
337
  /**
344
338
  * Represents information about item in View Configuration.
345
339
  */
346
340
  interface ViewConfiguration {
347
341
  /**
348
342
  * Unique identifier of view.
349
343
  */
350
344
  id: string;
351
345
  /**
352
346
  * Display title of the view.
353
347
  */
354
348
  title: string;
355
349
  /**
356
350
  * Additional information for accessibility.
357
351
  */
358
352
  contentDescription?: string;
359
353
  }
360
354
  /**
361
355
  * Represents information about menu item for Action Menu and Navigation Bar Menu.
362
356
  */
363
357
  class MenuItem {
364
358
  /**
365
359
  * Unique identifier for the menu item.
366
360
  */
367
361
  id: string;
368
362
  /**
369
363
  * Display title of the menu item.
370
364
  */
371
365
  title: string;
372
366
  /**
373
367
  * Display icon of the menu item. The icon value must be a string having SVG icon content.
374
368
  */
375
369
  icon?: string;
376
370
  /**
377
371
  * Selected state display icon of the menu item. The icon value must be a string having SVG icon content.
378
372
  */
379
373
  iconSelected?: string;
380
374
  /**
381
375
  * Additional information for accessibility.
382
376
  */
383
377
  contentDescription?: string;
384
378
  /**
385
379
  * State of the menu item
386
380
  */
387
381
  enabled: boolean;
388
382
  /**
389
383
  * Interface to show list of items on selection of menu item.
390
384
  */
391
385
  viewData: ViewData;
392
386
  }
393
387
  /**
394
388
  * Represents information about view to show on Navigation Bar Menu item selection
395
389
  */
396
390
  interface ViewData {
397
391
  /**
398
392
  * Display header title of the item list.
399
393
  */
400
394
  listTitle?: string;
401
395
  /**
402
396
  * Type of the menu item.
403
397
  */
404
398
  listType: MenuListType;
405
399
  /**
406
400
  * Array of MenuItem. Icon value will be required for all items in the list.
407
401
  */
408
402
  listItems: MenuItem[];
409
403
  }
410
404
  /**
411
405
  * Represents information about type of list to display in Navigation Bar Menu.
412
406
  */
413
407
  enum MenuListType {
414
408
  dropDown = "dropDown",
415
409
  popOver = "popOver"
416
410
  }
417
411
  /**
418
412
  * Registers list of view configurations and it's handler.
419
413
  * Handler is responsible for listening selection of View Configuration.
420
414
  * @param viewConfig List of view configurations. Minimum 1 value is required.
421
415
  * @param handler The handler to invoke when the user selects view configuration.
422
416
  */
423
417
  function setUpViews(viewConfig: ViewConfiguration[], handler: (id: string) => boolean): void;
424
418
  /**
425
419
  * Used to set menu items on the Navigation Bar. If icon is available, icon will be shown, otherwise title will be shown.
426
420
  * @param items List of MenuItems for Navigation Bar Menu.
427
421
  * @param handler The handler to invoke when the user selects menu item.
428
422
  */
429
423
  function setNavBarMenu(items: MenuItem[], handler: (id: string) => boolean): void;
430
424
  interface ActionMenuParameters {
431
425
  /**
432
426
  * Display title for Action Menu
433
427
  */
434
428
  title: string;
435
429
  /**
436
430
  * List of MenuItems for Action Menu
437
431
  */
438
432
  items: MenuItem[];
439
433
  }
440
434
  /**
441
435
  * Used to show Action Menu.
442
436
  * @param params Parameters for Menu Parameters
443
437
  * @param handler The handler to invoke when the user selects menu item.
444
438
  */
445
439
  function showActionMenu(params: ActionMenuParameters, handler: (id: string) => boolean): void;
446
440
  }
447
441
  /**
448
442
  * @private
449
443
  * Hide from docs
450
444
  * ------
451
445
  * Allows an app to retrieve information of all user joined teams
452
446
  * @param callback The callback to invoke when the {@link TeamInstanceParameters} object is retrieved.
453
447
  * @param teamInstanceParameters OPTIONAL Flags that specify whether to scope call to favorite teams
454
448
  */
455
449
  export function getUserJoinedTeams(callback: (userJoinedTeamsInformation: UserJoinedTeamsInformation) => void, teamInstanceParameters?: TeamInstanceParameters): void;
456
450
  /**
457
451
  * @private
458
452
  * Hide from docs
459
453
  * ------
460
454
  * Place the tab into full-screen mode.
461
455
  */
462
456
  export function enterFullscreen(): void;
463
457
  /**
464
458
  * @private
465
459
  * Hide from docs
466
460
  * ------
467
461
  * Reverts the tab into normal-screen mode.
468
462
  */
469
463
  export function exitFullscreen(): void;
470
464
  /**
471
465
  * @private
472
466
  * Hide from docs.
473
467
  * ------
474
468
  * Opens a client-friendly preview of the specified file.
475
469
  * @param file The file to preview.
476
470
  */
477
471
  export function openFilePreview(filePreviewParameters: FilePreviewParameters): void;
478
472
  /**
479
473
  * @private
480
474
  * Hide from docs.
481
475
  * ------
482
476
  * display notification API.
483
477
  * @param message Notification message.
484
478
  * @param notificationType Notification type
485
479
  */
486
480
  export function showNotification(showNotificationParameters: ShowNotificationParameters): void;
487
481
  /**
488
482
  * @private
489
483
  * Hide from docs.
490
484
  * ------
491
485
  * Upload a custom App manifest directly to both team and personal scopes.
492
486
  * This method works just for the first party Apps.
493
487
  */
494
488
  export function uploadCustomApp(manifestBlob: Blob, onComplete?: (status: boolean, reason?: string) => void): void;
495
489
  /**
496
490
  * @private
497
491
  * Internal use only
498
492
  * Sends a custom action MessageRequest to Teams or parent window
499
493
  * @param actionName Specifies name of the custom action to be sent
500
494
  * @param args Specifies additional arguments passed to the action
501
495
  * @param callback Optionally specify a callback to receive response parameters from the parent
502
496
  * @returns id of sent message
503
497
  */
504
498
  export function sendCustomMessage(actionName: string, args?: any[], callback?: (...args: any[]) => void): number;
505
499
  /**
506
500
  * @private
507
501
  * Internal use only
508
502
  * Sends a custom action MessageEvent to a child iframe/window, only if you are not using auth popup.
509
503
  * Otherwise it will go to the auth popup (which becomes the child)
510
504
  * @param actionName Specifies name of the custom action to be sent
511
505
  * @param args Specifies additional arguments passed to the action
512
506
  * @returns id of sent message
513
507
  */
514
508
  export function sendCustomEvent(actionName: string, args?: any[]): void;
515
509
  /**
516
510
  * @private
517
511
  * Internal use only
518
512
  * Adds a handler for an action sent by a child window or parent window
519
513
  * @param actionName Specifies name of the action message to handle
520
514
  * @param customHandler The callback to invoke when the action message is received. The return value is sent to the child
521
515
  */
522
516
  export function registerCustomHandler(actionName: string, customHandler: (...args: any[]) => any[]): void;
523
517
  /**
524
518
  * @private
525
519
  * Hide from docs
526
520
  * ------
527
521
  * Allows an app to retrieve information of all chat members
528
522
  * Because a malicious party run your content in a browser, this value should
529
523
  * be used only as a hint as to who the members are and never as proof of membership.
530
524
  * @param callback The callback to invoke when the {@link ChatMembersInformation} object is retrieved.
531
525
  */
532
526
  export function getChatMembers(callback: (chatMembersInformation: ChatMembersInformation) => void): void;
533
527
  /**
534
528
  * @private
535
529
  * Hide from docs
536
530
  * ------
537
531
  * Allows an app to get the configuration setting value
538
532
  * @param callback The callback to invoke when the value is retrieved.
539
533
  * @param key The key for the config setting
540
534
  */
541
535
  export function getConfigSetting(callback: (value: string) => void, key: string): void;
542
536
  export namespace appInitialization {
543
537
  /**
544
538
  * To notify app loaded to hide loading indicator
545
539
  */
546
540
  function notifyAppLoaded(): void;
547
541
  /**
548
542
  * To notify app Initialization successs and ready for user interaction
549
543
  */
550
544
  function notifySuccess(): void;
551
545
  /**
552
546
  * To notify app Initialization failed
553
547
  */
554
548
  function notifyFailure(appInitializationFailedRequest: appInitialization.IFailedRequest): void;
555
549
  const enum FailedReason {
556
550
  AuthFailed = "AuthFailed",
557
551
  Timeout = "Timeout",
558
552
  Other = "Other"
559
553
  }
560
554
  interface IFailedRequest {
561
555
  reason: appInitialization.FailedReason;
562
556
  message?: string;
563
557
  }
564
558
  }
565
559
  export interface IAppWindow {
566
560
  postMessage(message: any): void;
567
561
  addEventListener(type: string, listener: Function): void;
568
562
  }
569
563
  export class ChildAppWindow implements IAppWindow {
570
564
  postMessage(message: any, onComplete?: (status: boolean, reason?: string) => void): void;
571
565
  addEventListener(type: string, listener: (message: any) => void): void;
572
566
  }
573
567
  export class ParentAppWindow implements IAppWindow {
574
568
  private static _instance;
575
569
  static readonly Instance: IAppWindow;
576
570
  postMessage(message: any, onComplete?: (status: boolean, reason?: string) => void): void;
577
571
  addEventListener(type: string, listener: (message: any) => void): void;
578
572
  }
579
573
  /**
580
574
  * Namespace to interact with the authentication-specific part of the SDK.
581
575
  * This object is used for starting or completing authentication flows.
582
576
  */
583
577
  export namespace authentication {
584
578
  /**
585
579
  * Registers the authentication GlobalVars.handlers
586
580
  * @param authenticateParameters A set of values that configure the authentication pop-up.
587
581
  */
588
582
  function registerAuthenticationHandlers(authenticateParameters: AuthenticateParameters): void;
589
583
  /**
590
584
  * Initiates an authentication request, which opens a new window with the specified settings.
591
585
  */
592
586
  function authenticate(authenticateParameters?: AuthenticateParameters): void;
593
587
  /**
594
588
  * @private
595
589
  * Hide from docs.
596
590
  * ------
597
591
  * Requests an Azure AD token to be issued on behalf of the app. The token is acquired from the cache
598
592
  * if it is not expired. Otherwise a request is sent to Azure AD to obtain a new token.
599
593
  * @param authTokenRequest A set of values that configure the token request.
600
594
  */
601
595
  function getAuthToken(authTokenRequest: AuthTokenRequest): void;
602
596
  /**
603
597
  * @private
604
598
  * Hide from docs.
605
599
  * ------
606
600
  * Requests the decoded Azure AD user identity on behalf of the app.
607
601
  */
608
602
  function getUser(userRequest: UserRequest): void;
609
603
  /**
610
604
  * Notifies the frame that initiated this authentication request that the request was successful.
611
605
  * This function is usable only on the authentication window.
612
606
  * This call causes the authentication window to be closed.
613
607
  * @param result Specifies a result for the authentication. If specified, the frame that initiated the authentication pop-up receives this value in its callback.
614
608
  * @param callbackUrl Specifies the url to redirect back to if the client is Win32 Outlook.
615
609
  */
616
610
  function notifySuccess(result?: string, callbackUrl?: string): void;
617
611
  /**
618
612
  * Notifies the frame that initiated this authentication request that the request failed.
619
613
  * This function is usable only on the authentication window.
620
614
  * This call causes the authentication window to be closed.
621
615
  * @param result Specifies a result for the authentication. If specified, the frame that initiated the authentication pop-up receives this value in its callback.
622
616
  * @param callbackUrl Specifies the url to redirect back to if the client is Win32 Outlook.
623
617
  */
624
618
  function notifyFailure(reason?: string, callbackUrl?: string): void;
625
619
  interface AuthenticateParameters {
626
620
  /**
627
621
  * The URL for the authentication pop-up.
628
622
  */
629
623
  url: string;
630
624
  /**
631
625
  * The preferred width for the pop-up. This value can be ignored if outside the acceptable bounds.
632
626
  */
633
627
  width?: number;
634
628
  /**
635
629
  * The preferred height for the pop-up. This value can be ignored if outside the acceptable bounds.
636
630
  */
637
631
  height?: number;
638
632
  /**
639
633
  * A function that is called if the authentication succeeds, with the result returned from the authentication pop-up.
640
634
  */
641
635
  successCallback?: (result?: string) => void;
642
636
  /**
643
637
  * A function that is called if the authentication fails, with the reason for the failure returned from the authentication pop-up.
644
638
  */
645
639
  failureCallback?: (reason?: string) => void;
646
640
  }
647
641
  /**
648
642
  * @private
649
643
  * Hide from docs.
650
644
  * ------
651
645
  */
652
646
  interface AuthTokenRequest {
653
647
  /**
654
648
  * An array of resource URIs identifying the target resources for which the token should be requested.
655
649
  */
656
650
  resources: string[];
657
651
  /**
658
652
  * A function that is called if the token request succeeds, with the resulting token.
659
653
  */
660
654
  successCallback?: (token: string) => void;
661
655
  /**
662
656
  * A function that is called if the token request fails, with the reason for the failure.
663
657
  */
664
658
  failureCallback?: (reason: string) => void;
665
659
  }
666
660
  /**
667
661
  * @private
668
662
  * Hide from docs.
669
663
  * ------
670
664
  */
671
665
  interface UserRequest {
672
666
  /**
673
667
  * A function that is called if the token request succeeds, with the resulting token.
674
668
  */
675
669
  successCallback?: (user: UserProfile) => void;
676
670
  /**
677
671
  * A function that is called if the token request fails, with the reason for the failure.
678
672
  */
679
673
  failureCallback?: (reason: string) => void;
680
674
  }
681
675
  /**
682
676
  * @private
683
677
  * Hide from docs.
684
678
  * ------
685
679
  */
686
680
  interface UserProfile {
687
681
  /**
688
682
  * The intended recipient of the token. The application that receives the token must verify that the audience
689
683
  * value is correct and reject any tokens intended for a different audience.
690
684
  */
691
685
  aud: string;
692
686
  /**
693
687
  * Identifies how the subject of the token was authenticated.
694
688
  */
695
689
  amr: string[];
696
690
  /**
697
691
  * Stores the time at which the token was issued. It is often used to measure token freshness.
698
692
  */
699
693
  iat: number;
700
694
  /**
701
695
  * Identifies the security token service (STS) that constructs and returns the token. In the tokens that Azure AD
702
696
  * returns, the issuer is sts.windows.net. The GUID in the issuer claim value is the tenant ID of the Azure AD
703
697
  * directory. The tenant ID is an immutable and reliable identifier of the directory.
704
698
  */
705
699
  iss: string;
706
700
  /**
707
701
  * Provides the last name, surname, or family name of the user as defined in the Azure AD user object.
708
702
  */
709
703
  family_name: string;
710
704
  /**
711
705
  * Provides the first or "given" name of the user, as set on the Azure AD user object.
712
706
  */
713
707
  given_name: string;
714
708
  /**
715
709
  * Provides a human-readable value that identifies the subject of the token. This value is not guaranteed to
716
710
  * be unique within a tenant and is designed to be used only for display purposes.
717
711
  */
718
712
  unique_name: string;
719
713
  /**
720
714
  * Contains a unique identifier of an object in Azure AD. This value is immutable and cannot be reassigned or
721
715
  * reused. Use the object ID to identify an object in queries to Azure AD.
722
716
  */
723
717
  oid: string;
724
718
  /**
725
719
  * Identifies the principal about which the token asserts information, such as the user of an application.
726
720
  * This value is immutable and cannot be reassigned or reused, so it can be used to perform authorization
727
721
  * checks safely. Because the subject is always present in the tokens the Azure AD issues, we recommended
728
722
  * using this value in a general-purpose authorization system.
729
723
  */
730
724
  sub: string;
731
725
  /**
732
726
  * An immutable, non-reusable identifier that identifies the directory tenant that issued the token. You can
733
727
  * use this value to access tenant-specific directory resources in a multitenant application. For example,
734
728
  * you can use this value to identify the tenant in a call to the Graph API.
735
729
  */
736
730
  tid: string;
737
731
  /**
738
732
  * Defines the time interval within which a token is valid. The service that validates the token should verify
739
733
  * that the current date is within the token lifetime; otherwise it should reject the token. The service might
740
734
  * allow for up to five minutes beyond the token lifetime to account for any differences in clock time ("time
741
735
  * skew") between Azure AD and the service.
742
736
  */
743
737
  exp: number;
744
738
  nbf: number;
745
739
  /**
746
740
  * Stores the user name of the user principal.
747
741
  */
748
742
  upn: string;
749
743
  /**
750
744
  * Stores the version number of the token.
751
745
  */
752
746
  ver: string;
753
747
  }
754
748
  }
755
749
  export const enum HostClientType {
756
750
  desktop = "desktop",
757
751
  web = "web",
758
752
  android = "android",
759
753
  ios = "ios",
760
754
  rigel = "rigel"
761
755
  }
762
756
  /**
763
757
  * Indicates the team type, currently used to distinguish between different team
764
758
  * types in Office 365 for Education (team types 1, 2, 3, and 4).
765
759
  */
766
760
  export const enum TeamType {
767
761
  Standard = 0,
768
762
  Edu = 1,
769
763
  Class = 2,
770
764
  Plc = 3,
771
765
  Staff = 4
772
766
  }
773
767
  /**
774
768
  * Indicates the various types of roles of a user in a team.
775
769
  */
776
770
  export const enum UserTeamRole {
777
771
  Admin = 0,
778
772
  User = 1,
779
773
  Guest = 2
780
774
  }
781
775
  export const enum TaskModuleDimension {
782
776
  Large = "large",
783
777
  Medium = "medium",
784
778
  Small = "small"
785
779
  }
786
780
  /**
787
781
  * The type of the channel with which the content is associated.
788
782
  */
789
783
  export const enum ChannelType {
790
784
  Regular = "Regular",
791
785
  Private = "Private"
792
786
  }
793
787
  /**
794
788
  * Represents information about tabs for an app
795
789
  */
796
790
  export interface TabInformation {
797
791
  teamTabs: TabInstance[];
798
792
  }
799
793
  /**
800
794
  * Represents information about a tab instance
801
795
  */
802
796
  export interface TabInstance {
803
797
  /**
804
798
  * The name of the tab
805
799
  */
806
800
  tabName: string;
807
801
  /**
808
802
  * Internal: do not use
809
803
  * @protected
810
804
  */
811
805
  internalTabInstanceId?: string;
812
806
  /**
813
807
  * Last viewed time of this tab. null means unknown
814
808
  */
815
809
  lastViewUnixEpochTime?: string;
816
810
  /**
817
811
  * The developer-defined unique ID for the entity this content points to.
818
812
  */
819
813
  entityId?: string;
820
814
  /**
821
815
  * The Microsoft Teams ID for the channel with which the content is associated.
822
816
  */
823
817
  channelId?: string;
824
818
  /**
825
819
  * The name for the channel with which the content is associated.
826
820
  */
827
821
  channelName?: string;
828
822
  /**
829
823
  * Is this tab in a favorite channel?
830
824
  */
831
825
  channelIsFavorite?: boolean;
832
826
  /**
833
827
  * The Microsoft Teams ID for the team with which the content is associated.
834
828
  */
835
829
  teamId?: string;
836
830
  /**
837
831
  * The name for the team with which the content is associated.
838
832
  */
839
833
  teamName?: string;
840
834
  /**
841
835
  * Is this tab in a favorite team?
842
836
  */
843
837
  teamIsFavorite?: boolean;
844
838
  /**
845
839
  * The Office 365 group ID for the team with which the content is associated.
846
840
  * This field is available only when the identity permission is requested in the manifest.
847
841
  */
848
842
  groupId?: string;
849
843
  /**
850
844
  * Content URL of this tab
851
845
  */
852
846
  url?: string;
853
847
  /**
854
848
  * Website URL of this tab
855
849
  */
856
850
  websiteUrl?: string;
857
851
  }
858
852
  /**
859
853
  * Indicates information about the tab instance for filtering purposes.
860
854
  */
861
855
  export interface TabInstanceParameters {
862
856
  /**
863
857
  * Flag allowing to select favorite channels only
864
858
  */
865
859
  favoriteChannelsOnly?: boolean;
866
860
  /**
867
861
  * Flag allowing to select favorite teams only
868
862
  */
869
863
  favoriteTeamsOnly?: boolean;
870
864
  }
871
865
  /**
872
866
  * Represents Team Information
873
867
  */
874
868
  export interface TeamInformation {
875
869
  /**
876
870
  * Id of the team
877
871
  */
878
872
  teamId: string;
879
873
  /**
880
874
  * Team display name
881
875
  */
882
876
  teamName: string;
883
877
  /**
884
878
  * Team description
885
879
  */
886
880
  teamDescription?: string;
887
881
  /**
888
882
  * Thumbnail Uri
889
883
  */
890
884
  thumbnailUri?: string;
891
885
  /**
892
886
  * The Office 365 group ID for the team with which the content is associated.
893
887
  * This field is available only when the identity permission is requested in the manifest.
894
888
  */
895
889
  groupId?: string;
896
890
  /**
897
891
  * Role of current user in the team
898
892
  */
899
893
  userTeamRole?: UserTeamRole;
900
894
  }
901
895
  export interface Context {
902
896
  /**
903
897
  * The Office 365 group ID for the team with which the content is associated.
904
898
  * This field is available only when the identity permission is requested in the manifest.
905
899
  */
906
900
  groupId?: string;
907
901
  /**
908
902
  * The Microsoft Teams ID for the team with which the content is associated.
909
903
  */
910
904
  teamId?: string;
911
905
  /**
912
906
  * The name for the team with which the content is associated.
913
907
  */
914
908
  teamName?: string;
915
909
  /**
916
910
  * The Microsoft Teams ID for the channel with which the content is associated.
917
911
  */
918
912
  channelId?: string;
919
913
  /**
920
914
  * The name for the channel with which the content is associated.
921
915
  */
922
916
  channelName?: string;
923
917
  /**
924
918
  * The type of the channel with which the content is associated.
925
919
  */
926
920
  channelType?: ChannelType;
927
921
  /**
928
922
  * The developer-defined unique ID for the entity this content points to.
929
923
  */
930
924
  entityId: string;
931
925
  /**
932
926
  * The developer-defined unique ID for the sub-entity this content points to.
933
927
  * This field should be used to restore to a specific state within an entity, such as scrolling to or activating a specific piece of content.
934
928
  */
935
929
  subEntityId?: string;
936
930
  /**
937
931
  * The current locale that the user has configured for the app formatted as
938
932
  * languageId-countryId (for example, en-us).
939
933
  */
940
934
  locale: string;
941
935
  /**
942
936
  * @deprecated Use loginHint or userPrincipalName.
943
937
  * The UPN of the current user.
944
938
  * Because a malicious party can run your content in a browser, this value should
945
939
  * be used only as a hint as to who the user is and never as proof of identity.
946
940
  * This field is available only when the identity permission is requested in the manifest.
947
941
  */
948
942
  upn?: string;
949
943
  /**
950
944
  * The Azure AD tenant ID of the current user.
951
945
  * Because a malicious party can run your content in a browser, this value should
952
946
  * be used only as a hint as to who the user is and never as proof of identity.
953
947
  * This field is available only when the identity permission is requested in the manifest.
954
948
  */
955
949
  tid?: string;
956
950
  /**
957
951
  * The current UI theme.
958
952
  */
959
953
  theme?: string;
960
954
  /**
961
955
  * Indication whether the tab is in full-screen mode.
962
956
  */
963
957
  isFullScreen?: boolean;
964
958
  /**
965
959
  * The type of the team.
966
960
  */
967
961
  teamType?: TeamType;
968
962
  /**
969
963
  * The root SharePoint site associated with the team.
970
964
  */
971
965
  teamSiteUrl?: string;
972
966
  /**
973
967
  * The domain of the root SharePoint site associated with the team.
974
968
  */
975
969
  teamSiteDomain?: string;
976
970
  /**
977
971
  * The relative path to the SharePoint site associated with the team.
978
972
  */
979
973
  teamSitePath?: string;
980
974
  /**
981
975
  * The relative path to the SharePoint folder associated with the channel.
982
976
  */
983
977
  channelRelativeUrl?: string;
984
978
  /**
985
979
  * Unique ID for the current Teams session for use in correlating telemetry data.
986
980
  */
987
981
  sessionId?: string;
988
982
  /**
989
983
  * The user's role in the team.
990
984
  * Because a malicious party can run your content in a browser, this value should
991
985
  * be used only as a hint as to the user's role, and never as proof of her role.
992
986
  */
993
987
  userTeamRole?: UserTeamRole;
994
988
  /**
995
989
  * The Microsoft Teams ID for the chat with which the content is associated.
996
990
  */
997
991
  chatId?: string;
998
992
  /**
999
993
  * A value suitable for use as a login_hint when authenticating with Azure AD.
1000
994
  * Because a malicious party can run your content in a browser, this value should
1001
995
  * be used only as a hint as to who the user is and never as proof of identity.
1002
996
  * This field is available only when the identity permission is requested in the manifest.
1003
997
  */
1004
998
  loginHint?: string;
1005
999
  /**
1006
1000
  * The UPN of the current user. This may be an externally-authenticated UPN (e.g., guest users).
1007
1001
  * Because a malicious party run your content in a browser, this value should
1008
1002
  * be used only as a hint as to who the user is and never as proof of identity.
1009
1003
  * This field is available only when the identity permission is requested in the manifest.
1010
1004
  */
1011
1005
  userPrincipalName?: string;
1012
1006
  /**
1013
1007
  * The Azure AD object id of the current user.
1014
1008
  * Because a malicious party run your content in a browser, this value should
1015
1009
  * be used only as a hint as to who the user is and never as proof of identity.
1016
1010
  * This field is available only when the identity permission is requested in the manifest.
1017
1011
  */
1018
1012
  userObjectId?: string;
1019
1013
  /**
1020
1014
  * Indicates whether team is archived.
1021
1015
  * Apps should use this as a signal to prevent any changes to content associated with archived teams.
1022
1016
  */
1023
1017
  isTeamArchived?: boolean;
1024
1018
  /**
1025
1019
  * The type of the host client. Possible values are : android, ios, web, desktop, rigel
1026
1020
  */
1027
1021
  hostClientType?: HostClientType;
1028
1022
  /**
1029
1023
  * SharePoint context. This is only available when hosted in SharePoint.
1030
1024
  */
1031
1025
  sharepoint?: any;
1032
1026
  /**
1033
1027
  * The type of license for the current users tenant.
1034
1028
  */
1035
1029
  tenantSKU?: string;
1036
1030
  /**
1037
1031
  * The license type for the current user.
1038
1032
  */
1039
1033
  userLicenseType?: string;
1040
1034
  /**
1041
1035
  * The ID of the parent message from which this task module was launched.
1042
1036
  * This is only available in task modules launched from bot cards.
1043
1037
  */
1044
1038
  parentMessageId?: string;
1045
1039
  /**
1046
1040
  * Current ring ID
1047
1041
  */
1048
1042
  ringId?: string;
1049
1043
  /**
1050
1044
  * Unique ID for the current session for use in correlating telemetry data.
1051
1045
  */
1052
1046
  appSessionId?: string;
1053
1047
  /**
1054
1048
  * Represents whether calling is allowed for the current logged in User
1055
1049
  */
1056
1050
  isCallingAllowed?: boolean;
1057
1051
  /**
1058
1052
  * Represents whether PSTN calling is allowed for the current logged in User
1059
1053
  */
1060
1054
  isPSTNCallingAllowed?: boolean;
1061
1055
  /**
1062
1056
  * The OneNote section ID that is linked to the channel.
1063
1057
  */
1064
1058
  defaultOneNoteSectionId?: string;
1065
1059
  }
1066
1060
  export interface DeepLinkParameters {
1067
1061
  /**
1068
1062
  * The developer-defined unique ID for the sub-entity to which this deep link points in the current entity.
1069
1063
  * This field should be used to restore to a specific state within an entity, such as scrolling to or activating a specific piece of content.
1070
1064
  */
1071
1065
  subEntityId: string;
1072
1066
  /**
1073
1067
  * The label for the sub-entity that should be displayed when the deep link is rendered in a client.
1074
1068
  */
1075
1069
  subEntityLabel: string;
1076
1070
  /**
1077
1071
  * The fallback URL to which to navigate the user if the client cannot render the page.
1078
1072
  * This URL should lead directly to the sub-entity.
1079
1073
  */
1080
1074
  subEntityWebUrl?: string;
1081
1075
  }
1082
1076
  export interface TaskInfo {
1083
1077
  /**
1084
1078
  * The url to be rendered in the webview/iframe.
1085
1079
  */
1086
1080
  url?: string;
1087
1081
  /**
1088
1082
  * JSON defining an adaptive card.
1089
1083
  */
1090
1084
  card?: string;
1091
1085
  /**
1092
1086
  * The requested height of the webview/iframe.
1093
1087
  */
1094
1088
  height?: TaskModuleDimension | number;
1095
1089
  /**
1096
1090
  * The requested width of the webview/iframe.
1097
1091
  */
1098
1092
  width?: TaskModuleDimension | number;
1099
1093
  /**
1100
1094
  * Title of the task module.
1101
1095
  */
1102
1096
  title?: string;
1103
1097
  /**
1104
1098
  * If client doesnt support the URL, the URL that needs to be opened in the browser.
1105
1099
  */
1106
1100
  fallbackUrl?: string;
1107
1101
  /**
1108
1102
  * Specifies a bot ID to send the result of the user's interaction with the task module.
1109
1103
  * If specified, the bot will receive a task/complete invoke event with a JSON object
1110
1104
  * in the event payload.
1111
1105
  */
1112
1106
  completionBotId?: string;
1113
1107
  }
1114
1108
  /**
1115
1109
  * @private
1116
1110
  * Hide from docs.
1117
1111
  * ------
1118
1112
  */
1119
1113
  export interface OpenConversationRequest {
1120
1114
  /**
1121
1115
  * The Id of the subEntity where the conversation is taking place
1122
1116
  */
1123
1117
  subEntityId: string;
1124
1118
  /**
1125
1119
  * The title of the conversation
1126
1120
  */
1127
1121
  title: string;
1128
1122
  /**
1129
1123
  * The Id of the conversation. This is optional and should be specified whenever a previous conversation about a specific sub-entity has already been started before
1130
1124
  */
1131
1125
  conversationId?: string;
1132
1126
  /**
1133
1127
  * The Id of the channel. This is optional and should be specified whenever a conversation is started or opened in a personal app scope
1134
1128
  */
1135
1129
  channelId?: string;
1136
1130
  /**
1137
1131
  * The entity Id of the tab
1138
1132
  */
1139
1133
  entityId: string;
1140
1134
  /**
1141
1135
  * A function that is called once the conversation Id has been created
1142
1136
  */
1143
1137
  onStartConversation?: (conversationResponse: ConversationResponse) => void;
1144
1138
  /**
1145
1139
  * A function that is called if the pane is closed
1146
1140
  */
1147
1141
  onCloseConversation?: (conversationResponse: ConversationResponse) => void;
1148
1142
  }
1149
1143
  /**
1150
1144
  * @private
1151
1145
  * Hide from docs.
1152
1146
  * ------
1153
1147
  */
1154
1148
  export interface ConversationResponse {
1155
1149
  /**
1156
1150
  * The Id of the subEntity where the conversation is taking place
1157
1151
  */
1158
1152
  subEntityId: string;
1159
1153
  /**
1160
1154
  * The Id of the conversation. This is optional and should be specified whenever a previous conversation about a specific sub-entity has already been started before
1161
1155
  */
1162
1156
  conversationId?: string;
1163
1157
  /**
1164
1158
  * The Id of the channel. This is optional and should be specified whenever a conversation is started or opened in a personal app scope
1165
1159
  */
1166
1160
  channelId?: string;
1167
1161
  /**
1168
1162
  * The entity Id of the tab
1169
1163
  */
1170
1164
  entityId?: string;
1171
1165
  }
1172
1166
  /**
1173
1167
  * @private
1174
1168
  * Hide from docs.
1175
1169
  */
1176
1170
  export interface LoadContext {
1177
1171
  /**
1178
1172
  * The enitity that is requested to be loaded
1179
1173
  */
1180
1174
  entityId: string;
1181
1175
  /**
1182
1176
  * The content URL that is requested to be loaded
1183
1177
  */
1184
1178
  contentUrl: string;
1185
1179
  }
1186
1180
  export interface FrameContext {
1187
1181
  /**
1188
1182
  * The current URL that needs to be used in the iframe if the tab is reloaded
1189
1183
  */
1190
1184
  contentUrl: string;
1191
1185
  /**
1192
1186
  * The current URL that needs to be used for opening the website when the user clicks on 'Go to website'
1193
1187
  */
1194
1188
  websiteUrl: string;
1195
1189
  }
1196
1190
  /**
1197
1191
  * Initializes the library. This must be called before any other SDK calls
1198
1192
  * but after the frame is loaded successfully.
1199
1193
  * @param callback Optionally specify a callback to invoke when Teams SDK has successfully initialized
1200
1194
  * @param validMessageOrigins Optionally specify a list of cross frame message origins. There must have
1201
1195
  * https: protocol otherwise they will be ignored. Example: https://www.example.com
1202
1196
  */
1203
1197
  export function initialize(callback?: () => void, validMessageOrigins?: string[]): void;
1204
1198
  /**
1205
1199
  * @private
1206
1200
  * Hide from docs.
1207
1201
  * ------
1208
1202
  * Undocumented function used to set a mock window for unit tests
1209
1203
  */
1210
1204
  export function _initialize(hostWindow: any): void;
1211
1205
  /**
1212
1206
  * @private
1213
1207
  * Hide from docs.
1214
1208
  * ------
1215
1209
  * Undocumented function used to clear state between unit tests
1216
1210
  */
1217
1211
  export function _uninitialize(): void;
1218
1212
  /**
1219
1213
  * Enable print capability to support printing page using Ctrl+P and cmd+P
1220
1214
  */
1221
1215
  export function enablePrintCapability(): void;
1222
1216
  /**
1223
1217
  * default print handler
1224
1218
  */
1225
1219
  export function print(): void;
1226
1220
  /**
1227
1221
  * Retrieves the current context the frame is running in.
1228
1222
  * @param callback The callback to invoke when the {@link Context} object is retrieved.
1229
1223
  */
1230
1224
  export function getContext(callback: (context: Context) => void): void;
1231
1225
  /**
1232
1226
  * Registers a handler for theme changes.
1233
1227
  * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
1234
1228
  * @param handler The handler to invoke when the user changes their theme.
1235
1229
  */
1236
1230
  export function registerOnThemeChangeHandler(handler: (theme: string) => void): void;
1237
1231
  /**
1238
1232
  * Registers a handler for changes from or to full-screen view for a tab.
1239
1233
  * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
1240
1234
  * @param handler The handler to invoke when the user toggles full-screen view for a tab.
1241
1235
  */
1242
1236
  export function registerFullScreenHandler(handler: (isFullScreen: boolean) => void): void;
1243
1237
  /**
1244
1238
  * Registers a handler for user presses of the Team client's back button. Experiences that maintain an internal
1245
1239
  * navigation stack should use this handler to navigate the user back within their frame. If an app finds
1246
1240
  * that after running its back button handler it cannot handle the event it should call the navigateBack
1247
1241
  * method to ask the Teams client to handle it instead.
1248
1242
  * @param handler The handler to invoke when the user presses their Team client's back button.
1249
1243
  */
1250
1244
  export function registerBackButtonHandler(handler: () => boolean): void;
1251
1245
  /**
1252
1246
  * Navigates back in the Teams client. See registerBackButtonHandler for more information on when
1253
1247
  * it's appropriate to use this method.
1254
1248
  */
1255
1249
  export function navigateBack(onComplete?: (status: boolean, reason?: string) => void): void;
1256
1250
  /**
1257
1251
  * @private
1258
1252
  * Registers a handler to be called when the page has been requested to load.
1259
1253
  * @param handler The handler to invoke when the page is loaded.
1260
1254
  */
1261
1255
  export function registerOnLoadHandler(handler: (context: LoadContext) => void): void;
1262
1256
  /**
1263
1257
  * @private
1264
1258
  * Registers a handler to be called before the page is unloaded.
1265
1259
  * @param handler The handler to invoke before the page is unloaded. If this handler returns true the page should
1266
1260
  * invoke the readyToUnload function provided to it once it's ready to be unloaded.
1267
1261
  */
1268
1262
  export function registerBeforeUnloadHandler(handler: (readyToUnload: () => void) => boolean): void;
1269
1263
  /**
1270
1264
  * Registers a handler for when the user reconfigurated tab
1271
1265
  * @param handler The handler to invoke when the user click on Settings.
1272
1266
  */
1273
1267
  export function registerChangeSettingsHandler(handler: () => void): void;
1274
1268
  /**
1275
1269
  * Navigates the frame to a new cross-domain URL. The domain of this URL must match at least one of the
1276
1270
  * valid domains specified in the validDomains block of the manifest; otherwise, an exception will be
1277
1271
  * thrown. This function needs to be used only when navigating the frame to a URL in a different domain
1278
1272
  * than the current one in a way that keeps the app informed of the change and allows the SDK to
1279
1273
  * continue working.
1280
1274
  * @param url The URL to navigate the frame to.
1281
1275
  */
1282
1276
  export function navigateCrossDomain(url: string, onComplete?: (status: boolean, reason?: string) => void): void;
1283
1277
  /**
1284
1278
  * Allows an app to retrieve for this user tabs that are owned by this app.
1285
1279
  * If no TabInstanceParameters are passed, the app defaults to favorite teams and favorite channels.
1286
1280
  * @param callback The callback to invoke when the {@link TabInstanceParameters} object is retrieved.
1287
1281
  * @param tabInstanceParameters OPTIONAL Flags that specify whether to scope call to favorite teams or channels.
1288
1282
  */
1289
1283
  export function getTabInstances(callback: (tabInfo: TabInformation) => void, tabInstanceParameters?: TabInstanceParameters): void;
1290
1284
  /**
1291
1285
  * Allows an app to retrieve the most recently used tabs for this user.
1292
1286
  * @param callback The callback to invoke when the {@link TabInformation} object is retrieved.
1293
1287
  * @param tabInstanceParameters OPTIONAL Ignored, kept for future use
1294
1288
  */
1295
1289
  export function getMruTabInstances(callback: (tabInfo: TabInformation) => void, tabInstanceParameters?: TabInstanceParameters): void;
1296
1290
  /**
1297
1291
  * Shares a deep link that a user can use to navigate back to a specific state in this page.
1298
1292
  * @param deepLinkParameters ID and label for the link and fallback URL.
1299
1293
  */
1300
1294
  export function shareDeepLink(deepLinkParameters: DeepLinkParameters): void;
1301
1295
  /**
1302
1296
  * execute deep link API.
1303
1297
  * @param deepLink deep link.
1304
1298
  */
1305
1299
  export function executeDeepLink(deepLink: string, onComplete?: (status: boolean, reason?: string) => void): void;
1306
1300
  /**
1307
1301
  * Navigates the Microsoft Teams app to the specified tab instance.
1308
1302
  * @param tabInstance The tab instance to navigate to.
1309
1303
  */
1310
1304
  export function navigateToTab(tabInstance: TabInstance, onComplete?: (status: boolean, reason?: string) => void): void;
1311
1305
  export function setFrameContext(frameContext: FrameContext): void;
1312
1306
  export function initializeWithFrameContext(frameContext: FrameContext, callback?: () => void, validMessageOrigins?: string[]): void;
1313
1307
  /**
1314
1308
  * Namespace to interact with the settings-specific part of the SDK.
1315
1309
  * This object is usable only on the settings frame.
1316
1310
  */
1317
1311
  export namespace settings {
1318
1312
  /**
1319
1313
  * Sets the validity state for the settings.
1320
1314
  * The initial value is false, so the user cannot save the settings until this is called with true.
1321
1315
  * @param validityState Indicates whether the save or remove button is enabled for the user.
1322
1316
  */
1323
1317
  function setValidityState(validityState: boolean): void;
1324
1318
  /**
1325
1319
  * Gets the settings for the current instance.
1326
1320
  * @param callback The callback to invoke when the {@link Settings} object is retrieved.
1327
1321
  */
1328
1322
  function getSettings(callback: (instanceSettings: Settings) => void): void;
1329
1323
  /**
1330
1324
  * Sets the settings for the current instance.
1331
1325
  * This is an asynchronous operation; calls to getSettings are not guaranteed to reflect the changed state.
1332
1326
  * @param settings The desired settings for this instance.
1333
1327
  */
1334
1328
  function setSettings(instanceSettings: Settings, onComplete?: (status: boolean, reason?: string) => void): void;
1335
1329
  /**
1336
1330
  * Registers a handler for when the user attempts to save the settings. This handler should be used
1337
1331
  * to create or update the underlying resource powering the content.
1338
1332
  * The object passed to the handler must be used to notify whether to proceed with the save.
1339
1333
  * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
1340
1334
  * @param handler The handler to invoke when the user selects the save button.
1341
1335
  */
1342
1336
  function registerOnSaveHandler(handler: (evt: SaveEvent) => void): void;
1343
1337
  /**
1344
1338
  * Registers a handler for user attempts to remove content. This handler should be used
1345
1339
  * to remove the underlying resource powering the content.
1346
1340
  * The object passed to the handler must be used to indicate whether to proceed with the removal.
1347
1341
  * Only one handler may be registered at a time. Subsequent registrations will override the first.
1348
1342
  * @param handler The handler to invoke when the user selects the remove button.
1349
1343
  */
1350
1344
  function registerOnRemoveHandler(handler: (evt: RemoveEvent) => void): void;
1351
1345
  interface Settings {
1352
1346
  /**
1353
1347
  * A suggested display name for the new content.
1354
1348
  * In the settings for an existing instance being updated, this call has no effect.
1355
1349
  */
1356
1350
  suggestedDisplayName?: string;
1357
1351
  /**
1358
1352
  * Sets the URL to use for the content of this instance.
1359
1353
  */
1360
1354
  contentUrl: string;
1361
1355
  /**
1362
1356
  * Sets the URL for the removal configuration experience.
1363
1357
  */
1364
1358
  removeUrl?: string;
1365
1359
  /**
1366
1360
  * Sets the URL to use for the external link to view the underlying resource in a browser.
1367
1361
  */
1368
1362
  websiteUrl?: string;
1369
1363
  /**
1370
1364
  * The developer-defined unique ID for the entity to which this content points.
1371
1365
  */
1372
1366
  entityId: string;
1373
1367
  }
1374
1368
  interface SaveEvent {
1375
1369
  /**
1376
1370
  * Object containing properties passed as arguments to the settings.save event.
1377
1371
  */
1378
1372
  result: SaveParameters;
1379
1373
  /**
1380
1374
  * Indicates that the underlying resource has been created and the settings can be saved.
1381
1375
  */
1382
1376
  notifySuccess(): void;
1383
1377
  /**
1384
1378
  * Indicates that creation of the underlying resource failed and that the settings cannot be saved.
1385
1379
  * @param reason Specifies a reason for the failure. If provided, this string is displayed to the user; otherwise a generic error is displayed.
1386
1380
  */
1387
1381
  notifyFailure(reason?: string): void;
1388
1382
  }
1389
1383
  interface RemoveEvent {
1390
1384
  /**
1391
1385
  * Indicates that the underlying resource has been removed and the content can be removed.
1392
1386
  */
1393
1387
  notifySuccess(): void;
1394
1388
  /**
1395
1389
  * Indicates that removal of the underlying resource failed and that the content cannot be removed.
1396
1390
  * @param reason Specifies a reason for the failure. If provided, this string is displayed to the user; otherwise a generic error is displayed.
1397
1391
  */
1398
1392
  notifyFailure(reason?: string): void;
1399
1393
  }
1400
1394
  interface SaveParameters {
1401
1395
  /**
1402
1396
  * Connector's webhook Url returned as arguments to settings.save event as part of user clicking on Save
1403
1397
  */
1404
1398
  webhookUrl?: string;
1405
1399
  }
1406
1400
  }
1407
1401
  /**
1408
1402
  * Namespace to interact with the task module-specific part of the SDK.
1409
1403
  * This object is usable only on the content frame.
1410
1404
  */
1411
1405
  export namespace tasks {
1412
1406
  /**
1413
1407
  * Allows an app to open the task module.
1414
1408
  * @param taskInfo An object containing the parameters of the task module
1415
1409
  * @param submitHandler Handler to call when the task module is completed
1416
1410
  */
1417
1411
  function startTask(taskInfo: TaskInfo, submitHandler?: (err: string, result: string) => void): IAppWindow;
1418
1412
  /**
1419
1413
  * Update height/width task info properties.
1420
1414
  * @param taskInfo An object containing width and height properties
1421
1415
  */
1422
1416
  function updateTask(taskInfo: TaskInfo): void;
1423
1417
  /**
1424
1418
  * Submit the task module.
1425
1419
  * @param result Contains the result to be sent to the bot or the app. Typically a JSON object or a serialized version of it
1426
1420
  * @param appIds Helps to validate that the call originates from the same appId as the one that invoked the task module
1427
1421
  */
1428
1422
  function submitTask(result?: string | object, appIds?: string | string[]): void;
1429
1423
  }