diff --git a/package-lock.json b/package-lock.json index 42d99bdc..0348d674 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "amazon-connect-streams", - "version": "2.4.6", + "version": "2.4.7", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "amazon-connect-streams", - "version": "2.4.6", + "version": "2.4.7", "license": "Apache-2.0", "devDependencies": { "chai": "^4.1.2", diff --git a/package.json b/package.json index 92ff3fba..f0b9d51e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "amazon-connect-streams", - "version": "2.4.6", + "version": "2.4.7", "description": "Amazon Connect Streams Library", "engines": { "node": ">=12.0.0" diff --git a/src/index.d.ts b/src/index.d.ts index 1465739a..25f7db80 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -724,6 +724,11 @@ declare namespace connect { SEND_DATA_FAILED_EXCEPTION = "SendDataFailedException", UNAUTHORIZED_EXCEPTION = "UnauthorizedException", } + + enum MonitoringMode { + SLIENT_MONITOR = "SILENT_MONITOR", + BARGE = "BARGE" + } enum MasterTopics { LOGIN_POPUP = 'loginPopup', @@ -1501,6 +1506,17 @@ declare namespace connect { /** Determine whether this contact is a softphone call and multiparty conference feature is turned on. */ isMultiPartyConferenceEnabled(): boolean; + + /** Determines if the contact is under manager's supervision */ + isUnderSupervision(): boolean; + + /** + * Updates the monitor participant state to switch between different monitoring modes. + * + * @param targetState A MonitoringMode enum member + * @param callbacks Success and failure callbacks to determine whether the operation was successful + */ + updateMonitorParticipantState(targetState: MonitoringMode, callbacks?: SuccessFailOptions): void; } interface ContactState { @@ -1704,7 +1720,36 @@ declare namespace connect { * @param callbacks Success and failure callbacks to determine whether the operation was successful. */ unmuteParticipant(callbacks?: SuccessFailOptions): void; - + + /** + * Returns true if monitorStatus is MonitoringMode.SILENT_MONITOR. This means the supervisor connection is in silent monitoring state. + * Regular agent will not see supervisor's connection in the snapshot while it is in silent monitor state. + */ + isSilentMonitor(): boolean; + + /** + * Returns true if monitorStatus is MonitoringMode.BARGE. + * This means the connection is in barge-in state. Regular agent will see the supervisor's connection in the list of connections in the snapshot. + */ + isBarge(): boolean; + + /** Returns true if agent's monitoringCapabilities contain MonitoringMode.SILENT_MONITOR type. */ + isSilentMonitorEnabled(): boolean; + + /** Returns true if agent's monitoringCapabilities contain MonitoringMode.BARGE state type. */ + isBargeEnabled(): boolean; + + /** Returns the array of enabled monitor states of this connection. The array will consist of MonitoringMode enum values. */ + getMonitorCapabilities(): MonitoringMode[]; + + /** + * Returns the current monitoring state of this connection. + * This value can be one of MonitoringMode enum values if the agent is supervisor, otherwise the monitorStatus will be undefined for the agent. + */ + getMonitorStatus(): MonitoringMode; + + /** Returns true if the connection was forced muted by the manager. */ + isForcedMute(): boolean; } /**