mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
Corrected amazon-connect-streams Agent::onMuteToggle and tests. (#36065)
* Added amazon-connect-streams from v1.3 * Updated Project header to URL for Amazon Connect Streams * Set strictNullChecks to 'true' * Corrected amazon-connect-streams onMuteToggle callback object.
This commit is contained in:
@@ -3,6 +3,7 @@ connect.core.initCCP(elem, { ccpUrl: "" }); // $ExpectType void
|
||||
|
||||
// Types for below tests
|
||||
let agentCallback: connect.AgentCallback = () => {};
|
||||
let muteCallback: connect.MuteCallback = () => {};
|
||||
let agentConfiguration: connect.AgentConfiguration;
|
||||
let successFailOptions: connect.SuccessFailOptions;
|
||||
let agentState: connect.AgentState;
|
||||
@@ -20,7 +21,7 @@ connect.agent(agent => {
|
||||
agent.onOffline(agentCallback); // $ExpectType: void
|
||||
agent.onError(agentCallback); // $ExpectType: void
|
||||
agent.onAfterCallWork(agentCallback); // $ExpectType: void
|
||||
agent.onMuteToggle(agentCallback); // $ExpectType: void
|
||||
agent.onMuteToggle(muteCallback); // $ExpectType: void
|
||||
agent.getState(); // $ExpectType: AgentState
|
||||
agent.getStateDuration(); // $ExpectType: number
|
||||
agent.getContacts(""); // $ExpectType: connect.Contact[]
|
||||
|
||||
+14
-1
@@ -13,6 +13,15 @@ declare namespace connect {
|
||||
*/
|
||||
type AgentCallback = (agent: Agent) => void;
|
||||
|
||||
/**
|
||||
*
|
||||
* A callback to receive agent details
|
||||
*
|
||||
* @param agent An Agent object containing information about the currently
|
||||
* signed-in agent.
|
||||
*/
|
||||
type MuteCallback = (muteState: MuteState) => void;
|
||||
|
||||
/**
|
||||
* Register a callback to receive agent details
|
||||
*
|
||||
@@ -223,6 +232,10 @@ declare namespace connect {
|
||||
queueARN?: string;
|
||||
}
|
||||
|
||||
interface MuteState {
|
||||
muted: boolean;
|
||||
}
|
||||
|
||||
interface Agent {
|
||||
/**
|
||||
* Subscribe a method to be called whenever Contact information is about to be updated.
|
||||
@@ -273,7 +286,7 @@ declare namespace connect {
|
||||
*
|
||||
* @param callback A callback to receive updates on agent mute state
|
||||
*/
|
||||
onMuteToggle(callback: AgentCallback): void;
|
||||
onMuteToggle(callback: MuteCallback): void;
|
||||
|
||||
/**
|
||||
* Get the agent's current AgentState object indicating their availability state type.
|
||||
|
||||
Reference in New Issue
Block a user