@egain/egain-mcp-server 1.0.26 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (574) hide show
  1. package/README.md +20 -43
  2. package/bin/mcp-server.js +39534 -29516
  3. package/bin/mcp-server.js.map +298 -185
  4. package/esm/src/cloudflare-worker/cloudflare-worker.d.ts.map +1 -1
  5. package/esm/src/cloudflare-worker/cloudflare-worker.js +20 -9
  6. package/esm/src/cloudflare-worker/cloudflare-worker.js.map +1 -1
  7. package/esm/src/funcs/aiSearch.d.ts +63 -0
  8. package/esm/src/funcs/aiSearch.d.ts.map +1 -0
  9. package/esm/src/funcs/aiSearch.js +151 -0
  10. package/esm/src/funcs/aiSearch.js.map +1 -0
  11. package/esm/src/funcs/getAnnouncementArticles.d.ts +61 -0
  12. package/esm/src/funcs/getAnnouncementArticles.d.ts.map +1 -0
  13. package/esm/src/funcs/getAnnouncementArticles.js +152 -0
  14. package/esm/src/funcs/getAnnouncementArticles.js.map +1 -0
  15. package/esm/src/funcs/getAnnouncements.d.ts +39 -1
  16. package/esm/src/funcs/getAnnouncements.d.ts.map +1 -1
  17. package/esm/src/funcs/getAnnouncements.js +39 -1
  18. package/esm/src/funcs/getAnnouncements.js.map +1 -1
  19. package/esm/src/funcs/getArticle.d.ts +42 -0
  20. package/esm/src/funcs/getArticle.d.ts.map +1 -1
  21. package/esm/src/funcs/getArticle.js +42 -0
  22. package/esm/src/funcs/getArticle.js.map +1 -1
  23. package/esm/src/funcs/getArticleById.d.ts +70 -0
  24. package/esm/src/funcs/getArticleById.d.ts.map +1 -0
  25. package/esm/src/funcs/getArticleById.js +163 -0
  26. package/esm/src/funcs/getArticleById.js.map +1 -0
  27. package/esm/src/funcs/getBestAnswer.d.ts +66 -0
  28. package/esm/src/funcs/getBestAnswer.d.ts.map +1 -0
  29. package/esm/src/funcs/getBestAnswer.js +148 -0
  30. package/esm/src/funcs/getBestAnswer.js.map +1 -0
  31. package/esm/src/funcs/getMyPortals.d.ts +97 -0
  32. package/esm/src/funcs/getMyPortals.d.ts.map +1 -0
  33. package/esm/src/funcs/getMyPortals.js +180 -0
  34. package/esm/src/funcs/getMyPortals.js.map +1 -0
  35. package/esm/src/funcs/getPopularArticles.d.ts +39 -0
  36. package/esm/src/funcs/getPopularArticles.d.ts.map +1 -1
  37. package/esm/src/funcs/getPopularArticles.js +47 -3
  38. package/esm/src/funcs/getPopularArticles.js.map +1 -1
  39. package/esm/src/funcs/getPortals.d.ts +26 -1
  40. package/esm/src/funcs/getPortals.d.ts.map +1 -1
  41. package/esm/src/funcs/getPortals.js +35 -10
  42. package/esm/src/funcs/getPortals.js.map +1 -1
  43. package/esm/src/funcs/makeSuggestion.d.ts +46 -2
  44. package/esm/src/funcs/makeSuggestion.d.ts.map +1 -1
  45. package/esm/src/funcs/makeSuggestion.js +51 -3
  46. package/esm/src/funcs/makeSuggestion.js.map +1 -1
  47. package/esm/src/funcs/queryAnswers.d.ts +41 -5
  48. package/esm/src/funcs/queryAnswers.d.ts.map +1 -1
  49. package/esm/src/funcs/queryAnswers.js +41 -5
  50. package/esm/src/funcs/queryAnswers.js.map +1 -1
  51. package/esm/src/funcs/queryRetrieve.d.ts +41 -1
  52. package/esm/src/funcs/queryRetrieve.d.ts.map +1 -1
  53. package/esm/src/funcs/queryRetrieve.js +41 -1
  54. package/esm/src/funcs/queryRetrieve.js.map +1 -1
  55. package/esm/src/funcs/querySearch.d.ts +48 -1
  56. package/esm/src/funcs/querySearch.d.ts.map +1 -1
  57. package/esm/src/funcs/querySearch.js +48 -1
  58. package/esm/src/funcs/querySearch.js.map +1 -1
  59. package/esm/src/funcs/retrieveChunks.d.ts +41 -7
  60. package/esm/src/funcs/retrieveChunks.d.ts.map +1 -1
  61. package/esm/src/funcs/retrieveChunks.js +45 -19
  62. package/esm/src/funcs/retrieveChunks.js.map +1 -1
  63. package/esm/src/hooks/auth-hook.d.ts +1 -2
  64. package/esm/src/hooks/auth-hook.d.ts.map +1 -1
  65. package/esm/src/hooks/auth-hook.js +1 -65
  66. package/esm/src/hooks/auth-hook.js.map +1 -1
  67. package/esm/src/hooks/registration.d.ts.map +1 -1
  68. package/esm/src/hooks/registration.js +2 -16
  69. package/esm/src/hooks/registration.js.map +1 -1
  70. package/esm/src/landing-page.d.ts +5 -0
  71. package/esm/src/landing-page.d.ts.map +1 -0
  72. package/esm/src/landing-page.js +1070 -0
  73. package/esm/src/landing-page.js.map +1 -0
  74. package/esm/src/lib/base64.d.ts +2 -2
  75. package/esm/src/lib/base64.d.ts.map +1 -1
  76. package/esm/src/lib/base64.js +2 -2
  77. package/esm/src/lib/base64.js.map +1 -1
  78. package/esm/src/lib/config.d.ts +3 -3
  79. package/esm/src/lib/config.js +5 -5
  80. package/esm/src/lib/config.js.map +1 -1
  81. package/esm/src/lib/encodings.d.ts.map +1 -1
  82. package/esm/src/lib/encodings.js +10 -1
  83. package/esm/src/lib/encodings.js.map +1 -1
  84. package/esm/src/lib/matchers.d.ts.map +1 -1
  85. package/esm/src/lib/matchers.js +4 -1
  86. package/esm/src/lib/matchers.js.map +1 -1
  87. package/esm/src/lib/schemas.d.ts +4 -4
  88. package/esm/src/lib/schemas.d.ts.map +1 -1
  89. package/esm/src/lib/schemas.js +2 -2
  90. package/esm/src/lib/schemas.js.map +1 -1
  91. package/esm/src/lib/sdks.js +2 -2
  92. package/esm/src/lib/sdks.js.map +1 -1
  93. package/esm/src/lib/security.d.ts.map +1 -1
  94. package/esm/src/lib/security.js +18 -0
  95. package/esm/src/lib/security.js.map +1 -1
  96. package/esm/src/mcp-server/cli/start/command.d.ts.map +1 -1
  97. package/esm/src/mcp-server/cli/start/command.js +30 -0
  98. package/esm/src/mcp-server/cli/start/command.js.map +1 -1
  99. package/esm/src/mcp-server/cli/start/impl.d.ts +2 -7
  100. package/esm/src/mcp-server/cli/start/impl.d.ts.map +1 -1
  101. package/esm/src/mcp-server/cli/start/impl.js +98 -22
  102. package/esm/src/mcp-server/cli/start/impl.js.map +1 -1
  103. package/esm/src/mcp-server/extensions.d.ts +4 -4
  104. package/esm/src/mcp-server/extensions.d.ts.map +1 -1
  105. package/esm/src/mcp-server/flags.d.ts +17 -0
  106. package/esm/src/mcp-server/flags.d.ts.map +1 -0
  107. package/esm/src/mcp-server/flags.js +5 -0
  108. package/esm/src/mcp-server/flags.js.map +1 -0
  109. package/esm/src/mcp-server/mcp-server.js +1 -1
  110. package/esm/src/mcp-server/mcp-server.js.map +1 -1
  111. package/esm/src/mcp-server/prompts.d.ts +4 -7
  112. package/esm/src/mcp-server/prompts.d.ts.map +1 -1
  113. package/esm/src/mcp-server/prompts.js.map +1 -1
  114. package/esm/src/mcp-server/server.d.ts +8 -1
  115. package/esm/src/mcp-server/server.d.ts.map +1 -1
  116. package/esm/src/mcp-server/server.js +19 -16
  117. package/esm/src/mcp-server/server.js.map +1 -1
  118. package/esm/src/mcp-server/tools/aiSearch.d.ts +7 -0
  119. package/esm/src/mcp-server/tools/aiSearch.d.ts.map +1 -0
  120. package/esm/src/mcp-server/tools/aiSearch.js +83 -0
  121. package/esm/src/mcp-server/tools/aiSearch.js.map +1 -0
  122. package/esm/src/mcp-server/tools/getAnnouncementArticles.d.ts +7 -0
  123. package/esm/src/mcp-server/tools/getAnnouncementArticles.d.ts.map +1 -0
  124. package/esm/src/mcp-server/tools/getAnnouncementArticles.js +81 -0
  125. package/esm/src/mcp-server/tools/getAnnouncementArticles.js.map +1 -0
  126. package/esm/src/mcp-server/tools/getAnnouncements.d.ts.map +1 -1
  127. package/esm/src/mcp-server/tools/getAnnouncements.js +39 -1
  128. package/esm/src/mcp-server/tools/getAnnouncements.js.map +1 -1
  129. package/esm/src/mcp-server/tools/getArticle.d.ts.map +1 -1
  130. package/esm/src/mcp-server/tools/getArticle.js +42 -0
  131. package/esm/src/mcp-server/tools/getArticle.js.map +1 -1
  132. package/esm/src/mcp-server/tools/getArticleById.d.ts +7 -0
  133. package/esm/src/mcp-server/tools/getArticleById.d.ts.map +1 -0
  134. package/esm/src/mcp-server/tools/getArticleById.js +90 -0
  135. package/esm/src/mcp-server/tools/getArticleById.js.map +1 -0
  136. package/esm/src/mcp-server/tools/getBestAnswer.d.ts +7 -0
  137. package/esm/src/mcp-server/tools/getBestAnswer.d.ts.map +1 -0
  138. package/esm/src/mcp-server/tools/getBestAnswer.js +85 -0
  139. package/esm/src/mcp-server/tools/getBestAnswer.js.map +1 -0
  140. package/esm/src/mcp-server/tools/getMyPortals.d.ts +7 -0
  141. package/esm/src/mcp-server/tools/getMyPortals.d.ts.map +1 -0
  142. package/esm/src/mcp-server/tools/getMyPortals.js +117 -0
  143. package/esm/src/mcp-server/tools/getMyPortals.js.map +1 -0
  144. package/esm/src/mcp-server/tools/getPopularArticles.d.ts +1 -1
  145. package/esm/src/mcp-server/tools/getPopularArticles.d.ts.map +1 -1
  146. package/esm/src/mcp-server/tools/getPopularArticles.js +40 -0
  147. package/esm/src/mcp-server/tools/getPopularArticles.js.map +1 -1
  148. package/esm/src/mcp-server/tools/getPortals.d.ts +1 -1
  149. package/esm/src/mcp-server/tools/getPortals.d.ts.map +1 -1
  150. package/esm/src/mcp-server/tools/getPortals.js +26 -1
  151. package/esm/src/mcp-server/tools/getPortals.js.map +1 -1
  152. package/esm/src/mcp-server/tools/makeSuggestion.d.ts +1 -1
  153. package/esm/src/mcp-server/tools/makeSuggestion.d.ts.map +1 -1
  154. package/esm/src/mcp-server/tools/makeSuggestion.js +44 -0
  155. package/esm/src/mcp-server/tools/makeSuggestion.js.map +1 -1
  156. package/esm/src/mcp-server/tools/queryAnswers.d.ts.map +1 -1
  157. package/esm/src/mcp-server/tools/queryAnswers.js +41 -5
  158. package/esm/src/mcp-server/tools/queryAnswers.js.map +1 -1
  159. package/esm/src/mcp-server/tools/queryRetrieve.d.ts.map +1 -1
  160. package/esm/src/mcp-server/tools/queryRetrieve.js +41 -1
  161. package/esm/src/mcp-server/tools/queryRetrieve.js.map +1 -1
  162. package/esm/src/mcp-server/tools/querySearch.d.ts.map +1 -1
  163. package/esm/src/mcp-server/tools/querySearch.js +48 -1
  164. package/esm/src/mcp-server/tools/querySearch.js.map +1 -1
  165. package/esm/src/mcp-server/tools/retrieveChunks.d.ts +1 -1
  166. package/esm/src/mcp-server/tools/retrieveChunks.d.ts.map +1 -1
  167. package/esm/src/mcp-server/tools/retrieveChunks.js +41 -7
  168. package/esm/src/mcp-server/tools/retrieveChunks.js.map +1 -1
  169. package/esm/src/mcp-server/tools.d.ts +14 -4
  170. package/esm/src/mcp-server/tools.d.ts.map +1 -1
  171. package/esm/src/mcp-server/tools.js +203 -5
  172. package/esm/src/mcp-server/tools.js.map +1 -1
  173. package/esm/src/models/acceptlanguage.d.ts +36 -5
  174. package/esm/src/models/acceptlanguage.d.ts.map +1 -1
  175. package/esm/src/models/acceptlanguage.js +18 -4
  176. package/esm/src/models/acceptlanguage.js.map +1 -1
  177. package/esm/src/models/accessibleportal.d.ts +1 -1
  178. package/esm/src/models/accessibleportal.d.ts.map +1 -1
  179. package/esm/src/models/accessibleportal.js.map +1 -1
  180. package/esm/src/models/additionalsnippets.d.ts +18 -3
  181. package/esm/src/models/additionalsnippets.d.ts.map +1 -1
  182. package/esm/src/models/additionalsnippets.js +8 -1
  183. package/esm/src/models/additionalsnippets.js.map +1 -1
  184. package/esm/src/models/aisearchop.d.ts +4 -10
  185. package/esm/src/models/aisearchop.d.ts.map +1 -1
  186. package/esm/src/models/aisearchop.js +9 -20
  187. package/esm/src/models/aisearchop.js.map +1 -1
  188. package/esm/src/models/aisearchresponse.d.ts +2 -2
  189. package/esm/src/models/aisearchresponse.d.ts.map +1 -1
  190. package/esm/src/models/aisearchresponse.js.map +1 -1
  191. package/esm/src/models/aispaginationinfo.d.ts +1 -1
  192. package/esm/src/models/aispaginationinfo.d.ts.map +1 -1
  193. package/esm/src/models/aispaginationinfo.js +5 -4
  194. package/esm/src/models/aispaginationinfo.js.map +1 -1
  195. package/esm/src/models/aitopicbreadcrumb.d.ts +1 -1
  196. package/esm/src/models/aitopicbreadcrumb.d.ts.map +1 -1
  197. package/esm/src/models/aitopicbreadcrumb.js +2 -1
  198. package/esm/src/models/aitopicbreadcrumb.js.map +1 -1
  199. package/esm/src/models/aitopicsummary.d.ts +1 -1
  200. package/esm/src/models/aitopicsummary.d.ts.map +1 -1
  201. package/esm/src/models/aitopicsummary.js.map +1 -1
  202. package/esm/src/models/allaccessibleportals.d.ts +1 -1
  203. package/esm/src/models/allaccessibleportals.d.ts.map +1 -1
  204. package/esm/src/models/allaccessibleportals.js +2 -1
  205. package/esm/src/models/allaccessibleportals.js.map +1 -1
  206. package/esm/src/models/answersrequest.d.ts +16 -25
  207. package/esm/src/models/answersrequest.d.ts.map +1 -1
  208. package/esm/src/models/answersrequest.js +11 -25
  209. package/esm/src/models/answersrequest.js.map +1 -1
  210. package/esm/src/models/answersresponse.d.ts +28 -7
  211. package/esm/src/models/answersresponse.d.ts.map +1 -1
  212. package/esm/src/models/answersresponse.js +8 -0
  213. package/esm/src/models/answersresponse.js.map +1 -1
  214. package/esm/src/models/article.d.ts +2 -2
  215. package/esm/src/models/article.d.ts.map +1 -1
  216. package/esm/src/models/article.js +3 -4
  217. package/esm/src/models/article.js.map +1 -1
  218. package/esm/src/models/articleadditionalattributes.d.ts +36 -2
  219. package/esm/src/models/articleadditionalattributes.d.ts.map +1 -1
  220. package/esm/src/models/articleadditionalattributes.js +17 -0
  221. package/esm/src/models/articleadditionalattributes.js.map +1 -1
  222. package/esm/src/models/articleaisearchresult.d.ts +48 -9
  223. package/esm/src/models/articleaisearchresult.d.ts.map +1 -1
  224. package/esm/src/models/articleaisearchresult.js +17 -1
  225. package/esm/src/models/articleaisearchresult.js.map +1 -1
  226. package/esm/src/models/articleattachment.d.ts +14 -3
  227. package/esm/src/models/articleattachment.d.ts.map +1 -1
  228. package/esm/src/models/articleattachment.js +7 -2
  229. package/esm/src/models/articleattachment.js.map +1 -1
  230. package/esm/src/models/articleresult.d.ts +1 -1
  231. package/esm/src/models/articleresult.d.ts.map +1 -1
  232. package/esm/src/models/articleresult.js +1 -1
  233. package/esm/src/models/articleresult.js.map +1 -1
  234. package/esm/src/models/articleresultadditionalattributes.d.ts +34 -2
  235. package/esm/src/models/articleresultadditionalattributes.d.ts.map +1 -1
  236. package/esm/src/models/articleresultadditionalattributes.js +16 -0
  237. package/esm/src/models/articleresultadditionalattributes.js.map +1 -1
  238. package/esm/src/models/articleresults.d.ts +1 -1
  239. package/esm/src/models/articleresults.d.ts.map +1 -1
  240. package/esm/src/models/articleresults.js.map +1 -1
  241. package/esm/src/models/articletype.d.ts +2 -7
  242. package/esm/src/models/articletype.d.ts.map +1 -1
  243. package/esm/src/models/articletype.js +2 -16
  244. package/esm/src/models/articletype.js.map +1 -1
  245. package/esm/src/models/attachmentforcreatesuggestion.d.ts +1 -1
  246. package/esm/src/models/attachmentforcreatesuggestion.d.ts.map +1 -1
  247. package/esm/src/models/attachmentforcreatesuggestion.js.map +1 -1
  248. package/esm/src/models/bookmarkstatus.d.ts +1 -1
  249. package/esm/src/models/bookmarkstatus.d.ts.map +1 -1
  250. package/esm/src/models/bookmarkstatus.js +1 -1
  251. package/esm/src/models/bookmarkstatus.js.map +1 -1
  252. package/esm/src/models/complianceforarticle.d.ts +3 -3
  253. package/esm/src/models/complianceforarticle.d.ts.map +1 -1
  254. package/esm/src/models/complianceforarticle.js +8 -5
  255. package/esm/src/models/complianceforarticle.js.map +1 -1
  256. package/esm/src/models/createdby.d.ts +1 -1
  257. package/esm/src/models/createdby.d.ts.map +1 -1
  258. package/esm/src/models/createdby.js.map +1 -1
  259. package/esm/src/models/createsuggestion.d.ts +69 -6
  260. package/esm/src/models/createsuggestion.d.ts.map +1 -1
  261. package/esm/src/models/createsuggestion.js +31 -2
  262. package/esm/src/models/createsuggestion.js.map +1 -1
  263. package/esm/src/models/customattribute.d.ts +18 -3
  264. package/esm/src/models/customattribute.d.ts.map +1 -1
  265. package/esm/src/models/customattribute.js +6 -0
  266. package/esm/src/models/customattribute.js.map +1 -1
  267. package/esm/src/models/department.d.ts +1 -1
  268. package/esm/src/models/department.d.ts.map +1 -1
  269. package/esm/src/models/department.js.map +1 -1
  270. package/esm/src/models/edition.d.ts +2 -2
  271. package/esm/src/models/edition.d.ts.map +1 -1
  272. package/esm/src/models/edition.js +1 -2
  273. package/esm/src/models/edition.js.map +1 -1
  274. package/esm/src/models/errors/sdkvalidationerror.d.ts +1 -1
  275. package/esm/src/models/errors/sdkvalidationerror.d.ts.map +1 -1
  276. package/esm/src/models/errors/sdkvalidationerror.js +2 -49
  277. package/esm/src/models/errors/sdkvalidationerror.js.map +1 -1
  278. package/esm/src/models/folderbreadcrumb.d.ts +1 -1
  279. package/esm/src/models/folderbreadcrumb.d.ts.map +1 -1
  280. package/esm/src/models/folderbreadcrumb.js.map +1 -1
  281. package/esm/src/models/foldersummary.d.ts +1 -1
  282. package/esm/src/models/foldersummary.d.ts.map +1 -1
  283. package/esm/src/models/foldersummary.js +1 -1
  284. package/esm/src/models/foldersummary.js.map +1 -1
  285. package/esm/src/models/getannouncementarticlesop.d.ts +8 -9
  286. package/esm/src/models/getannouncementarticlesop.d.ts.map +1 -1
  287. package/esm/src/models/getannouncementarticlesop.js +12 -10
  288. package/esm/src/models/getannouncementarticlesop.js.map +1 -1
  289. package/esm/src/models/getarticlebyidop.d.ts +77 -11
  290. package/esm/src/models/getarticlebyidop.d.ts.map +1 -1
  291. package/esm/src/models/getarticlebyidop.js +31 -62
  292. package/esm/src/models/getarticlebyidop.js.map +1 -1
  293. package/esm/src/models/getbestanswerop.d.ts +1 -9
  294. package/esm/src/models/getbestanswerop.d.ts.map +1 -1
  295. package/esm/src/models/getbestanswerop.js +3 -16
  296. package/esm/src/models/getbestanswerop.js.map +1 -1
  297. package/esm/src/models/getmyportalsop.d.ts +4 -10
  298. package/esm/src/models/getmyportalsop.d.ts.map +1 -1
  299. package/esm/src/models/getmyportalsop.js +9 -10
  300. package/esm/src/models/getmyportalsop.js.map +1 -1
  301. package/esm/src/models/getpopulararticlesop.d.ts +8 -9
  302. package/esm/src/models/getpopulararticlesop.d.ts.map +1 -1
  303. package/esm/src/models/getpopulararticlesop.js +12 -10
  304. package/esm/src/models/getpopulararticlesop.js.map +1 -1
  305. package/esm/src/models/l10nstring.d.ts +1 -1
  306. package/esm/src/models/l10nstring.d.ts.map +1 -1
  307. package/esm/src/models/l10nstring.js.map +1 -1
  308. package/esm/src/models/languagecode.d.ts +69 -2
  309. package/esm/src/models/languagecode.d.ts.map +1 -1
  310. package/esm/src/models/languagecode.js +32 -0
  311. package/esm/src/models/languagecode.js.map +1 -1
  312. package/esm/src/models/languagecodeparameter.d.ts +90 -5
  313. package/esm/src/models/languagecodeparameter.d.ts.map +1 -1
  314. package/esm/src/models/languagecodeparameter.js +45 -4
  315. package/esm/src/models/languagecodeparameter.js.map +1 -1
  316. package/esm/src/models/languagequeryparameter.d.ts +90 -5
  317. package/esm/src/models/languagequeryparameter.d.ts.map +1 -1
  318. package/esm/src/models/languagequeryparameter.js +45 -4
  319. package/esm/src/models/languagequeryparameter.js.map +1 -1
  320. package/esm/src/models/link.d.ts +1 -1
  321. package/esm/src/models/link.d.ts.map +1 -1
  322. package/esm/src/models/link.js.map +1 -1
  323. package/esm/src/models/makesuggestionop.d.ts +4 -9
  324. package/esm/src/models/makesuggestionop.d.ts.map +1 -1
  325. package/esm/src/models/makesuggestionop.js +3 -7
  326. package/esm/src/models/makesuggestionop.js.map +1 -1
  327. package/esm/src/models/mandatorylanguagequeryparameter.d.ts +90 -5
  328. package/esm/src/models/mandatorylanguagequeryparameter.d.ts.map +1 -1
  329. package/esm/src/models/mandatorylanguagequeryparameter.js +45 -4
  330. package/esm/src/models/mandatorylanguagequeryparameter.js.map +1 -1
  331. package/esm/src/models/milestone.d.ts +1 -1
  332. package/esm/src/models/milestone.d.ts.map +1 -1
  333. package/esm/src/models/milestone.js.map +1 -1
  334. package/esm/src/models/milestonename.d.ts +1 -1
  335. package/esm/src/models/milestonename.d.ts.map +1 -1
  336. package/esm/src/models/milestonename.js.map +1 -1
  337. package/esm/src/models/modifiedby.d.ts +1 -1
  338. package/esm/src/models/modifiedby.d.ts.map +1 -1
  339. package/esm/src/models/modifiedby.js.map +1 -1
  340. package/esm/src/models/order.d.ts +10 -2
  341. package/esm/src/models/order.d.ts.map +1 -1
  342. package/esm/src/models/order.js +4 -0
  343. package/esm/src/models/order.js.map +1 -1
  344. package/esm/src/models/ownedby.d.ts +1 -1
  345. package/esm/src/models/ownedby.d.ts.map +1 -1
  346. package/esm/src/models/ownedby.js +1 -2
  347. package/esm/src/models/ownedby.js.map +1 -1
  348. package/esm/src/models/paginationinfo.d.ts +1 -1
  349. package/esm/src/models/paginationinfo.d.ts.map +1 -1
  350. package/esm/src/models/paginationinfo.js +3 -3
  351. package/esm/src/models/paginationinfo.js.map +1 -1
  352. package/esm/src/models/personalization.d.ts +4 -4
  353. package/esm/src/models/personalization.d.ts.map +1 -1
  354. package/esm/src/models/personalization.js +1 -2
  355. package/esm/src/models/personalization.js.map +1 -1
  356. package/esm/src/models/publishview.d.ts +2 -2
  357. package/esm/src/models/publishview.d.ts.map +1 -1
  358. package/esm/src/models/publishview.js.map +1 -1
  359. package/esm/src/models/referenceresponse.d.ts +30 -5
  360. package/esm/src/models/referenceresponse.d.ts.map +1 -1
  361. package/esm/src/models/referenceresponse.js +12 -1
  362. package/esm/src/models/referenceresponse.js.map +1 -1
  363. package/esm/src/models/requiredlanguagecode.d.ts +71 -2
  364. package/esm/src/models/requiredlanguagecode.d.ts.map +1 -1
  365. package/esm/src/models/requiredlanguagecode.js +33 -0
  366. package/esm/src/models/requiredlanguagecode.js.map +1 -1
  367. package/esm/src/models/retrievechunksop.d.ts +1 -9
  368. package/esm/src/models/retrievechunksop.d.ts.map +1 -1
  369. package/esm/src/models/retrievechunksop.js +1 -15
  370. package/esm/src/models/retrievechunksop.js.map +1 -1
  371. package/esm/src/models/retrieverequest.d.ts +15 -4
  372. package/esm/src/models/retrieverequest.d.ts.map +1 -1
  373. package/esm/src/models/retrieverequest.js +4 -0
  374. package/esm/src/models/retrieverequest.js.map +1 -1
  375. package/esm/src/models/retrieveresponse.d.ts +27 -8
  376. package/esm/src/models/retrieveresponse.d.ts.map +1 -1
  377. package/esm/src/models/retrieveresponse.js +8 -1
  378. package/esm/src/models/retrieveresponse.js.map +1 -1
  379. package/esm/src/models/schemaslink.d.ts +1 -1
  380. package/esm/src/models/schemaslink.d.ts.map +1 -1
  381. package/esm/src/models/schemaslink.js.map +1 -1
  382. package/esm/src/models/schemastags.d.ts +1 -1
  383. package/esm/src/models/schemastags.d.ts.map +1 -1
  384. package/esm/src/models/schemastags.js.map +1 -1
  385. package/esm/src/models/searchresult.d.ts +40 -5
  386. package/esm/src/models/searchresult.d.ts.map +1 -1
  387. package/esm/src/models/searchresult.js +19 -0
  388. package/esm/src/models/searchresult.js.map +1 -1
  389. package/esm/src/models/security.d.ts +5 -2
  390. package/esm/src/models/security.d.ts.map +1 -1
  391. package/esm/src/models/security.js +5 -3
  392. package/esm/src/models/security.js.map +1 -1
  393. package/esm/src/models/shorturl.d.ts +1 -1
  394. package/esm/src/models/shorturl.d.ts.map +1 -1
  395. package/esm/src/models/shorturl.js +1 -2
  396. package/esm/src/models/shorturl.js.map +1 -1
  397. package/esm/src/models/sortidnamedepartment.d.ts +12 -2
  398. package/esm/src/models/sortidnamedepartment.d.ts.map +1 -1
  399. package/esm/src/models/sortidnamedepartment.js +5 -0
  400. package/esm/src/models/sortidnamedepartment.js.map +1 -1
  401. package/esm/src/models/stage.d.ts +1 -1
  402. package/esm/src/models/stage.d.ts.map +1 -1
  403. package/esm/src/models/stage.js +1 -2
  404. package/esm/src/models/stage.js.map +1 -1
  405. package/esm/src/models/structuredauthoringfields.d.ts +1 -1
  406. package/esm/src/models/structuredauthoringfields.d.ts.map +1 -1
  407. package/esm/src/models/structuredauthoringfields.js.map +1 -1
  408. package/esm/src/models/tag.d.ts +1 -1
  409. package/esm/src/models/tag.d.ts.map +1 -1
  410. package/esm/src/models/tag.js.map +1 -1
  411. package/esm/src/models/tagcategory.d.ts +1 -1
  412. package/esm/src/models/tagcategory.d.ts.map +1 -1
  413. package/esm/src/models/tagcategory.js.map +1 -1
  414. package/esm/src/models/taggroup.d.ts +1 -1
  415. package/esm/src/models/taggroup.d.ts.map +1 -1
  416. package/esm/src/models/taggroup.js +1 -2
  417. package/esm/src/models/taggroup.js.map +1 -1
  418. package/esm/src/models/taggroups.d.ts +1 -1
  419. package/esm/src/models/taggroups.d.ts.map +1 -1
  420. package/esm/src/models/taggroups.js.map +1 -1
  421. package/esm/src/models/tags.d.ts +1 -1
  422. package/esm/src/models/tags.d.ts.map +1 -1
  423. package/esm/src/models/tags.js.map +1 -1
  424. package/esm/src/models/topicbreadcrumb.d.ts +1 -1
  425. package/esm/src/models/topicbreadcrumb.d.ts.map +1 -1
  426. package/esm/src/models/topicbreadcrumb.js.map +1 -1
  427. package/esm/src/models/topicsummary.d.ts +1 -1
  428. package/esm/src/models/topicsummary.d.ts.map +1 -1
  429. package/esm/src/models/topicsummary.js.map +1 -1
  430. package/esm/src/models/workflow.d.ts +1 -1
  431. package/esm/src/models/workflow.d.ts.map +1 -1
  432. package/esm/src/models/workflow.js +1 -2
  433. package/esm/src/models/workflow.js.map +1 -1
  434. package/esm/src/models/workflowmilestone.d.ts +12 -2
  435. package/esm/src/models/workflowmilestone.d.ts.map +1 -1
  436. package/esm/src/models/workflowmilestone.js +5 -0
  437. package/esm/src/models/workflowmilestone.js.map +1 -1
  438. package/esm/src/models/wserrorcommon.d.ts +2 -2
  439. package/esm/src/models/wserrorcommon.d.ts.map +1 -1
  440. package/esm/src/models/wserrorcommon.js +1 -2
  441. package/esm/src/models/wserrorcommon.js.map +1 -1
  442. package/esm/src/tool-names.d.ts +5 -0
  443. package/esm/src/tool-names.d.ts.map +1 -0
  444. package/esm/src/tool-names.js +36 -0
  445. package/esm/src/tool-names.js.map +1 -0
  446. package/esm/src/types/bigint.d.ts +6 -0
  447. package/esm/src/types/bigint.d.ts.map +1 -0
  448. package/esm/src/types/bigint.js +87 -0
  449. package/esm/src/types/bigint.js.map +1 -0
  450. package/esm/worker-configuration.d.ts +1 -0
  451. package/esm/worker-configuration.d.ts.map +1 -1
  452. package/manifest.json +78 -51
  453. package/package.json +11 -7
  454. package/src/cloudflare-worker/cloudflare-worker.ts +22 -9
  455. package/src/funcs/{querySearch.ts → aiSearch.ts} +49 -2
  456. package/src/funcs/{getAnnouncements.ts → getAnnouncementArticles.ts} +67 -10
  457. package/src/funcs/{getArticle.ts → getArticleById.ts} +58 -1
  458. package/src/funcs/{queryAnswers.ts → getBestAnswer.ts} +52 -14
  459. package/src/funcs/{getPortals.ts → getMyPortals.ts} +35 -2
  460. package/src/funcs/getPopularArticles.ts +68 -8
  461. package/src/funcs/makeSuggestion.ts +67 -9
  462. package/src/funcs/{queryRetrieve.ts → retrieveChunks.ts} +50 -15
  463. package/src/hooks/auth-hook.ts +3 -63
  464. package/src/hooks/registration.ts +3 -18
  465. package/src/landing-page.ts +1084 -0
  466. package/src/lib/base64.ts +2 -2
  467. package/src/lib/config.ts +5 -5
  468. package/src/lib/encodings.ts +12 -3
  469. package/src/lib/matchers.ts +5 -1
  470. package/src/lib/schemas.ts +10 -22
  471. package/src/lib/sdks.ts +2 -2
  472. package/src/lib/security.ts +21 -0
  473. package/src/mcp-server/cli/start/command.ts +31 -0
  474. package/src/mcp-server/cli/start/impl.ts +118 -31
  475. package/src/mcp-server/extensions.ts +6 -4
  476. package/src/mcp-server/flags.ts +21 -0
  477. package/src/mcp-server/mcp-server.ts +1 -1
  478. package/src/mcp-server/prompts.ts +9 -19
  479. package/src/mcp-server/server.ts +22 -16
  480. package/src/mcp-server/tools/aiSearch.ts +92 -0
  481. package/src/mcp-server/tools/getAnnouncementArticles.ts +90 -0
  482. package/src/mcp-server/tools/getArticleById.ts +99 -0
  483. package/src/mcp-server/tools/getBestAnswer.ts +94 -0
  484. package/src/mcp-server/tools/{getPortals.ts → getMyPortals.ts} +39 -5
  485. package/src/mcp-server/tools/getPopularArticles.ts +40 -0
  486. package/src/mcp-server/tools/makeSuggestion.ts +44 -0
  487. package/src/mcp-server/tools/retrieveChunks.ts +89 -0
  488. package/src/mcp-server/tools.ts +300 -46
  489. package/src/models/acceptlanguage.ts +21 -8
  490. package/src/models/accessibleportal.ts +9 -11
  491. package/src/models/additionalsnippets.ts +25 -18
  492. package/src/models/aisearchop.ts +14 -37
  493. package/src/models/aisearchresponse.ts +7 -13
  494. package/src/models/aispaginationinfo.ts +7 -10
  495. package/src/models/aitopicbreadcrumb.ts +4 -7
  496. package/src/models/aitopicsummary.ts +1 -5
  497. package/src/models/allaccessibleportals.ts +5 -8
  498. package/src/models/answersrequest.ts +22 -58
  499. package/src/models/answersresponse.ts +30 -24
  500. package/src/models/article.ts +39 -40
  501. package/src/models/articleadditionalattributes.ts +22 -4
  502. package/src/models/articleaisearchresult.ts +70 -52
  503. package/src/models/articleattachment.ts +18 -15
  504. package/src/models/articleresult.ts +2 -6
  505. package/src/models/articleresultadditionalattributes.ts +43 -0
  506. package/src/models/articleresults.ts +1 -5
  507. package/src/models/articletype.ts +4 -25
  508. package/src/models/attachmentforcreatesuggestion.ts +1 -3
  509. package/src/models/bookmarkstatus.ts +2 -6
  510. package/src/models/complianceforarticle.ts +13 -22
  511. package/src/models/createdby.ts +7 -8
  512. package/src/models/createsuggestion.ts +54 -31
  513. package/src/models/customattribute.ts +13 -7
  514. package/src/models/department.ts +1 -5
  515. package/src/models/edition.ts +8 -13
  516. package/src/models/errors/sdkvalidationerror.ts +2 -57
  517. package/src/models/folderbreadcrumb.ts +5 -7
  518. package/src/models/foldersummary.ts +2 -6
  519. package/src/models/getannouncementarticlesop.ts +34 -23
  520. package/src/models/getarticlebyidop.ts +91 -95
  521. package/src/models/getbestanswerop.ts +16 -48
  522. package/src/models/getmyportalsop.ts +29 -44
  523. package/src/models/getpopulararticlesop.ts +34 -23
  524. package/src/models/l10nstring.ts +1 -5
  525. package/src/models/languagecode.ts +38 -2
  526. package/src/models/languagecodeparameter.ts +48 -10
  527. package/src/models/languagequeryparameter.ts +48 -10
  528. package/src/models/link.ts +1 -1
  529. package/src/models/makesuggestionop.ts +20 -30
  530. package/src/models/mandatorylanguagequeryparameter.ts +50 -10
  531. package/src/models/milestone.ts +3 -4
  532. package/src/models/milestonename.ts +1 -5
  533. package/src/models/modifiedby.ts +1 -5
  534. package/src/models/order.ts +7 -2
  535. package/src/models/ownedby.ts +7 -8
  536. package/src/models/paginationinfo.ts +4 -8
  537. package/src/models/personalization.ts +6 -19
  538. package/src/models/publishview.ts +2 -8
  539. package/src/models/referenceresponse.ts +34 -20
  540. package/src/models/requiredlanguagecode.ts +39 -4
  541. package/src/models/retrievechunksop.ts +16 -48
  542. package/src/models/retrieverequest.ts +12 -10
  543. package/src/models/retrieveresponse.ts +34 -28
  544. package/src/models/schemaslink.ts +1 -5
  545. package/src/models/schemastags.ts +1 -5
  546. package/src/models/searchresult.ts +34 -8
  547. package/src/models/security.ts +14 -7
  548. package/src/models/shorturl.ts +6 -7
  549. package/src/models/sortidnamedepartment.ts +8 -4
  550. package/src/models/stage.ts +4 -5
  551. package/src/models/structuredauthoringfields.ts +1 -3
  552. package/src/models/tag.ts +1 -1
  553. package/src/models/tagcategory.ts +1 -5
  554. package/src/models/taggroup.ts +4 -5
  555. package/src/models/taggroups.ts +3 -4
  556. package/src/models/tags.ts +1 -1
  557. package/src/models/topicbreadcrumb.ts +1 -5
  558. package/src/models/topicsummary.ts +1 -5
  559. package/src/models/workflow.ts +3 -4
  560. package/src/models/workflowmilestone.ts +8 -2
  561. package/src/models/wserrorcommon.ts +5 -10
  562. package/src/tool-names.ts +35 -0
  563. package/src/types/bigint.ts +87 -0
  564. package/tsconfig.json +0 -1
  565. package/worker-configuration.d.ts +2 -2
  566. package/worker-configuration.ts +1 -0
  567. package/src/cloudflare-worker/landing-page.ts +0 -337
  568. package/src/hooks/portal-cache-hook.ts +0 -505
  569. package/src/hooks/portal-lookup-hook.ts +0 -429
  570. package/src/mcp-server/tools/getAnnouncements.ts +0 -53
  571. package/src/mcp-server/tools/getArticle.ts +0 -56
  572. package/src/mcp-server/tools/queryAnswers.ts +0 -57
  573. package/src/mcp-server/tools/queryRetrieve.ts +0 -55
  574. package/src/mcp-server/tools/querySearch.ts +0 -44
@@ -32,9 +32,56 @@ import { Result } from "../types/fp.js";
32
32
  * Hybrid Search
33
33
  *
34
34
  * @remarks
35
- * The Search API is a hybrid search service that combines semantic understanding with keyword precision to deliver fast, contextual, and relevant results from your enterprise knowledge base. It enables secure, role-aware access to articles, FAQs, and documentation across customer, agent, and employee interfaces. Each query returns a ranked list of results with snippets, metadata, and relevance scores. <br>**This endpoint is only available for Self Service environments.**
35
+ * Hybrid Search
36
+ *
37
+ * ## How to Use This Tool
38
+ *
39
+ * **CRITICAL**: This tool requires a `request` parameter containing the request object. All parameters must be passed inside a `request` object.
40
+ *
41
+ * **Parameter Format**:
42
+ * - Always wrap parameters in a `request` object: `{"request": {"portalID": "PZ-9999", "q": "loan information"}}`
43
+ * - Required parameters:
44
+ * - `portalID` (string) - The portal ID (format: 2-4 letter prefix + dash + 4-15 digits, e.g., "PZ-9999")
45
+ * - `q` (string) - The search query string (must be URL-escaped)
46
+ * - Optional parameters:
47
+ * - `Dollar_lang` (string, default: "en-US") - Language code
48
+ * - `dollarFilterUserProfileID` (string) - User profile ID filter
49
+ * - `dollarFilterTags` (object) - Object where keys are Category Tag IDs and values are arrays of Tag IDs
50
+ * - `dollarFilterTopicIds` (array) - Array of topic IDs to filter by
51
+ * - `articleCustomAdditionalAttributes` (string) - Comma-separated custom attribute names
52
+ * - `Dollar_pagenum` (number, default: 1) - Page number for pagination
53
+ * - `Dollar_pagesize` (number, default: 20) - Number of results per page
54
+ *
55
+ * **Example**: To search for "loan information" in portal "PZ-9999", call with:
56
+ * ```json
57
+ * {"request": {"portalID": "PZ-9999", "q": "loan information"}}
58
+ * ```
59
+ *
60
+ * **Example with optional parameters**:
61
+ * ```json
62
+ * {"request": {"portalID": "PZ-9999", "q": "loan information", "Dollar_lang": "en-US", "Dollar_pagesize": 25}}
63
+ * ```
64
+ *
65
+ * **Note**: This endpoint is only available for Self Service environments.
66
+ *
67
+ * ## Displaying Results (MCP-Specific)
68
+ * **CRITICAL**: When this tool returns data successfully, you MUST display the search results to the user in your response. Do not silently process the data - always show the user what was returned.
69
+ *
70
+ * **What to display:**
71
+ * - Display all search results with article names and IDs
72
+ * - Show article `snippet` or `keywordSnippet` (the relevant text excerpt)
73
+ * - Display `normalizedScore` or `relevanceScore` to indicate relevance
74
+ * - Show `docType`, `source`, and `topicBreadcrumb` metadata
75
+ * - Display `contextualSummary` if available
76
+ * - Include `paginationInfo` if pagination is used
77
+ * - Format results in a numbered list with clear relevance indicators
78
+ *
79
+ * **Example**: "I found 10 articles matching 'loan information': 1) [Article Name] (ID: PROD-123) - [snippet] (Relevance: 0.89)..."
80
+ *
81
+ * ## Overview
82
+ * The Search API is a hybrid search service that combines semantic understanding with keyword precision to deliver fast, contextual, and relevant results from your enterprise knowledge base. It enables secure, role-aware access to articles, FAQs, and documentation across customer, agent, and employee interfaces. Each query returns a ranked list of results with snippets, metadata, and relevance scores.
36
83
  */
37
- export function querySearch(
84
+ export function aiSearch(
38
85
  client$: EgainMcpCore,
39
86
  request: AiSearchRequest,
40
87
  options?: RequestOptions,
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { EgainMcpCore } from "../core.js";
6
- import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
6
+ import { encodeFormQuery, encodeSimple, queryJoin } from "../lib/encodings.js";
7
7
  import * as M from "../lib/matchers.js";
8
8
  import { compactMap } from "../lib/primitives.js";
9
9
  import { safeParse } from "../lib/schemas.js";
@@ -34,16 +34,52 @@ import { Result } from "../types/fp.js";
34
34
  * @remarks
35
35
  * Get Announcements
36
36
  *
37
+ * ## How to Use This Tool
38
+ *
39
+ * **CRITICAL**: This tool requires a `request` parameter containing the request object. All parameters must be passed inside a `request` object.
40
+ *
41
+ * **Parameter Format**:
42
+ * - Always wrap parameters in a `request` object: `{"request": {"portalID": "PZ-9999"}}`
43
+ * - Required parameter:
44
+ * - `portalID` (string) - The portal ID (format: 2-4 letter prefix + dash + 4-15 digits, e.g., "PZ-9999")
45
+ * - `acceptLanguage` (string, default: "en-US") - Accept-Language header value
46
+ * - Optional parameters:
47
+ * - `Dollar_lang` (string, default: "en-US") - Language code
48
+ * - `Dollar_pagesize` (number, default: 10) - Number of results per page
49
+ *
50
+ * **Example**: To get announcements from portal "PZ-9999", call with:
51
+ * ```json
52
+ * {"request": {"portalID": "PZ-9999"}}
53
+ * ```
54
+ *
55
+ * **Example with optional parameters**:
56
+ * ```json
57
+ * {"request": {"portalID": "PZ-9999", "Dollar_lang": "en-US", "Dollar_pagesize": 20}}
58
+ * ```
59
+ *
60
+ * ## Displaying Results (MCP-Specific)
61
+ * **CRITICAL**: When this tool returns data successfully, you MUST display the announcement articles to the user in your response. Do not silently process the data - always show the user what was returned.
62
+ *
63
+ * **What to display:**
64
+ * - Display all announcement articles with their names and IDs
65
+ * - Show the article content (`content` or `contentText`) for each announcement
66
+ * - Display metadata such as `createdDate`, `modifiedDate`, `articleSummary`
67
+ * - Show `attachments` if present
68
+ * - Include `paginationInfo` if pagination is used
69
+ * - Format announcements in a clear list format
70
+ *
71
+ * **Example**: "Here are the announcements for this portal: 1) [Announcement Name] (ID: PROD-123) - [content]..."
72
+ *
37
73
  * ## Prerequisites
38
74
  * - Requires a valid portal ID. If you don't have the portal ID, first call 'get-portals' to get available portals.
39
- * - Portal ID format: 2-4 letter prefix + dash + 4-15 digits (e.g., "EB-123456789")
75
+ * - Portal ID format: 2-4 letter prefix + dash + 4-15 digits (e.g., "PROD-1004")
40
76
  *
41
77
  * ## Overview
42
78
  * The Get Announcements API allows a user to retrieve all announcement articles for a specific portal. Announcements are special articles that are prominently displayed to users and typically contain important updates, news, or notifications.
43
79
  *
44
80
  * This API returns announcement articles with their full content, metadata, and any associated attachments or links.
45
81
  */
46
- export function getAnnouncements(
82
+ export function getAnnouncementArticles(
47
83
  client$: EgainMcpCore,
48
84
  request: GetAnnouncementArticlesRequest,
49
85
  options?: RequestOptions,
@@ -105,13 +141,19 @@ async function $do(
105
141
  const path$ = pathToFunc("/portals/{portalID}/articles/announcements")(
106
142
  pathParams$,
107
143
  );
108
- const query$ = encodeFormQuery({
109
- "$filter[tags]": payload$.dollarFilterTags,
110
- "$lang": payload$.Dollar_lang,
111
- "$pagenum": payload$.Dollar_pagenum,
112
- "$pagesize": payload$.Dollar_pagesize,
113
- "workflowMilestone": payload$.workflowMilestone,
114
- });
144
+ const query$ = queryJoin(
145
+ encodeFormQuery({
146
+ "articleResultAdditionalAttributes":
147
+ payload$.articleResultAdditionalAttributes,
148
+ }, { explode: false }),
149
+ encodeFormQuery({
150
+ "$filter[tags]": payload$.dollarFilterTags,
151
+ "$lang": payload$.Dollar_lang,
152
+ "$pagenum": payload$.Dollar_pagenum,
153
+ "$pagesize": payload$.Dollar_pagesize,
154
+ "workflowMilestone": payload$.workflowMilestone,
155
+ }),
156
+ );
115
157
 
116
158
  const headers$ = new Headers(compactMap({
117
159
  Accept: "application/json",
@@ -120,6 +162,21 @@ async function $do(
120
162
  payload$.acceptLanguage,
121
163
  { explode: false, charEncoding: "none" },
122
164
  ),
165
+ "x-egain-activity-id": encodeSimple(
166
+ "x-egain-activity-id",
167
+ payload$.xEgainActivityId,
168
+ { explode: false, charEncoding: "none" },
169
+ ),
170
+ "x-ext-integration-id": encodeSimple(
171
+ "x-ext-integration-id",
172
+ payload$.xExtIntegrationId,
173
+ { explode: false, charEncoding: "none" },
174
+ ),
175
+ "x-ext-interaction-id": encodeSimple(
176
+ "x-ext-interaction-id",
177
+ payload$.xExtInteractionId,
178
+ { explode: false, charEncoding: "none" },
179
+ ),
123
180
  }));
124
181
  const securityInput = await extractSecurity(client$._options.security);
125
182
  const requestSecurity = resolveGlobalSecurity(securityInput);
@@ -34,6 +34,48 @@ import { Result } from "../types/fp.js";
34
34
  * @remarks
35
35
  * Get Article by ID
36
36
  *
37
+ * ## How to Use This Tool
38
+ *
39
+ * **CRITICAL**: This tool requires a `request` parameter containing the request object. All parameters must be passed inside a `request` object.
40
+ *
41
+ * **Parameter Format**:
42
+ * - Always wrap parameters in a `request` object: `{"request": {"portalID": "PZ-9999", "articleID": "PROD-2996"}}`
43
+ * - Required parameters:
44
+ * - `portalID` (string) - The portal ID (format: 2-4 letter prefix + dash + 4-15 digits, e.g., "PZ-9999")
45
+ * - `articleID` (string) - The article ID (format: 2-4 letter prefix + dash + 4-15 digits, e.g., "PROD-2996")
46
+ * - `acceptLanguage` (string, default: "en-US") - Accept-Language header value
47
+ * - Optional parameters:
48
+ * - `Dollar_lang` (string, default: "en-US") - Language code
49
+ * - `articleAdditionalAttributes` (array) - Additional article attributes to return
50
+ * - `Dollar_customAdditionalAttributes` (string) - Custom additional attributes
51
+ * - `accessSource` (string, default: "article_view") - How the article was accessed
52
+ * - `publishViewId` (string) - Publish view ID
53
+ * - `workflowMilestone` (string) - Workflow milestone filter
54
+ *
55
+ * **Example**: To get article "PROD-2996" from portal "PZ-9999", call with:
56
+ * ```json
57
+ * {"request": {"portalID": "PZ-9999", "articleID": "PROD-2996"}}
58
+ * ```
59
+ *
60
+ * **Example with optional parameters**:
61
+ * ```json
62
+ * {"request": {"portalID": "PZ-9999", "articleID": "PROD-2996", "Dollar_lang": "en-US", "accessSource": "article_view"}}
63
+ * ```
64
+ *
65
+ * ## Displaying Results (MCP-Specific)
66
+ * **CRITICAL**: When this tool returns data successfully, you MUST display the article content to the user in your response. Do not silently process the data - always show the user what was returned.
67
+ *
68
+ * **What to display:**
69
+ * - Display the article `name` as the title
70
+ * - Show the article `content` or `contentText` (the full article body)
71
+ * - Display article metadata: `id`, `articleType`, `createdDate`, `modifiedDate`
72
+ * - Show `attachments` if present
73
+ * - Display `topicBreadcrumb` to show where the article is categorized
74
+ * - Include any other relevant metadata like `articleSummary`, `description`, `articleKeywords`
75
+ * - Format the article content in a readable way for the user
76
+ *
77
+ * **Example**: "Here's the article '[Article Name]' (ID: PROD-2996): [article content]. This article is categorized under: [topic breadcrumb]..."
78
+ *
37
79
  * ## Prerequisites
38
80
  * - Requires a valid portal ID. If you don't have the portal ID, first call 'get-portals' to get available portals.
39
81
  * - Portal ID format: 2-4 letter prefix + dash + 4-15 digits (e.g., "EB-123456789")
@@ -46,7 +88,7 @@ import { Result } from "../types/fp.js";
46
88
  * - The "Allow Structured Authoring" setting is enabled at the partition/department level
47
89
  * - The "Use Structured Authoring" flag is set on the article type
48
90
  */
49
- export function getArticle(
91
+ export function getArticleById(
50
92
  client$: EgainMcpCore,
51
93
  request: GetArticleByIdRequest,
52
94
  options?: RequestOptions,
@@ -132,6 +174,21 @@ async function $do(
132
174
  payload$.acceptLanguage,
133
175
  { explode: false, charEncoding: "none" },
134
176
  ),
177
+ "x-egain-activity-id": encodeSimple(
178
+ "x-egain-activity-id",
179
+ payload$.xEgainActivityId,
180
+ { explode: false, charEncoding: "none" },
181
+ ),
182
+ "x-ext-integration-id": encodeSimple(
183
+ "x-ext-integration-id",
184
+ payload$.xExtIntegrationId,
185
+ { explode: false, charEncoding: "none" },
186
+ ),
187
+ "x-ext-interaction-id": encodeSimple(
188
+ "x-ext-interaction-id",
189
+ payload$.xExtInteractionId,
190
+ { explode: false, charEncoding: "none" },
191
+ ),
135
192
  }));
136
193
  const securityInput = await extractSecurity(client$._options.security);
137
194
  const requestSecurity = resolveGlobalSecurity(securityInput);
@@ -10,6 +10,10 @@ import { safeParse } from "../lib/schemas.js";
10
10
  import { RequestOptions } from "../lib/sdks.js";
11
11
  import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
12
  import { pathToFunc } from "../lib/url.js";
13
+ import {
14
+ AnswersResponse,
15
+ AnswersResponse$zodSchema,
16
+ } from "../models/answersresponse.js";
13
17
  import { APIError } from "../models/errors/apierror.js";
14
18
  import {
15
19
  ConnectionError,
@@ -22,8 +26,6 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
22
26
  import {
23
27
  GetBestAnswerRequest,
24
28
  GetBestAnswerRequest$zodSchema,
25
- GetBestAnswerResponse,
26
- GetBestAnswerResponse$zodSchema,
27
29
  } from "../models/getbestanswerop.js";
28
30
  import { APICall, APIPromise } from "../types/async.js";
29
31
  import { Result } from "../types/fp.js";
@@ -34,26 +36,62 @@ import { Result } from "../types/fp.js";
34
36
  * @remarks
35
37
  * Get Answers
36
38
  *
39
+ * ## How to Use This Tool
40
+ *
41
+ * **CRITICAL**: This tool requires a `request` parameter containing the request object. All parameters must be passed inside a `request` object.
42
+ *
43
+ * **Parameter Format**:
44
+ * - Always wrap parameters in a `request` object: `{"request": {"portalID": "PZ-9999", "q": "loan information", "Dollar_lang": "en-US"}}`
45
+ * - Required parameters:
46
+ * - `portalID` (string) - The portal ID (format: 2-4 letter prefix + dash + 4-15 digits, e.g., "PZ-9999")
47
+ * - `q` (string) - The search query string
48
+ * - `Dollar_lang` (string) - Language code (e.g., "en-US")
49
+ * - Optional parameters:
50
+ * - `dollarFilterUserProfileID` (string) - User profile ID filter
51
+ * - `dollarFilterTags` (object) - Object where keys are Category Tag IDs and values are arrays of Tag IDs
52
+ * - `dollarFilterTopicIds` (array) - Array of topic IDs to filter by
53
+ * - `AnswersRequest` (object) - Request body parameters:
54
+ * - `eventId` (string, **required**) - Event ID
55
+ * - `sessionId` (string, **required**) - Session ID
56
+ * - `channel` (object, **optional**, recommended to omit) - Channel information. Omit unless specifically needed. If you receive a 400 error with channel, retry without it.
57
+ * - `context` (object) - Additional context (companyContext, pageContext, userContext)
58
+ *
59
+ * **Example**: To get answers for query "loan information" from portal "PZ-9999", call with:
60
+ * ```json
61
+ * {"request": {"portalID": "PZ-9999", "q": "loan information", "Dollar_lang": "en-US", "AnswersRequest": {"eventId": "event-123", "sessionId": "session-456"}}}
62
+ * ```
63
+ *
64
+ * **Note**: The `channel` field in `AnswersRequest` is optional and recommended to omit unless specifically needed. The API works reliably without it.
65
+ *
66
+ * ## Displaying Results (MCP-Specific)
67
+ * **CRITICAL**: When this tool returns data successfully, you MUST display the results to the user in your response. Do not silently process the data - always show the user what was returned.
68
+ *
69
+ * **What to display:**
70
+ * - Display the `answer.answerValue` text prominently as the main answer to the user's query
71
+ * - Indicate the answer type (`answerType`: "certified" or "generative")
72
+ * - If `relevanceScore` is present, you may mention the confidence level
73
+ * - List all `references` (article IDs and names) that were used to generate the answer
74
+ * - Display `searchResults` showing related articles with their names, IDs, snippets, and relevance scores
75
+ * - Format the answer in a clear, readable way - this is the primary response the user is seeking
76
+ *
77
+ * **Example**: "Based on the knowledge base, here's the answer: [answerValue]. This answer was generated using information from: [list references]. Related articles: [list search results]..."
78
+ *
37
79
  * ## Prerequisites
38
80
  * - Requires a valid portal ID. If you don't have the portal ID, first call 'get-portals' to get available portals.
39
- * - Portal ID format: 2-4 letter prefix + dash + 4-15 digits (e.g., "EB-123456789")
81
+ * - Portal ID format: 2-4 letter prefix + dash + 4-15 digits (e.g., "PROD-1004")
40
82
  *
41
83
  * ## Overview
42
84
  * The Answers API enables users to get the best answer for a user query. This API can return certified answers or generative answers along with search results, providing users with comprehensive responses to their questions.
43
85
  *
44
86
  * The API leverages AI capabilities to provide intelligent answers based on the knowledge base content, making it easier for users to find the information they need quickly and accurately.
45
- *
46
- * ## Request Body Notes
47
- * - **channel field**: Optional. **Recommended to omit** unless specifically needed. The API works reliably without it. If you receive a 400 Bad Request error when including channel, retry the request without the channel field.
48
- * - **Required fields**: eventId and sessionId are required in the request body.
49
87
  */
50
- export function queryAnswers(
88
+ export function getBestAnswer(
51
89
  client$: EgainMcpCore,
52
90
  request: GetBestAnswerRequest,
53
91
  options?: RequestOptions,
54
92
  ): APIPromise<
55
93
  Result<
56
- GetBestAnswerResponse,
94
+ AnswersResponse,
57
95
  | APIError
58
96
  | SDKValidationError
59
97
  | UnexpectedClientError
@@ -77,7 +115,7 @@ async function $do(
77
115
  ): Promise<
78
116
  [
79
117
  Result<
80
- GetBestAnswerResponse,
118
+ AnswersResponse,
81
119
  | APIError
82
120
  | SDKValidationError
83
121
  | UnexpectedClientError
@@ -175,7 +213,7 @@ async function $do(
175
213
  };
176
214
 
177
215
  const [result$] = await M.match<
178
- GetBestAnswerResponse,
216
+ AnswersResponse,
179
217
  | APIError
180
218
  | SDKValidationError
181
219
  | UnexpectedClientError
@@ -184,9 +222,9 @@ async function $do(
184
222
  | RequestTimeoutError
185
223
  | ConnectionError
186
224
  >(
187
- M.json(200, GetBestAnswerResponse$zodSchema, { key: "AnswersResponse" }),
188
- M.nil(400, GetBestAnswerResponse$zodSchema),
189
- M.nil(500, GetBestAnswerResponse$zodSchema),
225
+ M.json(200, AnswersResponse$zodSchema, { key: "AnswersResponse" }),
226
+ M.nil(400, AnswersResponse$zodSchema),
227
+ M.nil(500, AnswersResponse$zodSchema),
190
228
  )(response, req$, { extraFields: responseFields$ });
191
229
 
192
230
  return [result$, { status: "complete", request: req$, response }];
@@ -35,13 +35,43 @@ import { Result } from "../types/fp.js";
35
35
  * Get All Portals Accessible to User
36
36
  *
37
37
  * ## Overview
38
- * The Get All Portals Accessible to User API allows a user to fetch all portals accessible to the user across all departments.
38
+ * Retrieves the list of portals available to the authenticated user or application. Each portal contains a readable portal ID that is required by almost all other Portal Manager APIs.
39
+ *
39
40
  * - If no access tags are specified for a portal, any user can access the portal.
40
41
  * - If access tags are specified for a portal, users with a user profile that allows access can access the portal. For users with multiple user profiles, the user profile that allows access does not need to be the active user profile.
41
42
  * - Global users (partition) cannot be assigned user profiles; their access is limited to portals without access restrictions.
42
43
  * - The only articles returned are associated to an Article type when the parameter “Include in browse on portals” is set to "Yes".
43
44
  * - When the `shortUrlTemplate` query parameter is provided, the API filters accessible portals according to the specified language and template name. A portal short URL specific to the `shortUrlTemplate` value is returned in the response when available. If there is no short URL for a language, the portal object returns an empty `shortURL` field.
44
45
  *
46
+ * ## Prerequisites
47
+ * Authentication is required. No portal ID is needed for this call. This is typically the first API you should call before using any other tool.
48
+ *
49
+ * ## How to Use This Tool
50
+ * - Call this endpoint to discover which portals you have access to. Use the returned portal IDs as inputs to Retrieve, Answers, Search, Article, and Suggestion APIs.
51
+ *
52
+ * ## Parameter Requirements
53
+ * This tool requires **both** a query language parameter **and** an HTTP language header. An empty request object is **invalid** and MUST NOT be used.
54
+ *
55
+ * ### Required (both MUST be provided)
56
+ * - `Dollar_lang` (string, default: "en-US") - Language code
57
+ * - `Accept-Language` (string, default: "en-US") - Accept-Language header value
58
+ *
59
+ * Both parameters **MUST** be present on every invocation.
60
+ * If either parameter is missing, the request is invalid.
61
+ *
62
+ * #### Optional
63
+ *
64
+ * - `Dollar_pagenum` — Page number to retrieve (defaults to `1` if omitted)
65
+ * - `Dollar_pagesize` — Number of items per page (server default applied if omitted)
66
+ *
67
+ * **Example**: To get all portals accessible to the user, call with:
68
+ * ```json
69
+ * {"request": {"Dollar_lang": "en-US", "Accept-Language": "en-US"}}
70
+ * ```
71
+ *
72
+ * ## Overview
73
+ * The Get All Portals Accessible to User API allows a user to fetch all portals accessible to the user across all departments.
74
+ *
45
75
  * ## Pagination behavior (CRITICAL for AI assistants)
46
76
  *
47
77
  * **IMPORTANT**: This endpoint is paginated. When searching for a portal by name or listing portals, you MUST automatically fetch ALL pages before concluding that a portal doesn't exist.
@@ -81,8 +111,11 @@ import { Result } from "../types/fp.js";
81
111
  * - Search the complete merged list before concluding the portal doesn't exist
82
112
  *
83
113
  * This ensures reliable portal name-to-ID resolution and prevents false "not found" errors.
114
+ *
115
+ * ## Displaying Results (MCP-Specific)
116
+ * Always display the list of portals returned. Show portal name, portal ID, and any descriptive metadata. If multiple portals exist, prompt the user to select one for subsequent calls.
84
117
  */
85
- export function getPortals(
118
+ export function getMyPortals(
86
119
  client$: EgainMcpCore,
87
120
  request: GetMyPortalsRequest,
88
121
  options?: RequestOptions,
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { EgainMcpCore } from "../core.js";
6
- import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
6
+ import { encodeFormQuery, encodeSimple, queryJoin } from "../lib/encodings.js";
7
7
  import * as M from "../lib/matchers.js";
8
8
  import { compactMap } from "../lib/primitives.js";
9
9
  import { safeParse } from "../lib/schemas.js";
@@ -34,6 +34,45 @@ import { Result } from "../types/fp.js";
34
34
  * @remarks
35
35
  * Get Popular Articles
36
36
  *
37
+ * ## How to Use This Tool
38
+ *
39
+ * **CRITICAL**: This tool requires a `request` parameter containing the request object. All parameters must be passed inside a `request` object.
40
+ *
41
+ * **Parameter Format**:
42
+ * - Always wrap parameters in a `request` object: `{"request": {"portalID": "PZ-9999"}}`
43
+ * - Required parameter:
44
+ * - `portalID` (string) - The portal ID (format: 2-4 letter prefix + dash + 4-15 digits, e.g., "PZ-9999")
45
+ * - `acceptLanguage` (string, default: "en-US") - Accept-Language header value
46
+ * - Optional parameters:
47
+ * - `Dollar_lang` (string, default: "en-US") - Language code
48
+ * - `Dollar_pagenum` (number, default: 1) - Page number for pagination
49
+ * - `Dollar_pagesize` (number, default: 10) - Number of results per page
50
+ * - `dollarFilterTopicId` (string) - Filter by topic ID
51
+ * - `dollarFilterTags` (string) - Comma-separated list of Tag/Tag Group IDs
52
+ *
53
+ * **Example**: To get popular articles from portal "PZ-9999", call with:
54
+ * ```json
55
+ * {"request": {"portalID": "PZ-9999"}}
56
+ * ```
57
+ *
58
+ * **Example with optional parameters**:
59
+ * ```json
60
+ * {"request": {"portalID": "PZ-9999", "Dollar_lang": "en-US", "Dollar_pagesize": 20}}
61
+ * ```
62
+ *
63
+ * ## Displaying Results (MCP-Specific)
64
+ * **CRITICAL**: When this tool returns data successfully, you MUST display the popular articles to the user in your response. Do not silently process the data - always show the user what was returned.
65
+ *
66
+ * **What to display:**
67
+ * - Display all popular articles with their names and IDs
68
+ * - Show article summaries or descriptions when available
69
+ * - Display metadata such as `articleType`, `createdDate`, `modifiedDate`
70
+ * - Show `imageURL` if available (mention thumbnail availability)
71
+ * - Include `paginationInfo` if pagination is used
72
+ * - Format articles in a numbered or bulleted list
73
+ *
74
+ * **Example**: "Here are the most popular articles: 1) [Article Name] (ID: PROD-123) - [summary]..."
75
+ *
37
76
  * ## Prerequisites
38
77
  * - Requires a valid portal ID. If you don't have the portal ID, first call 'get-portals' to get available portals.
39
78
  * - Portal ID format: 2-4 letter prefix + dash + 4-15 digits (e.g., "EB-123456789")
@@ -105,13 +144,19 @@ async function $do(
105
144
  const path$ = pathToFunc("/portals/{portalID}/populararticles")(
106
145
  pathParams$,
107
146
  );
108
- const query$ = encodeFormQuery({
109
- "$filter[tags]": payload$.dollarFilterTags,
110
- "$filter[topicId]": payload$.dollarFilterTopicId,
111
- "$lang": payload$.Dollar_lang,
112
- "$pagenum": payload$.Dollar_pagenum,
113
- "$pagesize": payload$.Dollar_pagesize,
114
- });
147
+ const query$ = queryJoin(
148
+ encodeFormQuery({
149
+ "articleResultAdditionalAttributes":
150
+ payload$.articleResultAdditionalAttributes,
151
+ }, { explode: false }),
152
+ encodeFormQuery({
153
+ "$filter[tags]": payload$.dollarFilterTags,
154
+ "$filter[topicId]": payload$.dollarFilterTopicId,
155
+ "$lang": payload$.Dollar_lang,
156
+ "$pagenum": payload$.Dollar_pagenum,
157
+ "$pagesize": payload$.Dollar_pagesize,
158
+ }),
159
+ );
115
160
 
116
161
  const headers$ = new Headers(compactMap({
117
162
  Accept: "application/json",
@@ -120,6 +165,21 @@ async function $do(
120
165
  payload$.acceptLanguage,
121
166
  { explode: false, charEncoding: "none" },
122
167
  ),
168
+ "x-egain-activity-id": encodeSimple(
169
+ "x-egain-activity-id",
170
+ payload$.xEgainActivityId,
171
+ { explode: false, charEncoding: "none" },
172
+ ),
173
+ "x-ext-integration-id": encodeSimple(
174
+ "x-ext-integration-id",
175
+ payload$.xExtIntegrationId,
176
+ { explode: false, charEncoding: "none" },
177
+ ),
178
+ "x-ext-interaction-id": encodeSimple(
179
+ "x-ext-interaction-id",
180
+ payload$.xExtInteractionId,
181
+ { explode: false, charEncoding: "none" },
182
+ ),
123
183
  }));
124
184
  const securityInput = await extractSecurity(client$._options.security);
125
185
  const requestSecurity = resolveGlobalSecurity(securityInput);
@@ -2,6 +2,7 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ import * as z from "zod";
5
6
  import { EgainMcpCore } from "../core.js";
6
7
  import { encodeJSON, encodeSimple } from "../lib/encodings.js";
7
8
  import * as M from "../lib/matchers.js";
@@ -22,9 +23,8 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
22
23
  import {
23
24
  MakeSuggestionRequest,
24
25
  MakeSuggestionRequest$zodSchema,
25
- MakeSuggestionResponse,
26
- MakeSuggestionResponse$zodSchema,
27
26
  } from "../models/makesuggestionop.js";
27
+ import { WSErrorCommon, WSErrorCommon$zodSchema } from "../models/wserrorcommon.js";
28
28
  import { APICall, APIPromise } from "../types/async.js";
29
29
  import { Result } from "../types/fp.js";
30
30
 
@@ -34,6 +34,49 @@ import { Result } from "../types/fp.js";
34
34
  * @remarks
35
35
  * Make a Suggestion
36
36
  *
37
+ * ## How to Use This Tool
38
+ *
39
+ * **CRITICAL**: This tool requires a `request` parameter containing the request object. All parameters must be passed inside a `request` object.
40
+ *
41
+ * **Parameter Format**:
42
+ * - Always wrap parameters in a `request` object: `{"request": {"portalID": "PZ-9999", "CreateSuggestion": {...}}}`
43
+ * - Required parameters:
44
+ * - `portalID` (string) - The portal ID (format: 2-4 letter prefix + dash + 4-15 digits, e.g., "PZ-9999")
45
+ * - `CreateSuggestion` (object) - The suggestion object with:
46
+ * - `name` (string, **required**) - Name/title of the suggestion
47
+ * - `content` (string, **required**) - Content/description of the suggestion
48
+ * - `language` (object, **required**) - Language object with `code` property (e.g., {"code": "en-US"})
49
+ * - `acceptLanguage` (string, default: "en-US") - Accept-Language header value
50
+ *
51
+ * - Optional parameters:
52
+ * - `CreateSuggestion` additional optional fields:
53
+ * - `description` (string) - Additional description
54
+ * - `feedbackArticle` (object) - Article ID object if providing feedback on existing article: `{"id": "PROD-2996"}`
55
+ * - `attachments` (object) - Attachments object
56
+ * - `customAttributes` (array) - Custom attributes array
57
+ *
58
+ * **Example**: To create a suggestion in portal "PZ-9999", call with:
59
+ * ```json
60
+ * {"request": {"portalID": "PZ-9999", "CreateSuggestion": {"name": "New Article Request", "content": "Please add information about loan rates", "language": {"code": "en-US"}}}}
61
+ * ```
62
+ *
63
+ * **Example with feedback on existing article**:
64
+ * ```json
65
+ * {"request": {"portalID": "PZ-9999", "CreateSuggestion": {"name": "Article Feedback", "content": "This article needs updating", "language": {"code": "en-US"}, "feedbackArticle": {"id": "PROD-2996"}}}}
66
+ * ```
67
+ *
68
+ * ## Displaying Results (MCP-Specific)
69
+ * **CRITICAL**: When this tool returns data successfully, you MUST display the suggestion creation result to the user in your response. Do not silently process the data - always show the user what was returned.
70
+ *
71
+ * **What to display:**
72
+ * - Confirm that the suggestion was successfully created
73
+ * - Display the suggestion `id` if returned in the response
74
+ * - Show the suggestion `name` and `content` that was submitted
75
+ * - If an error occurs, display the error message clearly
76
+ * - Provide confirmation message to the user
77
+ *
78
+ * **Example**: "Your suggestion '[Suggestion Name]' has been successfully submitted. Suggestion ID: [id]..."
79
+ *
37
80
  * ## Prerequisites
38
81
  * - Requires a valid portal ID. If you don't have the portal ID, first call 'get-portals' to get available portals.
39
82
  * - Portal ID format: 2-4 letter prefix + dash + 4-15 digits (e.g., "EB-123456789")
@@ -49,7 +92,7 @@ export function makeSuggestion(
49
92
  options?: RequestOptions,
50
93
  ): APIPromise<
51
94
  Result<
52
- MakeSuggestionResponse,
95
+ Record<string, never> | WSErrorCommon,
53
96
  | APIError
54
97
  | SDKValidationError
55
98
  | UnexpectedClientError
@@ -73,7 +116,7 @@ async function $do(
73
116
  ): Promise<
74
117
  [
75
118
  Result<
76
- MakeSuggestionResponse,
119
+ Record<string, never> | WSErrorCommon,
77
120
  | APIError
78
121
  | SDKValidationError
79
122
  | UnexpectedClientError
@@ -116,6 +159,21 @@ async function $do(
116
159
  payload$.acceptLanguage,
117
160
  { explode: false, charEncoding: "none" },
118
161
  ),
162
+ "x-egain-activity-id": encodeSimple(
163
+ "x-egain-activity-id",
164
+ payload$.xEgainActivityId,
165
+ { explode: false, charEncoding: "none" },
166
+ ),
167
+ "x-ext-integration-id": encodeSimple(
168
+ "x-ext-integration-id",
169
+ payload$.xExtIntegrationId,
170
+ { explode: false, charEncoding: "none" },
171
+ ),
172
+ "x-ext-interaction-id": encodeSimple(
173
+ "x-ext-interaction-id",
174
+ payload$.xExtInteractionId,
175
+ { explode: false, charEncoding: "none" },
176
+ ),
119
177
  }));
120
178
  const securityInput = await extractSecurity(client$._options.security);
121
179
  const requestSecurity = resolveGlobalSecurity(securityInput);
@@ -170,7 +228,7 @@ async function $do(
170
228
  };
171
229
 
172
230
  const [result$] = await M.match<
173
- MakeSuggestionResponse,
231
+ Record<string, never> | WSErrorCommon,
174
232
  | APIError
175
233
  | SDKValidationError
176
234
  | UnexpectedClientError
@@ -179,12 +237,12 @@ async function $do(
179
237
  | RequestTimeoutError
180
238
  | ConnectionError
181
239
  >(
182
- M.nil(201, MakeSuggestionResponse$zodSchema),
183
- M.json([400, 401, 403, 404, 406], MakeSuggestionResponse$zodSchema, {
240
+ M.nil(201, z.object({})),
241
+ M.json([400, 401, 403, 404, 406], WSErrorCommon$zodSchema, {
184
242
  key: "WSErrorCommon",
185
243
  }),
186
- M.nil(415, MakeSuggestionResponse$zodSchema),
187
- M.json(500, MakeSuggestionResponse$zodSchema, { key: "WSErrorCommon" }),
244
+ M.nil(415, WSErrorCommon$zodSchema),
245
+ M.json(500, WSErrorCommon$zodSchema, { key: "WSErrorCommon" }),
188
246
  )(response, req$, { extraFields: responseFields$ });
189
247
 
190
248
  return [result$, { status: "complete", request: req$, response }];