@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.
- package/dist/MicrosoftTeams.js +1 -1
- package/dist/MicrosoftTeams.js.map +1 -1
- package/dist/MicrosoftTeams.min.js +1 -1
- package/dist/microsoftteams.d.ts +2834 -0
- package/dts/index.d.ts +2 -0
- package/dts/internal/communication.d.ts +23 -0
- package/dts/internal/constants.d.ts +42 -0
- package/dts/internal/globalVars.d.ts +15 -0
- package/dts/internal/handlers.d.ts +10 -0
- package/dts/internal/interfaces.d.ts +44 -0
- package/dts/internal/internalAPIs.d.ts +12 -0
- package/dts/internal/mediaUtil.d.ts +31 -0
- package/dts/internal/utils.d.ts +22 -0
- package/dts/private/appEntity.d.ts +49 -0
- package/dts/private/bot.d.ts +77 -0
- package/dts/private/conversations.d.ts +20 -0
- package/dts/private/files.d.ts +169 -0
- package/dts/private/index.d.ts +10 -0
- package/dts/private/interfaces.d.ts +141 -0
- package/dts/private/logs.d.ts +17 -0
- package/dts/private/meetingRoom.d.ts +157 -0
- package/dts/private/menus.d.ts +117 -0
- package/dts/private/privateAPIs.d.ts +104 -0
- package/dts/private/remoteCamera.d.ts +196 -0
- package/dts/public/appInitialization.d.ts +44 -0
- package/dts/public/appWindow.d.ts +14 -0
- package/dts/public/authentication.d.ts +177 -0
- package/dts/public/constants.d.ts +53 -0
- package/dts/public/index.d.ts +13 -0
- package/dts/public/interfaces.d.ts +557 -0
- package/dts/public/location.d.ts +47 -0
- package/dts/public/media.d.ts +219 -0
- package/dts/public/meeting.d.ts +158 -0
- package/dts/public/navigation.d.ts +28 -0
- package/dts/public/people.d.ts +53 -0
- package/dts/public/publicAPIs.d.ts +117 -0
- package/dts/public/settings.d.ts +95 -0
- package/dts/public/tasks.d.ts +25 -0
- package/package.json +1 -1
- package/dist/MicrosoftTeams.d.ts +0 -5
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Namespace to interact with the logging part of the SDK.
|
|
3
|
+
* This object is used to send the app logs on demand to the host client
|
|
4
|
+
*
|
|
5
|
+
* @private
|
|
6
|
+
* Hide from docs
|
|
7
|
+
*/
|
|
8
|
+
export declare namespace logs {
|
|
9
|
+
/**
|
|
10
|
+
* @private
|
|
11
|
+
* Hide from docs
|
|
12
|
+
* ------
|
|
13
|
+
* Registers a handler for getting app log
|
|
14
|
+
* @param handler The handler to invoke to get the app log
|
|
15
|
+
*/
|
|
16
|
+
function registerGetLogHandler(handler: () => string): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { SdkError } from '../public/interfaces';
|
|
2
|
+
export declare namespace meetingRoom {
|
|
3
|
+
/**
|
|
4
|
+
* @private
|
|
5
|
+
* Hide from docs
|
|
6
|
+
*
|
|
7
|
+
* Data structure to represent a meeting room.
|
|
8
|
+
*/
|
|
9
|
+
interface MeetingRoomInfo {
|
|
10
|
+
/**
|
|
11
|
+
* Endpoint id of the meeting room.
|
|
12
|
+
*/
|
|
13
|
+
endpointId: string;
|
|
14
|
+
/**
|
|
15
|
+
* Device name of the meeting room.
|
|
16
|
+
*/
|
|
17
|
+
deviceName: string;
|
|
18
|
+
/**
|
|
19
|
+
* Client type of the meeting room.
|
|
20
|
+
*/
|
|
21
|
+
clientType: string;
|
|
22
|
+
/**
|
|
23
|
+
* Client version of the meeting room.
|
|
24
|
+
*/
|
|
25
|
+
clientVersion: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @private
|
|
29
|
+
* Hide from docs
|
|
30
|
+
*
|
|
31
|
+
* Enum used to indicate meeting room capabilities.
|
|
32
|
+
*/
|
|
33
|
+
enum Capability {
|
|
34
|
+
/**
|
|
35
|
+
* Media control capability: toggle mute.
|
|
36
|
+
*/
|
|
37
|
+
toggleMute = "toggleMute",
|
|
38
|
+
/**
|
|
39
|
+
* Media control capability: toggle camera.
|
|
40
|
+
*/
|
|
41
|
+
toggleCamera = "toggleCamera",
|
|
42
|
+
/**
|
|
43
|
+
* Media control capability: toggle captions.
|
|
44
|
+
*/
|
|
45
|
+
toggleCaptions = "toggleCaptions",
|
|
46
|
+
/**
|
|
47
|
+
* Media control capability: volume ajustion.
|
|
48
|
+
*/
|
|
49
|
+
volume = "volume",
|
|
50
|
+
/**
|
|
51
|
+
* Stage layout control capability: show gallery mode.
|
|
52
|
+
*/
|
|
53
|
+
showVideoGallery = "showVideoGallery",
|
|
54
|
+
/**
|
|
55
|
+
* Stage layout control capability: show content mode.
|
|
56
|
+
*/
|
|
57
|
+
showContent = "showContent",
|
|
58
|
+
/**
|
|
59
|
+
* Stage layout control capability: show content + gallery mode.
|
|
60
|
+
*/
|
|
61
|
+
showVideoGalleryAndContent = "showVideoGalleryAndContent",
|
|
62
|
+
/**
|
|
63
|
+
* Stage layout control capability: show laryge gallery mode.
|
|
64
|
+
*/
|
|
65
|
+
showLargeGallery = "showLargeGallery",
|
|
66
|
+
/**
|
|
67
|
+
* Stage layout control capability: show together mode.
|
|
68
|
+
*/
|
|
69
|
+
showTogether = "showTogether",
|
|
70
|
+
/**
|
|
71
|
+
* Meeting control capability: leave meeting.
|
|
72
|
+
*/
|
|
73
|
+
leaveMeeting = "leaveMeeting"
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* @private
|
|
77
|
+
* Hide from docs
|
|
78
|
+
*
|
|
79
|
+
* Data structure to represent capabilities of a meeting room.
|
|
80
|
+
*/
|
|
81
|
+
interface MeetingRoomCapability {
|
|
82
|
+
/**
|
|
83
|
+
* Media control capabilities, value can be "toggleMute", "toggleCamera", "toggleCaptions", "volume".
|
|
84
|
+
*/
|
|
85
|
+
mediaControls: string[];
|
|
86
|
+
/**
|
|
87
|
+
* Main stage layout control capabilities, value can be "showVideoGallery", "showContent", "showVideoGalleryAndContent", "showLargeGallery", "showTogether".
|
|
88
|
+
*/
|
|
89
|
+
stageLayoutControls: string[];
|
|
90
|
+
/**
|
|
91
|
+
* Meeting control capabilities, value can be "leaveMeeting".
|
|
92
|
+
*/
|
|
93
|
+
meetingControls: string[];
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* @private
|
|
97
|
+
* Hide from docs
|
|
98
|
+
*
|
|
99
|
+
* Data structure to represent states of a meeting room.
|
|
100
|
+
*/
|
|
101
|
+
interface MeetingRoomState {
|
|
102
|
+
/**
|
|
103
|
+
* Current mute state, true: mute, false: unmute.
|
|
104
|
+
*/
|
|
105
|
+
toggleMute: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Current camera state, true: camera on, false: camera off.
|
|
108
|
+
*/
|
|
109
|
+
toggleCamera: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Current captions state, true: captions on, false: captions off.
|
|
112
|
+
*/
|
|
113
|
+
toggleCaptions: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Current main stage layout state, value can be one of "Gallery", "Content + gallery", "Content", "Large gallery" and "Together mode".
|
|
116
|
+
*/
|
|
117
|
+
stageLayout: string;
|
|
118
|
+
/**
|
|
119
|
+
* Current leaveMeeting state, true: leave, false: no-op.
|
|
120
|
+
*/
|
|
121
|
+
leaveMeeting: boolean;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* @private
|
|
125
|
+
* Hide from docs
|
|
126
|
+
*
|
|
127
|
+
* Fetch the meeting room info that paired with current client.
|
|
128
|
+
* @param callback Callback to invoke when the meeting room info is fetched.
|
|
129
|
+
*/
|
|
130
|
+
function getPairedMeetingRoomInfo(callback: (sdkError: SdkError, meetingRoomInfo: MeetingRoomInfo) => void): void;
|
|
131
|
+
/**
|
|
132
|
+
* @private
|
|
133
|
+
* Hide from docs
|
|
134
|
+
*
|
|
135
|
+
* Send a command to paired meeting room.
|
|
136
|
+
* @param commandName The command name.
|
|
137
|
+
* @param callback Callback to invoke when the command response returns.
|
|
138
|
+
*/
|
|
139
|
+
function sendCommandToPairedMeetingRoom(commandName: string, callback: (sdkError: SdkError) => void): void;
|
|
140
|
+
/**
|
|
141
|
+
* @private
|
|
142
|
+
* Hide from docs
|
|
143
|
+
*
|
|
144
|
+
* Registers a handler for meeting room capabilities update.
|
|
145
|
+
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
|
146
|
+
* @param handler The handler to invoke when the capabilities of meeting room update.
|
|
147
|
+
*/
|
|
148
|
+
function registerMeetingRoomCapabilitiesUpdateHandler(handler: (capabilities: MeetingRoomCapability) => void): void;
|
|
149
|
+
/**
|
|
150
|
+
* @private
|
|
151
|
+
* Hide from docs
|
|
152
|
+
* Registers a handler for meeting room states update.
|
|
153
|
+
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
|
154
|
+
* @param handler The handler to invoke when the states of meeting room update.
|
|
155
|
+
*/
|
|
156
|
+
function registerMeetingRoomStatesUpdateHandler(handler: (states: MeetingRoomState) => void): void;
|
|
157
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Namespace to interact with the menu-specific part of the SDK.
|
|
3
|
+
* This object is used to show View Configuration, Action Menu and Navigation Bar Menu.
|
|
4
|
+
*
|
|
5
|
+
* @private
|
|
6
|
+
* Hide from docs until feature is complete
|
|
7
|
+
*/
|
|
8
|
+
export declare namespace menus {
|
|
9
|
+
/**
|
|
10
|
+
* Represents information about item in View Configuration.
|
|
11
|
+
*/
|
|
12
|
+
interface ViewConfiguration {
|
|
13
|
+
/**
|
|
14
|
+
* Unique identifier of view.
|
|
15
|
+
*/
|
|
16
|
+
id: string;
|
|
17
|
+
/**
|
|
18
|
+
* Display title of the view.
|
|
19
|
+
*/
|
|
20
|
+
title: string;
|
|
21
|
+
/**
|
|
22
|
+
* Additional information for accessibility.
|
|
23
|
+
*/
|
|
24
|
+
contentDescription?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Represents information about menu item for Action Menu and Navigation Bar Menu.
|
|
28
|
+
*/
|
|
29
|
+
class MenuItem {
|
|
30
|
+
/**
|
|
31
|
+
* Unique identifier for the menu item.
|
|
32
|
+
*/
|
|
33
|
+
id: string;
|
|
34
|
+
/**
|
|
35
|
+
* Display title of the menu item.
|
|
36
|
+
*/
|
|
37
|
+
title: string;
|
|
38
|
+
/**
|
|
39
|
+
* Display icon of the menu item. The icon value must be a string having SVG icon content.
|
|
40
|
+
*/
|
|
41
|
+
icon: string;
|
|
42
|
+
/**
|
|
43
|
+
* Selected state display icon of the menu item. The icon value must be a string having SVG icon content.
|
|
44
|
+
*/
|
|
45
|
+
iconSelected?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Additional information for accessibility.
|
|
48
|
+
*/
|
|
49
|
+
contentDescription?: string;
|
|
50
|
+
/**
|
|
51
|
+
* State of the menu item
|
|
52
|
+
*/
|
|
53
|
+
enabled: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Interface to show list of items on selection of menu item.
|
|
56
|
+
*/
|
|
57
|
+
viewData: ViewData;
|
|
58
|
+
/**
|
|
59
|
+
* Whether the menu item is selected or not
|
|
60
|
+
*/
|
|
61
|
+
selected: boolean;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Represents information about view to show on Navigation Bar Menu item selection
|
|
65
|
+
*/
|
|
66
|
+
interface ViewData {
|
|
67
|
+
/**
|
|
68
|
+
* Display header title of the item list.
|
|
69
|
+
*/
|
|
70
|
+
listTitle?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Type of the menu item.
|
|
73
|
+
*/
|
|
74
|
+
listType: MenuListType;
|
|
75
|
+
/**
|
|
76
|
+
* Array of MenuItem. Icon value will be required for all items in the list.
|
|
77
|
+
*/
|
|
78
|
+
listItems: MenuItem[];
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Represents information about type of list to display in Navigation Bar Menu.
|
|
82
|
+
*/
|
|
83
|
+
enum MenuListType {
|
|
84
|
+
dropDown = "dropDown",
|
|
85
|
+
popOver = "popOver"
|
|
86
|
+
}
|
|
87
|
+
function initialize(): void;
|
|
88
|
+
/**
|
|
89
|
+
* Registers list of view configurations and it's handler.
|
|
90
|
+
* Handler is responsible for listening selection of View Configuration.
|
|
91
|
+
* @param viewConfig List of view configurations. Minimum 1 value is required.
|
|
92
|
+
* @param handler The handler to invoke when the user selects view configuration.
|
|
93
|
+
*/
|
|
94
|
+
function setUpViews(viewConfig: ViewConfiguration[], handler: (id: string) => boolean): void;
|
|
95
|
+
/**
|
|
96
|
+
* Used to set menu items on the Navigation Bar. If icon is available, icon will be shown, otherwise title will be shown.
|
|
97
|
+
* @param items List of MenuItems for Navigation Bar Menu.
|
|
98
|
+
* @param handler The handler to invoke when the user selects menu item.
|
|
99
|
+
*/
|
|
100
|
+
function setNavBarMenu(items: MenuItem[], handler: (id: string) => boolean): void;
|
|
101
|
+
interface ActionMenuParameters {
|
|
102
|
+
/**
|
|
103
|
+
* Display title for Action Menu
|
|
104
|
+
*/
|
|
105
|
+
title: string;
|
|
106
|
+
/**
|
|
107
|
+
* List of MenuItems for Action Menu
|
|
108
|
+
*/
|
|
109
|
+
items: MenuItem[];
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Used to show Action Menu.
|
|
113
|
+
* @param params Parameters for Menu Parameters
|
|
114
|
+
* @param handler The handler to invoke when the user selects menu item.
|
|
115
|
+
*/
|
|
116
|
+
function showActionMenu(params: ActionMenuParameters, handler: (id: string) => boolean): void;
|
|
117
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { ChatMembersInformation, ShowNotificationParameters, FilePreviewParameters, TeamInstanceParameters, UserJoinedTeamsInformation, UserSettingTypes } from './interfaces';
|
|
2
|
+
export declare function initializePrivateApis(): void;
|
|
3
|
+
/**
|
|
4
|
+
* @private
|
|
5
|
+
* Hide from docs
|
|
6
|
+
* ------
|
|
7
|
+
* Allows an app to retrieve information of all user joined teams
|
|
8
|
+
* @param callback The callback to invoke when the {@link TeamInstanceParameters} object is retrieved.
|
|
9
|
+
* @param teamInstanceParameters OPTIONAL Flags that specify whether to scope call to favorite teams
|
|
10
|
+
*/
|
|
11
|
+
export declare function getUserJoinedTeams(callback: (userJoinedTeamsInformation: UserJoinedTeamsInformation) => void, teamInstanceParameters?: TeamInstanceParameters): void;
|
|
12
|
+
/**
|
|
13
|
+
* @private
|
|
14
|
+
* Hide from docs
|
|
15
|
+
* ------
|
|
16
|
+
* Place the tab into full-screen mode.
|
|
17
|
+
*/
|
|
18
|
+
export declare function enterFullscreen(): void;
|
|
19
|
+
/**
|
|
20
|
+
* @private
|
|
21
|
+
* Hide from docs
|
|
22
|
+
* ------
|
|
23
|
+
* Reverts the tab into normal-screen mode.
|
|
24
|
+
*/
|
|
25
|
+
export declare function exitFullscreen(): void;
|
|
26
|
+
/**
|
|
27
|
+
* @private
|
|
28
|
+
* Hide from docs.
|
|
29
|
+
* ------
|
|
30
|
+
* Opens a client-friendly preview of the specified file.
|
|
31
|
+
* @param file The file to preview.
|
|
32
|
+
*/
|
|
33
|
+
export declare function openFilePreview(filePreviewParameters: FilePreviewParameters): void;
|
|
34
|
+
/**
|
|
35
|
+
* @private
|
|
36
|
+
* Hide from docs.
|
|
37
|
+
* ------
|
|
38
|
+
* display notification API.
|
|
39
|
+
* @param message Notification message.
|
|
40
|
+
* @param notificationType Notification type
|
|
41
|
+
*/
|
|
42
|
+
export declare function showNotification(showNotificationParameters: ShowNotificationParameters): void;
|
|
43
|
+
/**
|
|
44
|
+
* @private
|
|
45
|
+
* Hide from docs.
|
|
46
|
+
* ------
|
|
47
|
+
* Upload a custom App manifest directly to both team and personal scopes.
|
|
48
|
+
* This method works just for the first party Apps.
|
|
49
|
+
*/
|
|
50
|
+
export declare function uploadCustomApp(manifestBlob: Blob, onComplete?: (status: boolean, reason?: string) => void): void;
|
|
51
|
+
/**
|
|
52
|
+
* @private
|
|
53
|
+
* Internal use only
|
|
54
|
+
* Sends a custom action MessageRequest to Teams or parent window
|
|
55
|
+
* @param actionName Specifies name of the custom action to be sent
|
|
56
|
+
* @param args Specifies additional arguments passed to the action
|
|
57
|
+
* @param callback Optionally specify a callback to receive response parameters from the parent
|
|
58
|
+
* @returns id of sent message
|
|
59
|
+
*/
|
|
60
|
+
export declare function sendCustomMessage(actionName: string, args?: any[], callback?: (...args: any[]) => void): void;
|
|
61
|
+
/**
|
|
62
|
+
* @private
|
|
63
|
+
* Internal use only
|
|
64
|
+
* Sends a custom action MessageEvent to a child iframe/window, only if you are not using auth popup.
|
|
65
|
+
* Otherwise it will go to the auth popup (which becomes the child)
|
|
66
|
+
* @param actionName Specifies name of the custom action to be sent
|
|
67
|
+
* @param args Specifies additional arguments passed to the action
|
|
68
|
+
* @returns id of sent message
|
|
69
|
+
*/
|
|
70
|
+
export declare function sendCustomEvent(actionName: string, args?: any[]): void;
|
|
71
|
+
/**
|
|
72
|
+
* @private
|
|
73
|
+
* Internal use only
|
|
74
|
+
* Adds a handler for an action sent by a child window or parent window
|
|
75
|
+
* @param actionName Specifies name of the action message to handle
|
|
76
|
+
* @param customHandler The callback to invoke when the action message is received. The return value is sent to the child
|
|
77
|
+
*/
|
|
78
|
+
export declare function registerCustomHandler(actionName: string, customHandler: (...args: any[]) => any[]): void;
|
|
79
|
+
/**
|
|
80
|
+
* @private
|
|
81
|
+
* Hide from docs
|
|
82
|
+
* ------
|
|
83
|
+
* Allows an app to retrieve information of all chat members
|
|
84
|
+
* Because a malicious party run your content in a browser, this value should
|
|
85
|
+
* be used only as a hint as to who the members are and never as proof of membership.
|
|
86
|
+
* @param callback The callback to invoke when the {@link ChatMembersInformation} object is retrieved.
|
|
87
|
+
*/
|
|
88
|
+
export declare function getChatMembers(callback: (chatMembersInformation: ChatMembersInformation) => void): void;
|
|
89
|
+
/**
|
|
90
|
+
* @private
|
|
91
|
+
* Hide from docs
|
|
92
|
+
* ------
|
|
93
|
+
* Allows an app to get the configuration setting value
|
|
94
|
+
* @param callback The callback to invoke when the value is retrieved.
|
|
95
|
+
* @param key The key for the config setting
|
|
96
|
+
*/
|
|
97
|
+
export declare function getConfigSetting(callback: (value: string) => void, key: string): void;
|
|
98
|
+
/**
|
|
99
|
+
* @private
|
|
100
|
+
* register a handler to be called when a user setting changes. The changed setting type & value is provided in the callback.
|
|
101
|
+
* @param settingTypes List of user setting changes to subscribe
|
|
102
|
+
* @param handler When a subscribed setting is updated this handler is called
|
|
103
|
+
*/
|
|
104
|
+
export declare function registerUserSettingsChangeHandler(settingTypes: UserSettingTypes[], handler: (settingType: UserSettingTypes, value: any) => void): void;
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { SdkError } from '../public/interfaces';
|
|
2
|
+
export declare namespace remoteCamera {
|
|
3
|
+
/**
|
|
4
|
+
* @private
|
|
5
|
+
* Hide from docs
|
|
6
|
+
*
|
|
7
|
+
* Data structure to represent patricipant details needed to request control of camera.
|
|
8
|
+
*/
|
|
9
|
+
interface Participant {
|
|
10
|
+
/**
|
|
11
|
+
* Id of participant.
|
|
12
|
+
*/
|
|
13
|
+
id: string;
|
|
14
|
+
/**
|
|
15
|
+
* Display name of participant.
|
|
16
|
+
*/
|
|
17
|
+
displayName?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Active indicates whether the participant's device is actively being controlled.
|
|
20
|
+
*/
|
|
21
|
+
active?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @private
|
|
25
|
+
* Hide from docs
|
|
26
|
+
*
|
|
27
|
+
* Enum used to indicate possible camera control commands.
|
|
28
|
+
*/
|
|
29
|
+
enum ControlCommand {
|
|
30
|
+
Reset = "Reset",
|
|
31
|
+
ZoomIn = "ZoomIn",
|
|
32
|
+
ZoomOut = "ZoomOut",
|
|
33
|
+
PanLeft = "PanLeft",
|
|
34
|
+
PanRight = "PanRight",
|
|
35
|
+
TiltUp = "TiltUp",
|
|
36
|
+
TiltDown = "TiltDown"
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @private
|
|
40
|
+
* Hide from docs
|
|
41
|
+
*
|
|
42
|
+
* Data structure to indicate the current state of the device.
|
|
43
|
+
*/
|
|
44
|
+
interface DeviceState {
|
|
45
|
+
/**
|
|
46
|
+
* All operation are available to apply.
|
|
47
|
+
*/
|
|
48
|
+
available: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Either camera doesnt support to get state or It unable to apply command.
|
|
51
|
+
*/
|
|
52
|
+
error: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Reset max out or already applied. Client Disable Reset.
|
|
55
|
+
*/
|
|
56
|
+
reset: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* ZoomIn maxed out.
|
|
59
|
+
*/
|
|
60
|
+
zoomIn: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* ZoomOut maxed out.
|
|
63
|
+
*/
|
|
64
|
+
zoomOut: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* PanLeft reached max left.
|
|
67
|
+
*/
|
|
68
|
+
panLeft: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* PanRight reached max right.
|
|
71
|
+
*/
|
|
72
|
+
panRight: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* TiltUp reached top.
|
|
75
|
+
*/
|
|
76
|
+
tiltUp: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* TiltDown reached bottom.
|
|
79
|
+
*/
|
|
80
|
+
tiltDown: boolean;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* @private
|
|
84
|
+
* Hide from docs
|
|
85
|
+
*
|
|
86
|
+
* Enum used to indicate the reason for the error.
|
|
87
|
+
*/
|
|
88
|
+
enum ErrorReason {
|
|
89
|
+
CommandResetError = 0,
|
|
90
|
+
CommandZoomInError = 1,
|
|
91
|
+
CommandZoomOutError = 2,
|
|
92
|
+
CommandPanLeftError = 3,
|
|
93
|
+
CommandPanRightError = 4,
|
|
94
|
+
CommandTiltUpError = 5,
|
|
95
|
+
CommandTiltDownError = 6,
|
|
96
|
+
SendDataError = 7
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* @private
|
|
100
|
+
* Hide from docs
|
|
101
|
+
*
|
|
102
|
+
* Data structure to indicate the status of the current session.
|
|
103
|
+
*/
|
|
104
|
+
interface SessionStatus {
|
|
105
|
+
/**
|
|
106
|
+
* Whether the far-end user is controlling a device.
|
|
107
|
+
*/
|
|
108
|
+
inControl: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Reason the control session was terminated.
|
|
111
|
+
*/
|
|
112
|
+
terminatedReason?: SessionTerminatedReason;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* @private
|
|
116
|
+
* Hide from docs
|
|
117
|
+
*
|
|
118
|
+
* Enum used to indicate the reason the session was terminated.
|
|
119
|
+
*/
|
|
120
|
+
enum SessionTerminatedReason {
|
|
121
|
+
None = 0,
|
|
122
|
+
ControlDenied = 1,
|
|
123
|
+
ControlNoResponse = 2,
|
|
124
|
+
ControlBusy = 3,
|
|
125
|
+
AckTimeout = 4,
|
|
126
|
+
ControlTerminated = 5,
|
|
127
|
+
ControllerTerminated = 6,
|
|
128
|
+
DataChannelError = 7,
|
|
129
|
+
ControllerCancelled = 8,
|
|
130
|
+
ControlDisabled = 9
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* @private
|
|
134
|
+
* Hide from docs
|
|
135
|
+
*
|
|
136
|
+
* Fetch a list of the participants with controllable-cameras in a meeting.
|
|
137
|
+
* @param callback Callback contains 2 parameters, error and participants.
|
|
138
|
+
* error can either contain an error of type SdkError, incase of an error, or null when fetch is successful
|
|
139
|
+
* participants can either contain an array of Participant objects, incase of a successful fetch or null when it fails
|
|
140
|
+
* participants: object that contains an array of participants with controllable-cameras
|
|
141
|
+
*/
|
|
142
|
+
function getCapableParticipants(callback: (error: SdkError | null, participants: Participant[] | null) => void): void;
|
|
143
|
+
/**
|
|
144
|
+
* @private
|
|
145
|
+
* Hide from docs
|
|
146
|
+
*
|
|
147
|
+
* Request control of a participant's camera.
|
|
148
|
+
* @param participant Participant specifies the participant to send the request for camera control.
|
|
149
|
+
* @param callback Callback contains 2 parameters, error and requestResponse.
|
|
150
|
+
* error can either contain an error of type SdkError, incase of an error, or null when fetch is successful
|
|
151
|
+
* requestResponse can either contain the true/false value, incase of a successful request or null when it fails
|
|
152
|
+
* requestResponse: True means request was accepted and false means request was denied
|
|
153
|
+
*/
|
|
154
|
+
function requestControl(participant: Participant, callback: (error: SdkError | null, requestResponse: boolean | null) => void): void;
|
|
155
|
+
/**
|
|
156
|
+
* @private
|
|
157
|
+
* Hide from docs
|
|
158
|
+
*
|
|
159
|
+
* Send control command to the participant's camera.
|
|
160
|
+
* @param ControlCommand ControlCommand specifies the command for controling the camera.
|
|
161
|
+
* @param callback Callback to invoke when the command response returns.
|
|
162
|
+
*/
|
|
163
|
+
function sendControlCommand(ControlCommand: ControlCommand, callback: (error: SdkError | null) => void): void;
|
|
164
|
+
/**
|
|
165
|
+
* @private
|
|
166
|
+
* Hide from docs
|
|
167
|
+
*
|
|
168
|
+
* Terminate the remote session
|
|
169
|
+
* @param callback Callback to invoke when the command response returns.
|
|
170
|
+
*/
|
|
171
|
+
function terminateSession(callback: (error: SdkError | null) => void): void;
|
|
172
|
+
/**
|
|
173
|
+
* Registers a handler for change in participants with controllable-cameras.
|
|
174
|
+
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
|
175
|
+
* @param handler The handler to invoke when the list of participants with controllable-cameras changes.
|
|
176
|
+
*/
|
|
177
|
+
function registerOnCapableParticipantsChangeHandler(handler: (participantChange: Participant[]) => void): void;
|
|
178
|
+
/**
|
|
179
|
+
* Registers a handler for error.
|
|
180
|
+
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
|
181
|
+
* @param handler The handler to invoke when there is an error from the camera handler.
|
|
182
|
+
*/
|
|
183
|
+
function registerOnErrorHandler(handler: (error: ErrorReason) => void): void;
|
|
184
|
+
/**
|
|
185
|
+
* Registers a handler for device state change.
|
|
186
|
+
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
|
187
|
+
* @param handler The handler to invoke when the controlled device changes state.
|
|
188
|
+
*/
|
|
189
|
+
function registerOnDeviceStateChangeHandler(handler: (deviceStateChange: DeviceState) => void): void;
|
|
190
|
+
/**
|
|
191
|
+
* Registers a handler for session status change.
|
|
192
|
+
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
|
193
|
+
* @param handler The handler to invoke when the current session status changes.
|
|
194
|
+
*/
|
|
195
|
+
function registerOnSessionStatusChangeHandler(handler: (sessionStatusChange: SessionStatus) => void): void;
|
|
196
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export declare namespace appInitialization {
|
|
2
|
+
const Messages: {
|
|
3
|
+
AppLoaded: string;
|
|
4
|
+
Success: string;
|
|
5
|
+
Failure: string;
|
|
6
|
+
ExpectedFailure: string;
|
|
7
|
+
};
|
|
8
|
+
enum FailedReason {
|
|
9
|
+
AuthFailed = "AuthFailed",
|
|
10
|
+
Timeout = "Timeout",
|
|
11
|
+
Other = "Other"
|
|
12
|
+
}
|
|
13
|
+
enum ExpectedFailureReason {
|
|
14
|
+
PermissionError = "PermissionError",
|
|
15
|
+
NotFound = "NotFound",
|
|
16
|
+
Throttling = "Throttling",
|
|
17
|
+
Offline = "Offline",
|
|
18
|
+
Other = "Other"
|
|
19
|
+
}
|
|
20
|
+
interface IFailedRequest {
|
|
21
|
+
reason: FailedReason;
|
|
22
|
+
message?: string;
|
|
23
|
+
}
|
|
24
|
+
interface IExpectedFailureRequest {
|
|
25
|
+
reason: ExpectedFailureReason;
|
|
26
|
+
message?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Notifies the frame that app has loaded and to hide the loading indicator if one is shown.
|
|
30
|
+
*/
|
|
31
|
+
function notifyAppLoaded(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Notifies the frame that app initialization is successful and is ready for user interaction.
|
|
34
|
+
*/
|
|
35
|
+
function notifySuccess(): void;
|
|
36
|
+
/**
|
|
37
|
+
* Notifies the frame that app initialization has failed and to show an error page in its place.
|
|
38
|
+
*/
|
|
39
|
+
function notifyFailure(appInitializationFailedRequest: IFailedRequest): void;
|
|
40
|
+
/**
|
|
41
|
+
* Notifies the frame that app initialized with some expected errors.
|
|
42
|
+
*/
|
|
43
|
+
function notifyExpectedFailure(expectedFailureRequest: IExpectedFailureRequest): void;
|
|
44
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface IAppWindow {
|
|
2
|
+
postMessage(message: any): void;
|
|
3
|
+
addEventListener(type: string, listener: Function): void;
|
|
4
|
+
}
|
|
5
|
+
export declare class ChildAppWindow implements IAppWindow {
|
|
6
|
+
postMessage(message: any, onComplete?: (status: boolean, reason?: string) => void): void;
|
|
7
|
+
addEventListener(type: string, listener: (message: any) => void): void;
|
|
8
|
+
}
|
|
9
|
+
export declare class ParentAppWindow implements IAppWindow {
|
|
10
|
+
private static _instance;
|
|
11
|
+
static readonly Instance: IAppWindow;
|
|
12
|
+
postMessage(message: any, onComplete?: (status: boolean, reason?: string) => void): void;
|
|
13
|
+
addEventListener(type: string, listener: (message: any) => void): void;
|
|
14
|
+
}
|