@@ -22,84 +22,72 @@ const server: McpServer = new McpServer({
2222 version : "0.0.1" ,
2323} ) ;
2424
25- const searchQueuesTool = searchQueues ( {
26- routingApi : new platformClient . RoutingApi ( ) ,
27- } ) ;
25+ const routingApi = new platformClient . RoutingApi ( ) ;
26+ const analyticsApi = new platformClient . AnalyticsApi ( ) ;
27+ const speechTextAnalyticsApi = new platformClient . SpeechTextAnalyticsApi ( ) ;
28+
29+ const searchQueuesTool = searchQueues ( { routingApi } ) ;
2830server . tool (
2931 searchQueuesTool . schema . name ,
3032 searchQueuesTool . schema . description ,
3133 searchQueuesTool . schema . paramsSchema . shape ,
32- config . mockingEnabled
33- ? searchQueuesTool . mockCall
34- : withAuth (
35- searchQueuesTool . call ,
36- config . genesysCloud ,
37- platformClient . ApiClient . instance ,
38- ) ,
34+ withAuth (
35+ searchQueuesTool . call ,
36+ config . genesysCloud ,
37+ platformClient . ApiClient . instance ,
38+ ) ,
3939) ;
4040
41- const queryConversationsByQueueTool = sampleConversationsByQueue ( {
42- analyticsApi : new platformClient . AnalyticsApi ( ) ,
41+ const sampleConversationsByQueueTool = sampleConversationsByQueue ( {
42+ analyticsApi,
4343} ) ;
4444server . tool (
45- queryConversationsByQueueTool . schema . name ,
46- queryConversationsByQueueTool . schema . description ,
47- queryConversationsByQueueTool . schema . paramsSchema . shape ,
48- config . mockingEnabled
49- ? queryConversationsByQueueTool . mockCall
50- : withAuth (
51- queryConversationsByQueueTool . call ,
52- config . genesysCloud ,
53- platformClient . ApiClient . instance ,
54- ) ,
45+ sampleConversationsByQueueTool . schema . name ,
46+ sampleConversationsByQueueTool . schema . description ,
47+ sampleConversationsByQueueTool . schema . paramsSchema . shape ,
48+ withAuth (
49+ sampleConversationsByQueueTool . call ,
50+ config . genesysCloud ,
51+ platformClient . ApiClient . instance ,
52+ ) ,
5553) ;
5654
57- const queryQueueVolumesTool = queryQueueVolumes ( {
58- analyticsApi : new platformClient . AnalyticsApi ( ) ,
59- } ) ;
55+ const queryQueueVolumesTool = queryQueueVolumes ( { analyticsApi } ) ;
6056server . tool (
6157 queryQueueVolumesTool . schema . name ,
6258 queryQueueVolumesTool . schema . description ,
6359 queryQueueVolumesTool . schema . paramsSchema . shape ,
64- config . mockingEnabled
65- ? queryQueueVolumesTool . mockCall
66- : withAuth (
67- queryQueueVolumesTool . call ,
68- config . genesysCloud ,
69- platformClient . ApiClient . instance ,
70- ) ,
60+ withAuth (
61+ queryQueueVolumesTool . call ,
62+ config . genesysCloud ,
63+ platformClient . ApiClient . instance ,
64+ ) ,
7165) ;
7266
73- const voiceCallQualityTool = voiceCallQuality ( {
74- analyticsApi : new platformClient . AnalyticsApi ( ) ,
75- } ) ;
67+ const voiceCallQualityTool = voiceCallQuality ( { analyticsApi } ) ;
7668server . tool (
7769 voiceCallQualityTool . schema . name ,
7870 voiceCallQualityTool . schema . description ,
7971 voiceCallQualityTool . schema . paramsSchema . shape ,
80- config . mockingEnabled
81- ? voiceCallQualityTool . mockCall
82- : withAuth (
83- voiceCallQualityTool . call ,
84- config . genesysCloud ,
85- platformClient . ApiClient . instance ,
86- ) ,
72+ withAuth (
73+ voiceCallQualityTool . call ,
74+ config . genesysCloud ,
75+ platformClient . ApiClient . instance ,
76+ ) ,
8777) ;
8878
8979const conversationSentimentTool = conversationSentiment ( {
90- speechTextAnalyticsApi : new platformClient . SpeechTextAnalyticsApi ( ) ,
80+ speechTextAnalyticsApi,
9181} ) ;
9282server . tool (
9383 conversationSentimentTool . schema . name ,
9484 conversationSentimentTool . schema . description ,
9585 conversationSentimentTool . schema . paramsSchema . shape ,
96- config . mockingEnabled
97- ? conversationSentimentTool . mockCall
98- : withAuth (
99- conversationSentimentTool . call ,
100- config . genesysCloud ,
101- platformClient . ApiClient . instance ,
102- ) ,
86+ withAuth (
87+ conversationSentimentTool . call ,
88+ config . genesysCloud ,
89+ platformClient . ApiClient . instance ,
90+ ) ,
10391) ;
10492
10593const transport = new StdioServerTransport ( ) ;
0 commit comments