-
AWS AmazonConnectApp.init() Sample with TypescriptDEV/aws 2024. 2. 20. 17:56
SampleCode.tsx
import './App.css'; import { AgentClient, AgentStateChangedHandler } from "@amazon-connect/contact"; import { AgentStateChangedEventData } from "./type/AgentStateChangedHandler" const agentClient = new AgentClient(); console.log("agentClient : ", agentClient) function App() { const handler: AgentStateChangedHandler = async (data: AgentStateChangedEventData) => { console.log("Agent state change occurred! " + data); }; agentClient.onStateChanged(handler); return ( <div> {/* 코드생략... */} </div> ); } export default App;
AgentStateChangedEventData.tsx
export type AgentStateChangedEventData = { state: string; previous: { state: string; }; }
'DEV > aws' 카테고리의 다른 글
Mac OS Terminal에서 AWS EC2 ssh 접속하기 (0) 2024.03.06 AWS EC2 git 권한 (1) 2024.02.27 AWS EventBridge로 Lambda 특정 주기(시간)마다 호출하기 (0) 2024.01.19 AWS Lambda Node로 axios require 해보기, 함수 만들기 부터... (0) 2024.01.19 AWS Lambda란...? (0) 2024.01.17