@microsoft/teams-js 1.10.1-dev.0 → 1.10.1-dev.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.
Files changed (40) hide show
  1. package/dist/MicrosoftTeams.js +1 -1
  2. package/dist/MicrosoftTeams.js.map +1 -1
  3. package/dist/MicrosoftTeams.min.js +1 -1
  4. package/dist/microsoftteams.d.ts +2834 -0
  5. package/dts/index.d.ts +2 -0
  6. package/dts/internal/communication.d.ts +23 -0
  7. package/dts/internal/constants.d.ts +42 -0
  8. package/dts/internal/globalVars.d.ts +15 -0
  9. package/dts/internal/handlers.d.ts +10 -0
  10. package/dts/internal/interfaces.d.ts +44 -0
  11. package/dts/internal/internalAPIs.d.ts +12 -0
  12. package/dts/internal/mediaUtil.d.ts +31 -0
  13. package/dts/internal/utils.d.ts +22 -0
  14. package/dts/private/appEntity.d.ts +49 -0
  15. package/dts/private/bot.d.ts +77 -0
  16. package/dts/private/conversations.d.ts +20 -0
  17. package/dts/private/files.d.ts +169 -0
  18. package/dts/private/index.d.ts +10 -0
  19. package/dts/private/interfaces.d.ts +141 -0
  20. package/dts/private/logs.d.ts +17 -0
  21. package/dts/private/meetingRoom.d.ts +157 -0
  22. package/dts/private/menus.d.ts +117 -0
  23. package/dts/private/privateAPIs.d.ts +104 -0
  24. package/dts/private/remoteCamera.d.ts +196 -0
  25. package/dts/public/appInitialization.d.ts +44 -0
  26. package/dts/public/appWindow.d.ts +14 -0
  27. package/dts/public/authentication.d.ts +177 -0
  28. package/dts/public/constants.d.ts +53 -0
  29. package/dts/public/index.d.ts +13 -0
  30. package/dts/public/interfaces.d.ts +557 -0
  31. package/dts/public/location.d.ts +47 -0
  32. package/dts/public/media.d.ts +219 -0
  33. package/dts/public/meeting.d.ts +158 -0
  34. package/dts/public/navigation.d.ts +28 -0
  35. package/dts/public/people.d.ts +53 -0
  36. package/dts/public/publicAPIs.d.ts +117 -0
  37. package/dts/public/settings.d.ts +95 -0
  38. package/dts/public/tasks.d.ts +25 -0
  39. package/package.json +1 -1
  40. package/dist/MicrosoftTeams.d.ts +0 -5
@@ -0,0 +1,219 @@
1
+ import { SdkError } from './interfaces';
2
+ export declare namespace media {
3
+ /**
4
+ * Enum for file formats supported
5
+ */
6
+ enum FileFormat {
7
+ Base64 = "base64",
8
+ ID = "id"
9
+ }
10
+ /**
11
+ * File object that can be used to represent image or video or audio
12
+ */
13
+ class File {
14
+ /**
15
+ * Content of the file. When format is Base64, this is the base64 content
16
+ * When format is ID, this is id mapping to the URI
17
+ * When format is base64 and app needs to use this directly in HTML tags, it should convert this to dataUrl.
18
+ */
19
+ content: string;
20
+ /**
21
+ * Format of the content
22
+ */
23
+ format: FileFormat;
24
+ /**
25
+ * Size of the file in KB
26
+ */
27
+ size: number;
28
+ /**
29
+ * MIME type. This can be used for constructing a dataUrl, if needed.
30
+ */
31
+ mimeType: string;
32
+ /**
33
+ * Optional: Name of the file
34
+ */
35
+ name?: string;
36
+ }
37
+ /**
38
+ * Launch camera, capture image or choose image from gallery and return the images as a File[] object to the callback.
39
+ * Callback will be called with an error, if there are any. App should first check the error.
40
+ * If it is present the user can be updated with appropriate error message.
41
+ * If error is null or undefined, then files will have the required result.
42
+ * Note: Currently we support getting one File through this API, i.e. the file arrays size will be one.
43
+ * Note: For desktop, this API is not supported. Callback will be resolved with ErrorCode.NotSupported.
44
+ * @see File
45
+ * @see SdkError
46
+ */
47
+ function captureImage(callback: (error: SdkError, files: File[]) => void): void;
48
+ /**
49
+ * Media object returned by the select Media API
50
+ */
51
+ class Media extends File {
52
+ constructor(that?: Media);
53
+ /**
54
+ * A preview of the file which is a lightweight representation.
55
+ * In case of images this will be a thumbnail/compressed image in base64 encoding.
56
+ */
57
+ preview: string;
58
+ /**
59
+ * Gets the media in chunks irrespecitve of size, these chunks are assembled and sent back to the webapp as file/blob
60
+ * @param callback returns blob of media
61
+ */
62
+ getMedia(callback: (error: SdkError, blob: Blob) => void): void;
63
+ private getMediaViaCallback;
64
+ private getMediaViaHandler;
65
+ }
66
+ /**
67
+ * Input parameter supplied to the select Media API
68
+ */
69
+ interface MediaInputs {
70
+ /**
71
+ * Only one media type can be selected at a time
72
+ */
73
+ mediaType: MediaType;
74
+ /**
75
+ * max limit of media allowed to be selected in one go, current max limit is 10 set by office lens.
76
+ */
77
+ maxMediaCount: number;
78
+ /**
79
+ * Additional properties for customization of select media in mobile devices
80
+ */
81
+ imageProps?: ImageProps;
82
+ /**
83
+ * Additional properties for audio capture flows.
84
+ */
85
+ audioProps?: AudioProps;
86
+ }
87
+ /**
88
+ * All properties in ImageProps are optional and have default values in the platform
89
+ */
90
+ interface ImageProps {
91
+ /**
92
+ * Optional; Lets the developer specify the image source, more than one can be specified.
93
+ * Default value is both camera and gallery
94
+ */
95
+ sources?: Source[];
96
+ /**
97
+ * Optional; Specify in which mode the camera will be opened.
98
+ * Default value is Photo
99
+ */
100
+ startMode?: CameraStartMode;
101
+ /**
102
+ * Optional; indicate if inking on the selected Image is allowed or not
103
+ * Default value is true
104
+ */
105
+ ink?: boolean;
106
+ /**
107
+ * Optional; indicate if user is allowed to move between front and back camera
108
+ * Default value is true
109
+ */
110
+ cameraSwitcher?: boolean;
111
+ /**
112
+ * Optional; indicate if putting text stickers on the selected Image is allowed or not
113
+ * Default value is true
114
+ */
115
+ textSticker?: boolean;
116
+ /**
117
+ * Optional; indicate if image filtering mode is enabled on the selected image
118
+ * Default value is false
119
+ */
120
+ enableFilter?: boolean;
121
+ }
122
+ /**
123
+ * All properties in AudioProps are optional and have default values in the platform
124
+ */
125
+ interface AudioProps {
126
+ /**
127
+ * Optional; the maximum duration in minutes after which the recording should terminate automatically.
128
+ * Default value is defined by the platform serving the API.
129
+ */
130
+ maxDuration?: number;
131
+ }
132
+ /**
133
+ * The modes in which camera can be launched in select Media API
134
+ */
135
+ enum CameraStartMode {
136
+ Photo = 1,
137
+ Document = 2,
138
+ Whiteboard = 3,
139
+ BusinessCard = 4
140
+ }
141
+ /**
142
+ * Specifies the image source
143
+ */
144
+ enum Source {
145
+ Camera = 1,
146
+ Gallery = 2
147
+ }
148
+ /**
149
+ * Specifies the type of Media
150
+ */
151
+ enum MediaType {
152
+ Image = 1,
153
+ Audio = 4
154
+ }
155
+ /**
156
+ * Input for view images API
157
+ */
158
+ interface ImageUri {
159
+ value: string;
160
+ type: ImageUriType;
161
+ }
162
+ /**
163
+ * ID contains a mapping for content uri on platform's side, URL is generic
164
+ */
165
+ enum ImageUriType {
166
+ ID = 1,
167
+ URL = 2
168
+ }
169
+ /**
170
+ * Media chunks an output of getMedia API from platform
171
+ */
172
+ interface MediaChunk {
173
+ /**
174
+ * Base 64 data for the requested uri
175
+ */
176
+ chunk: string;
177
+ /**
178
+ * chunk sequence number​
179
+ */
180
+ chunkSequence: number;
181
+ }
182
+ /**
183
+ * Helper object to assembled media chunks
184
+ */
185
+ interface AssembleAttachment {
186
+ sequence: number;
187
+ file: Blob;
188
+ }
189
+ /**
190
+ * Select an attachment using camera/gallery
191
+ * @param mediaInputs The input params to customize the media to be selected
192
+ * @param callback The callback to invoke after fetching the media
193
+ */
194
+ function selectMedia(mediaInputs: MediaInputs, callback: (error: SdkError, attachments: Media[]) => void): void;
195
+ /**
196
+ * View images using native image viewer
197
+ * @param uriList urilist of images to be viewed - can be content uri or server url. supports upto 10 Images in one go
198
+ * @param callback returns back error if encountered, returns null in case of success
199
+ */
200
+ function viewImages(uriList: ImageUri[], callback: (error?: SdkError) => void): void;
201
+ /**
202
+ * Barcode configuration supplied to scanBarCode API to customize barcode scanning experience in mobile
203
+ * All properties in BarCodeConfig are optional and have default values in the platform
204
+ */
205
+ interface BarCodeConfig {
206
+ /**
207
+ * Optional; Lets the developer specify the scan timeout interval in seconds
208
+ * Default value is 30 seconds and max allowed value is 60 seconds
209
+ */
210
+ timeOutIntervalInSec?: number;
211
+ }
212
+ /**
213
+ * Scan Barcode/QRcode using camera
214
+ * Note: For desktop and web, this API is not supported. Callback will be resolved with ErrorCode.NotSupported.
215
+ * @param callback callback to invoke after scanning the barcode
216
+ * @param config optional input configuration to customize the barcode scanning experience
217
+ */
218
+ function scanBarCode(callback: (error: SdkError, decodedText: string) => void, config?: BarCodeConfig): void;
219
+ }
@@ -0,0 +1,158 @@
1
+ import { SdkError } from './interfaces';
2
+ export declare namespace meeting {
3
+ /**
4
+ * @private
5
+ * Hide from docs
6
+ * Data structure to represent a meeting details.
7
+ */
8
+ interface IMeetingDetails {
9
+ /**
10
+ * details object
11
+ */
12
+ details: IDetails;
13
+ /**
14
+ * conversation object
15
+ */
16
+ conversation: IConversation;
17
+ /**
18
+ * organizer object
19
+ */
20
+ organizer: IOrganizer;
21
+ }
22
+ /**
23
+ * @private
24
+ * Hide from docs
25
+ * Data structure to represent details.
26
+ */
27
+ interface IDetails {
28
+ /**
29
+ * Scheduled start time of the meeting
30
+ */
31
+ scheduledStartTime: string;
32
+ /**
33
+ * Scheduled end time of the meeting
34
+ */
35
+ scheduledEndTime: string;
36
+ /**
37
+ * url to join the current meeting
38
+ */
39
+ joinUrl?: string;
40
+ /**
41
+ * meeting title name of the meeting
42
+ */
43
+ title?: string;
44
+ /**
45
+ * type of the meeting
46
+ */
47
+ type?: MeetingType;
48
+ }
49
+ /**
50
+ * @private
51
+ * Hide from docs
52
+ * Data structure to represent a conversation object.
53
+ */
54
+ interface IConversation {
55
+ /**
56
+ * conversation id of the meeting
57
+ */
58
+ id: string;
59
+ }
60
+ /**
61
+ * @private
62
+ * Hide from docs
63
+ * Data structure to represent an organizer object.
64
+ */
65
+ interface IOrganizer {
66
+ /**
67
+ * organizer id of the meeting
68
+ */
69
+ id?: string;
70
+ /**
71
+ * tenant id of the meeting
72
+ */
73
+ tenantId?: string;
74
+ }
75
+ interface LiveStreamState {
76
+ /**
77
+ * indicates whether meeting is streaming
78
+ */
79
+ isStreaming: boolean;
80
+ /**
81
+ * error object in case there is a failure
82
+ */
83
+ error?: {
84
+ /** error code from the streaming service, e.g. IngestionFailure */
85
+ code: string;
86
+ /** detailed error message string */
87
+ message?: string;
88
+ };
89
+ }
90
+ enum MeetingType {
91
+ Unknown = "Unknown",
92
+ Adhoc = "Adhoc",
93
+ Scheduled = "Scheduled",
94
+ Recurring = "Recurring",
95
+ Broadcast = "Broadcast",
96
+ MeetNow = "MeetNow"
97
+ }
98
+ /**
99
+ * Allows an app to get the incoming audio speaker setting for the meeting user
100
+ * @param callback Callback contains 2 parameters, error and result.
101
+ * error can either contain an error of type SdkError, incase of an error, or null when fetch is successful
102
+ * result can either contain the true/false value, incase of a successful fetch or null when the fetching fails
103
+ * result: True means incoming audio is muted and false means incoming audio is unmuted
104
+ */
105
+ function getIncomingClientAudioState(callback: (error: SdkError | null, result: boolean | null) => void): void;
106
+ /**
107
+ * Allows an app to toggle the incoming audio speaker setting for the meeting user from mute to unmute or vice-versa
108
+ * @param callback Callback contains 2 parameters, error and result.
109
+ * error can either contain an error of type SdkError, incase of an error, or null when toggle is successful
110
+ * result can either contain the true/false value, incase of a successful toggle or null when the toggling fails
111
+ * result: True means incoming audio is muted and false means incoming audio is unmuted
112
+ */
113
+ function toggleIncomingClientAudio(callback: (error: SdkError | null, result: boolean | null) => void): void;
114
+ /**
115
+ * @private
116
+ * Hide from docs
117
+ * Allows an app to get the meeting details for the meeting
118
+ * @param callback Callback contains 2 parameters, error and meetingDetails.
119
+ * error can either contain an error of type SdkError, incase of an error, or null when get is successful
120
+ * result can either contain a IMeetingDetails value, incase of a successful get or null when the get fails
121
+ */
122
+ function getMeetingDetails(callback: (error: SdkError | null, meetingDetails: IMeetingDetails | null) => void): void;
123
+ /**
124
+ * @private
125
+ * Allows an app to get the authentication token for the anonymous or guest user in the meeting
126
+ * @param callback Callback contains 2 parameters, error and authenticationTokenOfAnonymousUser.
127
+ * error can either contain an error of type SdkError, incase of an error, or null when get is successful
128
+ * authenticationTokenOfAnonymousUser can either contain a string value, incase of a successful get or null when the get fails
129
+ */
130
+ function getAuthenticationTokenForAnonymousUser(callback: (error: SdkError | null, authenticationTokenOfAnonymousUser: string | null) => void): void;
131
+ /**
132
+ * Allows an app to get the state of the live stream in the current meeting
133
+ * @param callback Callback contains 2 parameters: error and liveStreamState.
134
+ * error can either contain an error of type SdkError, in case of an error, or null when get is successful
135
+ * liveStreamState can either contain a LiveStreamState value, or null when operation fails
136
+ */
137
+ function getLiveStreamState(callback: (error: SdkError | null, liveStreamState: LiveStreamState | null) => void): void;
138
+ /**
139
+ * Allows an app to request the live streaming be started at the given streaming url
140
+ * @param streamUrl the url to the stream resource
141
+ * @param streamKey the key to the stream resource
142
+ * @param callback Callback contains error parameter which can be of type SdkError in case of an error, or null when operation is successful
143
+ * Use getLiveStreamState or registerLiveStreamChangedHandler to get updates on the live stream state
144
+ */
145
+ function requestStartLiveStreaming(callback: (error: SdkError | null) => void, streamUrl: string, streamKey?: string): void;
146
+ /**
147
+ * Allows an app to request the live streaming be stopped at the given streaming url
148
+ * @param callback Callback contains error parameter which can be of type SdkError in case of an error, or null when operation is successful
149
+ * Use getLiveStreamState or registerLiveStreamChangedHandler to get updates on the live stream state
150
+ */
151
+ function requestStopLiveStreaming(callback: (error: SdkError | null) => void): void;
152
+ /**
153
+ * Registers a handler for changes to the live stream.
154
+ * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
155
+ * @param handler The handler to invoke when the live stream state changes
156
+ */
157
+ function registerLiveStreamChangedHandler(handler: (liveStreamState: LiveStreamState) => void): void;
158
+ }
@@ -0,0 +1,28 @@
1
+ import { TabInstance } from './interfaces';
2
+ /**
3
+ * Navigation specific part of the SDK.
4
+ */
5
+ /**
6
+ * Return focus to the main Teams app. Will focus search bar if navigating foward and app bar if navigating back.
7
+ * @param navigateForward Determines the direction to focus in teams app.
8
+ */
9
+ export declare function returnFocus(navigateForward?: boolean): void;
10
+ /**
11
+ * Navigates the Microsoft Teams app to the specified tab instance.
12
+ * @param tabInstance The tab instance to navigate to.
13
+ */
14
+ export declare function navigateToTab(tabInstance: TabInstance, onComplete?: (status: boolean, reason?: string) => void): void;
15
+ /**
16
+ * Navigates the frame to a new cross-domain URL. The domain of this URL must match at least one of the
17
+ * valid domains specified in the validDomains block of the manifest; otherwise, an exception will be
18
+ * thrown. This function needs to be used only when navigating the frame to a URL in a different domain
19
+ * than the current one in a way that keeps the app informed of the change and allows the SDK to
20
+ * continue working.
21
+ * @param url The URL to navigate the frame to.
22
+ */
23
+ export declare function navigateCrossDomain(url: string, onComplete?: (status: boolean, reason?: string) => void): void;
24
+ /**
25
+ * Navigates back in the Teams client. See registerBackButtonHandler for more information on when
26
+ * it's appropriate to use this method.
27
+ */
28
+ export declare function navigateBack(onComplete?: (status: boolean, reason?: string) => void): void;
@@ -0,0 +1,53 @@
1
+ import { SdkError } from './interfaces';
2
+ export declare namespace people {
3
+ /**
4
+ * Launches a people picker and allows the user to select one or more people from the list
5
+ * If the app is added to personal app scope the people picker launched is org wide and if the app is added to a chat/channel, people picker launched is also limited to the members of chat/channel
6
+ * @param callback Returns list of JSON object of type PeoplePickerResult which consists of AAD IDs, display names and emails of the selected users
7
+ * @param peoplePickerInputs Input parameters to launch customized people picker
8
+ */
9
+ function selectPeople(callback: (error: SdkError, people: PeoplePickerResult[]) => void, peoplePickerInputs?: PeoplePickerInputs): void;
10
+ /**
11
+ * Input parameter supplied to the People Picker API
12
+ */
13
+ interface PeoplePickerInputs {
14
+ /**
15
+ * Optional; Set title for the people picker
16
+ * Default value is "Select people" for multiselect and "Select a person" for single select
17
+ */
18
+ title?: string;
19
+ /**
20
+ * Optional; AAD ids of the users to be pre-populated in the search box of people picker control
21
+ * If single select is enabled this value, only the first user in the list will be pre-populated
22
+ * Default value is null
23
+ */
24
+ setSelected?: string[];
25
+ /**
26
+ * Optional; launches the people picker in org wide scope even if the app is added to a chat or channel
27
+ * Default value is false
28
+ */
29
+ openOrgWideSearchInChatOrChannel?: boolean;
30
+ /**
31
+ * Optional; launches the people picker for which only 1 person can be selected
32
+ * Default value is false
33
+ */
34
+ singleSelect?: boolean;
35
+ }
36
+ /**
37
+ * Output user object of people picker API
38
+ */
39
+ interface PeoplePickerResult {
40
+ /**
41
+ * user object Id (also known as aad id) of the selected user
42
+ */
43
+ objectId: string;
44
+ /**
45
+ * Optional; display name of the selected user
46
+ */
47
+ displayName?: string;
48
+ /**
49
+ * Optional; email of the selected user
50
+ */
51
+ email?: string;
52
+ }
53
+ }
@@ -0,0 +1,117 @@
1
+ import { TabInformation, TabInstanceParameters, DeepLinkParameters, Context, LoadContext, FrameContext } from './interfaces';
2
+ /**
3
+ * Initializes the library. This must be called before any other SDK calls
4
+ * but after the frame is loaded successfully.
5
+ * @param callback Optionally specify a callback to invoke when Teams SDK has successfully initialized
6
+ * @param validMessageOrigins Optionally specify a list of cross frame message origins. There must have
7
+ * https: protocol otherwise they will be ignored. Example: https://www.example.com
8
+ */
9
+ export declare function initialize(callback?: () => void, validMessageOrigins?: string[]): void;
10
+ /**
11
+ * @private
12
+ * Hide from docs.
13
+ * ------
14
+ * Undocumented function used to set a mock window for unit tests
15
+ */
16
+ export declare function _initialize(hostWindow: any): void;
17
+ /**
18
+ * @private
19
+ * Hide from docs.
20
+ * ------
21
+ * Undocumented function used to clear state between unit tests
22
+ */
23
+ export declare function _uninitialize(): void;
24
+ /**
25
+ * Enable print capability to support printing page using Ctrl+P and cmd+P
26
+ */
27
+ export declare function enablePrintCapability(): void;
28
+ /**
29
+ * default print handler
30
+ */
31
+ export declare function print(): void;
32
+ /**
33
+ * Retrieves the current context the frame is running in.
34
+ * @param callback The callback to invoke when the {@link Context} object is retrieved.
35
+ */
36
+ export declare function getContext(callback: (context: Context) => void): void;
37
+ /**
38
+ * Registers a handler for theme changes.
39
+ * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
40
+ * @param handler The handler to invoke when the user changes their theme.
41
+ */
42
+ export declare function registerOnThemeChangeHandler(handler: (theme: string) => void): void;
43
+ /**
44
+ * Registers a handler for changes from or to full-screen view for a tab.
45
+ * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
46
+ * @param handler The handler to invoke when the user toggles full-screen view for a tab.
47
+ */
48
+ export declare function registerFullScreenHandler(handler: (isFullScreen: boolean) => void): void;
49
+ /**
50
+ * Registers a handler for clicking the app button.
51
+ * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
52
+ * @param handler The handler to invoke when the personal app button is clicked in the app bar.
53
+ */
54
+ export declare function registerAppButtonClickHandler(handler: () => void): void;
55
+ /**
56
+ * Registers a handler for entering hover of the app button.
57
+ * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
58
+ * @param handler The handler to invoke when entering hover of the personal app button in the app bar.
59
+ */
60
+ export declare function registerAppButtonHoverEnterHandler(handler: () => void): void;
61
+ /**
62
+ * Registers a handler for exiting hover of the app button.
63
+ * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
64
+ * @param handler The handler to invoke when exiting hover of the personal app button in the app bar.
65
+ */
66
+ export declare function registerAppButtonHoverLeaveHandler(handler: () => void): void;
67
+ /**
68
+ * Registers a handler for user presses of the Team client's back button. Experiences that maintain an internal
69
+ * navigation stack should use this handler to navigate the user back within their frame. If an app finds
70
+ * that after running its back button handler it cannot handle the event it should call the navigateBack
71
+ * method to ask the Teams client to handle it instead.
72
+ * @param handler The handler to invoke when the user presses their Team client's back button.
73
+ */
74
+ export declare function registerBackButtonHandler(handler: () => boolean): void;
75
+ /**
76
+ * @private
77
+ * Registers a handler to be called when the page has been requested to load.
78
+ * @param handler The handler to invoke when the page is loaded.
79
+ */
80
+ export declare function registerOnLoadHandler(handler: (context: LoadContext) => void): void;
81
+ /**
82
+ * @private
83
+ * Registers a handler to be called before the page is unloaded.
84
+ * @param handler The handler to invoke before the page is unloaded. If this handler returns true the page should
85
+ * invoke the readyToUnload function provided to it once it's ready to be unloaded.
86
+ */
87
+ export declare function registerBeforeUnloadHandler(handler: (readyToUnload: () => void) => boolean): void;
88
+ /**
89
+ * Registers a handler for when the user reconfigurated tab
90
+ * @param handler The handler to invoke when the user click on Settings.
91
+ */
92
+ export declare function registerChangeSettingsHandler(handler: () => void): void;
93
+ /**
94
+ * Allows an app to retrieve for this user tabs that are owned by this app.
95
+ * If no TabInstanceParameters are passed, the app defaults to favorite teams and favorite channels.
96
+ * @param callback The callback to invoke when the {@link TabInstanceParameters} object is retrieved.
97
+ * @param tabInstanceParameters OPTIONAL Flags that specify whether to scope call to favorite teams or channels.
98
+ */
99
+ export declare function getTabInstances(callback: (tabInfo: TabInformation) => void, tabInstanceParameters?: TabInstanceParameters): void;
100
+ /**
101
+ * Allows an app to retrieve the most recently used tabs for this user.
102
+ * @param callback The callback to invoke when the {@link TabInformation} object is retrieved.
103
+ * @param tabInstanceParameters OPTIONAL Ignored, kept for future use
104
+ */
105
+ export declare function getMruTabInstances(callback: (tabInfo: TabInformation) => void, tabInstanceParameters?: TabInstanceParameters): void;
106
+ /**
107
+ * Shares a deep link that a user can use to navigate back to a specific state in this page.
108
+ * @param deepLinkParameters ID and label for the link and fallback URL.
109
+ */
110
+ export declare function shareDeepLink(deepLinkParameters: DeepLinkParameters): void;
111
+ /**
112
+ * execute deep link API.
113
+ * @param deepLink deep link.
114
+ */
115
+ export declare function executeDeepLink(deepLink: string, onComplete?: (status: boolean, reason?: string) => void): void;
116
+ export declare function setFrameContext(frameContext: FrameContext): void;
117
+ export declare function initializeWithFrameContext(frameContext: FrameContext, callback?: () => void, validMessageOrigins?: string[]): void;
@@ -0,0 +1,95 @@
1
+ /**
2
+ * Namespace to interact with the settings-specific part of the SDK.
3
+ * This object is usable only on the settings frame.
4
+ */
5
+ export declare namespace settings {
6
+ function initialize(): void;
7
+ /**
8
+ * Sets the validity state for the settings.
9
+ * The initial value is false, so the user cannot save the settings until this is called with true.
10
+ * @param validityState Indicates whether the save or remove button is enabled for the user.
11
+ */
12
+ function setValidityState(validityState: boolean): void;
13
+ /**
14
+ * Gets the settings for the current instance.
15
+ * @param callback The callback to invoke when the {@link Settings} object is retrieved.
16
+ */
17
+ function getSettings(callback: (instanceSettings: Settings) => void): void;
18
+ /**
19
+ * Sets the settings for the current instance.
20
+ * This is an asynchronous operation; calls to getSettings are not guaranteed to reflect the changed state.
21
+ * @param settings The desired settings for this instance.
22
+ */
23
+ function setSettings(instanceSettings: Settings, onComplete?: (status: boolean, reason?: string) => void): void;
24
+ /**
25
+ * Registers a handler for when the user attempts to save the settings. This handler should be used
26
+ * to create or update the underlying resource powering the content.
27
+ * The object passed to the handler must be used to notify whether to proceed with the save.
28
+ * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
29
+ * @param handler The handler to invoke when the user selects the save button.
30
+ */
31
+ function registerOnSaveHandler(handler: (evt: SaveEvent) => void): void;
32
+ /**
33
+ * Registers a handler for user attempts to remove content. This handler should be used
34
+ * to remove the underlying resource powering the content.
35
+ * The object passed to the handler must be used to indicate whether to proceed with the removal.
36
+ * Only one handler may be registered at a time. Subsequent registrations will override the first.
37
+ * @param handler The handler to invoke when the user selects the remove button.
38
+ */
39
+ function registerOnRemoveHandler(handler: (evt: RemoveEvent) => void): void;
40
+ interface Settings {
41
+ /**
42
+ * A suggested display name for the new content.
43
+ * In the settings for an existing instance being updated, this call has no effect.
44
+ */
45
+ suggestedDisplayName?: string;
46
+ /**
47
+ * Sets the URL to use for the content of this instance.
48
+ */
49
+ contentUrl: string;
50
+ /**
51
+ * Sets the URL for the removal configuration experience.
52
+ */
53
+ removeUrl?: string;
54
+ /**
55
+ * Sets the URL to use for the external link to view the underlying resource in a browser.
56
+ */
57
+ websiteUrl?: string;
58
+ /**
59
+ * The developer-defined unique ID for the entity to which this content points.
60
+ */
61
+ entityId?: string;
62
+ }
63
+ interface SaveEvent {
64
+ /**
65
+ * Object containing properties passed as arguments to the settings.save event.
66
+ */
67
+ result: SaveParameters;
68
+ /**
69
+ * Indicates that the underlying resource has been created and the settings can be saved.
70
+ */
71
+ notifySuccess(): void;
72
+ /**
73
+ * Indicates that creation of the underlying resource failed and that the settings cannot be saved.
74
+ * @param reason Specifies a reason for the failure. If provided, this string is displayed to the user; otherwise a generic error is displayed.
75
+ */
76
+ notifyFailure(reason?: string): void;
77
+ }
78
+ interface RemoveEvent {
79
+ /**
80
+ * Indicates that the underlying resource has been removed and the content can be removed.
81
+ */
82
+ notifySuccess(): void;
83
+ /**
84
+ * Indicates that removal of the underlying resource failed and that the content cannot be removed.
85
+ * @param reason Specifies a reason for the failure. If provided, this string is displayed to the user; otherwise a generic error is displayed.
86
+ */
87
+ notifyFailure(reason?: string): void;
88
+ }
89
+ interface SaveParameters {
90
+ /**
91
+ * Connector's webhook Url returned as arguments to settings.save event as part of user clicking on Save
92
+ */
93
+ webhookUrl?: string;
94
+ }
95
+ }