@@ -28,74 +28,88 @@ const speechTextAnalyticsApi = new platformClient.SpeechTextAnalyticsApi();
2828const recordingApi = new platformClient . RecordingApi ( ) ;
2929
3030const searchQueuesTool = searchQueues ( { routingApi } ) ;
31- server . tool (
31+ server . registerTool (
3232 searchQueuesTool . schema . name ,
33- searchQueuesTool . schema . description ,
34- searchQueuesTool . schema . paramsSchema . shape ,
35- searchQueuesTool . schema . annotations ,
33+ {
34+ description : searchQueuesTool . schema . description ,
35+ inputSchema : searchQueuesTool . schema . paramsSchema . shape ,
36+ annotations : searchQueuesTool . schema . annotations ,
37+ } ,
3638 withAuth ( searchQueuesTool . call ) ,
3739) ;
3840
3941const sampleConversationsByQueueTool = sampleConversationsByQueue ( {
4042 analyticsApi,
4143} ) ;
42- server . tool (
44+ server . registerTool (
4345 sampleConversationsByQueueTool . schema . name ,
44- sampleConversationsByQueueTool . schema . description ,
45- sampleConversationsByQueueTool . schema . paramsSchema . shape ,
46- sampleConversationsByQueueTool . schema . annotations ,
46+ {
47+ description : sampleConversationsByQueueTool . schema . description ,
48+ inputSchema : sampleConversationsByQueueTool . schema . paramsSchema . shape ,
49+ annotations : sampleConversationsByQueueTool . schema . annotations ,
50+ } ,
4751 withAuth ( sampleConversationsByQueueTool . call ) ,
4852) ;
4953
5054const queryQueueVolumesTool = queryQueueVolumes ( { analyticsApi } ) ;
51- server . tool (
55+ server . registerTool (
5256 queryQueueVolumesTool . schema . name ,
53- queryQueueVolumesTool . schema . description ,
54- queryQueueVolumesTool . schema . paramsSchema . shape ,
55- queryQueueVolumesTool . schema . annotations ,
57+ {
58+ description : queryQueueVolumesTool . schema . description ,
59+ inputSchema : queryQueueVolumesTool . schema . paramsSchema . shape ,
60+ annotations : queryQueueVolumesTool . schema . annotations ,
61+ } ,
5662 withAuth ( queryQueueVolumesTool . call ) ,
5763) ;
5864
5965const voiceCallQualityTool = voiceCallQuality ( { analyticsApi } ) ;
60- server . tool (
66+ server . registerTool (
6167 voiceCallQualityTool . schema . name ,
62- voiceCallQualityTool . schema . description ,
63- voiceCallQualityTool . schema . paramsSchema . shape ,
64- voiceCallQualityTool . schema . annotations ,
68+ {
69+ description : voiceCallQualityTool . schema . description ,
70+ inputSchema : voiceCallQualityTool . schema . paramsSchema . shape ,
71+ annotations : voiceCallQualityTool . schema . annotations ,
72+ } ,
6573 withAuth ( voiceCallQualityTool . call ) ,
6674) ;
6775
6876const conversationSentimentTool = conversationSentiment ( {
6977 speechTextAnalyticsApi,
7078} ) ;
71- server . tool (
79+ server . registerTool (
7280 conversationSentimentTool . schema . name ,
73- conversationSentimentTool . schema . description ,
74- conversationSentimentTool . schema . paramsSchema . shape ,
75- conversationSentimentTool . schema . annotations ,
81+ {
82+ description : conversationSentimentTool . schema . description ,
83+ inputSchema : conversationSentimentTool . schema . paramsSchema . shape ,
84+ annotations : conversationSentimentTool . schema . annotations ,
85+ } ,
7686 withAuth ( conversationSentimentTool . call ) ,
7787) ;
7888
7989const conversationTopicsTool = conversationTopics ( {
8090 speechTextAnalyticsApi,
8191 analyticsApi,
8292} ) ;
83- server . tool (
93+ server . registerTool (
8494 conversationTopicsTool . schema . name ,
85- conversationTopicsTool . schema . description ,
86- conversationTopicsTool . schema . paramsSchema . shape ,
87- conversationTopicsTool . schema . annotations ,
95+ {
96+ description : conversationTopicsTool . schema . description ,
97+ inputSchema : conversationTopicsTool . schema . paramsSchema . shape ,
98+ annotations : conversationTopicsTool . schema . annotations ,
99+ } ,
88100 withAuth ( conversationTopicsTool . call ) ,
89101) ;
90102
91103const searchVoiceConversationsTool = searchVoiceConversations ( {
92104 analyticsApi,
93105} ) ;
94- server . tool (
106+ server . registerTool (
95107 searchVoiceConversationsTool . schema . name ,
96- searchVoiceConversationsTool . schema . description ,
97- searchVoiceConversationsTool . schema . paramsSchema . shape ,
98- searchVoiceConversationsTool . schema . annotations ,
108+ {
109+ description : searchVoiceConversationsTool . schema . description ,
110+ inputSchema : searchVoiceConversationsTool . schema . paramsSchema . shape ,
111+ annotations : searchVoiceConversationsTool . schema . annotations ,
112+ } ,
99113 withAuth ( searchVoiceConversationsTool . call ) ,
100114) ;
101115
@@ -104,11 +118,13 @@ const conversationTranscriptTool = conversationTranscription({
104118 speechTextAnalyticsApi,
105119 fetchUrl : fetch ,
106120} ) ;
107- server . tool (
121+ server . registerTool (
108122 conversationTranscriptTool . schema . name ,
109- conversationTranscriptTool . schema . description ,
110- conversationTranscriptTool . schema . paramsSchema . shape ,
111- conversationTranscriptTool . schema . annotations ,
123+ {
124+ description : conversationTranscriptTool . schema . description ,
125+ inputSchema : conversationTranscriptTool . schema . paramsSchema . shape ,
126+ annotations : conversationTranscriptTool . schema . annotations ,
127+ } ,
112128 withAuth ( conversationTranscriptTool . call ) ,
113129) ;
114130
0 commit comments