@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.
- package/README.md +20 -43
- package/bin/mcp-server.js +39534 -29516
- package/bin/mcp-server.js.map +298 -185
- package/esm/src/cloudflare-worker/cloudflare-worker.d.ts.map +1 -1
- package/esm/src/cloudflare-worker/cloudflare-worker.js +20 -9
- package/esm/src/cloudflare-worker/cloudflare-worker.js.map +1 -1
- package/esm/src/funcs/aiSearch.d.ts +63 -0
- package/esm/src/funcs/aiSearch.d.ts.map +1 -0
- package/esm/src/funcs/aiSearch.js +151 -0
- package/esm/src/funcs/aiSearch.js.map +1 -0
- package/esm/src/funcs/getAnnouncementArticles.d.ts +61 -0
- package/esm/src/funcs/getAnnouncementArticles.d.ts.map +1 -0
- package/esm/src/funcs/getAnnouncementArticles.js +152 -0
- package/esm/src/funcs/getAnnouncementArticles.js.map +1 -0
- package/esm/src/funcs/getAnnouncements.d.ts +39 -1
- package/esm/src/funcs/getAnnouncements.d.ts.map +1 -1
- package/esm/src/funcs/getAnnouncements.js +39 -1
- package/esm/src/funcs/getAnnouncements.js.map +1 -1
- package/esm/src/funcs/getArticle.d.ts +42 -0
- package/esm/src/funcs/getArticle.d.ts.map +1 -1
- package/esm/src/funcs/getArticle.js +42 -0
- package/esm/src/funcs/getArticle.js.map +1 -1
- package/esm/src/funcs/getArticleById.d.ts +70 -0
- package/esm/src/funcs/getArticleById.d.ts.map +1 -0
- package/esm/src/funcs/getArticleById.js +163 -0
- package/esm/src/funcs/getArticleById.js.map +1 -0
- package/esm/src/funcs/getBestAnswer.d.ts +66 -0
- package/esm/src/funcs/getBestAnswer.d.ts.map +1 -0
- package/esm/src/funcs/getBestAnswer.js +148 -0
- package/esm/src/funcs/getBestAnswer.js.map +1 -0
- package/esm/src/funcs/getMyPortals.d.ts +97 -0
- package/esm/src/funcs/getMyPortals.d.ts.map +1 -0
- package/esm/src/funcs/getMyPortals.js +180 -0
- package/esm/src/funcs/getMyPortals.js.map +1 -0
- package/esm/src/funcs/getPopularArticles.d.ts +39 -0
- package/esm/src/funcs/getPopularArticles.d.ts.map +1 -1
- package/esm/src/funcs/getPopularArticles.js +47 -3
- package/esm/src/funcs/getPopularArticles.js.map +1 -1
- package/esm/src/funcs/getPortals.d.ts +26 -1
- package/esm/src/funcs/getPortals.d.ts.map +1 -1
- package/esm/src/funcs/getPortals.js +35 -10
- package/esm/src/funcs/getPortals.js.map +1 -1
- package/esm/src/funcs/makeSuggestion.d.ts +46 -2
- package/esm/src/funcs/makeSuggestion.d.ts.map +1 -1
- package/esm/src/funcs/makeSuggestion.js +51 -3
- package/esm/src/funcs/makeSuggestion.js.map +1 -1
- package/esm/src/funcs/queryAnswers.d.ts +41 -5
- package/esm/src/funcs/queryAnswers.d.ts.map +1 -1
- package/esm/src/funcs/queryAnswers.js +41 -5
- package/esm/src/funcs/queryAnswers.js.map +1 -1
- package/esm/src/funcs/queryRetrieve.d.ts +41 -1
- package/esm/src/funcs/queryRetrieve.d.ts.map +1 -1
- package/esm/src/funcs/queryRetrieve.js +41 -1
- package/esm/src/funcs/queryRetrieve.js.map +1 -1
- package/esm/src/funcs/querySearch.d.ts +48 -1
- package/esm/src/funcs/querySearch.d.ts.map +1 -1
- package/esm/src/funcs/querySearch.js +48 -1
- package/esm/src/funcs/querySearch.js.map +1 -1
- package/esm/src/funcs/retrieveChunks.d.ts +41 -7
- package/esm/src/funcs/retrieveChunks.d.ts.map +1 -1
- package/esm/src/funcs/retrieveChunks.js +45 -19
- package/esm/src/funcs/retrieveChunks.js.map +1 -1
- package/esm/src/hooks/auth-hook.d.ts +1 -2
- package/esm/src/hooks/auth-hook.d.ts.map +1 -1
- package/esm/src/hooks/auth-hook.js +1 -65
- package/esm/src/hooks/auth-hook.js.map +1 -1
- package/esm/src/hooks/registration.d.ts.map +1 -1
- package/esm/src/hooks/registration.js +2 -16
- package/esm/src/hooks/registration.js.map +1 -1
- package/esm/src/landing-page.d.ts +5 -0
- package/esm/src/landing-page.d.ts.map +1 -0
- package/esm/src/landing-page.js +1070 -0
- package/esm/src/landing-page.js.map +1 -0
- package/esm/src/lib/base64.d.ts +2 -2
- package/esm/src/lib/base64.d.ts.map +1 -1
- package/esm/src/lib/base64.js +2 -2
- package/esm/src/lib/base64.js.map +1 -1
- package/esm/src/lib/config.d.ts +3 -3
- package/esm/src/lib/config.js +5 -5
- package/esm/src/lib/config.js.map +1 -1
- package/esm/src/lib/encodings.d.ts.map +1 -1
- package/esm/src/lib/encodings.js +10 -1
- package/esm/src/lib/encodings.js.map +1 -1
- package/esm/src/lib/matchers.d.ts.map +1 -1
- package/esm/src/lib/matchers.js +4 -1
- package/esm/src/lib/matchers.js.map +1 -1
- package/esm/src/lib/schemas.d.ts +4 -4
- package/esm/src/lib/schemas.d.ts.map +1 -1
- package/esm/src/lib/schemas.js +2 -2
- package/esm/src/lib/schemas.js.map +1 -1
- package/esm/src/lib/sdks.js +2 -2
- package/esm/src/lib/sdks.js.map +1 -1
- package/esm/src/lib/security.d.ts.map +1 -1
- package/esm/src/lib/security.js +18 -0
- package/esm/src/lib/security.js.map +1 -1
- package/esm/src/mcp-server/cli/start/command.d.ts.map +1 -1
- package/esm/src/mcp-server/cli/start/command.js +30 -0
- package/esm/src/mcp-server/cli/start/command.js.map +1 -1
- package/esm/src/mcp-server/cli/start/impl.d.ts +2 -7
- package/esm/src/mcp-server/cli/start/impl.d.ts.map +1 -1
- package/esm/src/mcp-server/cli/start/impl.js +98 -22
- package/esm/src/mcp-server/cli/start/impl.js.map +1 -1
- package/esm/src/mcp-server/extensions.d.ts +4 -4
- package/esm/src/mcp-server/extensions.d.ts.map +1 -1
- package/esm/src/mcp-server/flags.d.ts +17 -0
- package/esm/src/mcp-server/flags.d.ts.map +1 -0
- package/esm/src/mcp-server/flags.js +5 -0
- package/esm/src/mcp-server/flags.js.map +1 -0
- package/esm/src/mcp-server/mcp-server.js +1 -1
- package/esm/src/mcp-server/mcp-server.js.map +1 -1
- package/esm/src/mcp-server/prompts.d.ts +4 -7
- package/esm/src/mcp-server/prompts.d.ts.map +1 -1
- package/esm/src/mcp-server/prompts.js.map +1 -1
- package/esm/src/mcp-server/server.d.ts +8 -1
- package/esm/src/mcp-server/server.d.ts.map +1 -1
- package/esm/src/mcp-server/server.js +19 -16
- package/esm/src/mcp-server/server.js.map +1 -1
- package/esm/src/mcp-server/tools/aiSearch.d.ts +7 -0
- package/esm/src/mcp-server/tools/aiSearch.d.ts.map +1 -0
- package/esm/src/mcp-server/tools/aiSearch.js +83 -0
- package/esm/src/mcp-server/tools/aiSearch.js.map +1 -0
- package/esm/src/mcp-server/tools/getAnnouncementArticles.d.ts +7 -0
- package/esm/src/mcp-server/tools/getAnnouncementArticles.d.ts.map +1 -0
- package/esm/src/mcp-server/tools/getAnnouncementArticles.js +81 -0
- package/esm/src/mcp-server/tools/getAnnouncementArticles.js.map +1 -0
- package/esm/src/mcp-server/tools/getAnnouncements.d.ts.map +1 -1
- package/esm/src/mcp-server/tools/getAnnouncements.js +39 -1
- package/esm/src/mcp-server/tools/getAnnouncements.js.map +1 -1
- package/esm/src/mcp-server/tools/getArticle.d.ts.map +1 -1
- package/esm/src/mcp-server/tools/getArticle.js +42 -0
- package/esm/src/mcp-server/tools/getArticle.js.map +1 -1
- package/esm/src/mcp-server/tools/getArticleById.d.ts +7 -0
- package/esm/src/mcp-server/tools/getArticleById.d.ts.map +1 -0
- package/esm/src/mcp-server/tools/getArticleById.js +90 -0
- package/esm/src/mcp-server/tools/getArticleById.js.map +1 -0
- package/esm/src/mcp-server/tools/getBestAnswer.d.ts +7 -0
- package/esm/src/mcp-server/tools/getBestAnswer.d.ts.map +1 -0
- package/esm/src/mcp-server/tools/getBestAnswer.js +85 -0
- package/esm/src/mcp-server/tools/getBestAnswer.js.map +1 -0
- package/esm/src/mcp-server/tools/getMyPortals.d.ts +7 -0
- package/esm/src/mcp-server/tools/getMyPortals.d.ts.map +1 -0
- package/esm/src/mcp-server/tools/getMyPortals.js +117 -0
- package/esm/src/mcp-server/tools/getMyPortals.js.map +1 -0
- package/esm/src/mcp-server/tools/getPopularArticles.d.ts +1 -1
- package/esm/src/mcp-server/tools/getPopularArticles.d.ts.map +1 -1
- package/esm/src/mcp-server/tools/getPopularArticles.js +40 -0
- package/esm/src/mcp-server/tools/getPopularArticles.js.map +1 -1
- package/esm/src/mcp-server/tools/getPortals.d.ts +1 -1
- package/esm/src/mcp-server/tools/getPortals.d.ts.map +1 -1
- package/esm/src/mcp-server/tools/getPortals.js +26 -1
- package/esm/src/mcp-server/tools/getPortals.js.map +1 -1
- package/esm/src/mcp-server/tools/makeSuggestion.d.ts +1 -1
- package/esm/src/mcp-server/tools/makeSuggestion.d.ts.map +1 -1
- package/esm/src/mcp-server/tools/makeSuggestion.js +44 -0
- package/esm/src/mcp-server/tools/makeSuggestion.js.map +1 -1
- package/esm/src/mcp-server/tools/queryAnswers.d.ts.map +1 -1
- package/esm/src/mcp-server/tools/queryAnswers.js +41 -5
- package/esm/src/mcp-server/tools/queryAnswers.js.map +1 -1
- package/esm/src/mcp-server/tools/queryRetrieve.d.ts.map +1 -1
- package/esm/src/mcp-server/tools/queryRetrieve.js +41 -1
- package/esm/src/mcp-server/tools/queryRetrieve.js.map +1 -1
- package/esm/src/mcp-server/tools/querySearch.d.ts.map +1 -1
- package/esm/src/mcp-server/tools/querySearch.js +48 -1
- package/esm/src/mcp-server/tools/querySearch.js.map +1 -1
- package/esm/src/mcp-server/tools/retrieveChunks.d.ts +1 -1
- package/esm/src/mcp-server/tools/retrieveChunks.d.ts.map +1 -1
- package/esm/src/mcp-server/tools/retrieveChunks.js +41 -7
- package/esm/src/mcp-server/tools/retrieveChunks.js.map +1 -1
- package/esm/src/mcp-server/tools.d.ts +14 -4
- package/esm/src/mcp-server/tools.d.ts.map +1 -1
- package/esm/src/mcp-server/tools.js +203 -5
- package/esm/src/mcp-server/tools.js.map +1 -1
- package/esm/src/models/acceptlanguage.d.ts +36 -5
- package/esm/src/models/acceptlanguage.d.ts.map +1 -1
- package/esm/src/models/acceptlanguage.js +18 -4
- package/esm/src/models/acceptlanguage.js.map +1 -1
- package/esm/src/models/accessibleportal.d.ts +1 -1
- package/esm/src/models/accessibleportal.d.ts.map +1 -1
- package/esm/src/models/accessibleportal.js.map +1 -1
- package/esm/src/models/additionalsnippets.d.ts +18 -3
- package/esm/src/models/additionalsnippets.d.ts.map +1 -1
- package/esm/src/models/additionalsnippets.js +8 -1
- package/esm/src/models/additionalsnippets.js.map +1 -1
- package/esm/src/models/aisearchop.d.ts +4 -10
- package/esm/src/models/aisearchop.d.ts.map +1 -1
- package/esm/src/models/aisearchop.js +9 -20
- package/esm/src/models/aisearchop.js.map +1 -1
- package/esm/src/models/aisearchresponse.d.ts +2 -2
- package/esm/src/models/aisearchresponse.d.ts.map +1 -1
- package/esm/src/models/aisearchresponse.js.map +1 -1
- package/esm/src/models/aispaginationinfo.d.ts +1 -1
- package/esm/src/models/aispaginationinfo.d.ts.map +1 -1
- package/esm/src/models/aispaginationinfo.js +5 -4
- package/esm/src/models/aispaginationinfo.js.map +1 -1
- package/esm/src/models/aitopicbreadcrumb.d.ts +1 -1
- package/esm/src/models/aitopicbreadcrumb.d.ts.map +1 -1
- package/esm/src/models/aitopicbreadcrumb.js +2 -1
- package/esm/src/models/aitopicbreadcrumb.js.map +1 -1
- package/esm/src/models/aitopicsummary.d.ts +1 -1
- package/esm/src/models/aitopicsummary.d.ts.map +1 -1
- package/esm/src/models/aitopicsummary.js.map +1 -1
- package/esm/src/models/allaccessibleportals.d.ts +1 -1
- package/esm/src/models/allaccessibleportals.d.ts.map +1 -1
- package/esm/src/models/allaccessibleportals.js +2 -1
- package/esm/src/models/allaccessibleportals.js.map +1 -1
- package/esm/src/models/answersrequest.d.ts +16 -25
- package/esm/src/models/answersrequest.d.ts.map +1 -1
- package/esm/src/models/answersrequest.js +11 -25
- package/esm/src/models/answersrequest.js.map +1 -1
- package/esm/src/models/answersresponse.d.ts +28 -7
- package/esm/src/models/answersresponse.d.ts.map +1 -1
- package/esm/src/models/answersresponse.js +8 -0
- package/esm/src/models/answersresponse.js.map +1 -1
- package/esm/src/models/article.d.ts +2 -2
- package/esm/src/models/article.d.ts.map +1 -1
- package/esm/src/models/article.js +3 -4
- package/esm/src/models/article.js.map +1 -1
- package/esm/src/models/articleadditionalattributes.d.ts +36 -2
- package/esm/src/models/articleadditionalattributes.d.ts.map +1 -1
- package/esm/src/models/articleadditionalattributes.js +17 -0
- package/esm/src/models/articleadditionalattributes.js.map +1 -1
- package/esm/src/models/articleaisearchresult.d.ts +48 -9
- package/esm/src/models/articleaisearchresult.d.ts.map +1 -1
- package/esm/src/models/articleaisearchresult.js +17 -1
- package/esm/src/models/articleaisearchresult.js.map +1 -1
- package/esm/src/models/articleattachment.d.ts +14 -3
- package/esm/src/models/articleattachment.d.ts.map +1 -1
- package/esm/src/models/articleattachment.js +7 -2
- package/esm/src/models/articleattachment.js.map +1 -1
- package/esm/src/models/articleresult.d.ts +1 -1
- package/esm/src/models/articleresult.d.ts.map +1 -1
- package/esm/src/models/articleresult.js +1 -1
- package/esm/src/models/articleresult.js.map +1 -1
- package/esm/src/models/articleresultadditionalattributes.d.ts +34 -2
- package/esm/src/models/articleresultadditionalattributes.d.ts.map +1 -1
- package/esm/src/models/articleresultadditionalattributes.js +16 -0
- package/esm/src/models/articleresultadditionalattributes.js.map +1 -1
- package/esm/src/models/articleresults.d.ts +1 -1
- package/esm/src/models/articleresults.d.ts.map +1 -1
- package/esm/src/models/articleresults.js.map +1 -1
- package/esm/src/models/articletype.d.ts +2 -7
- package/esm/src/models/articletype.d.ts.map +1 -1
- package/esm/src/models/articletype.js +2 -16
- package/esm/src/models/articletype.js.map +1 -1
- package/esm/src/models/attachmentforcreatesuggestion.d.ts +1 -1
- package/esm/src/models/attachmentforcreatesuggestion.d.ts.map +1 -1
- package/esm/src/models/attachmentforcreatesuggestion.js.map +1 -1
- package/esm/src/models/bookmarkstatus.d.ts +1 -1
- package/esm/src/models/bookmarkstatus.d.ts.map +1 -1
- package/esm/src/models/bookmarkstatus.js +1 -1
- package/esm/src/models/bookmarkstatus.js.map +1 -1
- package/esm/src/models/complianceforarticle.d.ts +3 -3
- package/esm/src/models/complianceforarticle.d.ts.map +1 -1
- package/esm/src/models/complianceforarticle.js +8 -5
- package/esm/src/models/complianceforarticle.js.map +1 -1
- package/esm/src/models/createdby.d.ts +1 -1
- package/esm/src/models/createdby.d.ts.map +1 -1
- package/esm/src/models/createdby.js.map +1 -1
- package/esm/src/models/createsuggestion.d.ts +69 -6
- package/esm/src/models/createsuggestion.d.ts.map +1 -1
- package/esm/src/models/createsuggestion.js +31 -2
- package/esm/src/models/createsuggestion.js.map +1 -1
- package/esm/src/models/customattribute.d.ts +18 -3
- package/esm/src/models/customattribute.d.ts.map +1 -1
- package/esm/src/models/customattribute.js +6 -0
- package/esm/src/models/customattribute.js.map +1 -1
- package/esm/src/models/department.d.ts +1 -1
- package/esm/src/models/department.d.ts.map +1 -1
- package/esm/src/models/department.js.map +1 -1
- package/esm/src/models/edition.d.ts +2 -2
- package/esm/src/models/edition.d.ts.map +1 -1
- package/esm/src/models/edition.js +1 -2
- package/esm/src/models/edition.js.map +1 -1
- package/esm/src/models/errors/sdkvalidationerror.d.ts +1 -1
- package/esm/src/models/errors/sdkvalidationerror.d.ts.map +1 -1
- package/esm/src/models/errors/sdkvalidationerror.js +2 -49
- package/esm/src/models/errors/sdkvalidationerror.js.map +1 -1
- package/esm/src/models/folderbreadcrumb.d.ts +1 -1
- package/esm/src/models/folderbreadcrumb.d.ts.map +1 -1
- package/esm/src/models/folderbreadcrumb.js.map +1 -1
- package/esm/src/models/foldersummary.d.ts +1 -1
- package/esm/src/models/foldersummary.d.ts.map +1 -1
- package/esm/src/models/foldersummary.js +1 -1
- package/esm/src/models/foldersummary.js.map +1 -1
- package/esm/src/models/getannouncementarticlesop.d.ts +8 -9
- package/esm/src/models/getannouncementarticlesop.d.ts.map +1 -1
- package/esm/src/models/getannouncementarticlesop.js +12 -10
- package/esm/src/models/getannouncementarticlesop.js.map +1 -1
- package/esm/src/models/getarticlebyidop.d.ts +77 -11
- package/esm/src/models/getarticlebyidop.d.ts.map +1 -1
- package/esm/src/models/getarticlebyidop.js +31 -62
- package/esm/src/models/getarticlebyidop.js.map +1 -1
- package/esm/src/models/getbestanswerop.d.ts +1 -9
- package/esm/src/models/getbestanswerop.d.ts.map +1 -1
- package/esm/src/models/getbestanswerop.js +3 -16
- package/esm/src/models/getbestanswerop.js.map +1 -1
- package/esm/src/models/getmyportalsop.d.ts +4 -10
- package/esm/src/models/getmyportalsop.d.ts.map +1 -1
- package/esm/src/models/getmyportalsop.js +9 -10
- package/esm/src/models/getmyportalsop.js.map +1 -1
- package/esm/src/models/getpopulararticlesop.d.ts +8 -9
- package/esm/src/models/getpopulararticlesop.d.ts.map +1 -1
- package/esm/src/models/getpopulararticlesop.js +12 -10
- package/esm/src/models/getpopulararticlesop.js.map +1 -1
- package/esm/src/models/l10nstring.d.ts +1 -1
- package/esm/src/models/l10nstring.d.ts.map +1 -1
- package/esm/src/models/l10nstring.js.map +1 -1
- package/esm/src/models/languagecode.d.ts +69 -2
- package/esm/src/models/languagecode.d.ts.map +1 -1
- package/esm/src/models/languagecode.js +32 -0
- package/esm/src/models/languagecode.js.map +1 -1
- package/esm/src/models/languagecodeparameter.d.ts +90 -5
- package/esm/src/models/languagecodeparameter.d.ts.map +1 -1
- package/esm/src/models/languagecodeparameter.js +45 -4
- package/esm/src/models/languagecodeparameter.js.map +1 -1
- package/esm/src/models/languagequeryparameter.d.ts +90 -5
- package/esm/src/models/languagequeryparameter.d.ts.map +1 -1
- package/esm/src/models/languagequeryparameter.js +45 -4
- package/esm/src/models/languagequeryparameter.js.map +1 -1
- package/esm/src/models/link.d.ts +1 -1
- package/esm/src/models/link.d.ts.map +1 -1
- package/esm/src/models/link.js.map +1 -1
- package/esm/src/models/makesuggestionop.d.ts +4 -9
- package/esm/src/models/makesuggestionop.d.ts.map +1 -1
- package/esm/src/models/makesuggestionop.js +3 -7
- package/esm/src/models/makesuggestionop.js.map +1 -1
- package/esm/src/models/mandatorylanguagequeryparameter.d.ts +90 -5
- package/esm/src/models/mandatorylanguagequeryparameter.d.ts.map +1 -1
- package/esm/src/models/mandatorylanguagequeryparameter.js +45 -4
- package/esm/src/models/mandatorylanguagequeryparameter.js.map +1 -1
- package/esm/src/models/milestone.d.ts +1 -1
- package/esm/src/models/milestone.d.ts.map +1 -1
- package/esm/src/models/milestone.js.map +1 -1
- package/esm/src/models/milestonename.d.ts +1 -1
- package/esm/src/models/milestonename.d.ts.map +1 -1
- package/esm/src/models/milestonename.js.map +1 -1
- package/esm/src/models/modifiedby.d.ts +1 -1
- package/esm/src/models/modifiedby.d.ts.map +1 -1
- package/esm/src/models/modifiedby.js.map +1 -1
- package/esm/src/models/order.d.ts +10 -2
- package/esm/src/models/order.d.ts.map +1 -1
- package/esm/src/models/order.js +4 -0
- package/esm/src/models/order.js.map +1 -1
- package/esm/src/models/ownedby.d.ts +1 -1
- package/esm/src/models/ownedby.d.ts.map +1 -1
- package/esm/src/models/ownedby.js +1 -2
- package/esm/src/models/ownedby.js.map +1 -1
- package/esm/src/models/paginationinfo.d.ts +1 -1
- package/esm/src/models/paginationinfo.d.ts.map +1 -1
- package/esm/src/models/paginationinfo.js +3 -3
- package/esm/src/models/paginationinfo.js.map +1 -1
- package/esm/src/models/personalization.d.ts +4 -4
- package/esm/src/models/personalization.d.ts.map +1 -1
- package/esm/src/models/personalization.js +1 -2
- package/esm/src/models/personalization.js.map +1 -1
- package/esm/src/models/publishview.d.ts +2 -2
- package/esm/src/models/publishview.d.ts.map +1 -1
- package/esm/src/models/publishview.js.map +1 -1
- package/esm/src/models/referenceresponse.d.ts +30 -5
- package/esm/src/models/referenceresponse.d.ts.map +1 -1
- package/esm/src/models/referenceresponse.js +12 -1
- package/esm/src/models/referenceresponse.js.map +1 -1
- package/esm/src/models/requiredlanguagecode.d.ts +71 -2
- package/esm/src/models/requiredlanguagecode.d.ts.map +1 -1
- package/esm/src/models/requiredlanguagecode.js +33 -0
- package/esm/src/models/requiredlanguagecode.js.map +1 -1
- package/esm/src/models/retrievechunksop.d.ts +1 -9
- package/esm/src/models/retrievechunksop.d.ts.map +1 -1
- package/esm/src/models/retrievechunksop.js +1 -15
- package/esm/src/models/retrievechunksop.js.map +1 -1
- package/esm/src/models/retrieverequest.d.ts +15 -4
- package/esm/src/models/retrieverequest.d.ts.map +1 -1
- package/esm/src/models/retrieverequest.js +4 -0
- package/esm/src/models/retrieverequest.js.map +1 -1
- package/esm/src/models/retrieveresponse.d.ts +27 -8
- package/esm/src/models/retrieveresponse.d.ts.map +1 -1
- package/esm/src/models/retrieveresponse.js +8 -1
- package/esm/src/models/retrieveresponse.js.map +1 -1
- package/esm/src/models/schemaslink.d.ts +1 -1
- package/esm/src/models/schemaslink.d.ts.map +1 -1
- package/esm/src/models/schemaslink.js.map +1 -1
- package/esm/src/models/schemastags.d.ts +1 -1
- package/esm/src/models/schemastags.d.ts.map +1 -1
- package/esm/src/models/schemastags.js.map +1 -1
- package/esm/src/models/searchresult.d.ts +40 -5
- package/esm/src/models/searchresult.d.ts.map +1 -1
- package/esm/src/models/searchresult.js +19 -0
- package/esm/src/models/searchresult.js.map +1 -1
- package/esm/src/models/security.d.ts +5 -2
- package/esm/src/models/security.d.ts.map +1 -1
- package/esm/src/models/security.js +5 -3
- package/esm/src/models/security.js.map +1 -1
- package/esm/src/models/shorturl.d.ts +1 -1
- package/esm/src/models/shorturl.d.ts.map +1 -1
- package/esm/src/models/shorturl.js +1 -2
- package/esm/src/models/shorturl.js.map +1 -1
- package/esm/src/models/sortidnamedepartment.d.ts +12 -2
- package/esm/src/models/sortidnamedepartment.d.ts.map +1 -1
- package/esm/src/models/sortidnamedepartment.js +5 -0
- package/esm/src/models/sortidnamedepartment.js.map +1 -1
- package/esm/src/models/stage.d.ts +1 -1
- package/esm/src/models/stage.d.ts.map +1 -1
- package/esm/src/models/stage.js +1 -2
- package/esm/src/models/stage.js.map +1 -1
- package/esm/src/models/structuredauthoringfields.d.ts +1 -1
- package/esm/src/models/structuredauthoringfields.d.ts.map +1 -1
- package/esm/src/models/structuredauthoringfields.js.map +1 -1
- package/esm/src/models/tag.d.ts +1 -1
- package/esm/src/models/tag.d.ts.map +1 -1
- package/esm/src/models/tag.js.map +1 -1
- package/esm/src/models/tagcategory.d.ts +1 -1
- package/esm/src/models/tagcategory.d.ts.map +1 -1
- package/esm/src/models/tagcategory.js.map +1 -1
- package/esm/src/models/taggroup.d.ts +1 -1
- package/esm/src/models/taggroup.d.ts.map +1 -1
- package/esm/src/models/taggroup.js +1 -2
- package/esm/src/models/taggroup.js.map +1 -1
- package/esm/src/models/taggroups.d.ts +1 -1
- package/esm/src/models/taggroups.d.ts.map +1 -1
- package/esm/src/models/taggroups.js.map +1 -1
- package/esm/src/models/tags.d.ts +1 -1
- package/esm/src/models/tags.d.ts.map +1 -1
- package/esm/src/models/tags.js.map +1 -1
- package/esm/src/models/topicbreadcrumb.d.ts +1 -1
- package/esm/src/models/topicbreadcrumb.d.ts.map +1 -1
- package/esm/src/models/topicbreadcrumb.js.map +1 -1
- package/esm/src/models/topicsummary.d.ts +1 -1
- package/esm/src/models/topicsummary.d.ts.map +1 -1
- package/esm/src/models/topicsummary.js.map +1 -1
- package/esm/src/models/workflow.d.ts +1 -1
- package/esm/src/models/workflow.d.ts.map +1 -1
- package/esm/src/models/workflow.js +1 -2
- package/esm/src/models/workflow.js.map +1 -1
- package/esm/src/models/workflowmilestone.d.ts +12 -2
- package/esm/src/models/workflowmilestone.d.ts.map +1 -1
- package/esm/src/models/workflowmilestone.js +5 -0
- package/esm/src/models/workflowmilestone.js.map +1 -1
- package/esm/src/models/wserrorcommon.d.ts +2 -2
- package/esm/src/models/wserrorcommon.d.ts.map +1 -1
- package/esm/src/models/wserrorcommon.js +1 -2
- package/esm/src/models/wserrorcommon.js.map +1 -1
- package/esm/src/tool-names.d.ts +5 -0
- package/esm/src/tool-names.d.ts.map +1 -0
- package/esm/src/tool-names.js +36 -0
- package/esm/src/tool-names.js.map +1 -0
- package/esm/src/types/bigint.d.ts +6 -0
- package/esm/src/types/bigint.d.ts.map +1 -0
- package/esm/src/types/bigint.js +87 -0
- package/esm/src/types/bigint.js.map +1 -0
- package/esm/worker-configuration.d.ts +1 -0
- package/esm/worker-configuration.d.ts.map +1 -1
- package/manifest.json +78 -51
- package/package.json +11 -7
- package/src/cloudflare-worker/cloudflare-worker.ts +22 -9
- package/src/funcs/{querySearch.ts → aiSearch.ts} +49 -2
- package/src/funcs/{getAnnouncements.ts → getAnnouncementArticles.ts} +67 -10
- package/src/funcs/{getArticle.ts → getArticleById.ts} +58 -1
- package/src/funcs/{queryAnswers.ts → getBestAnswer.ts} +52 -14
- package/src/funcs/{getPortals.ts → getMyPortals.ts} +35 -2
- package/src/funcs/getPopularArticles.ts +68 -8
- package/src/funcs/makeSuggestion.ts +67 -9
- package/src/funcs/{queryRetrieve.ts → retrieveChunks.ts} +50 -15
- package/src/hooks/auth-hook.ts +3 -63
- package/src/hooks/registration.ts +3 -18
- package/src/landing-page.ts +1084 -0
- package/src/lib/base64.ts +2 -2
- package/src/lib/config.ts +5 -5
- package/src/lib/encodings.ts +12 -3
- package/src/lib/matchers.ts +5 -1
- package/src/lib/schemas.ts +10 -22
- package/src/lib/sdks.ts +2 -2
- package/src/lib/security.ts +21 -0
- package/src/mcp-server/cli/start/command.ts +31 -0
- package/src/mcp-server/cli/start/impl.ts +118 -31
- package/src/mcp-server/extensions.ts +6 -4
- package/src/mcp-server/flags.ts +21 -0
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/prompts.ts +9 -19
- package/src/mcp-server/server.ts +22 -16
- package/src/mcp-server/tools/aiSearch.ts +92 -0
- package/src/mcp-server/tools/getAnnouncementArticles.ts +90 -0
- package/src/mcp-server/tools/getArticleById.ts +99 -0
- package/src/mcp-server/tools/getBestAnswer.ts +94 -0
- package/src/mcp-server/tools/{getPortals.ts → getMyPortals.ts} +39 -5
- package/src/mcp-server/tools/getPopularArticles.ts +40 -0
- package/src/mcp-server/tools/makeSuggestion.ts +44 -0
- package/src/mcp-server/tools/retrieveChunks.ts +89 -0
- package/src/mcp-server/tools.ts +300 -46
- package/src/models/acceptlanguage.ts +21 -8
- package/src/models/accessibleportal.ts +9 -11
- package/src/models/additionalsnippets.ts +25 -18
- package/src/models/aisearchop.ts +14 -37
- package/src/models/aisearchresponse.ts +7 -13
- package/src/models/aispaginationinfo.ts +7 -10
- package/src/models/aitopicbreadcrumb.ts +4 -7
- package/src/models/aitopicsummary.ts +1 -5
- package/src/models/allaccessibleportals.ts +5 -8
- package/src/models/answersrequest.ts +22 -58
- package/src/models/answersresponse.ts +30 -24
- package/src/models/article.ts +39 -40
- package/src/models/articleadditionalattributes.ts +22 -4
- package/src/models/articleaisearchresult.ts +70 -52
- package/src/models/articleattachment.ts +18 -15
- package/src/models/articleresult.ts +2 -6
- package/src/models/articleresultadditionalattributes.ts +43 -0
- package/src/models/articleresults.ts +1 -5
- package/src/models/articletype.ts +4 -25
- package/src/models/attachmentforcreatesuggestion.ts +1 -3
- package/src/models/bookmarkstatus.ts +2 -6
- package/src/models/complianceforarticle.ts +13 -22
- package/src/models/createdby.ts +7 -8
- package/src/models/createsuggestion.ts +54 -31
- package/src/models/customattribute.ts +13 -7
- package/src/models/department.ts +1 -5
- package/src/models/edition.ts +8 -13
- package/src/models/errors/sdkvalidationerror.ts +2 -57
- package/src/models/folderbreadcrumb.ts +5 -7
- package/src/models/foldersummary.ts +2 -6
- package/src/models/getannouncementarticlesop.ts +34 -23
- package/src/models/getarticlebyidop.ts +91 -95
- package/src/models/getbestanswerop.ts +16 -48
- package/src/models/getmyportalsop.ts +29 -44
- package/src/models/getpopulararticlesop.ts +34 -23
- package/src/models/l10nstring.ts +1 -5
- package/src/models/languagecode.ts +38 -2
- package/src/models/languagecodeparameter.ts +48 -10
- package/src/models/languagequeryparameter.ts +48 -10
- package/src/models/link.ts +1 -1
- package/src/models/makesuggestionop.ts +20 -30
- package/src/models/mandatorylanguagequeryparameter.ts +50 -10
- package/src/models/milestone.ts +3 -4
- package/src/models/milestonename.ts +1 -5
- package/src/models/modifiedby.ts +1 -5
- package/src/models/order.ts +7 -2
- package/src/models/ownedby.ts +7 -8
- package/src/models/paginationinfo.ts +4 -8
- package/src/models/personalization.ts +6 -19
- package/src/models/publishview.ts +2 -8
- package/src/models/referenceresponse.ts +34 -20
- package/src/models/requiredlanguagecode.ts +39 -4
- package/src/models/retrievechunksop.ts +16 -48
- package/src/models/retrieverequest.ts +12 -10
- package/src/models/retrieveresponse.ts +34 -28
- package/src/models/schemaslink.ts +1 -5
- package/src/models/schemastags.ts +1 -5
- package/src/models/searchresult.ts +34 -8
- package/src/models/security.ts +14 -7
- package/src/models/shorturl.ts +6 -7
- package/src/models/sortidnamedepartment.ts +8 -4
- package/src/models/stage.ts +4 -5
- package/src/models/structuredauthoringfields.ts +1 -3
- package/src/models/tag.ts +1 -1
- package/src/models/tagcategory.ts +1 -5
- package/src/models/taggroup.ts +4 -5
- package/src/models/taggroups.ts +3 -4
- package/src/models/tags.ts +1 -1
- package/src/models/topicbreadcrumb.ts +1 -5
- package/src/models/topicsummary.ts +1 -5
- package/src/models/workflow.ts +3 -4
- package/src/models/workflowmilestone.ts +8 -2
- package/src/models/wserrorcommon.ts +5 -10
- package/src/tool-names.ts +35 -0
- package/src/types/bigint.ts +87 -0
- package/tsconfig.json +0 -1
- package/worker-configuration.d.ts +2 -2
- package/worker-configuration.ts +1 -0
- package/src/cloudflare-worker/landing-page.ts +0 -337
- package/src/hooks/portal-cache-hook.ts +0 -505
- package/src/hooks/portal-lookup-hook.ts +0 -429
- package/src/mcp-server/tools/getAnnouncements.ts +0 -53
- package/src/mcp-server/tools/getArticle.ts +0 -56
- package/src/mcp-server/tools/queryAnswers.ts +0 -57
- package/src/mcp-server/tools/queryRetrieve.ts +0 -55
- package/src/mcp-server/tools/querySearch.ts +0 -44
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
5
|
+
import * as M from "../lib/matchers.js";
|
|
6
|
+
import { compactMap } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
9
|
+
import { pathToFunc } from "../lib/url.js";
|
|
10
|
+
import { AnswersResponse$zodSchema, } from "../models/answersresponse.js";
|
|
11
|
+
import { GetBestAnswerRequest$zodSchema, } from "../models/getbestanswerop.js";
|
|
12
|
+
import { APIPromise } from "../types/async.js";
|
|
13
|
+
/**
|
|
14
|
+
* Generate an Answer
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* Get Answers
|
|
18
|
+
*
|
|
19
|
+
* ## How to Use This Tool
|
|
20
|
+
*
|
|
21
|
+
* **CRITICAL**: This tool requires a `request` parameter containing the request object. All parameters must be passed inside a `request` object.
|
|
22
|
+
*
|
|
23
|
+
* **Parameter Format**:
|
|
24
|
+
* - Always wrap parameters in a `request` object: `{"request": {"portalID": "PZ-9999", "q": "loan information", "Dollar_lang": "en-US"}}`
|
|
25
|
+
* - Required parameters:
|
|
26
|
+
* - `portalID` (string) - The portal ID (format: 2-4 letter prefix + dash + 4-15 digits, e.g., "PZ-9999")
|
|
27
|
+
* - `q` (string) - The search query string
|
|
28
|
+
* - `Dollar_lang` (string) - Language code (e.g., "en-US")
|
|
29
|
+
* - Optional parameters:
|
|
30
|
+
* - `dollarFilterUserProfileID` (string) - User profile ID filter
|
|
31
|
+
* - `dollarFilterTags` (object) - Object where keys are Category Tag IDs and values are arrays of Tag IDs
|
|
32
|
+
* - `dollarFilterTopicIds` (array) - Array of topic IDs to filter by
|
|
33
|
+
* - `AnswersRequest` (object) - Request body parameters:
|
|
34
|
+
* - `eventId` (string, **required**) - Event ID
|
|
35
|
+
* - `sessionId` (string, **required**) - Session ID
|
|
36
|
+
* - `channel` (object, **optional**, recommended to omit) - Channel information. Omit unless specifically needed. If you receive a 400 error with channel, retry without it.
|
|
37
|
+
* - `context` (object) - Additional context (companyContext, pageContext, userContext)
|
|
38
|
+
*
|
|
39
|
+
* **Example**: To get answers for query "loan information" from portal "PZ-9999", call with:
|
|
40
|
+
* ```json
|
|
41
|
+
* {"request": {"portalID": "PZ-9999", "q": "loan information", "Dollar_lang": "en-US", "AnswersRequest": {"eventId": "event-123", "sessionId": "session-456"}}}
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* **Note**: The `channel` field in `AnswersRequest` is optional and recommended to omit unless specifically needed. The API works reliably without it.
|
|
45
|
+
*
|
|
46
|
+
* ## Displaying Results (MCP-Specific)
|
|
47
|
+
* **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.
|
|
48
|
+
*
|
|
49
|
+
* **What to display:**
|
|
50
|
+
* - Display the `answer.answerValue` text prominently as the main answer to the user's query
|
|
51
|
+
* - Indicate the answer type (`answerType`: "certified" or "generative")
|
|
52
|
+
* - If `relevanceScore` is present, you may mention the confidence level
|
|
53
|
+
* - List all `references` (article IDs and names) that were used to generate the answer
|
|
54
|
+
* - Display `searchResults` showing related articles with their names, IDs, snippets, and relevance scores
|
|
55
|
+
* - Format the answer in a clear, readable way - this is the primary response the user is seeking
|
|
56
|
+
*
|
|
57
|
+
* **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]..."
|
|
58
|
+
*
|
|
59
|
+
* ## Prerequisites
|
|
60
|
+
* - Requires a valid portal ID. If you don't have the portal ID, first call 'get-portals' to get available portals.
|
|
61
|
+
* - Portal ID format: 2-4 letter prefix + dash + 4-15 digits (e.g., "PROD-1004")
|
|
62
|
+
*
|
|
63
|
+
* ## Overview
|
|
64
|
+
* 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.
|
|
65
|
+
*
|
|
66
|
+
* 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.
|
|
67
|
+
*/
|
|
68
|
+
export function getBestAnswer(client$, request, options) {
|
|
69
|
+
return new APIPromise($do(client$, request, options));
|
|
70
|
+
}
|
|
71
|
+
async function $do(client$, request, options) {
|
|
72
|
+
const parsed$ = safeParse(request, (value$) => GetBestAnswerRequest$zodSchema.parse(value$), "Input validation failed");
|
|
73
|
+
if (!parsed$.ok) {
|
|
74
|
+
return [parsed$, { status: "invalid" }];
|
|
75
|
+
}
|
|
76
|
+
const payload$ = parsed$.value;
|
|
77
|
+
const body$ = encodeJSON("body", payload$.AnswersRequest, { explode: true });
|
|
78
|
+
const pathParams$ = {
|
|
79
|
+
portalID: encodeSimple("portalID", payload$.portalID, {
|
|
80
|
+
explode: false,
|
|
81
|
+
charEncoding: "percent",
|
|
82
|
+
}),
|
|
83
|
+
};
|
|
84
|
+
const path$ = pathToFunc("/{portalID}/answers")(pathParams$);
|
|
85
|
+
const query$ = encodeFormQuery({
|
|
86
|
+
"$filter[tags]": payload$.dollarFilterTags,
|
|
87
|
+
"$filter[topicIds]": payload$.dollarFilterTopicIds,
|
|
88
|
+
"$filter[userProfileID]": payload$.dollarFilterUserProfileID,
|
|
89
|
+
"$lang": payload$.Dollar_lang,
|
|
90
|
+
"q": payload$.q,
|
|
91
|
+
});
|
|
92
|
+
const headers$ = new Headers(compactMap({
|
|
93
|
+
"Content-Type": "application/json",
|
|
94
|
+
Accept: "application/json",
|
|
95
|
+
}));
|
|
96
|
+
const securityInput = await extractSecurity(client$._options.security);
|
|
97
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
98
|
+
const context = {
|
|
99
|
+
options: client$._options,
|
|
100
|
+
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
101
|
+
operationID: "getBestAnswer",
|
|
102
|
+
oAuth2Scopes: null,
|
|
103
|
+
resolvedSecurity: requestSecurity,
|
|
104
|
+
securitySource: client$._options.security,
|
|
105
|
+
retryConfig: options?.retries
|
|
106
|
+
|| client$._options.retryConfig
|
|
107
|
+
|| { strategy: "none" },
|
|
108
|
+
retryCodes: options?.retryCodes || [
|
|
109
|
+
"429",
|
|
110
|
+
"500",
|
|
111
|
+
"502",
|
|
112
|
+
"503",
|
|
113
|
+
"504",
|
|
114
|
+
],
|
|
115
|
+
};
|
|
116
|
+
const requestRes = client$._createRequest(context, {
|
|
117
|
+
security: requestSecurity,
|
|
118
|
+
method: "POST",
|
|
119
|
+
baseURL: options?.serverURL,
|
|
120
|
+
path: path$,
|
|
121
|
+
headers: headers$,
|
|
122
|
+
query: query$,
|
|
123
|
+
body: body$,
|
|
124
|
+
userAgent: client$._options.userAgent,
|
|
125
|
+
timeoutMs: options?.timeoutMs || client$._options.timeoutMs
|
|
126
|
+
|| -1,
|
|
127
|
+
}, options);
|
|
128
|
+
if (!requestRes.ok) {
|
|
129
|
+
return [requestRes, { status: "invalid" }];
|
|
130
|
+
}
|
|
131
|
+
const req$ = requestRes.value;
|
|
132
|
+
const doResult = await client$._do(req$, {
|
|
133
|
+
context,
|
|
134
|
+
errorCodes: [],
|
|
135
|
+
retryConfig: context.retryConfig,
|
|
136
|
+
retryCodes: context.retryCodes,
|
|
137
|
+
});
|
|
138
|
+
if (!doResult.ok) {
|
|
139
|
+
return [doResult, { status: "request-error", request: req$ }];
|
|
140
|
+
}
|
|
141
|
+
const response = doResult.value;
|
|
142
|
+
const responseFields$ = {
|
|
143
|
+
HttpMeta: { Response: response, Request: req$ },
|
|
144
|
+
};
|
|
145
|
+
const [result$] = await M.match(M.json(200, AnswersResponse$zodSchema, { key: "AnswersResponse" }), M.nil(400, AnswersResponse$zodSchema), M.nil(500, AnswersResponse$zodSchema))(response, req$, { extraFields: responseFields$ });
|
|
146
|
+
return [result$, { status: "complete", request: req$, response }];
|
|
147
|
+
}
|
|
148
|
+
//# sourceMappingURL=getBestAnswer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getBestAnswer.js","sourceRoot":"","sources":["../../../src/funcs/getBestAnswer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAEL,yBAAyB,GAC1B,MAAM,8BAA8B,CAAC;AAUtC,OAAO,EAEL,8BAA8B,GAC/B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,MAAM,UAAU,aAAa,CAC3B,OAAqB,EACrB,OAA6B,EAC7B,OAAwB;IAaxB,OAAO,IAAI,UAAU,CAAC,GAAG,CACvB,OAAO,EACP,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,OAAqB,EACrB,OAA6B,EAC7B,OAAwB;IAgBxB,MAAM,OAAO,GAAG,SAAS,CACvB,OAAO,EACP,CAAC,MAAM,EAAE,EAAE,CAAC,8BAA8B,CAAC,KAAK,CAAC,MAAM,CAAC,EACxD,yBAAyB,CAC1B,CAAC;IACF,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC;QAChB,OAAO,CAAC,OAAO,EAAE,EAAE,MAAM,EAA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,eAAe,GAAG;QACtB,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE;KAChD,CAAC;IAEF,MAAM,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAU7B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,yBAAyB,EAAE,EAAE,GAAG,EAAE,iBAAiB,EAAE,CAAC,EAClE,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,yBAAyB,CAAC,EACrC,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,yBAAyB,CAAC,CACtC,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC,CAAC;IAEpD,OAAO,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;AACpE,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { EgainMcpCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { APIError } from "../models/errors/apierror.js";
|
|
4
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
5
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
6
|
+
import { GetMyPortalsRequest, GetMyPortalsResponse } from "../models/getmyportalsop.js";
|
|
7
|
+
import { APIPromise } from "../types/async.js";
|
|
8
|
+
import { Result } from "../types/fp.js";
|
|
9
|
+
/**
|
|
10
|
+
* Get All Portals Accessible To User
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* Get All Portals Accessible to User
|
|
14
|
+
*
|
|
15
|
+
* ## Overview
|
|
16
|
+
* 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.
|
|
17
|
+
*
|
|
18
|
+
* - If no access tags are specified for a portal, any user can access the portal.
|
|
19
|
+
* - 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.
|
|
20
|
+
* - Global users (partition) cannot be assigned user profiles; their access is limited to portals without access restrictions.
|
|
21
|
+
* - The only articles returned are associated to an Article type when the parameter “Include in browse on portals” is set to "Yes".
|
|
22
|
+
* - 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.
|
|
23
|
+
*
|
|
24
|
+
* ## Prerequisites
|
|
25
|
+
* 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.
|
|
26
|
+
*
|
|
27
|
+
* ## How to Use This Tool
|
|
28
|
+
* - 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.
|
|
29
|
+
*
|
|
30
|
+
* ## Parameter Requirements
|
|
31
|
+
* This tool requires **both** a query language parameter **and** an HTTP language header. An empty request object is **invalid** and MUST NOT be used.
|
|
32
|
+
*
|
|
33
|
+
* ### Required (both MUST be provided)
|
|
34
|
+
* - `Dollar_lang` (string, default: "en-US") - Language code
|
|
35
|
+
* - `Accept-Language` (string, default: "en-US") - Accept-Language header value
|
|
36
|
+
*
|
|
37
|
+
* Both parameters **MUST** be present on every invocation.
|
|
38
|
+
* If either parameter is missing, the request is invalid.
|
|
39
|
+
*
|
|
40
|
+
* #### Optional
|
|
41
|
+
*
|
|
42
|
+
* - `Dollar_pagenum` — Page number to retrieve (defaults to `1` if omitted)
|
|
43
|
+
* - `Dollar_pagesize` — Number of items per page (server default applied if omitted)
|
|
44
|
+
*
|
|
45
|
+
* **Example**: To get all portals accessible to the user, call with:
|
|
46
|
+
* ```json
|
|
47
|
+
* {"request": {"Dollar_lang": "en-US", "Accept-Language": "en-US"}}
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* ## Overview
|
|
51
|
+
* The Get All Portals Accessible to User API allows a user to fetch all portals accessible to the user across all departments.
|
|
52
|
+
*
|
|
53
|
+
* ## Pagination behavior (CRITICAL for AI assistants)
|
|
54
|
+
*
|
|
55
|
+
* **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.
|
|
56
|
+
*
|
|
57
|
+
* ### Automatic pagination is REQUIRED when:
|
|
58
|
+
* - User asks to find a portal by name (e.g., "business portal", "Master portal")
|
|
59
|
+
* - User requests to list or see all portals
|
|
60
|
+
* - You need to resolve a natural portal name to its ID
|
|
61
|
+
*
|
|
62
|
+
* ### How to detect more pages exist:
|
|
63
|
+
* The response includes `paginationInfo` with:
|
|
64
|
+
* - `count`: Total number of items across all pages
|
|
65
|
+
* - `pagenum`: Current page number
|
|
66
|
+
* - `pagesize`: Items per page (default: 25)
|
|
67
|
+
*
|
|
68
|
+
* **Check for more pages if ANY of these are true:**
|
|
69
|
+
* 1. The number of portals returned equals `pagesize` (e.g., exactly 25 portals returned)
|
|
70
|
+
* 2. `paginationInfo.count > (pagenum * pagesize)` - there are more items beyond this page
|
|
71
|
+
* 3. The response includes a `link` array with a `next` relation
|
|
72
|
+
*
|
|
73
|
+
* ### Required pagination workflow:
|
|
74
|
+
* 1. Start with `$pagenum=1` and `$pagesize=25` (default)
|
|
75
|
+
* 2. After receiving the response, check `paginationInfo`
|
|
76
|
+
* 3. **If more pages exist** (using the checks above), automatically call this endpoint again with `$pagenum=2`, then `$pagenum=3`, etc.
|
|
77
|
+
* 4. Continue incrementing `$pagenum` until:
|
|
78
|
+
* - A page returns fewer portals than `pagesize` (indicating the last page)
|
|
79
|
+
* - A page returns zero portals
|
|
80
|
+
* - `pagenum * pagesize >= paginationInfo.count` (if count represents total items)
|
|
81
|
+
* 5. Merge all portals from all pages by unique portal ID
|
|
82
|
+
* 6. Only then search through the complete merged list or report results to the user
|
|
83
|
+
*
|
|
84
|
+
* ### Example scenario:
|
|
85
|
+
* If you search for "business portal" and the first page returns 25 portals but none match:
|
|
86
|
+
* - DO NOT immediately tell the user the portal doesn't exist
|
|
87
|
+
* - Check `paginationInfo.count` - if it's > 25, automatically fetch page 2
|
|
88
|
+
* - Continue fetching until all pages are retrieved
|
|
89
|
+
* - Search the complete merged list before concluding the portal doesn't exist
|
|
90
|
+
*
|
|
91
|
+
* This ensures reliable portal name-to-ID resolution and prevents false "not found" errors.
|
|
92
|
+
*
|
|
93
|
+
* ## Displaying Results (MCP-Specific)
|
|
94
|
+
* 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.
|
|
95
|
+
*/
|
|
96
|
+
export declare function getMyPortals(client$: EgainMcpCore, request: GetMyPortalsRequest, options?: RequestOptions): APIPromise<Result<GetMyPortalsResponse, APIError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
|
|
97
|
+
//# sourceMappingURL=getMyPortals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getMyPortals.d.ts","sourceRoot":"","sources":["../../../src/funcs/getMyPortals.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAK1C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,mBAAmB,EAEnB,oBAAoB,EAErB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsFG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,mBAAmB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,oBAAoB,EAClB,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAMA"}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
5
|
+
import * as M from "../lib/matchers.js";
|
|
6
|
+
import { compactMap } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
9
|
+
import { pathToFunc } from "../lib/url.js";
|
|
10
|
+
import { GetMyPortalsRequest$zodSchema, GetMyPortalsResponse$zodSchema, } from "../models/getmyportalsop.js";
|
|
11
|
+
import { APIPromise } from "../types/async.js";
|
|
12
|
+
/**
|
|
13
|
+
* Get All Portals Accessible To User
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* Get All Portals Accessible to User
|
|
17
|
+
*
|
|
18
|
+
* ## Overview
|
|
19
|
+
* 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.
|
|
20
|
+
*
|
|
21
|
+
* - If no access tags are specified for a portal, any user can access the portal.
|
|
22
|
+
* - 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.
|
|
23
|
+
* - Global users (partition) cannot be assigned user profiles; their access is limited to portals without access restrictions.
|
|
24
|
+
* - The only articles returned are associated to an Article type when the parameter “Include in browse on portals” is set to "Yes".
|
|
25
|
+
* - 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.
|
|
26
|
+
*
|
|
27
|
+
* ## Prerequisites
|
|
28
|
+
* 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.
|
|
29
|
+
*
|
|
30
|
+
* ## How to Use This Tool
|
|
31
|
+
* - 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.
|
|
32
|
+
*
|
|
33
|
+
* ## Parameter Requirements
|
|
34
|
+
* This tool requires **both** a query language parameter **and** an HTTP language header. An empty request object is **invalid** and MUST NOT be used.
|
|
35
|
+
*
|
|
36
|
+
* ### Required (both MUST be provided)
|
|
37
|
+
* - `Dollar_lang` (string, default: "en-US") - Language code
|
|
38
|
+
* - `Accept-Language` (string, default: "en-US") - Accept-Language header value
|
|
39
|
+
*
|
|
40
|
+
* Both parameters **MUST** be present on every invocation.
|
|
41
|
+
* If either parameter is missing, the request is invalid.
|
|
42
|
+
*
|
|
43
|
+
* #### Optional
|
|
44
|
+
*
|
|
45
|
+
* - `Dollar_pagenum` — Page number to retrieve (defaults to `1` if omitted)
|
|
46
|
+
* - `Dollar_pagesize` — Number of items per page (server default applied if omitted)
|
|
47
|
+
*
|
|
48
|
+
* **Example**: To get all portals accessible to the user, call with:
|
|
49
|
+
* ```json
|
|
50
|
+
* {"request": {"Dollar_lang": "en-US", "Accept-Language": "en-US"}}
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* ## Overview
|
|
54
|
+
* The Get All Portals Accessible to User API allows a user to fetch all portals accessible to the user across all departments.
|
|
55
|
+
*
|
|
56
|
+
* ## Pagination behavior (CRITICAL for AI assistants)
|
|
57
|
+
*
|
|
58
|
+
* **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.
|
|
59
|
+
*
|
|
60
|
+
* ### Automatic pagination is REQUIRED when:
|
|
61
|
+
* - User asks to find a portal by name (e.g., "business portal", "Master portal")
|
|
62
|
+
* - User requests to list or see all portals
|
|
63
|
+
* - You need to resolve a natural portal name to its ID
|
|
64
|
+
*
|
|
65
|
+
* ### How to detect more pages exist:
|
|
66
|
+
* The response includes `paginationInfo` with:
|
|
67
|
+
* - `count`: Total number of items across all pages
|
|
68
|
+
* - `pagenum`: Current page number
|
|
69
|
+
* - `pagesize`: Items per page (default: 25)
|
|
70
|
+
*
|
|
71
|
+
* **Check for more pages if ANY of these are true:**
|
|
72
|
+
* 1. The number of portals returned equals `pagesize` (e.g., exactly 25 portals returned)
|
|
73
|
+
* 2. `paginationInfo.count > (pagenum * pagesize)` - there are more items beyond this page
|
|
74
|
+
* 3. The response includes a `link` array with a `next` relation
|
|
75
|
+
*
|
|
76
|
+
* ### Required pagination workflow:
|
|
77
|
+
* 1. Start with `$pagenum=1` and `$pagesize=25` (default)
|
|
78
|
+
* 2. After receiving the response, check `paginationInfo`
|
|
79
|
+
* 3. **If more pages exist** (using the checks above), automatically call this endpoint again with `$pagenum=2`, then `$pagenum=3`, etc.
|
|
80
|
+
* 4. Continue incrementing `$pagenum` until:
|
|
81
|
+
* - A page returns fewer portals than `pagesize` (indicating the last page)
|
|
82
|
+
* - A page returns zero portals
|
|
83
|
+
* - `pagenum * pagesize >= paginationInfo.count` (if count represents total items)
|
|
84
|
+
* 5. Merge all portals from all pages by unique portal ID
|
|
85
|
+
* 6. Only then search through the complete merged list or report results to the user
|
|
86
|
+
*
|
|
87
|
+
* ### Example scenario:
|
|
88
|
+
* If you search for "business portal" and the first page returns 25 portals but none match:
|
|
89
|
+
* - DO NOT immediately tell the user the portal doesn't exist
|
|
90
|
+
* - Check `paginationInfo.count` - if it's > 25, automatically fetch page 2
|
|
91
|
+
* - Continue fetching until all pages are retrieved
|
|
92
|
+
* - Search the complete merged list before concluding the portal doesn't exist
|
|
93
|
+
*
|
|
94
|
+
* This ensures reliable portal name-to-ID resolution and prevents false "not found" errors.
|
|
95
|
+
*
|
|
96
|
+
* ## Displaying Results (MCP-Specific)
|
|
97
|
+
* 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.
|
|
98
|
+
*/
|
|
99
|
+
export function getMyPortals(client$, request, options) {
|
|
100
|
+
return new APIPromise($do(client$, request, options));
|
|
101
|
+
}
|
|
102
|
+
async function $do(client$, request, options) {
|
|
103
|
+
const parsed$ = safeParse(request, (value$) => GetMyPortalsRequest$zodSchema.parse(value$), "Input validation failed");
|
|
104
|
+
if (!parsed$.ok) {
|
|
105
|
+
return [parsed$, { status: "invalid" }];
|
|
106
|
+
}
|
|
107
|
+
const payload$ = parsed$.value;
|
|
108
|
+
const body$ = null;
|
|
109
|
+
const path$ = pathToFunc("/myportals")();
|
|
110
|
+
const query$ = encodeFormQuery({
|
|
111
|
+
"$lang": payload$.Dollar_lang,
|
|
112
|
+
"$order": payload$.Dollar_order,
|
|
113
|
+
"$pagenum": payload$.Dollar_pagenum,
|
|
114
|
+
"$pagesize": payload$.Dollar_pagesize,
|
|
115
|
+
"$sort": payload$.Dollar_sort,
|
|
116
|
+
"department": payload$.department,
|
|
117
|
+
"filterText": payload$.filterText,
|
|
118
|
+
"shortUrlTemplate": payload$.shortUrlTemplate,
|
|
119
|
+
});
|
|
120
|
+
const headers$ = new Headers(compactMap({
|
|
121
|
+
Accept: "application/json",
|
|
122
|
+
"Accept-Language": encodeSimple("Accept-Language", payload$.acceptLanguage, { explode: false, charEncoding: "none" }),
|
|
123
|
+
}));
|
|
124
|
+
const securityInput = await extractSecurity(client$._options.security);
|
|
125
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
126
|
+
const context = {
|
|
127
|
+
options: client$._options,
|
|
128
|
+
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
129
|
+
operationID: "getMyPortals",
|
|
130
|
+
oAuth2Scopes: null,
|
|
131
|
+
resolvedSecurity: requestSecurity,
|
|
132
|
+
securitySource: client$._options.security,
|
|
133
|
+
retryConfig: options?.retries
|
|
134
|
+
|| client$._options.retryConfig
|
|
135
|
+
|| { strategy: "none" },
|
|
136
|
+
retryCodes: options?.retryCodes || [
|
|
137
|
+
"429",
|
|
138
|
+
"500",
|
|
139
|
+
"502",
|
|
140
|
+
"503",
|
|
141
|
+
"504",
|
|
142
|
+
],
|
|
143
|
+
};
|
|
144
|
+
const requestRes = client$._createRequest(context, {
|
|
145
|
+
security: requestSecurity,
|
|
146
|
+
method: "GET",
|
|
147
|
+
baseURL: options?.serverURL,
|
|
148
|
+
path: path$,
|
|
149
|
+
headers: headers$,
|
|
150
|
+
query: query$,
|
|
151
|
+
body: body$,
|
|
152
|
+
userAgent: client$._options.userAgent,
|
|
153
|
+
timeoutMs: options?.timeoutMs || client$._options.timeoutMs
|
|
154
|
+
|| -1,
|
|
155
|
+
}, options);
|
|
156
|
+
if (!requestRes.ok) {
|
|
157
|
+
return [requestRes, { status: "invalid" }];
|
|
158
|
+
}
|
|
159
|
+
const req$ = requestRes.value;
|
|
160
|
+
const doResult = await client$._do(req$, {
|
|
161
|
+
context,
|
|
162
|
+
errorCodes: [],
|
|
163
|
+
retryConfig: context.retryConfig,
|
|
164
|
+
retryCodes: context.retryCodes,
|
|
165
|
+
});
|
|
166
|
+
if (!doResult.ok) {
|
|
167
|
+
return [doResult, { status: "request-error", request: req$ }];
|
|
168
|
+
}
|
|
169
|
+
const response = doResult.value;
|
|
170
|
+
const responseFields$ = {
|
|
171
|
+
HttpMeta: { Response: response, Request: req$ },
|
|
172
|
+
};
|
|
173
|
+
const [result$] = await M.match(M.json(200, GetMyPortalsResponse$zodSchema, {
|
|
174
|
+
key: "AllAccessiblePortals",
|
|
175
|
+
}), M.nil(204, GetMyPortalsResponse$zodSchema), M.json([400, 401, 403, 404, 406], GetMyPortalsResponse$zodSchema, {
|
|
176
|
+
key: "WSErrorCommon",
|
|
177
|
+
}), M.json(500, GetMyPortalsResponse$zodSchema, { key: "WSErrorCommon" }))(response, req$, { extraFields: responseFields$ });
|
|
178
|
+
return [result$, { status: "complete", request: req$, response }];
|
|
179
|
+
}
|
|
180
|
+
//# sourceMappingURL=getMyPortals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getMyPortals.js","sourceRoot":"","sources":["../../../src/funcs/getMyPortals.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAU3C,OAAO,EAEL,6BAA6B,EAE7B,8BAA8B,GAC/B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsFG;AACH,MAAM,UAAU,YAAY,CAC1B,OAAqB,EACrB,OAA4B,EAC5B,OAAwB;IAaxB,OAAO,IAAI,UAAU,CAAC,GAAG,CACvB,OAAO,EACP,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,OAAqB,EACrB,OAA4B,EAC5B,OAAwB;IAgBxB,MAAM,OAAO,GAAG,SAAS,CACvB,OAAO,EACP,CAAC,MA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AE,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC;IACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC;IAChC,MAAM,eAAe,GAAG;QACtB,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE;KAChD,CAAC;IAEF,MAAM,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAU7B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,8BAA8B,EAAE;QAC1C,GAAG,EAAE,sBAAsB;KAC5B,CAAC,EACF,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,8BAA8B,CAAC,EAC1C,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,8BAA8B,EAAE;QAChE,GAAG,EAAE,eAAe;KACrB,CAAC,EACF,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,8BAA8B,EAAE,EAAE,GAAG,EAAE,eAAe,EAAE,CAAC,CACtE,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC,CAAC;IAEpD,OAAO,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;AACpE,CAAC"}
|
|
@@ -12,6 +12,45 @@ import { Result } from "../types/fp.js";
|
|
|
12
12
|
* @remarks
|
|
13
13
|
* Get Popular Articles
|
|
14
14
|
*
|
|
15
|
+
* ## How to Use This Tool
|
|
16
|
+
*
|
|
17
|
+
* **CRITICAL**: This tool requires a `request` parameter containing the request object. All parameters must be passed inside a `request` object.
|
|
18
|
+
*
|
|
19
|
+
* **Parameter Format**:
|
|
20
|
+
* - Always wrap parameters in a `request` object: `{"request": {"portalID": "PZ-9999"}}`
|
|
21
|
+
* - Required parameter:
|
|
22
|
+
* - `portalID` (string) - The portal ID (format: 2-4 letter prefix + dash + 4-15 digits, e.g., "PZ-9999")
|
|
23
|
+
* - `acceptLanguage` (string, default: "en-US") - Accept-Language header value
|
|
24
|
+
* - Optional parameters:
|
|
25
|
+
* - `Dollar_lang` (string, default: "en-US") - Language code
|
|
26
|
+
* - `Dollar_pagenum` (number, default: 1) - Page number for pagination
|
|
27
|
+
* - `Dollar_pagesize` (number, default: 10) - Number of results per page
|
|
28
|
+
* - `dollarFilterTopicId` (string) - Filter by topic ID
|
|
29
|
+
* - `dollarFilterTags` (string) - Comma-separated list of Tag/Tag Group IDs
|
|
30
|
+
*
|
|
31
|
+
* **Example**: To get popular articles from portal "PZ-9999", call with:
|
|
32
|
+
* ```json
|
|
33
|
+
* {"request": {"portalID": "PZ-9999"}}
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* **Example with optional parameters**:
|
|
37
|
+
* ```json
|
|
38
|
+
* {"request": {"portalID": "PZ-9999", "Dollar_lang": "en-US", "Dollar_pagesize": 20}}
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* ## Displaying Results (MCP-Specific)
|
|
42
|
+
* **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.
|
|
43
|
+
*
|
|
44
|
+
* **What to display:**
|
|
45
|
+
* - Display all popular articles with their names and IDs
|
|
46
|
+
* - Show article summaries or descriptions when available
|
|
47
|
+
* - Display metadata such as `articleType`, `createdDate`, `modifiedDate`
|
|
48
|
+
* - Show `imageURL` if available (mention thumbnail availability)
|
|
49
|
+
* - Include `paginationInfo` if pagination is used
|
|
50
|
+
* - Format articles in a numbered or bulleted list
|
|
51
|
+
*
|
|
52
|
+
* **Example**: "Here are the most popular articles: 1) [Article Name] (ID: PROD-123) - [summary]..."
|
|
53
|
+
*
|
|
15
54
|
* ## Prerequisites
|
|
16
55
|
* - Requires a valid portal ID. If you don't have the portal ID, first call 'get-portals' to get available portals.
|
|
17
56
|
* - Portal ID format: 2-4 letter prefix + dash + 4-15 digits (e.g., "EB-123456789")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPopularArticles.d.ts","sourceRoot":"","sources":["../../../src/funcs/getPopularArticles.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAK1C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,yBAAyB,EAEzB,0BAA0B,EAE3B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC
|
|
1
|
+
{"version":3,"file":"getPopularArticles.d.ts","sourceRoot":"","sources":["../../../src/funcs/getPopularArticles.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAK1C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,yBAAyB,EAEzB,0BAA0B,EAE3B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,yBAAyB,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,0BAA0B,EACxB,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAMA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
|
-
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
4
|
+
import { encodeFormQuery, encodeSimple, queryJoin } from "../lib/encodings.js";
|
|
5
5
|
import * as M from "../lib/matchers.js";
|
|
6
6
|
import { compactMap } from "../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -15,6 +15,45 @@ import { APIPromise } from "../types/async.js";
|
|
|
15
15
|
* @remarks
|
|
16
16
|
* Get Popular Articles
|
|
17
17
|
*
|
|
18
|
+
* ## How to Use This Tool
|
|
19
|
+
*
|
|
20
|
+
* **CRITICAL**: This tool requires a `request` parameter containing the request object. All parameters must be passed inside a `request` object.
|
|
21
|
+
*
|
|
22
|
+
* **Parameter Format**:
|
|
23
|
+
* - Always wrap parameters in a `request` object: `{"request": {"portalID": "PZ-9999"}}`
|
|
24
|
+
* - Required parameter:
|
|
25
|
+
* - `portalID` (string) - The portal ID (format: 2-4 letter prefix + dash + 4-15 digits, e.g., "PZ-9999")
|
|
26
|
+
* - `acceptLanguage` (string, default: "en-US") - Accept-Language header value
|
|
27
|
+
* - Optional parameters:
|
|
28
|
+
* - `Dollar_lang` (string, default: "en-US") - Language code
|
|
29
|
+
* - `Dollar_pagenum` (number, default: 1) - Page number for pagination
|
|
30
|
+
* - `Dollar_pagesize` (number, default: 10) - Number of results per page
|
|
31
|
+
* - `dollarFilterTopicId` (string) - Filter by topic ID
|
|
32
|
+
* - `dollarFilterTags` (string) - Comma-separated list of Tag/Tag Group IDs
|
|
33
|
+
*
|
|
34
|
+
* **Example**: To get popular articles from portal "PZ-9999", call with:
|
|
35
|
+
* ```json
|
|
36
|
+
* {"request": {"portalID": "PZ-9999"}}
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* **Example with optional parameters**:
|
|
40
|
+
* ```json
|
|
41
|
+
* {"request": {"portalID": "PZ-9999", "Dollar_lang": "en-US", "Dollar_pagesize": 20}}
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* ## Displaying Results (MCP-Specific)
|
|
45
|
+
* **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.
|
|
46
|
+
*
|
|
47
|
+
* **What to display:**
|
|
48
|
+
* - Display all popular articles with their names and IDs
|
|
49
|
+
* - Show article summaries or descriptions when available
|
|
50
|
+
* - Display metadata such as `articleType`, `createdDate`, `modifiedDate`
|
|
51
|
+
* - Show `imageURL` if available (mention thumbnail availability)
|
|
52
|
+
* - Include `paginationInfo` if pagination is used
|
|
53
|
+
* - Format articles in a numbered or bulleted list
|
|
54
|
+
*
|
|
55
|
+
* **Example**: "Here are the most popular articles: 1) [Article Name] (ID: PROD-123) - [summary]..."
|
|
56
|
+
*
|
|
18
57
|
* ## Prerequisites
|
|
19
58
|
* - Requires a valid portal ID. If you don't have the portal ID, first call 'get-portals' to get available portals.
|
|
20
59
|
* - Portal ID format: 2-4 letter prefix + dash + 4-15 digits (e.g., "EB-123456789")
|
|
@@ -41,16 +80,21 @@ async function $do(client$, request, options) {
|
|
|
41
80
|
}),
|
|
42
81
|
};
|
|
43
82
|
const path$ = pathToFunc("/portals/{portalID}/populararticles")(pathParams$);
|
|
44
|
-
const query$ = encodeFormQuery({
|
|
83
|
+
const query$ = queryJoin(encodeFormQuery({
|
|
84
|
+
"articleResultAdditionalAttributes": payload$.articleResultAdditionalAttributes,
|
|
85
|
+
}, { explode: false }), encodeFormQuery({
|
|
45
86
|
"$filter[tags]": payload$.dollarFilterTags,
|
|
46
87
|
"$filter[topicId]": payload$.dollarFilterTopicId,
|
|
47
88
|
"$lang": payload$.Dollar_lang,
|
|
48
89
|
"$pagenum": payload$.Dollar_pagenum,
|
|
49
90
|
"$pagesize": payload$.Dollar_pagesize,
|
|
50
|
-
});
|
|
91
|
+
}));
|
|
51
92
|
const headers$ = new Headers(compactMap({
|
|
52
93
|
Accept: "application/json",
|
|
53
94
|
"Accept-Language": encodeSimple("Accept-Language", payload$.acceptLanguage, { explode: false, charEncoding: "none" }),
|
|
95
|
+
"x-egain-activity-id": encodeSimple("x-egain-activity-id", payload$.xEgainActivityId, { explode: false, charEncoding: "none" }),
|
|
96
|
+
"x-ext-integration-id": encodeSimple("x-ext-integration-id", payload$.xExtIntegrationId, { explode: false, charEncoding: "none" }),
|
|
97
|
+
"x-ext-interaction-id": encodeSimple("x-ext-interaction-id", payload$.xExtInteractionId, { explode: false, charEncoding: "none" }),
|
|
54
98
|
}));
|
|
55
99
|
const securityInput = await extractSecurity(client$._options.security);
|
|
56
100
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPopularArticles.js","sourceRoot":"","sources":["../../../src/funcs/getPopularArticles.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"getPopularArticles.js","sourceRoot":"","sources":["../../../src/funcs/getPopularArticles.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,KAAK,CAAC,M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H,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,OAAO,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC;IACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC;IAChC,MAAM,eAAe,GAAG;QACtB,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE;KAChD,CAAC;IAEF,MAAM,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAU7B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,oCAAoC,EAAE;QAChD,GAAG,EAAE,gBAAgB;KACtB,CAAC,EACF,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,oCAAoC,CAAC,EAChD,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,oCAAoC,EAAE;QACtE,GAAG,EAAE,eAAe;KACrB,CAAC,EACF,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,oCAAoC,EAAE,EAAE,GAAG,EAAE,eAAe,EAAE,CAAC,CAC5E,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC,CAAC;IAEpD,OAAO,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;AACpE,CAAC"}
|
|
@@ -12,6 +12,15 @@ import { Result } from "../types/fp.js";
|
|
|
12
12
|
* @remarks
|
|
13
13
|
* Get All Portals Accessible to User
|
|
14
14
|
*
|
|
15
|
+
* ## How to Use This Tool
|
|
16
|
+
*
|
|
17
|
+
* **Parameter Format**: This tool requires a `request` parameter containing the request object.
|
|
18
|
+
* - **CRITICAL**: All parameters in this tool are optional. You may pass an empty request object: `{"request": {}}`
|
|
19
|
+
* - If you want to specify a language, pass: `{"request": {"Dollar_lang": "en-US"}}`
|
|
20
|
+
* - The `Dollar_lang` parameter is **optional** - if omitted, the API defaults to "en-US"
|
|
21
|
+
* - **Example with empty request** (recommended if you don't need to specify language): `{"request": {}}`
|
|
22
|
+
* - **Example with language**: `{"request": {"Dollar_lang": "en-US"}}`
|
|
23
|
+
*
|
|
15
24
|
* ## Overview
|
|
16
25
|
* The Get All Portals Accessible to User API allows a user to fetch all portals accessible to the user across all departments.
|
|
17
26
|
* - If no access tags are specified for a portal, any user can access the portal.
|
|
@@ -59,6 +68,22 @@ import { Result } from "../types/fp.js";
|
|
|
59
68
|
* - Search the complete merged list before concluding the portal doesn't exist
|
|
60
69
|
*
|
|
61
70
|
* This ensures reliable portal name-to-ID resolution and prevents false "not found" errors.
|
|
71
|
+
*
|
|
72
|
+
* ## Displaying Results (MCP-Specific)
|
|
73
|
+
* **CRITICAL**: When this tool returns data successfully, you MUST display the portal information to the user in your response. Do not silently process the data - always show the user what was returned.
|
|
74
|
+
*
|
|
75
|
+
* **What to display:**
|
|
76
|
+
* - Display all portals with their names and IDs
|
|
77
|
+
* - Show portal `id` (the portal ID needed for other API calls)
|
|
78
|
+
* - Display portal `name` (the human-readable portal name)
|
|
79
|
+
* - Show `departmentName` if available
|
|
80
|
+
* - Include `shortURL` if available
|
|
81
|
+
* - Display `paginationInfo` to show total count and current page
|
|
82
|
+
* - Format portals in a clear list format (e.g., "Portal Name (ID: PORTAL-123)")
|
|
83
|
+
*
|
|
84
|
+
* **Example**: "Here are the available portals: 1) Business Portal (ID: PORTAL-123), 2) Customer Portal (ID: PORTAL-456)..."
|
|
85
|
+
*
|
|
86
|
+
* **Important**: Always display portal IDs clearly, as users will need these IDs to call other tools.
|
|
62
87
|
*/
|
|
63
|
-
export declare function getPortals(client$: EgainMcpCore, request
|
|
88
|
+
export declare function getPortals(client$: EgainMcpCore, request?: GetMyPortalsRequest | undefined, options?: RequestOptions): APIPromise<Result<GetMyPortalsResponse, APIError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
|
|
64
89
|
//# sourceMappingURL=getPortals.d.ts.map
|